user: Converte this assembly snippet into its equivalent C code:

```asm
<recursive_run>:
  endbr64
  push   %r15
  movslq %edi,%rax
  push   %r14
  push   %r13
  movslq %edx,%r13
  push   %r12
  mov    %rax,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %r9,%rbx
  sub    $0x58,%rsp
  mov    %rax,0x8(%rsp)
  movslq %ecx,%rax
  imul   %r12,%rax
  mov    %edx,0x4(%rsp)
  lea    (%rsi,%rax,4),%r14
  lea    -0x1(%r12),%esi
  mov    (%r14,%r13,4),%eax
  mov    %esi,(%rsp)
  lea    (%rax,%r8,1),%r10d
  cmp    %ecx,%esi
  je     L139
  lea    0x1(%rcx),%edx
  mov    %ecx,%r11d
  movslq %edx,%rax
  imul   0x8(%rsp),%rax
  lea    0x0(%rbp,%rax,4),%rcx
  mov    (%rcx,%r13,4),%r14d
  mov    %rcx,0x20(%rsp)
  mov    0x4(%rsp),%ecx
  add    %r10d,%r14d
  lea    0x1(%rcx),%edi
  mov    %edi,0x18(%rsp)
  cmp    %edx,(%rsp)
  je     L22
  add    0x8(%rsp),%rax
  lea    0x2(%rcx),%edi
  lea    0x0(%rbp,%rax,4),%rdx
  mov    %edi,0x1c(%rsp)
  mov    (%rdx,%r13,4),%r15d
  mov    %rdx,0x10(%rsp)
  lea    0x2(%r11),%edx
  add    %r14d,%r15d
  cmp    %edx,(%rsp)
  je     L281
  add    0x8(%rsp),%rax
  mov    %rax,0x38(%rsp)
  lea    0x0(%rbp,%rax,4),%rax
  mov    (%rax,%r13,4),%esi
  mov    %rax,0x28(%rsp)
  lea    0x3(%r11),%eax
  mov    %eax,0x40(%rsp)
  add    %r15d,%esi
  mov    %esi,%r13d
  cmp    %eax,(%rsp)
  je     L200
  mov    %ecx,%edx
  mov    %esi,%r8d
  lea    0x4(%r11),%ecx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  mov    %r10d,0x4c(%rsp)
  mov    %r11d,0x48(%rsp)
  mov    %ecx,0x30(%rsp)
  call   <recursive_run>
  mov    %r13d,%r8d
  mov    0x18(%rsp),%r13d
  mov    %rbx,%r9
  mov    0x30(%rsp),%ecx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  mov    %r13d,%edx
  movslq %r13d,%r13
  call   <recursive_run>
  mov    0x28(%rsp),%rcx
  mov    %rbx,%r9
  mov    %r13d,%edx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  mov    %r13d,0x18(%rsp)
  add    (%rcx,%r13,4),%r15d
  mov    0x30(%rsp),%ecx
  mov    %r15d,%r8d
  call   <recursive_run>
  mov    0x30(%rsp),%ecx
  mov    0x1c(%rsp),%edx
  mov    %r15d,%r8d
  mov    %rbx,%r9
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <recursive_run>
  mov    0x28(%rsp),%rcx
  mov    0x10(%rsp),%rdi
  mov    %rbx,%r9
  mov    0x18(%rsp),%edx
  mov    (%rcx,%r13,4),%esi
  add    (%rdi,%r13,4),%r14d
  mov    %r12d,%edi
  mov    0x30(%rsp),%ecx
  add    %r14d,%esi
  mov    %esi,%r15d
  mov    %esi,%r8d
  mov    %rbp,%rsi
  call   <recursive_run>
  mov    %r15d,%r8d
  mov    0x1c(%rsp),%r15d
  mov    %rbx,%r9
  mov    0x30(%rsp),%ecx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  mov    %r15d,%edx
  mov    %ecx,0x44(%rsp)
  call   <recursive_run>
  mov    0x28(%rsp),%rcx
  movslq %r15d,%rsi
  mov    %rbx,%r9
  mov    %esi,%edx
  mov    %rsi,0x30(%rsp)
  mov    %r12d,%edi
  mov    (%rcx,%rsi,4),%r15d
  mov    0x44(%rsp),%ecx
  mov    %rbp,%rsi
  add    %r14d,%r15d
  mov    %ecx,0x28(%rsp)
  mov    %r15d,%r8d
  call   <recursive_run>
  mov    0x4(%rsp),%eax
  mov    0x28(%rsp),%ecx
  mov    %r15d,%r8d
  mov    %r12d,%edi
  mov    %rbx,%r9
  mov    %rbp,%rsi
  lea    0x3(%rax),%r14d
  mov    %r14d,%edx
  call   <recursive_run>
  mov    0x10(%rsp),%rdi
  mov    0x48(%rsp),%r11d
  mov    0x4c(%rsp),%r10d
  mov    (%rdi,%r13,4),%r15d
L278:
  mov    0x20(%rsp),%rax
  mov    0x40(%rsp),%esi
  add    (%rax,%r13,4),%r10d
  mov    0x38(%rsp),%rax
  add    %r10d,%r15d
  lea    0x0(%rbp,%rax,4),%rax
  mov    (%rax,%r13,4),%r8d
  mov    %rax,0x20(%rsp)
  add    %r15d,%r8d
  cmp    %esi,(%rsp)
  je     L66
  lea    0x4(%r11),%r13d
  mov    0x18(%rsp),%edx
  mov    %rbx,%r9
  mov    %rbp,%rsi
  mov    %r13d,%ecx
  mov    %r12d,%edi
  mov    %r10d,0x44(%rsp)
  mov    %r11d,0x40(%rsp)
  mov    %r8d,0x28(%rsp)
  call   <recursive_run>
  mov    0x28(%rsp),%r8d
  mov    %rbx,%r9
  mov    %r13d,%ecx
  mov    0x1c(%rsp),%edx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <recursive_run>
  mov    0x20(%rsp),%rcx
  mov    %rbx,%r9
  mov    %rbp,%rsi
  mov    0x30(%rsp),%rax
  mov    0x1c(%rsp),%edx
  mov    %r12d,%edi
  add    (%rcx,%rax,4),%r15d
  mov    %r13d,%ecx
  mov    %r15d,%r8d
  call   <recursive_run>
  mov    %r15d,%r8d
  mov    %r13d,%ecx
  mov    %r14d,%edx
  mov    %r12d,%edi
  mov    %rbx,%r9
  mov    %rbp,%rsi
  call   <recursive_run>
  mov    0x30(%rsp),%rax
  mov    0x10(%rsp),%rdi
  mov    0x20(%rsp),%rcx
  mov    0x44(%rsp),%r10d
  add    (%rdi,%rax,4),%r10d
  mov    0x8(%rsp),%rdx
  mov    %r10d,%r15d
  add    0x38(%rsp),%rdx
  add    (%rcx,%rax,4),%r10d
  shl    $0x2,%rax
  lea    (%rax,%rdx,4),%rax
  mov    0x40(%rsp),%r11d
  mov    0x0(%rbp,%rax,1),%r8d
  add    %r10d,%r8d
  cmp    %r13d,(%rsp)
  je     L101
  mov    0x1c(%rsp),%edx
  lea    0x5(%r11),%ecx
  mov    %rbx,%r9
  mov    %rbp,%rsi
  mov    %r12d,%edi
  mov    %r10d,0x18(%rsp)
  mov    %r8d,0x8(%rsp)
  mov    %ecx,(%rsp)
  call   <recursive_run>
  mov    0x8(%rsp),%r8d
  mov    (%rsp),%ecx
  mov    %rbx,%r9
  mov    %r14d,%edx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <recursive_run>
  mov    0x18(%rsp),%r10d
L256:
  mov    %r10d,%r8d
  mov    %rbx,%r9
  mov    %r13d,%ecx
  mov    %r14d,%edx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <recursive_run>
  mov    0x20(%rsp),%rdi
  movslq %r14d,%rax
  mov    %rbx,%r9
  mov    %r13d,%ecx
  mov    %r14d,%edx
  mov    %rbp,%rsi
  add    (%rdi,%rax,4),%r15d
  mov    %r12d,%edi
  mov    %r15d,%r8d
  call   <recursive_run>
  mov    0x4(%rsp),%edx
  mov    %rbx,%r9
  mov    %r15d,%r8d
  mov    %r13d,%ecx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  add    $0x4,%edx
  call   <recursive_run>
  mov    (%rbx),%eax
L345:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L22:
  mov    (%r9),%eax
  cmp    %eax,%r14d
  jg     L90
L187:
  movslq 0x18(%rsp),%rdx
  mov    0x20(%rsp),%rcx
  add    (%rcx,%rdx,4),%r10d
  cmp    %r10d,%eax
  jge    L345
  mov    %r10d,(%rbx)
  mov    %r10d,%esi
  lea    D8(%rip),%rdi
  call   <printf@plt>
  mov    (%rbx),%eax
  jmp    L345
  nopl   (%rax)
L139:
  cmp    %r10d,(%r9)
  jge    L345
  mov    %r10d,(%r9)
  mov    %r10d,%esi
  lea    D8(%rip),%rdi
  call   <printf@plt>
  mov    (%r14,%r13,4),%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L200:
  mov    (%r9),%eax
  cmp    %eax,%esi
  jg     L44
L331:
  movslq 0x18(%rsp),%r13
  mov    0x28(%rsp),%rdi
  mov    (%rdi,%r13,4),%edx
  lea    (%r15,%rdx,1),%esi
  cmp    %esi,%eax
  jl     L38
L307:
  mov    0x10(%rsp),%rcx
  add    (%rcx,%r13,4),%r14d
  lea    (%r14,%rdx,1),%esi
  cmp    %esi,%eax
  jl     L176
L182:
  movslq 0x1c(%rsp),%rsi
  mov    0x28(%rsp),%rcx
  add    (%rcx,%rsi,4),%r14d
  mov    %rsi,0x30(%rsp)
  cmp    %r14d,%eax
  jl     L247
  mov    0x10(%rsp),%rax
  mov    (%rax,%r13,4),%r15d
  mov    0x4(%rsp),%eax
  lea    0x3(%rax),%r14d
  jmp    L278
  nopl   0x0(%rax)
L90:
  mov    %r14d,(%r9)
  mov    %r14d,%esi
  lea    D8(%rip),%rdi
  mov    %r10d,(%rsp)
  call   <printf@plt>
  mov    (%rbx),%eax
  mov    (%rsp),%r10d
  jmp    L187
  nopl   0x0(%rax)
L281:
  mov    (%r9),%eax
  cmp    %eax,%r15d
  jg     L283
L91:
  movslq 0x18(%rsp),%r13
  mov    0x10(%rsp),%rdx
  mov    (%rdx,%r13,4),%esi
  add    %esi,%r14d
  cmp    %r14d,%eax
  jl     L47
L248:
  mov    0x20(%rsp),%rdx
  add    (%rdx,%r13,4),%r10d
  add    %r10d,%esi
  mov    %r10d,%ebp
  cmp    %esi,%eax
  jl     L54
L214:
  movslq 0x1c(%rsp),%rdx
  mov    0x10(%rsp),%rdi
  add    (%rdi,%rdx,4),%ebp
  cmp    %ebp,%eax
  jge    L345
L31:
  mov    %ebp,(%rbx)
  mov    %ebp,%esi
  lea    D8(%rip),%rdi
  call   <printf@plt>
  mov    (%rbx),%eax
  jmp    L345
  nopl   0x0(%rax)
L66:
  mov    (%rbx),%eax
  cmp    %eax,%r8d
  jg     L8
L224:
  mov    0x20(%rsp),%rdi
  mov    0x30(%rsp),%rdx
  mov    (%rdi,%rdx,4),%esi
  add    %esi,%r15d
  cmp    %r15d,%eax
  jl     L257
L10:
  mov    0x10(%rsp),%rdi
  mov    0x30(%rsp),%rdx
  add    (%rdi,%rdx,4),%r10d
  add    %r10d,%esi
  mov    %r10d,%ebp
  cmp    %esi,%eax
  jl     L29
L244:
  mov    0x20(%rsp),%rcx
  movslq %r14d,%r14
  add    (%rcx,%r14,4),%ebp
  cmp    %ebp,%eax
  jge    L345
  jmp    L31
  cs nopw 0x0(%rax,%rax,1)
L101:
  cmp    (%rbx),%r8d
  jle    L256
  mov    %r8d,(%rbx)
  mov    %r8d,%esi
  lea    D8(%rip),%rdi
  mov    %r10d,(%rsp)
  call   <printf@plt>
  mov    (%rsp),%r10d
  jmp    L256
  nopl   0x0(%rax,%rax,1)
L54:
  mov    %esi,(%rbx)
  lea    D8(%rip),%rdi
  call   <printf@plt>
  mov    (%rbx),%eax
  jmp    L214
  nopl   (%rax)
L47:
  mov    %r14d,(%rbx)
  mov    %r14d,%esi
  lea    D8(%rip),%rdi
  mov    %r10d,(%rsp)
  call   <printf@plt>
  mov    0x10(%rsp),%rax
  mov    (%rsp),%r10d
  mov    (%rax,%r13,4),%esi
  mov    (%rbx),%eax
  jmp    L248
  nopw   0x0(%rax,%rax,1)
L283:
  mov    %r15d,(%r9)
  mov    %r15d,%esi
  lea    D8(%rip),%rdi
  mov    %r10d,(%rsp)
  call   <printf@plt>
  mov    (%rbx),%eax
  mov    (%rsp),%r10d
  jmp    L91
  nopl   0x0(%rax)
L8:
  mov    %r8d,(%rbx)
  mov    %r8d,%esi
  lea    D8(%rip),%rdi
  mov    %r10d,(%rsp)
  call   <printf@plt>
  mov    (%rbx),%eax
  mov    (%rsp),%r10d
  jmp    L224
  nopl   0x0(%rax)
L29:
  mov    %esi,(%rbx)
  lea    D8(%rip),%rdi
  call   <printf@plt>
  mov    (%rbx),%eax
  jmp    L244
  nopl   (%rax)
L257:
  mov    %r15d,(%rbx)
  mov    %r15d,%esi
  lea    D8(%rip),%rdi
  mov    %r10d,(%rsp)
  call   <printf@plt>
  mov    0x20(%rsp),%rax
  mov    0x30(%rsp),%rdi
  mov    (%rsp),%r10d
  mov    (%rax,%rdi,4),%esi
  mov    (%rbx),%eax
  jmp    L10
  xchg   %ax,%ax
L247:
  mov    %r14d,(%rbx)
  mov    %r14d,%esi
  lea    D8(%rip),%rdi
  mov    %r11d,0x44(%rsp)
  mov    %r10d,0x28(%rsp)
  call   <printf@plt>
  mov    0x10(%rsp),%rax
  mov    0x28(%rsp),%r10d
  mov    0x44(%rsp),%r11d
  mov    (%rax,%r13,4),%r15d
  mov    0x4(%rsp),%eax
  lea    0x3(%rax),%r14d
  jmp    L278
  nopl   0x0(%rax)
L176:
  mov    %esi,(%rbx)
  lea    D8(%rip),%rdi
  mov    %r11d,0x44(%rsp)
  mov    %r10d,0x30(%rsp)
  call   <printf@plt>
  mov    (%rbx),%eax
  mov    0x44(%rsp),%r11d
  mov    0x30(%rsp),%r10d
  jmp    L182
  nopl   0x0(%rax)
L38:
  mov    %esi,(%rbx)
  lea    D8(%rip),%rdi
  mov    %r11d,0x44(%rsp)
  mov    %r10d,0x30(%rsp)
  call   <printf@plt>
  mov    0x28(%rsp),%rax
  mov    0x30(%rsp),%r10d
  mov    0x44(%rsp),%r11d
  mov    (%rax,%r13,4),%edx
  mov    (%rbx),%eax
  jmp    L307
  nopw   0x0(%rax,%rax,1)
L44:
  mov    %esi,(%rbx)
  lea    D8(%rip),%rdi
  mov    %r11d,0x44(%rsp)
  mov    %r10d,0x30(%rsp)
  call   <printf@plt>
  mov    (%rbx),%eax
  mov    0x44(%rsp),%r11d
  mov    0x30(%rsp),%r10d
  jmp    L331
```

tool_calls: name: unpack_data
arguments: tag: D8
type_infered: string

tool: D8: .. %d


assistant: ```c
int recursive_run(int size, int triangle[size][size], int c, int r, int count, int *max) {
  count += triangle[r][c];
  if (r == size - 1) {
    if (count > *max) {
      *max = count;
      printf(".. %d\n", *max);
    }
    return triangle[r][c];
  }
  recursive_run(size, triangle, c, r + 1, count, max);
  recursive_run(size, triangle, c + 1, r + 1, count, max);
  return *max;
}
```