user: What would the C source look like for the assembly code provided here:

```asm
<append_band_ext>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  mov    %rsi,%r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  call   <findExt@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L148
  lea    D50(%rip),%rsi
  mov    %rax,%rdi
  call   <strcmp_case@plt>
  test   %rax,%rax
  jne    L139
L49:
  mov    %r15,%rdi
  call   <stripExt@plt>
  mov    %rax,%r12
  test   %r13,%r13
  je     L51
L43:
  mov    %r13,%rcx
  mov    %r12,%rdx
  lea    D28(%rip),%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
L146:
  test   %rbp,%rbp
  je     L72
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <strcat@plt>
L72:
  pop    %rbp
  mov    %r12,%rdi
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10c0 <free@plt>
  nopw   0x0(%rax,%rax,1)
L139:
  lea    D16(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp_case@plt>
  test   %rax,%rax
  je     L49
  lea    D79(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp_case@plt>
  test   %rax,%rax
  je     L49
  lea    D11(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp_case@plt>
  test   %rax,%rax
  je     L49
  lea    D102(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp_case@plt>
  test   %rax,%rax
  je     L49
  lea    D112(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp_case@plt>
  test   %rax,%rax
  je     L49
  lea    D26(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp_case@plt>
  test   %rax,%rax
  je     L49
  lea    D33(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp_case@plt>
  test   %rax,%rax
  je     L49
  lea    D71(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp_case@plt>
  test   %rax,%rax
  je     L49
  lea    D39(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp_case@plt>
  test   %rax,%rax
  je     L49
L148:
  mov    $0xff,%edi
  call   <MALLOC@plt>
  mov    %r15,%rsi
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <strcpy@plt>
  test   %r13,%r13
  jne    L43
L51:
  mov    %r12,%rdx
  lea    D93(%rip),%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  jmp    L146
```

tool_calls: name: read_data
arguments: data_tag: D50
data_type: string
name: read_data
arguments: data_tag: D28
data_type: string
name: read_data
arguments: data_tag: D16
data_type: string
name: read_data
arguments: data_tag: D79
data_type: string
name: read_data
arguments: data_tag: D11
data_type: string
name: read_data
arguments: data_tag: D102
data_type: string
name: read_data
arguments: data_tag: D112
data_type: string
name: read_data
arguments: data_tag: D26
data_type: string
name: read_data
arguments: data_tag: D33
data_type: string
name: read_data
arguments: data_tag: D71
data_type: string
name: read_data
arguments: data_tag: D39
data_type: string
name: read_data
arguments: data_tag: D93
data_type: string

tool: D50: .IMG

tool: D28: %s_%s

tool: D16: .TIF

tool: D79: .TIFF

tool: D11: .JPG

tool: D102: .JPEG

tool: D112: .PNG

tool: D26: .PGM

tool: D33: .BIN

tool: D71: .NC

tool: D39: .H5

tool: D93: %s

assistant: ```c
void append_band_ext(char *inFile, char *outFile, char *bandExt) {
  char *ext, *base_name;
  ext = findExt(inFile);
  if (ext && (strcmp_case(ext, ".IMG") == 0 || strcmp_case(ext, ".TIF") == 0 || strcmp_case(ext, ".TIFF") == 0 || strcmp_case(ext, ".JPG") == 0 || strcmp_case(ext, ".JPEG") == 0 || strcmp_case(ext, ".PNG") == 0 || strcmp_case(ext, ".PGM") == 0 || strcmp_case(ext, ".BIN") == 0 || strcmp_case(ext, ".NC") == 0 || strcmp_case(ext, ".H5") == 0))
    base_name = stripExt(inFile);
  else {
    base_name = (char *)MALLOC(sizeof(char) * 255);
    strcpy(base_name, inFile);
  }
  if (bandExt)
    sprintf(outFile, "%s_%s", base_name, bandExt);
  else
    sprintf(outFile, "%s", base_name);
  if (ext)
    strcat(outFile, ext);
  free(base_name);
}
```