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

```asm
<downsample_component>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0xb8,%rsp
  mov    0x18(%rbp),%rax
  mov    %esi,-0xc4(%rbp)
  mov    %rdi,-0xd0(%rbp)
  mov    %rsp,%rsi
  mov    0x20(%rbp),%r12
  mov    %edx,-0x48(%rbp)
  mov    %ecx,-0x60(%rbp)
  lea    (%r9,%r9,1),%ecx
  mov    %r8d,-0x70(%rbp)
  mov    %r9d,-0x5c(%rbp)
  mov    %rax,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    -0x1(%rcx),%eax
  mov    %eax,-0x74(%rbp)
  cltq
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdi
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rdx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L292
L404:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L404
L292:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L276
L79:
  mov    %rax,%rdx
  mov    %rsp,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,-0xa8(%rbp)
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rsi,%rsp
  je     L125
L49:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L49
L125:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L288
L339:
  movslq -0xc4(%rbp),%rbx
  mov    %rsp,%rsi
  mov    %rsp,-0xb0(%rbp)
  lea    0xf(%rbx),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rsi,%rsp
  je     L53
L252:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L252
L53:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L136
  orq    $0x0,-0x8(%rsp,%rax,1)
L136:
  mov    -0x5c(%rbp),%eax
  mov    %rsp,-0xd8(%rbp)
  sub    $0x1,%eax
  mov    %eax,-0xc8(%rbp)
  mov    -0xc4(%rbp),%eax
  lea    -0x2(%rcx,%rax,1),%eax
  mov    %rsp,%rcx
  cltq
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L239
L206:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L206
L239:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L227
  orq    $0x0,-0x8(%rsp,%rax,1)
L227:
  mov    0x10(%rbp),%eax
  mov    %rsp,%rsi
  mov    %rsp,-0x80(%rbp)
  lea    (%rax,%rax,1),%edx
  lea    -0x1(%rdx),%eax
  mov    %eax,-0x78(%rbp)
  cltq
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdi
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rcx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L139
L193:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L193
L139:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  je     L264
  orq    $0x0,-0x8(%rsp,%rcx,1)
L264:
  mov    %rax,%rcx
  mov    %rsp,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,-0xb8(%rbp)
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L256
L33:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L33
L256:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L262
  orq    $0x0,-0x8(%rsp,%rax,1)
L262:
  movslq -0x48(%rbp),%r14
  mov    %rsp,-0xc0(%rbp)
  mov    %rsp,%rsi
  lea    0xf(%r14),%rcx
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rax
  sub    %rcx,%rsi
L36:
  cmp    %rsi,%rsp
  je     L18
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L36
  nopl   0x0(%rax)
L276:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L79
L288:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L339
L18:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L385
  orq    $0x0,-0x8(%rsp,%rax,1)
L385:
  mov    0x10(%rbp),%eax
  mov    %rsp,%rcx
  mov    %rsp,%r13
  sub    $0x1,%eax
  mov    %eax,-0x58(%rbp)
  mov    -0x48(%rbp),%eax
  lea    -0x2(%rdx,%rax,1),%eax
  cltq
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  and    $0xfffffffffffffff0,%rdx
  sub    %rax,%rcx
L210:
  cmp    %rcx,%rsp
  je     L400
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L210
L400:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L161
  orq    $0x0,-0x8(%rsp,%rax,1)
L161:
  mov    -0xc4(%rbp),%edi
  mov    -0x48(%rbp),%r15d
  mov    %rsp,-0x88(%rbp)
  mov    -0x68(%rbp),%rax
  mov    -0x5c(%rbp),%edx
  mov    -0xb0(%rbp),%rsi
  mov    %edi,(%rax)
  mov    -0xa8(%rbp),%rdi
  mov    %r15d,(%r12)
  call   <build_downsample_pixelprop_table@plt>
  mov    0x10(%rbp),%edx
  mov    -0xc0(%rbp),%rsi
  mov    -0xb8(%rbp),%rdi
  call   <build_downsample_pixelprop_table@plt>
  mov    0x10(%rbp),%edx
  mov    -0x70(%rbp),%esi
  mov    %r15d,%edi
  call   <return_downscaled_array_len@plt>
  cmpl   $0x1,0x10(%rbp)
  mov    %eax,(%r12)
  jne    L221
  cmpl   $0x0,-0x70(%rbp)
  jne    L221
  nopw   0x0(%rax,%rax,1)
L230:
  mov    -0x5c(%rbp),%r15d
  mov    -0x60(%rbp),%r14d
  mov    -0xc4(%rbp),%edi
  mov    %r15d,%edx
  mov    %r14d,%esi
  call   <return_downscaled_array_len@plt>
  mov    -0x68(%rbp),%rdi
  mov    %eax,(%rdi)
  cmp    $0x1,%r15d
  jne    L381
  test   %r14d,%r14d
  jne    L381
L370:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L41
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L221:
  mov    -0xc4(%rbp),%edi
  test   %edi,%edi
  jle    L230
  mov    -0x48(%rbp),%eax
  mov    %edi,%edx
  mov    -0xd0(%rbp),%r11
  lea    -0x1(%rax),%r10d
  mov    %r11,%r15
  imul   %r10d,%edx
  movslq %edx,%rsi
  movslq 0x10(%rbp),%rdx
  mov    %rsi,-0x90(%rbp)
  mov    -0x88(%rbp),%rsi
  lea    -0x1(%r14,%rdx,1),%rcx
  add    %rdx,%r10
  add    %rsi,%rcx
  lea    (%rsi,%r10,1),%r14
  mov    %rcx,-0x98(%rbp)
  lea    -0x1(%rsi,%rdx,1),%rcx
  mov    %rcx,-0x50(%rbp)
  lea    -0x1(%rdi),%ecx
  lea    0x1(%r11,%rcx,1),%rdi
  mov    %rdi,-0xa0(%rbp)
  nopl   0x0(%rax,%rax,1)
L166:
  movzbl (%r15),%esi
  mov    -0x58(%rbp),%edx
  mov    -0x88(%rbp),%rdi
  call   <memset@plt>
  mov    -0x90(%rbp),%rax
  mov    -0x58(%rbp),%edx
  mov    -0x98(%rbp),%rdi
  movzbl (%r15,%rax,1),%esi
  call   <memset@plt>
  mov    -0x48(%rbp),%r9d
  mov    -0x50(%rbp),%rax
  mov    %r15,%rdx
  test   %r9d,%r9d
  jle    L286
  xchg   %ax,%ax
L42:
  movzbl (%rdx),%ecx
  add    $0x1,%rax
  add    %rbx,%rdx
  mov    %cl,-0x1(%rax)
  cmp    %rax,%r14
  jne    L42
L286:
  mov    0x10(%rbp),%r8d
  mov    -0x48(%rbp),%edx
  push   -0xc0(%rbp)
  mov    %r13,%rsi
  mov    -0x50(%rbp),%rdi
  push   -0xb8(%rbp)
  mov    -0x78(%rbp),%r9d
  mov    -0x70(%rbp),%ecx
  call   <downsample_component_line@plt>
  mov    (%r12),%r8d
  pop    %rsi
  mov    %r15,%rdx
  pop    %rdi
  xor    %eax,%eax
  test   %r8d,%r8d
  jle    L317
  nopl   0x0(%rax,%rax,1)
L367:
  movzbl 0x0(%r13,%rax,1),%ecx
  add    $0x1,%rax
  mov    %cl,(%rdx)
  add    %rbx,%rdx
  cmp    %eax,(%r12)
  jg     L367
L317:
  add    $0x1,%r15
  cmp    -0xa0(%rbp),%r15
  jne    L166
  jmp    L230
  nopl   0x0(%rax,%rax,1)
L381:
  mov    (%r12),%ecx
  test   %ecx,%ecx
  jle    L370
  movslq -0x5c(%rbp),%rax
  mov    -0x80(%rbp),%rdi
  mov    %rbx,-0x48(%rbp)
  mov    %r12,-0x70(%rbp)
  mov    -0xd0(%rbp),%r13
  lea    -0x1(%rbx,%rax,1),%r15
  mov    -0xc8(%rbp),%ebx
  lea    -0x1(%rdi,%rax,1),%r14
  mov    -0xd8(%rbp),%r12
  add    %rdi,%r15
  mov    %r15,-0x58(%rbp)
  xor    %r15d,%r15d
  mov    %r15d,%r10d
  mov    -0xc4(%rbp),%r15d
  xchg   %ax,%ax
L35:
  movzbl 0x0(%r13),%esi
  mov    -0x80(%rbp),%rdi
  mov    %ebx,%edx
  mov    %r10d,-0x50(%rbp)
  call   <memset@plt>
  mov    -0x48(%rbp),%rax
  mov    -0x58(%rbp),%rdi
  mov    %ebx,%edx
  movzbl -0x1(%r13,%rax,1),%esi
  call   <memset@plt>
  mov    %r13,%rsi
  mov    %r15d,%edx
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    -0x74(%rbp),%r9d
  mov    -0x5c(%rbp),%r8d
  mov    %r15d,%edx
  push   -0xb0(%rbp)
  mov    -0x60(%rbp),%ecx
  mov    %r12,%rsi
  mov    %r14,%rdi
  push   -0xa8(%rbp)
  call   <downsample_component_line@plt>
  mov    -0x68(%rbp),%rdi
  mov    %r12,%rsi
  mov    (%rdi),%edx
  mov    %r13,%rdi
  call   <memcpy@plt>
  pop    %rax
  mov    -0x50(%rbp),%r10d
  mov    -0x70(%rbp),%rax
  add    -0x48(%rbp),%r13
  add    $0x1,%r10d
  pop    %rdx
  cmp    %r10d,(%rax)
  jg     L35
  jmp    L370
L41:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void downsample_component(unsigned char *carray, int width, int height, const int xpos, const int ypos, const int xstep, const int ystep, int *out_width, int *out_height) {
  int x_pixel_len = (xstep * 2) - 1;
  int x_pixel_coord[x_pixel_len];
  float x_pixel_percent[x_pixel_len];
  unsigned char x_out_buff[width];
  unsigned char x_in_buff[width + (xstep - 1) * 2];
  int y_pixel_len = (ystep * 2) - 1;
  int y_pixel_coord[y_pixel_len];
  float y_pixel_percent[y_pixel_len];
  unsigned char y_out_buff[height];
  unsigned char y_in_buff[height + (ystep - 1) * 2];
  int linecount;
  unsigned char *datastart;
  int i;
  *out_width = width;
  *out_height = height;
  build_downsample_pixelprop_table(x_pixel_coord, x_pixel_percent, xstep);
  build_downsample_pixelprop_table(y_pixel_coord, y_pixel_percent, ystep);
  *out_height = return_downscaled_array_len(height, ypos, ystep);
  if ((ystep != 1) || (ypos != 0)) {
    for (linecount = 0; linecount < width; linecount++) {
      datastart = carray + linecount;
      memset(y_in_buff, *datastart, ystep - 1);
      memset((y_in_buff + ystep - 1 + height), *(datastart + ((height - 1) * width)), ystep - 1);
      for (i = 0; i < height; i++)
        *(y_in_buff + (ystep - 1) + i) = *(datastart + (width * i));
      downsample_component_line(y_in_buff + (ystep - 1), y_out_buff, height, ypos, ystep, y_pixel_len, y_pixel_coord, y_pixel_percent);
      for (i = 0; i < *out_height; i++)
        *(datastart + (width * i)) = *(y_out_buff + i);
    }
  }
  *out_width = return_downscaled_array_len(width, xpos, xstep);
  if ((xstep != 1) || (xpos != 0)) {
    for (linecount = 0; linecount < *out_height; linecount++) {
      datastart = carray + (linecount * width);
      memset(x_in_buff, *datastart, xstep - 1);
      memset((x_in_buff + xstep - 1 + width), *(datastart + (width - 1)), xstep - 1);
      memcpy(x_in_buff + (xstep - 1), datastart, width);
      downsample_component_line(x_in_buff + (xstep - 1), x_out_buff, width, xpos, xstep, x_pixel_len, x_pixel_coord, x_pixel_percent);
      memcpy(datastart, x_out_buff, *out_width);
    }
  }
}
```