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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0xf8,%rsp
  mov    %edi,-0xb4(%rbp)
  mov    %rsi,-0xc0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  cmpl   $0x4,-0xb4(%rbp)
  je     L143
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  movl   $0x2,-0xa0(%rbp)
  movl   $0x4,-0x9c(%rbp)
  movl   $0x6,-0x98(%rbp)
  jmp    L68
L143:
  mov    -0xc0(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0xa0(%rbp)
  mov    -0xc0(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x9c(%rbp)
  mov    -0xc0(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x98(%rbp)
L68:
  mov    -0xa0(%rbp),%edx
  mov    -0x98(%rbp),%eax
  imul   %eax,%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x78(%rbp)
  movslq %edx,%rax
  mov    %rax,%r12
  mov    $0x0,%r13d
  movslq %edx,%rax
  mov    %rax,%r14
  mov    $0x0,%r15d
  movslq %edx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L169:
  cmp    %rcx,%rsp
  je     L37
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L169
L37:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  mov    %rdx,%rax
  and    $0xfff,%eax
  test   %rax,%rax
  je     L40
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L40:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x70(%rbp)
  mov    -0x98(%rbp),%edx
  mov    -0x9c(%rbp),%eax
  imul   %eax,%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x68(%rbp)
  movslq %edx,%rax
  mov    %rax,-0xd0(%rbp)
  movq   $0x0,-0xc8(%rbp)
  movslq %edx,%rax
  mov    %rax,-0xe0(%rbp)
  movq   $0x0,-0xd8(%rbp)
  movslq %edx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L117:
  cmp    %rdx,%rsp
  je     L42
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L117
L42:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L132
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L132:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x60(%rbp)
  mov    -0xa0(%rbp),%edx
  mov    -0x9c(%rbp),%eax
  imul   %edx,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x58(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0xf0(%rbp)
  movq   $0x0,-0xe8(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x100(%rbp)
  movq   $0x0,-0xf8(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L101:
  cmp    %rdx,%rsp
  je     L30
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L101
L30:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L148
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L148:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0xa0(%rbp),%edx
  mov    -0x9c(%rbp),%eax
  imul   %edx,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x110(%rbp)
  movq   $0x0,-0x108(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x120(%rbp)
  movq   $0x0,-0x118(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L17:
  cmp    %rdx,%rsp
  je     L142
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L17
L142:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L131
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L131:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x40(%rbp)
  movb   $0x4e,-0xa2(%rbp)
  movb   $0x4e,-0xa1(%rbp)
  movsd  D30(%rip),%xmm0
  movsd  %xmm0,-0x88(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  mov    -0x98(%rbp),%edx
  mov    -0xa0(%rbp),%ecx
  mov    -0x70(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <init@plt>
  mov    -0x9c(%rbp),%edx
  mov    -0x98(%rbp),%ecx
  mov    -0x60(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <init@plt>
  lea    -0x88(%rbp),%r9
  lea    -0x98(%rbp),%r8
  lea    -0x9c(%rbp),%rcx
  lea    -0xa0(%rbp),%rdx
  lea    -0xa1(%rbp),%rsi
  lea    -0xa2(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0xa0(%rbp),%rdi
  push   %rdi
  push   -0x50(%rbp)
  lea    -0x80(%rbp),%rdi
  push   %rdi
  lea    -0x98(%rbp),%rdi
  push   %rdi
  push   -0x60(%rbp)
  lea    -0xa0(%rbp),%rdi
  push   %rdi
  push   -0x70(%rbp)
  mov    %rax,%rdi
  call   <dgemm_@plt>
  add    $0x40,%rsp
  movl   $0x0,-0x94(%rbp)
  jmp    L74
L119:
  movl   $0x0,-0x90(%rbp)
  jmp    L196
L115:
  mov    -0xa0(%rbp),%eax
  imul   -0x94(%rbp),%eax
  mov    %eax,%edx
  mov    -0x90(%rbp),%eax
  add    %eax,%edx
  mov    -0x40(%rbp),%rax
  movslq %edx,%rdx
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax,%rdx,8)
  movl   $0x0,-0x8c(%rbp)
  jmp    L156
L15:
  mov    -0xa0(%rbp),%eax
  imul   -0x94(%rbp),%eax
  mov    %eax,%edx
  mov    -0x90(%rbp),%eax
  add    %eax,%edx
  mov    -0x40(%rbp),%rax
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm1
  mov    -0xa0(%rbp),%eax
  imul   -0x8c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x90(%rbp),%eax
  add    %eax,%edx
  mov    -0x70(%rbp),%rax
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm2
  mov    -0x98(%rbp),%eax
  imul   -0x94(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8c(%rbp),%eax
  add    %eax,%edx
  mov    -0x60(%rbp),%rax
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0xa0(%rbp),%eax
  imul   -0x94(%rbp),%eax
  mov    %eax,%edx
  mov    -0x90(%rbp),%eax
  add    %eax,%edx
  addsd  %xmm1,%xmm0
  mov    -0x40(%rbp),%rax
  movslq %edx,%rdx
  movsd  %xmm0,(%rax,%rdx,8)
  addl   $0x1,-0x8c(%rbp)
L156:
  mov    -0x98(%rbp),%eax
  cmp    %eax,-0x8c(%rbp)
  jl     L15
  addl   $0x1,-0x90(%rbp)
L196:
  mov    -0xa0(%rbp),%eax
  cmp    %eax,-0x90(%rbp)
  jl     L115
  addl   $0x1,-0x94(%rbp)
L74:
  mov    -0x9c(%rbp),%eax
  cmp    %eax,-0x94(%rbp)
  jl     L119
  mov    -0x98(%rbp),%ecx
  mov    -0xa0(%rbp),%edx
  mov    -0x70(%rbp),%rax
  mov    %rax,%rsi
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  call   <print@plt>
  mov    -0x9c(%rbp),%ecx
  mov    -0x98(%rbp),%edx
  mov    -0x60(%rbp),%rax
  mov    %rax,%rsi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  call   <print@plt>
  mov    -0x9c(%rbp),%ecx
  mov    -0xa0(%rbp),%edx
  mov    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <print@plt>
  mov    -0x9c(%rbp),%ecx
  mov    -0xa0(%rbp),%edx
  mov    -0x40(%rbp),%rax
  mov    %rax,%rsi
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  call   <print@plt>
  mov    $0x0,%eax
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L26
  call   <__stack_chk_fail@plt>
L26:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: tag: D36
type_infered: string
name: read_data
arguments: tag: D30
type_infered: f64
name: read_data
arguments: tag: D38
type_infered: string
name: read_data
arguments: tag: D25
type_infered: string
name: read_data
arguments: tag: D49
type_infered: string
name: read_data
arguments: tag: D41
type_infered: string

tool: D36: Using defaults


tool: D30: 1

tool: D38: A

tool: D25: B

tool: D49: C

tool: D41: D

assistant: ```c
int main(int argc, char *argv[]) {
  int rowsA, colsB, common;
  int i, j, k;
  if (argc != 4) {
    printf("Using defaults\n");
    rowsA = 2;
    colsB = 4;
    common = 6;
  } else {
    rowsA = atoi(argv[1]);
    colsB = atoi(argv[2]);
    common = atoi(argv[3]);
  }
  double A[rowsA * common];
  double B[common * colsB];
  double C[rowsA * colsB];
  double D[rowsA * colsB];
  char transA = 'N', transB = 'N';
  double one = 1.0, zero = 0.0;
  srand(time(NULL));
  init(A, rowsA, common);
  init(B, common, colsB);
  dgemm_(&transA, &transB, &rowsA, &colsB, &common, &one, A, &rowsA, B, &common, &zero, C, &rowsA);
  for (i = 0; i < colsB; i++) {
    for (j = 0; j < rowsA; j++) {
      D[i * rowsA + j] = 0;
      for (k = 0; k < common; k++) {
        D[i * rowsA + j] += A[k * rowsA + j] * B[k + common * i];
      }
    }
  }
  print("A", A, rowsA, common);
  print("B", B, common, colsB);
  print("C", C, rowsA, colsB);
  print("D", D, rowsA, colsB);
  return 0;
}
```