user: 请从给定的汇编指令推导出C源代码:

```asm
<build_level>:
  endbr64
  push   %r15
  mov    %esi,%r10d
  xor    %eax,%eax
  push   %r14
  imul   %edx,%r10d
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rdi,%rbp
  movslq %r9d,%rdi
  push   %rbx
  mov    %rdi,%r13
  shl    $0x2,%rdi
  mov    %esi,%ebx
  sub    $0x38,%rsp
  mov    %r10d,(%rsp)
  mov    %r8,0x10(%rsp)
  mov    %rcx,0x8(%rsp)
  call   <check_malloc@plt>
  movslq (%rsp),%r15
  movslq %eax,%r14
  xor    %eax,%eax
  mov    %r15d,0x2c(%rsp)
  shl    $0x2,%r15
  shr    %r15
  mov    %r15,%rdi
  call   <check_malloc@plt>
  mov    %r15,%rdi
  lea    D6(%rip),%r15
  cltq
  mov    %rax,(%rsp)
  xor    %eax,%eax
  call   <check_malloc@plt>
  sub    $0x8,%rsp
  mov    %r13d,%r9d
  mov    %r14,%r8
  movslq %eax,%r11
  push   %r15
  mov    %r12d,%edx
  mov    %ebx,%esi
  push   %r11
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    %r11,0x30(%rsp)
  push   $0x1
  push   $0x0
  push   $0x2
  push   $0x0
  push   $0x1
  mov    0x48(%rsp),%rcx
  call   <internal_filter@plt>
  add    $0x38,%rsp
  mov    %r13d,%r9d
  mov    %r14,%r8
  push   %r15
  mov    %r12d,%edx
  mov    %ebx,%esi
  mov    %rbp,%rdi
  push   0x10(%rsp)
  xor    %eax,%eax
  mov    %ebx,%ebp
  push   $0x1
  shr    $0x1f,%ebp
  push   $0x0
  add    %ebx,%ebp
  push   $0x2
  sar    %ebp
  push   $0x1
  push   $0x1
  mov    0x50(%rsp),%rcx
  call   <internal_filter@plt>
  add    $0x38,%rsp
  mov    %r14,%r8
  mov    %r12d,%edx
  push   %r15
  mov    %ebp,%esi
  mov    $0x1,%r9d
  xor    %eax,%eax
  push   0x80(%rsp)
  push   $0x2
  push   $0x0
  push   $0x1
  push   $0x0
  push   %r13
  mov    0x58(%rsp),%r11
  mov    0x48(%rsp),%rcx
  mov    %r11,%rdi
  mov    %r11,0x60(%rsp)
  call   <internal_filter@plt>
  mov    0x6c(%rsp),%r10d
  add    $0x38,%rsp
  mov    %ebp,%esi
  mov    %r14,%r8
  mov    %r12d,%edx
  mov    $0x1,%r9d
  test   %r10d,%r10d
  lea    0x3(%r10),%eax
  cmovs  %eax,%r10d
  xor    %eax,%eax
  mov    %r10d,%ebx
  mov    0x78(%rsp),%r10
  push   %r15
  sar    $0x2,%ebx
  movslq %ebx,%rbx
  shl    $0x2,%rbx
  add    %rbx,%r10
  push   %r10
  mov    %r10,0x30(%rsp)
  push   $0x2
  push   $0x1
  push   $0x1
  push   $0x0
  push   %r13
  mov    0x50(%rsp),%rcx
  mov    0x60(%rsp),%rdi
  call   <internal_filter@plt>
  mov    0x58(%rsp),%r10
  add    $0x38,%rsp
  mov    %ebp,%esi
  push   %r15
  mov    %r14,%r8
  mov    $0x1,%r9d
  mov    %r12d,%edx
  add    %rbx,%r10
  xor    %eax,%eax
  push   %r10
  mov    %r10,0x30(%rsp)
  push   $0x2
  push   $0x0
  push   $0x1
  push   $0x0
  push   %r13
  mov    0x48(%rsp),%rcx
  mov    0x40(%rsp),%rdi
  call   <internal_filter@plt>
  mov    %r12d,%esi
  add    $0x40,%rsp
  mov    %ebp,%edx
  shr    $0x1f,%esi
  mov    0x70(%rsp),%rdi
  xor    %eax,%eax
  add    %r12d,%esi
  sar    %esi
  call   <internal_transpose@plt>
  sub    $0x8,%rsp
  mov    %r14,%r8
  mov    %r12d,%edx
  push   %r15
  mov    0x28(%rsp),%r10
  mov    %ebp,%esi
  mov    $0x1,%r9d
  xor    %eax,%eax
  add    %rbx,%r10
  push   %r10
  push   $0x2
  push   $0x1
  push   $0x1
  push   $0x0
  push   %r13
  mov    0x40(%rsp),%rbx
  mov    0x50(%rsp),%rcx
  mov    %rbx,%rdi
  call   <internal_filter@plt>
  add    $0x40,%rsp
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <check_free@plt>
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <check_free@plt>
  mov    0x20(%rsp),%rdi
  xor    %eax,%eax
  call   <check_free@plt>
  add    $0x38,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D6
datatype: string

tool: D6: reflect1

assistant: ```c
int build_level(image, level_x_size, level_y_size, lo_filter, hi_filter, filter_size, result_block)
int level_x_size, level_y_size, filter_size;
float *image, *result_block, *lo_filter, *hi_filter;
{
  float *hi_imagetemp, *lo_imagetemp, *filtertemp;
  int total_size = level_x_size * level_y_size, i;
  float *tresult_block = result_block;
  filtertemp = (float *)check_malloc(filter_size * sizeof(float));
  hi_imagetemp = (float *)check_malloc(total_size * sizeof(float) / 2);
  lo_imagetemp = (float *)check_malloc(total_size * sizeof(float) / 2);
  internal_filter(image, level_x_size, level_y_size, lo_filter, filtertemp, filter_size, 1, 0, 2, 0, 1, lo_imagetemp, "reflect1");
  internal_filter(image, level_x_size, level_y_size, hi_filter, filtertemp, filter_size, 1, 1, 2, 0, 1, hi_imagetemp, "reflect1");
  level_x_size /= 2;
  internal_filter(lo_imagetemp, level_x_size, level_y_size, lo_filter, filtertemp, 1, filter_size, 0, 1, 0, 2, result_block, "reflect1");
  internal_filter(lo_imagetemp, level_x_size, level_y_size, hi_filter, filtertemp, 1, filter_size, 0, 1, 1, 2, (tresult_block += (total_size / 4)), "reflect1");
  internal_filter(hi_imagetemp, level_x_size, level_y_size, lo_filter, filtertemp, 1, filter_size, 0, 1, 0, 2, (tresult_block += (total_size / 4)), "reflect1");
  internal_transpose(result_block, level_y_size / 2, level_x_size);
  internal_filter(hi_imagetemp, level_x_size, level_y_size, hi_filter, filtertemp, 1, filter_size, 0, 1, 1, 2, (tresult_block += (total_size / 4)), "reflect1");
  check_free((char *)filtertemp);
  check_free((char *)hi_imagetemp);
  check_free((char *)lo_imagetemp);
  return 1;
}
```