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

```asm
<aggiungi>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  mov    %esi,0xc(%rsp)
  mov    %edx,%esi
  mov    %edx,0x8(%rsp)
  mov    %ecx,%r12d
  mov    %r8,%rbp
  lea    0x8(%rsp),%r13
  test   %edx,%edx
  js     L143
L259:
  movslq 0xc(%rsp),%rdx
  movslq %esi,%rax
  mov    (%rbx,%rdx,8),%rdx
  cmpb   $0x5f,(%rdx,%rax,1)
  je     L286
  lea    0xc(%rsp),%rdi
  mov    %r13,%rsi
  call   <sposta@plt>
  mov    0x8(%rsp),%esi
  test   %esi,%esi
  jns    L259
L143:
  mov    %r12d,%esi
  mov    %rbx,%rdi
  call   <verifica_somma@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
L41:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L286:
  test   %esi,%esi
  js     L143
  mov    %rbx,%rdi
  call   <ultimo@plt>
  test   %rax,%rax
  je     L165
  mov    $0x0,%r15d
  jmp    L327
L181:
  movslq 0x8(%rsp),%rax
  mov    0x18(%rbx),%rcx
  movsbl (%rcx,%rax,1),%r14d
  mov    (%rbx),%rcx
  movsbl (%rcx,%rax,1),%ecx
  sub    %ecx,%r14d
  mov    0x10(%rbx),%rcx
  movsbl (%rcx,%rax,1),%eax
  sub    %eax,%r14d
  add    $0x30,%r14d
  cmp    $0x2,%edx
  sete   %al
  mov    $0x0,%r13d
  jmp    L32
L168:
  movslq 0x8(%rsp),%rcx
  mov    0x18(%rbx),%rdi
  movsbl (%rdi,%rcx,1),%r14d
  add    $0xa,%r14d
  mov    (%rbx),%rdi
  movsbl (%rdi,%rcx,1),%edi
  sub    %edi,%r14d
  mov    0x10(%rbx),%rdi
  movsbl (%rdi,%rcx,1),%ecx
  sub    %ecx,%r14d
  add    $0x30,%r14d
  mov    %eax,%r13d
  jmp    L274
L84:
  movslq 0x8(%rsp),%rax
  mov    0x18(%rbx),%rcx
  movsbl (%rcx,%rax,1),%r14d
  mov    (%rbx),%rcx
  movsbl (%rcx,%rax,1),%ecx
  sub    %ecx,%r14d
  mov    0x8(%rbx),%rcx
  movsbl (%rcx,%rax,1),%eax
  sub    %eax,%r14d
  add    $0x30,%r14d
  cmp    $0x3,%edx
  sete   %al
  jmp    L207
L206:
  movslq 0x8(%rsp),%rax
  mov    0x18(%rbx),%rsi
  movsbl (%rsi,%rax,1),%r14d
  add    $0xa,%r14d
  mov    (%rbx),%rsi
  movsbl (%rsi,%rax,1),%esi
  sub    %esi,%r14d
  mov    0x8(%rbx),%rsi
  movsbl (%rsi,%rax,1),%eax
  sub    %eax,%r14d
  add    $0x30,%r14d
  cmp    $0x3,%edx
  sete   %al
  mov    %ecx,%r13d
  jmp    L207
L144:
  movslq 0x8(%rsp),%rcx
  mov    (%rbx),%rax
  movsbl (%rax,%rcx,1),%eax
  mov    0x8(%rbx),%rsi
  movsbl (%rsi,%rcx,1),%esi
  add    %esi,%eax
  mov    0x10(%rbx),%rsi
  movsbl (%rsi,%rcx,1),%ecx
  add    %ecx,%eax
  lea    -0x90(%rax),%r14d
  sub    $0x91,%eax
  cmp    $0x8,%eax
  jbe    L217
  add    $0x1,%r15d
  jmp    L327
L298:
  movslq 0x8(%rsp),%rsi
  mov    (%rbx),%rcx
  movsbl (%rcx,%rsi,1),%ecx
  mov    0x8(%rbx),%rdi
  movsbl (%rdi,%rsi,1),%edi
  add    %edi,%ecx
  mov    0x10(%rbx),%rdi
  movsbl (%rdi,%rsi,1),%esi
  lea    -0x90(%rcx,%rsi,1),%esi
  movslq %esi,%r14
  imul   $0x66666667,%r14,%r14
  sar    $0x22,%r14
  mov    %esi,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%r14d
  lea    (%r14,%r14,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%esi
  mov    %esi,%r14d
  lea    -0x1(%rsi),%ecx
  cmp    $0x8,%ecx
  jbe    L309
  mov    $0x0,%eax
  jmp    L41
L140:
  mov    %eax,%r13d
L184:
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  je     L41
  mov    (%rsp),%rcx
  movl   $0x1,(%rcx)
  movslq %edx,%rdx
  cltq
  mov    (%rbx,%rdx,8),%rdx
  lea    0x30(%r14),%ecx
  mov    %cl,(%rdx,%rax,1)
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jle    L166
  cltq
  mov    (%rbx),%rdx
  movb   $0x31,-0x1(%rdx,%rax,1)
  jmp    L166
L165:
  mov    $0x1,%r13d
  jmp    L64
L374:
  add    $0x1,%r13
  cmp    $0xa,%r13
  je     L219
L64:
  cmpl   $0x0,0x0(%rbp,%r13,4)
  jne    L374
  movl   $0x1,0x0(%rbp,%r13,4)
  movslq 0xc(%rsp),%rdx
  movslq 0x8(%rsp),%rax
  mov    (%rbx,%rdx,8),%rdx
  lea    0x30(%r13),%ecx
  mov    %cl,(%rdx,%rax,1)
  mov    %rbp,%r8
  mov    %r12d,%ecx
  mov    0x8(%rsp),%edx
  mov    0xc(%rsp),%esi
  mov    %rbx,%rdi
  call   <aggiungi>
  cmp    $0x1,%eax
  je     L41
  movl   $0x0,0x0(%rbp,%r13,4)
  movslq 0xc(%rsp),%rdx
  movslq 0x8(%rsp),%rax
  mov    (%rbx,%rdx,8),%rdx
  movb   $0x5f,(%rdx,%rax,1)
  jmp    L374
L219:
  mov    $0x0,%eax
  jmp    L41
L393:
  mov    $0x0,%eax
  jmp    L41
L309:
  movslq %esi,%rcx
  lea    0x0(%rbp,%rcx,4),%rcx
  mov    %rcx,(%rsp)
  cmpl   $0x0,(%rcx)
  je     L140
L310:
  add    $0x1,%r15d
  cmp    $0x2,%r15d
  je     L393
L327:
  mov    0xc(%rsp),%edx
  test   %r15d,%r15d
  sete   %sil
  cmp    $0x1,%edx
  sete   %al
  test   %sil,%sil
  je     L253
  test   %al,%al
  jne    L181
L253:
  cmp    $0x1,%r15d
  sete   %r13b
  and    %r13b,%al
  jne    L168
  cmp    $0x2,%edx
  sete   %al
  test   %sil,%sil
  je     L32
  test   %al,%al
  jne    L84
L32:
  and    %r13b,%al
  mov    %eax,%ecx
  jne    L206
L274:
  cmp    $0x3,%edx
  sete   %al
  test   %sil,%sil
  je     L207
  test   %al,%al
  jne    L144
L207:
  and    %r13b,%al
  jne    L298
  lea    -0x1(%r14),%eax
  cmp    $0x8,%eax
  ja     L310
L217:
  movslq %r14d,%rax
  lea    0x0(%rbp,%rax,4),%rax
  mov    %rax,(%rsp)
  cmpl   $0x0,(%rax)
  jne    L310
  test   %r13b,%r13b
  jne    L184
  mov    (%rsp),%rax
  movl   $0x1,(%rax)
  movslq %edx,%rdx
  movslq 0x8(%rsp),%rax
  mov    (%rbx,%rdx,8),%rdx
  lea    0x30(%r14),%ecx
  mov    %cl,(%rdx,%rax,1)
L166:
  mov    %rbp,%r8
  mov    %r12d,%ecx
  mov    0x8(%rsp),%edx
  mov    0xc(%rsp),%esi
  mov    %rbx,%rdi
  call   <aggiungi>
  cmp    $0x1,%eax
  je     L41
  mov    (%rsp),%rax
  movl   $0x0,(%rax)
  movslq 0xc(%rsp),%rdx
  movslq 0x8(%rsp),%rax
  mov    (%rbx,%rdx,8),%rdx
  movb   $0x5f,(%rdx,%rax,1)
  test   %r13b,%r13b
  je     L310
  movslq 0x8(%rsp),%rax
  mov    (%rbx),%rdx
  movb   $0x30,-0x1(%rdx,%rax,1)
  mov    $0x0,%eax
  jmp    L41
```

assistant: ```c
int aggiungi(char **m, int r, int c, int n, int *preso) {
  while (c >= 0 && m[r][c] != '_')
    sposta(&r, &c);
  if (c < 0) {
    if (verifica_somma(m, n))
      return 1;
    return 0;
  }
  if (ultimo(m, c)) {
    int i, x;
    for (i = 0; i < 2; i++) {
      if (r == 1 && i == 0)
        x = m[3][c] - m[0][c] - m[2][c] + '0';
      if (r == 1 && i == 1)
        x = 10 + m[3][c] - m[0][c] - m[2][c] + '0';
      if (r == 2 && i == 0)
        x = m[3][c] - m[0][c] - m[1][c] + '0';
      if (r == 2 && i == 1)
        x = 10 + m[3][c] - m[0][c] - m[1][c] + '0';
      if (r == 3 && i == 0)
        x = m[0][c] + m[1][c] + m[2][c] - 3 * '0';
      if (r == 3 && i == 1)
        x = (m[0][c] + m[1][c] + m[2][c] - 3 * '0') % 10;
      if (x > 0 && x < 10 && !preso[x]) {
        if (i == 1 && c == 0)
          return 0;
        preso[x] = 1;
        m[r][c] = '0' + x;
        if (i == 1 && c > 0)
          m[0][c - 1] = '1';
        if (aggiungi(m, r, c, n, preso) == 1)
          return 1;
        else {
          preso[x] = 0;
          m[r][c] = '_';
          if (i == 1)
            m[0][c - 1] = '0';
        }
      }
    }
    return 0;
  } else {
    int i;
    for (i = 1; i < 10; i++) {
      if (!preso[i]) {
        preso[i] = 1;
        m[r][c] = '0' + i;
        if (aggiungi(m, r, c, n, preso) == 1)
          return 1;
        else {
          preso[i] = 0;
          m[r][c] = '_';
        }
      }
    }
    return 0;
  }
}
```