RTEMS-6
Annotated Report
libuntar
Sun Feb 28 12:40:53 2021

40004f28 <Untar_FromChunk_Print>:                                                         
  context->base.printer = printer;                                                        
40004f28:   06d52e23            sw  a3,124(a0)                                            
  while (todo > 0) {                                                                      
40004f2c:   22060a63            beqz    a2,40005160 <Untar_FromChunk_Print+0x238>         
{                                                                                         
40004f30:   fc010113            addi    sp,sp,-64                                         
40004f34:   02812c23            sw  s0,56(sp)                                             
40004f38:   03212823            sw  s2,48(sp)                                             
40004f3c:   03312623            sw  s3,44(sp)                                             
40004f40:   03412423            sw  s4,40(sp)                                             
40004f44:   03512223            sw  s5,36(sp)                                             
40004f48:   03612023            sw  s6,32(sp)                                             
40004f4c:   01712e23            sw  s7,28(sp)                                             
40004f50:   01812c23            sw  s8,24(sp)                                             
40004f54:   01912a23            sw  s9,20(sp)                                             
40004f58:   01a12823            sw  s10,16(sp)                                            
40004f5c:   01b12623            sw  s11,12(sp)                                            
40004f60:   02112e23            sw  ra,60(sp)                                             
40004f64:   02912a23            sw  s1,52(sp)                                             
40004f68:   00050413            mv  s0,a0                                                 
40004f6c:   00060913            mv  s2,a2                                                 
40004f70:   00058a13            mv  s4,a1                                                 
  done = 0;                                                                               
40004f74:   00000993            li  s3,0                                                  
    switch (context->state) {                                                             
40004f78:   00100d93            li  s11,1                                                 
40004f7c:   00200d13            li  s10,2                                                 
          context->out_fd = -1;                                                           
40004f80:   fff00b13            li  s6,-1                                                 
        remaining = 512 - context->done_bytes;                                            
40004f84:   20000a93            li  s5,512                                                
  if (strncmp(&bufr[257], "ustar", 5)) {                                                  
40004f88:   1e950c13            addi    s8,a0,489                                         
40004f8c:   40017bb7            lui s7,0x40017                                            
            &context->header[0]                                                           
40004f90:   0e850c93            addi    s9,a0,232                                         
    switch (context->state) {                                                             
40004f94:   0e442783            lw  a5,228(s0)                                            
40004f98:   05b78663            beq a5,s11,40004fe4 <Untar_FromChunk_Print+0xbc>          
40004f9c:   11a78463            beq a5,s10,400050a4 <Untar_FromChunk_Print+0x17c>         
40004fa0:   06078e63            beqz    a5,4000501c <Untar_FromChunk_Print+0xf4>          <== ALWAYS TAKEN
40004fa4:   00100513            li  a0,1                                                  <== NOT EXECUTED
}                                                                                         
40004fa8:   03c12083            lw  ra,60(sp)                                             
40004fac:   03812403            lw  s0,56(sp)                                             
40004fb0:   03412483            lw  s1,52(sp)                                             
40004fb4:   03012903            lw  s2,48(sp)                                             
40004fb8:   02c12983            lw  s3,44(sp)                                             
40004fbc:   02812a03            lw  s4,40(sp)                                             
40004fc0:   02412a83            lw  s5,36(sp)                                             
40004fc4:   02012b03            lw  s6,32(sp)                                             
40004fc8:   01c12b83            lw  s7,28(sp)                                             
40004fcc:   01812c03            lw  s8,24(sp)                                             
40004fd0:   01412c83            lw  s9,20(sp)                                             
40004fd4:   01012d03            lw  s10,16(sp)                                            
40004fd8:   00c12d83            lw  s11,12(sp)                                            
40004fdc:   04010113            addi    sp,sp,64                                          
40004fe0:   00008067            ret                                                       
        remaining = context->base.file_size - context->done_bytes;                        
40004fe4:   07042683            lw  a3,112(s0)                                            
40004fe8:   2e842783            lw  a5,744(s0)                                            
40004fec:   40f684b3            sub s1,a3,a5                                              
        consume = MIN(remaining, todo);                                                   
40004ff0:   12996263            bltu    s2,s1,40005114 <Untar_FromChunk_Print+0x1ec>      
        context->done_bytes += consume;                                                   
40004ff4:   009787b3            add a5,a5,s1                                              
40004ff8:   2ef42423            sw  a5,744(s0)                                            
        if (context->done_bytes == context->base.file_size) {                             
40004ffc:   00f69663            bne a3,a5,40005008 <Untar_FromChunk_Print+0xe0>           
          context->state = UNTAR_CHUNK_HEADER;                                            
40005000:   0e042223            sw  zero,228(s0)                                          
          context->done_bytes = 0;                                                        
40005004:   2e042423            sw  zero,744(s0)                                          
    todo -= consume;                                                                      
40005008:   40990933            sub s2,s2,s1                                              
    done += consume;                                                                      
4000500c:   009989b3            add s3,s3,s1                                              
  while (todo > 0) {                                                                      
40005010:   f80912e3            bnez    s2,40004f94 <Untar_FromChunk_Print+0x6c>          <== NEVER TAKEN
  return UNTAR_SUCCESSFUL;                                                                
40005014:   00000513            li  a0,0                                                  
40005018:   f91ff06f            j   40004fa8 <Untar_FromChunk_Print+0x80>                 
        remaining = 512 - context->done_bytes;                                            
4000501c:   2e842503            lw  a0,744(s0)                                            
40005020:   40aa84b3            sub s1,s5,a0                                              
        consume = MIN(remaining, todo);                                                   
40005024:   0e996463            bltu    s2,s1,4000510c <Untar_FromChunk_Print+0x1e4>      
        memcpy(&context->header[context->done_bytes], &buf[done], consume);               
40005028:   0e850513            addi    a0,a0,232                                         
4000502c:   00048613            mv  a2,s1                                                 
40005030:   013a05b3            add a1,s4,s3                                              
40005034:   00a40533            add a0,s0,a0                                              
40005038:   4cd0c0ef            jal ra,40011d04 <memcpy>                                  
        context->done_bytes += consume;                                                   
4000503c:   2e842783            lw  a5,744(s0)                                            
40005040:   00f487b3            add a5,s1,a5                                              
40005044:   2ef42423            sw  a5,744(s0)                                            
        if (context->done_bytes == 512) {                                                 
40005048:   fd5790e3            bne a5,s5,40005008 <Untar_FromChunk_Print+0xe0>           
  ctx->file_name[0] = '\0';                                                               
4000504c:   00442783            lw  a5,4(s0)                                              
  if (strncmp(&bufr[257], "ustar", 5)) {                                                  
40005050:   00500613            li  a2,5                                                  
40005054:   580b8593            addi    a1,s7,1408 # 40017580 <IMFS_node_control_sym_link+0xc4>
  ctx->file_name[0] = '\0';                                                               
40005058:   00078023            sb  zero,0(a5)                                            
  ctx->file_size = 0;                                                                     
4000505c:   06042823            sw  zero,112(s0)                                          
  ctx->nblocks = 0;                                                                       
40005060:   06042a23            sw  zero,116(s0)                                          
  ctx->linkflag = -1;                                                                     
40005064:   07640c23            sb  s6,120(s0)                                            
  if (strncmp(&bufr[257], "ustar", 5)) {                                                  
40005068:   000c0513            mv  a0,s8                                                 
4000506c:   1590d0ef            jal ra,400129c4 <strncmp>                                 
40005070:   02051063            bnez    a0,40005090 <Untar_FromChunk_Print+0x168>         
40005074:   000c8593            mv  a1,s9                                                 
40005078:   00040513            mv  a0,s0                                                 
4000507c:   eb4ff0ef            jal ra,40004730 <Untar_ProcessHeader.part.0>              
          if (retval != UNTAR_SUCCESSFUL) {                                               
40005080:   0c051a63            bnez    a0,40005154 <Untar_FromChunk_Print+0x22c>         <== NEVER TAKEN
          if (context->base.linkflag == REGTYPE) {                                        
40005084:   07844783            lbu a5,120(s0)                                            
40005088:   03000713            li  a4,48                                                 
4000508c:   08e78863            beq a5,a4,4000511c <Untar_FromChunk_Print+0x1f4>          
          context->done_bytes = 0;                                                        
40005090:   2e042423            sw  zero,744(s0)                                          
    todo -= consume;                                                                      
40005094:   40990933            sub s2,s2,s1                                              
    done += consume;                                                                      
40005098:   009989b3            add s3,s3,s1                                              
  while (todo > 0) {                                                                      
4000509c:   ee091ce3            bnez    s2,40004f94 <Untar_FromChunk_Print+0x6c>          <== NEVER TAKEN
400050a0:   f75ff06f            j   40005014 <Untar_FromChunk_Print+0xec>                 
        remaining = context->base.file_size - context->done_bytes;                        
400050a4:   07042483            lw  s1,112(s0)                                            
400050a8:   2e842783            lw  a5,744(s0)                                            
400050ac:   40f484b3            sub s1,s1,a5                                              
        consume = MIN(remaining, todo);                                                   
400050b0:   04996a63            bltu    s2,s1,40005104 <Untar_FromChunk_Print+0x1dc>      
        write(context->out_fd, &buf[done], consume);                                      
400050b4:   2ec42503            lw  a0,748(s0)                                            
400050b8:   00048613            mv  a2,s1                                                 
400050bc:   013a05b3            add a1,s4,s3                                              
400050c0:   845fd0ef            jal ra,40002904 <write>                                   
        context->done_bytes += consume;                                                   
400050c4:   2e842783            lw  a5,744(s0)                                            
        if (context->done_bytes == context->base.file_size) {                             
400050c8:   07042683            lw  a3,112(s0)                                            
        context->done_bytes += consume;                                                   
400050cc:   00f487b3            add a5,s1,a5                                              
400050d0:   2ef42423            sw  a5,744(s0)                                            
        if (context->done_bytes == context->base.file_size) {                             
400050d4:   f2d79ae3            bne a5,a3,40005008 <Untar_FromChunk_Print+0xe0>           
          close(context->out_fd);                                                         
400050d8:   2ec42503            lw  a0,748(s0)                                            
400050dc:   9fdfb0ef            jal ra,40000ad8 <close>                                   
          context->base.file_size = 512 * context->base.nblocks                           
400050e0:   07442783            lw  a5,116(s0)                                            
            - context->base.file_size;                                                    
400050e4:   07042683            lw  a3,112(s0)                                            
          context->out_fd = -1;                                                           
400050e8:   2f642623            sw  s6,748(s0)                                            
          context->base.file_size = 512 * context->base.nblocks                           
400050ec:   00979793            slli    a5,a5,0x9                                         
            - context->base.file_size;                                                    
400050f0:   40d787b3            sub a5,a5,a3                                              
          context->state = UNTAR_CHUNK_SKIP;                                              
400050f4:   0fb42223            sw  s11,228(s0)                                           
          context->base.file_size = 512 * context->base.nblocks                           
400050f8:   06f42823            sw  a5,112(s0)                                            
          context->done_bytes = 0;                                                        
400050fc:   2e042423            sw  zero,744(s0)                                          
40005100:   f95ff06f            j   40005094 <Untar_FromChunk_Print+0x16c>                
        consume = MIN(remaining, todo);                                                   
40005104:   00090493            mv  s1,s2                                                 
40005108:   fadff06f            j   400050b4 <Untar_FromChunk_Print+0x18c>                
        consume = MIN(remaining, todo);                                                   
4000510c:   00090493            mv  s1,s2                                                 
40005110:   f19ff06f            j   40005028 <Untar_FromChunk_Print+0x100>                
        consume = MIN(remaining, todo);                                                   
40005114:   00090493            mv  s1,s2                                                 
40005118:   eddff06f            j   40004ff4 <Untar_FromChunk_Print+0xcc>                 
            context->out_fd = creat(context->base.file_path,                              
4000511c:   06c42583            lw  a1,108(s0)                                            
40005120:   00042503            lw  a0,0(s0)                                              
40005124:   76c0c0ef            jal ra,40011890 <creat>                                   
40005128:   2ea42623            sw  a0,748(s0)                                            
            if (context->out_fd >= 0) {                                                   
4000512c:   00054863            bltz    a0,4000513c <Untar_FromChunk_Print+0x214>         <== NEVER TAKEN
              context->state = UNTAR_CHUNK_WRITE;                                         
40005130:   0fa42223            sw  s10,228(s0)                                           
              context->done_bytes = 0;                                                    
40005134:   2e042423            sw  zero,744(s0)                                          
40005138:   ed1ff06f            j   40005008 <Untar_FromChunk_Print+0xe0>                 
              context->base.file_size = 512 * context->base.nblocks;                      
4000513c:   07442783            lw  a5,116(s0)                                            <== NOT EXECUTED
              context->state = UNTAR_CHUNK_SKIP;                                          
40005140:   0fb42223            sw  s11,228(s0)                                           <== NOT EXECUTED
              context->done_bytes = 0;                                                    
40005144:   2e042423            sw  zero,744(s0)                                          <== NOT EXECUTED
              context->base.file_size = 512 * context->base.nblocks;                      
40005148:   00979793            slli    a5,a5,0x9                                         <== NOT EXECUTED
4000514c:   06f42823            sw  a5,112(s0)                                            <== NOT EXECUTED
              context->done_bytes = 0;                                                    
40005150:   eb9ff06f            j   40005008 <Untar_FromChunk_Print+0xe0>                 <== NOT EXECUTED
            context->state = UNTAR_CHUNK_ERROR;                                           
40005154:   00300793            li  a5,3                                                  <== NOT EXECUTED
40005158:   0ef42223            sw  a5,228(s0)                                            <== NOT EXECUTED
            return retval;                                                                
4000515c:   e4dff06f            j   40004fa8 <Untar_FromChunk_Print+0x80>                 <== NOT EXECUTED
  return UNTAR_SUCCESSFUL;                                                                
40005160:   00000513            li  a0,0                                                  
}                                                                                         
40005164:   00008067            ret                                                       
                                                                                          

40004d54 <Untar_FromFile_Print>: {
40004d54:   ee010113            addi    sp,sp,-288                                        
40004d58:   10812c23            sw  s0,280(sp)                                            
40004d5c:   00058413            mv  s0,a1                                                 
  if ((fd = open(tar_name, O_RDONLY)) < 0) {                                              
40004d60:   00000593            li  a1,0                                                  
{                                                                                         
40004d64:   10112e23            sw  ra,284(sp)                                            
40004d68:   10912a23            sw  s1,276(sp)                                            
40004d6c:   11212823            sw  s2,272(sp)                                            
40004d70:   11312623            sw  s3,268(sp)                                            
40004d74:   11412423            sw  s4,264(sp)                                            
40004d78:   11512223            sw  s5,260(sp)                                            
40004d7c:   11612023            sw  s6,256(sp)                                            
40004d80:   0f712e23            sw  s7,252(sp)                                            
  if ((fd = open(tar_name, O_RDONLY)) < 0) {                                              
40004d84:   801fc0ef            jal ra,40001584 <open>                                    
40004d88:   14054663            bltz    a0,40004ed4 <Untar_FromFile_Print+0x180>          <== NEVER TAKEN
40004d8c:   00050913            mv  s2,a0                                                 
  bufr = (char *)malloc(512);                                                             
40004d90:   20000513            li  a0,512                                                
40004d94:   7ec030ef            jal ra,40008580 <malloc>                                  
40004d98:   00050493            mv  s1,a0                                                 
  if (bufr == NULL) {                                                                     
40004d9c:   14050e63            beqz    a0,40004ef8 <Untar_FromFile_Print+0x1a4>          <== NEVER TAKEN
  ctx.file_path = buf;                                                                    
40004da0:   00c10793            addi    a5,sp,12                                          
40004da4:   06f12823            sw  a5,112(sp)                                            
  ctx.file_name = buf;                                                                    
40004da8:   06f12a23            sw  a5,116(sp)                                            
  ctx.printer = printer;                                                                  
40004dac:   0e812623            sw  s0,236(sp)                                            
  ctx->linkflag = -1;                                                                     
40004db0:   fff00a93            li  s5,-1                                                 
  if (strncmp(&bufr[257], "ustar", 5)) {                                                  
40004db4:   10150a13            addi    s4,a0,257                                         
40004db8:   400179b7            lui s3,0x40017                                            
  ctx->linkflag = -1;                                                                     
40004dbc:   fff00b93            li  s7,-1                                                 
    if (ctx.linkflag == REGTYPE) {                                                        
40004dc0:   03000b13            li  s6,48                                                 
    if ((n = read(fd, bufr, 512)) != 512) {                                               
40004dc4:   20000613            li  a2,512                                                
40004dc8:   00048593            mv  a1,s1                                                 
40004dcc:   00090513            mv  a0,s2                                                 
40004dd0:   b95fc0ef            jal ra,40001964 <read>                                    
40004dd4:   00050713            mv  a4,a0                                                 
40004dd8:   20000793            li  a5,512                                                
  if (strncmp(&bufr[257], "ustar", 5)) {                                                  
40004ddc:   00500613            li  a2,5                                                  
40004de0:   58098593            addi    a1,s3,1408 # 40017580 <IMFS_node_control_sym_link+0xc4>
40004de4:   000a0513            mv  a0,s4                                                 
    if ((n = read(fd, bufr, 512)) != 512) {                                               
40004de8:   0af71463            bne a4,a5,40004e90 <Untar_FromFile_Print+0x13c>           
  ctx->file_name[0] = '\0';                                                               
40004dec:   07412783            lw  a5,116(sp)                                            
40004df0:   00078023            sb  zero,0(a5)                                            
  ctx->file_size = 0;                                                                     
40004df4:   0e012023            sw  zero,224(sp)                                          
  ctx->nblocks = 0;                                                                       
40004df8:   0e012223            sw  zero,228(sp)                                          
  ctx->linkflag = -1;                                                                     
40004dfc:   0f510423            sb  s5,232(sp)                                            
  if (strncmp(&bufr[257], "ustar", 5)) {                                                  
40004e00:   3c50d0ef            jal ra,400129c4 <strncmp>                                 
40004e04:   00050793            mv  a5,a0                                                 
40004e08:   00048593            mv  a1,s1                                                 
40004e0c:   07010513            addi    a0,sp,112                                         
40004e10:   fa079ae3            bnez    a5,40004dc4 <Untar_FromFile_Print+0x70>           
40004e14:   91dff0ef            jal ra,40004730 <Untar_ProcessHeader.part.0>              
    if (ctx.linkflag == REGTYPE) {                                                        
40004e18:   00050413            mv  s0,a0                                                 
    if (retval != UNTAR_SUCCESSFUL)                                                       
40004e1c:   06051c63            bnez    a0,40004e94 <Untar_FromFile_Print+0x140>          <== NEVER TAKEN
    if (ctx.linkflag == REGTYPE) {                                                        
40004e20:   0e814783            lbu a5,232(sp)                                            
40004e24:   fb6790e3            bne a5,s6,40004dc4 <Untar_FromFile_Print+0x70>            
      if ((out_fd = creat(ctx.file_path, ctx.mode)) == -1) {                              
40004e28:   0dc12583            lw  a1,220(sp)                                            
40004e2c:   07012503            lw  a0,112(sp)                                            
40004e30:   2610c0ef            jal ra,40011890 <creat>                                   
40004e34:   00050b13            mv  s6,a0                                                 
40004e38:   0b750263            beq a0,s7,40004edc <Untar_FromFile_Print+0x188>           
        for (i = 0; i < ctx.nblocks; i++) {                                               
40004e3c:   0e412783            lw  a5,228(sp)                                            
40004e40:   04078263            beqz    a5,40004e84 <Untar_FromFile_Print+0x130>          <== NEVER TAKEN
          n = read(fd, bufr, 512);                                                        
40004e44:   20000613            li  a2,512                                                
40004e48:   00048593            mv  a1,s1                                                 
40004e4c:   00090513            mv  a0,s2                                                 
40004e50:   b15fc0ef            jal ra,40001964 <read>                                    
          n = MIN(n, ctx.file_size - (i * 512UL));                                        
40004e54:   0e012603            lw  a2,224(sp)                                            
40004e58:   00941713            slli    a4,s0,0x9                                         
          n = read(fd, bufr, 512);                                                        
40004e5c:   00050793            mv  a5,a0                                                 
          n = MIN(n, ctx.file_size - (i * 512UL));                                        
40004e60:   40e60633            sub a2,a2,a4                                              
          (void) write(out_fd, bufr, n);                                                  
40004e64:   00048593            mv  a1,s1                                                 
40004e68:   000b0513            mv  a0,s6                                                 
        for (i = 0; i < ctx.nblocks; i++) {                                               
40004e6c:   00140413            addi    s0,s0,1                                           
          n = MIN(n, ctx.file_size - (i * 512UL));                                        
40004e70:   00c7f463            bgeu    a5,a2,40004e78 <Untar_FromFile_Print+0x124>       
40004e74:   00078613            mv  a2,a5                                                 <== NOT EXECUTED
          (void) write(out_fd, bufr, n);                                                  
40004e78:   a8dfd0ef            jal ra,40002904 <write>                                   
        for (i = 0; i < ctx.nblocks; i++) {                                               
40004e7c:   0e412783            lw  a5,228(sp)                                            
40004e80:   fcf462e3            bltu    s0,a5,40004e44 <Untar_FromFile_Print+0xf0>        
        close(out_fd);                                                                    
40004e84:   000b0513            mv  a0,s6                                                 
40004e88:   c51fb0ef            jal ra,40000ad8 <close>                                   
40004e8c:   f35ff06f            j   40004dc0 <Untar_FromFile_Print+0x6c>                  
40004e90:   00000413            li  s0,0                                                  
  free(bufr);                                                                             
40004e94:   00048513            mv  a0,s1                                                 
40004e98:   444030ef            jal ra,400082dc <free>                                    
  close(fd);                                                                              
40004e9c:   00090513            mv  a0,s2                                                 
40004ea0:   c39fb0ef            jal ra,40000ad8 <close>                                   
}                                                                                         
40004ea4:   11c12083            lw  ra,284(sp)                                            
40004ea8:   00040513            mv  a0,s0                                                 
40004eac:   11812403            lw  s0,280(sp)                                            
40004eb0:   11412483            lw  s1,276(sp)                                            
40004eb4:   11012903            lw  s2,272(sp)                                            
40004eb8:   10c12983            lw  s3,268(sp)                                            
40004ebc:   10812a03            lw  s4,264(sp)                                            
40004ec0:   10412a83            lw  s5,260(sp)                                            
40004ec4:   10012b03            lw  s6,256(sp)                                            
40004ec8:   0fc12b83            lw  s7,252(sp)                                            
40004ecc:   12010113            addi    sp,sp,288                                         
40004ed0:   00008067            ret                                                       
    return UNTAR_FAIL;                                                                    
40004ed4:   00100413            li  s0,1                                                  <== NOT EXECUTED
40004ed8:   fcdff06f            j   40004ea4 <Untar_FromFile_Print+0x150>                 <== NOT EXECUTED
        (void) lseek(fd, SEEK_CUR, 512UL * ctx.nblocks);                                  
40004edc:   0e412683            lw  a3,228(sp)                                            <== NOT EXECUTED
40004ee0:   00000613            li  a2,0                                                  <== NOT EXECUTED
40004ee4:   00090513            mv  a0,s2                                                 <== NOT EXECUTED
40004ee8:   00969693            slli    a3,a3,0x9                                         <== NOT EXECUTED
40004eec:   00100593            li  a1,1                                                  <== NOT EXECUTED
40004ef0:   f6dfb0ef            jal ra,40000e5c <lseek>                                   <== NOT EXECUTED
40004ef4:   ecdff06f            j   40004dc0 <Untar_FromFile_Print+0x6c>                  <== NOT EXECUTED
    close(fd);                                                                            
40004ef8:   00090513            mv  a0,s2                                                 <== NOT EXECUTED
40004efc:   bddfb0ef            jal ra,40000ad8 <close>                                   <== NOT EXECUTED
    return(UNTAR_FAIL);                                                                   
40004f00:   00100413            li  s0,1                                                  <== NOT EXECUTED
40004f04:   fa1ff06f            j   40004ea4 <Untar_FromFile_Print+0x150>                 <== NOT EXECUTED
                                                                                          

400051ec <Untar_FromGzChunk_Print>: Untar_GzChunkContext *ctx, void *chunk, size_t chunk_size, const rtems_printer *printer ) {
400051ec:   fe010113            addi    sp,sp,-32                                         
400051f0:   00812c23            sw  s0,24(sp)                                             
400051f4:   01312623            sw  s3,12(sp)                                             
400051f8:   01412423            sw  s4,8(sp)                                              
400051fc:   01512223            sw  s5,4(sp)                                              
40005200:   00112e23            sw  ra,28(sp)                                             
40005204:   00912a23            sw  s1,20(sp)                                             
40005208:   01212823            sw  s2,16(sp)                                             
4000520c:   00050413            mv  s0,a0                                                 
40005210:   00068a93            mv  s5,a3                                                 
  int untar_succesful;                                                                    
  int status;                                                                             
                                                                                          
  ctx->strm.next_in = (Bytef *)chunk;                                                     
40005214:   2eb52823            sw  a1,752(a0)                                            
  ctx->strm.avail_in = (size_t)chunk_size;                                                
40005218:   2ec52a23            sw  a2,756(a0)                                            
    /* Inflate until output buffer is not full */                                         
  do {                                                                                    
    ctx->strm.next_out = (Bytef *) ctx->inflateBuffer;                                    
    ctx->strm.avail_out = ctx->inflateBufferSize;                                         
                                                                                          
    status = inflate(&ctx->strm, Z_NO_FLUSH);                                             
4000521c:   2f050993            addi    s3,a0,752                                         
    if (status == Z_OK || status == Z_STREAM_END) {                                       
40005220:   00100a13            li  s4,1                                                  
40005224:   0180006f            j   4000523c <Untar_FromGzChunk_Print+0x50>               
      }                                                                                   
    } else {                                                                              
      untar_succesful = UNTAR_GZ_INFLATE_FAILED;                                          
    }                                                                                     
  } while (ctx->strm.avail_out == 0 && ctx->strm.avail_in > 0                             
      && status == Z_OK);                                                                 
40005228:   30042783            lw  a5,768(s0)                                            
4000522c:   08079263            bnez    a5,400052b0 <Untar_FromGzChunk_Print+0xc4>        
  } while (ctx->strm.avail_out == 0 && ctx->strm.avail_in > 0                             
40005230:   2f442783            lw  a5,756(s0)                                            
40005234:   06078e63            beqz    a5,400052b0 <Untar_FromGzChunk_Print+0xc4>        
      && status == Z_OK);                                                                 
40005238:   06049e63            bnez    s1,400052b4 <Untar_FromGzChunk_Print+0xc8>        <== NEVER TAKEN
    ctx->strm.next_out = (Bytef *) ctx->inflateBuffer;                                    
4000523c:   32842703            lw  a4,808(s0)                                            
    ctx->strm.avail_out = ctx->inflateBufferSize;                                         
40005240:   32c42783            lw  a5,812(s0)                                            
    status = inflate(&ctx->strm, Z_NO_FLUSH);                                             
40005244:   00000593            li  a1,0                                                  
    ctx->strm.next_out = (Bytef *) ctx->inflateBuffer;                                    
40005248:   2ee42e23            sw  a4,764(s0)                                            
    ctx->strm.avail_out = ctx->inflateBufferSize;                                         
4000524c:   30f42023            sw  a5,768(s0)                                            
    status = inflate(&ctx->strm, Z_NO_FLUSH);                                             
40005250:   00098513            mv  a0,s3                                                 
40005254:   55d070ef            jal ra,4000cfb0 <z_inflate>                               
40005258:   00050493            mv  s1,a0                                                 
      untar_succesful = UNTAR_GZ_INFLATE_FAILED;                                          
4000525c:   00400913            li  s2,4                                                  
    if (status == Z_OK || status == Z_STREAM_END) {                                       
40005260:   fcaa64e3            bltu    s4,a0,40005228 <Untar_FromGzChunk_Print+0x3c>     
      size_t inflated_size =                                                              
40005264:   32c42603            lw  a2,812(s0)                                            
40005268:   30042783            lw  a5,768(s0)                                            
      untar_succesful = Untar_FromChunk_Print(&ctx->base,                                 
4000526c:   32842583            lw  a1,808(s0)                                            
40005270:   00000693            li  a3,0                                                  
40005274:   40f60633            sub a2,a2,a5                                              
40005278:   00040513            mv  a0,s0                                                 
4000527c:   cadff0ef            jal ra,40004f28 <Untar_FromChunk_Print>                   
40005280:   00050913            mv  s2,a0                                                 
      if (untar_succesful != UNTAR_SUCCESSFUL){                                           
40005284:   fa0502e3            beqz    a0,40005228 <Untar_FromGzChunk_Print+0x3c>        <== ALWAYS TAKEN
    if (status != Z_OK) {                                                                 
      rtems_printf(printer, "Zlib inflate end failed\n");                                 
    }                                                                                     
  }                                                                                       
  return untar_succesful;                                                                 
}                                                                                         
40005288:   01c12083            lw  ra,28(sp)                                             
4000528c:   01812403            lw  s0,24(sp)                                             
40005290:   01412483            lw  s1,20(sp)                                             
40005294:   00c12983            lw  s3,12(sp)                                             
40005298:   00812a03            lw  s4,8(sp)                                              
4000529c:   00412a83            lw  s5,4(sp)                                              
400052a0:   00090513            mv  a0,s2                                                 
400052a4:   01012903            lw  s2,16(sp)                                             
400052a8:   02010113            addi    sp,sp,32                                          
400052ac:   00008067            ret                                                       
  if (status != Z_OK) {                                                                   
400052b0:   fc048ce3            beqz    s1,40005288 <Untar_FromGzChunk_Print+0x9c>        
    if (untar_succesful != UNTAR_SUCCESSFUL){                                             
400052b4:   02091e63            bnez    s2,400052f0 <Untar_FromGzChunk_Print+0x104>       <== NEVER TAKEN
    if (status != Z_STREAM_END) {                                                         
400052b8:   00100793            li  a5,1                                                  
400052bc:   00f48a63            beq s1,a5,400052d0 <Untar_FromGzChunk_Print+0xe4>         
      rtems_printf(printer, "Zlib inflate failed\n");                                     
400052c0:   400175b7            lui a1,0x40017                                            <== NOT EXECUTED
400052c4:   5d458593            addi    a1,a1,1492 # 400175d4 <IMFS_node_control_sym_link+0x118><== NOT EXECUTED
400052c8:   000a8513            mv  a0,s5                                                 <== NOT EXECUTED
400052cc:   4b8030ef            jal ra,40008784 <rtems_printf>                            <== NOT EXECUTED
    status = inflateEnd(&ctx->strm);                                                      
400052d0:   00098513            mv  a0,s3                                                 
400052d4:   584090ef            jal ra,4000e858 <z_inflateEnd>                            
    if (status != Z_OK) {                                                                 
400052d8:   fa0508e3            beqz    a0,40005288 <Untar_FromGzChunk_Print+0x9c>        <== ALWAYS TAKEN
      rtems_printf(printer, "Zlib inflate end failed\n");                                 
400052dc:   400175b7            lui a1,0x40017                                            <== NOT EXECUTED
400052e0:   5ec58593            addi    a1,a1,1516 # 400175ec <IMFS_node_control_sym_link+0x130><== NOT EXECUTED
400052e4:   000a8513            mv  a0,s5                                                 <== NOT EXECUTED
400052e8:   49c030ef            jal ra,40008784 <rtems_printf>                            <== NOT EXECUTED
400052ec:   f9dff06f            j   40005288 <Untar_FromGzChunk_Print+0x9c>               <== NOT EXECUTED
      rtems_printf(printer, "Untar not successful\n");                                    
400052f0:   400175b7            lui a1,0x40017                                            <== NOT EXECUTED
400052f4:   5bc58593            addi    a1,a1,1468 # 400175bc <IMFS_node_control_sym_link+0x100><== NOT EXECUTED
400052f8:   000a8513            mv  a0,s5                                                 <== NOT EXECUTED
400052fc:   488030ef            jal ra,40008784 <rtems_printf>                            <== NOT EXECUTED
40005300:   fb9ff06f            j   400052b8 <Untar_FromGzChunk_Print+0xcc>               <== NOT EXECUTED
                                                                                          

40004b38 <Untar_FromMemory_Print>: {
40004b38:   ed010113            addi    sp,sp,-304                                        
40004b3c:   13212023            sw  s2,288(sp)                                            
40004b40:   11612823            sw  s6,272(sp)                                            
  rtems_printf(printer, "untar: memory at %p (%zu)\n", tar_buf, size);                    
40004b44:   00058693            mv  a3,a1                                                 
{                                                                                         
40004b48:   00060b13            mv  s6,a2                                                 
40004b4c:   00058913            mv  s2,a1                                                 
  rtems_printf(printer, "untar: memory at %p (%zu)\n", tar_buf, size);                    
40004b50:   400175b7            lui a1,0x40017                                            
  ctx.file_path = buf;                                                                    
40004b54:   00c10793            addi    a5,sp,12                                          
{                                                                                         
40004b58:   12912223            sw  s1,292(sp)                                            
  rtems_printf(printer, "untar: memory at %p (%zu)\n", tar_buf, size);                    
40004b5c:   00050613            mv  a2,a0                                                 
{                                                                                         
40004b60:   00050493            mv  s1,a0                                                 
  rtems_printf(printer, "untar: memory at %p (%zu)\n", tar_buf, size);                    
40004b64:   58858593            addi    a1,a1,1416 # 40017588 <IMFS_node_control_sym_link+0xcc>
40004b68:   000b0513            mv  a0,s6                                                 
{                                                                                         
40004b6c:   12812423            sw  s0,296(sp)                                            
40004b70:   11312e23            sw  s3,284(sp)                                            
40004b74:   11412c23            sw  s4,280(sp)                                            
40004b78:   12112623            sw  ra,300(sp)                                            
40004b7c:   11512a23            sw  s5,276(sp)                                            
40004b80:   11712623            sw  s7,268(sp)                                            
40004b84:   11812423            sw  s8,264(sp)                                            
40004b88:   11912223            sw  s9,260(sp)                                            
40004b8c:   11a12023            sw  s10,256(sp)                                           
40004b90:   0fb12e23            sw  s11,252(sp)                                           
  ctx.file_path = buf;                                                                    
40004b94:   06f12823            sw  a5,112(sp)                                            
  ctx.file_name = buf;                                                                    
40004b98:   06f12a23            sw  a5,116(sp)                                            
  ctx.printer = printer;                                                                  
40004b9c:   0f612623            sw  s6,236(sp)                                            
  ptr = 0;                                                                                
40004ba0:   00000413            li  s0,0                                                  
  rtems_printf(printer, "untar: memory at %p (%zu)\n", tar_buf, size);                    
40004ba4:   3e1030ef            jal ra,40008784 <rtems_printf>                            
  ctx->linkflag = -1;                                                                     
40004ba8:   fff00a13            li  s4,-1                                                 
  if (strncmp(&bufr[257], "ustar", 5)) {                                                  
40004bac:   400179b7            lui s3,0x40017                                            
    if (ctx.linkflag == REGTYPE) {                                                        
40004bb0:   03000a93            li  s5,48                                                 
  if (strncmp(&bufr[257], "ustar", 5)) {                                                  
40004bb4:   10140513            addi    a0,s0,257                                         
    if (ptr + 512 > size) {                                                               
40004bb8:   20040d13            addi    s10,s0,512                                        
  if (strncmp(&bufr[257], "ustar", 5)) {                                                  
40004bbc:   00500613            li  a2,5                                                  
40004bc0:   58098593            addi    a1,s3,1408 # 40017580 <IMFS_node_control_sym_link+0xc4>
40004bc4:   00a48533            add a0,s1,a0                                              
    if (ptr + 512 > size) {                                                               
40004bc8:   0fa96a63            bltu    s2,s10,40004cbc <Untar_FromMemory_Print+0x184>    
  ctx->file_name[0] = '\0';                                                               
40004bcc:   07412783            lw  a5,116(sp)                                            
40004bd0:   00848db3            add s11,s1,s0                                             
  ptr = 0;                                                                                
40004bd4:   000d0413            mv  s0,s10                                                
  ctx->file_name[0] = '\0';                                                               
40004bd8:   00078023            sb  zero,0(a5)                                            
  ctx->file_size = 0;                                                                     
40004bdc:   0e012023            sw  zero,224(sp)                                          
  ctx->nblocks = 0;                                                                       
40004be0:   0e012223            sw  zero,228(sp)                                          
  ctx->linkflag = -1;                                                                     
40004be4:   0f410423            sb  s4,232(sp)                                            
  if (strncmp(&bufr[257], "ustar", 5)) {                                                  
40004be8:   5dd0d0ef            jal ra,400129c4 <strncmp>                                 
40004bec:   00050793            mv  a5,a0                                                 
40004bf0:   000d8593            mv  a1,s11                                                
40004bf4:   07010513            addi    a0,sp,112                                         
40004bf8:   fa079ee3            bnez    a5,40004bb4 <Untar_FromMemory_Print+0x7c>         
40004bfc:   b35ff0ef            jal ra,40004730 <Untar_ProcessHeader.part.0>              
    if (ctx.linkflag == REGTYPE) {                                                        
40004c00:   00050d93            mv  s11,a0                                                
    if (retval != UNTAR_SUCCESSFUL)                                                       
40004c04:   0a051e63            bnez    a0,40004cc0 <Untar_FromMemory_Print+0x188>        <== NEVER TAKEN
    if (ctx.linkflag == REGTYPE) {                                                        
40004c08:   0e814783            lbu a5,232(sp)                                            
40004c0c:   fb5794e3            bne a5,s5,40004bb4 <Untar_FromMemory_Print+0x7c>          
      if ((fd = open(ctx.file_path,                                                       
40004c10:   0dc12603            lw  a2,220(sp)                                            
40004c14:   07012503            lw  a0,112(sp)                                            
40004c18:   60100593            li  a1,1537                                               
40004c1c:   969fc0ef            jal ra,40001584 <open>                                    
40004c20:   00050c93            mv  s9,a0                                                 
40004c24:   0d450e63            beq a0,s4,40004d00 <Untar_FromMemory_Print+0x1c8>         
        for (i = 0; i < ctx.nblocks; i++) {                                               
40004c28:   0e412703            lw  a4,228(sp)                                            
        unsigned long sizeToGo = ctx.file_size;                                           
40004c2c:   0e012c03            lw  s8,224(sp)                                            
        for (i = 0; i < ctx.nblocks; i++) {                                               
40004c30:   10070e63            beqz    a4,40004d4c <Untar_FromMemory_Print+0x214>        <== NEVER TAKEN
          len = ((sizeToGo < 512L) ? (sizeToGo) : (512L));                                
40004c34:   20000a93            li  s5,512                                                
40004c38:   0100006f            j   40004c48 <Untar_FromMemory_Print+0x110>               
        for (i = 0; i < ctx.nblocks; i++) {                                               
40004c3c:   0e412703            lw  a4,228(sp)                                            
          sizeToGo -= n;                                                                  
40004c40:   417c0c33            sub s8,s8,s7                                              
        for (i = 0; i < ctx.nblocks; i++) {                                               
40004c44:   10edf463            bgeu    s11,a4,40004d4c <Untar_FromMemory_Print+0x214>    
          n = write(fd, &tar_ptr[ptr], len);                                              
40004c48:   01a485b3            add a1,s1,s10                                             
40004c4c:   000c8513            mv  a0,s9                                                 
40004c50:   000d0413            mv  s0,s10                                                
        for (i = 0; i < ctx.nblocks; i++) {                                               
40004c54:   001d8d93            addi    s11,s11,1                                         
          len = ((sizeToGo < 512L) ? (sizeToGo) : (512L));                                
40004c58:   000c0b93            mv  s7,s8                                                 
40004c5c:   018af463            bgeu    s5,s8,40004c64 <Untar_FromMemory_Print+0x12c>     
40004c60:   20000b93            li  s7,512                                                <== NOT EXECUTED
          n = write(fd, &tar_ptr[ptr], len);                                              
40004c64:   000b8613            mv  a2,s7                                                 
40004c68:   c9dfd0ef            jal ra,40002904 <write>                                   
          ptr += 512;                                                                     
40004c6c:   20040d13            addi    s10,s0,512                                        
          if (n != len) {                                                                 
40004c70:   fcab86e3            beq s7,a0,40004c3c <Untar_FromMemory_Print+0x104>         
            Print_Error(printer, "write", ctx.file_path);                                 
40004c74:   07012a83            lw  s5,112(sp)                                            <== NOT EXECUTED
               message, path, errno, strerror(errno));                                    
40004c78:   4250c0ef            jal ra,4001189c <__errno>                                 <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
40004c7c:   00052d03            lw  s10,0(a0)                                             <== NOT EXECUTED
               message, path, errno, strerror(errno));                                    
40004c80:   41d0c0ef            jal ra,4001189c <__errno>                                 <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
40004c84:   00052503            lw  a0,0(a0)                                              <== NOT EXECUTED
40004c88:   4010d0ef            jal ra,40012888 <strerror>                                <== NOT EXECUTED
40004c8c:   40017637            lui a2,0x40017                                            <== NOT EXECUTED
40004c90:   400175b7            lui a1,0x40017                                            <== NOT EXECUTED
40004c94:   00050793            mv  a5,a0                                                 <== NOT EXECUTED
40004c98:   000d0713            mv  a4,s10                                                <== NOT EXECUTED
40004c9c:   000a8693            mv  a3,s5                                                 <== NOT EXECUTED
40004ca0:   5ac60613            addi    a2,a2,1452 # 400175ac <IMFS_node_control_sym_link+0xf0><== NOT EXECUTED
40004ca4:   4f858593            addi    a1,a1,1272 # 400174f8 <IMFS_node_control_sym_link+0x3c><== NOT EXECUTED
40004ca8:   000b0513            mv  a0,s6                                                 <== NOT EXECUTED
40004cac:   2d9030ef            jal ra,40008784 <rtems_printf>                            <== NOT EXECUTED
        close(fd);                                                                        
40004cb0:   000c8513            mv  a0,s9                                                 
40004cb4:   e25fb0ef            jal ra,40000ad8 <close>                                   
40004cb8:   ef9ff06f            j   40004bb0 <Untar_FromMemory_Print+0x78>                
      retval = UNTAR_SUCCESSFUL;                                                          
40004cbc:   00000d93            li  s11,0                                                 
}                                                                                         
40004cc0:   12c12083            lw  ra,300(sp)                                            
40004cc4:   12812403            lw  s0,296(sp)                                            
40004cc8:   12412483            lw  s1,292(sp)                                            
40004ccc:   12012903            lw  s2,288(sp)                                            
40004cd0:   11c12983            lw  s3,284(sp)                                            
40004cd4:   11812a03            lw  s4,280(sp)                                            
40004cd8:   11412a83            lw  s5,276(sp)                                            
40004cdc:   11012b03            lw  s6,272(sp)                                            
40004ce0:   10c12b83            lw  s7,268(sp)                                            
40004ce4:   10812c03            lw  s8,264(sp)                                            
40004ce8:   10412c83            lw  s9,260(sp)                                            
40004cec:   10012d03            lw  s10,256(sp)                                           
40004cf0:   000d8513            mv  a0,s11                                                
40004cf4:   0fc12d83            lw  s11,252(sp)                                           
40004cf8:   13010113            addi    sp,sp,304                                         
40004cfc:   00008067            ret                                                       
        Print_Error(printer, "open", ctx.file_path);                                      
40004d00:   07012403            lw  s0,112(sp)                                            <== NOT EXECUTED
               message, path, errno, strerror(errno));                                    
40004d04:   3990c0ef            jal ra,4001189c <__errno>                                 <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
40004d08:   00052a83            lw  s5,0(a0)                                              <== NOT EXECUTED
               message, path, errno, strerror(errno));                                    
40004d0c:   3910c0ef            jal ra,4001189c <__errno>                                 <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
40004d10:   00052503            lw  a0,0(a0)                                              <== NOT EXECUTED
40004d14:   3750d0ef            jal ra,40012888 <strerror>                                <== NOT EXECUTED
40004d18:   40017637            lui a2,0x40017                                            <== NOT EXECUTED
40004d1c:   400175b7            lui a1,0x40017                                            <== NOT EXECUTED
40004d20:   00050793            mv  a5,a0                                                 <== NOT EXECUTED
40004d24:   00040693            mv  a3,s0                                                 <== NOT EXECUTED
40004d28:   000a8713            mv  a4,s5                                                 <== NOT EXECUTED
40004d2c:   5a460613            addi    a2,a2,1444 # 400175a4 <IMFS_node_control_sym_link+0xe8><== NOT EXECUTED
40004d30:   4f858593            addi    a1,a1,1272 # 400174f8 <IMFS_node_control_sym_link+0x3c><== NOT EXECUTED
40004d34:   000b0513            mv  a0,s6                                                 <== NOT EXECUTED
40004d38:   24d030ef            jal ra,40008784 <rtems_printf>                            <== NOT EXECUTED
        ptr += 512 * ctx.nblocks;                                                         
40004d3c:   0e412403            lw  s0,228(sp)                                            <== NOT EXECUTED
40004d40:   00941413            slli    s0,s0,0x9                                         <== NOT EXECUTED
40004d44:   01a40433            add s0,s0,s10                                             <== NOT EXECUTED
40004d48:   e69ff06f            j   40004bb0 <Untar_FromMemory_Print+0x78>                <== NOT EXECUTED
    if (ptr + 512 > size) {                                                               
40004d4c:   000d0413            mv  s0,s10                                                
40004d50:   f61ff06f            j   40004cb0 <Untar_FromMemory_Print+0x178>               
                                                                                          

40004730 <Untar_ProcessHeader.part.0>: return 0; } int Untar_ProcessHeader(
40004730:   f6010113            addi    sp,sp,-160                                        
40004734:   08812c23            sw  s0,152(sp)                                            
40004738:   09212823            sw  s2,144(sp)                                            
4000473c:   00058413            mv  s0,a1                                                 
40004740:   00050913            mv  s2,a0                                                 
40004744:   09458713            addi    a4,a1,148                                         
40004748:   09c58813            addi    a6,a1,156                                         
4000474c:   08112e23            sw  ra,156(sp)                                            
40004750:   08912a23            sw  s1,148(sp)                                            
40004754:   09312623            sw  s3,140(sp)                                            
40004758:   09412423            sw  s4,136(sp)                                            
4000475c:   09512223            sw  s5,132(sp)                                            
40004760:   09612023            sw  s6,128(sp)                                            
40004764:   07712e23            sw  s7,124(sp)                                            
40004768:   07812c23            sw  s8,120(sp)                                            
4000476c:   07912a23            sw  s9,116(sp)                                            
  num = 0;                                                                                
40004770:   00000513            li  a0,0                                                  
    if ((octascii[i] < '0') || (octascii[i] > '9')) {                                     
40004774:   00900593            li  a1,9                                                  
40004778:   00074603            lbu a2,0(a4)                                              
    num  = num * 8 + ((unsigned long)(octascii[i] - '0'));                                
4000477c:   00351793            slli    a5,a0,0x3                                         
  for (i=0; i < len; i++) {                                                               
40004780:   00170713            addi    a4,a4,1                                           
    if ((octascii[i] < '0') || (octascii[i] > '9')) {                                     
40004784:   fd060693            addi    a3,a2,-48                                         
40004788:   0ff6f693            andi    a3,a3,255                                         
4000478c:   fd078793            addi    a5,a5,-48 # efd0 <bsp_section_rodata_size+0x6e94> 
40004790:   00d5e463            bltu    a1,a3,40004798 <Untar_ProcessHeader.part.0+0x68>  
    num  = num * 8 + ((unsigned long)(octascii[i] - '0'));                                
40004794:   00f60533            add a0,a2,a5                                              
  for (i=0; i < len; i++) {                                                               
40004798:   fee810e3            bne a6,a4,40004778 <Untar_ProcessHeader.part.0+0x48>      
  const char *bufr                                                                        
)                                                                                         
{                                                                                         
  int  i, sum;                                                                            
                                                                                          
  sum = 0;                                                                                
4000479c:   00000713            li  a4,0                                                  
  for (i=0; i<512; i++) {                                                                 
400047a0:   00000793            li  a5,0                                                  
    if ((i >= 148) && (i < 156))                                                          
400047a4:   00700813            li  a6,7                                                  
  for (i=0; i<512; i++) {                                                                 
400047a8:   20000593            li  a1,512                                                
    if ((i >= 148) && (i < 156))                                                          
400047ac:   f6c78613            addi    a2,a5,-148                                        
  for (i=0; i<512; i++) {                                                                 
400047b0:   00178793            addi    a5,a5,1                                           
      sum += 0xff & ' ';                                                                  
    else                                                                                  
     sum += 0xff & bufr[i];                                                               
400047b4:   00f406b3            add a3,s0,a5                                              
    if ((i >= 148) && (i < 156))                                                          
400047b8:   36c87c63            bgeu    a6,a2,40004b30 <Untar_ProcessHeader.part.0+0x400> 
     sum += 0xff & bufr[i];                                                               
400047bc:   fff6c683            lbu a3,-1(a3) # 3fff <bsp_section_bss_size+0x1b3b>        
400047c0:   00d70733            add a4,a4,a3                                              
  for (i=0; i<512; i++) {                                                                 
400047c4:   feb794e3            bne a5,a1,400047ac <Untar_ProcessHeader.part.0+0x7c>      
  if (sum != hdr_chksum) {                                                                
400047c8:   24e51e63            bne a0,a4,40004a24 <Untar_ProcessHeader.part.0+0x2f4>     
  strlcpy(ctx->file_name, bufr, UNTAR_FILE_NAME_SIZE);                                    
400047cc:   00492503            lw  a0,4(s2)                                              
400047d0:   06400613            li  a2,100                                                
400047d4:   00040593            mv  a1,s0                                                 
400047d8:   0e00e0ef            jal ra,400128b8 <strlcpy>                                 
  ctx->mode = strtoul(&bufr[100], NULL, 8);                                               
400047dc:   00000593            li  a1,0                                                  
400047e0:   00800613            li  a2,8                                                  
400047e4:   06440513            addi    a0,s0,100                                         
400047e8:   4780e0ef            jal ra,40012c60 <strtoul>                                 
400047ec:   06a92623            sw  a0,108(s2)                                            
  ctx->linkflag   = bufr[156];                                                            
400047f0:   09c44883            lbu a7,156(s0)                                            
400047f4:   07c40713            addi    a4,s0,124                                         
400047f8:   08840813            addi    a6,s0,136                                         
400047fc:   07190c23            sb  a7,120(s2)                                            
  num = 0;                                                                                
40004800:   00000593            li  a1,0                                                  
    if ((octascii[i] < '0') || (octascii[i] > '9')) {                                     
40004804:   00900513            li  a0,9                                                  
40004808:   00074603            lbu a2,0(a4)                                              
    num  = num * 8 + ((unsigned long)(octascii[i] - '0'));                                
4000480c:   00359793            slli    a5,a1,0x3                                         
  for (i=0; i < len; i++) {                                                               
40004810:   00170713            addi    a4,a4,1                                           
    if ((octascii[i] < '0') || (octascii[i] > '9')) {                                     
40004814:   fd060693            addi    a3,a2,-48                                         
40004818:   0ff6f693            andi    a3,a3,255                                         
4000481c:   fd078793            addi    a5,a5,-48                                         
40004820:   00d56463            bltu    a0,a3,40004828 <Untar_ProcessHeader.part.0+0xf8>  
    num  = num * 8 + ((unsigned long)(octascii[i] - '0'));                                
40004824:   00f605b3            add a1,a2,a5                                              
  for (i=0; i < len; i++) {                                                               
40004828:   fee810e3            bne a6,a4,40004808 <Untar_ProcessHeader.part.0+0xd8>      
  if (Make_Path(ctx->printer, ctx->file_path) != 0) {                                     
4000482c:   00092983            lw  s3,0(s2)                                              
  ctx->file_size = _rtems_octal2ulong(&bufr[124], 12);                                    
40004830:   06b92823            sw  a1,112(s2)                                            
  while (*path == '/') {                                                                  
40004834:   02f00713            li  a4,47                                                 
40004838:   0009c783            lbu a5,0(s3)                                              
  if (Make_Path(ctx->printer, ctx->file_path) != 0) {                                     
4000483c:   07c92c83            lw  s9,124(s2)                                            
  while (*path == '/') {                                                                  
40004840:   00e79863            bne a5,a4,40004850 <Untar_ProcessHeader.part.0+0x120>     
40004844:   0019c783            lbu a5,1(s3)                                              <== NOT EXECUTED
    ++path;                                                                               
40004848:   00198993            addi    s3,s3,1                                           <== NOT EXECUTED
  while (*path == '/') {                                                                  
4000484c:   fee78ce3            beq a5,a4,40004844 <Untar_ProcessHeader.part.0+0x114>     <== NOT EXECUTED
    if (p[0] == '\0') {                                                                   
40004850:   2c078c63            beqz    a5,40004b28 <Untar_ProcessHeader.part.0+0x3f8>    <== NEVER TAKEN
40004854:   00098493            mv  s1,s3                                                 
    } else if (p[0] != '/') {                                                             
40004858:   02f00a13            li  s4,47                                                 
      if (errno == EEXIST || errno == EISDIR) {                                           
4000485c:   01100a93            li  s5,17                                                 
40004860:   01500b13            li  s6,21                                                 
        if (!S_ISDIR(sb.st_mode)) {                                                       
40004864:   0000fc37            lui s8,0xf                                                
40004868:   00004bb7            lui s7,0x4                                                
4000486c:   02c0006f            j   40004898 <Untar_ProcessHeader.part.0+0x168>           
    *p = '\0';                                                                            
40004870:   00048023            sb  zero,0(s1)                                            
    if (p[1] == '\0') {                                                                   
40004874:   1c070463            beqz    a4,40004a3c <Untar_ProcessHeader.part.0+0x30c>    <== NEVER TAKEN
    if (mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO) != 0) {                                  
40004878:   1ff00593            li  a1,511                                                
4000487c:   00098513            mv  a0,s3                                                 
40004880:   eb0fc0ef            jal ra,40000f30 <mkdir>                                   
40004884:   08051063            bnez    a0,40004904 <Untar_ProcessHeader.part.0+0x1d4>    
    if (p[0] == '\0') {                                                                   
40004888:   0014c783            lbu a5,1(s1)                                              
    *p = '/';                                                                             
4000488c:   01448023            sb  s4,0(s1)                                              
  for (; ; ++p) {                                                                         
40004890:   00148493            addi    s1,s1,1                                           
    if (p[0] == '\0') {                                                                   
40004894:   00078c63            beqz    a5,400048ac <Untar_ProcessHeader.part.0+0x17c>    <== NEVER TAKEN
    if (p[1] == '\0') {                                                                   
40004898:   0014c703            lbu a4,1(s1)                                              
    } else if (p[0] != '/') {                                                             
4000489c:   fd478ae3            beq a5,s4,40004870 <Untar_ProcessHeader.part.0+0x140>     
    if (p[1] == '\0') {                                                                   
400048a0:   00070793            mv  a5,a4                                                 
  for (; ; ++p) {                                                                         
400048a4:   00148493            addi    s1,s1,1                                           
    if (p[0] == '\0') {                                                                   
400048a8:   fe0798e3            bnez    a5,40004898 <Untar_ProcessHeader.part.0+0x168>    
  if (ctx->linkflag == SYMTYPE) {                                                         
400048ac:   07894883            lbu a7,120(s2)                                            
  int retval = UNTAR_SUCCESSFUL;                                                          
400048b0:   00000493            li  s1,0                                                  
  if (ctx->linkflag == SYMTYPE) {                                                         
400048b4:   03200793            li  a5,50                                                 
400048b8:   0ef88263            beq a7,a5,4000499c <Untar_ProcessHeader.part.0+0x26c>     
  } else if (ctx->linkflag == REGTYPE) {                                                  
400048bc:   03000793            li  a5,48                                                 
400048c0:   18f88863            beq a7,a5,40004a50 <Untar_ProcessHeader.part.0+0x320>     
  } else if (ctx->linkflag == DIRTYPE) {                                                  
400048c4:   03500793            li  a5,53                                                 <== NOT EXECUTED
400048c8:   1af88c63            beq a7,a5,40004a80 <Untar_ProcessHeader.part.0+0x350>     <== NOT EXECUTED
}                                                                                         
400048cc:   09c12083            lw  ra,156(sp)                                            
400048d0:   09812403            lw  s0,152(sp)                                            
400048d4:   09012903            lw  s2,144(sp)                                            
400048d8:   08c12983            lw  s3,140(sp)                                            
400048dc:   08812a03            lw  s4,136(sp)                                            
400048e0:   08412a83            lw  s5,132(sp)                                            
400048e4:   08012b03            lw  s6,128(sp)                                            
400048e8:   07c12b83            lw  s7,124(sp)                                            
400048ec:   07812c03            lw  s8,120(sp)                                            
400048f0:   07412c83            lw  s9,116(sp)                                            
400048f4:   00048513            mv  a0,s1                                                 
400048f8:   09412483            lw  s1,148(sp)                                            
400048fc:   0a010113            addi    sp,sp,160                                         
40004900:   00008067            ret                                                       
      if (errno == EEXIST || errno == EISDIR) {                                           
40004904:   7990c0ef            jal ra,4001189c <__errno>                                 
40004908:   00052783            lw  a5,0(a0)                                              
4000490c:   01578863            beq a5,s5,4000491c <Untar_ProcessHeader.part.0+0x1ec>     
40004910:   78d0c0ef            jal ra,4001189c <__errno>                                 <== NOT EXECUTED
40004914:   00052783            lw  a5,0(a0)                                              <== NOT EXECUTED
40004918:   f76798e3            bne a5,s6,40004888 <Untar_ProcessHeader.part.0+0x158>     <== NOT EXECUTED
        if (stat(path, &sb) != 0) {                                                       
4000491c:   00810593            addi    a1,sp,8                                           
40004920:   00098513            mv  a0,s3                                                 
40004924:   94cfd0ef            jal ra,40001a70 <stat>                                    
40004928:   06051263            bnez    a0,4000498c <Untar_ProcessHeader.part.0+0x25c>    <== NEVER TAKEN
        if (!S_ISDIR(sb.st_mode)) {                                                       
4000492c:   01812783            lw  a5,24(sp)                                             
40004930:   00fc77b3            and a5,s8,a5                                              
40004934:   f5778ae3            beq a5,s7,40004888 <Untar_ProcessHeader.part.0+0x158>     
          if (unlink(path) != 0) {                                                        
40004938:   00098513            mv  a0,s3                                                 <== NOT EXECUTED
4000493c:   3e8040ef            jal ra,40008d24 <unlink>                                  <== NOT EXECUTED
40004940:   1a051663            bnez    a0,40004aec <Untar_ProcessHeader.part.0+0x3bc>    <== NOT EXECUTED
          if (mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO) != 0) {                            
40004944:   1ff00593            li  a1,511                                                <== NOT EXECUTED
40004948:   00098513            mv  a0,s3                                                 <== NOT EXECUTED
4000494c:   de4fc0ef            jal ra,40000f30 <mkdir>                                   <== NOT EXECUTED
40004950:   f2050ce3            beqz    a0,40004888 <Untar_ProcessHeader.part.0+0x158>    <== NOT EXECUTED
               message, path, errno, strerror(errno));                                    
40004954:   7490c0ef            jal ra,4001189c <__errno>                                 <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
40004958:   00052483            lw  s1,0(a0)                                              <== NOT EXECUTED
               message, path, errno, strerror(errno));                                    
4000495c:   7410c0ef            jal ra,4001189c <__errno>                                 <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
40004960:   00052503            lw  a0,0(a0)                                              <== NOT EXECUTED
40004964:   7250d0ef            jal ra,40012888 <strerror>                                <== NOT EXECUTED
40004968:   40017637            lui a2,0x40017                                            <== NOT EXECUTED
4000496c:   400175b7            lui a1,0x40017                                            <== NOT EXECUTED
40004970:   00050793            mv  a5,a0                                                 <== NOT EXECUTED
40004974:   00048713            mv  a4,s1                                                 <== NOT EXECUTED
40004978:   00098693            mv  a3,s3                                                 <== NOT EXECUTED
4000497c:   51060613            addi    a2,a2,1296 # 40017510 <IMFS_node_control_sym_link+0x54><== NOT EXECUTED
40004980:   4f858593            addi    a1,a1,1272 # 400174f8 <IMFS_node_control_sym_link+0x3c><== NOT EXECUTED
40004984:   000c8513            mv  a0,s9                                                 <== NOT EXECUTED
40004988:   5fd030ef            jal ra,40008784 <rtems_printf>                            <== NOT EXECUTED
  if (ctx->linkflag == SYMTYPE) {                                                         
4000498c:   07894883            lbu a7,120(s2)                                            <== NOT EXECUTED
40004990:   03200793            li  a5,50                                                 <== NOT EXECUTED
    retval = UNTAR_FAIL;                                                                  
40004994:   00100493            li  s1,1                                                  <== NOT EXECUTED
  if (ctx->linkflag == SYMTYPE) {                                                         
40004998:   f2f892e3            bne a7,a5,400048bc <Untar_ProcessHeader.part.0+0x18c>     <== NOT EXECUTED
    strlcpy(ctx->link_name, &bufr[157], sizeof(ctx->link_name));                          
4000499c:   00890793            addi    a5,s2,8                                           
400049a0:   09d40593            addi    a1,s0,157                                         
400049a4:   06400613            li  a2,100                                                
400049a8:   00078513            mv  a0,a5                                                 
400049ac:   00078413            mv  s0,a5                                                 
400049b0:   7090d0ef            jal ra,400128b8 <strlcpy>                                 
    rtems_printf(ctx->printer, "untar: symlink: %s -> %s\n",                              
400049b4:   00092683            lw  a3,0(s2)                                              
400049b8:   07c92503            lw  a0,124(s2)                                            
400049bc:   400175b7            lui a1,0x40017                                            
400049c0:   52058593            addi    a1,a1,1312 # 40017520 <IMFS_node_control_sym_link+0x64>
400049c4:   00040613            mv  a2,s0                                                 
400049c8:   5bd030ef            jal ra,40008784 <rtems_printf>                            
    r = symlink(ctx->link_name, ctx->file_path);                                          
400049cc:   00092583            lw  a1,0(s2)                                              
400049d0:   00040513            mv  a0,s0                                                 
400049d4:   2f8040ef            jal ra,40008ccc <symlink>                                 
    if (r != 0) {                                                                         
400049d8:   ee050ae3            beqz    a0,400048cc <Untar_ProcessHeader.part.0+0x19c>    <== ALWAYS TAKEN
      Print_Error(ctx->printer, "symlink", ctx->file_path);                               
400049dc:   07c92403            lw  s0,124(s2)                                            <== NOT EXECUTED
400049e0:   00092903            lw  s2,0(s2)                                              <== NOT EXECUTED
               message, path, errno, strerror(errno));                                    
400049e4:   6b90c0ef            jal ra,4001189c <__errno>                                 <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
400049e8:   00052983            lw  s3,0(a0)                                              <== NOT EXECUTED
               message, path, errno, strerror(errno));                                    
400049ec:   6b10c0ef            jal ra,4001189c <__errno>                                 <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
400049f0:   00052503            lw  a0,0(a0)                                              <== NOT EXECUTED
      retval = UNTAR_FAIL;                                                                
400049f4:   00100493            li  s1,1                                                  <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
400049f8:   6910d0ef            jal ra,40012888 <strerror>                                <== NOT EXECUTED
400049fc:   40017637            lui a2,0x40017                                            <== NOT EXECUTED
40004a00:   400175b7            lui a1,0x40017                                            <== NOT EXECUTED
40004a04:   00050793            mv  a5,a0                                                 <== NOT EXECUTED
40004a08:   00098713            mv  a4,s3                                                 <== NOT EXECUTED
40004a0c:   00090693            mv  a3,s2                                                 <== NOT EXECUTED
40004a10:   53c60613            addi    a2,a2,1340 # 4001753c <IMFS_node_control_sym_link+0x80><== NOT EXECUTED
40004a14:   4f858593            addi    a1,a1,1272 # 400174f8 <IMFS_node_control_sym_link+0x3c><== NOT EXECUTED
40004a18:   00040513            mv  a0,s0                                                 <== NOT EXECUTED
40004a1c:   569030ef            jal ra,40008784 <rtems_printf>                            <== NOT EXECUTED
}                                                                                         
40004a20:   eadff06f            j   400048cc <Untar_ProcessHeader.part.0+0x19c>           <== NOT EXECUTED
    rtems_printf(ctx->printer, "untar: file header checksum error\n");                    
40004a24:   07c92503            lw  a0,124(s2)                                            <== NOT EXECUTED
40004a28:   400175b7            lui a1,0x40017                                            <== NOT EXECUTED
40004a2c:   4cc58593            addi    a1,a1,1228 # 400174cc <IMFS_node_control_sym_link+0x10><== NOT EXECUTED
40004a30:   555030ef            jal ra,40008784 <rtems_printf>                            <== NOT EXECUTED
    return UNTAR_INVALID_CHECKSUM;                                                        
40004a34:   00200493            li  s1,2                                                  <== NOT EXECUTED
40004a38:   e95ff06f            j   400048cc <Untar_ProcessHeader.part.0+0x19c>           <== NOT EXECUTED
      unlink(path);                                                                       
40004a3c:   00098513            mv  a0,s3                                                 <== NOT EXECUTED
40004a40:   2e4040ef            jal ra,40008d24 <unlink>                                  <== NOT EXECUTED
  if (ctx->linkflag == SYMTYPE) {                                                         
40004a44:   07894883            lbu a7,120(s2)                                            <== NOT EXECUTED
  int retval = UNTAR_SUCCESSFUL;                                                          
40004a48:   00000493            li  s1,0                                                  <== NOT EXECUTED
40004a4c:   e69ff06f            j   400048b4 <Untar_ProcessHeader.part.0+0x184>           <== NOT EXECUTED
    rtems_printf(ctx->printer, "untar: file: %s (s:%lu,m:%04lo)\n",                       
40004a50:   06c92703            lw  a4,108(s2)                                            
40004a54:   07092683            lw  a3,112(s2)                                            
40004a58:   00092603            lw  a2,0(s2)                                              
40004a5c:   07c92503            lw  a0,124(s2)                                            
40004a60:   400175b7            lui a1,0x40017                                            
40004a64:   54458593            addi    a1,a1,1348 # 40017544 <IMFS_node_control_sym_link+0x88>
40004a68:   51d030ef            jal ra,40008784 <rtems_printf>                            
    ctx->nblocks = (((ctx->file_size) + 511) & ~511) / 512;                               
40004a6c:   07092783            lw  a5,112(s2)                                            
40004a70:   1ff78793            addi    a5,a5,511                                         
40004a74:   0097d793            srli    a5,a5,0x9                                         
40004a78:   06f92a23            sw  a5,116(s2)                                            
40004a7c:   e51ff06f            j   400048cc <Untar_ProcessHeader.part.0+0x19c>           
    rtems_printf(ctx->printer, "untar: dir: %s\n", ctx->file_path);                       
40004a80:   00092603            lw  a2,0(s2)                                              <== NOT EXECUTED
40004a84:   07c92503            lw  a0,124(s2)                                            <== NOT EXECUTED
40004a88:   400175b7            lui a1,0x40017                                            <== NOT EXECUTED
40004a8c:   56858593            addi    a1,a1,1384 # 40017568 <IMFS_node_control_sym_link+0xac><== NOT EXECUTED
40004a90:   4f5030ef            jal ra,40008784 <rtems_printf>                            <== NOT EXECUTED
    r = mkdir(ctx->file_path, ctx->mode);                                                 
40004a94:   06c92583            lw  a1,108(s2)                                            <== NOT EXECUTED
40004a98:   00092503            lw  a0,0(s2)                                              <== NOT EXECUTED
40004a9c:   c94fc0ef            jal ra,40000f30 <mkdir>                                   <== NOT EXECUTED
    if (r != 0) {                                                                         
40004aa0:   e20506e3            beqz    a0,400048cc <Untar_ProcessHeader.part.0+0x19c>    <== NOT EXECUTED
      Print_Error(ctx->printer, "mkdir", ctx->file_path);                                 
40004aa4:   07c92403            lw  s0,124(s2)                                            <== NOT EXECUTED
40004aa8:   00092903            lw  s2,0(s2)                                              <== NOT EXECUTED
               message, path, errno, strerror(errno));                                    
40004aac:   5f10c0ef            jal ra,4001189c <__errno>                                 <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
40004ab0:   00052983            lw  s3,0(a0)                                              <== NOT EXECUTED
               message, path, errno, strerror(errno));                                    
40004ab4:   5e90c0ef            jal ra,4001189c <__errno>                                 <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
40004ab8:   00052503            lw  a0,0(a0)                                              <== NOT EXECUTED
      retval = UNTAR_FAIL;                                                                
40004abc:   00100493            li  s1,1                                                  <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
40004ac0:   5c90d0ef            jal ra,40012888 <strerror>                                <== NOT EXECUTED
40004ac4:   40017637            lui a2,0x40017                                            <== NOT EXECUTED
40004ac8:   400175b7            lui a1,0x40017                                            <== NOT EXECUTED
40004acc:   00050793            mv  a5,a0                                                 <== NOT EXECUTED
40004ad0:   00098713            mv  a4,s3                                                 <== NOT EXECUTED
40004ad4:   00090693            mv  a3,s2                                                 <== NOT EXECUTED
40004ad8:   57860613            addi    a2,a2,1400 # 40017578 <IMFS_node_control_sym_link+0xbc><== NOT EXECUTED
40004adc:   4f858593            addi    a1,a1,1272 # 400174f8 <IMFS_node_control_sym_link+0x3c><== NOT EXECUTED
40004ae0:   00040513            mv  a0,s0                                                 <== NOT EXECUTED
40004ae4:   4a1030ef            jal ra,40008784 <rtems_printf>                            <== NOT EXECUTED
}                                                                                         
40004ae8:   de5ff06f            j   400048cc <Untar_ProcessHeader.part.0+0x19c>           <== NOT EXECUTED
               message, path, errno, strerror(errno));                                    
40004aec:   5b10c0ef            jal ra,4001189c <__errno>                                 <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
40004af0:   00052483            lw  s1,0(a0)                                              <== NOT EXECUTED
               message, path, errno, strerror(errno));                                    
40004af4:   5a90c0ef            jal ra,4001189c <__errno>                                 <== NOT EXECUTED
  rtems_printf(printer, "untar: %s: %s: (%d) %s\n",                                       
40004af8:   00052503            lw  a0,0(a0)                                              <== NOT EXECUTED
40004afc:   58d0d0ef            jal ra,40012888 <strerror>                                <== NOT EXECUTED
40004b00:   40017637            lui a2,0x40017                                            <== NOT EXECUTED
40004b04:   400175b7            lui a1,0x40017                                            <== NOT EXECUTED
40004b08:   00050793            mv  a5,a0                                                 <== NOT EXECUTED
40004b0c:   00048713            mv  a4,s1                                                 <== NOT EXECUTED
40004b10:   00098693            mv  a3,s3                                                 <== NOT EXECUTED
40004b14:   4f060613            addi    a2,a2,1264 # 400174f0 <IMFS_node_control_sym_link+0x34><== NOT EXECUTED
40004b18:   4f858593            addi    a1,a1,1272 # 400174f8 <IMFS_node_control_sym_link+0x3c><== NOT EXECUTED
40004b1c:   000c8513            mv  a0,s9                                                 <== NOT EXECUTED
40004b20:   465030ef            jal ra,40008784 <rtems_printf>                            <== NOT EXECUTED
}                                                                                         
40004b24:   e69ff06f            j   4000498c <Untar_ProcessHeader.part.0+0x25c>           <== NOT EXECUTED
  int retval = UNTAR_SUCCESSFUL;                                                          
40004b28:   00000493            li  s1,0                                                  <== NOT EXECUTED
40004b2c:   d89ff06f            j   400048b4 <Untar_ProcessHeader.part.0+0x184>           <== NOT EXECUTED
      sum += 0xff & ' ';                                                                  
40004b30:   02070713            addi    a4,a4,32                                          
  for (i=0; i<512; i++) {                                                                 
40004b34:   c79ff06f            j   400047ac <Untar_ProcessHeader.part.0+0x7c>