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    $0xd8,%rsp
  mov    %edi,%ebx
  mov    %rsi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  lea    D100(%rip),%rdi
  call   <puts@plt>
  cmp    $0x1,%ebx
  jle    L1
  mov    0x8(%rbp),%rdi
  lea    D72(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L76
  lea    D56(%rip),%rdi
  call   <puts@plt>
  lea    0x20(%rsp),%rsi
  lea    D40(%rip),%rdi
  call   <scanf@plt>
  mov    0x20(%rsp),%edi
  lea    -0x1(%rdi),%eax
  cmp    $0xfffe,%eax
  ja     L78
  mov    %rsp,%rcx
  lea    0x10(%rsp),%r8
  mov    %edi,%edx
L6:
  mov    %edx,%eax
  shr    %eax
  and    $0x1,%eax
  lea    (%rdx,%rdx,1),%esi
  and    $0x2,%esi
  or     %esi,%eax
  add    %eax,%eax
  mov    %edx,%esi
  shr    $0x2,%esi
  and    $0x1,%esi
  or     %esi,%eax
  add    %eax,%eax
  mov    %edx,%esi
  shr    $0x3,%esi
  and    $0x1,%esi
  or     %esi,%eax
  shr    $0x4,%edx
  mov    %eax,(%rcx)
  add    $0x4,%rcx
  cmp    %rcx,%r8
  jne    L6
  mov    %edx,0x20(%rsp)
  mov    0x4(%rsp),%r9d
  mov    (%rsp),%r8d
  mov    0xc(%rsp),%ecx
  mov    0x8(%rsp),%edx
  mov    %edi,%esi
  lea    D119(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L95
L78:
  lea    D89(%rip),%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L35
L76:
  lea    D1(%rip),%rdi
  call   <puts@plt>
  jmp    L1
L82:
  lea    D89(%rip),%rdi
  call   <puts@plt>
L95:
  mov    $0x0,%eax
L35:
  mov    0xc8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L88
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L83:
  mov    %edx,0x20(%rsp)
  mov    (%rsp),%r13d
  mov    %r13d,%ebp
  not    %ebp
  and    $0xf,%ebp
  mov    0x4(%rsp),%r14d
  mov    %r14d,%r12d
  not    %r12d
  and    $0xf,%r12d
  mov    %r12d,%r9d
  mov    %ebp,%r8d
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    %ebx,%esi
  lea    D119(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x40(%rsp),%r15
  mov    $0x80,%edx
  mov    $0x0,%esi
  mov    %r15,%rdi
  call   <memset@plt>
  sub    $0x8,%rsp
  push   %r12
  mov    %ebp,%r9d
  mov    %r14d,%r8d
  mov    %r13d,%ecx
  mov    %ebx,%edx
  lea    D76(%rip),%rsi
  mov    %r15,%rdi
  call   <sprintf@plt>
  mov    %r15,%rdi
  call   <system@plt>
  add    $0x10,%rsp
L1:
  movl   $0x0,0x20(%rsp)
  movl   $0x0,(%rsp)
  movl   $0x0,0x24(%rsp)
  movl   $0x0,0x4(%rsp)
  movl   $0x0,0x28(%rsp)
  movl   $0x0,0x8(%rsp)
  movl   $0x0,0x2c(%rsp)
  movl   $0x0,0xc(%rsp)
  lea    D0(%rip),%rdi
  call   <puts@plt>
  lea    0x20(%rsp),%rsi
  lea    D40(%rip),%rdi
  call   <scanf@plt>
  mov    0x20(%rsp),%ebx
  lea    -0x1(%rbx),%eax
  cmp    $0xfe,%eax
  ja     L82
  mov    %rsp,%rcx
  lea    0x8(%rsp),%rdi
  mov    %ebx,%edx
L32:
  lea    (%rdx,%rdx,1),%eax
  and    $0x2,%eax
  mov    %edx,%esi
  shr    %esi
  and    $0x1,%esi
  or     %esi,%eax
  add    %eax,%eax
  mov    %edx,%esi
  shr    $0x2,%esi
  and    $0x1,%esi
  or     %esi,%eax
  add    %eax,%eax
  mov    %edx,%esi
  shr    $0x3,%esi
  and    $0x1,%esi
  or     %esi,%eax
  shr    $0x4,%edx
  mov    %eax,(%rcx)
  add    $0x4,%rcx
  cmp    %rcx,%rdi
  jne    L32
  jmp    L83
L88:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D100
datatype: string
name: retrieve_data
arguments: data_tag: D72
datatype: string
name: retrieve_data
arguments: data_tag: D56
datatype: string
name: retrieve_data
arguments: data_tag: D40
datatype: string
name: retrieve_data
arguments: data_tag: D119
datatype: string
name: retrieve_data
arguments: data_tag: D89
datatype: string
name: retrieve_data
arguments: data_tag: D1
datatype: string
name: retrieve_data
arguments: data_tag: D76
datatype: string
name: retrieve_data
arguments: data_tag: D0
datatype: string

tool: D100: 

HELP: input tran -c to enter client code mode!


tool: D72: -c

tool: D56: Please enter your client code(for example 0x1234):

tool: D40: %x

tool: D119: 0x%x ==> 0x%x%x%x%x


tool: D89: ERROR CODE!

tool: D1: Wrong argument!

tool: D76: echo "0x%x --  0x%x%x%x%x " >> key_code 

tool: D0: Please enter your key code(for example 0x56):

assistant: ```c
int main(int argc, char **argv) {
  unsigned int m_val[8];
  unsigned int m_val_tmp;
  unsigned int m_input[8];
  unsigned int m_input_tmp[8];
  int i0 = 0, i1 = 0, i2 = 0;
  printf("\n\nHELP: input tran -c to enter client code mode!\n\n");
  if (argc >= 2) {
    ;
  }
  if (argc >= 2) {
    if (strcmp(argv[1], "-c") == 0) {
      printf("Please enter your client code(for example 0x1234):\n");
      scanf("%x", &m_input);
      if (m_input[0] > 0xFFFF || m_input[0] <= 0) {
        printf("ERROR CODE!\n");
        return -1;
      }
      m_input_tmp[0] = m_input[0];
      while (i0 < 4) {
        m_val[i0] = 0;
        while (i1 < 4) {
          m_val[i0] |= m_input[0] & 0x01;
          if (i1 != 3)
            m_val[i0] <<= 1;
          m_input[0] >>= 1;
          i1++;
        }
        i1 = 0;
        i0++;
      }
      printf("0x%x ==> 0x%x%x%x%x\n", m_input_tmp[0], m_val[2], m_val[3], m_val[0], m_val[1]);
    } else {
      printf("Wrong argument!\n");
      goto KEY_CODE;
    }
  } else {
  KEY_CODE:
    while (1) {
      int i2 = 0;
      char m_out[128];
      while (i2 < 4) {
        m_input[i2] = 0;
        m_input_tmp[i2] = 0;
        m_val[i2] = 0;
        i2++;
      }
      printf("Please enter your key code(for example 0x56):\n");
      scanf("%x", &m_input);
      ;
      if (m_input[0] > 0xff || m_input[0] <= 0) {
        printf("ERROR CODE!\n");
        break;
      }
      m_input_tmp[0] = m_input[0];
      while (i0 < 2) {
        m_val[i0] = 0;
        while (i1 < 4) {
          m_val[i0] |= m_input[0] & 0x01;
          ;
          if (i1 != 3)
            m_val[i0] <<= 1;
          m_input[0] >>= 1;
          i1++;
        }
        i1 = 0;
        i0++;
      }
      i0 = 0;
      m_val[2] = ~m_val[0] & 0x0F;
      m_val[3] = ~m_val[1] & 0x0F;
      printf("0x%x ==> 0x%x%x%x%x\n", m_input_tmp[0], m_val[0], m_val[1], m_val[2], m_val[3]);
      memset(m_out, 0x0, sizeof(m_out));
      sprintf(m_out, "echo \"0x%x --  0x%x%x%x%x \" >> key_code ", m_input_tmp[0], m_val[0], m_val[1], m_val[2], m_val[3]);
      system(m_out);
    }
  }
}
```