ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将以下的汇编代码转换成C语言代码：

```asm
<is_prime>:
  endbr64
  movabs $0xaaaaaaaaaaaaaaab,%rcx
  mov    %rdi,%rax
  mul    %rcx
  mov    %rdx,%rcx
  shr    %rdx
  and    $0xfffffffffffffffe,%rcx
  add    %rdx,%rcx
  mov    %rdi,%rdx
  sub    %rcx,%rdx
  cmp    $0x9,%rdi
  jbe    L25
  test   %rdx,%rdx
  je     L25
  mov    $0x10,%r8d
  mov    $0x9,%esi
  mov    $0x3,%ecx
  jmp    L5
  nopl   0x0(%rax)
L24:
  add    $0x8,%r8
  test   %rdx,%rdx
  je     L25
L5:
  add    $0x2,%rcx
  mov    %rdi,%rax
  xor    %edx,%edx
  add    %r8,%rsi
  div    %rcx
  cmp    %rsi,%rdi
  ja     L24
L25:
  xor    %eax,%eax
  test   %rdx,%rdx
  setne  %al
  ret
```

assistant: ```c
int is_prime(candidate)
unsigned long int candidate;
{
  unsigned long int divn = 3;
  unsigned long int sq = divn * divn;
  while (sq < candidate && candidate % divn != 0) {
    ++divn;
    sq += 4 * divn;
    ++divn;
  }
  return candidate % divn != 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<is_prime>:
  endbr64
  movabs $0xaaaaaaaaaaaaaaab,%rcx
  mov    %rdi,%rax
  mul    %rcx
  mov    %rdx,%rcx
  shr    %rdx
  and    $0xfffffffffffffffe,%rcx
  add    %rdx,%rcx
  mov    %rdi,%rdx
  sub    %rcx,%rdx
  cmp    $0x9,%rdi
  jbe    L15
  test   %rdx,%rdx
  je     L15
  mov    $0x10,%r8d
  mov    $0x9,%esi
  mov    $0x3,%ecx
  jmp    L13
  nopl   0x0(%rax)
L20:
  add    $0x8,%r8
  test   %rdx,%rdx
  je     L15
L13:
  add    $0x2,%rcx
  mov    %rdi,%rax
  xor    %edx,%edx
  add    %r8,%rsi
  div    %rcx
  cmp    %rsi,%rdi
  ja     L20
L15:
  xor    %eax,%eax
  test   %rdx,%rdx
  setne  %al
  ret
```

assistant: ```c
int is_prime(candidate)
unsigned long int candidate;
{
  unsigned long int divn = 3;
  unsigned long int sq = divn * divn;
  while (sq < candidate && candidate % divn != 0) {
    ++divn;
    sq += 4 * divn;
    ++divn;
  }
  return candidate % divn != 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <msgpack_person@plt>
  mov    $0x0,%eax
  pop    %rbp
  ret
```

assistant: ```c
int main(void) {
  msgpack_person();
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <msgpack_person@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main(void) {
  msgpack_person();
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <msgpack_person@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main(void) {
  msgpack_person();
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <msgpack_person@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main(void) {
  msgpack_person();
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<add_str>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L11
L19:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x4(%rbp)
L11:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L23
  mov    -0x4(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jle    L19
L23:
  mov    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int add_str(to, from, max)
char *to;
const char *from;
int max;
{
  int i;
  for (i = 0; from[i] && i <= max; ++i)
    to[i] = from[i];
  return i;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<add_str>:
  endbr64
  movzbl (%rsi),%ecx
  test   %edx,%edx
  js     L30
  test   %cl,%cl
  je     L30
  mov    $0x1,%eax
L24:
  mov    %cl,-0x1(%rdi,%rax,1)
  mov    %eax,%r10d
  movzbl (%rsi,%rax,1),%ecx
  cmp    %eax,%edx
  setge  %r9b
  test   %cl,%cl
  setne  %r8b
  add    $0x1,%rax
  test   %r8b,%r9b
  jne    L24
L5:
  mov    %r10d,%eax
  ret
L30:
  mov    $0x0,%r10d
  jmp    L5
```

assistant: ```c
int add_str(to, from, max)
char *to;
const char *from;
int max;
{
  int i;
  for (i = 0; from[i] && i <= max; ++i)
    to[i] = from[i];
  return i;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<add_str>:
  endbr64
  movzbl (%rsi),%ecx
  test   %edx,%edx
  js     L10
  test   %cl,%cl
  je     L10
  mov    $0x1,%eax
  nopl   0x0(%rax)
L13:
  mov    %cl,-0x1(%rdi,%rax,1)
  movzbl (%rsi,%rax,1),%ecx
  cmp    %eax,%edx
  mov    %eax,%r10d
  setge  %r9b
  test   %cl,%cl
  setne  %r8b
  add    $0x1,%rax
  test   %r8b,%r9b
  jne    L13
  mov    %r10d,%eax
  ret
  nopl   0x0(%rax)
L10:
  xor    %r10d,%r10d
  mov    %r10d,%eax
  ret
```

assistant: ```c
int add_str(to, from, max)
char *to;
const char *from;
int max;
{
  int i;
  for (i = 0; from[i] && i <= max; ++i)
    to[i] = from[i];
  return i;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<add_str>:
  endbr64
  movzbl (%rsi),%ecx
  test   %edx,%edx
  js     L0
  test   %cl,%cl
  je     L0
  mov    $0x1,%eax
  nopl   0x0(%rax)
L23:
  mov    %cl,-0x1(%rdi,%rax,1)
  movzbl (%rsi,%rax,1),%ecx
  cmp    %eax,%edx
  mov    %eax,%r10d
  setge  %r9b
  test   %cl,%cl
  setne  %r8b
  add    $0x1,%rax
  test   %r8b,%r9b
  jne    L23
  mov    %r10d,%eax
  ret
  nopl   0x0(%rax)
L0:
  xor    %r10d,%r10d
  mov    %r10d,%eax
  ret
```

assistant: ```c
int add_str(to, from, max)
char *to;
const char *from;
int max;
{
  int i;
  for (i = 0; from[i] && i <= max; ++i)
    to[i] = from[i];
  return i;
}
```
user: Translate the below assembly code into C programming language:

```asm
<test_stress>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movl   $0x0,-0x4(%rbp)
  jmp    L16
L6:
  mov    $0x0,%eax
  call   <alloc_free_chain@plt>
L16:
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  cmp    $0xc7,%eax
  jle    L6
  nop
  nop
  leave
  ret
```

assistant: ```c
void test_stress() {
  int k = 0;
  while (k++ < 200) {
    alloc_free_chain();
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<test_stress>:
  endbr64
  push   %rbx
  mov    $0xc8,%ebx
L2:
  mov    $0x0,%eax
  call   <alloc_free_chain@plt>
  sub    $0x1,%ebx
  jne    L2
  pop    %rbx
  ret
```

assistant: ```c
void test_stress() {
  int k = 0;
  while (k++ < 200) {
    alloc_free_chain();
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<test_stress>:
  endbr64
  push   %rbx
  mov    $0xc8,%ebx
  nopw   0x0(%rax,%rax,1)
L3:
  xor    %eax,%eax
  call   <alloc_free_chain@plt>
  sub    $0x1,%ebx
  jne    L3
  pop    %rbx
  ret
```

assistant: ```c
void test_stress() {
  int k = 0;
  while (k++ < 200) {
    alloc_free_chain();
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<test_stress>:
  endbr64
  push   %rbx
  mov    $0xc8,%ebx
  nopw   0x0(%rax,%rax,1)
L1:
  xor    %eax,%eax
  call   <alloc_free_chain@plt>
  sub    $0x1,%ebx
  jne    L1
  pop    %rbx
  ret
```

assistant: ```c
void test_stress() {
  int k = 0;
  while (k++ < 200) {
    alloc_free_chain();
  }
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<GScr_StrRepl>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x830,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x0,%eax
  call   <Scr_GetNumParam@plt>
  cmp    $0x3,%eax
  je     L6
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <Scr_Error@plt>
L6:
  mov    $0x0,%edi
  call   <Scr_GetString@plt>
  mov    %rax,-0x828(%rbp)
  mov    $0x1,%edi
  call   <Scr_GetString@plt>
  mov    %rax,-0x820(%rbp)
  mov    $0x2,%edi
  call   <Scr_GetString@plt>
  mov    %rax,-0x818(%rbp)
  mov    -0x818(%rbp),%rsi
  mov    -0x820(%rbp),%rcx
  mov    -0x828(%rbp),%rdx
  lea    -0x810(%rbp),%rax
  mov    %rsi,%r8
  mov    $0x800,%esi
  mov    %rax,%rdi
  call   <Q_strnrepl@plt>
  movb   $0x0,-0x810(%rbp)
  lea    -0x810(%rbp),%rax
  mov    %rax,%rdi
  call   <Scr_AddString@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L15
  call   <__stack_chk_fail@plt>
L15:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D7
datatype: string

tool: D7: Usage: StrReplace(<string>, <string>, <string>)


assistant: ```c
void GScr_StrRepl() {
  char buffer[2048];
  if (Scr_GetNumParam() != 3) {
    Scr_Error("Usage: StrReplace(<string>, <string>, <string>)\n");
  }
  char *string = Scr_GetString(0);
  char *find = Scr_GetString(1);
  char *replacement = Scr_GetString(2);
  Q_strnrepl(buffer, sizeof(buffer), string, find, replacement);
  *buffer = 0;
  Scr_AddString(buffer);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<GScr_StrRepl>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x810,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x808(%rsp)
  xor    %eax,%eax
  call   <Scr_GetNumParam@plt>
  cmp    $0x3,%eax
  jne    L24
L6:
  mov    $0x0,%edi
  call   <Scr_GetString@plt>
  mov    %rax,%rbx
  mov    $0x1,%edi
  call   <Scr_GetString@plt>
  mov    %rax,%rbp
  mov    $0x2,%edi
  call   <Scr_GetString@plt>
  mov    %rax,%r8
  mov    %rsp,%r12
  mov    %rbp,%rcx
  mov    %rbx,%rdx
  mov    $0x800,%esi
  mov    %r12,%rdi
  call   <Q_strnrepl@plt>
  movb   $0x0,(%rsp)
  mov    %r12,%rdi
  call   <Scr_AddString@plt>
  mov    0x808(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L5
  add    $0x810,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L24:
  lea    D7(%rip),%rdi
  call   <Scr_Error@plt>
  jmp    L6
L5:
  call   <__stack_chk_fail@plt>
```

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

tool: D7: Usage: StrReplace(<string>, <string>, <string>)


assistant: ```c
void GScr_StrRepl() {
  char buffer[2048];
  if (Scr_GetNumParam() != 3) {
    Scr_Error("Usage: StrReplace(<string>, <string>, <string>)\n");
  }
  char *string = Scr_GetString(0);
  char *find = Scr_GetString(1);
  char *replacement = Scr_GetString(2);
  Q_strnrepl(buffer, sizeof(buffer), string, find, replacement);
  *buffer = 0;
  Scr_AddString(buffer);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<GScr_StrRepl>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  sub    $0x810,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x808(%rsp)
  xor    %eax,%eax
  call   <Scr_GetNumParam@plt>
  cmp    $0x3,%eax
  je     L1
  lea    D1(%rip),%rdi
  call   <Scr_Error@plt>
L1:
  xor    %edi,%edi
  mov    %rsp,%rbp
  call   <Scr_GetString@plt>
  mov    $0x1,%edi
  mov    %rax,%r12
  call   <Scr_GetString@plt>
  mov    $0x2,%edi
  mov    %rax,%r13
  call   <Scr_GetString@plt>
  mov    %rbp,%rdi
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rax,%r8
  mov    $0x800,%esi
  call   <Q_strnrepl@plt>
  mov    %rbp,%rdi
  movb   $0x0,(%rsp)
  call   <Scr_AddString@plt>
  mov    0x808(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L17
  add    $0x810,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L17:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D1
type_infered: string

tool: D1: Usage: StrReplace(<string>, <string>, <string>)


assistant: ```c
void GScr_StrRepl() {
  char buffer[2048];
  if (Scr_GetNumParam() != 3) {
    Scr_Error("Usage: StrReplace(<string>, <string>, <string>)\n");
  }
  char *string = Scr_GetString(0);
  char *find = Scr_GetString(1);
  char *replacement = Scr_GetString(2);
  Q_strnrepl(buffer, sizeof(buffer), string, find, replacement);
  *buffer = 0;
  Scr_AddString(buffer);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<GScr_StrRepl>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  sub    $0x810,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x808(%rsp)
  xor    %eax,%eax
  call   <Scr_GetNumParam@plt>
  cmp    $0x3,%eax
  je     L10
  lea    D5(%rip),%rdi
  call   <Scr_Error@plt>
L10:
  xor    %edi,%edi
  mov    %rsp,%rbp
  call   <Scr_GetString@plt>
  mov    $0x1,%edi
  mov    %rax,%r12
  call   <Scr_GetString@plt>
  mov    $0x2,%edi
  mov    %rax,%r13
  call   <Scr_GetString@plt>
  mov    %rbp,%rdi
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rax,%r8
  mov    $0x800,%esi
  call   <Q_strnrepl@plt>
  mov    %rbp,%rdi
  movb   $0x0,(%rsp)
  call   <Scr_AddString@plt>
  mov    0x808(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x810,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L2:
  call   <__stack_chk_fail@plt>
```

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

tool: D5: Usage: StrReplace(<string>, <string>, <string>)


assistant: ```c
void GScr_StrRepl() {
  char buffer[2048];
  if (Scr_GetNumParam() != 3) {
    Scr_Error("Usage: StrReplace(<string>, <string>, <string>)\n");
  }
  char *string = Scr_GetString(0);
  char *find = Scr_GetString(1);
  char *replacement = Scr_GetString(2);
  Q_strnrepl(buffer, sizeof(buffer), string, find, replacement);
  *buffer = 0;
  Scr_AddString(buffer);
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<__decodeName>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L12
L18:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  add    $0x1,%eax
  mov    %al,-0x9(%rbp)
  mov    -0x8(%rbp),%rax
  movb   $0x2e,(%rax)
  movzbl -0x9(%rbp),%eax
  add    %rax,-0x8(%rbp)
L12:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L18
  nop
  pop    %rbp
  ret
```

assistant: ```c
void __decodeName(unsigned char *name) {
  unsigned char *s;
  unsigned char num;
  s = name;
  while (*s != '\0') {
    num = *s + 1;
    *s = '.';
    s += num;
  }
  return;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<__decodeName>:
  endbr64
  movzbl (%rdi),%eax
  test   %al,%al
  je     L11
L13:
  movb   $0x2e,(%rdi)
  add    $0x1,%eax
  movzbl %al,%eax
  add    %rax,%rdi
  movzbl (%rdi),%eax
  test   %al,%al
  jne    L13
L11:
  ret
```

assistant: ```c
void __decodeName(unsigned char *name) {
  unsigned char *s;
  unsigned char num;
  s = name;
  while (*s != '\0') {
    num = *s + 1;
    *s = '.';
    s += num;
  }
  return;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<__decodeName>:
  endbr64
  jmp    L10
  cs nopw 0x0(%rax,%rax,1)
L15:
  add    $0x1,%eax
  movb   $0x2e,(%rdi)
  movzbl %al,%eax
  add    %rax,%rdi
L10:
  movzbl (%rdi),%eax
  test   %al,%al
  jne    L15
  ret
```

assistant: ```c
void __decodeName(unsigned char *name) {
  unsigned char *s;
  unsigned char num;
  s = name;
  while (*s != '\0') {
    num = *s + 1;
    *s = '.';
    s += num;
  }
  return;
}
```
user: Translate the below assembly code into C programming language:

```asm
<__decodeName>:
  endbr64
  jmp    L5
  cs nopw 0x0(%rax,%rax,1)
L8:
  add    $0x1,%eax
  movb   $0x2e,(%rdi)
  movzbl %al,%eax
  add    %rax,%rdi
L5:
  movzbl (%rdi),%eax
  test   %al,%al
  jne    L8
  ret
```

assistant: ```c
void __decodeName(unsigned char *name) {
  unsigned char *s;
  unsigned char num;
  s = name;
  while (*s != '\0') {
    num = *s + 1;
    *s = '.';
    s += num;
  }
  return;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<psmat4_multiply>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    -0x18(%rbp),%rdx
  mov    -0x10(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <mat4_multiply@plt>
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
__attribute__((always_)) struct mat4 *psmat4_multiply(struct mat4 *result, struct mat4 *a, struct mat4 *b) {
  mat4_multiply((float *)result, (float *)a, (float *)b);
  return result;
}
```
user: What is the c source code of the assembly code below:

```asm
<psmat4_multiply>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  call   <mat4_multiply@plt>
  mov    %rbx,%rax
  pop    %rbx
  ret
```

assistant: ```c
__attribute__((always_)) struct mat4 *psmat4_multiply(struct mat4 *result, struct mat4 *a, struct mat4 *b) {
  mat4_multiply((float *)result, (float *)a, (float *)b);
  return result;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<psmat4_multiply>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  call   <mat4_multiply@plt>
  mov    %r12,%rax
  pop    %r12
  ret
```

assistant: ```c
__attribute__((always_)) struct mat4 *psmat4_multiply(struct mat4 *result, struct mat4 *a, struct mat4 *b) {
  mat4_multiply((float *)result, (float *)a, (float *)b);
  return result;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<psmat4_multiply>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  call   <mat4_multiply@plt>
  mov    %r12,%rax
  pop    %r12
  ret
```

assistant: ```c
__attribute__((always_)) struct mat4 *psmat4_multiply(struct mat4 *result, struct mat4 *a, struct mat4 *b) {
  mat4_multiply((float *)result, (float *)a, (float *)b);
  return result;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<srcTcpSocket_pull>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x38(%rbp)
  mov    %ecx,-0x44(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x2c(%rbp)
  cmpl   $0x0,-0x44(%rbp)
  jle    L28
  movq   $0x0,-0x18(%rbp)
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  lea    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <FD_ZERO@plt>
  lea    -0x30(%rbp),%rdx
  mov    -0x34(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <FD_SET@plt>
  mov    -0x34(%rbp),%eax
  lea    0x1(%rax),%edi
  lea    -0x20(%rbp),%rdx
  lea    -0x30(%rbp),%rax
  mov    %rdx,%r8
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    %rax,%rsi
  call   <select@plt>
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jg     L28
  mov    -0x24(%rbp),%eax
  jmp    L45
L28:
  mov    -0x38(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x40(%rbp),%rax
  add    %rax,%rcx
  mov    -0x34(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,-0x28(%rbp)
  cmpl   $0x0,-0x28(%rbp)
  jle    L30
  mov    -0x28(%rbp),%eax
  add    %eax,-0x2c(%rbp)
L30:
  cmpl   $0x0,-0x28(%rbp)
  jg     L28
  mov    -0x2c(%rbp),%eax
L45:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L37
  call   <__stack_chk_fail@plt>
L37:
  leave
  ret
```

assistant: ```c
int srcTcpSocket_pull(int socketFD, char *data, int len, int timeout_sec) {
  int readLen = 0;
  int dataLen = 0;
  if (timeout_sec > 0) {
    fd_set FD_set;
    struct timeval timeout;
    timeout.tv_usec = 0;
    timeout.tv_sec = timeout_sec;
    FD_ZERO(&FD_set);
    FD_SET(socketFD, &FD_set);
    int ret = select(socketFD + 1, &FD_set, NULL, NULL, &timeout);
    if (ret <= 0) {
      return ret;
    }
  }
  do {
    readLen = (int)read(socketFD, data + dataLen, (size_t)(len - dataLen));
    if (readLen > 0) {
      dataLen += readLen;
    }
  } while (readLen > 0);
  return dataLen;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<srcTcpSocket_pull>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,%ebp
  mov    %rsi,%r12
  mov    %edx,%r13d
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %ecx,%ecx
  jg     L41
L35:
  mov    $0x0,%ebx
  jmp    L40
L41:
  movq   $0x0,0x18(%rsp)
  mov    %ecx,0x10(%rsp)
  lea    0xc(%rsp),%rbx
  mov    %rbx,%rdi
  call   <FD_ZERO@plt>
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <FD_SET@plt>
  lea    0x1(%rbp),%edi
  lea    0x10(%rsp),%r8
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    %rbx,%rsi
  call   <select@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  jg     L35
  jmp    L59
L22:
  add    %eax,%ebx
L40:
  mov    %r13d,%edx
  sub    %ebx,%edx
  movslq %edx,%rdx
  movslq %ebx,%rsi
  add    %r12,%rsi
  mov    %ebp,%edi
  call   <read@plt>
  test   %eax,%eax
  jg     L22
L59:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L18
  mov    %ebx,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L18:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int srcTcpSocket_pull(int socketFD, char *data, int len, int timeout_sec) {
  int readLen = 0;
  int dataLen = 0;
  if (timeout_sec > 0) {
    fd_set FD_set;
    struct timeval timeout;
    timeout.tv_usec = 0;
    timeout.tv_sec = timeout_sec;
    FD_ZERO(&FD_set);
    FD_SET(socketFD, &FD_set);
    int ret = select(socketFD + 1, &FD_set, NULL, NULL, &timeout);
    if (ret <= 0) {
      return ret;
    }
  }
  do {
    readLen = (int)read(socketFD, data + dataLen, (size_t)(len - dataLen));
    if (readLen > 0) {
      dataLen += readLen;
    }
  } while (readLen > 0);
  return dataLen;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<srcTcpSocket_pull>:
  endbr64
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %ecx,%ecx
  jg     L42
L23:
  xor    %r13d,%r13d
  nopl   (%rax)
L4:
  mov    %r12d,%edx
  movslq %r13d,%rsi
  mov    %ebx,%edi
  sub    %r13d,%edx
  add    %rbp,%rsi
  movslq %edx,%rdx
  call   <read@plt>
  test   %eax,%eax
  jle    L45
  add    %eax,%r13d
  jmp    L4
  nop
L42:
  lea    0xc(%rsp),%r13
  mov    %ecx,0x10(%rsp)
  movq   $0x0,0x18(%rsp)
  mov    %r13,%rdi
  call   <FD_ZERO@plt>
  mov    %r13,%rsi
  mov    %ebx,%edi
  call   <FD_SET@plt>
  mov    %r13,%rsi
  lea    0x1(%rbx),%edi
  lea    0x10(%rsp),%r8
  xor    %ecx,%ecx
  xor    %edx,%edx
  call   <select@plt>
  mov    %eax,%r13d
  test   %eax,%eax
  jg     L23
  nop
L45:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  add    $0x38,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L15:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int srcTcpSocket_pull(int socketFD, char *data, int len, int timeout_sec) {
  int readLen = 0;
  int dataLen = 0;
  if (timeout_sec > 0) {
    fd_set FD_set;
    struct timeval timeout;
    timeout.tv_usec = 0;
    timeout.tv_sec = timeout_sec;
    FD_ZERO(&FD_set);
    FD_SET(socketFD, &FD_set);
    int ret = select(socketFD + 1, &FD_set, NULL, NULL, &timeout);
    if (ret <= 0) {
      return ret;
    }
  }
  do {
    readLen = (int)read(socketFD, data + dataLen, (size_t)(len - dataLen));
    if (readLen > 0) {
      dataLen += readLen;
    }
  } while (readLen > 0);
  return dataLen;
}
```