ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Converte this assembly snippet into its equivalent C code:

```asm
<os_set_slip>:
  endbr64
  push   %rbp
  mov    %edi,%ebp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  mov    D13(%rip),%rax
  mov    %rsp,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rsp)
  mov    D36(%rip),%rax
  mov    (%rax),%esi
  call   <ioctl@plt>
  test   %rax,%rax
  js     L29
  mov    D21(%rip),%rax
  lea    0x4(%rsp),%rdx
  mov    %ebp,%edi
  movl   $0x0,0x4(%rsp)
  mov    (%rax),%esi
  call   <ioctl@plt>
  mov    %rax,%r8
  xor    %eax,%eax
  test   %r8,%r8
  js     L29
L6:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L14
  add    $0x10,%rsp
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L29:
  mov    D33(%rip),%rax
  mov    (%rax),%eax
  neg    %eax
  jmp    L6
L14:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int os_set_slip(int fd) {
  int disc, sencap;
  disc = N_SLIP;
  if (ioctl(fd, TIOCSETD, &disc) < 0)
    return -errno;
  sencap = 0;
  if (ioctl(fd, SIOCSIFENCAP, &sencap) < 0)
    return -errno;
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<Section3>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  sub    $0x10,%rsp
  mov    %edi,-0x14(%rbp)
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  call   <Section3Seconds@plt>
  mov    %eax,%r12d
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  call   <Section3Minutes@plt>
  mov    %eax,%ebx
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  call   <Section3Hours@plt>
  mov    %r12d,%ecx
  mov    %ebx,%edx
  mov    %eax,%esi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: tag: D4
data_type: string

tool: D4: 
3.- %d hours, %d minutes and %d seconds

assistant: ```c
int Section3(int seconds) {
  printf("\n3.- %d hours, %d minutes and %d seconds", Section3Hours(&seconds), Section3Minutes(&seconds), Section3Seconds(&seconds));
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<Section3>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %edi,0xc(%rsp)
  lea    0xc(%rsp),%r12
  mov    %r12,%rdi
  call   <Section3Seconds@plt>
  mov    %eax,%ebp
  mov    %r12,%rdi
  call   <Section3Minutes@plt>
  mov    %eax,%ebx
  mov    %r12,%rdi
  call   <Section3Hours@plt>
  mov    %eax,%esi
  mov    %ebp,%ecx
  mov    %ebx,%edx
  lea    D0(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: read_data
arguments: tag: D0
type: string

tool: D0: 
3.- %d hours, %d minutes and %d seconds

assistant: ```c
int Section3(int seconds) {
  printf("\n3.- %d hours, %d minutes and %d seconds", Section3Hours(&seconds), Section3Minutes(&seconds), Section3Seconds(&seconds));
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<Section3>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  sub    $0x10,%rsp
  lea    0xc(%rsp),%rbp
  mov    %edi,0xc(%rsp)
  mov    %rbp,%rdi
  call   <Section3Seconds@plt>
  mov    %rbp,%rdi
  mov    %eax,%r13d
  call   <Section3Minutes@plt>
  mov    %rbp,%rdi
  mov    %eax,%r12d
  call   <Section3Hours@plt>
  mov    %r13d,%ecx
  mov    %r12d,%edx
  lea    D9(%rip),%rdi
  mov    %eax,%esi
  call   <printf@plt>
  add    $0x10,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D9
type_guessed: string

tool: D9: 
3.- %d hours, %d minutes and %d seconds

assistant: ```c
int Section3(int seconds) {
  printf("\n3.- %d hours, %d minutes and %d seconds", Section3Hours(&seconds), Section3Minutes(&seconds), Section3Seconds(&seconds));
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<Section3>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  sub    $0x10,%rsp
  lea    0xc(%rsp),%rbp
  mov    %edi,0xc(%rsp)
  mov    %rbp,%rdi
  call   <Section3Seconds@plt>
  mov    %rbp,%rdi
  mov    %eax,%r13d
  call   <Section3Minutes@plt>
  mov    %rbp,%rdi
  mov    %eax,%r12d
  call   <Section3Hours@plt>
  mov    %r13d,%ecx
  mov    %r12d,%edx
  lea    D7(%rip),%rdi
  mov    %eax,%esi
  call   <printf@plt>
  add    $0x10,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: unpack_data
arguments: label: D7
data_type: string

tool: D7: 
3.- %d hours, %d minutes and %d seconds

assistant: ```c
int Section3(int seconds) {
  printf("\n3.- %d hours, %d minutes and %d seconds", Section3Hours(&seconds), Section3Minutes(&seconds), Section3Seconds(&seconds));
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<ppei>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  movsd  %xmm0,-0x8(%rbp)
  movsd  %xmm1,-0x10(%rbp)
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm2
  movsd  %xmm2,-0x20(%rbp)
  mov    -0x18(%rbp),%rdx
  movsd  -0x10(%rbp),%xmm0
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rdi
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x2,%eax
  call   <fpei@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  -0x20(%rbp),%xmm0
  addsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

assistant: ```c
double ppei(x, y, p)
double x, y;
double *p;
{ return (x + (p[1] * fpei(x, y, p))); }
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<ppei>:
  endbr64
  push   %r14
  push   %rbx
  sub    $0x8,%rsp
  movq   %xmm0,%r14
  mov    0x8(%rdi),%rbx
  mov    $0x2,%eax
  call   <fpei@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movq   %rbx,%xmm2
  mulsd  %xmm2,%xmm0
  movq   %r14,%xmm3
  addsd  %xmm3,%xmm0
  add    $0x8,%rsp
  pop    %rbx
  pop    %r14
  ret
```

assistant: ```c
double ppei(x, y, p)
double x, y;
double *p;
{ return (x + (p[1] * fpei(x, y, p))); }
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<ppei>:
  endbr64
  sub    $0x18,%rsp
  movsd  0x8(%rdi),%xmm3
  mov    $0x2,%eax
  movsd  %xmm0,0x8(%rsp)
  movsd  %xmm3,(%rsp)
  call   <fpei@plt>
  pxor   %xmm0,%xmm0
  movsd  0x8(%rsp),%xmm2
  cvtsi2sd %eax,%xmm0
  mulsd  (%rsp),%xmm0
  add    $0x18,%rsp
  addsd  %xmm2,%xmm0
  ret
```

assistant: ```c
double ppei(x, y, p)
double x, y;
double *p;
{ return (x + (p[1] * fpei(x, y, p))); }
```
user: Translate the below assembly code into C programming language:

```asm
<ppei>:
  endbr64
  sub    $0x18,%rsp
  movsd  0x8(%rdi),%xmm3
  mov    $0x2,%eax
  movsd  %xmm0,0x8(%rsp)
  movsd  %xmm3,(%rsp)
  call   <fpei@plt>
  pxor   %xmm0,%xmm0
  movsd  0x8(%rsp),%xmm2
  cvtsi2sd %eax,%xmm0
  mulsd  (%rsp),%xmm0
  add    $0x18,%rsp
  addsd  %xmm2,%xmm0
  ret
```

assistant: ```c
double ppei(x, y, p)
double x, y;
double *p;
{ return (x + (p[1] * fpei(x, y, p))); }
```
user: Translate the below assembly code into C programming language:

```asm
<nextToken>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L15
L32:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  jne    L5
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  jmp    L3
L5:
  addl   $0x1,-0x4(%rbp)
L15:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x4(%rbp)
  jl     L32
  mov    $0x0,%eax
L3:
  leave
  ret
```

assistant: ```c
char *nextToken(char *in) {
  int i;
  for (i = 0; i < strlen(in); i++) {
    if (in[i] == ' ') {
      in[i] = 0x0;
      return (&in[i + 1]);
    }
  }
  return NULL;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<nextToken>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    $0x0,%ebx
L34:
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    %ebx,%eax
  jle    L4
  lea    0x0(%rbp,%rbx,1),%rdx
  lea    0x1(%rbx),%rax
  cmpb   $0x20,0x0(%rbp,%rbx,1)
  je     L1
  mov    %rax,%rbx
  jmp    L34
L1:
  movb   $0x0,(%rdx)
  lea    0x1(%rbp,%rbx,1),%rax
  jmp    L0
L4:
  mov    $0x0,%eax
L0:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
char *nextToken(char *in) {
  int i;
  for (i = 0; i < strlen(in); i++) {
    if (in[i] == ' ') {
      in[i] = 0x0;
      return (&in[i + 1]);
    }
  }
  return NULL;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<nextToken>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  jmp    L13
  nopl   0x0(%rax)
L27:
  lea    0x0(%rbp,%rbx,1),%rax
  add    $0x1,%rbx
  cmpb   $0x20,-0x1(%rbp,%rbx,1)
  je     L9
L13:
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    %ebx,%eax
  jg     L27
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  ret
  nopl   (%rax)
L9:
  movb   $0x0,(%rax)
  add    $0x8,%rsp
  lea    0x0(%rbp,%rbx,1),%rax
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
char *nextToken(char *in) {
  int i;
  for (i = 0; i < strlen(in); i++) {
    if (in[i] == ' ') {
      in[i] = 0x0;
      return (&in[i + 1]);
    }
  }
  return NULL;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<nextToken>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  jmp    L24
  nopl   0x0(%rax)
L19:
  lea    0x0(%rbp,%rbx,1),%rax
  add    $0x1,%rbx
  cmpb   $0x20,-0x1(%rbp,%rbx,1)
  je     L10
L24:
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    %ebx,%eax
  jg     L19
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  ret
  nopl   (%rax)
L10:
  movb   $0x0,(%rax)
  add    $0x8,%rsp
  lea    0x0(%rbp,%rbx,1),%rax
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
char *nextToken(char *in) {
  int i;
  for (i = 0; i < strlen(in); i++) {
    if (in[i] == ' ') {
      in[i] = 0x0;
      return (&in[i + 1]);
    }
  }
  return NULL;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<foo>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    $0x0,%eax
  call   <bar@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  cmp    $0xfffffffffffff000,%rax
  ja     L1
  mov    -0x8(%rbp),%rax
  jmp    L22
L1:
  cmpq   $0xffffffffffffffda,-0x8(%rbp)
  je     L29
  movq   $0xfffffffffffffffe,-0x8(%rbp)
L29:
  mov    -0x8(%rbp),%rax
  add    $0x1,%eax
L22:
  leave
  ret
```

assistant: ```c
int foo(void) {
  long int b = bar();
  if ((unsigned long)b < -4095L)
    return b;
  if (-b != 38)
    b = -2;
  return b + 1;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<foo>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <bar@plt>
  cmp    $0xfffffffffffff000,%rax
  jbe    L6
  cmp    $0xffffffffffffffda,%rax
  mov    $0xfffffffffffffffe,%rdx
  cmovne %rdx,%rax
  add    $0x1,%eax
L6:
  add    $0x8,%rsp
  ret
```

assistant: ```c
int foo(void) {
  long int b = bar();
  if ((unsigned long)b < -4095L)
    return b;
  if (-b != 38)
    b = -2;
  return b + 1;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<foo>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <bar@plt>
  cmp    $0xfffffffffffff000,%rax
  jbe    L8
  cmp    $0xffffffffffffffda,%rax
  mov    $0xffffffff,%edx
  mov    $0xffffffdb,%eax
  cmovne %edx,%eax
L8:
  add    $0x8,%rsp
  ret
```

assistant: ```c
int foo(void) {
  long int b = bar();
  if ((unsigned long)b < -4095L)
    return b;
  if (-b != 38)
    b = -2;
  return b + 1;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<foo>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <bar@plt>
  cmp    $0xfffffffffffff000,%rax
  jbe    L3
  cmp    $0xffffffffffffffda,%rax
  mov    $0xffffffff,%edx
  mov    $0xffffffdb,%eax
  cmovne %edx,%eax
L3:
  add    $0x8,%rsp
  ret
```

assistant: ```c
int foo(void) {
  long int b = bar();
  if ((unsigned long)b < -4095L)
    return b;
  if (-b != 38)
    b = -2;
  return b + 1;
}
```
user: What is the c source code of the assembly code below:

```asm
<usage>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D6
type: string

tool: D6: Usage: %s [-hd] [-p <pidfile>] [-c <config dir>]
  -h : print this help
  -v : print version
  -d : detach (run as daemon)
  -r : automatically restart hub if it shuts down
  -p : specify pidfile
  -c : specify config directory


assistant: ```c
void usage(unsigned char *name) {
  printf("Usage: %s [-hd] [-p <pidfile>] [-c <config dir>]\n"
         "  -h : print this help\n"
         "  -v : print version\n"
         "  -d : detach (run as daemon)\n"
         "  -r : automatically restart hub if it shuts down\n"
         "  -p : specify pidfile\n"
         "  -c : specify config directory\n",
         name);
}
```
user: Translate the below assembly code into C programming language:

```asm
<usage>:
  endbr64
  sub    $0x8,%rsp
  mov    %rdi,%rsi
  lea    D6(%rip),%rdi
  call   <printf@plt>
  add    $0x8,%rsp
  ret
```

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

tool: D6: Usage: %s [-hd] [-p <pidfile>] [-c <config dir>]
  -h : print this help
  -v : print version
  -d : detach (run as daemon)
  -r : automatically restart hub if it shuts down
  -p : specify pidfile
  -c : specify config directory


assistant: ```c
void usage(unsigned char *name) {
  printf("Usage: %s [-hd] [-p <pidfile>] [-c <config dir>]\n"
         "  -h : print this help\n"
         "  -v : print version\n"
         "  -d : detach (run as daemon)\n"
         "  -r : automatically restart hub if it shuts down\n"
         "  -p : specify pidfile\n"
         "  -c : specify config directory\n",
         name);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<usage>:
  endbr64
  mov    %rdi,%rsi
  lea    D7(%rip),%rdi
  jmp    1050 <printf@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D7
type_infered: string

tool: D7: Usage: %s [-hd] [-p <pidfile>] [-c <config dir>]
  -h : print this help
  -v : print version
  -d : detach (run as daemon)
  -r : automatically restart hub if it shuts down
  -p : specify pidfile
  -c : specify config directory


assistant: ```c
void usage(unsigned char *name) {
  printf("Usage: %s [-hd] [-p <pidfile>] [-c <config dir>]\n"
         "  -h : print this help\n"
         "  -v : print version\n"
         "  -d : detach (run as daemon)\n"
         "  -r : automatically restart hub if it shuts down\n"
         "  -p : specify pidfile\n"
         "  -c : specify config directory\n",
         name);
}
```
user: What is the c source code of the assembly code below?

```asm
<usage>:
  endbr64
  mov    %rdi,%rsi
  lea    D7(%rip),%rdi
  jmp    1050 <printf@plt>
```

tool_calls: name: parse_data
arguments: data_label: D7
type_infered: string

tool: D7: Usage: %s [-hd] [-p <pidfile>] [-c <config dir>]
  -h : print this help
  -v : print version
  -d : detach (run as daemon)
  -r : automatically restart hub if it shuts down
  -p : specify pidfile
  -c : specify config directory


assistant: ```c
void usage(unsigned char *name) {
  printf("Usage: %s [-hd] [-p <pidfile>] [-c <config dir>]\n"
         "  -h : print this help\n"
         "  -v : print version\n"
         "  -d : detach (run as daemon)\n"
         "  -r : automatically restart hub if it shuts down\n"
         "  -p : specify pidfile\n"
         "  -c : specify config directory\n",
         name);
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<strlen>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  movq   $0x0,-0x8(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L29
  jmp    L11
L9:
  addq   $0x1,-0x8(%rbp)
L11:
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L9
L29:
  mov    -0x8(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
size_t strlen(const char *s) {
  size_t ret = 0;
  if (s)
    for (; s[ret]; ret++)
      ;
  return ret;
}
```
user: Translate the below assembly code into C programming language:

```asm
<strlen>:
  endbr64
  cmpb   $0x0,(%rdi)
  je     L8
  mov    $0x0,%eax
L14:
  add    $0x1,%rax
  cmpb   $0x0,(%rdi,%rax,1)
  jne    L14
  ret
L8:
  mov    $0x0,%eax
  ret
```

assistant: ```c
size_t strlen(const char *s) {
  size_t ret = 0;
  if (s)
    for (; s[ret]; ret++)
      ;
  return ret;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<strlen>:
  endbr64
  xor    %eax,%eax
  cmpb   $0x0,(%rdi)
  je     L13
  nopl   0x0(%rax,%rax,1)
L18:
  add    $0x1,%rax
  cmpb   $0x0,(%rdi,%rax,1)
  jne    L18
  ret
  nopl   0x0(%rax,%rax,1)
L13:
  ret
```

assistant: ```c
size_t strlen(const char *s) {
  size_t ret = 0;
  if (s)
    for (; s[ret]; ret++)
      ;
  return ret;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<strlen>:
  endbr64
  xor    %eax,%eax
  cmpb   $0x0,(%rdi)
  je     L12
  nopl   0x0(%rax,%rax,1)
L19:
  add    $0x1,%rax
  cmpb   $0x0,(%rdi,%rax,1)
  jne    L19
  ret
  nopl   0x0(%rax,%rax,1)
L12:
  ret
```

assistant: ```c
size_t strlen(const char *s) {
  size_t ret = 0;
  if (s)
    for (; s[ret]; ret++)
      ;
  return ret;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<code_mq2sock>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  mov    %edi,-0xb4(%rbp)
  mov    %esi,-0xb8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0xa4(%rbp),%rdx
  mov    -0xb4(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <mq_getattr@plt>
  mov    -0xa4(%rbp),%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x98(%rbp)
  lea    -0xa8(%rbp),%rdx
  mov    -0xb4(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <my_mq_receive@plt>
  mov    %eax,-0xa0(%rbp)
  cmpl   $0x4,-0xa0(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0xa8(%rbp),%rsi
  mov    -0xb8(%rbp),%eax
  mov    $0x0,%ecx
  mov    $0x4,%edx
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <send@plt>
  mov    %eax,-0xa0(%rbp)
  cmpl   $0x4,-0xa0(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x90(%rbp),%rdx
  mov    -0xb4(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <my_mq_receive@plt>
  mov    %eax,-0xa0(%rbp)
  cmpl   $0x80,-0xa0(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x90(%rbp),%rsi
  mov    -0xb8(%rbp),%eax
  mov    $0x0,%ecx
  mov    $0x80,%edx
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <send@plt>
  mov    %eax,-0xa0(%rbp)
  cmpl   $0x80,-0xa0(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
L3:
  mov    -0x98(%rbp),%rdx
  mov    -0xb4(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <my_mq_receive@plt>
  mov    %eax,-0x9c(%rbp)
  mov    -0x9c(%rbp),%edx
  mov    -0x98(%rbp),%rsi
  mov    -0xb8(%rbp),%eax
  mov    $0x0,%ecx
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <send@plt>
  mov    %eax,-0xa0(%rbp)
  mov    -0xa0(%rbp),%eax
  cmp    -0x9c(%rbp),%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0xa4(%rbp),%eax
  cmp    %eax,-0xa0(%rbp)
  je     L3
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L17
  call   <__stack_chk_fail@plt>
L17:
  leave
  ret
```

assistant: ```c
void code_mq2sock(mqd_t mq, int socket) {
  int symcount;
  unsigned char codelen[128];
  unsigned char *buffer;
  struct mq_attr attr;
  int len;
  mq_getattr(mq, &attr);
  buffer = malloc(attr.mq_msgsize);
  len = my_mq_receive(mq, &symcount);
  assert(len == 4);
  len = send(socket, &symcount, 4, 0);
  assert(len == 4);
  len = my_mq_receive(mq, codelen);
  assert(len == 128);
  len = send(socket, codelen, 128, 0);
  assert(len == 128);
  do {
    int tmp;
    tmp = my_mq_receive(mq, buffer);
    len = send(socket, buffer, tmp, 0);
    assert(len == tmp);
  } while (len == attr.mq_msgsize);
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<code_mq2sock>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa0,%rsp
  mov    %edi,%r13d
  mov    %esi,%r14d
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rsi
  call   <mq_getattr@plt>
  mov    0xc(%rsp),%edi
  call   <malloc@plt>
  mov    %rax,%r12
  lea    0x8(%rsp),%rbx
  mov    %rbx,%rsi
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <my_mq_receive@plt>
  cmp    $0x4,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x0,%ecx
  mov    $0x4,%edx
  mov    %rbx,%rsi
  mov    %r14d,%edi
  mov    $0x0,%eax
  call   <send@plt>
  cmp    $0x4,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  lea    0x10(%rsp),%rbx
  mov    %rbx,%rsi
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <my_mq_receive@plt>
  cmp    $0x80,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x0,%ecx
  mov    $0x80,%edx
  mov    %rbx,%rsi
  mov    %r14d,%edi
  mov    $0x0,%eax
  call   <send@plt>
  cmp    $0x80,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
L17:
  mov    %r12,%rsi
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <my_mq_receive@plt>
  mov    %eax,%ebp
  mov    $0x0,%ecx
  mov    %eax,%edx
  mov    %r12,%rsi
  mov    %r14d,%edi
  mov    $0x0,%eax
  call   <send@plt>
  mov    %eax,%ebx
  cmp    %eax,%ebp
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  cmp    %ebx,0xc(%rsp)
  je     L17
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0xa0,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L6:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void code_mq2sock(mqd_t mq, int socket) {
  int symcount;
  unsigned char codelen[128];
  unsigned char *buffer;
  struct mq_attr attr;
  int len;
  mq_getattr(mq, &attr);
  buffer = malloc(attr.mq_msgsize);
  len = my_mq_receive(mq, &symcount);
  assert(len == 4);
  len = send(socket, &symcount, 4, 0);
  assert(len == 4);
  len = my_mq_receive(mq, codelen);
  assert(len == 128);
  len = send(socket, codelen, 128, 0);
  assert(len == 128);
  do {
    int tmp;
    tmp = my_mq_receive(mq, buffer);
    len = send(socket, buffer, tmp, 0);
    assert(len == tmp);
  } while (len == attr.mq_msgsize);
}
```