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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1d0,%rsp
  mov    %edi,-0x11c4(%rbp)
  mov    %rsi,-0x11d0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x11bc(%rbp)
  movl   $0x0,-0x11b8(%rbp)
  movl   $0x0,-0x11b4(%rbp)
  lea    D735(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,-0x11a8(%rbp)
  lea    D1121(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,-0x11b0(%rbp)
  mov    -0x11b0(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x11b0(%rbp),%rcx
  lea    -0x410(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  lea    D299(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,-0x11a0(%rbp)
  lea    D206(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,-0x1198(%rbp)
  cmpq   $0x0,-0x11a8(%rbp)
  jne    L301
  lea    D371(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L94
L301:
  cmpq   $0x0,-0x11b0(%rbp)
  jne    L636
  lea    D941(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L94
L636:
  mov    -0x11a8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x19c,%eax
  jbe    L203
  lea    D456(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L94
L203:
  lea    -0x410(%rbp),%rax
  lea    D1022(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtok@plt>
  mov    %rax,-0x11b0(%rbp)
  jmp    L109
L751:
  mov    -0x11b0(%rbp),%rax
  mov    %rax,%rsi
  lea    D496(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x1010(%rbp),%rax
  mov    $0x200,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0xe10(%rbp),%rax
  mov    $0x200,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0xa10(%rbp),%rax
  mov    $0x200,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x810(%rbp),%rax
  mov    $0x200,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x1190(%rbp),%rax
  mov    $0x80,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x1110(%rbp),%rax
  mov    $0x80,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0xc10(%rbp),%rax
  mov    $0x200,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x610(%rbp),%rax
  mov    $0x200,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x1090(%rbp),%rax
  mov    $0x80,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x11a8(%rbp),%rdx
  lea    -0x1010(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x11a8(%rbp),%rdx
  lea    -0xe10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x11a8(%rbp),%rdx
  lea    -0xc10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x11a8(%rbp),%rdx
  lea    -0xa10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x11a8(%rbp),%rdx
  lea    -0x810(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x11a8(%rbp),%rdx
  lea    -0x610(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x0,-0x11bc(%rbp)
  movl   $0x0,-0x11b8(%rbp)
  movl   $0x0,-0x11b4(%rbp)
  mov    -0x11b0(%rbp),%rax
  mov    $0x4,%edx
  lea    D17(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L372
  lea    -0x1010(%rbp),%rax
  lea    D126(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D1138(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D1079(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L372:
  mov    -0x11b0(%rbp),%rax
  mov    $0x4,%edx
  lea    D1001(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L11
  mov    -0x11a0(%rbp),%rax
  mov    $0x1,%edx
  lea    D1200(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L502
  mov    -0x1198(%rbp),%rax
  mov    $0x3,%edx
  lea    D236(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L502
  lea    -0x1010(%rbp),%rax
  lea    D195(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D831(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D696(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L502:
  lea    -0x1010(%rbp),%rax
  lea    D98(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D820(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D366(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L11:
  mov    -0x11b0(%rbp),%rax
  mov    $0x4,%edx
  lea    D362(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L541
  lea    -0x1010(%rbp),%rax
  lea    D126(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D1138(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D1079(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L541:
  mov    -0x11b0(%rbp),%rax
  mov    $0x4,%edx
  lea    D85(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L674
  mov    -0x11a0(%rbp),%rax
  mov    $0x1,%edx
  lea    D1200(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L65
  mov    -0x1198(%rbp),%rax
  mov    $0x3,%edx
  lea    D236(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L65
  lea    -0x1010(%rbp),%rax
  lea    D195(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D831(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D696(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L65:
  lea    -0x1010(%rbp),%rax
  lea    D98(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D820(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D366(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L674:
  mov    -0x11b0(%rbp),%rax
  mov    $0x4,%edx
  lea    D1277(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L407
  mov    -0x11a0(%rbp),%rax
  mov    $0x1,%edx
  lea    D1200(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L783
  mov    -0x1198(%rbp),%rax
  mov    $0x3,%edx
  lea    D236(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L783
  lea    -0x1010(%rbp),%rax
  lea    D195(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D831(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D696(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L783:
  lea    -0x1010(%rbp),%rax
  lea    D98(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D820(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D366(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L407:
  mov    -0x11b0(%rbp),%rax
  mov    $0x4,%edx
  lea    D335(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L382
  mov    -0x11a0(%rbp),%rax
  mov    $0x1,%edx
  lea    D1200(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L574
  mov    -0x1198(%rbp),%rax
  mov    $0x3,%edx
  lea    D236(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L574
  lea    -0x1010(%rbp),%rax
  lea    D195(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D831(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D696(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L574:
  lea    -0x1010(%rbp),%rax
  lea    D98(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D820(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D366(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L382:
  mov    -0x11b0(%rbp),%rax
  mov    $0x4,%edx
  lea    D268(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L125
  mov    -0x11a0(%rbp),%rax
  mov    $0x1,%edx
  lea    D1200(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L31
  mov    -0x1198(%rbp),%rax
  mov    $0x3,%edx
  lea    D236(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L31
  lea    -0x1010(%rbp),%rax
  lea    D195(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D831(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D696(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L31:
  lea    -0x1010(%rbp),%rax
  lea    D98(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D820(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D366(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L125:
  mov    -0x11b0(%rbp),%rax
  mov    $0x4,%edx
  lea    D1335(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L580
  mov    -0x11a0(%rbp),%rax
  mov    $0x1,%edx
  lea    D1200(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L439
  mov    -0x1198(%rbp),%rax
  mov    $0x3,%edx
  lea    D236(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L439
  lea    -0x1010(%rbp),%rax
  lea    D195(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D831(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D696(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L439:
  lea    -0x1010(%rbp),%rax
  lea    D98(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D820(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D366(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L580:
  mov    -0x11b0(%rbp),%rax
  mov    $0x4,%edx
  lea    D780(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L300
  mov    -0x11a0(%rbp),%rax
  mov    $0x1,%edx
  lea    D1200(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L63
  mov    -0x1198(%rbp),%rax
  mov    $0x3,%edx
  lea    D236(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L63
  lea    -0x1010(%rbp),%rax
  lea    D195(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D831(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D696(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L63:
  lea    -0x1010(%rbp),%rax
  lea    D98(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D820(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D366(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L300:
  mov    -0x11b0(%rbp),%rax
  mov    $0x4,%edx
  lea    D559(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L403
  lea    -0x1010(%rbp),%rax
  lea    D98(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D820(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D366(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L403:
  mov    -0x11b0(%rbp),%rax
  mov    $0x4,%edx
  lea    D532(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L35
  lea    -0x1010(%rbp),%rax
  lea    D126(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D1138(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D1079(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L35:
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D121(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L71
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D428(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L442
L71:
  lea    -0x1010(%rbp),%rax
  lea    D1282(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D708(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D544(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  lea    -0xe10(%rbp),%rax
  lea    D292(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x810(%rbp),%rax
  lea    D247(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1110(%rbp),%rax
  lea    D833(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11b4(%rbp)
  jmp    L101
L442:
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D968(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L613
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D459(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L613
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D1225(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L613
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D899(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L136
L613:
  lea    -0x1010(%rbp),%rax
  lea    D1135(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D1211(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D300(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  jmp    L101
L136:
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D1373(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L744
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D829(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L247
L744:
  lea    -0x1010(%rbp),%rax
  lea    D1135(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D573(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D180(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D1373(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L120
  lea    -0xe10(%rbp),%rax
  lea    D158(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x810(%rbp),%rax
  lea    D83(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1110(%rbp),%rax
  lea    D956(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  jmp    L467
L120:
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D829(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L467
  lea    -0xe10(%rbp),%rax
  lea    D158(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x810(%rbp),%rax
  lea    D885(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1110(%rbp),%rax
  lea    D732(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  jmp    L467
L247:
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D179(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L433
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D243(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L433
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D791(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L433
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D1328(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L433
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D694(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L433
  mov    -0x11b0(%rbp),%rax
  mov    $0x7,%edx
  lea    D539(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L794
L433:
  lea    -0x1010(%rbp),%rax
  lea    D997(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D1175(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D1363(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xc10(%rbp),%rax
  lea    D473(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x610(%rbp),%rax
  lea    D272(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1090(%rbp),%rax
  lea    D942(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xe10(%rbp),%rax
  lea    D185(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x810(%rbp),%rax
  lea    D726(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1110(%rbp),%rax
  lea    D828(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  movl   $0x1,-0x11b8(%rbp)
  movl   $0x1,-0x11b4(%rbp)
  jmp    L101
L794:
  mov    -0x11b0(%rbp),%rax
  mov    $0x8,%edx
  lea    D609(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L104
  mov    -0x11b0(%rbp),%rax
  mov    $0x8,%edx
  lea    D733(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L104
  mov    -0x11b0(%rbp),%rax
  mov    $0x8,%edx
  lea    D61(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L480
L104:
  lea    -0x1010(%rbp),%rax
  lea    D590(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xa10(%rbp),%rax
  lea    D1187(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1190(%rbp),%rax
  lea    D131(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0xc10(%rbp),%rax
  lea    D526(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x610(%rbp),%rax
  lea    D904(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1090(%rbp),%rax
  lea    D621(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x1,-0x11bc(%rbp)
  movl   $0x1,-0x11b8(%rbp)
  jmp    L101
L480:
  mov    -0x11b0(%rbp),%rax
  mov    %rax,%rsi
  lea    D414(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L101
L467:
  nop
L101:
  cmpl   $0x0,-0x11bc(%rbp)
  je     L776
  lea    -0x1190(%rbp),%rdx
  lea    -0xa10(%rbp),%rcx
  lea    -0x1010(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <bin2h@plt>
L776:
  cmpl   $0x0,-0x11b8(%rbp)
  je     L176
  lea    -0x1090(%rbp),%rdx
  lea    -0x610(%rbp),%rcx
  lea    -0xc10(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <bin2h@plt>
L176:
  cmpl   $0x0,-0x11b4(%rbp)
  je     L92
  lea    -0x1110(%rbp),%rdx
  lea    -0x810(%rbp),%rcx
  lea    -0xe10(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <bin2h@plt>
L92:
  lea    D1022(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x11b0(%rbp)
L109:
  cmpq   $0x0,-0x11b0(%rbp)
  jne    L751
  mov    $0x0,%edi
  call   <exit@plt>
  mov    $0x0,%eax
L94:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L633
  call   <__stack_chk_fail@plt>
L633:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D735
type_guessed: string
name: retrieve_data
arguments: data_tag: D1121
type_guessed: string
name: retrieve_data
arguments: data_tag: D299
type_guessed: string
name: retrieve_data
arguments: data_tag: D206
type_guessed: string
name: retrieve_data
arguments: data_tag: D371
type_guessed: string
name: retrieve_data
arguments: data_tag: D941
type_guessed: string
name: retrieve_data
arguments: data_tag: D456
type_guessed: string
name: retrieve_data
arguments: data_tag: D1022
type_guessed: string
name: retrieve_data
arguments: data_tag: D496
type_guessed: string
name: retrieve_data
arguments: data_tag: D17
type_guessed: string
name: retrieve_data
arguments: data_tag: D126
type_guessed: string
name: retrieve_data
arguments: data_tag: D1138
type_guessed: string
name: retrieve_data
arguments: data_tag: D1079
type_guessed: string
name: retrieve_data
arguments: data_tag: D1001
type_guessed: string
name: retrieve_data
arguments: data_tag: D1200
type_guessed: string
name: retrieve_data
arguments: data_tag: D236
type_guessed: string
name: retrieve_data
arguments: data_tag: D195
type_guessed: string
name: retrieve_data
arguments: data_tag: D831
type_guessed: string
name: retrieve_data
arguments: data_tag: D696
type_guessed: string
name: retrieve_data
arguments: data_tag: D98
type_guessed: string
name: retrieve_data
arguments: data_tag: D820
type_guessed: string
name: retrieve_data
arguments: data_tag: D366
type_guessed: string
name: retrieve_data
arguments: data_tag: D362
type_guessed: string
name: retrieve_data
arguments: data_tag: D85
type_guessed: string
name: retrieve_data
arguments: data_tag: D1277
type_guessed: string
name: retrieve_data
arguments: data_tag: D335
type_guessed: string
name: retrieve_data
arguments: data_tag: D268
type_guessed: string
name: retrieve_data
arguments: data_tag: D1335
type_guessed: string
name: retrieve_data
arguments: data_tag: D780
type_guessed: string
name: retrieve_data
arguments: data_tag: D559
type_guessed: string
name: retrieve_data
arguments: data_tag: D532
type_guessed: string
name: retrieve_data
arguments: data_tag: D121
type_guessed: string
name: retrieve_data
arguments: data_tag: D428
type_guessed: string
name: retrieve_data
arguments: data_tag: D1282
type_guessed: string
name: retrieve_data
arguments: data_tag: D708
type_guessed: string
name: retrieve_data
arguments: data_tag: D544
type_guessed: string
name: retrieve_data
arguments: data_tag: D292
type_guessed: string
name: retrieve_data
arguments: data_tag: D247
type_guessed: string
name: retrieve_data
arguments: data_tag: D833
type_guessed: string
name: retrieve_data
arguments: data_tag: D968
type_guessed: string
name: retrieve_data
arguments: data_tag: D459
type_guessed: string
name: retrieve_data
arguments: data_tag: D1225
type_guessed: string
name: retrieve_data
arguments: data_tag: D899
type_guessed: string
name: retrieve_data
arguments: data_tag: D1135
type_guessed: string
name: retrieve_data
arguments: data_tag: D1211
type_guessed: string
name: retrieve_data
arguments: data_tag: D300
type_guessed: string
name: retrieve_data
arguments: data_tag: D1373
type_guessed: string
name: retrieve_data
arguments: data_tag: D829
type_guessed: string
name: retrieve_data
arguments: data_tag: D573
type_guessed: string
name: retrieve_data
arguments: data_tag: D180
type_guessed: string
name: retrieve_data
arguments: data_tag: D158
type_guessed: string
name: retrieve_data
arguments: data_tag: D83
type_guessed: string
name: retrieve_data
arguments: data_tag: D956
type_guessed: string
name: retrieve_data
arguments: data_tag: D885
type_guessed: string
name: retrieve_data
arguments: data_tag: D732
type_guessed: string
name: retrieve_data
arguments: data_tag: D179
type_guessed: string
name: retrieve_data
arguments: data_tag: D243
type_guessed: string
name: retrieve_data
arguments: data_tag: D791
type_guessed: string
name: retrieve_data
arguments: data_tag: D1328
type_guessed: string
name: retrieve_data
arguments: data_tag: D694
type_guessed: string
name: retrieve_data
arguments: data_tag: D539
type_guessed: string
name: retrieve_data
arguments: data_tag: D997
type_guessed: string
name: retrieve_data
arguments: data_tag: D1175
type_guessed: string
name: retrieve_data
arguments: data_tag: D1363
type_guessed: string
name: retrieve_data
arguments: data_tag: D473
type_guessed: string
name: retrieve_data
arguments: data_tag: D272
type_guessed: string
name: retrieve_data
arguments: data_tag: D942
type_guessed: string
name: retrieve_data
arguments: data_tag: D185
type_guessed: string
name: retrieve_data
arguments: data_tag: D726
type_guessed: string
name: retrieve_data
arguments: data_tag: D828
type_guessed: string
name: retrieve_data
arguments: data_tag: D609
type_guessed: string
name: retrieve_data
arguments: data_tag: D733
type_guessed: string
name: retrieve_data
arguments: data_tag: D61
type_guessed: string
name: retrieve_data
arguments: data_tag: D590
type_guessed: string
name: retrieve_data
arguments: data_tag: D1187
type_guessed: string
name: retrieve_data
arguments: data_tag: D131
type_guessed: string
name: retrieve_data
arguments: data_tag: D526
type_guessed: string
name: retrieve_data
arguments: data_tag: D904
type_guessed: string
name: retrieve_data
arguments: data_tag: D621
type_guessed: string
name: retrieve_data
arguments: data_tag: D414
type_guessed: string

tool: D735: RT28xx_DIR

tool: D1121: CHIPSET

tool: D299: HAS_WOW_SUPPORT

tool: D206: RT28xx_MODE

tool: D371: Environment value "RT28xx_DIR" not export 

tool: D941: Environment value "CHIPSET" not export 

tool: D456: Environment value "RT28xx_DIR" is too long!

tool: D1022:  

tool: D496: chipset = %s


tool: D17: 2860

tool: D126: /mcu/bin/rt2860.bin

tool: D1138: /include/mcu/rt2860_firmware.h

tool: D1079: RT2860_FirmwareImage

tool: D1001: 2870

tool: D1200: y

tool: D236: STA

tool: D195: /mcu/bin/rt2870_wow.bin

tool: D831: /include/mcu/rt2870_wow_firmware.h

tool: D696: RT2870_WOW_FirmwareImage

tool: D98: /mcu/bin/rt2870.bin

tool: D820: /include/mcu/rt2870_firmware.h

tool: D366: RT2870_FirmwareImage

tool: D362: 3090

tool: D85: 2070

tool: D1277: 3070

tool: D335: 3572

tool: D268: 3573

tool: D1335: 3370

tool: D780: 5370

tool: D559: 5572

tool: D532: 5592

tool: D121: mt7601e

tool: D428: mt7601u

tool: D1282: /mcu/bin/MT7601_formal_1.6.bin

tool: D708: /include/mcu/mt7601_firmware.h

tool: D544: MT7601_FirmwareImage

tool: D292: /eeprom/MT7601_USB_V0_D-20130416.bin

tool: D247: /include/eeprom/mt7601_e2p.h

tool: D833: MT7601_E2PImage

tool: D968: mt7650e

tool: D459: mt7650u

tool: D1225: mt7630e

tool: D899: mt7630u

tool: D1135: /mcu/bin/MT7650.bin

tool: D1211: /include/mcu/mt7650_firmware.h

tool: D300: MT7650_FirmwareImage

tool: D1373: mt7610e

tool: D829: mt7610u

tool: D573: /include/mcu/mt7610_firmware.h

tool: D180: MT7610_FirmwareImage

tool: D158: /eeprom/MT7610U_FEM_V1_1.bin

tool: D83: /include/eeprom/mt7610e_e2p.h

tool: D956: MT7610E_E2PImage

tool: D885: /include/eeprom/mt7610u_e2p.h

tool: D732: MT7610U_E2PImage

tool: D179: mt7662e

tool: D243: mt7662u

tool: D791: mt7632e

tool: D1328: mt7632u

tool: D694: mt7612e

tool: D539: mt7612u

tool: D997: /mcu/bin/MT7662_E3_v1.9.bin

tool: D1175: /include/mcu/mt7662_firmware.h

tool: D1363: MT7662_FirmwareImage

tool: D473: /mcu/bin/mt7662_patch_e3_hdr_v0.0.2_P69.bin

tool: D272: /include/mcu/mt7662_rom_patch.h

tool: D942: mt7662_rom_patch

tool: D185: /eeprom/MT7612E_EEPROM_layout_20131121_2G5G_ePAeLNA_TXTC_off.bin

tool: D726: /include/eeprom/mt76x2_e2p.h

tool: D828: MT76x2_E2PImage

tool: D609: mt7662tu

tool: D733: mt7632tu

tool: D61: mt7612tu

tool: D590: /mcu/bin/mt7662t_firmware_e1.bin

tool: D1187: /include/mcu/mt7662t_firmware.h

tool: D131: MT7662T_FirmwareImage

tool: D526: /mcu/bin/mt7662t_patch_e1_hdr.bin

tool: D904: /include/mcu/mt7662t_rom_patch.h

tool: D621: mt7662t_rom_patch

tool: D414: unknown chipset = %s


assistant: ```c
int main(int argc, char *argv[]) {
  char infname[512], ine2pname[512], in_rom_patch[512];
  char outfname[512], oute2pname[512], out_rom_patch[512];
  char chipsets[1024];
  char fw_name[128], e2p_name[128], rom_patch_name[128];
  char *rt28xxdir;
  char *chipset, *token;
  char *wow, *rt28xx_mode;
  int is_bin2h_fw = 0, is_bin2h_rom_patch = 0, is_bin2h_e2p = 0;
  rt28xxdir = (char *)getenv("RT28xx_DIR");
  chipset = (char *)getenv("CHIPSET");
  memcpy(chipsets, chipset, strlen(chipset));
  wow = (char *)getenv("HAS_WOW_SUPPORT");
  rt28xx_mode = (char *)getenv("RT28xx_MODE");
  if (!rt28xxdir) {
    printf("Environment value \"RT28xx_DIR\" not export \n");
    return -1;
  }
  if (!chipset) {
    printf("Environment value \"CHIPSET\" not export \n");
    return -1;
  }
  if (strlen(rt28xxdir) > (sizeof(infname) - 100)) {
    printf("Environment value \"RT28xx_DIR\" is too long!\n");
    return -1;
  }
  chipset = strtok(chipsets, " ");
  while (chipset != NULL) {
    printf("chipset = %s\n", chipset);
    memset(infname, 0, 512);
    memset(ine2pname, 0, 512);
    memset(outfname, 0, 512);
    memset(oute2pname, 0, 512);
    memset(fw_name, 0, 128);
    memset(e2p_name, 0, 128);
    memset(in_rom_patch, 0, 512);
    memset(out_rom_patch, 0, 512);
    memset(rom_patch_name, 0, 128);
    strcat(infname, rt28xxdir);
    strcat(ine2pname, rt28xxdir);
    strcat(in_rom_patch, rt28xxdir);
    strcat(outfname, rt28xxdir);
    strcat(oute2pname, rt28xxdir);
    strcat(out_rom_patch, rt28xxdir);
    is_bin2h_fw = 0;
    is_bin2h_rom_patch = 0;
    is_bin2h_e2p = 0;
    if (strncmp(chipset, "2860", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2860.bin");
      strcat(outfname, "/include/mcu/rt2860_firmware.h");
      strcat(fw_name, "RT2860_FirmwareImage");
      is_bin2h_fw = 1;
    } else if (strncmp(chipset, "2870", 4) == 0) {
      if ((strncmp(wow, "y", 1) == 0) && (strncmp(rt28xx_mode, "STA", 3) == 0)) {
        strcat(infname, "/mcu/bin/rt2870_wow.bin");
        strcat(outfname, "/include/mcu/rt2870_wow_firmware.h");
        strcat(fw_name, "RT2870_WOW_FirmwareImage");
        is_bin2h_fw = 1;
      } else {
        strcat(infname, "/mcu/bin/rt2870.bin");
        strcat(outfname, "/include/mcu/rt2870_firmware.h");
        strcat(fw_name, "RT2870_FirmwareImage");
        is_bin2h_fw = 1;
      }
    } else if (strncmp(chipset, "3090", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2860.bin");
      strcat(outfname, "/include/mcu/rt2860_firmware.h");
      strcat(fw_name, "RT2860_FirmwareImage");
      is_bin2h_fw = 1;
    } else if (strncmp(chipset, "2070", 4) == 0) {
      if ((strncmp(wow, "y", 1) == 0) && (strncmp(rt28xx_mode, "STA", 3) == 0)) {
        strcat(infname, "/mcu/bin/rt2870_wow.bin");
        strcat(outfname, "/include/mcu/rt2870_wow_firmware.h");
        strcat(fw_name, "RT2870_WOW_FirmwareImage");
        is_bin2h_fw = 1;
      } else {
        strcat(infname, "/mcu/bin/rt2870.bin");
        strcat(outfname, "/include/mcu/rt2870_firmware.h");
        strcat(fw_name, "RT2870_FirmwareImage");
        is_bin2h_fw = 1;
      }
    } else if (strncmp(chipset, "3070", 4) == 0) {
      if ((strncmp(wow, "y", 1) == 0) && (strncmp(rt28xx_mode, "STA", 3) == 0)) {
        strcat(infname, "/mcu/bin/rt2870_wow.bin");
        strcat(outfname, "/include/mcu/rt2870_wow_firmware.h");
        strcat(fw_name, "RT2870_WOW_FirmwareImage");
        is_bin2h_fw = 1;
      } else {
        strcat(infname, "/mcu/bin/rt2870.bin");
        strcat(outfname, "/include/mcu/rt2870_firmware.h");
        strcat(fw_name, "RT2870_FirmwareImage");
        is_bin2h_fw = 1;
      }
    } else if (strncmp(chipset, "3572", 4) == 0) {
      if ((strncmp(wow, "y", 1) == 0) && (strncmp(rt28xx_mode, "STA", 3) == 0)) {
        strcat(infname, "/mcu/bin/rt2870_wow.bin");
        strcat(outfname, "/include/mcu/rt2870_wow_firmware.h");
        strcat(fw_name, "RT2870_WOW_FirmwareImage");
        is_bin2h_fw = 1;
      } else {
        strcat(infname, "/mcu/bin/rt2870.bin");
        strcat(outfname, "/include/mcu/rt2870_firmware.h");
        strcat(fw_name, "RT2870_FirmwareImage");
        is_bin2h_fw = 1;
      }
    } else if (strncmp(chipset, "3573", 4) == 0) {
      if ((strncmp(wow, "y", 1) == 0) && (strncmp(rt28xx_mode, "STA", 3) == 0)) {
        strcat(infname, "/mcu/bin/rt2870_wow.bin");
        strcat(outfname, "/include/mcu/rt2870_wow_firmware.h");
        strcat(fw_name, "RT2870_WOW_FirmwareImage");
        is_bin2h_fw = 1;
      } else {
        strcat(infname, "/mcu/bin/rt2870.bin");
        strcat(outfname, "/include/mcu/rt2870_firmware.h");
        strcat(fw_name, "RT2870_FirmwareImage");
        is_bin2h_fw = 1;
      }
    } else if (strncmp(chipset, "3370", 4) == 0) {
      if ((strncmp(wow, "y", 1) == 0) && (strncmp(rt28xx_mode, "STA", 3) == 0)) {
        strcat(infname, "/mcu/bin/rt2870_wow.bin");
        strcat(outfname, "/include/mcu/rt2870_wow_firmware.h");
        strcat(fw_name, "RT2870_WOW_FirmwareImage");
        is_bin2h_fw = 1;
      } else {
        strcat(infname, "/mcu/bin/rt2870.bin");
        strcat(outfname, "/include/mcu/rt2870_firmware.h");
        strcat(fw_name, "RT2870_FirmwareImage");
        is_bin2h_fw = 1;
      }
    } else if (strncmp(chipset, "5370", 4) == 0) {
      if ((strncmp(wow, "y", 1) == 0) && (strncmp(rt28xx_mode, "STA", 3) == 0)) {
        strcat(infname, "/mcu/bin/rt2870_wow.bin");
        strcat(outfname, "/include/mcu/rt2870_wow_firmware.h");
        strcat(fw_name, "RT2870_WOW_FirmwareImage");
        is_bin2h_fw = 1;
      } else {
        strcat(infname, "/mcu/bin/rt2870.bin");
        strcat(outfname, "/include/mcu/rt2870_firmware.h");
        strcat(fw_name, "RT2870_FirmwareImage");
        is_bin2h_fw = 1;
      }
    } else if (strncmp(chipset, "5572", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2870.bin");
      strcat(outfname, "/include/mcu/rt2870_firmware.h");
      strcat(fw_name, "RT2870_FirmwareImage");
      is_bin2h_fw = 1;
    } else if (strncmp(chipset, "5592", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2860.bin");
      strcat(outfname, "/include/mcu/rt2860_firmware.h");
      strcat(fw_name, "RT2860_FirmwareImage");
      is_bin2h_fw = 1;
    } else if ((strncmp(chipset, "mt7601e", 7) == 0) || (strncmp(chipset, "mt7601u", 7) == 0)) {
      strcat(infname, "/mcu/bin/MT7601_formal_1.6.bin");
      strcat(outfname, "/include/mcu/mt7601_firmware.h");
      strcat(fw_name, "MT7601_FirmwareImage");
      is_bin2h_fw = 1;
      strcat(ine2pname, "/eeprom/MT7601_USB_V0_D-20130416.bin");
      strcat(oute2pname, "/include/eeprom/mt7601_e2p.h");
      strcat(e2p_name, "MT7601_E2PImage");
      is_bin2h_e2p = 1;
    } else if ((strncmp(chipset, "mt7650e", 7) == 0) || (strncmp(chipset, "mt7650u", 7) == 0) || (strncmp(chipset, "mt7630e", 7) == 0) || (strncmp(chipset, "mt7630u", 7) == 0)) {
      strcat(infname, "/mcu/bin/MT7650.bin");
      strcat(outfname, "/include/mcu/mt7650_firmware.h");
      strcat(fw_name, "MT7650_FirmwareImage");
      is_bin2h_fw = 1;
    } else if ((strncmp(chipset, "mt7610e", 7) == 0) || (strncmp(chipset, "mt7610u", 7) == 0)) {
      strcat(infname, "/mcu/bin/MT7650.bin");
      strcat(outfname, "/include/mcu/mt7610_firmware.h");
      strcat(fw_name, "MT7610_FirmwareImage");
      is_bin2h_fw = 1;
      if ((strncmp(chipset, "mt7610e", 7) == 0)) {
        strcat(ine2pname, "/eeprom/MT7610U_FEM_V1_1.bin");
        strcat(oute2pname, "/include/eeprom/mt7610e_e2p.h");
        strcat(e2p_name, "MT7610E_E2PImage");
      } else if ((strncmp(chipset, "mt7610u", 7) == 0)) {
        strcat(ine2pname, "/eeprom/MT7610U_FEM_V1_1.bin");
        strcat(oute2pname, "/include/eeprom/mt7610u_e2p.h");
        strcat(e2p_name, "MT7610U_E2PImage");
      }
    } else if ((strncmp(chipset, "mt7662e", 7) == 0) || (strncmp(chipset, "mt7662u", 7) == 0) || (strncmp(chipset, "mt7632e", 7) == 0) || (strncmp(chipset, "mt7632u", 7) == 0) || (strncmp(chipset, "mt7612e", 7) == 0) || (strncmp(chipset, "mt7612u", 7) == 0)) {
      strcat(infname, "/mcu/bin/MT7662_E3_v1.9.bin");
      strcat(outfname, "/include/mcu/mt7662_firmware.h");
      strcat(fw_name, "MT7662_FirmwareImage");
      strcat(in_rom_patch, "/mcu/bin/mt7662_patch_e3_hdr_v0.0.2_P69.bin");
      strcat(out_rom_patch, "/include/mcu/mt7662_rom_patch.h");
      strcat(rom_patch_name, "mt7662_rom_patch");
      strcat(ine2pname, "/eeprom/MT7612E_EEPROM_layout_20131121_2G5G_ePAeLNA_TXTC_off.bin");
      strcat(oute2pname, "/include/eeprom/mt76x2_e2p.h");
      strcat(e2p_name, "MT76x2_E2PImage");
      is_bin2h_fw = 1;
      is_bin2h_rom_patch = 1;
      is_bin2h_e2p = 1;
    } else if ((strncmp(chipset, "mt7662tu", 8) == 0) || (strncmp(chipset, "mt7632tu", 8) == 0) || (strncmp(chipset, "mt7612tu", 8) == 0)) {
      strcat(infname, "/mcu/bin/mt7662t_firmware_e1.bin");
      strcat(outfname, "/include/mcu/mt7662t_firmware.h");
      strcat(fw_name, "MT7662T_FirmwareImage");
      strcat(in_rom_patch, "/mcu/bin/mt7662t_patch_e1_hdr.bin");
      strcat(out_rom_patch, "/include/mcu/mt7662t_rom_patch.h");
      strcat(rom_patch_name, "mt7662t_rom_patch");
      is_bin2h_fw = 1;
      is_bin2h_rom_patch = 1;
    } else {
      printf("unknown chipset = %s\n", chipset);
    }
    if (is_bin2h_fw)
      bin2h(infname, outfname, fw_name);
    if (is_bin2h_rom_patch)
      bin2h(in_rom_patch, out_rom_patch, rom_patch_name);
    if (is_bin2h_e2p)
      bin2h(ine2pname, oute2pname, e2p_name);
    chipset = strtok(NULL, " ");
  }
  exit(0);
}
```