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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0xc(%rbp)
  movl   $0x1,-0x10(%rbp)
  jmp    L43
L12:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D9(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L38
  movl   $0x1,-0xc(%rbp)
L38:
  addl   $0x1,-0x10(%rbp)
L43:
  mov    -0x10(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L12
L54:
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x14(%rbp),%rax
  mov    %rax,%rsi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  jne    L54
  mov    -0x14(%rbp),%eax
  not    %eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  je     L61
  mov    -0x14(%rbp),%eax
  and    $0x7f,%eax
  lea    -0x1(%rax),%ecx
  mov    -0x14(%rbp),%eax
  sar    $0x7,%eax
  and    $0x7f,%eax
  lea    -0x1(%rax),%edx
  mov    -0x14(%rbp),%eax
  sar    $0xe,%eax
  and    $0x1,%eax
  mov    %eax,%esi
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L62
L61:
  mov    -0x14(%rbp),%eax
  sar    $0x7,%eax
  and    $0x7f,%eax
  lea    -0x1(%rax),%ecx
  mov    -0x14(%rbp),%eax
  and    $0x7f,%eax
  lea    -0x1(%rax),%edx
  mov    -0x14(%rbp),%eax
  sar    $0xe,%eax
  and    $0x1,%eax
  mov    %eax,%esi
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L62:
  mov    -0x14(%rbp),%eax
  and    $0x3ff,%eax
  lea    -0x1(%rax),%ecx
  mov    -0x14(%rbp),%eax
  sar    $0xa,%eax
  and    $0xf,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  sar    $0xe,%eax
  and    $0x1,%eax
  mov    %eax,%esi
  lea    D58(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L54
```

tool_calls: name: extract_symbolic_data
arguments: tag: D9
type_guessed: string
name: extract_symbolic_data
arguments: tag: D30
type_guessed: string
name: extract_symbolic_data
arguments: tag: D15
type_guessed: string
name: extract_symbolic_data
arguments: tag: D42
type_guessed: string
name: extract_symbolic_data
arguments: tag: D58
type_guessed: string

tool: D9: --reverse

tool: D30: Enter an octal code: 

tool: D15: %o

tool: D42: Index=%d CODE1=%03o CODE2=%03o


tool: D58: Index=%d CODE=%02o VALUE=%04o


assistant: ```c
int main(int argc, char *argv[]) {
  int i, Code, Reverse = 0;
  for (i = 1; i < argc; i++) {
    if (!strcmp(argv[i], "--reverse"))
      Reverse = 1;
  }
  while (1) {
    printf("Enter an octal code: ");
    if (scanf("%o", &Code) == 1) {
      Code = ~Code;
      if (Reverse) {
        printf("Index=%d CODE1=%03o CODE2=%03o\n", 1 & (Code >> 14), (127 & (Code >> 7)) - 1, (127 & (Code)) - 1);
      } else {
        printf("Index=%d CODE1=%03o CODE2=%03o\n", 1 & (Code >> 14), (127 & (Code)) - 1, (127 & (Code >> 7)) - 1);
      }
      printf("Index=%d CODE=%02o VALUE=%04o\n", 1 & (Code >> 14), (15 & (Code >> 10)), (0x3FF & Code) - 1);
    }
  }
}
```