user: What would the C source look like for the assembly code provided here?

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x678,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x668(%rsp)
  xor    %eax,%eax
  lea    0x14(%rsp),%rax
  mov    %rax,0x8(%rsp)
  jmp    L135
L12:
  cmp    $0x3,%eax
  jne    L38
  movslq 0x18(%rsp),%rax
  mov    0x20(%rsp,%rax,8),%edx
  mov    %edx,(%rbx)
  mov    0x24(%rsp,%rax,8),%eax
  add    $0x1,%eax
  mov    %eax,0x4(%rbx)
  jmp    L38
L129:
  movslq 0x18(%rsp),%rdx
  mov    0x20(%rsp,%rdx,8),%eax
  sub    $0x1,%eax
  mov    %eax,(%rbx)
  mov    0x24(%rsp,%rdx,8),%eax
  mov    %eax,0x4(%rbx)
L38:
  mov    (%rbx),%edx
  cmp    %edx,%ebp
  cmovl  %edx,%ebp
  mov    0x4(%rbx),%eax
  cmp    %eax,%r12d
  cmovl  %eax,%r12d
  cmp    %edx,%r13d
  cmovg  %edx,%r13d
  cmp    %eax,%r14d
  cmovg  %eax,%r14d
  add    $0x1,%r15d
  add    $0x8,%rbx
  cmp    %r15d,0x14(%rsp)
  jle    L101
L103:
  lea    0x1c(%rsp),%rdx
  lea    0x18(%rsp),%rsi
  lea    D17(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  cmp    $0x2,%eax
  je     L83
  jg     L12
  test   %eax,%eax
  je     L129
  cmp    $0x1,%eax
  jne    L38
  movslq 0x18(%rsp),%rax
  mov    0x20(%rsp,%rax,8),%edx
  mov    %edx,(%rbx)
  mov    0x24(%rsp,%rax,8),%eax
  sub    $0x1,%eax
  mov    %eax,0x4(%rbx)
  jmp    L38
L83:
  movslq 0x18(%rsp),%rdx
  mov    0x20(%rsp,%rdx,8),%eax
  add    $0x1,%eax
  mov    %eax,(%rbx)
  mov    0x24(%rsp,%rdx,8),%eax
  mov    %eax,0x4(%rbx)
  jmp    L38
L93:
  mov    $0x0,%r14d
  mov    $0x0,%r12d
  mov    $0x0,%r13d
  mov    $0x0,%ebp
L101:
  sub    %r14d,%r12d
  lea    0x1(%r12),%edx
  sub    %r13d,%ebp
  lea    0x1(%rbp),%esi
  lea    D2(%rip),%rdi
  call   <printf@plt>
L135:
  mov    0x8(%rsp),%rsi
  lea    D18(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  je     L43
  movl   $0x0,0x20(%rsp)
  movl   $0x0,0x24(%rsp)
  cmp    $0x1,%eax
  jle    L93
  lea    0x28(%rsp),%rbx
  mov    $0x0,%r14d
  mov    $0x0,%r12d
  mov    $0x0,%r13d
  mov    $0x0,%ebp
  mov    $0x1,%r15d
  jmp    L103
L43:
  mov    0x668(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L123
  mov    $0x0,%eax
  add    $0x678,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L123:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D17
datatype: string
name: extract_symbolic_data
arguments: data_label: D2
datatype: string
name: extract_symbolic_data
arguments: data_label: D18
datatype: string

tool: D17: %d %d

tool: D2: %d %d


tool: D18: %d

assistant: ```c
int main(void) {
  int num, product[200][2], i, n, d, X, x, Y, y;
  while (1) {
    scanf("%d", &num);
    if (num == 0)
      break;
    product[0][0] = 0, product[0][1] = 0, X = 0, x = 0, Y = 0, y = 0;
    for (i = 1; i <= num - 1; i++) {
      scanf("%d %d", &n, &d);
      switch (d) {
      case 0:
        product[i][0] = product[n][0] - 1;
        product[i][1] = product[n][1];
        break;
      case 1:
        product[i][0] = product[n][0];
        product[i][1] = product[n][1] - 1;
        break;
      case 2:
        product[i][0] = product[n][0] + 1;
        product[i][1] = product[n][1];
        break;
      case 3:
        product[i][0] = product[n][0];
        product[i][1] = product[n][1] + 1;
        break;
      }
      if (product[i][0] > X)
        X = product[i][0];
      if (product[i][1] > Y)
        Y = product[i][1];
      if (product[i][0] < x)
        x = product[i][0];
      if (product[i][1] < y)
        y = product[i][1];
    }
    printf("%d %d\n", X - x + 1, Y - y + 1);
  }
  return 0;
}
```