user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %rsi,%rbx
  cmp    $0x2,%edi
  jle    L129
  mov    0x10(%rsi),%rax
  mov    0x8(%rbx),%rdi
  xor    %r13d,%r13d
  movsbl (%rax),%esi
  mov    %esi,%r12d
  call   <Database_open@plt>
  mov    %rax,%r14
  cmp    $0x3,%ebp
  jne    L94
L21:
  sub    $0x63,%r12d
  cmp    $0x10,%r12b
  ja     L98
  lea    D77(%rip),%rdx
  movzbl %r12b,%r12d
  movslq (%rdx,%r12,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L94:
  mov    0x18(%rbx),%rdi
  call   <atoi@plt>
  mov    %eax,%r13d
  cmp    $0x63,%eax
  jle    L21
  lea    D68(%rip),%rdi
  call   <die@plt>
  jmp    L21
L129:
  lea    D58(%rip),%rdi
  call   <die@plt>
  mov    0x10(%rbx),%rax
  mov    0x8(%rbx),%rdi
  movsbl (%rax),%esi
  mov    %esi,%r12d
  call   <Database_open@plt>
  sub    $0x63,%r12d
  mov    %rax,%r14
  cmp    $0x10,%r12b
  ja     L98
  lea    D59(%rip),%rdx
  movzbl %r12b,%r12d
  movslq (%rdx,%r12,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L98:
  lea    D31(%rip),%rdi
  call   <die@plt>
L49:
  mov    %r14,%rdi
  call   <Database_close@plt>
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  xor    %r13d,%r13d
  cmp    $0x6,%ebp
  je     L140
  lea    D1(%rip),%rdi
  call   <die@plt>
L140:
  mov    0x28(%rbx),%rcx
  mov    0x20(%rbx),%rdx
  mov    %r14,%rdi
  mov    %r13d,%esi
  call   <Database_set@plt>
  mov    %r14,%rdi
  call   <Database_write@plt>
  jmp    L49
  mov    %r14,%rdi
  call   <Database_list@plt>
  jmp    L49
  xor    %r13d,%r13d
  cmp    $0x4,%ebp
  je     L79
  lea    D51(%rip),%rdi
  call   <die@plt>
L79:
  mov    %r13d,%esi
  mov    %r14,%rdi
  call   <Database_get@plt>
  jmp    L49
  mov    %r14,%rdi
  call   <Database_create@plt>
  mov    %r14,%rdi
  call   <Database_write@plt>
  jmp    L49
  cmp    $0x4,%ebp
  jne    L123
L65:
  mov    %r14,%rdi
  mov    %r13d,%esi
  call   <Database_delete@plt>
  mov    %r14,%rdi
  call   <Database_write@plt>
  jmp    L49
  xor    %r13d,%r13d
L123:
  lea    D79(%rip),%rdi
  call   <die@plt>
  jmp    L65
```

tool_calls: name: extract_symbolic_data
arguments: label: D68
type_infered: string
name: extract_symbolic_data
arguments: label: D58
type_infered: string
name: extract_symbolic_data
arguments: label: D31
type_infered: string
name: extract_symbolic_data
arguments: label: D1
type_infered: string
name: extract_symbolic_data
arguments: label: D51
type_infered: string
name: extract_symbolic_data
arguments: label: D79
type_infered: string

tool: D68: There's not that many records.

tool: D58: USAGE: ex17 <dbfile> <action> [action params]

tool: D31: Invalid action, only c=create, g=get, s=set, d=del, l=list.

tool: D1: Need ID, name and email to set.

tool: D51: Need an ID to get.

tool: D79: Need an ID to delete.

assistant: ```c
int main(int argc, char *argv[]) {
  if (argc < 3) {
    die("USAGE: ex17 <dbfile> <action> [action params]");
  }
  char *filename = argv[1];
  char action = argv[2][0];
  struct Connection *conn = Database_open(filename, action);
  int id = 0;
  if (argc > 3) {
    id = atoi(argv[3]);
  }
  if (id >= 100) {
    die("There's not that many records.");
  }
  switch (action) {
  case 'c':
    Database_create(conn);
    Database_write(conn);
    break;
  case 'g':
    if (argc != 4) {
      die("Need an ID to get.");
    }
    Database_get(conn, id);
    break;
  case 's':
    if (argc != 6) {
      die("Need ID, name and email to set.");
    }
    Database_set(conn, id, argv[4], argv[5]);
    Database_write(conn);
    break;
  case 'd':
    if (argc != 4) {
      die("Need an ID to delete.");
    }
    Database_delete(conn, id);
    Database_write(conn);
    break;
  case 'l':
    Database_list(conn);
    break;
  default:
    die("Invalid action, only c=create, g=get, s=set, d=del, l=list.");
  }
  Database_close(conn);
  return 0;
}
```