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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%r12d
  mov    %rsi,%r14
  cmp    $0x1,%edi
  je     L163
  cmp    $0x2,%edi
  je     L5
  cmp    $0x3,%edi
  je     L91
L59:
  lea    D94(%rip),%rsi
  lea    D93(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L4
L21:
  mov    $0xb,%edi
  call   <malloc@plt>
  mov    %rax,%r15
  mov    %rax,0x8(%rsp)
  mov    %rbx,%rcx
  mov    $0x1,%edx
  mov    $0xb,%esi
  mov    %rax,%rdi
  call   <fread@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    $0xc8,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  movb   $0x0,(%rax)
  lea    D11(%rip),%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  lea    D135(%rip),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  mov    $0x1000,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  movb   $0x0,(%rax)
  cmp    $0x1,%r12d
  jle    L48
L90:
  mov    $0x1,%ebx
  lea    D100(%rip),%r15
L126:
  mov    (%r14,%rbx,8),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  add    $0x1,%rbx
  cmp    %ebx,%r12d
  jg     L126
L48:
  mov    %r13,%rdi
  call   <system@plt>
  mov    %rbp,%rdi
  call   <system@plt>
  movb   $0x0,0x0(%r13)
  lea    D11(%rip),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  mov    0x8(%rsp),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  lea    D161(%rip),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  mov    %r13,%rdi
  call   <system@plt>
  mov    $0x0,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L163:
  mov    $0x0,%eax
  call   <printhelp@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L59
L5:
  mov    0x8(%rsi),%rdi
  lea    D83(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L57
  mov    0x8(%r14),%rdi
  lea    D56(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L121
L57:
  mov    $0x0,%eax
  call   <printhelp@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
L121:
  lea    D94(%rip),%rsi
  lea    D93(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L4
  mov    $0xb,%edi
  call   <malloc@plt>
  mov    %rax,%r15
  mov    %rax,0x8(%rsp)
  mov    %rbx,%rcx
  mov    $0x1,%edx
  mov    $0xb,%esi
  mov    %rax,%rdi
  call   <fread@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    $0xc8,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  movb   $0x0,(%rax)
  lea    D11(%rip),%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  lea    D135(%rip),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  mov    $0x1000,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  movb   $0x0,(%rax)
  jmp    L90
L91:
  mov    0x8(%rsi),%rdi
  lea    D91(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L52
L88:
  lea    D94(%rip),%rsi
  lea    D93(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L4
  mov    $0xb,%edi
  call   <malloc@plt>
  mov    %rax,%r15
  mov    %rax,0x8(%rsp)
  mov    %rbx,%rcx
  mov    $0x1,%edx
  mov    $0xb,%esi
  mov    %rax,%rdi
  call   <fread@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    $0xc8,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  movb   $0x0,(%rax)
  lea    D11(%rip),%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  lea    D135(%rip),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  mov    $0x1000,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  movb   $0x0,(%rax)
  jmp    L90
L52:
  lea    D198(%rip),%rsi
  lea    D93(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  mov    0x10(%r14),%rdi
  call   <strlen@plt>
  cmp    $0xa,%eax
  je     L171
  lea    D72(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L88
L171:
  mov    0x10(%r14),%rdi
  mov    %rbx,%rsi
  call   <fputs@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
  jmp    L88
L4:
  lea    D8(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  mov    $0x0,%ebx
  jmp    L21
```

tool_calls: name: extract_symbolic_data
arguments: label: D94
data_type: string
name: extract_symbolic_data
arguments: label: D93
data_type: string
name: extract_symbolic_data
arguments: label: D11
data_type: string
name: extract_symbolic_data
arguments: label: D135
data_type: string
name: extract_symbolic_data
arguments: label: D100
data_type: string
name: extract_symbolic_data
arguments: label: D161
data_type: string
name: extract_symbolic_data
arguments: label: D83
data_type: string
name: extract_symbolic_data
arguments: label: D56
data_type: string
name: extract_symbolic_data
arguments: label: D91
data_type: string
name: extract_symbolic_data
arguments: label: D198
data_type: string
name: extract_symbolic_data
arguments: label: D72
data_type: string
name: extract_symbolic_data
arguments: label: D8
data_type: string

tool: D94: r

tool: D93: number.txt

tool: D11: curl -X POST http://textbelt.com/text -d number=

tool: D135:  -d "message=Your program execution has started! Go take a coffee break :)"

tool: D100:  

tool: D161:  -d "message=Your program execution has finished! Get back to work :)"

tool: D83: -h

tool: D56: help

tool: D91: -d

tool: D198: w

tool: D72: Invalid phone number lengnth!


tool: D8: No phone number specified. Set the phone number first!


assistant: ```c
int main(int argc, const char *argv[]) {
  FILE *pn;
  if (argc == 1) {
    printhelp();
    exit(-1);
  }
  if (argc == 2 && ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "help") == 0))) {
    printhelp();
    exit(-1);
  }
  if (argc == 3 && (strcmp(argv[1], "-d")) == 0) {
    pn = fopen("number.txt", "w");
    if (strlen(argv[2]) == 10) {
      fputs(argv[2], pn);
      fclose(pn);
    } else {
      printf("Invalid phone number lengnth!\n");
      exit(-1);
    }
  }
  pn = fopen("number.txt", "r");
  if (!pn) {
    printf("No phone number specified. Set the phone number first!\n");
    exit(-1);
  }
  char *number = malloc(sizeof(char) * 11);
  fread(number, 11, 1, pn);
  fclose(pn);
  char *firsthalf = "curl -X POST http://textbelt.com/text -d number=";
  char *secondhalf = " -d \"message=Your program execution has started! Go take a coffee break :)\"";
  char *message = malloc(sizeof(char) * 200);
  message[0] = 0;
  strcat(message, firsthalf);
  strcat(message, number);
  strcat(message, secondhalf);
  int i;
  char *instruction = malloc(sizeof(char) * 4096);
  instruction[0] = 0;
  for (i = 1; i < argc; ++i) {
    strcat(instruction, argv[i]);
    strcat(instruction, " ");
  }
  system(message);
  system(instruction);
  char *finishedhalf = " -d \"message=Your program execution has finished! Get back to work :)\"";
  message[0] = 0;
  strcat(message, firsthalf);
  strcat(message, number);
  strcat(message, finishedhalf);
  system(message);
  return 0;
}
```