user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  lea    D12(%rip),%rbp
  push   %rbx
  mov    %rbp,%rdi
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rdx
  lea    0xc(%rsp),%rsi
  call   <scanf@plt>
  mov    0x8(%rsp),%edi
  imul   0xc(%rsp),%edi
  shl    $0x3,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  mov    0x8(%rsp),%eax
  imul   0xc(%rsp),%eax
  test   %eax,%eax
  jle    L74
  mov    %r13,%r14
  xor    %ebx,%ebx
  lea    D30(%rip),%r12
  cs nopw 0x0(%rax,%rax,1)
L39:
  mov    %r14,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <scanf@plt>
  mov    0x8(%rsp),%eax
  imul   0xc(%rsp),%eax
  add    $0x4,%r14
  cmp    %ebx,%eax
  jg     L39
L74:
  lea    0x10(%rsp),%rdx
  lea    0x14(%rsp),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x10(%rsp),%edi
  imul   0x14(%rsp),%edi
  shl    $0x3,%edi
  call   <malloc@plt>
  mov    0x10(%rsp),%edi
  mov    %rax,%r14
  mov    0x14(%rsp),%eax
  imul   %edi,%eax
  test   %eax,%eax
  jle    L63
  mov    %r14,%rbp
  xor    %ebx,%ebx
  lea    D30(%rip),%r12
  nopl   0x0(%rax)
L24:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <scanf@plt>
  mov    0x10(%rsp),%edi
  mov    0x14(%rsp),%eax
  add    $0x4,%rbp
  imul   %edi,%eax
  cmp    %ebx,%eax
  jg     L24
L63:
  imul   0xc(%rsp),%edi
  shl    $0x3,%edi
  call   <malloc@plt>
  sub    $0x8,%rsp
  mov    %r13,%rdx
  mov    %r14,%r9
  push   %rax
  mov    0x20(%rsp),%r8d
  mov    %rax,%rbp
  mov    0x24(%rsp),%ecx
  mov    0x18(%rsp),%esi
  mov    0x1c(%rsp),%edi
  call   <matmul@plt>
  pop    %rdx
  pop    %rcx
  cmp    $0x1,%eax
  je     L11
  mov    0x10(%rsp),%edx
  mov    0xc(%rsp),%esi
  lea    D26(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x10(%rsp),%eax
  imul   0xc(%rsp),%eax
  test   %eax,%eax
  jle    L16
  xor    %ebx,%ebx
  lea    D35(%rip),%r12
  nop
L14:
  mov    0x0(%rbp,%rbx,4),%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  mov    0xc(%rsp),%eax
  imul   0x10(%rsp),%eax
  cmp    %ebx,%eax
  jg     L14
L16:
  mov    $0xa,%edi
  call   <putchar@plt>
  xor    %eax,%eax
L11:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L13
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L13:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D12
type: string
name: extract_symbolic_data
arguments: tag: D30
type: string
name: extract_symbolic_data
arguments: tag: D26
type: string
name: extract_symbolic_data
arguments: tag: D35
type: string

tool: D12: %d %d

tool: D30: %d

tool: D26: %d %d 

tool: D35: %d 

assistant: ```c
int main() {
  int w1, h1, w2, h2;
  int *m1, *m2, *m3;
  int i;
  scanf("%d %d", &h1, &w1);
  m1 = malloc((w1 * h1) * sizeof(m1));
  for (i = 0; i < w1 * h1; i++) {
    scanf("%d", &m1[i]);
  }
  scanf("%d %d", &h2, &w2);
  m2 = malloc((w2 * h2) * sizeof(m2));
  for (i = 0; i < w2 * h2; i++) {
    scanf("%d", &m2[i]);
  }
  m3 = malloc((h1 * w2) * sizeof(m3));
  int ret = matmul(h1, w1, m1, h2, w2, m2, m3);
  if (ret == 1) {
    return 1;
  }
  printf("%d %d ", h1, w2);
  for (i = 0; i < h1 * w2; i++) {
    printf("%d ", m3[i]);
  }
  printf("\n");
  return 0;
}
```