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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D59(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x40(%rbp),%rax
  mov    %rax,%rsi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x2c(%rbp),%rdi
  lea    -0x30(%rbp),%rsi
  lea    -0x34(%rbp),%rcx
  lea    -0x38(%rbp),%rdx
  lea    -0x3c(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x18(%rbp),%rdi
  lea    -0x1c(%rbp),%rsi
  lea    -0x20(%rbp),%rcx
  lea    -0x24(%rbp),%rdx
  lea    -0x28(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x40(%rbp),%edx
  mov    -0x38(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x3c(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  lea    -0x1(%rax),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  add    %eax,%eax
  mov    %edx,%ecx
  sub    %eax,%ecx
  mov    $0x9,%eax
  sub    %ecx,%eax
  mov    %eax,%esi
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L2
  call   <__stack_chk_fail@plt>
L2:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D59
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D2
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D32
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D10
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D60
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D44
type_guessed: string

tool: D59: Enter first (single) digit: 

tool: D2: %1d

tool: D32: Enter first group of five digits: 

tool: D10: %1d%1d%1d%1d%1d

tool: D60: Enter second group of five digits: 

tool: D44: Check digit: %d


assistant: ```c
int main(void) {
  int d, i1, i2, i3, i4, i5, j1, j2, j3, j4, j5, first_sum, second_sum, total;
  printf("Enter first (single) digit: ");
  scanf("%1d", &d);
  printf("Enter first group of five digits: ");
  scanf("%1d%1d%1d%1d%1d", &i1, &i2, &i3, &i4, &i5);
  printf("Enter second group of five digits: ");
  scanf("%1d%1d%1d%1d%1d", &j1, &j2, &j3, &j4, &j5);
  first_sum = d + i2 + i4 + j1 + j3 + j5;
  second_sum = i1 + i3 + i5 + j2 + j4;
  total = (3 * first_sum) + second_sum;
  printf("Check digit: %d\n", 9 - ((total - 1) % 10));
  return 0;
}
```