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

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmp    $0x4,%edi
  je     L18
  xor    %edi,%edi
  call   <usage@plt>
L18:
  lea    D40(%rip),%rbp
  mov    0x8(%rbx),%rdi
  lea    0xc(%rsp),%rdx
  mov    %rbp,%rsi
  call   <sscanf@plt>
  test   %rax,%rax
  je     L25
  mov    0xc(%rsp),%edx
  test   %edx,%edx
  jle    L25
L125:
  mov    0x10(%rbx),%rdi
  lea    0x14(%rsp),%rdx
  mov    %rbp,%rsi
  call   <sscanf@plt>
  test   %rax,%rax
  je     L42
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  jle    L42
L100:
  mov    0x18(%rbx),%rdi
  lea    0x10(%rsp),%rdx
  mov    %rbp,%rsi
  call   <sscanf@plt>
  test   %rax,%rax
  je     L115
  mov    0x10(%rsp),%edx
  lea    -0x1(%rdx),%eax
  cmp    $0x1f,%eax
  jbe    L94
L115:
  lea    D80(%rip),%rdi
  call   <usage@plt>
  mov    0x10(%rsp),%edx
L94:
  cmp    $0x1e,%edx
  jg     L45
  mov    0xc(%rsp),%esi
  mov    0x14(%rsp),%edi
  mov    %edx,%ecx
  mov    $0x1,%eax
  shl    %cl,%eax
  lea    (%rsi,%rdi,1),%ecx
  cmp    %ecx,%eax
  jl     L89
L38:
  add    %esi,%edi
  call   <reed_sol_extended_vandermonde_matrix@plt>
  lea    D24(%rip),%rdi
  mov    %rax,%rbp
  call   <printf@plt>
  mov    0xc(%rsp),%edx
  mov    0x14(%rsp),%esi
  mov    %rbp,%rdi
  mov    0x10(%rsp),%ecx
  lea    D18(%rip),%rbp
  add    %edx,%esi
  call   <jerasure_print_matrix@plt>
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    0xc(%rsp),%esi
  mov    0x14(%rsp),%edi
  mov    0x10(%rsp),%edx
  add    %esi,%edi
  call   <reed_sol_big_vandermonde_distribution_matrix@plt>
  lea    D8(%rip),%rdi
  mov    %rax,%r12
  call   <printf@plt>
  mov    0xc(%rsp),%edx
  mov    0x14(%rsp),%esi
  mov    %r12,%rdi
  mov    0x10(%rsp),%ecx
  add    %edx,%esi
  call   <jerasure_print_matrix@plt>
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    0x10(%rsp),%edx
  mov    0x14(%rsp),%esi
  mov    0xc(%rsp),%edi
  call   <reed_sol_vandermonde_coding_matrix@plt>
  lea    D54(%rip),%rdi
  mov    %rax,%r12
  call   <printf@plt>
  mov    0x10(%rsp),%ecx
  mov    0xc(%rsp),%edx
  mov    %r12,%rdi
  mov    0x14(%rsp),%esi
  call   <jerasure_print_matrix@plt>
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L21
  add    $0x20,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L42:
  lea    D70(%rip),%rdi
  call   <usage@plt>
  jmp    L100
L25:
  lea    D14(%rip),%rdi
  call   <usage@plt>
  jmp    L125
L89:
  lea    D34(%rip),%rdi
  call   <usage@plt>
  mov    0x10(%rsp),%edx
L45:
  mov    0xc(%rsp),%esi
  mov    0x14(%rsp),%edi
  jmp    L38
L21:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D40
data_type: string
name: disassemble_data
arguments: label: D80
data_type: string
name: disassemble_data
arguments: label: D24
data_type: string
name: disassemble_data
arguments: label: D18
data_type: string
name: disassemble_data
arguments: label: D8
data_type: string
name: disassemble_data
arguments: label: D54
data_type: string
name: disassemble_data
arguments: label: D70
data_type: string
name: disassemble_data
arguments: label: D14
data_type: string
name: disassemble_data
arguments: label: D34
data_type: string

tool: D40: %d

tool: D80: Bad w

tool: D24: Extended Vandermonde Matrix:



tool: D18: 


tool: D8: Vandermonde Distribution Matrix:



tool: D54: Vandermonde Coding Matrix:



tool: D70: Bad m

tool: D14: Bad k

tool: D34: k + m is too big

assistant: ```c
int main(int argc, char **argv) {
  int k, w, m;
  int *matrix;
  if (argc != 4)
    usage(NULL);
  if (sscanf(argv[1], "%d", &k) == 0 || k <= 0)
    usage("Bad k");
  if (sscanf(argv[2], "%d", &m) == 0 || m <= 0)
    usage("Bad m");
  if (sscanf(argv[3], "%d", &w) == 0 || w <= 0 || w > 32)
    usage("Bad w");
  if (w <= 30 && k + m > (1 << w))
    usage("k + m is too big");
  matrix = reed_sol_extended_vandermonde_matrix(k + m, k, w);
  printf("Extended Vandermonde Matrix:\n\n");
  jerasure_print_matrix(matrix, k + m, k, w);
  printf("\n");
  matrix = reed_sol_big_vandermonde_distribution_matrix(k + m, k, w);
  printf("Vandermonde Distribution Matrix:\n\n");
  jerasure_print_matrix(matrix, k + m, k, w);
  printf("\n");
  matrix = reed_sol_vandermonde_coding_matrix(k, m, w);
  printf("Vandermonde Coding Matrix:\n\n");
  jerasure_print_matrix(matrix, m, k, w);
  printf("\n");
  return 0;
}
```