user: Translate the below assembly code into C programming language:

```asm
<spiralOrder>:
  endbr64
  push   %r15
  push   %r14
  mov    %esi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  imul   %edx,%ebx
  sub    $0x58,%rsp
  mov    %rdi,0x10(%rsp)
  lea    0x0(,%rbx,4),%edi
  mov    %esi,0x44(%rsp)
  mov    %edx,0x40(%rsp)
  call   <malloc@plt>
  cmp    $0x1,%r14d
  je     L381
  movslq 0x40(%rsp),%rcx
  cmp    $0x1,%ecx
  je     L112
  lea    -0x1(%rbx),%esi
  mov    %esi,0x24(%rsp)
  test   %esi,%esi
  jle    L303
  mov    %rax,%rdx
  lea    -0x1(%rcx),%r9d
  mov    0x44(%rsp),%edi
  lea    -0x2(%rcx),%esi
  neg    %rdx
  mov    %esi,0x4(%rsp)
  lea    0x4(%rax),%rbx
  mov    %r9d,%r15d
  lea    (%rdx,%rdx,1),%rbp
  movslq %r9d,%rdx
  lea    -0x1(%rdi),%r11d
  mov    %r9d,0x20(%rsp)
  lea    0x0(,%rdx,4),%rsi
  movslq %edi,%rdx
  mov    %r11d,(%rsp)
  xor    %r10d,%r10d
  sub    %rcx,%rdx
  mov    0x10(%rsp),%rcx
  mov    %rsi,0x48(%rsp)
  mov    %rbp,%r14
  mov    %rbx,0x8(%rsp)
  lea    (%rcx,%rdx,8),%rdi
  movslq %r11d,%rdx
  lea    (%rcx,%rdx,8),%rdx
  mov    %rdi,0x30(%rsp)
  xor    %edi,%edi
  lea    (%rdx,%rbp,1),%rcx
  mov    %rcx,0x38(%rsp)
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L367:
  cmp    %r15d,%r10d
  jge    L294
  mov    0x10(%rsp),%rbx
  movslq %ecx,%r12
  lea    0x4(%rdi),%r13
  lea    0x0(,%r12,4),%rbp
  mov    %r13,0x18(%rsp)
  mov    (%rbx,%rdi,2),%rbx
  lea    (%rax,%rbp,1),%rdx
  mov    %rdx,%r8
  mov    %rdx,0x28(%rsp)
  add    %rbx,%r13
  sub    %r13,%r8
  cmp    $0x8,%r8
  jbe    L127
  cmpl   $0x2,0x4(%rsp)
  jbe    L127
  mov    %r9d,%r8d
  shr    $0x2,%r8d
  sub    $0x1,%r8d
  shl    $0x4,%r8
  lea    0x10(%rdx,%r8,1),%rbp
  mov    %rdi,%r8
  sub    %rdx,%r8
  add    %rbx,%r8
  nopw   0x0(%rax,%rax,1)
L28:
  movdqu (%rdx,%r8,1),%xmm1
  add    $0x10,%rdx
  movups %xmm1,-0x10(%rdx)
  cmp    %rbp,%rdx
  jne    L28
  mov    %r9d,%ebp
  and    $0xfffffffc,%ebp
  lea    (%rcx,%rbp,1),%edx
  lea    (%r10,%rbp,1),%r8d
  cmp    %r9d,%ebp
  je     L180
  movslq %r8d,%rbp
  mov    (%rbx,%rbp,4),%r12d
  movslq %edx,%rbp
  add    $0x1,%edx
  mov    %r12d,(%rax,%rbp,4)
  lea    0x1(%r8),%ebp
  cmp    %r15d,%ebp
  jge    L180
  movslq %ebp,%rbp
  movslq %edx,%rdx
  add    $0x2,%r8d
  lea    0x0(,%rbp,4),%r13
  mov    (%rbx,%rbp,4),%ebp
  lea    0x0(,%rdx,4),%r12
  mov    %ebp,(%rax,%rdx,4)
  cmp    %r15d,%r8d
  jge    L180
  mov    0x4(%rbx,%r13,1),%edx
  mov    %edx,0x4(%rax,%r12,1)
L180:
  add    %r9d,%ecx
L378:
  cmp    (%rsp),%r10d
  jge    L226
  movslq %ecx,%r8
  mov    0x8(%rsp),%rbp
  lea    -0x1(%r11),%ebx
  add    %r8,%rbx
  lea    (%rax,%r8,4),%rdx
  neg    %r8
  lea    0x0(%rbp,%rbx,4),%rbp
  lea    (%r14,%r8,8),%rbx
  add    0x10(%rsp),%rbx
  nopl   0x0(%rax,%rax,1)
L84:
  mov    (%rbx,%rdx,2),%r8
  add    $0x4,%rdx
  mov    (%r8,%rsi,1),%r8d
  mov    %r8d,-0x4(%rdx)
  cmp    %rbp,%rdx
  jne    L84
  add    %r11d,%ecx
L226:
  cmp    %r15d,%r10d
  jge    L73
  mov    0x30(%rsp),%rbx
  movslq %ecx,%r12
  mov    %r9d,%ebp
  lea    0x0(%rbp,%r12,1),%r13
  neg    %rbp
  lea    (%rax,%r12,4),%rdx
  mov    (%rbx,%rsi,2),%r8
  lea    0x4(%rsi),%rbx
  lea    (%rax,%r13,4),%r13
  lea    (%rbx,%rbp,4),%rbp
  add    %r8,%rbp
  cmp    %rbp,%r13
  setbe  %bpl
  add    %r8,%rbx
  cmp    %rbx,%rdx
  setae  %bl
  or     %bpl,%bl
  je     L289
  cmpl   $0x2,0x4(%rsp)
  jbe    L289
  mov    %r9d,%r12d
  lea    -0xc(%r8,%rsi,1),%rbx
  shr    $0x2,%r12d
  lea    -0x10(%rbx),%rbp
  sub    $0x1,%r12d
  shl    $0x4,%r12
  sub    %r12,%rbp
  lea    (%rdx,%rbx,1),%r12
  xchg   %ax,%ax
L401:
  movdqu (%rbx),%xmm2
  mov    %r12,%rdx
  sub    %rbx,%rdx
  sub    $0x10,%rbx
  pshufd $0x1b,%xmm2,%xmm0
  movups %xmm0,(%rdx)
  cmp    %rbp,%rbx
  jne    L401
  mov    %r9d,%ebp
  and    $0xfffffffc,%ebp
  lea    (%rcx,%rbp,1),%edx
  lea    (%r10,%rbp,1),%ebx
  cmp    %r9d,%ebp
  je     L34
  mov    0x20(%rsp),%ebp
  sub    %ebx,%ebp
  movslq %ebp,%rbp
  mov    (%r8,%rbp,4),%r12d
  movslq %edx,%rbp
  add    $0x1,%edx
  mov    %r12d,(%rax,%rbp,4)
  lea    0x1(%rbx),%r12d
  cmp    %r15d,%r12d
  jge    L34
  mov    0x20(%rsp),%ebp
  movslq %edx,%rdx
  add    $0x2,%ebx
  lea    0x0(,%rdx,4),%r13
  sub    %r12d,%ebp
  movslq %ebp,%rbp
  mov    (%r8,%rbp,4),%ebp
  mov    %ebp,(%rax,%rdx,4)
  cmp    %r15d,%ebx
  jge    L34
  mov    0x20(%rsp),%edx
  sub    %ebx,%edx
  movslq %edx,%rdx
  mov    (%r8,%rdx,4),%edx
  mov    %edx,0x4(%rax,%r13,1)
L34:
  add    %r9d,%ecx
L73:
  cmp    (%rsp),%r10d
  jge    L211
  movslq %ecx,%rbp
  lea    -0x1(%r11),%ebx
  mov    0x38(%rsp),%r8
  add    %rbp,%rbx
  lea    (%rax,%rbp,4),%rdx
  mov    0x8(%rsp),%rbp
  sub    %r14,%r8
  lea    0x0(%rbp,%rbx,4),%rbp
  nopl   0x0(%rax)
L301:
  mov    (%r8),%rbx
  add    $0x4,%rdx
  sub    $0x8,%r8
  mov    (%rbx,%rdi,1),%ebx
  mov    %ebx,-0x4(%rdx)
  cmp    %rbp,%rdx
  jne    L301
  add    %r11d,%ecx
L211:
  subl   $0x1,(%rsp)
  add    $0x1,%r10d
  sub    $0x1,%r15d
  sub    $0x2,%r11d
  subl   $0x2,0x4(%rsp)
  sub    $0x2,%r9d
  add    $0x8,%r14
  sub    $0x4,%rsi
  mov    0x18(%rsp),%rdi
  cmp    %ecx,0x24(%rsp)
  jg     L367
L125:
  mov    0x40(%rsp),%edi
  cmp    %edi,0x44(%rsp)
  je     L284
L295:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L289:
  mov    0x48(%rsp),%rbx
  mov    0x8(%rsp),%rbp
  sub    %rdi,%rbx
  add    %rbx,%r8
  mov    0x4(%rsp),%ebx
  add    %r12,%rbx
  lea    0x0(%rbp,%rbx,4),%rbx
  nopl   0x0(%rax)
L253:
  mov    (%r8),%ebp
  add    $0x4,%rdx
  sub    $0x4,%r8
  mov    %ebp,-0x4(%rdx)
  cmp    %rbx,%rdx
  jne    L253
  jmp    L34
  nopl   0x0(%rax,%rax,1)
L127:
  mov    0x4(%rsp),%edx
  mov    0x8(%rsp),%r8
  add    %r12,%rdx
  mov    %rdi,%r12
  sub    %rax,%r12
  lea    (%r8,%rdx,4),%rdx
  mov    0x28(%rsp),%r8
  sub    %rbp,%r12
  add    %r12,%rbx
  nopl   0x0(%rax)
L287:
  mov    (%rbx,%r8,1),%ebp
  add    $0x4,%r8
  mov    %ebp,-0x4(%r8)
  cmp    %rdx,%r8
  jne    L287
  jmp    L180
  xchg   %ax,%ax
L294:
  lea    0x4(%rdi),%rbx
  mov    %rbx,0x18(%rsp)
  jmp    L378
L284:
  mov    0x44(%rsp),%esi
  movslq %ecx,%rcx
  mov    %esi,%edx
  shr    $0x1f,%edx
  add    %esi,%edx
  mov    0x10(%rsp),%rsi
  sar    %edx
  movslq %edx,%rdx
  mov    (%rsi,%rdx,8),%rsi
  mov    (%rsi,%rdx,4),%edx
  mov    %edx,(%rax,%rcx,4)
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L381:
  test   %ebx,%ebx
  jle    L295
  mov    0x10(%rsp),%rcx
  mov    %rax,%rdx
  mov    (%rcx),%rsi
  lea    0x4(%rsi),%rcx
  sub    %rcx,%rdx
  cmp    $0x8,%rdx
  jbe    L119
  lea    -0x1(%rbx),%edx
  cmp    $0x2,%edx
  jbe    L119
  mov    %ebx,%ecx
  mov    %rsi,%rdi
  mov    %rax,%rdx
  shr    $0x2,%ecx
  sub    %rax,%rdi
  shl    $0x4,%rcx
  add    %rax,%rcx
  nopl   0x0(%rax)
L357:
  movdqu (%rdx,%rdi,1),%xmm3
  add    $0x10,%rdx
  movups %xmm3,-0x10(%rdx)
  cmp    %rcx,%rdx
  jne    L357
  mov    %ebx,%edx
  and    $0xfffffffc,%edx
  test   $0x3,%bl
  je     L295
  mov    %edx,%edi
  mov    (%rsi,%rdi,4),%r8d
  lea    0x0(,%rdi,4),%rcx
  mov    %r8d,(%rax,%rdi,4)
  lea    0x1(%rdx),%edi
  cmp    %edi,%ebx
  jle    L295
  mov    0x4(%rsi,%rcx,1),%edi
  add    $0x2,%edx
  mov    %edi,0x4(%rax,%rcx,1)
  cmp    %edx,%ebx
  jle    L295
  mov    0x8(%rsi,%rcx,1),%edx
  mov    %edx,0x8(%rax,%rcx,1)
  jmp    L295
L112:
  test   %ebx,%ebx
  jle    L295
  mov    0x10(%rsp),%rsi
  mov    %rax,%rcx
  mov    %rax,%rdx
  lea    (%rax,%rbx,4),%rdi
  neg    %rcx
  lea    (%rsi,%rcx,2),%rsi
  nopl   0x0(%rax,%rax,1)
L308:
  mov    (%rsi,%rdx,2),%rcx
  add    $0x4,%rdx
  mov    (%rcx),%ecx
  mov    %ecx,-0x4(%rdx)
  cmp    %rdi,%rdx
  jne    L308
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L303:
  xor    %ecx,%ecx
  jmp    L125
L119:
  lea    (%rax,%rbx,4),%rdi
  mov    %rax,%rdx
  sub    %rax,%rsi
L385:
  mov    (%rsi,%rdx,1),%ecx
  add    $0x4,%rdx
  mov    %ecx,-0x4(%rdx)
  cmp    %rdi,%rdx
  jne    L385
  jmp    L295
```

assistant: ```c
int *spiralOrder(int **matrix, int matrixRowSize, int matrixColSize) {
  int size = matrixRowSize * matrixColSize;
  int *ret = (int *)malloc(size * sizeof(int));
  if (matrixRowSize == 1) {
    for (int i = 0; i < matrixColSize; i++)
      ret[i] = matrix[0][i];
    return ret;
  }
  if (matrixColSize == 1) {
    for (int i = 0; i < matrixRowSize; i++)
      ret[i] = matrix[i][0];
    return ret;
  }
  int round = 0;
  int i = 0;
  while (i < size - 1) {
    for (int j = round; j < matrixColSize - 1 - round; j++, i++)
      ret[i] = matrix[round][j];
    for (int j = round; j < matrixRowSize - 1 - round; j++, i++)
      ret[i] = matrix[j][matrixColSize - 1 - round];
    for (int j = round; j < matrixColSize - 1 - round; j++, i++)
      ret[i] = matrix[matrixRowSize - 1 - round][matrixColSize - 1 - j];
    for (int j = round; j < matrixRowSize - 1 - round; j++, i++)
      ret[i] = matrix[matrixRowSize - 1 - j][round];
    round++;
  }
  if (matrixRowSize == matrixColSize)
    ret[i] = matrix[matrixRowSize / 2][matrixColSize / 2];
  return ret;
}
```