ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Translate the below assembly code into C programming language:

```asm
<UpnpAsyncResponse_OUT>:
  endbr64
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %r9d,%ebx
  test   %r8d,%r8d
  jne    L26
L16:
  test   %r12d,%r12d
  jle    L27
  xor    %r8d,%r8d
  mov    $0x1,%ecx
  mov    %r12d,%edx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <ILibWebServer_StreamBody@plt>
L27:
  test   %ebx,%ebx
  jne    L38
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L26:
  xor    %r8d,%r8d
  mov    $0x1,%ecx
  mov    $0x1,%edx
  lea    D33(%rip),%rsi
  call   <ILibWebServer_StreamBody@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  xor    %r8d,%r8d
  mov    %r13,%rsi
  mov    %rbp,%rdi
  mov    $0x1,%ecx
  mov    %eax,%edx
  call   <ILibWebServer_StreamBody@plt>
  xor    %r8d,%r8d
  mov    $0x1,%ecx
  mov    %rbp,%rdi
  mov    $0x1,%edx
  lea    D1(%rip),%rsi
  call   <ILibWebServer_StreamBody@plt>
  jmp    L16
  nopw   0x0(%rax,%rax,1)
L38:
  xor    %r8d,%r8d
  mov    $0x1,%ecx
  mov    $0x2,%edx
  mov    %rbp,%rdi
  lea    D4(%rip),%rsi
  call   <ILibWebServer_StreamBody@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  xor    %r8d,%r8d
  mov    $0x1,%ecx
  mov    %eax,%edx
  call   <ILibWebServer_StreamBody@plt>
  pop    %rbx
  mov    %rbp,%rdi
  xor    %r8d,%r8d
  pop    %rbp
  mov    $0x1,%ecx
  pop    %r12
  mov    $0x3,%edx
  pop    %r13
  lea    D35(%rip),%rsi
  pop    %r14
  jmp    1070 <ILibWebServer_StreamBody@plt>
```

tool_calls: name: parse_data
arguments: data_label: D33
datatype: string
name: parse_data
arguments: data_label: D1
datatype: string
name: parse_data
arguments: data_label: D4
datatype: string
name: parse_data
arguments: data_label: D35
datatype: string

tool: D33: <

tool: D1: >

tool: D4: </

tool: D35: >


assistant: ```c
void UpnpAsyncResponse_OUT(const void *UPnPToken, const char *outArgName, const char *bytes, const int byteLength, const int startArg, const int endArg) {
  struct ILibWebServer_Session *session = (struct ILibWebServer_Session *)UPnPToken;
  if (startArg != 0) {
    ILibWebServer_StreamBody(session, "<", 1, 1, 0);
    ILibWebServer_StreamBody(session, (char *)outArgName, (int)strlen(outArgName), 1, 0);
    ILibWebServer_StreamBody(session, ">", 1, 1, 0);
  }
  if (byteLength > 0) {
    ILibWebServer_StreamBody(session, (char *)bytes, byteLength, 1, 0);
  }
  if (endArg != 0) {
    ILibWebServer_StreamBody(session, "</", 2, 1, 0);
    ILibWebServer_StreamBody(session, (char *)outArgName, (int)strlen(outArgName), 1, 0);
    ILibWebServer_StreamBody(session, ">\r\n", 3, 1, 0);
  }
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<disturb_rows>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  mov    %edx,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  movq   $0x1,(%rax)
  mov    -0x8(%rbp),%rax
  movq   $0x0,0x8(%rax)
  mov    -0x8(%rbp),%rax
  movq   $0x0,0x10(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x18,%rax
  movq   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x18,%rax
  movq   $0x1,0x8(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x18,%rax
  movq   $0x0,0x10(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x30,%rax
  movq   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x30,%rax
  movq   $0x0,0x8(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x30,%rax
  movq   $0x1,0x10(%rax)
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  cltq
  movq   $0x1,(%rdx,%rax,8)
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  cltq
  movq   $0x1,(%rdx,%rax,8)
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  cltq
  movq   $0x0,(%rdx,%rax,8)
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  cltq
  movq   $0x1,(%rdx,%rax,8)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void disturb_rows(long L[3][3], const int i, const int j) {
  L[0][0] = 1;
  L[0][1] = 0;
  L[0][2] = 0;
  L[1][0] = 0;
  L[1][1] = 1;
  L[1][2] = 0;
  L[2][0] = 0;
  L[2][1] = 0;
  L[2][2] = 1;
  L[i][i] = 1;
  L[i][j] = 1;
  L[j][i] = 0;
  L[j][j] = 1;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<disturb_rows>:
  endbr64
  movq   $0x1,(%rdi)
  movq   $0x0,0x8(%rdi)
  movq   $0x0,0x10(%rdi)
  movq   $0x0,0x18(%rdi)
  movq   $0x1,0x20(%rdi)
  movq   $0x0,0x28(%rdi)
  movq   $0x0,0x30(%rdi)
  movq   $0x0,0x38(%rdi)
  movq   $0x1,0x40(%rdi)
  movslq %esi,%rsi
  lea    (%rsi,%rsi,2),%rax
  lea    (%rdi,%rax,8),%rax
  movq   $0x1,(%rax,%rsi,8)
  movslq %edx,%rdx
  movq   $0x1,(%rax,%rdx,8)
  lea    (%rdx,%rdx,2),%rax
  lea    (%rdi,%rax,8),%rax
  movq   $0x0,(%rax,%rsi,8)
  movq   $0x1,(%rax,%rdx,8)
  ret
```

assistant: ```c
void disturb_rows(long L[3][3], const int i, const int j) {
  L[0][0] = 1;
  L[0][1] = 0;
  L[0][2] = 0;
  L[1][0] = 0;
  L[1][1] = 1;
  L[1][2] = 0;
  L[2][0] = 0;
  L[2][1] = 0;
  L[2][2] = 1;
  L[i][i] = 1;
  L[i][j] = 1;
  L[j][i] = 0;
  L[j][j] = 1;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<disturb_rows>:
  endbr64
  movslq %esi,%rsi
  movslq %edx,%rdx
  movq   $0x1,(%rdi)
  lea    (%rsi,%rsi,2),%rax
  movq   $0x0,0x8(%rdi)
  lea    (%rdi,%rax,8),%rax
  movq   $0x0,0x10(%rdi)
  movq   $0x0,0x18(%rdi)
  movq   $0x1,0x20(%rdi)
  movq   $0x0,0x28(%rdi)
  movq   $0x0,0x30(%rdi)
  movq   $0x0,0x38(%rdi)
  movq   $0x1,0x40(%rdi)
  movq   $0x1,(%rax,%rsi,8)
  movq   $0x1,(%rax,%rdx,8)
  lea    (%rdx,%rdx,2),%rax
  lea    (%rdi,%rax,8),%rax
  movq   $0x0,(%rax,%rsi,8)
  movq   $0x1,(%rax,%rdx,8)
  ret
```

assistant: ```c
void disturb_rows(long L[3][3], const int i, const int j) {
  L[0][0] = 1;
  L[0][1] = 0;
  L[0][2] = 0;
  L[1][0] = 0;
  L[1][1] = 1;
  L[1][2] = 0;
  L[2][0] = 0;
  L[2][1] = 0;
  L[2][2] = 1;
  L[i][i] = 1;
  L[i][j] = 1;
  L[j][i] = 0;
  L[j][j] = 1;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<disturb_rows>:
  endbr64
  movslq %esi,%rsi
  movdqa D9(%rip),%xmm1
  movslq %edx,%rdx
  pxor   %xmm0,%xmm0
  lea    (%rsi,%rsi,2),%rax
  movq   $0x1,0x40(%rdi)
  lea    (%rdi,%rax,8),%rax
  movups %xmm1,(%rdi)
  movups %xmm0,0x10(%rdi)
  movups %xmm1,0x20(%rdi)
  movups %xmm0,0x30(%rdi)
  movq   $0x1,(%rax,%rsi,8)
  movq   $0x1,(%rax,%rdx,8)
  lea    (%rdx,%rdx,2),%rax
  lea    (%rdi,%rax,8),%rax
  movq   $0x0,(%rax,%rsi,8)
  movq   $0x1,(%rax,%rdx,8)
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D9
data_type: byte[16]

tool: {"D9": [0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
void disturb_rows(long L[3][3], const int i, const int j) {
  L[0][0] = 1;
  L[0][1] = 0;
  L[0][2] = 0;
  L[1][0] = 0;
  L[1][1] = 1;
  L[1][2] = 0;
  L[2][0] = 0;
  L[2][1] = 0;
  L[2][2] = 1;
  L[i][i] = 1;
  L[i][j] = 1;
  L[j][i] = 0;
  L[j][j] = 1;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<bwb_DEFSNG>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <bwx_DEBUG@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <var_defx@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <bwb_zline@plt>
  cltq
  leave
  ret
```

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

tool: D2: bwb_DEFSNG

assistant: ```c
struct bwb_line *bwb_DEFSNG(struct bwb_line *l) {
  bwx_DEBUG(__FUNCTION__);
  var_defx(l, 1);
  return bwb_zline(l);
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<bwb_DEFSNG>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  lea    D9(%rip),%rdi
  mov    $0x0,%eax
  call   <bwx_DEBUG@plt>
  mov    $0x1,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <var_defx@plt>
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <bwb_zline@plt>
  cltq
  pop    %rbx
  ret
```

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

tool: D9: bwb_DEFSNG

assistant: ```c
struct bwb_line *bwb_DEFSNG(struct bwb_line *l) {
  bwx_DEBUG(__FUNCTION__);
  var_defx(l, 1);
  return bwb_zline(l);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<bwb_DEFSNG>:
  endbr64
  push   %rbp
  xor    %eax,%eax
  mov    %rdi,%rbp
  lea    D7(%rip),%rdi
  call   <bwx_DEBUG@plt>
  mov    %rbp,%rdi
  mov    $0x1,%esi
  xor    %eax,%eax
  call   <var_defx@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <bwb_zline@plt>
  pop    %rbp
  cltq
  ret
```

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

tool: D7: bwb_DEFSNG

assistant: ```c
struct bwb_line *bwb_DEFSNG(struct bwb_line *l) {
  bwx_DEBUG(__FUNCTION__);
  var_defx(l, 1);
  return bwb_zline(l);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<bwb_DEFSNG>:
  endbr64
  push   %rbp
  xor    %eax,%eax
  mov    %rdi,%rbp
  lea    D0(%rip),%rdi
  call   <bwx_DEBUG@plt>
  mov    %rbp,%rdi
  mov    $0x1,%esi
  xor    %eax,%eax
  call   <var_defx@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <bwb_zline@plt>
  pop    %rbp
  cltq
  ret
```

tool_calls: name: disassemble_data
arguments: label: D0
data_type: string

tool: D0: bwb_DEFSNG

assistant: ```c
struct bwb_line *bwb_DEFSNG(struct bwb_line *l) {
  bwx_DEBUG(__FUNCTION__);
  var_defx(l, 1);
  return bwb_zline(l);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    $0x0,%eax
  call   <tmpfile@plt>
  mov    %rax,-0x8(%rbp)
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D6
type_guessed: string

tool: D6: Temporary file created


assistant: ```c
int main() {
  FILE *fp;
  fp = tmpfile();
  printf("Temporary file created\n");
  fclose(fp);
  return (0);
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %rbx
  mov    $0x0,%eax
  call   <tmpfile@plt>
  mov    %rax,%rbx
  lea    D6(%rip),%rdi
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    $0x0,%eax
  pop    %rbx
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D6
type_infered: string

tool: D6: Temporary file created


assistant: ```c
int main() {
  FILE *fp;
  fp = tmpfile();
  printf("Temporary file created\n");
  fclose(fp);
  return (0);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %rbp
  xor    %eax,%eax
  call   <tmpfile@plt>
  lea    D7(%rip),%rdi
  mov    %rax,%rbp
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  xor    %eax,%eax
  pop    %rbp
  ret
```

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

tool: D7: Temporary file created


assistant: ```c
int main() {
  FILE *fp;
  fp = tmpfile();
  printf("Temporary file created\n");
  fclose(fp);
  return (0);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %rbp
  xor    %eax,%eax
  call   <tmpfile@plt>
  lea    D1(%rip),%rdi
  mov    %rax,%rbp
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  xor    %eax,%eax
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D1
type_guessed: string

tool: D1: Temporary file created


assistant: ```c
int main() {
  FILE *fp;
  fp = tmpfile();
  printf("Temporary file created\n");
  fclose(fp);
  return (0);
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<decrease_sleep_time>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  cmpq   $0x493e0,-0x8(%rbp)
  jne    L15
  movq   $0xea60,-0x8(%rbp)
L15:
  subq   $0x7530,-0x8(%rbp)
  cmpq   $0x7530,-0x8(%rbp)
  jg     L11
  movq   $0x7530,-0x8(%rbp)
L11:
  mov    -0x8(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
long decrease_sleep_time(long wait) {
  if (wait == 300000)
    wait = 60000;
  wait -= 30000;
  if (wait <= 30000)
    wait = 30000;
  return wait;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<decrease_sleep_time>:
  endbr64
  cmp    $0x493e0,%rdi
  mov    $0xea60,%eax
  cmove  %rax,%rdi
  lea    -0x7530(%rdi),%rax
  mov    $0x7530,%edx
  cmp    %rdx,%rax
  cmovl  %rdx,%rax
  ret
```

assistant: ```c
long decrease_sleep_time(long wait) {
  if (wait == 300000)
    wait = 60000;
  wait -= 30000;
  if (wait <= 30000)
    wait = 30000;
  return wait;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<decrease_sleep_time>:
  endbr64
  mov    $0x7530,%eax
  cmp    $0x493e0,%rdi
  je     L5
  lea    -0x7530(%rdi),%rax
  mov    $0x7530,%edx
  cmp    %rdx,%rax
  cmovl  %rdx,%rax
L5:
  ret
```

assistant: ```c
long decrease_sleep_time(long wait) {
  if (wait == 300000)
    wait = 60000;
  wait -= 30000;
  if (wait <= 30000)
    wait = 30000;
  return wait;
}
```
user: Translate the below assembly code into C programming language:

```asm
<decrease_sleep_time>:
  endbr64
  mov    $0x7530,%eax
  cmp    $0x493e0,%rdi
  je     L8
  lea    -0x7530(%rdi),%rax
  mov    $0x7530,%edx
  cmp    %rdx,%rax
  cmovl  %rdx,%rax
L8:
  ret
```

assistant: ```c
long decrease_sleep_time(long wait) {
  if (wait == 300000)
    wait = 60000;
  wait -= 30000;
  if (wait <= 30000)
    wait = 30000;
  return wait;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<compr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  movl   $0x0,-0x8(%rbp)
  mov    $0x0,%eax
  call   <compr_read_byte@plt>
  mov    %eax,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L23
L136:
  cmpl   $0xed,-0x10(%rbp)
  jne    L36
  movl   $0x1,-0xc(%rbp)
  jmp    L167
L36:
  movl   $0x0,-0xc(%rbp)
L167:
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    $0x0,%eax
  call   <compr_read_byte@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jne    L102
  cmpl   $0xff,-0x4(%rbp)
  je     L102
  cmpl   $0x0,-0xc(%rbp)
  je     L62
  cmpl   $0x0,-0x8(%rbp)
  je     L102
L62:
  cmpl   $0x0,-0x8(%rbp)
  jne    L98
  movl   $0x1,-0x4(%rbp)
  movl   $0x1,-0x8(%rbp)
L98:
  addl   $0x1,-0x4(%rbp)
  jmp    L23
L102:
  cmpl   $0x0,-0x8(%rbp)
  je     L129
  cmpl   $0x4,-0x4(%rbp)
  jg     L97
  cmpl   $0xed,-0x10(%rbp)
  je     L97
  movl   $0x0,-0x18(%rbp)
  jmp    L158
L4:
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <compr_put_byte@plt>
  addl   $0x1,-0x18(%rbp)
L158:
  mov    -0x18(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L4
  jmp    L2
L97:
  mov    $0xed,%edi
  call   <compr_put_byte@plt>
  mov    $0xed,%edi
  call   <compr_put_byte@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <compr_put_byte@plt>
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <compr_put_byte@plt>
  movl   $0x0,-0x4(%rbp)
L2:
  movl   $0x0,-0x8(%rbp)
  jmp    L23
L129:
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <compr_put_byte@plt>
L23:
  cmpl   $0x0,-0x14(%rbp)
  jns    L136
  mov    $0x0,%edi
  call   <compr_put_byte@plt>
  mov    $0xed,%edi
  call   <compr_put_byte@plt>
  mov    $0xed,%edi
  call   <compr_put_byte@plt>
  mov    $0x0,%edi
  call   <compr_put_byte@plt>
  nop
  leave
  ret
```

assistant: ```c
void compr(void) {
  int j, c, lc, lled, rep, num;
  rep = 0;
  c = compr_read_byte();
  lc = 0;
  num = 0;
  while (c >= 0) {
    if (lc == 0xED)
      lled = 1;
    else
      lled = 0;
    lc = c;
    c = compr_read_byte();
    if (c == lc && num != 255 && (!lled || rep)) {
      if (!rep) {
        num = 1;
        rep = 1;
      }
      num++;
    } else {
      if (rep) {
        if (num < 5 && lc != 0xED)
          for (j = 0; j < num; j++)
            compr_put_byte(lc);
        else {
          compr_put_byte(0xED);
          compr_put_byte(0xED);
          compr_put_byte(num);
          compr_put_byte(lc);
          num = 0;
        }
        rep = 0;
      } else
        compr_put_byte(lc);
    }
  }
  compr_put_byte(0x00);
  compr_put_byte(0xED);
  compr_put_byte(0xED);
  compr_put_byte(0x00);
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<compr>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <compr_read_byte@plt>
  test   %eax,%eax
  js     L62
  mov    %eax,%ebx
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  mov    $0x0,%r15d
  mov    $0x0,%r14d
  jmp    L89
L75:
  test   %r12d,%r12d
  mov    $0x1,%eax
  cmove  %eax,%r13d
  add    $0x1,%r13d
  mov    $0x1,%r12d
  jmp    L13
L12:
  test   %r12d,%r12d
  je     L50
  cmp    $0x4,%r13d
  jg     L22
  cmp    $0xed,%ebx
  je     L22
  test   %r13d,%r13d
  jle    L69
  mov    $0x0,%r12d
L40:
  mov    %ebx,%edi
  call   <compr_put_byte@plt>
  add    $0x1,%r12d
  cmp    %r13d,%r12d
  jne    L40
  mov    %r14d,%r12d
  jmp    L13
L22:
  mov    $0xed,%edi
  call   <compr_put_byte@plt>
  mov    $0xed,%edi
  call   <compr_put_byte@plt>
  mov    %r13d,%edi
  call   <compr_put_byte@plt>
  mov    %ebx,%edi
  call   <compr_put_byte@plt>
  mov    $0x0,%r13d
  mov    %r14d,%r12d
L13:
  mov    %ebx,%r15d
  test   %ebp,%ebp
  js     L62
  mov    %ebp,%ebx
L89:
  mov    $0x0,%eax
  call   <compr_read_byte@plt>
  mov    %eax,%ebp
  cmp    %ebx,%eax
  jne    L12
  cmp    $0xff,%r13d
  je     L12
  cmp    $0xed,%r15d
  jne    L75
  test   %r12d,%r12d
  jne    L75
L50:
  mov    %ebx,%edi
  call   <compr_put_byte@plt>
  mov    %r14d,%r12d
  jmp    L13
L69:
  mov    %r14d,%r12d
  jmp    L13
L62:
  mov    $0x0,%edi
  call   <compr_put_byte@plt>
  mov    $0xed,%edi
  call   <compr_put_byte@plt>
  mov    $0xed,%edi
  call   <compr_put_byte@plt>
  mov    $0x0,%edi
  call   <compr_put_byte@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void compr(void) {
  int j, c, lc, lled, rep, num;
  rep = 0;
  c = compr_read_byte();
  lc = 0;
  num = 0;
  while (c >= 0) {
    if (lc == 0xED)
      lled = 1;
    else
      lled = 0;
    lc = c;
    c = compr_read_byte();
    if (c == lc && num != 255 && (!lled || rep)) {
      if (!rep) {
        num = 1;
        rep = 1;
      }
      num++;
    } else {
      if (rep) {
        if (num < 5 && lc != 0xED)
          for (j = 0; j < num; j++)
            compr_put_byte(lc);
        else {
          compr_put_byte(0xED);
          compr_put_byte(0xED);
          compr_put_byte(num);
          compr_put_byte(lc);
          num = 0;
        }
        rep = 0;
      } else
        compr_put_byte(lc);
    }
  }
  compr_put_byte(0x00);
  compr_put_byte(0xED);
  compr_put_byte(0xED);
  compr_put_byte(0x00);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<compr>:
  endbr64
  push   %r14
  xor    %eax,%eax
  xor    %r14d,%r14d
  push   %r13
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  push   %rbx
  call   <compr_read_byte@plt>
  mov    %eax,%ebp
  xor    %eax,%eax
  test   %ebp,%ebp
  jns    L10
  jmp    L168
  nopl   0x0(%rax,%rax,1)
L96:
  call   <compr_read_byte@plt>
  mov    %eax,%ebx
  cmp    %eax,%ebp
  jne    L101
  test   %r13b,%r13b
  je     L101
  test   %r14d,%r14d
  je     L86
L122:
  add    $0x1,%r12d
L17:
  mov    $0x1,%r14d
L27:
  mov    %ebp,%eax
  test   %ebx,%ebx
  js     L168
L136:
  mov    %ebx,%ebp
L10:
  cmp    $0xff,%r12d
  setne  %r13b
  cmp    $0xed,%eax
  mov    $0x0,%eax
  jne    L96
  call   <compr_read_byte@plt>
  mov    %eax,%ebx
  cmp    %eax,%ebp
  jne    L101
  test   %r13b,%r13b
  je     L101
  test   %r14d,%r14d
  jne    L122
L74:
  mov    %ebp,%edi
  xor    %r14d,%r14d
  call   <compr_put_byte@plt>
  mov    %ebp,%eax
  test   %ebx,%ebx
  jns    L136
L168:
  xor    %edi,%edi
  call   <compr_put_byte@plt>
  mov    $0xed,%edi
  call   <compr_put_byte@plt>
  mov    $0xed,%edi
  call   <compr_put_byte@plt>
  pop    %rbx
  xor    %edi,%edi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1060 <compr_put_byte@plt>
  nopl   0x0(%rax)
L101:
  test   %r14d,%r14d
  je     L74
  cmp    $0x4,%r12d
  jg     L176
  cmp    $0xed,%ebp
  je     L176
  test   %r12d,%r12d
  je     L30
  xor    %r13d,%r13d
L141:
  mov    %ebp,%edi
  add    $0x1,%r13d
  call   <compr_put_byte@plt>
  cmp    %r12d,%r13d
  jne    L141
L30:
  xor    %r14d,%r14d
  jmp    L27
  nopl   0x0(%rax,%rax,1)
L176:
  mov    $0xed,%edi
  xor    %r14d,%r14d
  call   <compr_put_byte@plt>
  mov    $0xed,%edi
  call   <compr_put_byte@plt>
  mov    %r12d,%edi
  xor    %r12d,%r12d
  call   <compr_put_byte@plt>
  mov    %ebp,%edi
  call   <compr_put_byte@plt>
  jmp    L27
  xchg   %ax,%ax
L86:
  mov    $0x2,%r12d
  jmp    L17
```

assistant: ```c
void compr(void) {
  int j, c, lc, lled, rep, num;
  rep = 0;
  c = compr_read_byte();
  lc = 0;
  num = 0;
  while (c >= 0) {
    if (lc == 0xED)
      lled = 1;
    else
      lled = 0;
    lc = c;
    c = compr_read_byte();
    if (c == lc && num != 255 && (!lled || rep)) {
      if (!rep) {
        num = 1;
        rep = 1;
      }
      num++;
    } else {
      if (rep) {
        if (num < 5 && lc != 0xED)
          for (j = 0; j < num; j++)
            compr_put_byte(lc);
        else {
          compr_put_byte(0xED);
          compr_put_byte(0xED);
          compr_put_byte(num);
          compr_put_byte(lc);
          num = 0;
        }
        rep = 0;
      } else
        compr_put_byte(lc);
    }
  }
  compr_put_byte(0x00);
  compr_put_byte(0xED);
  compr_put_byte(0xED);
  compr_put_byte(0x00);
}
```