ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What would the C source look like for the assembly code provided here:

```asm
<get_line>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    -0x28(%rbp),%rdx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L17
  lea    D10(%rip),%rax
  mov    %rax,%rsi
  mov    $0x1,%edi
  call   <die@plt>
L17:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L2
  lea    D6(%rip),%rax
  mov    %rax,%rsi
  mov    $0x1,%edi
  call   <die@plt>
L2:
  mov    -0x8(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D10
data_type: string
name: unpack_data
arguments: data_tag: D6
data_type: string

tool: D10: unexpected end of file

tool: D6: buffer overflow

assistant: ```c
void get_line(char *s, int size, FILE *stream) {
  char *p = fgets(s, size, stream);
  size_t len;
  if (!p)
    die(1, "unexpected end of file");
  len = strlen(p);
  if (s[len - 1] != '\n')
    die(1, "buffer overflow");
  s[len - 1] = 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<get_line>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  call   <fgets@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L22
L30:
  mov    %rbp,%rdi
  call   <strlen@plt>
  lea    -0x1(%rbx,%rax,1),%rbx
  cmpb   $0xa,(%rbx)
  jne    L39
L23:
  movb   $0x0,(%rbx)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L22:
  lea    D3(%rip),%rsi
  mov    $0x1,%edi
  call   <die@plt>
  jmp    L30
L39:
  lea    D6(%rip),%rsi
  mov    $0x1,%edi
  call   <die@plt>
  jmp    L23
```

tool_calls: name: read_data
arguments: label: D3
type_infered: string
name: read_data
arguments: label: D6
type_infered: string

tool: D3: unexpected end of file

tool: D6: buffer overflow

assistant: ```c
void get_line(char *s, int size, FILE *stream) {
  char *p = fgets(s, size, stream);
  size_t len;
  if (!p)
    die(1, "unexpected end of file");
  len = strlen(p);
  if (s[len - 1] != '\n')
    die(1, "buffer overflow");
  s[len - 1] = 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<get_line>:
  endbr64
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  call   <fgets@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L27
L13:
  mov    %rbp,%rdi
  call   <strlen@plt>
  lea    -0x1(%rbx,%rax,1),%rbx
  cmpb   $0xa,(%rbx)
  je     L11
  lea    D2(%rip),%rsi
  mov    $0x1,%edi
  call   <die@plt>
L11:
  movb   $0x0,(%rbx)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L27:
  lea    D3(%rip),%rsi
  mov    $0x1,%edi
  call   <die@plt>
  jmp    L13
```

tool_calls: name: disassemble_data
arguments: data_label: D2
datatype: string
name: disassemble_data
arguments: data_label: D3
datatype: string

tool: D2: buffer overflow

tool: D3: unexpected end of file

assistant: ```c
void get_line(char *s, int size, FILE *stream) {
  char *p = fgets(s, size, stream);
  size_t len;
  if (!p)
    die(1, "unexpected end of file");
  len = strlen(p);
  if (s[len - 1] != '\n')
    die(1, "buffer overflow");
  s[len - 1] = 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<get_line>:
  endbr64
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  call   <fgets@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L20
L22:
  mov    %rbp,%rdi
  call   <strlen@plt>
  lea    -0x1(%rbx,%rax,1),%rbx
  cmpb   $0xa,(%rbx)
  je     L29
  lea    D16(%rip),%rsi
  mov    $0x1,%edi
  call   <die@plt>
L29:
  movb   $0x0,(%rbx)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L20:
  lea    D19(%rip),%rsi
  mov    $0x1,%edi
  call   <die@plt>
  jmp    L22
```

tool_calls: name: unpack_data
arguments: label: D16
type_guessed: string
name: unpack_data
arguments: label: D19
type_guessed: string

tool: D16: buffer overflow

tool: D19: unexpected end of file

assistant: ```c
void get_line(char *s, int size, FILE *stream) {
  char *p = fgets(s, size, stream);
  size_t len;
  if (!p)
    die(1, "unexpected end of file");
  len = strlen(p);
  if (s[len - 1] != '\n')
    die(1, "buffer overflow");
  s[len - 1] = 0;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<output_gpx_trk_point>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  movsd  %xmm0,-0x30(%rbp)
  movsd  %xmm1,-0x38(%rbp)
  movsd  %xmm2,-0x40(%rbp)
  mov    %esi,-0x44(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movabs $0x2d30312d38303032,%rax
  movabs $0x35353a3431543631,%rdx
  mov    %rax,-0x20(%rbp)
  mov    %rdx,-0x18(%rbp)
  movl   $0x5a39323a,-0x10(%rbp)
  movb   $0x0,-0xc(%rbp)
  mov    -0x28(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <timestamp_to_iso8601str@plt>
  mov    -0x44(%rbp),%edx
  lea    -0x20(%rbp),%rcx
  movsd  -0x40(%rbp),%xmm1
  movsd  -0x38(%rbp),%xmm0
  mov    -0x30(%rbp),%rax
  mov    %rcx,%rsi
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L1
  call   <__stack_chk_fail@plt>
L1:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D5
type_guessed: string

tool: D5:  <trkpt lat="%f" lon="%f"><ele>%f</ele><time>%s</time><speed>%d</speed></trkpt>


assistant: ```c
void output_gpx_trk_point(const long timestamp, const double latitude, const double longitude, const double height, const int speed) {
  char iso8601str[] = "2008-10-16T14:55:29Z";
  timestamp_to_iso8601str(iso8601str, timestamp);
  printf(" <trkpt lat=\"%f\" lon=\"%f\"><ele>%f</ele><time>%s</time><speed>%d</speed></trkpt>\n", latitude, longitude, height, iso8601str, speed);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<output_gpx_trk_point>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  movq   %xmm0,%rbx
  movq   %xmm1,%rbp
  movq   %xmm2,%r12
  mov    %esi,%r13d
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movabs $0x2d30312d38303032,%rax
  movabs $0x35353a3431543631,%rdx
  mov    %rax,(%rsp)
  mov    %rdx,0x8(%rsp)
  movl   $0x5a39323a,0x10(%rsp)
  movb   $0x0,0x14(%rsp)
  mov    %rsp,%r14
  mov    %rdi,%rsi
  mov    %r14,%rdi
  call   <timestamp_to_iso8601str@plt>
  mov    %r13d,%edx
  mov    %r14,%rsi
  movq   %r12,%xmm2
  movq   %rbp,%xmm1
  movq   %rbx,%xmm0
  lea    D2(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D2
type_guessed: string

tool: D2:  <trkpt lat="%f" lon="%f"><ele>%f</ele><time>%s</time><speed>%d</speed></trkpt>


assistant: ```c
void output_gpx_trk_point(const long timestamp, const double latitude, const double longitude, const double height, const int speed) {
  char iso8601str[] = "2008-10-16T14:55:29Z";
  timestamp_to_iso8601str(iso8601str, timestamp);
  printf(" <trkpt lat=\"%f\" lon=\"%f\"><ele>%f</ele><time>%s</time><speed>%d</speed></trkpt>\n", latitude, longitude, height, iso8601str, speed);
}
```
user: What is the c source code of the assembly code below:

```asm
<output_gpx_trk_point>:
  endbr64
  push   %r12
  mov    %esi,%r12d
  mov    %rdi,%rsi
  push   %rbp
  sub    $0x48,%rsp
  movdqa D3(%rip),%xmm3
  lea    0x20(%rsp),%rbp
  movsd  %xmm0,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  mov    %rbp,%rdi
  movsd  %xmm2,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movl   $0x5a39323a,0x30(%rsp)
  movb   $0x0,0x34(%rsp)
  movaps %xmm3,0x20(%rsp)
  call   <timestamp_to_iso8601str@plt>
  movsd  0x8(%rsp),%xmm2
  mov    %r12d,%edx
  mov    %rbp,%rsi
  movsd  0x10(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm0
  lea    D7(%rip),%rdi
  call   <printf@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0x48,%rsp
  pop    %rbp
  pop    %r12
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D3
data_type: byte[16]
name: retrieve_data
arguments: tag: D7
data_type: string

tool: {"D3": [0x32,0x30,0x30,0x38,0x2d,0x31,0x30,0x2d,0x31,0x36,0x54,0x31,0x34,0x3a,0x35,0x35]}

tool: D7:  <trkpt lat="%f" lon="%f"><ele>%f</ele><time>%s</time><speed>%d</speed></trkpt>


assistant: ```c
void output_gpx_trk_point(const long timestamp, const double latitude, const double longitude, const double height, const int speed) {
  char iso8601str[] = "2008-10-16T14:55:29Z";
  timestamp_to_iso8601str(iso8601str, timestamp);
  printf(" <trkpt lat=\"%f\" lon=\"%f\"><ele>%f</ele><time>%s</time><speed>%d</speed></trkpt>\n", latitude, longitude, height, iso8601str, speed);
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<output_gpx_trk_point>:
  endbr64
  push   %r12
  mov    %esi,%r12d
  mov    %rdi,%rsi
  push   %rbp
  sub    $0x48,%rsp
  movdqa D0(%rip),%xmm3
  lea    0x20(%rsp),%rbp
  movsd  %xmm0,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  mov    %rbp,%rdi
  movsd  %xmm2,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movl   $0x5a39323a,0x30(%rsp)
  movb   $0x0,0x34(%rsp)
  movaps %xmm3,0x20(%rsp)
  call   <timestamp_to_iso8601str@plt>
  movsd  0x8(%rsp),%xmm2
  mov    %r12d,%edx
  mov    %rbp,%rsi
  movsd  0x10(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm0
  lea    D11(%rip),%rdi
  call   <printf@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  add    $0x48,%rsp
  pop    %rbp
  pop    %r12
  ret
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D0
type: byte[16]
name: retrieve_data
arguments: label: D11
type: string

tool: {"D0": [0x32,0x30,0x30,0x38,0x2d,0x31,0x30,0x2d,0x31,0x36,0x54,0x31,0x34,0x3a,0x35,0x35]}

tool: D11:  <trkpt lat="%f" lon="%f"><ele>%f</ele><time>%s</time><speed>%d</speed></trkpt>


assistant: ```c
void output_gpx_trk_point(const long timestamp, const double latitude, const double longitude, const double height, const int speed) {
  char iso8601str[] = "2008-10-16T14:55:29Z";
  timestamp_to_iso8601str(iso8601str, timestamp);
  printf(" <trkpt lat=\"%f\" lon=\"%f\"><ele>%f</ele><time>%s</time><speed>%d</speed></trkpt>\n", latitude, longitude, height, iso8601str, speed);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<fill_buf>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,%eax
  mov    %edx,-0x20(%rbp)
  mov    %al,-0x1c(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  jne    L36
  mov    D10(%rip),%eax
  lea    0x1(%rax),%edx
  mov    %edx,D109(%rip)
  mov    %eax,%ecx
  lea    D109(%rip),%rdx
  movzbl -0x1c(%rbp),%eax
  mov    %al,(%rcx,%rdx,1)
L36:
  mov    D109(%rip),%eax
  cmp    $0xb,%eax
  ja     L93
  cmpl   $0x0,-0x20(%rbp)
  je     L50
L93:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  movl   $0x0,-0x8(%rbp)
  jmp    L111
L64:
  mov    -0x8(%rbp),%eax
  lea    D109(%rip),%rdx
  movzbl (%rax,%rdx,1),%eax
  movsbl %al,%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  lea    D58(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  addl   $0x1,-0x8(%rbp)
L111:
  mov    D109(%rip),%eax
  cmp    %eax,-0x8(%rbp)
  jb     L64
  cmpl   $0x0,-0x20(%rbp)
  je     L104
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  jmp    L76
L44:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D78(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  addl   $0x1,-0x4(%rbp)
L76:
  cmpl   $0xb,-0x4(%rbp)
  jbe    L44
L104:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  movl   $0x0,-0x8(%rbp)
  jmp    L6
L57:
  mov    -0x8(%rbp),%eax
  lea    D109(%rip),%rdx
  movzbl (%rax,%rdx,1),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isalnum@plt>
  test   %rax,%rax
  je     L32
  mov    -0x8(%rbp),%eax
  lea    D109(%rip),%rdx
  movzbl (%rax,%rdx,1),%eax
  movsbl %al,%eax
  jmp    L94
L32:
  mov    $0x2e,%eax
L94:
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <fputc@plt>
  addl   $0x1,-0x8(%rbp)
L6:
  mov    D109(%rip),%eax
  cmp    %eax,-0x8(%rbp)
  jb     L57
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  movl   $0x0,D109(%rip)
L50:
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D56
type_infered: string
name: disassemble_data
arguments: tag: D58
type_infered: string
name: disassemble_data
arguments: tag: D78
type_infered: string
name: disassemble_data
arguments: tag: D34
type_infered: string

tool: D56:     

tool: D58: %02X 

tool: D78:    

tool: D34: | 

assistant: ```c
int fill_buf(FILE *f, char data, int flush) {
  static char buf[12];
  static unsigned int cnt = 0;
  unsigned int i, j;
  if (!flush)
    buf[cnt++] = data;
  if ((cnt >= 12) || flush) {
    fprintf(f, "    ");
    for (i = 0; i < cnt; i++)
      fprintf(f, "%02X ", 0xff & buf[i]);
    if (flush)
      for (j = i; j < 12; j++)
        fprintf(f, "   ");
    fprintf(f, "| ");
    for (i = 0; i < cnt; i++)
      fprintf(f, "%c", isalnum(buf[i]) ? buf[i] : '.');
    fprintf(f, "\n");
    cnt = 0;
  }
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<fill_buf>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  test   %edx,%edx
  jne    L118
  mov    D101(%rip),%eax
  lea    0x1(%rax),%edx
  mov    %edx,D46(%rip)
  mov    %eax,%eax
  lea    D46(%rip),%rcx
  mov    %sil,(%rcx,%rax,1)
  cmp    $0xb,%edx
  jbe    L43
  mov    %rdi,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D3(%rip),%rdi
  call   <fwrite@plt>
  mov    $0x0,%r14d
  cmpl   $0x0,D46(%rip)
  jne    L67
  jmp    L1
L66:
  mov    %rbp,%rsi
  call   <fputc@plt>
  add    $0x1,%rbx
  mov    %ebx,%eax
  sub    %r12d,%eax
  cmp    %eax,D134(%rip)
  jbe    L91
L22:
  movsbl (%rbx),%edi
  call   <isalnum@plt>
  mov    %r13d,%edi
  test   %rax,%rax
  je     L66
  movsbl (%rbx),%edi
  jmp    L66
L91:
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  movl   $0x0,D134(%rip)
L43:
  mov    $0x0,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L118:
  mov    %rdi,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D3(%rip),%rdi
  call   <fwrite@plt>
  mov    D134(%rip),%ebx
  mov    $0x1,%r14d
  test   %ebx,%ebx
  je     L21
L67:
  lea    D46(%rip),%r12
  mov    $0x0,%ebx
  lea    D134(%rip),%r13
L102:
  movzbl (%r12),%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  add    $0x1,%ebx
  add    $0x1,%r12
  cmp    %ebx,D15(%rip)
  ja     L102
  test   %r14b,%r14b
  je     L1
  cmp    $0xb,%ebx
  ja     L1
L21:
  lea    D15(%rip),%r12
L115:
  mov    %rbp,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <fwrite@plt>
  add    $0x1,%ebx
  cmp    $0xb,%ebx
  jbe    L115
L1:
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D92(%rip),%rdi
  call   <fwrite@plt>
  cmpl   $0x0,D15(%rip)
  je     L91
  lea    D46(%rip),%r12
  mov    %r12,%rbx
  mov    $0x2e,%r13d
  jmp    L22
```

tool_calls: name: read_data
arguments: data_label: D3
data_type: string
name: read_data
arguments: data_label: D134
data_type: string
name: read_data
arguments: data_label: D15
data_type: string
name: read_data
arguments: data_label: D92
data_type: string

tool: D3:     

tool: D134: %02X 

tool: D15:    

tool: D92: | 

assistant: ```c
int fill_buf(FILE *f, char data, int flush) {
  static char buf[12];
  static unsigned int cnt = 0;
  unsigned int i, j;
  if (!flush)
    buf[cnt++] = data;
  if ((cnt >= 12) || flush) {
    fprintf(f, "    ");
    for (i = 0; i < cnt; i++)
      fprintf(f, "%02X ", 0xff & buf[i]);
    if (flush)
      for (j = i; j < 12; j++)
        fprintf(f, "   ");
    fprintf(f, "| ");
    for (i = 0; i < cnt; i++)
      fprintf(f, "%c", isalnum(buf[i]) ? buf[i] : '.');
    fprintf(f, "\n");
    cnt = 0;
  }
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<fill_buf>:
  endbr64
  push   %r14
  mov    %edx,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  test   %edx,%edx
  jne    L91
  mov    D105(%rip),%eax
  lea    D29(%rip),%rcx
  lea    0x1(%rax),%edx
  mov    %sil,(%rcx,%rax,1)
  mov    %edx,D10(%rip)
  cmp    $0xb,%edx
  ja     L120
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L91:
  mov    %rdi,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D10(%rip),%rdi
  call   <fwrite@plt>
  mov    D10(%rip),%ebx
  test   %ebx,%ebx
  je     L58
L86:
  lea    D29(%rip),%r12
  xor    %ebx,%ebx
  lea    D138(%rip),%r13
  nop
L31:
  movzbl (%r12),%edx
  xor    %eax,%eax
  mov    %r13,%rsi
  mov    %rbp,%rdi
  add    $0x1,%ebx
  add    $0x1,%r12
  call   <fprintf@plt>
  cmp    %ebx,D109(%rip)
  ja     L31
  test   %r14d,%r14d
  jne    L84
L24:
  mov    $0x2,%edx
  mov    %rbp,%rcx
  mov    $0x1,%esi
  lea    D109(%rip),%rdi
  call   <fwrite@plt>
  mov    D109(%rip),%edx
  test   %edx,%edx
  je     L82
  lea    D29(%rip),%r12
  mov    %r12,%rbx
  nopw   0x0(%rax,%rax,1)
L79:
  movsbl (%rbx),%edi
  call   <isalnum@plt>
  mov    $0x2e,%edi
  test   %rax,%rax
  je     L25
  movsbl (%rbx),%edi
L25:
  add    $0x1,%rbx
  mov    %rbp,%rsi
  call   <fputc@plt>
  mov    %ebx,%eax
  sub    %r12d,%eax
  cmp    %eax,D51(%rip)
  ja     L79
L82:
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  movl   $0x0,D51(%rip)
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L84:
  cmp    $0xc,%ebx
  je     L24
L58:
  lea    D51(%rip),%r12
L54:
  mov    %rbp,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <fwrite@plt>
  add    $0x1,%ebx
  cmp    $0xc,%ebx
  jne    L54
  jmp    L24
  nopw   0x0(%rax,%rax,1)
L120:
  mov    %rdi,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D10(%rip),%rdi
  call   <fwrite@plt>
  mov    D51(%rip),%eax
  test   %eax,%eax
  jne    L86
  jmp    L24
```

tool_calls: name: parse_data
arguments: label: D10
type_infered: string
name: parse_data
arguments: label: D138
type_infered: string
name: parse_data
arguments: label: D109
type_infered: string
name: parse_data
arguments: label: D51
type_infered: string

tool: D10:     

tool: D138: %02X 

tool: D109: | 

tool: D51:    

assistant: ```c
int fill_buf(FILE *f, char data, int flush) {
  static char buf[12];
  static unsigned int cnt = 0;
  unsigned int i, j;
  if (!flush)
    buf[cnt++] = data;
  if ((cnt >= 12) || flush) {
    fprintf(f, "    ");
    for (i = 0; i < cnt; i++)
      fprintf(f, "%02X ", 0xff & buf[i]);
    if (flush)
      for (j = i; j < 12; j++)
        fprintf(f, "   ");
    fprintf(f, "| ");
    for (i = 0; i < cnt; i++)
      fprintf(f, "%c", isalnum(buf[i]) ? buf[i] : '.');
    fprintf(f, "\n");
    cnt = 0;
  }
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<fill_buf>:
  endbr64
  push   %r14
  mov    %edx,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  test   %edx,%edx
  jne    L82
  mov    D115(%rip),%eax
  lea    D130(%rip),%rcx
  lea    0x1(%rax),%edx
  mov    %sil,(%rcx,%rax,1)
  mov    %edx,D70(%rip)
  cmp    $0xb,%edx
  ja     L69
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L82:
  mov    %rdi,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D70(%rip),%rdi
  call   <fwrite@plt>
  mov    D70(%rip),%ebx
  test   %ebx,%ebx
  je     L83
L112:
  lea    D130(%rip),%r12
  xor    %ebx,%ebx
  lea    D82(%rip),%r13
  nop
L94:
  movzbl (%r12),%edx
  xor    %eax,%eax
  mov    %r13,%rsi
  mov    %rbp,%rdi
  add    $0x1,%ebx
  add    $0x1,%r12
  call   <fprintf@plt>
  cmp    %ebx,D69(%rip)
  ja     L94
  test   %r14d,%r14d
  jne    L62
L133:
  mov    $0x2,%edx
  mov    %rbp,%rcx
  mov    $0x1,%esi
  lea    D69(%rip),%rdi
  call   <fwrite@plt>
  mov    D69(%rip),%edx
  test   %edx,%edx
  je     L136
  lea    D130(%rip),%r12
  mov    %r12,%rbx
  jmp    L100
  nopl   0x0(%rax)
L80:
  movsbl (%rbx),%edi
  mov    %rbp,%rsi
L50:
  call   <fputc@plt>
  add    $0x1,%rbx
  mov    %ebx,%eax
  sub    %r12d,%eax
  cmp    %eax,D68(%rip)
  jbe    L136
L100:
  movsbl (%rbx),%edi
  call   <isalnum@plt>
  test   %rax,%rax
  jne    L80
  mov    %rbp,%rsi
  mov    $0x2e,%edi
  jmp    L50
  nopl   0x0(%rax,%rax,1)
L136:
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  movl   $0x0,D68(%rip)
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L62:
  cmp    $0xc,%ebx
  je     L133
L83:
  lea    D68(%rip),%r12
L40:
  mov    %rbp,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <fwrite@plt>
  add    $0x1,%ebx
  cmp    $0xc,%ebx
  jne    L40
  jmp    L133
  nopw   0x0(%rax,%rax,1)
L69:
  mov    %rdi,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D70(%rip),%rdi
  call   <fwrite@plt>
  mov    D68(%rip),%eax
  test   %eax,%eax
  jne    L112
  jmp    L133
```

tool_calls: name: parse_data
arguments: label: D70
type_infered: string
name: parse_data
arguments: label: D82
type_infered: string
name: parse_data
arguments: label: D69
type_infered: string
name: parse_data
arguments: label: D68
type_infered: string

tool: D70:     

tool: D82: %02X 

tool: D69: | 

tool: D68:    

assistant: ```c
int fill_buf(FILE *f, char data, int flush) {
  static char buf[12];
  static unsigned int cnt = 0;
  unsigned int i, j;
  if (!flush)
    buf[cnt++] = data;
  if ((cnt >= 12) || flush) {
    fprintf(f, "    ");
    for (i = 0; i < cnt; i++)
      fprintf(f, "%02X ", 0xff & buf[i]);
    if (flush)
      for (j = i; j < 12; j++)
        fprintf(f, "   ");
    fprintf(f, "| ");
    for (i = 0; i < cnt; i++)
      fprintf(f, "%c", isalnum(buf[i]) ? buf[i] : '.');
    fprintf(f, "\n");
    cnt = 0;
  }
  return 0;
}
```