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

```asm
<main>:
  endbr64
  push   %r15
  lea    D6(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%rsi
  call   <scanf@plt>
  mov    0x30(%rsp),%esi
  test   %esi,%esi
  jle    L120
  lea    0x28(%rsp),%rax
  xor    %r12d,%r12d
  lea    0x24(%rsp),%r15
  mov    %rax,0x10(%rsp)
  lea    0x20(%rsp),%rax
  lea    0x36(%rsp),%r13
  mov    %rax,0x8(%rsp)
  lea    0x2c(%rsp),%rax
  lea    0x37(%rsp),%r14
  mov    %rax,0x18(%rsp)
L121:
  push   0x18(%rsp)
  mov    %r13,%rdx
  mov    %r15,%r9
  mov    %r14,%r8
  push   %r13
  lea    D25(%rip),%rdi
  xor    %eax,%eax
  mov    0x20(%rsp),%rcx
  mov    0x18(%rsp),%rsi
  call   <scanf@plt>
  movzbl 0x47(%rsp),%eax
  pop    %rdx
  pop    %rcx
  cmp    $0x2d,%al
  je     L91
  jg     L102
  cmp    $0x2a,%al
  je     L84
  cmp    $0x2b,%al
  jne    L90
  mov    0x2c(%rsp),%ebx
  mov    0x28(%rsp),%eax
  mov    0x20(%rsp),%ebp
  mov    0x24(%rsp),%edx
  imul   %ebx,%ebp
  imul   %eax,%edx
  imul   %eax,%ebx
  add    %edx,%ebp
  nopw   0x0(%rax,%rax,1)
L90:
  mov    %ebx,%r8d
  mov    %ebp,%r9d
  mov    $0x3e8,%ecx
  nopl   0x0(%rax,%rax,1)
L34:
  mov    %r9d,%eax
  cltd
  idiv   %ecx
  mov    %eax,%esi
  test   %edx,%edx
  jne    L54
  mov    %r8d,%eax
  cltd
  idiv   %ecx
  test   %edx,%edx
  cmove  %esi,%r9d
  cmove  %eax,%r8d
L54:
  sub    $0x1,%ecx
  jne    L34
  mov    %r9d,%ecx
  mov    %ebx,%edx
  mov    %ebp,%esi
  add    $0x1,%r12d
  lea    D11(%rip),%rdi
  call   <printf@plt>
  cmp    %r12d,0x30(%rsp)
  jg     L121
L120:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L72
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L102:
  cmp    $0x2f,%al
  jne    L90
  mov    0x20(%rsp),%ebp
  mov    0x24(%rsp),%ebx
  imul   0x2c(%rsp),%ebp
  imul   0x28(%rsp),%ebx
  jmp    L90
L91:
  mov    0x2c(%rsp),%ebx
  mov    0x28(%rsp),%eax
  mov    0x20(%rsp),%ebp
  mov    0x24(%rsp),%edx
  imul   %ebx,%ebp
  imul   %eax,%edx
  imul   %eax,%ebx
  sub    %edx,%ebp
  jmp    L90
L84:
  mov    0x20(%rsp),%ebp
  mov    0x28(%rsp),%ebx
  imul   0x24(%rsp),%ebp
  imul   0x2c(%rsp),%ebx
  jmp    L90
L72:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D6
type_guessed: string
name: parse_data
arguments: tag: D25
type_guessed: string
name: parse_data
arguments: tag: D11
type_guessed: string

tool: D6: %d

tool: D25: %d %c %d %c %d %c %d

tool: D11: %d/%d = %d/%d


assistant: ```c
int main() {
  char a[2];
  int i, j, k, n1, n2, d1, d2;
  int ans[4], loop;
  scanf("%d", &loop);
  for (i = 0; i < loop; i++) {
    scanf("%d %c %d %c %d %c %d", &n1, &a[0], &d1, &a[1], &n2, &a[0], &d2);
    switch (a[1]) {
    case '+':
      ans[0] = (n1 * d2 + n2 * d1);
      ans[1] = (d1 * d2);
      break;
    case '-':
      ans[0] = (n1 * d2 - n2 * d1);
      ans[1] = (d1 * d2);
      break;
    case '*':
      ans[0] = (n1 * n2);
      ans[1] = (d1 * d2);
      break;
    case '/':
      ans[0] = (n1 * d2);
      ans[1] = (n2 * d1);
      break;
    }
    ans[2] = ans[0];
    ans[3] = ans[1];
    for (j = 1000; j > 0; j--) {
      if (ans[2] % j == 0 && ans[3] % j == 0) {
        ans[2] = ans[2] / j;
        ans[3] = ans[3] / j;
      }
    }
    printf("%d/%d = %d/%d\n", ans[0], ans[1], ans[2], ans[3]);
  }
  return 0;
}
```