user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  je     L218
  mov    %edi,%ebx
  mov    %rsi,%r12
  lea    0x8(%rsp),%rdi
  mov    $0x300000,%edx
  movq   $0x0,0x10(%rsp)
  mov    $0x10,%esi
  movq   $0x0,0x8(%rsp)
  call   <posix_memalign@plt>
  test   %rax,%rax
  jne    L157
  lea    0x10(%rsp),%rdi
  mov    $0x300000,%edx
  mov    $0x10,%esi
  call   <posix_memalign@plt>
  test   %rax,%rax
  jne    L213
  cmp    $0x2,%ebx
  jg     L2
L66:
  mov    $0x64,%ebp
L95:
  mov    0x8(%r12),%rdi
  lea    D62(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L48
  mov    0x8(%r12),%rsi
  mov    %ebp,%edx
  lea    D68(%rip),%rdi
  xor    %ebx,%ebx
  call   <printf@plt>
  nopl   0x0(%rax,%rax,1)
L215:
  mov    0x10(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  mov    $0xc0000,%edx
  add    $0x1,%ebx
  call   <convert@plt>
  cmp    %ebx,%ebp
  jne    L215
L83:
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  xor    %eax,%eax
L29:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L127
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L157:
  lea    D9(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L29
L218:
  call   <help@plt>
  mov    $0x1,%eax
  jmp    L29
L48:
  mov    0x8(%r12),%rdi
  lea    D40(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L171
  mov    0x8(%r12),%rdi
  lea    D93(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L122
  mov    0x8(%r12),%rsi
  mov    %ebp,%edx
  lea    D68(%rip),%rdi
  xor    %ebx,%ebx
  call   <printf@plt>
L81:
  mov    0x10(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  mov    $0xc0000,%edx
  add    $0x1,%ebx
  call   <sse2_convert@plt>
  cmp    %ebx,%ebp
  jne    L81
  jmp    L83
L213:
  lea    D19(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L29
L171:
  mov    0x8(%r12),%rsi
  mov    %ebp,%edx
  lea    D68(%rip),%rdi
  xor    %ebx,%ebx
  call   <printf@plt>
  nopl   (%rax)
L186:
  mov    0x10(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  mov    $0xc0000,%edx
  add    $0x1,%ebx
  call   <x86_convert@plt>
  cmp    %ebx,%ebp
  jne    L186
  jmp    L83
L2:
  mov    0x10(%r12),%rdi
  call   <atoi@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  jg     L95
  jmp    L66
L122:
  mov    0x8(%r12),%rdi
  lea    D54(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L104
  mov    0x8(%r12),%rsi
  mov    %ebp,%edx
  lea    D68(%rip),%rdi
  xor    %ebx,%ebx
  call   <printf@plt>
L208:
  mov    0x10(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  mov    $0xc0000,%edx
  add    $0x1,%ebx
  call   <sse4_convert@plt>
  cmp    %ebx,%ebp
  jne    L208
  jmp    L83
L104:
  xor    %eax,%eax
  call   <help@plt>
  jmp    L83
L127:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D62
data_type: string
name: parse_data
arguments: label: D68
data_type: string
name: parse_data
arguments: label: D9
data_type: string
name: parse_data
arguments: label: D40
data_type: string
name: parse_data
arguments: label: D93
data_type: string
name: parse_data
arguments: label: D19
data_type: string
name: parse_data
arguments: label: D54
data_type: string

tool: D62: naive

tool: D68: function %s, repeat count %d


tool: D9: can't allocate mem(1)

tool: D40: x86

tool: D93: SSE2

tool: D19: can't allocate mem(2)

tool: D54: SSE4

assistant: ```c
int main(int argc, char *argv[]) {
  int n;
  uint32_t *input;
  uint32_t *output;
  if (argc == 1) {
    help();
    return 1;
  }
  n = 1024 * 768;
  input = output = NULL;
  if (posix_memalign((void *)&input, 16, 4 * n)) {
    puts("can't allocate mem(1)");
    return 1;
  }
  if (posix_memalign((void *)&output, 16, 4 * n)) {
    puts("can't allocate mem(2)");
    return 1;
  }
  int i;
  int repeat_count = 0;
  if (argc > 2)
    repeat_count = atoi(argv[2]);
  if (repeat_count <= 0)
    repeat_count = 100;
  if (strcasecmp(argv[1], "naive") == 0) {
    printf("function %s, repeat count %d\n", argv[1], repeat_count);
    for (i = 0; i < repeat_count; i++)
      convert(input, output, n);
  } else if (strcasecmp(argv[1], "x86") == 0) {
    printf("function %s, repeat count %d\n", argv[1], repeat_count);
    for (i = 0; i < repeat_count; i++)
      x86_convert(input, output, n);
  } else if (strcasecmp(argv[1], "SSE2") == 0) {
    printf("function %s, repeat count %d\n", argv[1], repeat_count);
    for (i = 0; i < repeat_count; i++)
      sse2_convert(input, output, n);
  } else if (strcasecmp(argv[1], "SSE4") == 0) {
    printf("function %s, repeat count %d\n", argv[1], repeat_count);
    for (i = 0; i < repeat_count; i++)
      sse4_convert(input, output, n);
  } else
    help();
  free(input);
  free(output);
  return 0;
}
```