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

```asm
<display_factored_time_delta>:
  endbr64
  push   %r12
  movapd %xmm0,%xmm1
  lea    D76(%rip),%rdx
  push   %rbp
  mov    %edi,%ebp
  sub    $0x98,%rsp
  andpd  D15(%rip),%xmm1
  movsd  D22(%rip),%xmm2
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r12
  comisd %xmm1,%xmm2
  ja     L53
  movsd  D74(%rip),%xmm3
  comisd %xmm1,%xmm3
  ja     L42
  movsd  D55(%rip),%xmm2
  comisd %xmm1,%xmm2
  jbe    L37
  divsd  %xmm3,%xmm0
  mov    %rsp,%r12
  lea    D26(%rip),%rdx
L53:
  mov    $0x80,%esi
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <snprintf@plt>
  xor    %eax,%eax
  mov    %r12,%rdx
  mov    %ebp,%esi
  lea    D27(%rip),%rdi
  call   <printf@plt>
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L24
  add    $0x98,%rsp
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L42:
  divsd  %xmm2,%xmm0
  mov    %rsp,%r12
  lea    D86(%rip),%rdx
  jmp    L53
  nopl   0x0(%rax,%rax,1)
L37:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L24
  add    $0x98,%rsp
  mov    %edi,%esi
  lea    D23(%rip),%rdx
  xor    %eax,%eax
  pop    %rbp
  lea    D91(%rip),%rdi
  pop    %r12
  jmp    1080 <printf@plt>
L24:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D76
type_infered: string
name: extract_symbolic_data
arguments: label: D15
type_infered: qword[2]
name: extract_symbolic_data
arguments: label: D22
type_infered: f64
name: extract_symbolic_data
arguments: label: D74
type_infered: f64
name: extract_symbolic_data
arguments: label: D55
type_infered: f64
name: extract_symbolic_data
arguments: label: D26
type_infered: string
name: extract_symbolic_data
arguments: label: D27
type_infered: string
name: extract_symbolic_data
arguments: label: D86
type_infered: string
name: extract_symbolic_data
arguments: label: D23
type_infered: string
name: extract_symbolic_data
arguments: label: D91
type_infered: string

tool: D76: %+.0lfus

tool: {"D15": [0x7fffffffffffffff,0x0000000000000000]}

tool: D22: 1000

tool: D74: 1000000

tool: D55: 100000000000

tool: D26: %+.1lfs

tool: D27: %*s

tool: D86: %+.1lfms

tool: D23:                             

tool: D91: %.*s

assistant: ```c
void display_factored_time_delta(double time, int align) {
  char buffer[128];
  if (fabs(time) < 1000.0) {
    snprintf(buffer, sizeof(buffer), "%+.0lfus", time);
    printf("%*s", align, buffer);
  } else if (fabs(time) < 1000000.0) {
    snprintf(buffer, sizeof(buffer), "%+.1lfms", time / 1000.0);
    printf("%*s", align, buffer);
  } else if (fabs(time) < 100000000000.0) {
    snprintf(buffer, sizeof(buffer), "%+.1lfs", time / 1000000.0);
    printf("%*s", align, buffer);
  } else
    printf("%.*s", align, "                            ");
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<display_factored_time_delta>:
  endbr64
  push   %r12
  movapd %xmm0,%xmm1
  lea    D53(%rip),%rdx
  push   %rbp
  mov    %edi,%ebp
  sub    $0x98,%rsp
  andpd  D12(%rip),%xmm1
  movsd  D56(%rip),%xmm2
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r12
  comisd %xmm1,%xmm2
  ja     L57
  movsd  D92(%rip),%xmm3
  comisd %xmm1,%xmm3
  ja     L58
  movsd  D17(%rip),%xmm2
  comisd %xmm1,%xmm2
  jbe    L7
  divsd  %xmm3,%xmm0
  mov    %rsp,%r12
  lea    D25(%rip),%rdx
L57:
  mov    $0x80,%esi
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <snprintf@plt>
  xor    %eax,%eax
  mov    %r12,%rdx
  mov    %ebp,%esi
  lea    D86(%rip),%rdi
  call   <printf@plt>
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L40
  add    $0x98,%rsp
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L58:
  divsd  %xmm2,%xmm0
  mov    %rsp,%r12
  lea    D67(%rip),%rdx
  jmp    L57
  nopl   0x0(%rax,%rax,1)
L7:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L40
  add    $0x98,%rsp
  mov    %edi,%esi
  lea    D13(%rip),%rdx
  xor    %eax,%eax
  pop    %rbp
  lea    D99(%rip),%rdi
  pop    %r12
  jmp    1080 <printf@plt>
L40:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D53
type: string
name: retrieve_data
arguments: data_label: D12
type: qword[2]
name: retrieve_data
arguments: data_label: D56
type: f64
name: retrieve_data
arguments: data_label: D92
type: f64
name: retrieve_data
arguments: data_label: D17
type: f64
name: retrieve_data
arguments: data_label: D25
type: string
name: retrieve_data
arguments: data_label: D86
type: string
name: retrieve_data
arguments: data_label: D67
type: string
name: retrieve_data
arguments: data_label: D13
type: string
name: retrieve_data
arguments: data_label: D99
type: string

tool: D53: %+.0lfus

tool: {"D12": [0x7fffffffffffffff,0x0000000000000000]}

tool: D56: 1000

tool: D92: 1000000

tool: D17: 100000000000

tool: D25: %+.1lfs

tool: D86: %*s

tool: D67: %+.1lfms

tool: D13:                             

tool: D99: %.*s

assistant: ```c
void display_factored_time_delta(double time, int align) {
  char buffer[128];
  if (fabs(time) < 1000.0) {
    snprintf(buffer, sizeof(buffer), "%+.0lfus", time);
    printf("%*s", align, buffer);
  } else if (fabs(time) < 1000000.0) {
    snprintf(buffer, sizeof(buffer), "%+.1lfms", time / 1000.0);
    printf("%*s", align, buffer);
  } else if (fabs(time) < 100000000000.0) {
    snprintf(buffer, sizeof(buffer), "%+.1lfs", time / 1000000.0);
    printf("%*s", align, buffer);
  } else
    printf("%.*s", align, "                            ");
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<outcode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movsd  %xmm0,-0x18(%rbp)
  movsd  %xmm1,-0x20(%rbp)
  mov    %rdi,-0x28(%rbp)
  movl   $0x0,-0x4(%rbp)
  mov    -0x28(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L53
  orl    $0x1,-0x4(%rbp)
  jmp    L23
L53:
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm1
  movsd  -0x18(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L23
  orl    $0x2,-0x4(%rbp)
L23:
  mov    -0x28(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L38
  orl    $0x4,-0x4(%rbp)
  jmp    L50
L38:
  mov    -0x28(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm1
  movsd  -0x20(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L50
  orl    $0x8,-0x4(%rbp)
L50:
  mov    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int outcode(double x, double y, double r[4]) {
  int code = 0;
  if (x < r[0]) {
    code |= 1;
  } else if (x > r[1]) {
    code |= 2;
  }
  if (y < r[2]) {
    code |= 4;
  } else if (y > r[3]) {
    code |= 8;
  }
  return code;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<outcode>:
  endbr64
  movsd  (%rdi),%xmm2
  mov    $0x1,%eax
  comisd %xmm0,%xmm2
  ja     L28
  comisd 0x8(%rdi),%xmm0
  seta   %al
  movzbl %al,%eax
  add    %eax,%eax
L28:
  movsd  0x10(%rdi),%xmm0
  comisd %xmm1,%xmm0
  jbe    L23
  or     $0x4,%eax
  ret
L23:
  comisd 0x18(%rdi),%xmm1
  jbe    L14
  or     $0x8,%eax
L14:
  ret
```

assistant: ```c
int outcode(double x, double y, double r[4]) {
  int code = 0;
  if (x < r[0]) {
    code |= 1;
  } else if (x > r[1]) {
    code |= 2;
  }
  if (y < r[2]) {
    code |= 4;
  } else if (y > r[3]) {
    code |= 8;
  }
  return code;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<outcode>:
  endbr64
  movsd  (%rdi),%xmm2
  mov    $0x1,%eax
  comisd %xmm0,%xmm2
  ja     L8
  xor    %eax,%eax
  comisd 0x8(%rdi),%xmm0
  seta   %al
  add    %eax,%eax
L8:
  movsd  0x10(%rdi),%xmm0
  comisd %xmm1,%xmm0
  jbe    L2
  or     $0x4,%eax
  ret
  xchg   %ax,%ax
L2:
  comisd 0x18(%rdi),%xmm1
  jbe    L14
  or     $0x8,%eax
L14:
  ret
```

assistant: ```c
int outcode(double x, double y, double r[4]) {
  int code = 0;
  if (x < r[0]) {
    code |= 1;
  } else if (x > r[1]) {
    code |= 2;
  }
  if (y < r[2]) {
    code |= 4;
  } else if (y > r[3]) {
    code |= 8;
  }
  return code;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<outcode>:
  endbr64
  movsd  (%rdi),%xmm2
  mov    $0x1,%eax
  comisd %xmm0,%xmm2
  ja     L17
  xor    %eax,%eax
  comisd 0x8(%rdi),%xmm0
  seta   %al
  add    %eax,%eax
L17:
  movsd  0x10(%rdi),%xmm0
  comisd %xmm1,%xmm0
  jbe    L1
  or     $0x4,%eax
  ret
  xchg   %ax,%ax
L1:
  comisd 0x18(%rdi),%xmm1
  jbe    L29
  or     $0x8,%eax
L29:
  ret
```

assistant: ```c
int outcode(double x, double y, double r[4]) {
  int code = 0;
  if (x < r[0]) {
    code |= 1;
  } else if (x > r[1]) {
    code |= 2;
  }
  if (y < r[2]) {
    code |= 4;
  } else if (y > r[3]) {
    code |= 8;
  }
  return code;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<readtoEOL>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0xc(%rbp)
  jmp    L48
L31:
  shll   -0x10(%rbp)
  mov    -0x10(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%eax
  sub    -0xc(%rbp),%eax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x8(%rbp),%rdx
  add    %rdx,%rcx
  mov    -0x28(%rbp),%rdx
  mov    %eax,%esi
  mov    %rcx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L0
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0xc(%rbp)
L48:
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xc(%rbp)
  jne    L33
  mov    -0xc(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L31
  jmp    L33
L0:
  nop
L33:
  mov    -0x18(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x20(%rbp),%rax
  mov    -0x10(%rbp),%edx
  mov    %edx,(%rax)
  nop
  leave
  ret
```

assistant: ```c
void readtoEOL(char **pbuf, int *pbufsize, FILE *fp) {
  char *buf = *pbuf;
  int bufsize = *pbufsize;
  int n = strlen(buf);
  while (n == bufsize - 1 && buf[n - 1] != '\n') {
    bufsize *= 2;
    buf = realloc(buf, bufsize);
    if (fgets(&buf[n], bufsize - n, fp) == NULL)
      break;
    n = strlen(buf);
  }
  *pbuf = buf;
  *pbufsize = bufsize;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<readtoEOL>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r15
  mov    %rsi,0x8(%rsp)
  mov    %rdx,%r14
  mov    (%rdi),%rbx
  mov    (%rsi),%r12d
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%ebp
  lea    -0x1(%r12),%eax
  cmp    %eax,%ebp
  jne    L17
L26:
  movslq %ebp,%r13
  cmpb   $0xa,-0x1(%rbx,%r13,1)
  je     L17
  add    %r12d,%r12d
  mov    %r12d,%esi
  mov    %rbx,%rdi
  call   <realloc@plt>
  mov    %rax,%rbx
  mov    %r12d,%esi
  sub    %ebp,%esi
  lea    (%rax,%r13,1),%rdi
  mov    %r14,%rdx
  call   <fgets@plt>
  test   %rax,%rax
  je     L17
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%ebp
  lea    -0x1(%r12),%eax
  cmp    %ebp,%eax
  je     L26
L17:
  mov    %rbx,(%r15)
  mov    0x8(%rsp),%rax
  mov    %r12d,(%rax)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void readtoEOL(char **pbuf, int *pbufsize, FILE *fp) {
  char *buf = *pbuf;
  int bufsize = *pbufsize;
  int n = strlen(buf);
  while (n == bufsize - 1 && buf[n - 1] != '\n') {
    bufsize *= 2;
    buf = realloc(buf, bufsize);
    if (fgets(&buf[n], bufsize - n, fp) == NULL)
      break;
    n = strlen(buf);
  }
  *pbuf = buf;
  *pbufsize = bufsize;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<readtoEOL>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    (%rdi),%rbp
  mov    (%rsi),%r12d
  mov    %rsi,0x8(%rsp)
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  lea    -0x1(%r12),%eax
  cmp    %eax,%ebx
  je     L33
  jmp    L48
  nopl   0x0(%rax,%rax,1)
L44:
  add    %r12d,%r12d
  mov    %rbp,%rdi
  mov    %r12d,%esi
  call   <realloc@plt>
  mov    %r12d,%esi
  mov    %r13,%rdx
  sub    %ebx,%esi
  lea    (%rax,%r14,1),%rdi
  mov    %rax,%rbp
  call   <fgets@plt>
  test   %rax,%rax
  je     L48
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  lea    -0x1(%r12),%eax
  cmp    %ebx,%eax
  jne    L48
L33:
  movslq %ebx,%r14
  cmpb   $0xa,-0x1(%rbp,%r14,1)
  jne    L44
L48:
  mov    0x8(%rsp),%rax
  mov    %rbp,(%r15)
  mov    %r12d,(%rax)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void readtoEOL(char **pbuf, int *pbufsize, FILE *fp) {
  char *buf = *pbuf;
  int bufsize = *pbufsize;
  int n = strlen(buf);
  while (n == bufsize - 1 && buf[n - 1] != '\n') {
    bufsize *= 2;
    buf = realloc(buf, bufsize);
    if (fgets(&buf[n], bufsize - n, fp) == NULL)
      break;
    n = strlen(buf);
  }
  *pbuf = buf;
  *pbufsize = bufsize;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<readtoEOL>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    (%rdi),%rbp
  mov    (%rsi),%r12d
  mov    %rsi,0x8(%rsp)
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  lea    -0x1(%r12),%eax
  cmp    %eax,%ebx
  je     L21
  jmp    L26
  nopl   0x0(%rax,%rax,1)
L1:
  add    %r12d,%r12d
  mov    %rbp,%rdi
  mov    %r12d,%esi
  call   <realloc@plt>
  mov    %r12d,%esi
  mov    %r13,%rdx
  sub    %ebx,%esi
  lea    (%rax,%r14,1),%rdi
  mov    %rax,%rbp
  call   <fgets@plt>
  test   %rax,%rax
  je     L26
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  lea    -0x1(%r12),%eax
  cmp    %ebx,%eax
  jne    L26
L21:
  movslq %ebx,%r14
  cmpb   $0xa,-0x1(%rbp,%r14,1)
  jne    L1
L26:
  mov    0x8(%rsp),%rax
  mov    %rbp,(%r15)
  mov    %r12d,(%rax)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void readtoEOL(char **pbuf, int *pbufsize, FILE *fp) {
  char *buf = *pbuf;
  int bufsize = *pbufsize;
  int n = strlen(buf);
  while (n == bufsize - 1 && buf[n - 1] != '\n') {
    bufsize *= 2;
    buf = realloc(buf, bufsize);
    if (fgets(&buf[n], bufsize - n, fp) == NULL)
      break;
    n = strlen(buf);
  }
  *pbuf = buf;
  *pbufsize = bufsize;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x68(%rbp)
  movl   $0xffffffff,-0x64(%rbp)
  jmp    L58
L90:
  mov    -0x68(%rbp),%eax
  cltq
  mov    -0x60(%rbp,%rax,4),%eax
  cmp    $0xa,%eax
  jne    L42
  mov    -0x68(%rbp),%eax
  lea    0x1(%rax),%ecx
  lea    -0x60(%rbp),%rax
  mov    %rax,%rdx
  mov    %ecx,%esi
  mov    $0x0,%edi
  call   <mprint@plt>
  movl   $0xffffffff,-0x64(%rbp)
  movl   $0x0,-0x68(%rbp)
  jmp    L58
L42:
  mov    -0x68(%rbp),%eax
  cltq
  mov    -0x60(%rbp,%rax,4),%eax
  cmp    $0x20,%eax
  je     L36
  mov    -0x68(%rbp),%eax
  cltq
  mov    -0x60(%rbp,%rax,4),%eax
  cmp    $0x9,%eax
  jne    L79
L36:
  mov    -0x68(%rbp),%eax
  mov    %eax,-0x64(%rbp)
L79:
  addl   $0x1,-0x68(%rbp)
  cmpl   $0x14,-0x68(%rbp)
  jne    L58
  cmpl   $0xffffffff,-0x64(%rbp)
  jne    L95
  lea    -0x60(%rbp),%rax
  mov    %rax,%rdx
  mov    $0x14,%esi
  mov    $0x0,%edi
  call   <mprint@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  movl   $0x0,-0x68(%rbp)
  movl   $0xffffffff,-0x64(%rbp)
  jmp    L58
L95:
  lea    -0x60(%rbp),%rdx
  mov    -0x64(%rbp),%eax
  mov    %eax,%esi
  mov    $0x0,%edi
  call   <mprint@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x64(%rbp),%eax
  lea    0x1(%rax),%ecx
  lea    -0x60(%rbp),%rax
  mov    %rax,%rdx
  mov    $0x14,%esi
  mov    %ecx,%edi
  call   <shift@plt>
  mov    $0x13,%eax
  sub    -0x64(%rbp),%eax
  mov    %eax,-0x68(%rbp)
  movl   $0xffffffff,-0x64(%rbp)
L58:
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    -0x68(%rbp),%edx
  movslq %edx,%rdx
  mov    %eax,-0x60(%rbp,%rdx,4)
  mov    -0x68(%rbp),%eax
  cltq
  mov    -0x60(%rbp,%rax,4),%edx
  mov    D7(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L90
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L5
  call   <__stack_chk_fail@plt>
L5:
  leave
  ret
```

assistant: ```c
int main(void) {
  int col = 0;
  int sp = -1;
  int buff[20];
  while ((buff[col] = getchar()) != EOF) {
    if (buff[col] == '\n') {
      mprint(0, col + 1, buff);
      sp = -1;
      col = 0;
      continue;
    }
    if (buff[col] == ' ' || buff[col] == '\t') {
      sp = col;
    }
    col++;
    if (col == 20) {
      if (sp == -1) {
        mprint(0, 20, buff);
        putchar('\n');
        col = 0;
        sp = -1;
      } else {
        mprint(0, sp, buff);
        putchar('\n');
        shift(sp + 1, 20, buff);
        col = 20 - sp - 1;
        sp = -1;
      }
    }
  }
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x60,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  mov    $0xffffffff,%ebp
  mov    $0x0,%ebx
  mov    $0x13,%r12d
  jmp    L77
L85:
  mov    %rsp,%rdx
  lea    0x1(%rbx),%esi
  mov    $0x0,%edi
  call   <mprint@plt>
  mov    $0xffffffff,%ebp
  mov    $0x0,%ebx
  jmp    L77
L36:
  mov    %r12d,%ebp
L41:
  mov    %rsp,%rbx
  mov    %rbx,%rdx
  mov    %ebp,%esi
  mov    $0x0,%edi
  call   <mprint@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    0x1(%rbp),%edi
  mov    %rbx,%rdx
  mov    $0x14,%esi
  call   <shift@plt>
  mov    %r12d,%ebx
  sub    %ebp,%ebx
  mov    $0xffffffff,%ebp
  jmp    L77
L86:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L50
  mov    $0x0,%eax
  add    $0x60,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L66:
  lea    0x1(%rbx),%eax
  cmp    $0x13,%ebx
  je     L36
  mov    %ebx,%ebp
  mov    %eax,%ebx
L77:
  mov    $0x0,%eax
  call   <getchar@plt>
  movslq %ebx,%rdx
  mov    %eax,(%rsp,%rdx,4)
  mov    D3(%rip),%rdx
  cmp    (%rdx),%eax
  je     L86
  cmp    $0xa,%eax
  je     L85
  cmp    $0x20,%eax
  je     L66
  cmp    $0x9,%eax
  je     L66
  add    $0x1,%ebx
  cmp    $0x14,%ebx
  jne    L77
  cmp    $0xffffffff,%ebp
  jne    L41
  mov    %rsp,%rdx
  mov    $0x14,%esi
  mov    $0x0,%edi
  call   <mprint@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0x0,%ebx
  jmp    L77
L50:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int main(void) {
  int col = 0;
  int sp = -1;
  int buff[20];
  while ((buff[col] = getchar()) != EOF) {
    if (buff[col] == '\n') {
      mprint(0, col + 1, buff);
      sp = -1;
      col = 0;
      continue;
    }
    if (buff[col] == ' ' || buff[col] == '\t') {
      sp = col;
    }
    col++;
    if (col == 20) {
      if (sp == -1) {
        mprint(0, 20, buff);
        putchar('\n');
        col = 0;
        sp = -1;
      } else {
        mprint(0, sp, buff);
        putchar('\n');
        shift(sp + 1, 20, buff);
        col = 20 - sp - 1;
        sp = -1;
      }
    }
  }
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  mov    $0x13,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  mov    $0xffffffff,%ebx
  sub    $0x60,%rsp
  mov    D4(%rip),%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  jmp    L128
  nopw   0x0(%rax,%rax,1)
L3:
  cmp    $0x14,%ebp
  je     L88
L25:
  mov    %ebp,%r14d
L128:
  xor    %eax,%eax
  call   <getchar@plt>
  movslq %r14d,%rdx
  mov    %eax,(%rsp,%rdx,4)
  cmp    (%r12),%eax
  je     L59
  lea    0x1(%r14),%ebp
  cmp    $0xa,%eax
  je     L122
  cmp    $0x20,%eax
  je     L54
  cmp    $0x9,%eax
  jne    L3
L54:
  mov    %r14d,%ebx
  cmp    $0x14,%ebp
  jne    L25
  mov    $0x13,%ebx
L89:
  mov    %rsp,%r14
  mov    %ebx,%esi
  xor    %edi,%edi
  mov    %r14,%rdx
  call   <mprint@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %ebp,%edi
  mov    %r14,%rdx
  mov    $0x14,%esi
  call   <shift@plt>
  mov    %r13d,%ebp
  sub    %ebx,%ebp
  mov    $0xffffffff,%ebx
  jmp    L25
  nopw   0x0(%rax,%rax,1)
L88:
  cmp    $0xffffffff,%ebx
  jne    L116
  mov    %rsp,%rdx
  mov    $0x14,%esi
  xor    %edi,%edi
  xor    %ebp,%ebp
  call   <mprint@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L25
  nopl   (%rax)
L59:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L47
  add    $0x60,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L122:
  mov    %ebp,%esi
  mov    %rsp,%rdx
  xor    %edi,%edi
  mov    $0xffffffff,%ebx
  call   <mprint@plt>
  xor    %ebp,%ebp
  jmp    L25
L116:
  lea    0x1(%rbx),%ebp
  jmp    L89
L47:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int main(void) {
  int col = 0;
  int sp = -1;
  int buff[20];
  while ((buff[col] = getchar()) != EOF) {
    if (buff[col] == '\n') {
      mprint(0, col + 1, buff);
      sp = -1;
      col = 0;
      continue;
    }
    if (buff[col] == ' ' || buff[col] == '\t') {
      sp = col;
    }
    col++;
    if (col == 20) {
      if (sp == -1) {
        mprint(0, 20, buff);
        putchar('\n');
        col = 0;
        sp = -1;
      } else {
        mprint(0, sp, buff);
        putchar('\n');
        shift(sp + 1, 20, buff);
        col = 20 - sp - 1;
        sp = -1;
      }
    }
  }
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<main>:
  endbr64
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  mov    $0x13,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  mov    $0xffffffff,%ebx
  sub    $0x60,%rsp
  mov    D1(%rip),%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  jmp    L84
  nopw   0x0(%rax,%rax,1)
L68:
  cmp    $0x14,%ebp
  je     L54
L82:
  mov    %ebp,%r14d
L84:
  xor    %eax,%eax
  call   <getchar@plt>
  movslq %r14d,%rdx
  mov    %eax,(%rsp,%rdx,4)
  cmp    (%r12),%eax
  je     L10
  lea    0x1(%r14),%ebp
  cmp    $0xa,%eax
  je     L55
  cmp    $0x20,%eax
  je     L85
  cmp    $0x9,%eax
  jne    L68
L85:
  mov    %r14d,%ebx
  cmp    $0x14,%ebp
  jne    L82
  mov    $0x13,%ebx
L103:
  mov    %rsp,%r14
  mov    %ebx,%esi
  xor    %edi,%edi
  mov    %r14,%rdx
  call   <mprint@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %ebp,%edi
  mov    %r14,%rdx
  mov    $0x14,%esi
  call   <shift@plt>
  mov    %r13d,%ebp
  sub    %ebx,%ebp
  mov    $0xffffffff,%ebx
  jmp    L82
  nopw   0x0(%rax,%rax,1)
L54:
  cmp    $0xffffffff,%ebx
  jne    L77
  mov    %rsp,%rdx
  mov    $0x14,%esi
  xor    %edi,%edi
  xor    %ebp,%ebp
  call   <mprint@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L82
  nopl   (%rax)
L10:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L81
  add    $0x60,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L55:
  mov    %ebp,%esi
  mov    %rsp,%rdx
  xor    %edi,%edi
  mov    $0xffffffff,%ebx
  call   <mprint@plt>
  xor    %ebp,%ebp
  jmp    L82
L77:
  lea    0x1(%rbx),%ebp
  jmp    L103
L81:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int main(void) {
  int col = 0;
  int sp = -1;
  int buff[20];
  while ((buff[col] = getchar()) != EOF) {
    if (buff[col] == '\n') {
      mprint(0, col + 1, buff);
      sp = -1;
      col = 0;
      continue;
    }
    if (buff[col] == ' ' || buff[col] == '\t') {
      sp = col;
    }
    col++;
    if (col == 20) {
      if (sp == -1) {
        mprint(0, 20, buff);
        putchar('\n');
        col = 0;
        sp = -1;
      } else {
        mprint(0, sp, buff);
        putchar('\n');
        shift(sp + 1, 20, buff);
        col = 20 - sp - 1;
        sp = -1;
      }
    }
  }
  return 0;
}
```