user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4000(%rsp),%r11
L50:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L50
  sub    $0x848,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x4838(%rsp)
  xor    %eax,%eax
  lea    0x482d(%rsp),%rbx
  mov    %rbx,%rsi
  lea    D46(%rip),%rdi
  call   <scanf@plt>
  lea    0x1c(%rsp),%rsi
  lea    D22(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jle    L101
  mov    %eax,%esi
  mov    $0x0,%eax
  mov    %rbx,%rcx
L20:
  movsbl (%rax,%rcx,1),%edx
  sub    $0x30,%edx
  mov    %edx,0x20(%rsp,%rax,4)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L20
L101:
  cmp    $0x1,%r12d
  jle    L126
  lea    -0x1(%r12),%ebp
  mov    $0x0,%r13d
  mov    $0x0,%ebx
L182:
  mov    %ebx,%esi
  mov    $0x2,%edi
  call   <pow@plt>
  add    %eax,%r13d
  add    $0x1,%ebx
  cmp    %ebp,%ebx
  jne    L182
  test   %r13d,%r13d
  js     L145
L89:
  lea    0x50(%rsp),%rbp
  mov    %rbp,%rdi
  mov    $0x0,%r8d
  lea    -0x2(%r12),%r9d
L121:
  test   %r9d,%r9d
  js     L184
  movslq %r9d,%rcx
  mov    %r8d,%eax
L63:
  mov    %eax,%esi
  shr    $0x1f,%esi
  lea    (%rax,%rsi,1),%edx
  and    $0x1,%edx
  sub    %esi,%edx
  mov    %eax,%esi
  shr    $0x1f,%esi
  add    %esi,%eax
  sar    %eax
  mov    %edx,(%rdi,%rcx,4)
  sub    $0x1,%rcx
  test   %ecx,%ecx
  jns    L63
L184:
  add    $0x1,%r8d
  add    $0x24,%rdi
  cmp    %r8d,%r13d
  jge    L121
  mov    0x20(%rsp),%r15d
  movl   $0x0,0xc(%rsp)
  mov    $0x0,%r14d
  jmp    L13
L126:
  mov    $0x0,%r13d
  jmp    L89
L105:
  cmpl   $0x0,0xc(%rsp)
  je     L145
L163:
  mov    0x4838(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L130
  mov    $0x0,%eax
  add    $0x4848,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L145:
  lea    D2(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L163
L112:
  addl   $0x1,0xc(%rsp)
  mov    %r15d,%esi
  lea    D22(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L71
L158:
  cmp    0x1c(%rsp),%r15d
  je     L112
L169:
  add    $0x1,%r14d
  add    $0x24,%rbp
  cmp    %r14d,%r13d
  jl     L105
L13:
  mov    %r15d,%edi
  mov    $0x1,%ebx
  mov    %rbp,(%rsp)
  cmp    $0x1,%r12d
  jle    L158
L4:
  mov    -0x4(%rbp,%rbx,4),%edx
  mov    0x20(%rsp,%rbx,4),%esi
  call   <calculation@plt>
  mov    %eax,%edi
  add    $0x1,%rbx
  cmp    %ebx,%r12d
  jg     L4
  cmp    %eax,0x1c(%rsp)
  jne    L169
  addl   $0x1,0xc(%rsp)
  mov    %r15d,%esi
  lea    D22(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%ebx
L187:
  mov    (%rsp),%rax
  cmpl   $0x1,-0x4(%rax,%rbx,4)
  setne  %dil
  lea    0x2b(%rdi,%rdi,1),%edi
  movsbl %dil,%edi
  call   <putchar@plt>
  mov    0x20(%rsp,%rbx,4),%esi
  lea    D22(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %ebx,%r12d
  jg     L187
L71:
  mov    0x1c(%rsp),%esi
  lea    D49(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L169
L130:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D46
datatype: string
name: read_data
arguments: label: D22
datatype: string
name: read_data
arguments: label: D2
datatype: string
name: read_data
arguments: label: D49
datatype: string

tool: D46: %s

tool: D22: %d

tool: D2: -1

tool: D49: =%d


assistant: ```c
int main() {
  char nums[11];
  int a[11];
  int pp[511][9];
  int n, l = 0, i, sum = 0, j, k = 0, max = 0, current, elem, found = 0;
  char oper;
  scanf("%s", nums);
  scanf("%d", &n);
  l = strlen(nums);
  for (i = 0; i < l; i++) {
    a[i] = nums[i] - '0';
  }
  for (i = 0; i < l - 1; i++) {
    max = max + pow(2, i);
  }
  for (i = 0; i <= max; i++) {
    current = i;
    for (j = l - 2; j >= 0; j--) {
      elem = current % 2;
      current = current / 2;
      pp[i][j] = elem;
    }
  }
  sum = a[0];
  for (i = 0; i <= max; i++) {
    for (k = 1; k < l; k++) {
      sum = calculation(sum, a[k], pp[i][k - 1]);
    }
    if (sum == n) {
      found++;
      printf("%d", a[0]);
      for (k = 1; k < l; k++) {
        if (pp[i][k - 1] == 1) {
          oper = '+';
        } else {
          oper = '-';
        }
        printf("%c", oper);
        printf("%d", a[k]);
      }
      printf("=%d\n", n);
    }
    sum = a[0];
  }
  if (found == 0) {
    printf("-1");
  }
  return 0;
}
```