user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<etna_texture_untile>:
  endbr64
  push   %r14
  mov    %ecx,%r10d
  push   %r13
  push   %r12
  mov    %r8d,%r12d
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    0x40(%rsp),%r8d
  mov    0x30(%rsp),%eax
  mov    0x38(%rsp),%r13d
  cmp    $0x4,%r8d
  je     L75
  cmp    $0x2,%r8d
  je     L132
  cmp    $0x1,%r8d
  jne    L115
  and    $0x3fffffff,%r12d
  shr    $0x2,%r13d
  test   %eax,%eax
  je     L69
  mov    %edx,%r11d
  lea    (%rax,%rcx,1),%r8d
  lea    (%r9,%rdx,1),%r14d
  neg    %r11d
  nopl   (%rax)
L106:
  mov    %r10d,%eax
  mov    %r10d,%edx
  shr    $0x2,%eax
  and    $0x3,%edx
  imul   %r12d,%eax
  lea    (%rax,%rdx,4),%ebx
  test   %r9d,%r9d
  je     L17
  mov    %ebp,%eax
  nopw   0x0(%rax,%rax,1)
L58:
  mov    %eax,%ecx
  mov    %eax,%edx
  shr    $0x2,%ecx
  and    $0x3,%edx
  shl    $0x4,%ecx
  add    %ebx,%edx
  add    %ecx,%edx
  mov    %edx,%edx
  mov    (%rsi,%rdx,4),%ecx
  lea    (%r11,%rax,1),%edx
  add    $0x1,%eax
  mov    %ecx,(%rdi,%rdx,4)
  cmp    %eax,%r14d
  jne    L58
L17:
  add    $0x1,%r10d
  add    %r13d,%r11d
  cmp    %r10d,%r8d
  jne    L106
L69:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L132:
  and    $0x3fffffff,%r12d
  shr    $0x2,%r13d
  test   %eax,%eax
  je     L69
  mov    %edx,%r11d
  lea    (%rax,%rcx,1),%r8d
  lea    (%r9,%rdx,1),%r14d
  neg    %r11d
  nopw   0x0(%rax,%rax,1)
L71:
  mov    %r10d,%eax
  mov    %r10d,%edx
  shr    $0x2,%eax
  and    $0x3,%edx
  imul   %r12d,%eax
  lea    (%rax,%rdx,4),%ebx
  test   %r9d,%r9d
  je     L42
  mov    %ebp,%eax
  nopw   0x0(%rax,%rax,1)
L102:
  mov    %eax,%ecx
  mov    %eax,%edx
  shr    $0x2,%ecx
  and    $0x3,%edx
  shl    $0x4,%ecx
  add    %ebx,%edx
  add    %ecx,%edx
  mov    %edx,%edx
  mov    (%rsi,%rdx,4),%ecx
  lea    (%r11,%rax,1),%edx
  add    $0x1,%eax
  mov    %ecx,(%rdi,%rdx,4)
  cmp    %eax,%r14d
  jne    L102
L42:
  add    $0x1,%r10d
  add    %r13d,%r11d
  cmp    %r10d,%r8d
  jne    L71
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L75:
  mov    %edx,%r11d
  shr    $0x2,%r13d
  lea    (%rax,%rcx,1),%r14d
  lea    (%r9,%rdx,1),%ebx
  and    $0x3fffffff,%r12d
  neg    %r11d
  test   %eax,%eax
  je     L69
  nopl   0x0(%rax)
L88:
  mov    %r10d,%eax
  mov    %r10d,%edx
  shr    $0x2,%eax
  and    $0x3,%edx
  imul   %r12d,%eax
  lea    (%rax,%rdx,4),%r8d
  test   %r9d,%r9d
  je     L31
  mov    %ebp,%eax
  nopl   0x0(%rax,%rax,1)
L128:
  mov    %eax,%ecx
  mov    %eax,%edx
  shr    $0x2,%ecx
  and    $0x3,%edx
  shl    $0x4,%ecx
  add    %r8d,%edx
  add    %ecx,%edx
  mov    %edx,%edx
  mov    (%rsi,%rdx,4),%ecx
  lea    (%rax,%r11,1),%edx
  add    $0x1,%eax
  mov    %ecx,(%rdi,%rdx,4)
  cmp    %eax,%ebx
  jne    L128
L31:
  add    $0x1,%r10d
  add    %r13d,%r11d
  cmp    %r10d,%r14d
  jne    L88
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L115:
  pop    %rbx
  mov    %r8d,%esi
  lea    D5(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1050 <printf@plt>
```

tool_calls: name: unpack_data
arguments: label: D5
type_guessed: string

tool: D5: etna_texture_tile: unhandled element size %i


assistant: ```c
void etna_texture_untile(void *dest, void *src, unsigned basex, unsigned basey, unsigned src_stride, unsigned width, unsigned height, unsigned dst_stride, unsigned elmtsize) {
  if (elmtsize == 4) {
    src_stride = (src_stride * (4)) / sizeof(uint32_t);
    dst_stride /= sizeof(uint32_t);
    for (unsigned dsty = 0; dsty < height; ++dsty) {
      unsigned srcy = basey + dsty;
      unsigned sy = (srcy / (4)) * src_stride + (srcy % (4)) * (4);
      for (unsigned dstx = 0; dstx < width; ++dstx) {
        unsigned srcx = basex + dstx;
        ((uint32_t *)dest)[dsty * dst_stride + dstx] = ((uint32_t *)src)[sy + (srcx / (4)) * ((4) * (4)) + (srcx % (4))];
      }
    };
  } else if (elmtsize == 2) {
    src_stride = (src_stride * (4)) / sizeof(uint16_t);
    dst_stride /= sizeof(uint16_t);
    for (unsigned dsty = 0; dsty < height; ++dsty) {
      unsigned srcy = basey + dsty;
      unsigned sy = (srcy / (4)) * src_stride + (srcy % (4)) * (4);
      for (unsigned dstx = 0; dstx < width; ++dstx) {
        unsigned srcx = basex + dstx;
        ((uint16_t *)dest)[dsty * dst_stride + dstx] = ((uint16_t *)src)[sy + (srcx / (4)) * ((4) * (4)) + (srcx % (4))];
      }
    };
  } else if (elmtsize == 1) {
    src_stride = (src_stride * (4)) / sizeof(uint8_t);
    dst_stride /= sizeof(uint8_t);
    for (unsigned dsty = 0; dsty < height; ++dsty) {
      unsigned srcy = basey + dsty;
      unsigned sy = (srcy / (4)) * src_stride + (srcy % (4)) * (4);
      for (unsigned dstx = 0; dstx < width; ++dstx) {
        unsigned srcx = basex + dstx;
        ((uint8_t *)dest)[dsty * dst_stride + dstx] = ((uint8_t *)src)[sy + (srcx / (4)) * ((4) * (4)) + (srcx % (4))];
      }
    };
  } else {
    printf("etna_texture_tile: unhandled element size %i\n", elmtsize);
  }
}
```