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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    $0x2e,%esi
  mov    $0xf0,%edi
  call   <gcd@plt>
  mov    %eax,%ecx
  mov    $0x2e,%edx
  mov    $0xf0,%esi
  lea    D31(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%r14d
  mov    $0x2e,%ebp
  mov    $0xf0,%eax
  mov    $0x1,%r13d
  movl   $0x0,0xc(%rsp)
  mov    $0x0,%ebx
  movl   $0x1,0x10(%rsp)
  jmp    L1
L47:
  mov    %r12d,%ebp
  mov    %r15d,%r13d
  mov    %edx,0xc(%rsp)
  mov    0x14(%rsp),%edi
  mov    %edi,0x10(%rsp)
L1:
  cltd
  idiv   %ebp
  mov    %edx,%r12d
  mov    %ebx,%ecx
  imul   %eax,%ecx
  mov    %ecx,0x1c(%rsp)
  mov    %ebx,0x14(%rsp)
  mov    0x10(%rsp),%ebx
  sub    %ecx,%ebx
  mov    %r13d,%esi
  imul   %eax,%esi
  mov    %esi,0x18(%rsp)
  mov    0xc(%rsp),%r15d
  sub    %esi,%r15d
  add    $0x1,%r14d
  mov    %r15d,%r9d
  mov    %ebx,%r8d
  mov    %edx,%ecx
  mov    %eax,%edx
  mov    %r14d,%esi
  lea    D58(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r13d,%edx
  mov    %ebp,%eax
  test   %r12d,%r12d
  jne    L47
  mov    %ebp,%r9d
  mov    %r13d,%r8d
  mov    $0x2e,%ecx
  mov    0x14(%rsp),%edx
  mov    $0xf0,%esi
  lea    D1(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x2e,%edx
  mov    $0xf0,%esi
  lea    D11(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %ebx,%ebx
  je     L4
  cmp    $0x1,%ebx
  je     L29
  test   %ebx,%ebx
  jle    L33
  mov    0x18(%rsp),%esi
  sub    0xc(%rsp),%esi
  mov    %ebx,%edx
  lea    D53(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L7
L4:
  lea    D10(%rip),%rdi
  call   <puts@plt>
L7:
  mov    $0x0,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L29:
  mov    0x18(%rsp),%esi
  sub    0xc(%rsp),%esi
  lea    D64(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L7
L33:
  mov    0x1c(%rsp),%edx
  sub    0x10(%rsp),%edx
  mov    %r15d,%esi
  lea    D53(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L7
```

tool_calls: name: unpack_data
arguments: data_label: D31
type: string
name: unpack_data
arguments: data_label: D58
type: string
name: unpack_data
arguments: data_label: D1
type: string
name: unpack_data
arguments: data_label: D11
type: string
name: unpack_data
arguments: data_label: D53
type: string
name: unpack_data
arguments: data_label: D10
type: string
name: unpack_data
arguments: data_label: D64
type: string

tool: D31: %dx+%dy=%d


tool: D58: %d: %d,%d,%d,%d


tool: D1: %d*%d+%d*%d=%d


tool: D11: %d/%d=

tool: D53: %d/%d


tool: D10: Division by zero

tool: D64: %d


assistant: ```c
int main() {
  int a = 240, b = 46;
  int s0 = 1, s1 = 0;
  int t0 = 0, t1 = 1;
  int r0 = a, r1 = b;
  printf("%dx+%dy=%d\n", a, b, gcd(a, b));
  int i = 0;
  while (1) {
    int q1 = r0 / r1;
    int r2 = r0 - q1 * r1;
    int s2 = s0 - q1 * s1;
    int t2 = t0 - q1 * t1;
    i++;
    printf("%d: %d,%d,%d,%d\n", i, q1, r2, s2, t2);
    r0 = r1, r1 = r2;
    s0 = s1, s1 = s2;
    t0 = t1, t1 = t2;
    if (r1 == 0) {
      printf("%d*%d+%d*%d=%d\n", a, s0, b, t0, r0);
      break;
    }
  }
  printf("%d/%d=", a, b);
  int s = s1;
  int t = t1;
  if (s == 0)
    printf("Division by zero\n");
  else if (s == 1)
    printf("%d\n", -t);
  else if (s > 0)
    printf("%d/%d\n", -t, s);
  else
    printf("%d/%d\n", t, -s);
  return 0;
}
```