user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<build_level>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %esi,%ebx
  imul   %edx,%ebx
  sub    $0x38,%rsp
  mov    0x70(%rsp),%rax
  mov    %rdi,0x20(%rsp)
  movslq %ebx,%r15
  movslq %r9d,%rdi
  mov    %rdi,%r13
  shl    $0x2,%r15
  mov    %rcx,0x8(%rsp)
  mov    %rax,0x18(%rsp)
  shl    $0x2,%rdi
  xor    %eax,%eax
  shr    %r15
  mov    %r8,0x10(%rsp)
  call   <check_malloc@plt>
  mov    %r15,%rdi
  movslq %eax,%r14
  xor    %eax,%eax
  call   <check_malloc@plt>
  mov    %r15,%rdi
  lea    D4(%rip),%r15
  cltq
  mov    %rax,(%rsp)
  xor    %eax,%eax
  call   <check_malloc@plt>
  push   $0x0
  mov    %r13d,%r9d
  mov    %r14,%r8
  movslq %eax,%r11
  push   %r15
  mov    %r12d,%edx
  mov    %ebp,%esi
  push   %r11
  xor    %eax,%eax
  mov    %r11,0x40(%rsp)
  push   $0x1
  push   $0x0
  push   $0x2
  push   $0x0
  push   $0x1
  mov    0x48(%rsp),%rcx
  mov    0x60(%rsp),%rdi
  call   <internal_filter@plt>
  add    $0x40,%rsp
  mov    %r13d,%r9d
  mov    %r14,%r8
  push   $0x0
  mov    %r12d,%edx
  mov    %ebp,%esi
  xor    %eax,%eax
  push   %r15
  push   0x10(%rsp)
  push   $0x1
  push   $0x0
  push   $0x2
  push   $0x1
  push   $0x1
  mov    0x60(%rsp),%rdi
  mov    0x50(%rsp),%rcx
  call   <internal_filter@plt>
  mov    %ebp,%r10d
  add    $0x40,%rsp
  mov    %r14,%r8
  shr    $0x1f,%r10d
  lea    D4(%rip),%rax
  push   $0x0
  mov    %r12d,%edx
  push   %rax
  add    %ebp,%r10d
  mov    $0x1,%r9d
  xor    %eax,%eax
  push   0x28(%rsp)
  sar    %r10d
  lea    0x3(%rbx),%ebp
  push   $0x2
  mov    %r10d,%esi
  mov    %r10d,%r15d
  push   $0x0
  push   $0x1
  push   $0x0
  push   %r13
  mov    0x68(%rsp),%r11
  mov    0x48(%rsp),%rcx
  mov    %r11,%rdi
  mov    %r11,0x60(%rsp)
  call   <internal_filter@plt>
  add    $0x40,%rsp
  test   %ebx,%ebx
  mov    0x18(%rsp),%rdx
  cmovns %ebx,%ebp
  lea    D4(%rip),%rax
  push   $0x0
  mov    %r14,%r8
  push   %rax
  mov    %r15d,%esi
  mov    $0x1,%r9d
  xor    %eax,%eax
  sar    $0x2,%ebp
  movslq %ebp,%rbp
  shl    $0x2,%rbp
  lea    (%rdx,%rbp,1),%rbx
  mov    %r12d,%edx
  push   %rbx
  add    %rbp,%rbx
  push   $0x2
  push   $0x1
  push   $0x1
  push   $0x0
  push   %r13
  mov    0x60(%rsp),%r11
  mov    0x50(%rsp),%rcx
  mov    %r11,%rdi
  mov    %r11,0x58(%rsp)
  call   <internal_filter@plt>
  add    $0x40,%rsp
  mov    %r14,%r8
  mov    %r12d,%edx
  lea    D4(%rip),%rax
  push   $0x0
  mov    $0x1,%r9d
  mov    %r15d,%esi
  push   %rax
  xor    %eax,%eax
  push   %rbx
  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    %r15d,%edx
  shr    $0x1f,%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    %rbp,%rbx
  add    %r12d,%esi
  sar    %esi
  call   <internal_transpose@plt>
  push   $0x0
  mov    %r14,%r8
  mov    %r12d,%edx
  lea    D4(%rip),%rax
  mov    %r15d,%esi
  mov    $0x1,%r9d
  push   %rax
  xor    %eax,%eax
  push   %rbx
  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    0x18(%rsp),%rdi
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10a0 <check_free@plt>
```

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

tool: D4: reflect1

assistant: ```c
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;
  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", 0);
  internal_filter(image, level_x_size, level_y_size, hi_filter, filtertemp, filter_size, 1, 1, 2, 0, 1, hi_imagetemp, "reflect1", 0);
  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", 0);
  internal_filter(lo_imagetemp, level_x_size, level_y_size, hi_filter, filtertemp, 1, filter_size, 0, 1, 1, 2, (result_block += (total_size / 4)), "reflect1", 0);
  internal_filter(hi_imagetemp, level_x_size, level_y_size, lo_filter, filtertemp, 1, filter_size, 0, 1, 0, 2, (result_block += (total_size / 4)), "reflect1", 0);
  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, (result_block += (total_size / 4)), "reflect1", 0);
  check_free((char *)filtertemp);
  check_free((char *)hi_imagetemp);
  check_free((char *)lo_imagetemp);
}
```