ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movl   $0x7fffffff,-0x8(%rbp)
  movl   $0xffffffff,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  add    $0x2,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  mov    %eax,%esi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x4(%rbp),%eax
  lea    0x2(%rax),%ecx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D5
datatype: string
name: extract_symbolic_data
arguments: label: D13
datatype: string

tool: D5: num=%d %d %d 


tool: D13: j=%u %u %u 


assistant: ```c
int main(void) {
  int num = 2147483647;
  unsigned int j = 4294967295;
  printf("num=%d %d %d \n", num, num + 1, num + 2);
  printf("j=%u %u %u \n", j, j + 1, j + 2);
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x80000001,%ecx
  mov    $0x80000000,%edx
  mov    $0x7fffffff,%esi
  lea    D6(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%ecx
  mov    $0x0,%edx
  mov    $0xffffffff,%esi
  lea    D19(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: retrieve_data
arguments: label: D6
type: string
name: retrieve_data
arguments: label: D19
type: string

tool: D6: num=%d %d %d 


tool: D19: j=%u %u %u 


assistant: ```c
int main(void) {
  int num = 2147483647;
  unsigned int j = 4294967295;
  printf("num=%d %d %d \n", num, num + 1, num + 2);
  printf("j=%u %u %u \n", j, j + 1, j + 2);
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x80000001,%ecx
  mov    $0x80000000,%edx
  mov    $0x7fffffff,%esi
  lea    D19(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%ecx
  xor    %edx,%edx
  mov    $0xffffffff,%esi
  lea    D18(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D19
type_guessed: string
name: unpack_data
arguments: data_tag: D18
type_guessed: string

tool: D19: num=%d %d %d 


tool: D18: j=%u %u %u 


assistant: ```c
int main(void) {
  int num = 2147483647;
  unsigned int j = 4294967295;
  printf("num=%d %d %d \n", num, num + 1, num + 2);
  printf("j=%u %u %u \n", j, j + 1, j + 2);
  return 0;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x80000001,%ecx
  mov    $0x80000000,%edx
  mov    $0x7fffffff,%esi
  lea    D0(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%ecx
  xor    %edx,%edx
  mov    $0xffffffff,%esi
  lea    D18(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: read_data
arguments: data_tag: D0
data_type: string
name: read_data
arguments: data_tag: D18
data_type: string

tool: D0: num=%d %d %d 


tool: D18: j=%u %u %u 


assistant: ```c
int main(void) {
  int num = 2147483647;
  unsigned int j = 4294967295;
  printf("num=%d %d %d \n", num, num + 1, num + 2);
  printf("j=%u %u %u \n", j, j + 1, j + 2);
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<send_ni>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x18(%rbp)
  jmp    L34
L19:
  mov    D4(%rip),%rax
  mov    (%rax),%rdx
  mov    D19(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  je     L34
  mov    -0x4(%rbp),%eax
  jmp    L2
L34:
  mov    -0x18(%rbp),%ecx
  mov    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rsi
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <send@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  js     L19
  mov    -0x4(%rbp),%eax
L2:
  leave
  ret
```

assistant: ```c
ssize_t send_ni(int s, const void *buf, size_t len, int flags) {
  int retval;
  while ((retval = send(s, buf, len, flags)) < 0) {
    if (errno != EINTR)
      return retval;
  }
  return retval;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<send_ni>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%r13d
  mov    %rsi,%r12
  mov    %rdx,%rbp
  mov    %ecx,%ebx
L12:
  mov    %ebx,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %r13d,%edi
  call   <send@plt>
  test   %eax,%eax
  jns    L13
  mov    D9(%rip),%rcx
  mov    D1(%rip),%rdx
  mov    (%rdx),%rsi
  cmp    %rsi,(%rcx)
  je     L12
L13:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
ssize_t send_ni(int s, const void *buf, size_t len, int flags) {
  int retval;
  while ((retval = send(s, buf, len, flags)) < 0) {
    if (errno != EINTR)
      return retval;
  }
  return retval;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<send_ni>:
  endbr64
  push   %r13
  mov    %edi,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x8,%rsp
  jmp    L17
  nopl   0x0(%rax,%rax,1)
L16:
  mov    D10(%rip),%rdx
  mov    D11(%rip),%rcx
  mov    (%rdx),%rsi
  cmp    %rsi,(%rcx)
  jne    L10
L17:
  mov    %ebx,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %r13d,%edi
  call   <send@plt>
  test   %eax,%eax
  js     L16
L10:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
ssize_t send_ni(int s, const void *buf, size_t len, int flags) {
  int retval;
  while ((retval = send(s, buf, len, flags)) < 0) {
    if (errno != EINTR)
      return retval;
  }
  return retval;
}
```
user: What is the c source code of the assembly code below:

```asm
<send_ni>:
  endbr64
  push   %r13
  mov    %edi,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x8,%rsp
  jmp    L8
  nopl   0x0(%rax,%rax,1)
L26:
  mov    D15(%rip),%rdx
  mov    D5(%rip),%rcx
  mov    (%rdx),%rsi
  cmp    %rsi,(%rcx)
  jne    L28
L8:
  mov    %ebx,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %r13d,%edi
  call   <send@plt>
  test   %eax,%eax
  js     L26
L28:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
ssize_t send_ni(int s, const void *buf, size_t len, int flags) {
  int retval;
  while ((retval = send(s, buf, len, flags)) < 0) {
    if (errno != EINTR)
      return retval;
  }
  return retval;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<_ht_pointer_swap>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x20(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void _ht_pointer_swap(void **first, void **second) {
  void *temp = *first;
  *first = *second;
  *second = temp;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<_ht_pointer_swap>:
  endbr64
  mov    (%rdi),%rax
  mov    (%rsi),%rdx
  mov    %rdx,(%rdi)
  mov    %rax,(%rsi)
  ret
```

assistant: ```c
void _ht_pointer_swap(void **first, void **second) {
  void *temp = *first;
  *first = *second;
  *second = temp;
}
```
user: What is the c source code of the assembly code below:

```asm
<_ht_pointer_swap>:
  endbr64
  mov    (%rdi),%rax
  mov    (%rsi),%rdx
  mov    %rdx,(%rdi)
  mov    %rax,(%rsi)
  ret
```

assistant: ```c
void _ht_pointer_swap(void **first, void **second) {
  void *temp = *first;
  *first = *second;
  *second = temp;
}
```
user: What is the c source code of the assembly code below?

```asm
<_ht_pointer_swap>:
  endbr64
  mov    (%rdi),%rax
  mov    (%rsi),%rdx
  mov    %rdx,(%rdi)
  mov    %rax,(%rsi)
  ret
```

assistant: ```c
void _ht_pointer_swap(void **first, void **second) {
  void *temp = *first;
  *first = *second;
  *second = temp;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<RandomFunc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x18(%rbp),%rax
  movzwl (%rax),%eax
  sub    $0x96a,%ax
  mov    %ax,-0xa(%rbp)
  movw   $0x0,-0xc(%rbp)
  nop
  movzwl -0xa(%rbp),%eax
  lea    -0x409f(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %dx,(%rax)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

assistant: ```c
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = (input[0UL] + 51238316UL) + (unsigned short)8426;
    local1 = 0UL;
    while (local1 < (unsigned short)0) {
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + (unsigned short)48993;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<RandomFunc>:
  endbr64
  movzwl (%rdi),%eax
  sub    $0x4a09,%ax
  mov    %ax,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = (input[0UL] + 51238316UL) + (unsigned short)8426;
    local1 = 0UL;
    while (local1 < (unsigned short)0) {
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + (unsigned short)48993;
  }
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<RandomFunc>:
  endbr64
  movzwl (%rdi),%eax
  sub    $0x4a09,%ax
  mov    %ax,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = (input[0UL] + 51238316UL) + (unsigned short)8426;
    local1 = 0UL;
    while (local1 < (unsigned short)0) {
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + (unsigned short)48993;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<RandomFunc>:
  endbr64
  movzwl (%rdi),%eax
  sub    $0x4a09,%ax
  mov    %ax,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = (input[0UL] + 51238316UL) + (unsigned short)8426;
    local1 = 0UL;
    while (local1 < (unsigned short)0) {
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + (unsigned short)48993;
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<fill_buffer>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  jne    L28
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  jmp    L24
L28:
  mov    -0x20(%rbp),%eax
L24:
  mov    %eax,-0x4(%rbp)
  jmp    L12
L31:
  mov    -0x4(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jle    L32
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x4(%rbp)
L32:
  mov    -0x4(%rbp),%edx
  mov    -0x28(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x4(%rbp),%eax
  cltq
  add    %rax,-0x18(%rbp)
  mov    -0x4(%rbp),%eax
  sub    %eax,-0x1c(%rbp)
L12:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L31
  nop
  nop
  leave
  ret
```

assistant: ```c
void fill_buffer(unsigned char *s, int len, char *pat, int patlen) {
  int l = patlen ? patlen : strlen(pat);
  while (len) {
    if (l > len)
      l = len;
    memcpy(s, pat, l);
    s += l;
    len -= l;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<fill_buffer>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
  mov    %esi,%ebp
  mov    %rdx,%r13
  mov    %ecx,%ebx
  test   %ecx,%ecx
  je     L0
L23:
  test   %ebp,%ebp
  je     L8
L32:
  cmp    %ebp,%ebx
  cmovg  %ebp,%ebx
  mov    %ebx,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <memcpy@plt>
  movslq %ebx,%rax
  add    %rax,%r12
  sub    %ebx,%ebp
  jne    L32
L8:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L0:
  mov    %rdx,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  jmp    L23
```

assistant: ```c
void fill_buffer(unsigned char *s, int len, char *pat, int patlen) {
  int l = patlen ? patlen : strlen(pat);
  while (len) {
    if (l > len)
      l = len;
    memcpy(s, pat, l);
    s += l;
    len -= l;
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<fill_buffer>:
  endbr64
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x8,%rsp
  test   %ecx,%ecx
  je     L5
L37:
  test   %ebp,%ebp
  je     L35
L29:
  cmp    %ebp,%ebx
  mov    %r12,%rdi
  mov    %r13,%rsi
  cmovg  %ebp,%ebx
  mov    %ebx,%edx
  call   <memcpy@plt>
  movslq %ebx,%rax
  add    %rax,%r12
  sub    %ebx,%ebp
  jne    L29
L35:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L5:
  mov    %rdx,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  jmp    L37
```

assistant: ```c
void fill_buffer(unsigned char *s, int len, char *pat, int patlen) {
  int l = patlen ? patlen : strlen(pat);
  while (len) {
    if (l > len)
      l = len;
    memcpy(s, pat, l);
    s += l;
    len -= l;
  }
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<fill_buffer>:
  endbr64
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x8,%rsp
  test   %ecx,%ecx
  je     L32
L8:
  test   %ebp,%ebp
  je     L12
L18:
  cmp    %ebp,%ebx
  mov    %r12,%rdi
  mov    %r13,%rsi
  cmovg  %ebp,%ebx
  mov    %ebx,%edx
  call   <memcpy@plt>
  movslq %ebx,%rax
  add    %rax,%r12
  sub    %ebx,%ebp
  jne    L18
L12:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L32:
  mov    %rdx,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  jmp    L8
```

assistant: ```c
void fill_buffer(unsigned char *s, int len, char *pat, int patlen) {
  int l = patlen ? patlen : strlen(pat);
  while (len) {
    if (l > len)
      l = len;
    memcpy(s, pat, l);
    s += l;
    len -= l;
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<relay>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x420,%rsp
  mov    %edi,%ebp
  mov    %esi,%r13d
  mov    %fs:0x28,%rax
  mov    %rax,0x418(%rsp)
  xor    %eax,%eax
  mov    $0x0,%edi
  call   <close@plt>
  mov    $0x1,%edi
  call   <close@plt>
  mov    $0x2,%edi
  call   <close@plt>
  cmp    %r13d,%ebp
  mov    %r13d,%r14d
  cmovge %ebp,%r14d
  add    $0x1,%r14d
  lea    0xc(%rsp),%rbx
  mov    %rbx,%rdi
  call   <FD_ZERO@plt>
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <FD_SET@plt>
  mov    %rbx,%rsi
  mov    %r13d,%edi
  call   <FD_SET@plt>
  lea    0x8(%rsp),%rbx
  jmp    L40
L36:
  lea    0x10(%rsp),%rsi
  mov    $0x400,%edx
  mov    %ebp,%edi
  call   <read@plt>
  test   %eax,%eax
  jg     L91
  mov    %rbx,%rsi
  mov    %r13d,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L51
  mov    $0x1,%r12d
L14:
  lea    0x10(%rsp),%rsi
  mov    $0x400,%edx
  mov    %r13d,%edi
  call   <read@plt>
  mov    %eax,%edx
  test   %eax,%eax
  jle    L51
  lea    0x10(%rsp),%rsi
  mov    %ebp,%edi
  call   <write@plt>
L33:
  test   %r12d,%r12d
  jne    L51
L40:
  mov    0xc(%rsp),%eax
  mov    %eax,0x8(%rsp)
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    %rbx,%rsi
  mov    %r14d,%edi
  call   <select@plt>
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  jne    L36
L80:
  mov    %rbx,%rsi
  mov    %r13d,%edi
  call   <FD_ISSET@plt>
  mov    $0x0,%r12d
  test   %rax,%rax
  je     L33
  jmp    L14
L91:
  lea    0x10(%rsp),%rsi
  mov    %eax,%edx
  mov    %r13d,%edi
  call   <write@plt>
  jmp    L80
L51:
  mov    %ebp,%edi
  call   <close@plt>
  mov    %r13d,%edi
  call   <close@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  mov    0x418(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L78
  add    $0x420,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L78:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void relay(int master_fd, int sock_fd) {
  fd_set rset, allset;
  int maxfdp1;
  int shutdown;
  char buf[1024];
  int rdsize;
  close(0);
  close(1);
  close(2);
  shutdown = 0;
  maxfdp1 = ((sock_fd > master_fd ? sock_fd : master_fd) + 1);
  FD_ZERO(&allset);
  FD_SET(master_fd, &allset);
  FD_SET(sock_fd, &allset);
  while (!shutdown) {
    rset = allset;
    select(maxfdp1, &rset, NULL, NULL, NULL);
    if (FD_ISSET(master_fd, &rset)) {
      rdsize = read(master_fd, buf, sizeof(buf));
      if (rdsize > 0) {
        write(sock_fd, buf, rdsize);
      } else {
        shutdown = 1;
      }
    }
    if (FD_ISSET(sock_fd, &rset)) {
      rdsize = read(sock_fd, buf, sizeof(buf));
      if (rdsize > 0) {
        write(master_fd, buf, rdsize);
      } else {
        shutdown = 1;
      }
    }
  }
  close(master_fd);
  close(sock_fd);
  exit(0);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<relay>:
  endbr64
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  mov    %edi,%r12d
  xor    %edi,%edi
  push   %rbp
  push   %rbx
  mov    %r13d,%ebx
  sub    $0x420,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x418(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rbp
  lea    0x10(%rsp),%r14
  call   <close@plt>
  mov    $0x1,%edi
  call   <close@plt>
  mov    $0x2,%edi
  call   <close@plt>
  cmp    %r13d,%r12d
  mov    %rbp,%rdi
  cmovge %r12d,%ebx
  call   <FD_ZERO@plt>
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <FD_SET@plt>
  mov    %rbp,%rsi
  mov    %r13d,%edi
  add    $0x1,%ebx
  call   <FD_SET@plt>
  lea    0x8(%rsp),%rbp
  nopl   0x0(%rax)
L33:
  mov    0xc(%rsp),%eax
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  xor    %edx,%edx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  mov    %eax,0x8(%rsp)
  call   <select@plt>
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  jne    L36
L46:
  mov    %rbp,%rsi
  mov    %r13d,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L33
  mov    $0x400,%edx
  mov    %r14,%rsi
  mov    %r13d,%edi
  call   <read@plt>
  mov    %eax,%edx
  test   %eax,%eax
  jle    L44
  mov    %r14,%rsi
  mov    %r12d,%edi
  call   <write@plt>
  jmp    L33
  nopl   0x0(%rax)
L36:
  mov    $0x400,%edx
  mov    %r14,%rsi
  mov    %r12d,%edi
  call   <read@plt>
  mov    %eax,%edx
  test   %eax,%eax
  jg     L48
  mov    %rbp,%rsi
  mov    %r13d,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L44
  mov    $0x400,%edx
  mov    %r14,%rsi
  mov    %r13d,%edi
  call   <read@plt>
  mov    %eax,%edx
  test   %eax,%eax
  jle    L44
  mov    %r14,%rsi
  mov    %r12d,%edi
  call   <write@plt>
L44:
  mov    %r12d,%edi
  call   <close@plt>
  mov    %r13d,%edi
  call   <close@plt>
  xor    %edi,%edi
  call   <exit@plt>
  mov    0x418(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L80
  add    $0x420,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L48:
  mov    %r14,%rsi
  mov    %r13d,%edi
  call   <write@plt>
  jmp    L46
L80:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void relay(int master_fd, int sock_fd) {
  fd_set rset, allset;
  int maxfdp1;
  int shutdown;
  char buf[1024];
  int rdsize;
  close(0);
  close(1);
  close(2);
  shutdown = 0;
  maxfdp1 = ((sock_fd > master_fd ? sock_fd : master_fd) + 1);
  FD_ZERO(&allset);
  FD_SET(master_fd, &allset);
  FD_SET(sock_fd, &allset);
  while (!shutdown) {
    rset = allset;
    select(maxfdp1, &rset, NULL, NULL, NULL);
    if (FD_ISSET(master_fd, &rset)) {
      rdsize = read(master_fd, buf, sizeof(buf));
      if (rdsize > 0) {
        write(sock_fd, buf, rdsize);
      } else {
        shutdown = 1;
      }
    }
    if (FD_ISSET(sock_fd, &rset)) {
      rdsize = read(sock_fd, buf, sizeof(buf));
      if (rdsize > 0) {
        write(master_fd, buf, rdsize);
      } else {
        shutdown = 1;
      }
    }
  }
  close(master_fd);
  close(sock_fd);
  exit(0);
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<relay>:
  endbr64
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  mov    %edi,%r12d
  xor    %edi,%edi
  push   %rbp
  push   %rbx
  mov    %r13d,%ebx
  sub    $0x420,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x418(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rbp
  lea    0x10(%rsp),%r14
  call   <close@plt>
  mov    $0x1,%edi
  call   <close@plt>
  mov    $0x2,%edi
  call   <close@plt>
  cmp    %r13d,%r12d
  mov    %rbp,%rdi
  cmovge %r12d,%ebx
  call   <FD_ZERO@plt>
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <FD_SET@plt>
  mov    %rbp,%rsi
  mov    %r13d,%edi
  add    $0x1,%ebx
  call   <FD_SET@plt>
  lea    0x8(%rsp),%rbp
  nopl   0x0(%rax)
L75:
  mov    0xc(%rsp),%eax
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  xor    %edx,%edx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  mov    %eax,0x8(%rsp)
  call   <select@plt>
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  jne    L69
L15:
  mov    %rbp,%rsi
  mov    %r13d,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L75
  mov    $0x400,%edx
  mov    %r14,%rsi
  mov    %r13d,%edi
  call   <read@plt>
  mov    %eax,%edx
  test   %eax,%eax
  jle    L2
  mov    %r14,%rsi
  mov    %r12d,%edi
  call   <write@plt>
  jmp    L75
  nopl   0x0(%rax)
L69:
  mov    $0x400,%edx
  mov    %r14,%rsi
  mov    %r12d,%edi
  call   <read@plt>
  mov    %eax,%edx
  test   %eax,%eax
  jg     L54
  mov    %rbp,%rsi
  mov    %r13d,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L2
  mov    $0x400,%edx
  mov    %r14,%rsi
  mov    %r13d,%edi
  call   <read@plt>
  mov    %eax,%edx
  test   %eax,%eax
  jle    L2
  mov    %r14,%rsi
  mov    %r12d,%edi
  call   <write@plt>
L2:
  mov    %r12d,%edi
  call   <close@plt>
  mov    %r13d,%edi
  call   <close@plt>
  xor    %edi,%edi
  call   <exit@plt>
  mov    0x418(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L20
  add    $0x420,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L54:
  mov    %r14,%rsi
  mov    %r13d,%edi
  call   <write@plt>
  jmp    L15
L20:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void relay(int master_fd, int sock_fd) {
  fd_set rset, allset;
  int maxfdp1;
  int shutdown;
  char buf[1024];
  int rdsize;
  close(0);
  close(1);
  close(2);
  shutdown = 0;
  maxfdp1 = ((sock_fd > master_fd ? sock_fd : master_fd) + 1);
  FD_ZERO(&allset);
  FD_SET(master_fd, &allset);
  FD_SET(sock_fd, &allset);
  while (!shutdown) {
    rset = allset;
    select(maxfdp1, &rset, NULL, NULL, NULL);
    if (FD_ISSET(master_fd, &rset)) {
      rdsize = read(master_fd, buf, sizeof(buf));
      if (rdsize > 0) {
        write(sock_fd, buf, rdsize);
      } else {
        shutdown = 1;
      }
    }
    if (FD_ISSET(sock_fd, &rset)) {
      rdsize = read(sock_fd, buf, sizeof(buf));
      if (rdsize > 0) {
        write(master_fd, buf, rdsize);
      } else {
        shutdown = 1;
      }
    }
  }
  close(master_fd);
  close(sock_fd);
  exit(0);
}
```