ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 这段汇编代码用C语言表示是什么样的?

```asm
<stxmWithMask>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x2c(%rbp)
  mov    %r8d,-0x30(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L4
L26:
  movl   $0x0,-0x8(%rbp)
  jmp    L11
L15:
  mov    -0x28(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x4(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x4(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x28(%rbp),%rax
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x8(%rbp)
L11:
  mov    -0x8(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L15
  addl   $0x1,-0x4(%rbp)
L4:
  mov    -0x4(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L26
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void stxmWithMask(double *x, double *y, double *out, int m, int n) {
  int col;
  int row;
  for (row = 0; row < m; row++) {
    for (col = 0; col < n; col++) {
      *out += x[row * m + col] * y[row * m + col];
    }
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<stxmWithMask>:
  endbr64
  test   %ecx,%ecx
  jle    L48
  push   %rbx
  mov    %ecx,%r11d
  mov    $0x0,%r10d
  mov    $0x0,%r9d
  mov    %r8d,%ebx
  jmp    L38
L45:
  movslq %r10d,%rcx
  lea    0x0(,%rcx,8),%rax
  add    %rbx,%rcx
  shl    $0x3,%rcx
L35:
  movsd  (%rdi,%rax,1),%xmm0
  mulsd  (%rsi,%rax,1),%xmm0
  addsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L35
L47:
  add    $0x1,%r9d
  add    %r11d,%r10d
  cmp    %r9d,%r11d
  je     L51
L38:
  test   %r8d,%r8d
  jg     L45
  jmp    L47
L51:
  pop    %rbx
  ret
L48:
  ret
```

assistant: ```c
void stxmWithMask(double *x, double *y, double *out, int m, int n) {
  int col;
  int row;
  for (row = 0; row < m; row++) {
    for (col = 0; col < n; col++) {
      *out += x[row * m + col] * y[row * m + col];
    }
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<stxmWithMask>:
  endbr64
  test   %ecx,%ecx
  jle    L28
  push   %rbx
  mov    %rsi,%r9
  xor    %r11d,%r11d
  mov    %rdx,%rsi
  xor    %r10d,%r10d
  movslq %r8d,%rbx
  nopl   0x0(%rax,%rax,1)
L12:
  test   %r8d,%r8d
  jle    L31
  movslq %r11d,%rdx
  movsd  (%rsi),%xmm1
  lea    0x0(,%rdx,8),%rax
  add    %rbx,%rdx
  shl    $0x3,%rdx
  nopl   0x0(%rax,%rax,1)
L24:
  movsd  (%rdi,%rax,1),%xmm0
  mulsd  (%r9,%rax,1),%xmm0
  add    $0x8,%rax
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi)
  cmp    %rax,%rdx
  jne    L24
L31:
  add    $0x1,%r10d
  add    %ecx,%r11d
  cmp    %r10d,%ecx
  jne    L12
  pop    %rbx
  ret
L28:
  ret
```

assistant: ```c
void stxmWithMask(double *x, double *y, double *out, int m, int n) {
  int col;
  int row;
  for (row = 0; row < m; row++) {
    for (col = 0; col < n; col++) {
      *out += x[row * m + col] * y[row * m + col];
    }
  }
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<stxmWithMask>:
  endbr64
  mov    %rsi,%r9
  mov    %rdx,%rsi
  test   %ecx,%ecx
  jle    L22
  test   %r8d,%r8d
  jle    L22
  mov    %r8d,%r10d
  movslq %ecx,%r11
  xor    %r8d,%r8d
  lea    0x0(,%r10,8),%rdx
  neg    %r10
  shl    $0x3,%r11
  shl    $0x3,%r10
  nop
L35:
  movsd  (%rsi),%xmm1
  lea    (%r10,%rdx,1),%rax
  nopl   0x0(%rax,%rax,1)
L1:
  movsd  (%rdi,%rax,1),%xmm0
  mulsd  (%r9,%rax,1),%xmm0
  add    $0x8,%rax
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi)
  cmp    %rax,%rdx
  jne    L1
  add    $0x1,%r8d
  add    %r11,%rdx
  cmp    %r8d,%ecx
  jne    L35
L22:
  ret
```

assistant: ```c
void stxmWithMask(double *x, double *y, double *out, int m, int n) {
  int col;
  int row;
  for (row = 0; row < m; row++) {
    for (col = 0; col < n; col++) {
      *out += x[row * m + col] * y[row * m + col];
    }
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<format_z>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  cmpl   $0x9,-0x24(%rbp)
  ja     L30
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  add    %eax,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    -0x20(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x4(%rbp),%edx
  mov    -0x18(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L11
L17:
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x25,%al
  jne    L66
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x7a,%al
  jne    L66
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  add    %rax,%rdx
  movzbl (%rcx),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x8(%rbp)
  addl   $0x1,-0xc(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  add    %rdx,%rax
  movb   $0x2e,(%rax)
  addl   $0x1,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x24(%rbp),%eax
  mov    %eax,%edx
  lea    D6(%rip),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <sprintf@plt>
  addl   $0x1,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  add    %rdx,%rax
  movb   $0x66,(%rax)
  addl   $0x1,-0x8(%rbp)
  jmp    L18
L66:
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  add    %rax,%rdx
  movzbl (%rcx),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x8(%rbp)
L18:
  addl   $0x1,-0xc(%rbp)
L11:
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xc(%rbp)
  jb     L17
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L37
L30:
  nop
L37:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D6
type_guessed: string

tool: D6: %d

assistant: ```c
void format_z(char *format, char **format2, unsigned int number) {
  unsigned int i, j, s;
  if (number > 9)
    return;
  s = strlen(format) + 1;
  *format2 = malloc(2 * s);
  memcpy(*format2, format, s);
  j = 0;
  for (i = 0; i < s - 1; i++) {
    if (format[i] == '%' && format[i + 1] == 'z') {
      (*format2)[j] = format[i];
      j++;
      i += 1;
      (*format2)[j] = '.';
      j++;
      sprintf(&(*format2)[j], "%d", number);
      j++;
      (*format2)[j] = 'f';
      j++;
    } else {
      (*format2)[j] = format[i];
      j++;
    }
  }
  (*format2)[j] = 0;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<format_z>:
  endbr64
  cmp    $0x9,%edx
  jbe    L1
  ret
L1:
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r12
  mov    %edx,%r14d
  call   <strlen@plt>
  mov    %eax,%r13d
  lea    0x1(%rax),%ebx
  lea    (%rbx,%rbx,1),%edi
  call   <malloc@plt>
  mov    %rax,%rdi
  mov    %rax,(%r12)
  mov    %ebx,%edx
  mov    %rbp,%rsi
  call   <memcpy@plt>
  test   %r13d,%r13d
  je     L46
  mov    $0x0,%ebx
  mov    $0x0,%eax
  jmp    L68
L35:
  mov    %ebx,%ecx
  mov    (%r12),%rsi
  mov    %dl,(%rsi,%rcx,1)
  add    $0x1,%ebx
L44:
  add    $0x1,%eax
  cmp    %r13d,%eax
  jae    L66
L68:
  mov    %eax,%edx
  movzbl 0x0(%rbp,%rdx,1),%edx
  cmp    $0x25,%dl
  jne    L35
  lea    0x1(%rax),%r15d
  mov    %r15d,%ecx
  cmpb   $0x7a,0x0(%rbp,%rcx,1)
  jne    L35
  mov    %ebx,%eax
  mov    (%r12),%rdx
  movb   $0x25,(%rdx,%rax,1)
  lea    0x1(%rbx),%eax
  mov    (%r12),%rdx
  movb   $0x2e,(%rdx,%rax,1)
  lea    0x2(%rbx),%edi
  add    (%r12),%rdi
  mov    %r14d,%edx
  lea    D2(%rip),%rsi
  call   <sprintf@plt>
  lea    0x3(%rbx),%eax
  mov    (%r12),%rdx
  movb   $0x66,(%rdx,%rax,1)
  add    $0x4,%ebx
  mov    %r15d,%eax
  jmp    L44
L46:
  mov    %r13d,%ebx
L66:
  mov    %ebx,%ebx
  mov    (%r12),%rax
  movb   $0x0,(%rax,%rbx,1)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D2
data_type: string

tool: D2: %d

assistant: ```c
void format_z(char *format, char **format2, unsigned int number) {
  unsigned int i, j, s;
  if (number > 9)
    return;
  s = strlen(format) + 1;
  *format2 = malloc(2 * s);
  memcpy(*format2, format, s);
  j = 0;
  for (i = 0; i < s - 1; i++) {
    if (format[i] == '%' && format[i + 1] == 'z') {
      (*format2)[j] = format[i];
      j++;
      i += 1;
      (*format2)[j] = '.';
      j++;
      sprintf(&(*format2)[j], "%d", number);
      j++;
      (*format2)[j] = 'f';
      j++;
    } else {
      (*format2)[j] = format[i];
      j++;
    }
  }
  (*format2)[j] = 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<format_z>:
  endbr64
  cmp    $0x9,%edx
  jbe    L74
  ret
  nopw   0x0(%rax,%rax,1)
L74:
  push   %r15
  mov    %edx,%r15d
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <strlen@plt>
  lea    0x1(%rax),%ebx
  mov    %eax,%r14d
  lea    (%rbx,%rbx,1),%edi
  call   <malloc@plt>
  mov    %ebx,%edx
  mov    %r12,%rsi
  mov    %rax,0x0(%r13)
  mov    %rax,%rdi
  call   <memcpy@plt>
  test   %r14d,%r14d
  je     L77
  xor    %ebp,%ebp
  xor    %ebx,%ebx
  lea    D2(%rip),%r8
  jmp    L28
  nopl   0x0(%rax)
L64:
  mov    %ecx,%ebx
  mov    %dl,(%rax)
  mov    %esi,%ebp
  cmp    %ebx,%r14d
  jbe    L70
L28:
  mov    %ebx,%eax
  lea    0x1(%rbx),%ecx
  lea    0x1(%rbp),%esi
  movzbl (%r12,%rax,1),%edx
  mov    %ebp,%eax
  add    0x0(%r13),%rax
  cmp    $0x25,%dl
  jne    L64
  mov    %ecx,%edi
  cmpb   $0x7a,(%r12,%rdi,1)
  jne    L64
  movb   $0x25,(%rax)
  mov    0x0(%r13),%rax
  lea    0x2(%rbp),%edi
  mov    %r15d,%edx
  add    $0x2,%ebx
  movb   $0x2e,(%rax,%rsi,1)
  mov    %r8,%rsi
  add    0x0(%r13),%rdi
  call   <sprintf@plt>
  mov    0x0(%r13),%rdx
  lea    0x3(%rbp),%eax
  lea    D2(%rip),%r8
  add    $0x4,%ebp
  movb   $0x66,(%rdx,%rax,1)
  cmp    %ebx,%r14d
  ja     L28
L70:
  mov    0x0(%r13),%rax
  movb   $0x0,(%rax,%rbp,1)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L77:
  xor    %ebp,%ebp
  jmp    L70
```

tool_calls: name: extract_symbolic_data
arguments: tag: D2
type: string

tool: D2: %d

assistant: ```c
void format_z(char *format, char **format2, unsigned int number) {
  unsigned int i, j, s;
  if (number > 9)
    return;
  s = strlen(format) + 1;
  *format2 = malloc(2 * s);
  memcpy(*format2, format, s);
  j = 0;
  for (i = 0; i < s - 1; i++) {
    if (format[i] == '%' && format[i + 1] == 'z') {
      (*format2)[j] = format[i];
      j++;
      i += 1;
      (*format2)[j] = '.';
      j++;
      sprintf(&(*format2)[j], "%d", number);
      j++;
      (*format2)[j] = 'f';
      j++;
    } else {
      (*format2)[j] = format[i];
      j++;
    }
  }
  (*format2)[j] = 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<format_z>:
  endbr64
  cmp    $0x9,%edx
  jbe    L25
  ret
  nopw   0x0(%rax,%rax,1)
L25:
  push   %r15
  mov    %edx,%r15d
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <strlen@plt>
  lea    0x1(%rax),%ebx
  mov    %eax,%r14d
  lea    (%rbx,%rbx,1),%edi
  call   <malloc@plt>
  mov    %ebx,%edx
  mov    %r12,%rsi
  mov    %rax,0x0(%r13)
  mov    %rax,%rdi
  call   <memcpy@plt>
  test   %r14d,%r14d
  je     L76
  xor    %ebp,%ebp
  xor    %ebx,%ebx
  lea    D5(%rip),%r8
  jmp    L75
  nopl   0x0(%rax)
L21:
  mov    %ecx,%ebx
  mov    %dl,(%rax)
  mov    %esi,%ebp
  cmp    %ebx,%r14d
  jbe    L32
L75:
  mov    %ebx,%eax
  lea    0x1(%rbx),%ecx
  lea    0x1(%rbp),%esi
  movzbl (%r12,%rax,1),%edx
  mov    %ebp,%eax
  add    0x0(%r13),%rax
  cmp    $0x25,%dl
  jne    L21
  mov    %ecx,%edi
  cmpb   $0x7a,(%r12,%rdi,1)
  jne    L21
  movb   $0x25,(%rax)
  mov    0x0(%r13),%rax
  lea    0x2(%rbp),%edi
  mov    %r15d,%edx
  add    $0x2,%ebx
  movb   $0x2e,(%rax,%rsi,1)
  mov    %r8,%rsi
  add    0x0(%r13),%rdi
  call   <sprintf@plt>
  mov    0x0(%r13),%rdx
  lea    0x3(%rbp),%eax
  lea    D5(%rip),%r8
  add    $0x4,%ebp
  movb   $0x66,(%rdx,%rax,1)
  cmp    %ebx,%r14d
  ja     L75
L32:
  mov    0x0(%r13),%rax
  movb   $0x0,(%rax,%rbp,1)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L76:
  xor    %ebp,%ebp
  jmp    L32
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D5
data_type: string

tool: D5: %d

assistant: ```c
void format_z(char *format, char **format2, unsigned int number) {
  unsigned int i, j, s;
  if (number > 9)
    return;
  s = strlen(format) + 1;
  *format2 = malloc(2 * s);
  memcpy(*format2, format, s);
  j = 0;
  for (i = 0; i < s - 1; i++) {
    if (format[i] == '%' && format[i + 1] == 'z') {
      (*format2)[j] = format[i];
      j++;
      i += 1;
      (*format2)[j] = '.';
      j++;
      sprintf(&(*format2)[j], "%d", number);
      j++;
      (*format2)[j] = 'f';
      j++;
    } else {
      (*format2)[j] = format[i];
      j++;
    }
  }
  (*format2)[j] = 0;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<tmult>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %ecx,-0x5c(%rbp)
  mov    %r8d,-0x60(%rbp)
  mov    %r9d,-0x64(%rbp)
  mov    -0x60(%rbp),%eax
  cltq
  mov    %eax,%edx
  mov    -0x64(%rbp),%eax
  cltq
  imul   %edx,%eax
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x28(%rbp),%rcx
  mov    -0x64(%rbp),%edx
  mov    -0x60(%rbp),%esi
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <mtranspose@plt>
  mov    -0x60(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  mov    $0x0,%ebx
  jmp    L18
L41:
  mov    $0x0,%r12d
  jmp    L45
L15:
  mov    %ebx,%eax
  imul   -0x38(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  mov    %ebx,%eax
  imul   -0x64(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  add    %r12d,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    $0x0,%r13d
  jmp    L40
L30:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x34(%rbp),%eax
  add    %r13d,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    %r12d,%eax
  imul   -0x38(%rbp),%eax
  add    %r13d,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%r13d
L40:
  cmp    -0x38(%rbp),%r13d
  jl     L30
  add    $0x1,%r12d
L45:
  cmp    -0x64(%rbp),%r12d
  jl     L15
  add    $0x1,%ebx
L18:
  cmp    -0x5c(%rbp),%ebx
  jl     L41
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  add    $0x58,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

assistant: ```c
void tmult(double *A, double *B, double *C, int ra, int ca, int cb) {
  register int i, j, k;
  int u, v, t, rb;
  double *BT;
  BT = (double *)malloc(sizeof(double) * ca * cb);
  mtranspose(B, ca, cb, BT);
  rb = ca;
#pragma omp parallel for private(i, j, k, v, u, t)
  for (i = 0; i < ra; ++i) {
    for (j = 0; j < cb; ++j) {
      v = i * rb;
      u = i * cb;
      t = j + u;
      C[t] = 0.;
      for (k = 0; k < rb; ++k) {
        C[t] += A[k + v] * BT[k + j * rb];
      }
    }
  }
  free(BT);
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<tmult>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,%r12
  mov    %rdx,0x10(%rsp)
  mov    %ecx,%r15d
  mov    %ecx,0x1c(%rsp)
  mov    %r8d,%ebx
  mov    %r9d,%r14d
  mov    %r9d,%edi
  imul   %r8d,%edi
  shl    $0x3,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  mov    %rax,%rcx
  mov    %r14d,0x18(%rsp)
  mov    %r14d,%edx
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <mtranspose@plt>
  test   %r15d,%r15d
  jle    L29
  mov    $0x0,%r15d
  mov    $0x0,%r14d
  mov    $0x0,%r13d
  mov    0x18(%rsp),%eax
  lea    -0x1(%rax),%edi
  mov    %rdi,0x20(%rsp)
  mov    0x10(%rsp),%rax
  add    $0x8,%rax
  mov    %rax,0x28(%rsp)
  lea    -0x1(%rbx),%r12d
  lea    0x8(%rbp),%r11
  jmp    L21
L61:
  movslq %r14d,%rax
  mov    0x10(%rsp),%rdi
  lea    (%rdi,%rax,8),%rdi
  add    0x20(%rsp),%rax
  mov    0x28(%rsp),%rsi
  lea    (%rsi,%rax,8),%r10
  movslq %r15d,%r9
  shl    $0x3,%r9
  mov    $0x0,%r8d
  sub    %rbp,%r9
L47:
  mov    %rdi,%rdx
  movq   $0x0,(%rdi)
  test   %ebx,%ebx
  jle    L52
  movslq %r8d,%rcx
  lea    0x0(%rbp,%rcx,8),%rax
  lea    (%r12,%rcx,1),%rsi
  lea    (%r11,%rsi,8),%rsi
  neg    %rcx
  lea    (%r9,%rcx,8),%rcx
  add    0x8(%rsp),%rcx
L39:
  movsd  (%rcx,%rax,1),%xmm0
  mulsd  (%rax),%xmm0
  addsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L39
L52:
  add    $0x8,%rdi
  add    %ebx,%r8d
  cmp    %r10,%rdi
  jne    L47
L25:
  add    $0x1,%r13d
  add    0x18(%rsp),%r14d
  add    %ebx,%r15d
  cmp    %r13d,0x1c(%rsp)
  je     L29
L21:
  cmpl   $0x0,0x18(%rsp)
  jg     L61
  jmp    L25
L29:
  mov    %rbp,%rdi
  call   <free@plt>
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void tmult(double *A, double *B, double *C, int ra, int ca, int cb) {
  register int i, j, k;
  int u, v, t, rb;
  double *BT;
  BT = (double *)malloc(sizeof(double) * ca * cb);
  mtranspose(B, ca, cb, BT);
  rb = ca;
#pragma omp parallel for private(i, j, k, v, u, t)
  for (i = 0; i < ra; ++i) {
    for (j = 0; j < cb; ++j) {
      v = i * rb;
      u = i * cb;
      t = j + u;
      C[t] = 0.;
      for (k = 0; k < rb; ++k) {
        C[t] += A[k + v] * BT[k + j * rb];
      }
    }
  }
  free(BT);
}
```
user: What is the c source code of the assembly code below:

```asm
<tmult>:
  endbr64
  push   %r15
  mov    %r9d,%r15d
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  mov    %r9d,%edi
  push   %rbx
  imul   %r8d,%edi
  mov    %r8d,%ebx
  sub    $0x38,%rsp
  shl    $0x3,%edi
  mov    %rdx,0x10(%rsp)
  mov    %ecx,0x1c(%rsp)
  call   <malloc@plt>
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    %rax,%rcx
  mov    %r15d,0xc(%rsp)
  mov    %rax,%r12
  call   <mtranspose@plt>
  test   %r14d,%r14d
  jle    L56
  mov    0xc(%rsp),%eax
  xor    %r15d,%r15d
  xor    %r14d,%r14d
  pxor   %xmm2,%xmm2
  movl   $0x0,0x18(%rsp)
  lea    -0x1(%rbx),%r13d
  lea    0x8(%r12),%r11
  lea    -0x1(%rax),%edi
  mov    0x10(%rsp),%rax
  mov    %rdi,0x20(%rsp)
  add    $0x8,%rax
  mov    %rax,0x28(%rsp)
  nop
L36:
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L44
  mov    0x10(%rsp),%rdi
  movslq %r15d,%rax
  movslq 0x18(%rsp),%r9
  lea    (%rdi,%rax,8),%rdx
  mov    0x28(%rsp),%rdi
  add    0x20(%rsp),%rax
  shl    $0x3,%r9
  sub    %r12,%r9
  lea    (%rdi,%rax,8),%r10
  xor    %edi,%edi
L27:
  movq   $0x0,(%rdx)
  test   %ebx,%ebx
  jle    L48
  movslq %edi,%rcx
  movapd %xmm2,%xmm1
  lea    0x0(,%rcx,8),%r8
  add    %r13,%rcx
  lea    (%r11,%rcx,8),%rsi
  mov    %r9,%rcx
  lea    (%r12,%r8,1),%rax
  sub    %r8,%rcx
  add    %rbp,%rcx
  xchg   %ax,%ax
L34:
  movsd  (%rcx,%rax,1),%xmm0
  mulsd  (%rax),%xmm0
  add    $0x8,%rax
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdx)
  cmp    %rax,%rsi
  jne    L34
L48:
  add    $0x8,%rdx
  add    %ebx,%edi
  cmp    %r10,%rdx
  jne    L27
L44:
  add    %ebx,0x18(%rsp)
  add    $0x1,%r14d
  add    0xc(%rsp),%r15d
  cmp    %r14d,0x1c(%rsp)
  jne    L36
L56:
  add    $0x38,%rsp
  mov    %r12,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <free@plt>
```

assistant: ```c
void tmult(double *A, double *B, double *C, int ra, int ca, int cb) {
  register int i, j, k;
  int u, v, t, rb;
  double *BT;
  BT = (double *)malloc(sizeof(double) * ca * cb);
  mtranspose(B, ca, cb, BT);
  rb = ca;
#pragma omp parallel for private(i, j, k, v, u, t)
  for (i = 0; i < ra; ++i) {
    for (j = 0; j < cb; ++j) {
      v = i * rb;
      u = i * cb;
      t = j + u;
      C[t] = 0.;
      for (k = 0; k < rb; ++k) {
        C[t] += A[k + v] * BT[k + j * rb];
      }
    }
  }
  free(BT);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<tmult>:
  endbr64
  push   %r15
  movslq %r9d,%rax
  push   %r14
  mov    %rax,%r15
  mov    %rsi,%r14
  push   %r13
  movslq %r8d,%r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  mov    %r13d,%edi
  push   %rbx
  imul   %eax,%edi
  sub    $0x38,%rsp
  shl    $0x3,%edi
  mov    %rdx,0x8(%rsp)
  mov    %ecx,0x14(%rsp)
  mov    %rax,0x18(%rsp)
  call   <malloc@plt>
  mov    %r15d,%edx
  mov    %r13d,%esi
  mov    %r14,%rdi
  mov    %rax,%rcx
  mov    %rax,%r12
  call   <mtranspose@plt>
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  jle    L21
  test   %r15d,%r15d
  jle    L21
  movslq %r15d,%rax
  mov    0x8(%rsp),%rdi
  mov    %r13,%rbx
  xor    %r14d,%r14d
  shl    $0x3,%rax
  pxor   %xmm2,%xmm2
  lea    0x8(%r12),%r11
  movl   $0x0,0x10(%rsp)
  mov    %rax,0x20(%rsp)
  lea    -0x1(%r15),%eax
  xor    %r15d,%r15d
  lea    0x8(%rdi,%rax,8),%r9
  lea    0x0(,%r13,8),%rax
  mov    %rax,0x28(%rsp)
  lea    -0x1(%r13),%r13d
  nopl   0x0(%rax,%rax,1)
L52:
  mov    0x8(%rsp),%rax
  mov    %r14,%r10
  xor    %edi,%edi
  sub    %r12,%r10
  lea    (%rax,%r15,8),%rdx
  nopl   0x0(%rax)
L18:
  movq   $0x0,(%rdx)
  test   %ebx,%ebx
  jle    L46
  movslq %edi,%rcx
  movapd %xmm2,%xmm1
  lea    0x0(,%rcx,8),%r8
  add    %r13,%rcx
  lea    (%r11,%rcx,8),%rsi
  mov    %r10,%rcx
  lea    (%r12,%r8,1),%rax
  sub    %r8,%rcx
  add    %rbp,%rcx
  cs nopw 0x0(%rax,%rax,1)
L54:
  movsd  (%rcx,%rax,1),%xmm0
  mulsd  (%rax),%xmm0
  add    $0x8,%rax
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdx)
  cmp    %rax,%rsi
  jne    L54
L46:
  add    $0x8,%rdx
  add    %ebx,%edi
  cmp    %r9,%rdx
  jne    L18
  addl   $0x1,0x10(%rsp)
  add    0x20(%rsp),%r9
  mov    0x10(%rsp),%eax
  add    0x28(%rsp),%r14
  add    0x18(%rsp),%r15
  cmp    %eax,0x14(%rsp)
  jne    L52
L21:
  add    $0x38,%rsp
  mov    %r12,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <free@plt>
```

assistant: ```c
void tmult(double *A, double *B, double *C, int ra, int ca, int cb) {
  register int i, j, k;
  int u, v, t, rb;
  double *BT;
  BT = (double *)malloc(sizeof(double) * ca * cb);
  mtranspose(B, ca, cb, BT);
  rb = ca;
#pragma omp parallel for private(i, j, k, v, u, t)
  for (i = 0; i < ra; ++i) {
    for (j = 0; j < cb; ++j) {
      v = i * rb;
      u = i * cb;
      t = j + u;
      C[t] = 0.;
      for (k = 0; k < rb; ++k) {
        C[t] += A[k + v] * BT[k + j * rb];
      }
    }
  }
  free(BT);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<reopen_pipe>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    -0x28(%rbp),%rdx
  mov    -0x1c(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <close_pipe@plt>
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <open_pipe@plt>
  mov    %eax,-0x4(%rbp)
  nop
  leave
  ret
```

assistant: ```c
int reopen_pipe(const char *p_path, int curr_fd, fd_set *p_rset) {
  int fifod;
  close_pipe(curr_fd, p_rset);
  fifod = open_pipe(p_path, p_rset);
}
```