user: 请将以下的汇编代码转换成C语言代码：

```asm
<flip_image_array>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  xor    %eax,%eax
  push   %r14
  mov    %rdi,%r14
  mov    %r15,%rdi
  push   %r13
  push   %r12
  push   %rbp
  mov    %r15,%rbp
  push   %rbx
  shr    $0x3f,%rbp
  mov    %rdx,%rbx
  add    %r15,%rbp
  sar    %rbp
  sub    $0x38,%rsp
  mov    %rsi,0x20(%rsp)
  mov    %rdx,%rsi
  call   <allocate_image_array@plt>
  movslq %eax,%rsi
  mov    %rsi,0x28(%rsp)
  cmp    $0x1,%r15
  jle    L443
  test   %rbx,%rbx
  jle    L519
  mov    %rbx,%r13
  lea    -0x8(%rsi,%r15,8),%r11
  mov    %rbx,%rdi
  mov    %rbx,%r15
  and    $0xfffffffffffffff8,%r13
  shr    $0x3,%rdi
  lea    -0x1(%rbx),%rsi
  lea    (%rbx,%rbx,1),%r12
  sub    %r13,%r15
  shl    $0x4,%rdi
  mov    %r13d,0x10(%rsp)
  xor    %r8d,%r8d
  lea    -0x1(%r15),%rax
  mov    %rdi,0x8(%rsp)
  mov    %rax,0x18(%rsp)
L483:
  mov    (%r14,%r8,8),%rax
  mov    (%r11),%rdx
  lea    0x2(%rax),%r9
  mov    %rdx,%rcx
  sub    %r9,%rcx
  cmp    $0xc,%rcx
  jbe    L428
  cmp    $0x2,%rsi
  jbe    L428
  cmp    $0x6,%rsi
  jbe    L90
  mov    0x8(%rsp),%rdi
  xor    %ecx,%ecx
  cs nopw 0x0(%rax,%rax,1)
L140:
  movdqu (%rax,%rcx,1),%xmm1
  movups %xmm1,(%rdx,%rcx,1)
  add    $0x10,%rcx
  cmp    %rdi,%rcx
  jne    L140
  mov    %rdi,0x8(%rsp)
  cmp    %r13,%rbx
  je     L163
  cmpq   $0x2,0x18(%rsp)
  mov    %r15,%r10
  jbe    L291
  mov    0x10(%rsp),%ecx
  mov    %r13,%r9
L350:
  movq   (%rax,%r9,2),%xmm0
  movq   %xmm0,(%rdx,%r9,2)
  mov    %r10,%r9
  and    $0xfffffffffffffffc,%r9
  add    %r9d,%ecx
  cmp    %r9,%r10
  je     L163
L35:
  movslq %ecx,%r10
  movzwl (%rax,%r10,2),%edi
  lea    (%r10,%r10,1),%r9
  mov    %di,(%rdx,%r10,2)
  lea    0x1(%rcx),%r10d
  movslq %r10d,%r10
  cmp    %r10,%rbx
  jle    L163
  movzwl 0x2(%rax,%r9,1),%r10d
  add    $0x2,%ecx
  movslq %ecx,%rcx
  mov    %r10w,0x2(%rdx,%r9,1)
  cmp    %rcx,%rbx
  jle    L163
  movzwl 0x4(%rax,%r9,1),%eax
  mov    %ax,0x4(%rdx,%r9,1)
L163:
  add    $0x1,%r8
  sub    $0x8,%r11
  cmp    %r8,%rbp
  jg     L483
  movslq %ebp,%rax
  movslq %ebp,%rbp
  cmp    %rbp,0x20(%rsp)
  jle    L233
L34:
  lea    (%r14,%rax,8),%rdi
  mov    0x20(%rsp),%rax
  mov    %rbx,%rbp
  mov    %rbx,%r8
  and    $0xfffffffffffffff8,%rbp
  mov    %rbx,%r15
  shr    $0x3,%r8
  mov    %r14,0x18(%rsp)
  lea    (%r14,%rax,8),%r12
  mov    0x28(%rsp),%rax
  sub    %rbp,%r15
  shl    $0x4,%r8
  mov    %r8,0x8(%rsp)
  lea    (%rbx,%rbx,1),%r11
  mov    %ebp,%r14d
  lea    -0x8(%r12,%rax,1),%r13
  lea    -0x1(%r15),%rax
  mov    %rax,0x10(%rsp)
  nopl   0x0(%rax,%rax,1)
L92:
  mov    %r13,%rdx
  mov    (%rdi),%rax
  sub    %rdi,%rdx
  mov    (%rdx),%rdx
  lea    0x2(%rax),%r9
  mov    %rdx,%rcx
  sub    %r9,%rcx
  cmp    $0xc,%rcx
  jbe    L506
  cmp    $0x2,%rsi
  jbe    L506
  cmp    $0x6,%rsi
  jbe    L91
  mov    0x8(%rsp),%r8
  xor    %ecx,%ecx
  nopl   0x0(%rax,%rax,1)
L364:
  movdqu (%rax,%rcx,1),%xmm2
  movups %xmm2,(%rdx,%rcx,1)
  add    $0x10,%rcx
  cmp    %r8,%rcx
  jne    L364
  mov    %r8,0x8(%rsp)
  cmp    %rbp,%rbx
  je     L446
  cmpq   $0x2,0x10(%rsp)
  mov    %r15,%r10
  jbe    L101
  mov    %rbp,%r9
  mov    %r14d,%ecx
L114:
  movq   (%rax,%r9,2),%xmm0
  movq   %xmm0,(%rdx,%r9,2)
  mov    %r10,%r9
  and    $0xfffffffffffffffc,%r9
  add    %r9d,%ecx
  cmp    %r9,%r10
  je     L446
L390:
  movslq %ecx,%r10
  movzwl (%rax,%r10,2),%r8d
  lea    (%r10,%r10,1),%r9
  mov    %r8w,(%rdx,%r10,2)
  lea    0x1(%rcx),%r10d
  movslq %r10d,%r10
  cmp    %rbx,%r10
  jge    L446
  movzwl 0x2(%rax,%r9,1),%r10d
  add    $0x2,%ecx
  movslq %ecx,%rcx
  mov    %r10w,0x2(%rdx,%r9,1)
  cmp    %rcx,%rbx
  jle    L446
  movzwl 0x4(%rax,%r9,1),%eax
  mov    %ax,0x4(%rdx,%r9,1)
L446:
  add    $0x8,%rdi
  cmp    %r12,%rdi
  jne    L92
  cmpq   $0x0,0x20(%rsp)
  mov    0x18(%rsp),%r14
  jle    L259
L518:
  mov    0x28(%rsp),%rax
  mov    %rbx,%r12
  mov    0x20(%rsp),%rdi
  mov    %rbx,%r8
  and    $0xfffffffffffffff8,%r12
  shr    $0x3,%r8
  lea    (%rbx,%rbx,1),%rbp
  sub    %rax,%r14
  lea    (%rax,%rdi,8),%r13
  shl    $0x4,%r8
  mov    %rax,%rdi
  mov    %r14,%r11
  mov    %rbx,%r14
  mov    %r8,0x8(%rsp)
  mov    %r12d,%r15d
  sub    %r12,%r14
  lea    -0x1(%r14),%rax
  mov    %rax,0x10(%rsp)
  xchg   %ax,%ax
L217:
  mov    (%rdi),%rax
  mov    (%r11,%rdi,1),%rdx
  lea    0x2(%rax),%r9
  mov    %rdx,%rcx
  sub    %r9,%rcx
  cmp    $0xc,%rcx
  jbe    L325
  cmp    $0x2,%rsi
  jbe    L325
  cmp    $0x6,%rsi
  jbe    L192
  mov    0x8(%rsp),%r8
  xor    %ecx,%ecx
  cs nopw 0x0(%rax,%rax,1)
L500:
  movdqu (%rax,%rcx,1),%xmm3
  movups %xmm3,(%rdx,%rcx,1)
  add    $0x10,%rcx
  cmp    %r8,%rcx
  jne    L500
  mov    %r8,0x8(%rsp)
  cmp    %rbx,%r12
  je     L123
  cmpq   $0x2,0x10(%rsp)
  mov    %r14,%r10
  mov    %r15d,%ecx
  jbe    L136
  mov    %r12,%r9
L206:
  movq   (%rax,%r9,2),%xmm0
  movq   %xmm0,(%rdx,%r9,2)
  mov    %r10,%r9
  and    $0xfffffffffffffffc,%r9
  add    %r9d,%ecx
  cmp    %r10,%r9
  je     L123
L136:
  movslq %ecx,%r10
  movzwl (%rax,%r10,2),%r8d
  lea    (%r10,%r10,1),%r9
  mov    %r8w,(%rdx,%r10,2)
  lea    0x1(%rcx),%r10d
  movslq %r10d,%r10
  cmp    %rbx,%r10
  jge    L123
  movzwl 0x2(%rax,%r9,1),%r10d
  add    $0x2,%ecx
  movslq %ecx,%rcx
  mov    %r10w,0x2(%rdx,%r9,1)
  cmp    %rcx,%rbx
  jle    L123
  movzwl 0x4(%rax,%r9,1),%eax
  mov    %ax,0x4(%rdx,%r9,1)
L123:
  add    $0x8,%rdi
  cmp    %r13,%rdi
  jne    L217
L259:
  mov    0x20(%rsp),%rsi
  mov    0x28(%rsp),%rdi
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <free_image_array@plt>
  nopl   0x0(%rax)
L325:
  mov    0x8(%rsp),%r8
  xor    %ecx,%ecx
  nop
L202:
  movzwl (%rax,%rcx,1),%r9d
  mov    %r9w,(%rdx,%rcx,1)
  add    $0x2,%rcx
  cmp    %rcx,%rbp
  jne    L202
  mov    %r8,0x8(%rsp)
  jmp    L123
  nopw   0x0(%rax,%rax,1)
L506:
  mov    0x8(%rsp),%r8
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L104:
  movzwl (%rax,%rcx,1),%r9d
  mov    %r9w,(%rdx,%rcx,1)
  add    $0x2,%rcx
  cmp    %r11,%rcx
  jne    L104
  mov    %r8,0x8(%rsp)
  jmp    L446
  nopl   (%rax)
L428:
  mov    0x8(%rsp),%rdi
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L177:
  movzwl (%rax,%rcx,1),%r9d
  mov    %r9w,(%rdx,%rcx,1)
  add    $0x2,%rcx
  cmp    %rcx,%r12
  jne    L177
  mov    %rdi,0x8(%rsp)
  jmp    L163
L90:
  mov    %rbx,%r10
  xor    %r9d,%r9d
  xor    %ecx,%ecx
  jmp    L350
L91:
  mov    %rbx,%r10
  xor    %r9d,%r9d
  xor    %ecx,%ecx
  jmp    L114
L192:
  mov    %rbx,%r10
  xor    %ecx,%ecx
  xor    %r9d,%r9d
  jmp    L206
L101:
  mov    %r14d,%ecx
  jmp    L390
L291:
  mov    0x10(%rsp),%ecx
  jmp    L35
L443:
  movslq %ebp,%rax
  movslq %ebp,%rbp
  cmp    %rbp,0x20(%rsp)
  jle    L218
  test   %rbx,%rbx
  jle    L259
  lea    -0x1(%rbx),%rsi
  jmp    L34
L519:
  movslq %ebp,%rbp
  cmp    %rbp,0x20(%rsp)
  jg     L259
L218:
  cmpq   $0x0,0x20(%rsp)
  jle    L259
L233:
  test   %rbx,%rbx
  jle    L259
  lea    -0x1(%rbx),%rsi
  jmp    L518
```

assistant: ```c
flip_image_array(the_image, rows, cols) long cols, rows;
short **the_image;
{
  int i, j;
  long rd2;
  short **temp;
  temp = allocate_image_array(rows, cols);
  rd2 = rows / 2;
  for (i = 0; i < rd2; i++) {
    for (j = 0; j < cols; j++) {
      temp[rows - 1 - i][j] = the_image[i][j];
    }
  }
  for (i = rd2; i < rows; i++) {
    for (j = 0; j < cols; j++) {
      temp[rows - 1 - i][j] = the_image[i][j];
    }
  }
  for (i = 0; i < rows; i++)
    for (j = 0; j < cols; j++)
      the_image[i][j] = temp[i][j];
  free_image_array(temp, rows);
}
```