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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x40(%rbp)
  movq   $0x0,-0x38(%rbp)
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  movl   $0x0,-0x58(%rbp)
  jmp    L12
L64:
  mov    -0x58(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  cmp    $0xa,%eax
  je     L158
  mov    -0x58(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  lea    -0x30(%rax),%edx
  mov    -0x58(%rbp),%eax
  cltq
  mov    %edx,-0x40(%rbp,%rax,4)
  addl   $0x1,-0x58(%rbp)
L12:
  cmpl   $0x9,-0x58(%rbp)
  jg     L36
  lea    -0x40(%rbp),%rdx
  mov    -0x58(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  test   %rax,%rax
  jg     L64
  jmp    L36
L158:
  nop
L36:
  mov    -0x58(%rbp),%eax
  cltq
  movl   $0x0,-0x40(%rbp,%rax,4)
  movb   $0x0,-0x5d(%rbp)
  movl   $0x0,-0x5c(%rbp)
  lea    -0x5c(%rbp),%rax
  mov    %rax,%rsi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movq   $0x0,-0x48(%rbp)
  movl   $0x0,-0x54(%rbp)
  jmp    L146
L37:
  movq   $0x0,-0x48(%rbp)
  mov    -0x40(%rbp),%eax
  cltq
  mov    %rax,-0x48(%rbp)
  movl   $0x1,-0x50(%rbp)
  jmp    L170
L125:
  mov    -0x50(%rbp),%eax
  sub    $0x1,%eax
  mov    -0x54(%rbp),%edx
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L116
  mov    -0x50(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  cltq
  add    %rax,-0x48(%rbp)
  jmp    L31
L116:
  mov    -0x50(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  cltq
  sub    %rax,-0x48(%rbp)
L31:
  addl   $0x1,-0x50(%rbp)
L170:
  mov    -0x58(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jg     L125
  mov    -0x5c(%rbp),%eax
  cltq
  cmp    %rax,-0x48(%rbp)
  jne    L166
  movb   $0x1,-0x5d(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L126
L172:
  mov    -0x4c(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x4c(%rbp),%eax
  mov    -0x54(%rbp),%edx
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L66
  mov    -0x58(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x4c(%rbp)
  jge    L66
  mov    $0x2b,%edi
  call   <putchar@plt>
  jmp    L144
L66:
  mov    $0x2d,%edi
  call   <putchar@plt>
L144:
  addl   $0x1,-0x4c(%rbp)
L126:
  mov    -0x4c(%rbp),%eax
  cmp    -0x58(%rbp),%eax
  jl     L172
  mov    -0x5c(%rbp),%eax
  mov    %eax,%esi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L166:
  addl   $0x1,-0x54(%rbp)
L146:
  mov    -0x54(%rbp),%eax
  movslq %eax,%rbx
  mov    -0x58(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%esi
  mov    $0x2,%edi
  call   <powl@plt>
  cmp    %rax,%rbx
  jle    L37
  cmpb   $0x0,-0x5d(%rbp)
  jne    L34
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L34:
  mov    $0x0,%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L100
  call   <__stack_chk_fail@plt>
L100:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D39
type_infered: string
name: parse_data
arguments: label: D27
type_infered: string
name: parse_data
arguments: label: D21
type_infered: string
name: parse_data
arguments: label: D49
type_infered: string

tool: D39: %c

tool: D27: %d

tool: D21: =%d


tool: D49: -1

assistant: ```c
int main() {
  int a[10] = {0};
  int i;
  for (i = 0; i < 10 && scanf("%c", (char *)&a[i]) > 0; ++i) {
    if (a[i] == 10)
      break;
    else {
      a[i] = a[i] - '0';
    }
  }
  a[i] = 0;
  char ima = 0;
  int rez = 0;
  scanf("%d", &rez);
  long sum = 0;
  for (int j = 0; j <= (long int)powl(2, i - 1); ++j) {
    sum = 0;
    sum = a[0];
    for (int k = 1; k <= i - 1; ++k) {
      if (((j >> (k - 1)) & 1)) {
        sum = sum + a[k];
      } else {
        sum = sum - a[k];
      }
    }
    if ((long int)rez == sum) {
      ima = 1;
      for (int k = 0; k < i; ++k) {
        printf("%d", a[k]);
        if (((j >> k) & 1) && k < i - 1) {
          printf("+");
        } else {
          printf("-");
        }
      }
      printf("\b=%d\n", rez);
    }
  }
  if (ima == 0)
    printf("-1\n");
  return 0;
}
```