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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  cmpl   $0x2,-0x14(%rbp)
  je     L32
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L66
L32:
  movl   $0x0,-0x10(%rbp)
  mov    -0x20(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L186
L15:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L177
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L177
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L177
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5f,%al
  je     L177
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  je     L177
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L66
L177:
  addl   $0x1,-0x10(%rbp)
L186:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L15
  movl   $0x0,-0xc(%rbp)
  subl   $0x1,-0x10(%rbp)
  jmp    L49
L226:
  mov    -0xc(%rbp),%eax
  test   %eax,%eax
  jns    L189
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xfffffffe,%eax
  jmp    L66
L189:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L142
  shll   -0xc(%rbp)
  xorl   $0x1,-0xc(%rbp)
  jmp    L150
L142:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L76
  shll   -0xc(%rbp)
  xorl   $0x1,-0xc(%rbp)
  shll   -0xc(%rbp)
  xorl   $0x1,-0xc(%rbp)
  jmp    L150
L76:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L150
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5f,%al
  jne    L220
  shll   -0xc(%rbp)
  xorl   $0x1,-0xc(%rbp)
  shll   -0xc(%rbp)
  xorl   $0x1,-0xc(%rbp)
  shll   -0xc(%rbp)
  xorl   $0x1,-0xc(%rbp)
  shll   -0xc(%rbp)
  xorl   $0x1,-0xc(%rbp)
  jmp    L150
L220:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  jne    L150
  shll   -0xc(%rbp)
  xorl   $0x1,-0xc(%rbp)
  shll   -0xc(%rbp)
  xorl   $0x1,-0xc(%rbp)
  shll   -0xc(%rbp)
  xorl   $0x1,-0xc(%rbp)
  shll   -0xc(%rbp)
  xorl   $0x1,-0xc(%rbp)
  shll   -0xc(%rbp)
  xorl   $0x1,-0xc(%rbp)
L150:
  cmpl   $0x0,-0x10(%rbp)
  je     L70
  shll   -0xc(%rbp)
L70:
  subl   $0x1,-0x10(%rbp)
L49:
  cmpl   $0x0,-0x10(%rbp)
  jns    L226
  mov    -0xc(%rbp),%eax
  mov    %eax,%esi
  lea    D48(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
L66:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D4
type_infered: string
name: unpack_data
arguments: data_label: D49
type_infered: string
name: unpack_data
arguments: data_label: D47
type_infered: string
name: unpack_data
arguments: data_label: D56
type_infered: string
name: unpack_data
arguments: data_label: D14
type_infered: string
name: unpack_data
arguments: data_label: D48
type_infered: string

tool: D4: argc = %d


tool: D49: Invalid arg. Enter a dot-dash pattern

tool: D47: found character '%c'


tool: D56: Pattern must only include . - _ = or ' '.

tool: D14: Pattern too long for a single int to hold.

tool: D48: %u


assistant: ```c
int main(int argc, char **argv) {
  if (argc != 2) {
    printf("argc = %d\n", argc);
    printf("Invalid arg. Enter a dot-dash pattern\n");
    return -1;
  }
  int i = 0;
  char *pattern = argv[1];
  while (pattern[i] != '\0') {
    if (pattern[i] != '.' && pattern[i] != '-' && pattern[i] != ' ' && pattern[i] != '_' && pattern[i] != '=') {
      printf("found character '%c'\n", pattern[i]);
      printf("Pattern must only include . - _ = or ' '.\n");
      return -1;
    }
    i++;
  }
  unsigned int num = 0;
  for (--i; i >= 0; i--) {
    if (num & 0x80000000) {
      printf("Pattern too long for a single int to hold.\n");
      return -2;
    }
    if (pattern[i] == '.') {
      num <<= 1;
      num ^= 0b1;
    } else if (pattern[i] == '-') {
      num <<= 1;
      num ^= 0b1;
      num <<= 1;
      num ^= 0b1;
    } else if (pattern[i] == ' ') {
    } else if (pattern[i] == '_') {
      num <<= 1;
      num ^= 0b1;
      num <<= 1;
      num ^= 0b1;
      num <<= 1;
      num ^= 0b1;
      num <<= 1;
      num ^= 0b1;
    } else if (pattern[i] == '=') {
      num <<= 1;
      num ^= 0b1;
      num <<= 1;
      num ^= 0b1;
      num <<= 1;
      num ^= 0b1;
      num <<= 1;
      num ^= 0b1;
      num <<= 1;
      num ^= 0b1;
    }
    if (i != 0) {
      num <<= 1;
    }
  }
  printf("%u\n", num);
  return 0;
}
```