user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  cmpl   $0x1,-0x24(%rbp)
  jg     L25
  movl   $0x7d0,-0x4(%rbp)
  jmp    L24
L25:
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x4(%rbp)
L24:
  cmpl   $0x2,-0x24(%rbp)
  jg     L10
  movl   $0x1,-0x8(%rbp)
  jmp    L84
L10:
  mov    -0x30(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x8(%rbp)
L84:
  movl   $0x0,-0xc(%rbp)
  jmp    L133
L40:
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0xc(%rbp),%xmm0
  pxor   %xmm6,%xmm6
  cvtss2sd %xmm0,%xmm6
  movq   %xmm6,%rax
  movq   %rax,%xmm0
  lea    D137(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  cmpl   $0x0,-0xc(%rbp)
  jne    L107
  lea    D177(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x3,-0x14(%rbp)
  jmp    L99
L37:
  movsd  D112(%rip),%xmm0
  mov    D150(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  subl   $0x1,-0x14(%rbp)
L99:
  cmpl   $0x0,-0x14(%rbp)
  jne    L37
L107:
  lea    D140(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x10(%rbp)
  jmp    L21
L6:
  mov    -0xc(%rbp),%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D82(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D135(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sin@plt>
  movsd  D112(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D121(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D135(%rip),%xmm1
  movapd %xmm0,%xmm3
  divsd  %xmm1,%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movsd  D112(%rip),%xmm1
  movapd %xmm0,%xmm4
  mulsd  %xmm1,%xmm4
  movsd  %xmm4,-0x40(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D19(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D135(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sin@plt>
  movsd  D112(%rip),%xmm1
  movapd %xmm0,%xmm5
  mulsd  %xmm1,%xmm5
  movq   %xmm5,%rdx
  mov    -0x10(%rbp),%eax
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  shr    $0x1e,%ecx
  add    %ecx,%eax
  and    $0x3,%eax
  sub    %ecx,%eax
  lea    0x1(%rax),%ecx
  mov    -0x10(%rbp),%eax
  add    $0x1,%eax
  movsd  -0x38(%rbp),%xmm2
  movsd  -0x40(%rbp),%xmm1
  movq   %rdx,%xmm0
  mov    %ecx,%edx
  mov    %eax,%esi
  lea    D147(%rip),%rax
  mov    %rax,%rdi
  mov    $0x3,%eax
  call   <printf@plt>
  addl   $0x1,-0x10(%rbp)
L21:
  mov    -0x10(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L6
  cmpl   $0x1,-0x8(%rbp)
  jle    L103
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x10(%rbp)
  jmp    L127
L0:
  mov    -0x10(%rbp),%eax
  lea    0x2(%rax),%ecx
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  sar    $0x1f,%esi
  shr    $0x1e,%esi
  add    %esi,%eax
  and    $0x3,%eax
  sub    %esi,%eax
  add    $0x1,%eax
  mov    %eax,%esi
  lea    D142(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x10(%rbp)
L127:
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x10(%rbp)
  jl     L0
L103:
  addl   $0x1,-0xc(%rbp)
L133:
  mov    -0xc(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L40
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D137
type: string
name: unpack_data
arguments: data_label: D177
type: string
name: unpack_data
arguments: data_label: D112
type: f64
name: unpack_data
arguments: data_label: D150
type: byte[8]
name: unpack_data
arguments: data_label: D55
type: string
name: unpack_data
arguments: data_label: D140
type: string
name: unpack_data
arguments: data_label: D82
type: byte[8]
name: unpack_data
arguments: data_label: D135
type: byte[8]
name: unpack_data
arguments: data_label: D121
type: byte[8]
name: unpack_data
arguments: data_label: D19
type: byte[8]
name: unpack_data
arguments: data_label: D147
type: string
name: unpack_data
arguments: data_label: D60
type: string
name: unpack_data
arguments: data_label: D142
type: string

tool: D137: ITEM: TIME
%g


tool: D177: ITEM: BOUNDS

tool: D112: 5

tool: {"D150": [0x00,0x00,0x00,0x00,0x00,0x00,0x14,0xc0]}

tool: D55: %g, %g


tool: D140: ITEM: POSITIONS

tool: {"D82": [0x0a,0x68,0x22,0x6c,0x78,0x6a,0x2f,0x40]}

tool: {"D135": [0x00,0x00,0x00,0x00,0x00,0x00,0x49,0x40]}

tool: {"D121": [0x6e,0x86,0x1b,0xf0,0xf9,0x21,0xe9,0x3f]}

tool: {"D19": [0x6e,0x86,0x1b,0xf0,0xf9,0x21,0x19,0x40]}

tool: D147: %i, %i, %g, %g, %g


tool: D60: ITEM: BONDS

tool: D142: %i %i %i


assistant: ```c
int main(int argc, char **argv) {
  int i, j, step, npart;
  int nsteps;
  if (argc < 2)
    nsteps = 2000;
  else
    nsteps = atoi(argv[1]);
  if (argc < 3)
    npart = 1;
  else
    npart = atoi(argv[2]);
  for (step = 0; step < nsteps; step++) {
    printf("ITEM: TIME\n%g\n", (float)step);
    if (step == 0) {
      printf("ITEM: BOUNDS\n");
      for (i = 3; i; i--)
        printf("%g, %g\n", -5.0, 5.0);
    }
    printf("ITEM: POSITIONS\n");
    for (j = 0; j < npart; j++)
      printf("%i, %i, %g, %g, %g\n", j + 1, 1 + j % 4, 5.0 * sin(2 * 3.14159 * (step + j) / 50), 5.0 * cos(0.25 * 3.14159 * (step + j) / 50), 5.0 * sin(5 * 3.14159 * (step + j) / 50));
    if (npart > 1) {
      printf("ITEM: BONDS\n");
      for (j = 0; j < npart - 1; j++)
        printf("%i %i %i\n", 1 + j % 4, j + 1, j + 2);
    }
  }
}
```