user: 这段汇编代码用C语言表示是什么样的:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x753000(%rsp),%r11
L76:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L76
  sub    $0x318,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x753308(%rsp)
  xor    %eax,%eax
  lea    0x2c(%rsp),%rdx
  lea    0x28(%rsp),%rsi
  lea    D13(%rip),%rdi
  call   <scanf@plt>
  lea    0x300(%rsp),%rdi
  mov    $0x753000,%edx
  mov    $0x0,%esi
  call   <memset@plt>
  mov    0x2c(%rsp),%eax
  test   %eax,%eax
  jle    L134
  mov    $0x4,%ebx
  mov    $0x1,%ebp
  lea    D27(%rip),%r12
L139:
  lea    0x210(%rsp,%rbx,1),%rcx
  lea    0x120(%rsp,%rbx,1),%rdx
  lea    0x30(%rsp,%rbx,1),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  add    $0x1,%ebp
  mov    0x2c(%rsp),%eax
  add    $0x4,%rbx
  cmp    %ebp,%eax
  jge    L139
  test   %eax,%eax
  jle    L134
  lea    0x34(%rsp),%r14
  lea    0x214(%rsp),%r13
  mov    $0x1f400,%r12d
  movq   $0x0,(%rsp)
  mov    $0x0,%r15d
  lea    0x300(%rsp),%rax
  mov    %rax,0x18(%rsp)
  lea    0x120(%rsp),%rax
  mov    %rax,0x10(%rsp)
  jmp    L143
L75:
  mov    %ebx,%eax
  sub    %esi,%eax
  cltq
  add    0x8(%rsp),%rax
  mov    0x10(%rsp),%rdi
  imul   0x4(%rdi,%r15,4),%esi
  add    0x300(%rsp,%rax,4),%esi
  mov    0x4(%rbp),%edi
  call   <max@plt>
  jmp    L129
L11:
  movslq %eax,%rdx
  mov    0x30(%rsp,%rdx,4),%edx
  mov    (%r14),%esi
  lea    (%rdx,%rsi,1),%ecx
  cmp    %ebx,%ecx
  jle    L69
  mov    0x4(%rbp),%eax
L129:
  mov    (%rsp),%rdi
  lea    0x0(%rbp,%rdi,1),%rdx
  mov    %eax,0x4(%rdx,%r12,1)
  add    $0x1,%ebx
  add    $0x4,%rbp
  cmp    %ebx,0x28(%rsp)
  jl     L133
L44:
  mov    0x0(%r13),%eax
  test   %eax,%eax
  jne    L11
  mov    (%r14),%esi
  cmp    %ebx,%esi
  jle    L75
  mov    0x4(%rbp),%eax
  jmp    L129
L69:
  mov    %ebx,%ecx
  sub    %edx,%ecx
  sub    %esi,%ecx
  movslq %ecx,%rcx
  add    0x8(%rsp),%rcx
  mov    0x10(%rsp),%rdi
  imul   0x4(%rdi,%r15,4),%esi
  add    0x300(%rsp,%rcx,4),%esi
  cltq
  imul   0x120(%rsp,%rax,4),%edx
  add    %edx,%esi
  mov    0x4(%rbp),%edi
  call   <max@plt>
  jmp    L129
L133:
  mov    0x2c(%rsp),%eax
  add    $0x1,%r15
  subq   $0x1f400,(%rsp)
  add    $0x1f400,%r12
  add    $0x4,%r14
  add    $0x4,%r13
  lea    0x1(%r15),%edx
  cmp    %edx,%eax
  jl     L134
L143:
  mov    0x18(%rsp),%rbp
  sub    (%rsp),%rbp
  mov    $0x1,%ebx
  cmpl   $0x0,0x28(%rsp)
  jle    L133
  movslq %r15d,%rax
  imul   $0x7d00,%rax,%rax
  mov    %rax,0x8(%rsp)
  jmp    L44
L134:
  movslq 0x28(%rsp),%rdx
  cltq
  imul   $0x7d00,%rax,%rax
  add    %rdx,%rax
  mov    0x300(%rsp,%rax,4),%esi
  lea    D18(%rip),%rdi
  call   <printf@plt>
  mov    0x753308(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L145
  mov    $0x0,%eax
  add    $0x753318,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L145:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D13
type: string
name: retrieve_data
arguments: tag: D27
type: string
name: retrieve_data
arguments: tag: D18
type: string

tool: D13: %d %d

tool: D27: %d %d %d

tool: D18: %d


assistant: ```c
int main() {
  int N, m;
  int v[60], p[60], q[60];
  int cnt = 0;
  scanf("%d %d", &N, &m);
  int dp[60][32000] = {0};
  for (int i = 1; i <= m; i++) {
    scanf("%d %d %d", &v[i], &p[i], &q[i]);
  }
  for (int i = 1; i < m + 1; i++) {
    for (int j = 1; j < N + 1; j++) {
      if (q[i] == 0) {
        if (j >= v[i])
          dp[i][j] = max(dp[i - 1][j], dp[i - 1][j - v[i]] + v[i] * p[i]);
        else
          dp[i][j] = dp[i - 1][j];
      } else {
        if (j >= v[q[i]] + v[i])
          dp[i][j] = max(dp[i - 1][j], dp[i - 1][j - v[q[i]] - v[i]] + v[i] * p[i] + v[q[i]] * p[q[i]]);
        else
          dp[i][j] = dp[i - 1][j];
      }
    }
  }
  printf("%d\n", dp[m][N]);
  return 0;
}
```