user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x450,%rsp
  mov    %edi,-0x2444(%rbp)
  mov    %rsi,-0x2450(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x3,-0x2444(%rbp)
  je     L11
  lea    D57(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L4
L11:
  mov    -0x2450(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  lea    -0x2410(%rbp),%rax
  mov    %rdx,%rcx
  lea    D66(%rip),%rdx
  mov    $0x400,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  lea    -0x2410(%rbp),%rax
  lea    D21(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <popen@plt>
  mov    %rax,-0x2420(%rbp)
  cmpq   $0x0,-0x2420(%rbp)
  jne    L68
  mov    -0x2450(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%eax
  jmp    L4
L68:
  mov    -0x2450(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    D24(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x2418(%rbp)
  cmpq   $0x0,-0x2418(%rbp)
  jne    L80
  mov    -0x2450(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    -0x2420(%rbp),%rax
  mov    %rax,%rdi
  call   <pclose@plt>
  mov    $0x1,%eax
  jmp    L4
L80:
  movl   $0x0,-0x2434(%rbp)
  jmp    L14
L25:
  addl   $0x1,-0x2434(%rbp)
  mov    -0x2430(%rbp),%rdx
  mov    -0x2418(%rbp),%rax
  lea    D25(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <write_po@plt>
  mov    -0x2428(%rbp),%rdx
  mov    -0x2418(%rbp),%rax
  lea    D58(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <write_po@plt>
L14:
  lea    -0x2428(%rbp),%rcx
  lea    -0x2430(%rbp),%rdx
  lea    -0x2010(%rbp),%rsi
  mov    -0x2420(%rbp),%rax
  mov    %rcx,%r8
  mov    %rdx,%rcx
  mov    $0x2000,%edx
  mov    %rax,%rdi
  call   <read_strings@plt>
  test   %rax,%rax
  jne    L25
  mov    -0x2420(%rbp),%rax
  mov    %rax,%rdi
  call   <pclose@plt>
  mov    -0x2418(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x2450(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    -0x2434(%rbp),%edx
  mov    %rax,%rsi
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
L4:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L88
  call   <__stack_chk_fail@plt>
L88:
  leave
  ret
```

tool_calls: name: read_data
arguments: tag: D57
type_guessed: string
name: read_data
arguments: tag: D66
type_guessed: string
name: read_data
arguments: tag: D21
type_guessed: string
name: read_data
arguments: tag: D24
type_guessed: string
name: read_data
arguments: tag: D25
type_guessed: string
name: read_data
arguments: tag: D58
type_guessed: string
name: read_data
arguments: tag: D32
type_guessed: string

tool: D57: Usage: strings2po filename.strings filename.po

tool: D66: iconv -f utf-16 -t utf-8 '%s'

tool: D21: r

tool: D24: w

tool: D25: msgid

tool: D58: msgstr

tool: D32: %s: %d messages.


assistant: ```c
int main(int argc, char *argv[]) {
  FILE *strings, *po;
  char iconv[1024], buffer[8192], *id, *str;
  int count;
  if (argc != 3) {
    puts("Usage: strings2po filename.strings filename.po");
    return (1);
  }
  snprintf(iconv, sizeof(iconv), "iconv -f utf-16 -t utf-8 '%s'", argv[1]);
  if ((strings = popen(iconv, "r")) == NULL) {
    perror(argv[1]);
    return (1);
  }
  if ((po = fopen(argv[2], "w")) == NULL) {
    perror(argv[2]);
    pclose(strings);
    return (1);
  }
  count = 0;
  while (read_strings(strings, buffer, sizeof(buffer), &id, &str)) {
    count++;
    write_po(po, "msgid", id);
    write_po(po, "msgstr", str);
  }
  pclose(strings);
  fclose(po);
  printf("%s: %d messages.\n", argv[2], count);
  return (0);
}
```