user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x308,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x300(%rbp)
  movl   $0x0,-0x2fc(%rbp)
  movl   $0x0,-0x2f8(%rbp)
  mov    $0x2bc,%edi
  call   <malloc@plt>
  mov    %rax,-0x2f0(%rbp)
  mov    $0x2bc,%edi
  call   <malloc@plt>
  mov    %rax,-0x2e8(%rbp)
  movl   $0x0,-0x304(%rbp)
  jmp    L84
L286:
  mov    -0x304(%rbp),%eax
  cltq
  movb   $0x30,-0x2e0(%rbp,%rax,1)
  addl   $0x1,-0x304(%rbp)
L84:
  mov    -0x304(%rbp),%eax
  cmp    $0x2bb,%eax
  jbe    L286
  mov    -0x2e8(%rbp),%rdx
  mov    -0x2f0(%rbp),%rax
  mov    %rax,%rsi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x2f0(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L302
  movl   $0x1,-0x2fc(%rbp)
  addq   $0x1,-0x2f0(%rbp)
L302:
  mov    -0x2e8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L294
  movl   $0x1,-0x2f8(%rbp)
  addq   $0x1,-0x2e8(%rbp)
L294:
  mov    -0x2f0(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x2f0(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <resort@plt>
  mov    -0x2e8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x2e8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <resort@plt>
  mov    -0x2e8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    -0x2f0(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %ebx,%esi
  mov    %eax,%edi
  call   <max@plt>
  mov    %eax,-0x2f4(%rbp)
  movl   $0x0,-0x304(%rbp)
  jmp    L264
L194:
  mov    -0x2f0(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x304(%rbp)
  jge    L336
  mov    -0x2fc(%rbp),%eax
  cmp    -0x2f8(%rbp),%eax
  je     L106
  cmpl   $0x0,-0x2fc(%rbp)
  je     L106
  mov    -0x304(%rbp),%eax
  cltq
  movzbl -0x2e0(%rbp,%rax,1),%eax
  mov    %eax,%ecx
  mov    -0x304(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x2f0(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %eax,%edx
  mov    %ecx,%eax
  sub    %edx,%eax
  add    $0x30,%eax
  mov    %eax,%edx
  mov    -0x304(%rbp),%eax
  cltq
  mov    %dl,-0x2e0(%rbp,%rax,1)
  jmp    L336
L106:
  mov    -0x304(%rbp),%eax
  cltq
  movzbl -0x2e0(%rbp,%rax,1),%eax
  mov    %eax,%ecx
  mov    -0x304(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x2f0(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  add    %ecx,%eax
  sub    $0x30,%eax
  mov    %eax,%edx
  mov    -0x304(%rbp),%eax
  cltq
  mov    %dl,-0x2e0(%rbp,%rax,1)
L336:
  mov    -0x2e8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x304(%rbp)
  jge    L349
  mov    -0x2fc(%rbp),%eax
  cmp    -0x2f8(%rbp),%eax
  je     L213
  cmpl   $0x0,-0x2f8(%rbp)
  je     L213
  mov    -0x304(%rbp),%eax
  cltq
  movzbl -0x2e0(%rbp,%rax,1),%eax
  mov    %eax,%ecx
  mov    -0x304(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x2e8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %eax,%edx
  mov    %ecx,%eax
  sub    %edx,%eax
  add    $0x30,%eax
  mov    %eax,%edx
  mov    -0x304(%rbp),%eax
  cltq
  mov    %dl,-0x2e0(%rbp,%rax,1)
  jmp    L349
L213:
  mov    -0x304(%rbp),%eax
  cltq
  movzbl -0x2e0(%rbp,%rax,1),%eax
  mov    %eax,%ecx
  mov    -0x304(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x2e8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  add    %ecx,%eax
  sub    $0x30,%eax
  mov    %eax,%edx
  mov    -0x304(%rbp),%eax
  cltq
  mov    %dl,-0x2e0(%rbp,%rax,1)
L349:
  mov    -0x304(%rbp),%eax
  cltq
  movzbl -0x2e0(%rbp,%rax,1),%eax
  mov    %eax,%edx
  mov    -0x300(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x304(%rbp),%eax
  cltq
  mov    %dl,-0x2e0(%rbp,%rax,1)
  movl   $0x0,-0x300(%rbp)
  mov    -0x304(%rbp),%eax
  cltq
  movzbl -0x2e0(%rbp,%rax,1),%eax
  cmp    $0x39,%al
  jle    L325
  mov    -0x304(%rbp),%eax
  cltq
  movzbl -0x2e0(%rbp,%rax,1),%eax
  sub    $0xa,%eax
  mov    %eax,%edx
  mov    -0x304(%rbp),%eax
  cltq
  mov    %dl,-0x2e0(%rbp,%rax,1)
  movl   $0x1,-0x300(%rbp)
L325:
  mov    -0x304(%rbp),%eax
  cltq
  movzbl -0x2e0(%rbp,%rax,1),%eax
  cmp    $0x2f,%al
  jg     L134
  mov    -0x304(%rbp),%eax
  cltq
  movzbl -0x2e0(%rbp,%rax,1),%eax
  add    $0xa,%eax
  mov    %eax,%edx
  mov    -0x304(%rbp),%eax
  cltq
  mov    %dl,-0x2e0(%rbp,%rax,1)
  movl   $0xffffffff,-0x300(%rbp)
L134:
  addl   $0x1,-0x304(%rbp)
L264:
  mov    -0x304(%rbp),%eax
  cmp    -0x2f4(%rbp),%eax
  jl     L194
  mov    -0x2f4(%rbp),%eax
  mov    %eax,-0x304(%rbp)
  jmp    L277
L322:
  cmpl   $0x0,-0x300(%rbp)
  je     L138
  subl   $0x1,-0x304(%rbp)
  jmp    L279
L138:
  cmpl   $0x0,-0x304(%rbp)
  jne    L76
  cmpl   $0x0,-0x2fc(%rbp)
  jne    L115
  cmpl   $0x0,-0x2f8(%rbp)
  je     L76
L115:
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L240
L76:
  mov    -0x304(%rbp),%eax
  cltq
  movzbl -0x2e0(%rbp,%rax,1),%eax
  cmp    $0x30,%al
  jne    L51
  subl   $0x1,-0x304(%rbp)
L277:
  cmpl   $0x0,-0x304(%rbp)
  jns    L322
  jmp    L279
L51:
  nop
L279:
  cmpl   $0x0,-0x300(%rbp)
  js     L187
  cmpl   $0x0,-0x2fc(%rbp)
  je     L270
  cmpl   $0x0,-0x2f8(%rbp)
  je     L270
L187:
  mov    $0x2d,%edi
  call   <putchar@plt>
L270:
  cmpl   $0x0,-0x300(%rbp)
  jle    L159
  mov    $0x31,%edi
  call   <putchar@plt>
  jmp    L159
L22:
  cmpl   $0x0,-0x300(%rbp)
  jns    L40
  mov    -0x2fc(%rbp),%eax
  cmp    -0x2f8(%rbp),%eax
  je     L40
  mov    -0x304(%rbp),%eax
  cltq
  movzbl -0x2e0(%rbp,%rax,1),%eax
  mov    %eax,%edx
  mov    $0x69,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0x304(%rbp),%eax
  cltq
  mov    %dl,-0x2e0(%rbp,%rax,1)
L40:
  mov    -0x304(%rbp),%eax
  cltq
  movzbl -0x2e0(%rbp,%rax,1),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  subl   $0x1,-0x304(%rbp)
L159:
  cmpl   $0x0,-0x304(%rbp)
  jns    L22
  mov    -0x2f0(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x2e8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
L240:
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L324
  call   <__stack_chk_fail@plt>
L324:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D18
datatype: string
name: unpack_data
arguments: data_tag: D16
datatype: string

tool: D18: %s%s

tool: D16: 0

assistant: ```c
int main() {
  char *a, *b;
  char c[700];
  int i, mark = 0, a0 = 0, b0 = 0;
  a = (char *)malloc(700 * sizeof(char));
  b = (char *)malloc(700 * sizeof(char));
  for (i = 0; i < sizeof(c); i++)
    c[i] = '0';
  scanf("%s%s", a, b);
  if (a[0] == '-') {
    a0 = 1;
    a++;
  }
  if (b[0] == '-') {
    b0 = 1;
    b++;
  }
  resort(a, strlen(a));
  resort(b, strlen(b));
  int size = max(strlen(a), strlen(b));
  for (i = 0; i < size; i++) {
    if (i < strlen(a)) {
      if (!(a0 == b0) && a0)
        c[i] -= a[i] - '0';
      else
        c[i] += a[i] - '0';
    }
    if (i < strlen(b)) {
      if (!(a0 == b0) && b0)
        c[i] -= b[i] - '0';
      else
        c[i] += b[i] - '0';
    }
    c[i] += mark;
    mark = 0;
    if (c[i] > '9') {
      c[i] -= 10;
      mark = 1;
    }
    if (c[i] < '0') {
      c[i] += 10;
      mark = -1;
    }
  }
  for (i = size; i >= 0; i--) {
    if (mark) {
      i--;
      break;
    }
    if (i == 0 && (a0 || b0)) {
      puts("0");
      return 0;
    }
    if (c[i] != '0')
      break;
  }
  if (mark < 0 || a0 && b0)
    printf("-");
  if (mark > 0)
    printf("1");
  for (; i >= 0; i--) {
    if (mark < 0 && (a0 != b0))
      c[i] = '9' - (c[i] - '0');
    printf("%c", c[i]);
  }
  free(a);
  free(b);
  return 0;
}
```