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

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  cmp    $0x2,%edi
  jne    L29
  mov    0x8(%rsi),%rdx
  movsbl (%rdx),%esi
  test   %sil,%sil
  je     L27
  movabs $0x8000000020006001,%r8
  xor    %eax,%eax
  nopl   (%rax)
L134:
  lea    -0x20(%rsi),%ecx
  movslq %eax,%rdi
  cmp    $0x3f,%cl
  jbe    L6
L147:
  lea    D19(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D57(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%eax
L21:
  add    $0x8,%rsp
  ret
  nopl   (%rax)
L6:
  bt     %rcx,%r8
  jae    L147
  movsbl 0x1(%rdx,%rax,1),%esi
  lea    0x1(%rax),%rcx
  test   %sil,%sil
  je     L12
  mov    %rcx,%rax
  jmp    L134
  nopl   0x0(%rax)
L12:
  add    %rdi,%rdx
  xor    %esi,%esi
  mov    %rdx,%rcx
  sub    %rax,%rcx
  jmp    L22
  nopl   (%rax)
L129:
  sub    $0x1,%rdx
  add    %esi,%esi
  js     L58
L22:
  movzbl (%rdx),%eax
  cmp    $0x2e,%al
  je     L198
  cmp    $0x2d,%al
  je     L175
  cmp    $0x20,%al
  je     L166
  cmp    $0x5f,%al
  je     L112
  mov    %esi,%edi
  shl    $0x5,%edi
  xor    $0x1f,%edi
  cmp    $0x3d,%al
  cmove  %edi,%esi
  nopl   0x0(%rax,%rax,1)
L166:
  cmp    %rcx,%rdx
  jne    L129
L163:
  lea    D40(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  jmp    L21
  nopw   0x0(%rax,%rax,1)
L198:
  lea    0x1(%rsi,%rsi,1),%esi
  jmp    L166
  cs nopw 0x0(%rax,%rax,1)
L175:
  lea    0x3(,%rsi,4),%esi
  jmp    L166
L112:
  shl    $0x4,%esi
  xor    $0xf,%esi
  jmp    L166
L58:
  lea    D39(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffffffe,%eax
  jmp    L21
L27:
  xor    %esi,%esi
  jmp    L163
L29:
  mov    %edi,%esi
  xor    %eax,%eax
  lea    D28(%rip),%rdi
  call   <printf@plt>
  lea    D20(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%eax
  jmp    L21
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D19
type: string
name: extract_symbolic_data
arguments: data_tag: D57
type: string
name: extract_symbolic_data
arguments: data_tag: D40
type: string
name: extract_symbolic_data
arguments: data_tag: D39
type: string
name: extract_symbolic_data
arguments: data_tag: D28
type: string
name: extract_symbolic_data
arguments: data_tag: D20
type: string

tool: D19: found character '%c'


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

tool: D40: %u


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

tool: D28: argc = %d


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

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;
}
```