user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  sub    $0x30,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  lea    D65(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x28(%rbp),%rax
  mov    %rax,%rsi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x28(%rbp),%eax
  mov    %eax,%esi
  lea    D62(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L50
L71:
  mov    -0x28(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L31
  mov    -0x28(%rbp),%eax
  shr    %eax
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,%esi
  lea    D62(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L50
L31:
  mov    -0x28(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    $0x1,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,%esi
  lea    D62(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L50:
  mov    -0x28(%rbp),%eax
  cmp    $0x1,%eax
  je     L103
  mov    -0x28(%rbp),%eax
  test   %eax,%eax
  jne    L71
L103:
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x28(%rbp),%rax
  mov    %rax,%rsi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0x24(%rbp)
  jmp    L97
L85:
  movl   $0x0,-0x20(%rbp)
  jmp    L82
L21:
  mov    $0x20,%edi
  call   <putchar@plt>
  addl   $0x1,-0x20(%rbp)
L82:
  mov    -0x28(%rbp),%eax
  mov    -0x24(%rbp),%ecx
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  cmp    %eax,%edx
  ja     L21
  movl   $0x1,-0x1c(%rbp)
  jmp    L100
L40:
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <factorial@plt>
  mov    %eax,%ebx
  mov    -0x24(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <factorial@plt>
  mov    %eax,%r12d
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edi
  call   <factorial@plt>
  mov    %r12d,%edx
  imul   %eax,%edx
  mov    %edx,%ecx
  mov    %ebx,%eax
  cltd
  idiv   %ecx
  mov    %eax,%esi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x1c(%rbp)
L100:
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x1c(%rbp)
  jle    L40
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0x24(%rbp)
L97:
  mov    -0x24(%rbp),%edx
  mov    -0x28(%rbp),%eax
  cmp    %eax,%edx
  jb     L85
  mov    $0x0,%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  add    $0x30,%rsp
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D65
data_type: string
name: extract_symbolic_data
arguments: label: D60
data_type: string
name: extract_symbolic_data
arguments: label: D62
data_type: string
name: extract_symbolic_data
arguments: label: D17
data_type: string
name: extract_symbolic_data
arguments: label: D15
data_type: string

tool: D65: Conjetura Collatz: 

tool: D60: %u

tool: D62: %u


tool: D17: Pascal Triangle: 

tool: D15: %d 

assistant: ```c
int main(int argc, char const *argv[]) {
  unsigned int start;
  printf("Conjetura Collatz: ");
  scanf("%u", &start);
  printf("%u\n", start);
  while (start != 1 && start) {
    if (!(start % 2)) {
      start /= 2;
      printf("%u\n", start);
    } else {
      start = start * 3 + 1;
      printf("%u\n", start);
    }
  }
  printf("Pascal Triangle: ");
  scanf("%u", &start);
  for (int i = 0; i < start; i++) {
    for (int j = 0; j < start - i; j++) {
      printf(" ");
    }
    for (int j = 1; j <= i + 1; j++) {
      printf("%d ", factorial(i) / (factorial(i - j + 1) * factorial(j - 1)));
    }
    printf("\n");
  }
  return 0;
}
```