ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<os_mode_fd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <fchmod@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <CATCH_EINTR@plt>
  cmpl   $0x0,-0x4(%rbp)
  jns    L4
  mov    D9(%rip),%rax
  mov    (%rax),%eax
  neg    %eax
  jmp    L19
L4:
  mov    $0x0,%eax
L19:
  leave
  ret
```

assistant: ```c
int os_mode_fd(int fd, int mode) {
  int err;
  CATCH_EINTR(err = fchmod(fd, mode));
  if (err < 0)
    return -errno;
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<os_mode_fd>:
  endbr64
  push   %rbx
  call   <fchmod@plt>
  mov    %eax,%ebx
  mov    %eax,%edi
  call   <CATCH_EINTR@plt>
  mov    $0x0,%eax
  test   %ebx,%ebx
  js     L10
L19:
  pop    %rbx
  ret
L10:
  mov    D9(%rip),%rax
  mov    (%rax),%eax
  neg    %eax
  jmp    L19
```

assistant: ```c
int os_mode_fd(int fd, int mode) {
  int err;
  CATCH_EINTR(err = fchmod(fd, mode));
  if (err < 0)
    return -errno;
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<os_mode_fd>:
  endbr64
  push   %rbx
  call   <fchmod@plt>
  mov    %eax,%ebx
  mov    %eax,%edi
  call   <CATCH_EINTR@plt>
  xor    %eax,%eax
  test   %ebx,%ebx
  js     L2
  pop    %rbx
  ret
  nopl   0x0(%rax,%rax,1)
L2:
  mov    D7(%rip),%rax
  pop    %rbx
  mov    (%rax),%eax
  neg    %eax
  ret
```

assistant: ```c
int os_mode_fd(int fd, int mode) {
  int err;
  CATCH_EINTR(err = fchmod(fd, mode));
  if (err < 0)
    return -errno;
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<os_mode_fd>:
  endbr64
  push   %rbx
  call   <fchmod@plt>
  mov    %eax,%ebx
  mov    %eax,%edi
  call   <CATCH_EINTR@plt>
  xor    %eax,%eax
  test   %ebx,%ebx
  js     L6
  pop    %rbx
  ret
  nopl   0x0(%rax,%rax,1)
L6:
  mov    D0(%rip),%rax
  pop    %rbx
  mov    (%rax),%eax
  neg    %eax
  ret
```

assistant: ```c
int os_mode_fd(int fd, int mode) {
  int err;
  CATCH_EINTR(err = fchmod(fd, mode));
  if (err < 0)
    return -errno;
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<assertion>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %edx,-0x14(%rbp)
  mov    -0x14(%rbp),%ecx
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x6c,%edi
  call   <exit@plt>
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D6
type_infered: string

tool: D6: Assertion failed: %s, file %s, line %u

assistant: ```c
void assertion(char const *const expr, char const *const file, unsigned int line) {
  printf("Assertion failed: %s, file %s, line %u", expr, file, line);
  exit('fail');
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<assertion>:
  endbr64
  sub    $0x8,%rsp
  mov    %edx,%ecx
  mov    %rsi,%rdx
  mov    %rdi,%rsi
  lea    D7(%rip),%rdi
  call   <printf@plt>
  mov    $0x6c,%edi
  call   <exit@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: disassemble_data
arguments: label: D7
type_guessed: string

tool: D7: Assertion failed: %s, file %s, line %u

assistant: ```c
void assertion(char const *const expr, char const *const file, unsigned int line) {
  printf("Assertion failed: %s, file %s, line %u", expr, file, line);
  exit('fail');
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<assertion>:
  endbr64
  sub    $0x8,%rsp
  mov    %edx,%ecx
  mov    %rsi,%rdx
  mov    %rdi,%rsi
  lea    D6(%rip),%rdi
  call   <printf@plt>
  mov    $0x6c,%edi
  add    $0x8,%rsp
  jmp    1070 <exit@plt>
```

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

tool: D6: Assertion failed: %s, file %s, line %u

assistant: ```c
void assertion(char const *const expr, char const *const file, unsigned int line) {
  printf("Assertion failed: %s, file %s, line %u", expr, file, line);
  exit('fail');
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<assertion>:
  endbr64
  sub    $0x8,%rsp
  mov    %edx,%ecx
  mov    %rsi,%rdx
  mov    %rdi,%rsi
  lea    D4(%rip),%rdi
  call   <printf@plt>
  mov    $0x6c,%edi
  add    $0x8,%rsp
  jmp    1070 <exit@plt>
```

tool_calls: name: read_data
arguments: data_tag: D4
datatype: string

tool: D4: Assertion failed: %s, file %s, line %u

assistant: ```c
void assertion(char const *const expr, char const *const file, unsigned int line) {
  printf("Assertion failed: %s, file %s, line %u", expr, file, line);
  exit('fail');
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<sendmsg_to_client>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %edi,-0x64(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x70(%rbp),%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1,%rax
  mov    %rax,-0x48(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x18(%rbp)
  lea    -0x50(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  movl   $0x1,-0x40(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x38(%rbp)
  lea    -0x40(%rbp),%rcx
  mov    -0x64(%rbp),%eax
  mov    $0x0,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <sendmsg@plt>
  mov    %eax,-0x54(%rbp)
  mov    -0x54(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

assistant: ```c
int sendmsg_to_client(int s, char *ms) {
  struct msghdr msg;
  struct iovec iov;
  int sl;
  iov.iov_base = ms;
  iov.iov_len = strlen(ms) + 1;
  msg.msg_name = NULL;
  msg.msg_namelen = 0;
  msg.msg_iov = &iov;
  msg.msg_iovlen = 1;
  msg.msg_control = NULL;
  msg.msg_controllen = 0;
  msg.msg_flags = 0;
  sl = sendmsg(s, &msg, 0);
  return sl;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<sendmsg_to_client>:
  endbr64
  push   %rbx
  sub    $0x50,%rsp
  mov    %edi,%ebx
  mov    %rsi,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  mov    %rsi,(%rsp)
  call   <strlen@plt>
  add    $0x1,%rax
  mov    %rax,0x8(%rsp)
  movq   $0x0,0x40(%rsp)
  movq   $0x0,0x38(%rsp)
  mov    %rsp,%rax
  mov    %rax,0x30(%rsp)
  movl   $0x1,0x10(%rsp)
  movq   $0x0,0x28(%rsp)
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x18(%rsp)
  lea    0x10(%rsp),%rsi
  mov    $0x0,%edx
  mov    %ebx,%edi
  call   <sendmsg@plt>
  mov    0x48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L1
  add    $0x50,%rsp
  pop    %rbx
  ret
L1:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int sendmsg_to_client(int s, char *ms) {
  struct msghdr msg;
  struct iovec iov;
  int sl;
  iov.iov_base = ms;
  iov.iov_len = strlen(ms) + 1;
  msg.msg_name = NULL;
  msg.msg_namelen = 0;
  msg.msg_iov = &iov;
  msg.msg_iovlen = 1;
  msg.msg_control = NULL;
  msg.msg_controllen = 0;
  msg.msg_flags = 0;
  sl = sendmsg(s, &msg, 0);
  return sl;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<sendmsg_to_client>:
  endbr64
  push   %rbp
  mov    %edi,%ebp
  mov    %rsi,%rdi
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  mov    %rsi,(%rsp)
  call   <strlen@plt>
  xor    %edx,%edx
  lea    0x10(%rsp),%rsi
  mov    %ebp,%edi
  add    $0x1,%rax
  movl   $0x1,0x10(%rsp)
  mov    %rax,0x8(%rsp)
  mov    %rsp,%rax
  movq   $0x0,0x40(%rsp)
  movq   $0x0,0x38(%rsp)
  mov    %rax,0x30(%rsp)
  movq   $0x0,0x28(%rsp)
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x18(%rsp)
  call   <sendmsg@plt>
  mov    0x48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L3
  add    $0x50,%rsp
  pop    %rbp
  ret
L3:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int sendmsg_to_client(int s, char *ms) {
  struct msghdr msg;
  struct iovec iov;
  int sl;
  iov.iov_base = ms;
  iov.iov_len = strlen(ms) + 1;
  msg.msg_name = NULL;
  msg.msg_namelen = 0;
  msg.msg_iov = &iov;
  msg.msg_iovlen = 1;
  msg.msg_control = NULL;
  msg.msg_controllen = 0;
  msg.msg_flags = 0;
  sl = sendmsg(s, &msg, 0);
  return sl;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<sendmsg_to_client>:
  endbr64
  push   %rbp
  mov    %edi,%ebp
  mov    %rsi,%rdi
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  mov    %rsi,(%rsp)
  call   <strlen@plt>
  pxor   %xmm0,%xmm0
  xor    %edx,%edx
  lea    0x10(%rsp),%rsi
  add    $0x1,%rax
  mov    %ebp,%edi
  movups %xmm0,0x18(%rsp)
  mov    %rax,0x8(%rsp)
  mov    %rsp,%rax
  movq   $0x0,0x40(%rsp)
  movq   $0x0,0x38(%rsp)
  mov    %rax,0x30(%rsp)
  movl   $0x1,0x10(%rsp)
  movq   $0x0,0x28(%rsp)
  call   <sendmsg@plt>
  mov    0x48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L4
  add    $0x50,%rsp
  pop    %rbp
  ret
L4:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int sendmsg_to_client(int s, char *ms) {
  struct msghdr msg;
  struct iovec iov;
  int sl;
  iov.iov_base = ms;
  iov.iov_len = strlen(ms) + 1;
  msg.msg_name = NULL;
  msg.msg_namelen = 0;
  msg.msg_iov = &iov;
  msg.msg_iovlen = 1;
  msg.msg_control = NULL;
  msg.msg_controllen = 0;
  msg.msg_flags = 0;
  sl = sendmsg(s, &msg, 0);
  return sl;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<printInteger>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jns    L8
  mov    $0x2d,%edi
  call   <console_char@plt>
  negq   -0x8(%rbp)
L8:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <print_uint32_base10@plt>
  nop
  leave
  ret
```

assistant: ```c
void printInteger(long n) {
  if (n < 0) {
    console_char('-');
    n = -n;
  }
  print_uint32_base10(n);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<printInteger>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  test   %rdi,%rdi
  js     L8
L2:
  mov    %rbx,%rdi
  call   <print_uint32_base10@plt>
  pop    %rbx
  ret
L8:
  mov    $0x2d,%edi
  call   <console_char@plt>
  neg    %rbx
  jmp    L2
```

assistant: ```c
void printInteger(long n) {
  if (n < 0) {
    console_char('-');
    n = -n;
  }
  print_uint32_base10(n);
}
```
user: What is the c source code of the assembly code below:

```asm
<printInteger>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  test   %rdi,%rdi
  js     L4
  mov    %rbp,%rdi
  pop    %rbp
  jmp    1070 <print_uint32_base10@plt>
  cs nopw 0x0(%rax,%rax,1)
L4:
  mov    $0x2d,%edi
  neg    %rbp
  call   <console_char@plt>
  mov    %rbp,%rdi
  pop    %rbp
  jmp    1070 <print_uint32_base10@plt>
```

assistant: ```c
void printInteger(long n) {
  if (n < 0) {
    console_char('-');
    n = -n;
  }
  print_uint32_base10(n);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<printInteger>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  test   %rdi,%rdi
  js     L2
  mov    %rbp,%rdi
  pop    %rbp
  jmp    1070 <print_uint32_base10@plt>
  cs nopw 0x0(%rax,%rax,1)
L2:
  mov    $0x2d,%edi
  neg    %rbp
  call   <console_char@plt>
  mov    %rbp,%rdi
  pop    %rbp
  jmp    1070 <print_uint32_base10@plt>
```

assistant: ```c
void printInteger(long n) {
  if (n < 0) {
    console_char('-');
    n = -n;
  }
  print_uint32_base10(n);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<multiply129>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %rdx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8,-0x60(%rbp)
  mov    -0x44(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x38(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  mov    -0x44(%rbp),%edx
  movslq %edx,%rcx
  sub    $0x1,%rcx
  mov    %rcx,-0x30(%rbp)
  movslq %edx,%rcx
  mov    %rcx,%r12
  mov    $0x0,%r13d
  mov    -0x44(%rbp),%ecx
  movslq %ecx,%rsi
  sub    $0x1,%rsi
  mov    %rsi,-0x28(%rbp)
  movslq %ecx,%rsi
  mov    %rsi,%r10
  mov    $0x0,%r11d
  movl   $0x0,-0x40(%rbp)
  jmp    L1
L23:
  movl   $0x0,-0x3c(%rbp)
  jmp    L2
L14:
  mov    -0x40(%rbp),%esi
  movslq %esi,%rdi
  movslq %eax,%rsi
  imul   %rdi,%rsi
  lea    0x0(,%rsi,4),%rdi
  mov    -0x50(%rbp),%rsi
  add    %rsi,%rdi
  mov    -0x3c(%rbp),%esi
  movslq %esi,%rsi
  mov    (%rdi,%rsi,4),%esi
  imul   -0x48(%rbp),%esi
  mov    %esi,%r9d
  mov    -0x40(%rbp),%esi
  movslq %esi,%rdi
  movslq %edx,%rsi
  imul   %rdi,%rsi
  lea    0x0(,%rsi,4),%rdi
  mov    -0x58(%rbp),%rsi
  add    %rsi,%rdi
  mov    -0x3c(%rbp),%esi
  movslq %esi,%rsi
  mov    (%rdi,%rsi,4),%r8d
  mov    -0x40(%rbp),%esi
  movslq %esi,%rdi
  movslq %ecx,%rsi
  imul   %rdi,%rsi
  lea    0x0(,%rsi,4),%rdi
  mov    -0x60(%rbp),%rsi
  add    %rsi,%rdi
  add    %r9d,%r8d
  mov    -0x3c(%rbp),%esi
  movslq %esi,%rsi
  mov    %r8d,(%rdi,%rsi,4)
  addl   $0x1,-0x3c(%rbp)
L2:
  mov    -0x3c(%rbp),%esi
  cmp    -0x44(%rbp),%esi
  jl     L14
  addl   $0x1,-0x40(%rbp)
L1:
  mov    -0x40(%rbp),%esi
  cmp    -0x44(%rbp),%esi
  jl     L23
  nop
  nop
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
void multiply129(int n, int a, int tab1[n][n], int tab2[n][n], int tab3[n][n]) {
  int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      tab3[i][j] = a * tab1[i][j] + tab2[i][j];
    }
  }
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<multiply129>:
  endbr64
  test   %edi,%edi
  jle    L12
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  mov    %esi,%r10d
  movslq %edi,%r12
  shl    $0x2,%r12
  mov    %rdx,%rbp
  mov    $0x0,%r13d
  mov    %edi,%r11d
L21:
  mov    %rbp,%r9
  mov    %rcx,%rdi
  mov    %r8,%rsi
  mov    $0x0,%eax
L19:
  mov    %r10d,%edx
  imul   (%r9,%rax,4),%edx
  add    (%rdi,%rax,4),%edx
  mov    %edx,(%rsi,%rax,4)
  add    $0x1,%rax
  cmp    %rax,%r11
  jne    L19
  add    $0x1,%r13d
  add    %r12,%rbp
  add    %r12,%rcx
  add    %r12,%r8
  cmp    %r13d,%ebx
  jne    L21
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L12:
  ret
```

assistant: ```c
void multiply129(int n, int a, int tab1[n][n], int tab2[n][n], int tab3[n][n]) {
  int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      tab3[i][j] = a * tab1[i][j] + tab2[i][j];
    }
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<multiply129>:
  endbr64
  test   %edi,%edi
  jle    L9
  movslq %edi,%r10
  push   %rbx
  mov    %esi,%r9d
  xor    %r11d,%r11d
  lea    0x0(,%r10,4),%rbx
  nopw   0x0(%rax,%rax,1)
L22:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L21:
  mov    (%rdx,%rax,4),%esi
  imul   %r9d,%esi
  add    (%rcx,%rax,4),%esi
  mov    %esi,(%r8,%rax,4)
  add    $0x1,%rax
  cmp    %r10,%rax
  jne    L21
  add    $0x1,%r11d
  add    %rbx,%rdx
  add    %rbx,%rcx
  add    %rbx,%r8
  cmp    %r11d,%edi
  jne    L22
  pop    %rbx
  ret
L9:
  ret
```

assistant: ```c
void multiply129(int n, int a, int tab1[n][n], int tab2[n][n], int tab3[n][n]) {
  int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      tab3[i][j] = a * tab1[i][j] + tab2[i][j];
    }
  }
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<multiply129>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  movslq %edi,%rbp
  push   %rbx
  test   %ebp,%ebp
  jle    L86
  mov    %rbp,%r11
  mov    %esi,%ebx
  lea    0x4(%rdx),%r10
  mov    %r8,%rax
  mov    %r11d,%edx
  mov    %r11d,%esi
  lea    0x4(%rcx),%r9
  shl    $0x2,%rbp
  and    $0xfffffffc,%esi
  shr    $0x2,%edx
  movd   %ebx,%xmm4
  xor    %r12d,%r12d
  lea    0x1(%rsi),%ecx
  lea    0x2(%rsi),%edi
  mov    %esi,-0x24(%rsp)
  movslq %esi,%r13
  lea    -0x1(%rdx),%r8d
  mov    %r11d,%esi
  lea    -0x1(%r11),%edx
  mov    %ecx,-0x20(%rsp)
  pshufd $0x0,%xmm4,%xmm2
  mov    %edi,-0x1c(%rsp)
  add    $0x1,%r8
  movslq %ecx,%r14
  mov    %edx,-0x28(%rsp)
  movdqa %xmm2,%xmm3
  shl    $0x4,%r8
  movslq %edi,%r15
  mov    %rsi,-0x10(%rsp)
  psrlq  $0x20,%xmm3
  nopl   (%rax)
L45:
  mov    %rax,%rdx
  lea    -0x4(%r10),%rcx
  lea    -0x4(%r9),%rsi
  sub    %r10,%rdx
  cmp    $0x8,%rdx
  mov    %rax,%rdx
  seta   %dil
  sub    %r9,%rdx
  cmp    $0x8,%rdx
  seta   %dl
  test   %dl,%dil
  je     L56
  xor    %edx,%edx
  cmpl   $0x2,-0x28(%rsp)
  jbe    L56
  nopl   0x0(%rax)
L46:
  movdqu (%rcx,%rdx,1),%xmm0
  movdqu (%rcx,%rdx,1),%xmm1
  psrlq  $0x20,%xmm0
  pmuludq %xmm2,%xmm1
  pmuludq %xmm3,%xmm0
  pshufd $0x8,%xmm1,%xmm1
  pshufd $0x8,%xmm0,%xmm0
  punpckldq %xmm0,%xmm1
  movdqu (%rsi,%rdx,1),%xmm0
  paddd  %xmm1,%xmm0
  movups %xmm0,(%rax,%rdx,1)
  add    $0x10,%rdx
  cmp    %r8,%rdx
  jne    L46
  cmp    -0x24(%rsp),%r11d
  je     L34
  mov    (%rcx,%r13,4),%edx
  imul   %ebx,%edx
  add    (%rsi,%r13,4),%edx
  mov    %edx,(%rax,%r13,4)
  cmp    -0x20(%rsp),%r11d
  jle    L34
  mov    (%rcx,%r14,4),%edx
  imul   %ebx,%edx
  add    (%rsi,%r14,4),%edx
  mov    %edx,(%rax,%r14,4)
  cmp    -0x1c(%rsp),%r11d
  jle    L34
  mov    (%rcx,%r15,4),%edx
  imul   %ebx,%edx
  add    (%rsi,%r15,4),%edx
  mov    %edx,(%rax,%r15,4)
L34:
  add    $0x1,%r12d
  add    %rbp,%rax
  add    %rbp,%r10
  add    %rbp,%r9
  cmp    %r12d,%r11d
  jne    L45
L86:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L56:
  mov    %r8,-0x18(%rsp)
  mov    -0x10(%rsp),%r8
  xor    %edx,%edx
  nopl   0x0(%rax)
L31:
  mov    (%rcx,%rdx,4),%edi
  imul   %ebx,%edi
  add    (%rsi,%rdx,4),%edi
  mov    %edi,(%rax,%rdx,4)
  add    $0x1,%rdx
  cmp    %rdx,%r8
  jne    L31
  mov    -0x18(%rsp),%r8
  jmp    L34
```

assistant: ```c
void multiply129(int n, int a, int tab1[n][n], int tab2[n][n], int tab3[n][n]) {
  int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      tab3[i][j] = a * tab1[i][j] + tab2[i][j];
    }
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<tcp_sum_calc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,%eax
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %ax,-0x24(%rbp)
  movw   $0x6,-0x16(%rbp)
  movq   $0x0,-0x10(%rbp)
  movl   $0x0,-0x14(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x30(%rbp),%rax
  movzwl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <ntohs@plt>
  add    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  add    $0x2,%rax
  movzwl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <ntohs@plt>
  add    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  movzwl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <ntohs@plt>
  add    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  add    $0x2,%rax
  movzwl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <ntohs@plt>
  add    %rax,-0x10(%rbp)
  movzwl -0x24(%rbp),%eax
  add    %rax,-0x10(%rbp)
  movzwl -0x16(%rbp),%eax
  add    %rax,-0x10(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L11
L49:
  mov    -0x14(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <ntohs@plt>
  add    %rax,-0x10(%rbp)
  addl   $0x1,-0x14(%rbp)
L11:
  movzwl -0x24(%rbp),%eax
  shr    %ax
  movzwl %ax,%eax
  cmp    %eax,-0x14(%rbp)
  jl     L49
  movzwl -0x24(%rbp),%eax
  and    $0x1,%eax
  test   %ax,%ax
  je     L30
  mov    -0x14(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <ntohs@plt>
  add    %rax,-0x10(%rbp)
  jmp    L30
L43:
  mov    -0x10(%rbp),%rax
  movzwl %ax,%edx
  mov    -0x10(%rbp),%rax
  sar    $0x10,%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
L30:
  mov    -0x10(%rbp),%rax
  sar    $0x10,%rax
  test   %rax,%rax
  jne    L43
  notq   -0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzwl %ax,%eax
  mov    %eax,%edi
  call   <htons@plt>
  leave
  ret
```

assistant: ```c
unsigned short tcp_sum_calc(unsigned short len_tcp, unsigned short *src_addr, unsigned short *dest_addr, unsigned short *buff) {
  struct tcphdr *tcph;
  unsigned short prot_tcp = 6;
  long sum = 0;
  int i = 0;
  tcph = (struct tcphdr *)buff;
  sum += ntohs(src_addr[0]);
  sum += ntohs(src_addr[1]);
  sum += ntohs(dest_addr[0]);
  sum += ntohs(dest_addr[1]);
  sum += len_tcp;
  sum += prot_tcp;
  for (i = 0; i < (len_tcp / 2); i++) {
    sum += ntohs(buff[i]);
  }
  if ((len_tcp % 2) == 1) {
    sum += ntohs((unsigned char)(buff[i]));
  }
  while (sum >> 16) {
    sum = (sum & 0xFFFF) + (sum >> 16);
  }
  sum = ~sum;
  return htons(((unsigned short)sum));
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<tcp_sum_calc>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%r13d
  mov    %rsi,%r12
  mov    %rdx,%rbp
  mov    %rcx,%r14
  movzbl (%rsi),%edi
  call   <ntohs@plt>
  mov    %rax,%rbx
  movzbl 0x2(%r12),%edi
  call   <ntohs@plt>
  add    %rax,%rbx
  movzbl 0x0(%rbp),%edi
  call   <ntohs@plt>
  add    %rax,%rbx
  movzbl 0x2(%rbp),%edi
  call   <ntohs@plt>
  add    %rax,%rbx
  movzwl %r13w,%eax
  lea    0x6(%rbx,%rax,1),%rbx
  mov    %r13d,%eax
  shr    %ax
  movzwl %ax,%r15d
  test   %r15d,%r15d
  jle    L32
  mov    %r14,%rbp
  lea    -0x1(%r15),%eax
  lea    (%r14,%rax,2),%r12
L44:
  movzbl 0x0(%rbp),%edi
  call   <ntohs@plt>
  add    %rax,%rbx
  mov    %rbp,%rax
  add    $0x2,%rbp
  cmp    %rax,%r12
  jne    L44
L60:
  test   $0x1,%r13b
  jne    L25
L4:
  mov    %rbx,%rax
  sar    $0x10,%rax
  je     L43
L35:
  movzwl %bx,%ebx
  add    %rax,%rbx
  mov    %rbx,%rax
  sar    $0x10,%rax
  jne    L35
L43:
  not    %rbx
  movzwl %bx,%edi
  call   <htons@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L32:
  mov    $0x0,%r15d
  jmp    L60
L25:
  movslq %r15d,%r15
  movzbl (%r14,%r15,2),%edi
  call   <ntohs@plt>
  add    %rax,%rbx
  jmp    L4
```

assistant: ```c
unsigned short tcp_sum_calc(unsigned short len_tcp, unsigned short *src_addr, unsigned short *dest_addr, unsigned short *buff) {
  struct tcphdr *tcph;
  unsigned short prot_tcp = 6;
  long sum = 0;
  int i = 0;
  tcph = (struct tcphdr *)buff;
  sum += ntohs(src_addr[0]);
  sum += ntohs(src_addr[1]);
  sum += ntohs(dest_addr[0]);
  sum += ntohs(dest_addr[1]);
  sum += len_tcp;
  sum += prot_tcp;
  for (i = 0; i < (len_tcp / 2); i++) {
    sum += ntohs(buff[i]);
  }
  if ((len_tcp % 2) == 1) {
    sum += ntohs((unsigned char)(buff[i]));
  }
  while (sum >> 16) {
    sum = (sum & 0xFFFF) + (sum >> 16);
  }
  sum = ~sum;
  return htons(((unsigned short)sum));
}
```