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

```asm
<getcalendar>:
  endbr64
  push   %r15
  push   %r14
  mov    %esi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbx
  mov    $0x1,%edx
  sub    $0x18,%rsp
  mov    %edi,0xc(%rsp)
  mov    %esi,0x8(%rsp)
  call   <calculateweekindex@plt>
  mov    $0x1f,%r8d
  mov    %eax,0x4(%rsp)
  mov    %r14d,%eax
  and    $0xfffffffd,%eax
  cmp    $0x1,%eax
  je     L291
  cmp    $0xc,%r14d
  ja     L397
  mov    $0x1,%eax
  mov    %r14d,%ecx
  shl    %cl,%rax
  test   $0x15a0,%eax
  jne    L291
  mov    $0x1e,%r8d
  cmp    $0x2,%r14d
  je     L421
  nopl   0x0(%rax,%rax,1)
L291:
  mov    0x4(%rsp),%eax
  xor    %r10d,%r10d
  movdqa D36(%rip),%xmm8
  mov    %rbx,%r14
  add    $0x1,%r10d
  movdqa D66(%rip),%xmm7
  movdqa D7(%rip),%xmm4
  xor    %r11d,%r11d
  movdqa D14(%rip),%xmm5
  movdqa D25(%rip),%xmm6
  lea    -0x1(%rax),%ebp
  mov    $0x1,%esi
  movdqa D55(%rip),%xmm9
  cmp    $0x1,%r10d
  je     L136
  nopl   (%rax)
L128:
  cmp    %esi,%r8d
  jge    L380
  mov    %esi,%eax
  mov    $0x7,%ecx
  xor    %edi,%edi
  xor    %edx,%edx
L308:
  movd   %eax,%xmm3
  movd   %r8d,%xmm1
  movslq %edx,%r9
  mov    %ecx,%r12d
  pshufd $0x0,%xmm3,%xmm0
  pshufd $0x0,%xmm1,%xmm1
  add    %r11,%r9
  shr    $0x2,%r12d
  movdqa %xmm0,%xmm3
  movdqa %xmm1,%xmm2
  lea    (%rbx,%r9,4),%r9
  paddd  %xmm7,%xmm3
  movdqa %xmm0,%xmm10
  psubd  %xmm3,%xmm2
  paddd  %xmm8,%xmm10
  movups %xmm2,(%r9)
  cmp    $0x1,%r12d
  je     L277
  movdqa %xmm1,%xmm2
  paddd  %xmm4,%xmm0
  psubd  %xmm10,%xmm2
  movups %xmm2,0x10(%r9)
  cmp    $0x2,%r12d
  je     L277
  xor    %r13d,%r13d
L65:
  movdqa %xmm0,%xmm3
  movdqa %xmm1,%xmm2
  paddd  %xmm5,%xmm0
  mov    %r13,%r15
  shl    $0x4,%r15
  psubd  %xmm3,%xmm2
  add    $0x1,%r13
  movups %xmm2,0x20(%r9,%r15,1)
  lea    0x2(%r13),%r15d
  cmp    %r15d,%r12d
  ja     L65
L277:
  mov    %ecx,%r9d
  and    $0xfffffffc,%r9d
  add    %r9d,%edx
  add    %r9d,%eax
  cmp    %ecx,%r9d
  je     L51
L121:
  movslq %edx,%rcx
  mov    %r8d,%r9d
  sub    %eax,%r9d
  lea    (%r14,%rcx,4),%rcx
  mov    %r9d,(%rcx)
  lea    0x1(%rax),%r9d
  cmp    $0x6,%edx
  je     L51
  mov    %r8d,%r12d
  add    $0x2,%eax
  sub    %r9d,%r12d
  mov    %r12d,0x4(%rcx)
  cmp    $0x5,%edx
  je     L51
  mov    %r8d,%edx
  sub    %eax,%edx
  mov    %edx,0x8(%rcx)
L51:
  mov    $0x6,%eax
  xor    %edx,%edx
  sub    %edi,%eax
  cmp    $0x6,%edi
  cmovg  %edx,%eax
  lea    0x1(%rsi,%rax,1),%esi
  cmp    $0x6,%r10d
  je     L413
L392:
  add    $0x1,%r10d
  add    $0x1c,%r14
  add    $0x7,%r11
  cmp    $0x1,%r10d
  jne    L128
L136:
  cmp    $0x6,%ebp
  jg     L392
  mov    %ebp,%edi
  cmp    %esi,%r8d
  jge    L18
  mov    %esi,%eax
  mov    %ebp,%edx
  jmp    L365
  cs nopw 0x0(%rax,%rax,1)
L380:
  xor    %edi,%edi
L18:
  mov    %esi,%ecx
  mov    $0x1,%edx
  sub    %edi,%ecx
  add    $0x6,%ecx
  cmp    %r8d,%ecx
  cmovg  %r8d,%ecx
  mov    %ecx,%eax
  sub    %esi,%eax
  cmp    %esi,%ecx
  lea    0x1(%rax),%r9d
  cmovl  %edx,%r9d
  jl     L262
  cmp    $0x2,%eax
  jbe    L262
  movd   %esi,%xmm1
  movslq %edi,%rax
  movd   %edi,%xmm3
  mov    %r9d,%edx
  pshufd $0x0,%xmm1,%xmm2
  add    %r11,%rax
  pshufd $0x0,%xmm3,%xmm3
  shr    $0x2,%edx
  movdqa %xmm2,%xmm0
  lea    (%rbx,%rax,4),%rax
  movdqa %xmm2,%xmm12
  paddd  %xmm7,%xmm0
  movdqa %xmm3,%xmm1
  paddd  %xmm8,%xmm12
  movups %xmm0,(%rax)
  movdqa %xmm2,%xmm0
  paddd  %xmm6,%xmm1
  paddd  %xmm6,%xmm0
  cmp    $0x1,%edx
  je     L416
  movdqa %xmm2,%xmm11
  movdqa %xmm3,%xmm10
  paddd  %xmm9,%xmm2
  movups %xmm12,0x10(%rax)
  paddd  %xmm9,%xmm3
  paddd  %xmm4,%xmm11
  movdqa %xmm2,%xmm0
  paddd  %xmm4,%xmm10
  movdqa %xmm3,%xmm1
  cmp    $0x2,%edx
  je     L416
  movdqa D85(%rip),%xmm2
  xor    %r12d,%r12d
L203:
  mov    %r12,%r13
  movdqa %xmm11,%xmm0
  add    $0x1,%r12
  shl    $0x4,%r13
  movdqa %xmm10,%xmm1
  paddd  %xmm5,%xmm11
  movups %xmm0,0x20(%rax,%r13,1)
  lea    0x2(%r12),%r13d
  paddd  %xmm5,%xmm10
  paddd  %xmm2,%xmm0
  paddd  %xmm2,%xmm1
  cmp    %r13d,%edx
  ja     L203
L416:
  mov    %r9d,%r15d
  pshufd $0xff,%xmm1,%xmm1
  pshufd $0xff,%xmm0,%xmm0
  and    $0xfffffffc,%r15d
  movd   %xmm1,%edx
  movd   %xmm0,%eax
  lea    (%r15,%rdi,1),%r12d
  lea    (%rsi,%r15,1),%r13d
  cmp    %r15d,%r9d
  je     L372
L515:
  movslq %r12d,%rax
  lea    0x1(%r12),%edx
  lea    (%r14,%rax,4),%r9
  lea    0x1(%r13),%eax
  mov    %r13d,(%r9)
  cmp    %eax,%ecx
  jl     L372
  mov    %eax,0x4(%r9)
  lea    0x2(%r13),%eax
  lea    0x2(%r12),%edx
  cmp    %eax,%ecx
  jl     L372
  mov    %eax,0x8(%r9)
  lea    0x3(%r12),%edx
  lea    0x3(%r13),%eax
L372:
  cmp    $0x6,%edx
  jg     L51
L365:
  mov    $0x7,%ecx
  mov    $0x1,%r9d
  sub    %edx,%ecx
  cmp    $0x6,%edx
  cmovg  %r9d,%ecx
  mov    $0x6,%r9d
  sub    %edx,%r9d
  cmp    $0x2,%r9d
  ja     L308
  jmp    L121
L413:
  mov    0x8(%rsp),%edi
  cmp    $0xc,%edi
  ja     L41
  mov    %edi,%ecx
  mov    $0x1,%eax
  shl    %cl,%rax
  mov    $0x1f,%ecx
  test   $0xb54,%eax
  je     L227
L486:
  cmpl   $0x1,0x8(%rsp)
  jne    L294
L317:
  movslq 0x4(%rsp),%rax
  lea    -0x2(%rax),%edx
  mov    %edx,%ecx
  test   %edx,%edx
  js     L440
  cmp    $0x2,%edx
  jbe    L14
  movdqa D65(%rip),%xmm0
  mov    %ebp,%ecx
  lea    -0x14(%rbx,%rax,4),%rax
  shr    $0x2,%ecx
  movups %xmm0,(%rax)
  cmp    $0x1,%ecx
  je     L458
  movdqa D9(%rip),%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    $0x2,%ecx
  je     L458
  movdqa D31(%rip),%xmm0
  sub    $0x20,%rax
  mov    $0x2,%esi
  movdqa D58(%rip),%xmm2
  pxor   %xmm3,%xmm3
L34:
  movdqa %xmm0,%xmm4
  movdqa %xmm3,%xmm1
  add    $0x1,%esi
  sub    $0x10,%rax
  psubd  %xmm4,%xmm1
  paddd  %xmm2,%xmm0
  pshufd $0x1b,%xmm1,%xmm1
  movups %xmm1,0x10(%rax)
  cmp    %esi,%ecx
  jne    L34
L458:
  mov    %ebp,%esi
  mov    %edx,%ecx
  mov    $0x1f,%eax
  and    $0xfffffffc,%esi
  sub    %esi,%ecx
  sub    %esi,%eax
  cmp    %esi,%ebp
  je     L440
L145:
  movslq %ecx,%rdx
  mov    %eax,%esi
  lea    (%rbx,%rdx,4),%rdx
  neg    %esi
  mov    %esi,(%rdx)
  test   %ecx,%ecx
  je     L440
  mov    $0x1,%esi
  sub    %eax,%esi
  mov    %esi,-0x4(%rdx)
  cmp    $0x1,%ecx
  je     L440
  mov    $0x2,%ecx
  sub    %eax,%ecx
  mov    %ecx,-0x8(%rdx)
L440:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L262:
  mov    %esi,%r13d
  mov    %edi,%r12d
  jmp    L515
L41:
  mov    $0x1e,%ecx
L294:
  cmpl   $0x1,(%rbx)
  je     L317
L84:
  mov    0x4(%rsp),%edi
  lea    -0x2(%rdi),%edx
  mov    %edx,%eax
  test   %edx,%edx
  js     L440
  cmp    $0x2,%edx
  jbe    L258
  movd   %ecx,%xmm6
  pxor   %xmm1,%xmm1
  mov    %ebp,%esi
  movslq %edi,%rax
  movdqa D33(%rip),%xmm3
  pshufd $0x0,%xmm6,%xmm0
  shr    $0x2,%esi
  movdqa %xmm1,%xmm2
  movdqa D71(%rip),%xmm4
  lea    -0x14(%rbx,%rax,4),%rax
  paddd  %xmm0,%xmm3
  psubd  %xmm3,%xmm2
  paddd  %xmm0,%xmm4
  pshufd $0x1b,%xmm2,%xmm2
  movups %xmm2,(%rax)
  cmp    $0x1,%esi
  je     L368
  psubd  %xmm4,%xmm1
  paddd  D23(%rip),%xmm0
  pshufd $0x1b,%xmm1,%xmm1
  movups %xmm1,-0x10(%rax)
  cmp    $0x2,%esi
  je     L368
  movdqa D58(%rip),%xmm2
  sub    $0x20,%rax
  mov    $0x2,%edi
  pxor   %xmm3,%xmm3
L398:
  movdqa %xmm0,%xmm4
  movdqa %xmm3,%xmm1
  add    $0x1,%edi
  sub    $0x10,%rax
  psubd  %xmm4,%xmm1
  paddd  %xmm2,%xmm0
  pshufd $0x1b,%xmm1,%xmm1
  movups %xmm1,0x10(%rax)
  cmp    %edi,%esi
  jne    L398
L368:
  mov    %ebp,%esi
  mov    %edx,%eax
  and    $0xfffffffc,%esi
  sub    %esi,%eax
  sub    %esi,%ecx
  cmp    %esi,%ebp
  je     L440
L258:
  movslq %eax,%rdx
  lea    (%rbx,%rdx,4),%rsi
  mov    %ecx,%edx
  neg    %edx
  mov    %edx,(%rsi)
  test   %eax,%eax
  je     L440
  mov    $0x1,%edx
  sub    %ecx,%edx
  mov    %edx,-0x4(%rsi)
  cmp    $0x1,%eax
  je     L440
  mov    $0x2,%eax
  sub    %ecx,%eax
  mov    %eax,-0x8(%rsi)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L227:
  cmp    $0xc,%edi
  je     L294
  mov    $0x1e,%ecx
  cmp    $0x3,%edi
  jne    L486
  mov    0xc(%rsp),%edi
  call   <isLeapYear@plt>
  mov    $0x1c,%ecx
  cmp    $0x1,%rax
  sbb    $0xffffffff,%ecx
  cmpl   $0x1,(%rbx)
  jne    L84
  jmp    L317
L397:
  mov    $0x1e,%r8d
  jmp    L291
L421:
  mov    0xc(%rsp),%edi
  call   <isLeapYear@plt>
  mov    $0x1c,%r8d
  cmp    $0x1,%rax
  sbb    $0xffffffff,%r8d
  jmp    L291
L14:
  mov    $0x1f,%eax
  jmp    L145
```

tool_calls: name: parse_data
arguments: tag: D36
type: byte[16]
name: parse_data
arguments: tag: D66
type: byte[16]
name: parse_data
arguments: tag: D7
type: byte[16]
name: parse_data
arguments: tag: D14
type: byte[16]
name: parse_data
arguments: tag: D25
type: byte[16]
name: parse_data
arguments: tag: D55
type: byte[16]
name: parse_data
arguments: tag: D85
type: byte[16]
name: parse_data
arguments: tag: D65
type: byte[16]
name: parse_data
arguments: tag: D9
type: byte[16]
name: parse_data
arguments: tag: D31
type: byte[16]
name: parse_data
arguments: tag: D58
type: byte[16]
name: parse_data
arguments: tag: D33
type: byte[16]
name: parse_data
arguments: tag: D71
type: byte[16]
name: parse_data
arguments: tag: D23
type: byte[16]

tool: {"D36": [0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x07,0x00,0x00,0x00]}

tool: {"D66": [0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00]}

tool: {"D7": [0x08,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x0b,0x00,0x00,0x00]}

tool: {"D14": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D25": [0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D55": [0x05,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x08,0x00,0x00,0x00]}

tool: {"D85": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

tool: {"D65": [0xe4,0xff,0xff,0xff,0xe3,0xff,0xff,0xff,0xe2,0xff,0xff,0xff,0xe1,0xff,0xff,0xff]}

tool: {"D9": [0xe8,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xe6,0xff,0xff,0xff,0xe5,0xff,0xff,0xff]}

tool: {"D31": [0x17,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x14,0x00,0x00,0x00]}

tool: {"D58": [0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xfc,0xff,0xff,0xff]}

tool: {"D33": [0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfd,0xff,0xff,0xff]}

tool: {"D71": [0xfc,0xff,0xff,0xff,0xfb,0xff,0xff,0xff,0xfa,0xff,0xff,0xff,0xf9,0xff,0xff,0xff]}

tool: {"D23": [0xf8,0xff,0xff,0xff,0xf7,0xff,0xff,0xff,0xf6,0xff,0xff,0xff,0xf5,0xff,0xff,0xff]}

assistant: ```c
void getcalendar(int year, int month, int array[6][7]) {
  int n = calculateweekindex(year, month, 1);
  int i, j, t, b;
  int count = 1;
  int daytotal;
  int prevmonth = month - 1;
  if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12)
    daytotal = 31;
  else if (month != 2)
    daytotal = 30;
  else {
    if (isLeapYear(year))
      daytotal = 29;
    else
      daytotal = 28;
  }
  for (i = 0; i < 6; i++) {
    for (j = i == 0 ? n - 1 : 0; j < 7; j++) {
      array[i][j] = count <= daytotal ? count : -(count - daytotal);
      count++;
    }
  }
  count = 1;
  b = j;
  for (t = i; i < 6; i++) {
    if (i == t) {
      for (j = b; j < 7; j++)
        array[i][j] = -count;
      count++;
    } else {
      for (j = 0; j < 7; j++)
        array[i][j] = -count;
      count++;
    }
  }
  if (prevmonth == 1 || prevmonth == 3 || prevmonth == 5 || prevmonth == 7 || prevmonth == 8 || prevmonth == 10 || month == 12)
    daytotal = 31;
  else if (prevmonth != 2)
    daytotal = 30;
  else {
    if (isLeapYear(year))
      daytotal = 29;
    else
      daytotal = 28;
  }
  if (prevmonth != 0 && array[0][0] != 1) {
    for (j = n - 2; j >= 0; j--) {
      array[0][j] = -(daytotal--);
    }
  } else {
    prevmonth = 12;
    daytotal = 31;
    for (j = n - 2; j >= 0; j--) {
      array[0][j] = -(daytotal--);
    }
  }
}
```