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
  push   %rbx
  sub    $0x118,%rsp
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  jle    L14
L39:
  mov    0x8(%rbx),%rsi
  mov    %rsp,%rdi
  mov    $0xff,%edx
  call   <SU_memcpy@plt>
  test   %rax,%rax
  je     L59
  mov    %rsp,%rsi
  lea    D6(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movzbl (%rsp),%edx
  test   %dl,%dl
  je     L59
  mov    $0x0,%ebx
  lea    D8(%rip),%rbp
L4:
  movsbl %dl,%edx
  mov    %ebx,%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  movzbl (%rsp,%rbx,1),%edx
  test   %dl,%dl
  jne    L4
L59:
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L46
  mov    $0x0,%eax
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  ret
L14:
  call   <abort@plt>
  jmp    L39
L46:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D6
type_infered: string
name: extract_symbolic_data
arguments: label: D8
type_infered: string

tool: D6: dest is: %s


tool: D8: dest[%d]: %c


assistant: ```c
int main(int argc, char **argv) {
  char dest[255];
  int i;
  if (argc < 2)
    abort();
  if (SU_memcpy(dest, argv[1], 255) != NULL) {
    printf("dest is: %s\n", dest);
    for (i = 0; dest[i] != '\0'; i++)
      printf("dest[%d]: %c\n", i, dest[i]);
  }
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x110,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  jle    L16
L57:
  mov    %rsp,%rbp
  mov    0x8(%rbx),%rsi
  mov    $0xff,%edx
  mov    %rbp,%rdi
  call   <SU_memcpy@plt>
  test   %rax,%rax
  je     L52
  mov    %rbp,%rsi
  lea    D2(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movsbl (%rsp),%edx
  test   %dl,%dl
  je     L52
  xor    %ebx,%ebx
  lea    D17(%rip),%r12
  nopl   (%rax)
L28:
  mov    %ebx,%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  movsbl 0x0(%rbp,%rbx,1),%edx
  test   %dl,%dl
  jne    L28
L52:
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L25
  add    $0x110,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L16:
  call   <abort@plt>
  jmp    L57
L25:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D2
data_type: string
name: parse_data
arguments: data_tag: D17
data_type: string

tool: D2: dest is: %s


tool: D17: dest[%d]: %c


assistant: ```c
int main(int argc, char **argv) {
  char dest[255];
  int i;
  if (argc < 2)
    abort();
  if (SU_memcpy(dest, argv[1], 255) != NULL) {
    printf("dest is: %s\n", dest);
    for (i = 0; dest[i] != '\0'; i++)
      printf("dest[%d]: %c\n", i, dest[i]);
  }
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x110,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  jle    L13
L7:
  mov    %rsp,%rbp
  mov    0x8(%rbx),%rsi
  mov    $0xff,%edx
  mov    %rbp,%rdi
  call   <SU_memcpy@plt>
  test   %rax,%rax
  je     L34
  mov    %rbp,%rsi
  lea    D8(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movsbl (%rsp),%edx
  test   %dl,%dl
  je     L34
  xor    %ebx,%ebx
  lea    D11(%rip),%r12
  nopl   (%rax)
L46:
  mov    %ebx,%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  movsbl 0x0(%rbp,%rbx,1),%edx
  test   %dl,%dl
  jne    L46
L34:
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L10
  add    $0x110,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L13:
  call   <abort@plt>
  jmp    L7
L10:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D8
type_guessed: string
name: parse_data
arguments: tag: D11
type_guessed: string

tool: D8: dest is: %s


tool: D11: dest[%d]: %c


assistant: ```c
int main(int argc, char **argv) {
  char dest[255];
  int i;
  if (argc < 2)
    abort();
  if (SU_memcpy(dest, argv[1], 255) != NULL) {
    printf("dest is: %s\n", dest);
    for (i = 0; dest[i] != '\0'; i++)
      printf("dest[%d]: %c\n", i, dest[i]);
  }
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<restart>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x0,%eax
  call   <displaystatus@plt>
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L22:
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x9(%rbp),%rax
  mov    %rax,%rsi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movzbl -0x9(%rbp),%eax
  cmp    $0x79,%al
  je     L37
  movzbl -0x9(%rbp),%eax
  cmp    $0x6e,%al
  jne    L22
L37:
  movzbl -0x9(%rbp),%eax
  cmp    $0x79,%al
  jne    L42
  mov    $0x0,%eax
  call   <resetstatus@plt>
  mov    $0x0,%eax
  jmp    L17
L42:
  mov    $0x1,%eax
L17:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L7
  call   <__stack_chk_fail@plt>
L7:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D7
type: string
name: parse_data
arguments: data_label: D19
type: string
name: parse_data
arguments: data_label: D22
type: string
name: parse_data
arguments: data_label: D4
type: string

tool: D7: all clipped!



tool: D19: start over?


tool: D22: [y/n]: 

tool: D4:  %c

assistant: ```c
int restart() {
  char restartchoice;
  displaystatus();
  printf("all clipped!\n\n");
  do {
    printf("start over?\n");
    printf("[y/n]: ");
    scanf(" %c", &restartchoice);
  } while ((restartchoice != 'y') && (restartchoice != 'n'));
  if (restartchoice == 'y') {
    resetstatus();
    return 0;
  }
  return 1;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<restart>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <displaystatus@plt>
  lea    D1(%rip),%rdi
  call   <printf@plt>
  lea    D20(%rip),%r13
  lea    D8(%rip),%r12
  lea    0x7(%rsp),%rbp
  lea    D22(%rip),%rbx
L32:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  movzbl 0x7(%rsp),%eax
  cmp    $0x79,%al
  je     L25
  cmp    $0x6e,%al
  jne    L32
L25:
  mov    $0x1,%edx
  cmp    $0x79,%al
  je     L49
L42:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L31
  mov    %edx,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L49:
  mov    $0x0,%eax
  call   <resetstatus@plt>
  mov    $0x0,%edx
  jmp    L42
L31:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D1
datatype: string
name: unpack_data
arguments: label: D20
datatype: string
name: unpack_data
arguments: label: D8
datatype: string
name: unpack_data
arguments: label: D22
datatype: string

tool: D1: all clipped!



tool: D20: start over?


tool: D8: [y/n]: 

tool: D22:  %c

assistant: ```c
int restart() {
  char restartchoice;
  displaystatus();
  printf("all clipped!\n\n");
  do {
    printf("start over?\n");
    printf("[y/n]: ");
    scanf(" %c", &restartchoice);
  } while ((restartchoice != 'y') && (restartchoice != 'n'));
  if (restartchoice == 'y') {
    resetstatus();
    return 0;
  }
  return 1;
}
```
user: What is the c source code of the assembly code below:

```asm
<restart>:
  endbr64
  push   %r13
  lea    D20(%rip),%r13
  push   %r12
  lea    D23(%rip),%r12
  push   %rbp
  push   %rbx
  lea    D16(%rip),%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x7(%rsp),%rbp
  call   <displaystatus@plt>
  lea    D2(%rip),%rdi
  call   <printf@plt>
  nopl   0x0(%rax)
L3:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  movzbl 0x7(%rsp),%eax
  cmp    $0x79,%al
  je     L41
  cmp    $0x6e,%al
  jne    L3
L41:
  mov    $0x1,%r8d
  cmp    $0x79,%al
  je     L44
L36:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L30
  add    $0x18,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L44:
  xor    %eax,%eax
  call   <resetstatus@plt>
  xor    %r8d,%r8d
  jmp    L36
L30:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D20
type_infered: string
name: read_data
arguments: label: D23
type_infered: string
name: read_data
arguments: label: D16
type_infered: string
name: read_data
arguments: label: D2
type_infered: string

tool: D20: start over?


tool: D23: [y/n]: 

tool: D16:  %c

tool: D2: all clipped!



assistant: ```c
int restart() {
  char restartchoice;
  displaystatus();
  printf("all clipped!\n\n");
  do {
    printf("start over?\n");
    printf("[y/n]: ");
    scanf(" %c", &restartchoice);
  } while ((restartchoice != 'y') && (restartchoice != 'n'));
  if (restartchoice == 'y') {
    resetstatus();
    return 0;
  }
  return 1;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<restart>:
  endbr64
  push   %r13
  lea    D16(%rip),%r13
  push   %r12
  lea    D34(%rip),%r12
  push   %rbp
  push   %rbx
  lea    D6(%rip),%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x7(%rsp),%rbp
  call   <displaystatus@plt>
  lea    D30(%rip),%rdi
  call   <printf@plt>
  nopl   0x0(%rax)
L21:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  movzbl 0x7(%rsp),%eax
  cmp    $0x79,%al
  je     L9
  cmp    $0x6e,%al
  jne    L21
L9:
  mov    $0x1,%r8d
  cmp    $0x79,%al
  je     L13
L28:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x18,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L13:
  xor    %eax,%eax
  call   <resetstatus@plt>
  xor    %r8d,%r8d
  jmp    L28
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D16
type_guessed: string
name: parse_data
arguments: label: D34
type_guessed: string
name: parse_data
arguments: label: D6
type_guessed: string
name: parse_data
arguments: label: D30
type_guessed: string

tool: D16: start over?


tool: D34: [y/n]: 

tool: D6:  %c

tool: D30: all clipped!



assistant: ```c
int restart() {
  char restartchoice;
  displaystatus();
  printf("all clipped!\n\n");
  do {
    printf("start over?\n");
    printf("[y/n]: ");
    scanf(" %c", &restartchoice);
  } while ((restartchoice != 'y') && (restartchoice != 'n'));
  if (restartchoice == 'y') {
    resetstatus();
    return 0;
  }
  return 1;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<PassTheAddrOfAllocatedData>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0xc,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  lea    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <takePtrToPtr@plt>
  test   %rax,%rax
  je     L3
  addl   $0x1,-0x14(%rbp)
L3:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L13
  call   <__stack_chk_fail@plt>
L13:
  leave
  ret
```

assistant: ```c
void PassTheAddrOfAllocatedData(int f) {
  int *p = malloc(12);
  if (takePtrToPtr(&p))
    f++;
  free(p);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<PassTheAddrOfAllocatedData>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    $0xc,%edi
  call   <malloc@plt>
  mov    %rax,(%rsp)
  mov    %rsp,%rdi
  call   <takePtrToPtr@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0x18,%rsp
  ret
L9:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void PassTheAddrOfAllocatedData(int f) {
  int *p = malloc(12);
  if (takePtrToPtr(&p))
    f++;
  free(p);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<PassTheAddrOfAllocatedData>:
  endbr64
  sub    $0x18,%rsp
  mov    $0xc,%edi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <malloc@plt>
  mov    %rsp,%rdi
  mov    %rax,(%rsp)
  call   <takePtrToPtr@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x18,%rsp
  ret
L1:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void PassTheAddrOfAllocatedData(int f) {
  int *p = malloc(12);
  if (takePtrToPtr(&p))
    f++;
  free(p);
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<PassTheAddrOfAllocatedData>:
  endbr64
  sub    $0x18,%rsp
  mov    $0xc,%edi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <malloc@plt>
  mov    %rsp,%rdi
  mov    %rax,(%rsp)
  call   <takePtrToPtr@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  add    $0x18,%rsp
  ret
L7:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void PassTheAddrOfAllocatedData(int f) {
  int *p = malloc(12);
  if (takePtrToPtr(&p))
    f++;
  free(p);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    $0x100,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  mov    $0x100,%esi
  mov    %rax,%rdi
  call   <acc_create@plt>
  test   %rax,%rax
  je     L74
L139:
  mov    %r13,%rbx
  lea    0x100(%r13),%rbp
  mov    %r13,%r12
  jmp    L65
L74:
  call   <abort@plt>
  jmp    L139
L41:
  add    $0x1,%r12
  cmp    %rbp,%r12
  je     L39
L65:
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <acc_is_present@plt>
  cmp    $0x1,%eax
  je     L41
  mov    $0x0,%eax
  call   <abort@plt>
  jmp    L41
L39:
  mov    $0x100,%esi
  mov    %r13,%rdi
  call   <acc_delete@plt>
  mov    %r13,%r12
  jmp    L45
L100:
  add    $0x1,%r12
  cmp    %rbp,%r12
  je     L92
L45:
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <acc_is_present@plt>
  test   %eax,%eax
  je     L100
  mov    $0x0,%eax
  call   <abort@plt>
  jmp    L100
L92:
  mov    $0x100,%esi
  mov    %r13,%rdi
  call   <acc_create@plt>
  test   %rax,%rax
  je     L145
L148:
  mov    %r13,%r12
  jmp    L40
L145:
  call   <abort@plt>
  jmp    L148
L1:
  add    $0x1,%r12
  cmp    %rbp,%r12
  je     L11
L40:
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <acc_is_present@plt>
  cmp    $0x1,%eax
  je     L1
  mov    $0x0,%eax
  call   <abort@plt>
  jmp    L1
L11:
  mov    $0x100,%esi
  mov    %r13,%rdi
  call   <acc_delete@plt>
  jmp    L64
L84:
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  je     L19
L64:
  mov    $0x1,%esi
  mov    %rbx,%rdi
  call   <acc_is_present@plt>
  test   %eax,%eax
  je     L84
  mov    $0x0,%eax
  call   <abort@plt>
  jmp    L84
L19:
  mov    %r13,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
int main(int argc, char **argv) {
  const int N = 256;
  int i;
  unsigned char *h;
  void *d;
  h = (unsigned char *)malloc(N);
  d = acc_create(h, N);
  if (!d)
    abort();
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, 1) != 1)
      abort();
  }
  acc_delete(h, N);
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, 1) != 0)
      abort();
  }
  d = acc_create(h, N);
  if (!d)
    abort();
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, 1) != 1)
      abort();
  }
  acc_delete(h, N);
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, 1) != 0)
      abort();
  }
  free(h);
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %r13
  mov    $0x100,%edi
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <malloc@plt>
  mov    $0x100,%esi
  mov    %rax,%rdi
  mov    %rax,%r13
  call   <acc_create@plt>
  test   %rax,%rax
  je     L31
L129:
  mov    %r13,%rbx
  lea    0x100(%r13),%rbp
  mov    %r13,%r12
  xchg   %ax,%ax
L108:
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <acc_is_present@plt>
  cmp    $0x1,%eax
  je     L69
  xor    %eax,%eax
  call   <abort@plt>
L69:
  add    $0x1,%r12
  cmp    %rbp,%r12
  jne    L108
  mov    $0x100,%esi
  mov    %r13,%rdi
  mov    %r13,%r12
  call   <acc_delete@plt>
  jmp    L76
  nopl   0x0(%rax)
L53:
  add    $0x1,%r12
  cmp    %rbp,%r12
  je     L63
L76:
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <acc_is_present@plt>
  test   %eax,%eax
  je     L53
  xor    %eax,%eax
  add    $0x1,%r12
  call   <abort@plt>
  cmp    %rbp,%r12
  jne    L76
L63:
  mov    $0x100,%esi
  mov    %r13,%rdi
  call   <acc_create@plt>
  test   %rax,%rax
  je     L46
L30:
  mov    %r13,%r12
  nopl   0x0(%rax,%rax,1)
L103:
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <acc_is_present@plt>
  cmp    $0x1,%eax
  je     L66
  xor    %eax,%eax
  call   <abort@plt>
L66:
  add    $0x1,%r12
  cmp    %rbp,%r12
  jne    L103
  mov    $0x100,%esi
  mov    %r13,%rdi
  call   <acc_delete@plt>
  jmp    L43
  nopl   0x0(%rax)
L20:
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  je     L84
L43:
  mov    $0x1,%esi
  mov    %rbx,%rdi
  call   <acc_is_present@plt>
  test   %eax,%eax
  je     L20
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <abort@plt>
  cmp    %rbp,%rbx
  jne    L43
L84:
  mov    %r13,%rdi
  call   <free@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L31:
  call   <abort@plt>
  jmp    L129
L46:
  call   <abort@plt>
  jmp    L30
```

assistant: ```c
int main(int argc, char **argv) {
  const int N = 256;
  int i;
  unsigned char *h;
  void *d;
  h = (unsigned char *)malloc(N);
  d = acc_create(h, N);
  if (!d)
    abort();
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, 1) != 1)
      abort();
  }
  acc_delete(h, N);
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, 1) != 0)
      abort();
  }
  d = acc_create(h, N);
  if (!d)
    abort();
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, 1) != 1)
      abort();
  }
  acc_delete(h, N);
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, 1) != 0)
      abort();
  }
  free(h);
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %r13
  mov    $0x100,%edi
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <malloc@plt>
  mov    $0x100,%esi
  mov    %rax,%rdi
  mov    %rax,%r13
  call   <acc_create@plt>
  test   %rax,%rax
  je     L34
L108:
  mov    %r13,%rbx
  lea    0x100(%r13),%rbp
  mov    %r13,%r12
  xchg   %ax,%ax
L22:
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <acc_is_present@plt>
  cmp    $0x1,%eax
  je     L13
  xor    %eax,%eax
  call   <abort@plt>
L13:
  add    $0x1,%r12
  cmp    %rbp,%r12
  jne    L22
  mov    $0x100,%esi
  mov    %r13,%rdi
  mov    %r13,%r12
  call   <acc_delete@plt>
  jmp    L111
  nopl   0x0(%rax)
L106:
  add    $0x1,%r12
  cmp    %rbp,%r12
  je     L90
L111:
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <acc_is_present@plt>
  test   %eax,%eax
  je     L106
  xor    %eax,%eax
  add    $0x1,%r12
  call   <abort@plt>
  cmp    %rbp,%r12
  jne    L111
L90:
  mov    $0x100,%esi
  mov    %r13,%rdi
  call   <acc_create@plt>
  test   %rax,%rax
  je     L4
L156:
  mov    %r13,%r12
  nopl   0x0(%rax,%rax,1)
L78:
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <acc_is_present@plt>
  cmp    $0x1,%eax
  je     L126
  xor    %eax,%eax
  call   <abort@plt>
L126:
  add    $0x1,%r12
  cmp    %rbp,%r12
  jne    L78
  mov    $0x100,%esi
  mov    %r13,%rdi
  call   <acc_delete@plt>
  jmp    L87
  nopl   0x0(%rax)
L132:
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  je     L135
L87:
  mov    $0x1,%esi
  mov    %rbx,%rdi
  call   <acc_is_present@plt>
  test   %eax,%eax
  je     L132
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <abort@plt>
  cmp    %rbp,%rbx
  jne    L87
L135:
  mov    %r13,%rdi
  call   <free@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L34:
  call   <abort@plt>
  jmp    L108
L4:
  call   <abort@plt>
  jmp    L156
```

assistant: ```c
int main(int argc, char **argv) {
  const int N = 256;
  int i;
  unsigned char *h;
  void *d;
  h = (unsigned char *)malloc(N);
  d = acc_create(h, N);
  if (!d)
    abort();
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, 1) != 1)
      abort();
  }
  acc_delete(h, N);
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, 1) != 0)
      abort();
  }
  d = acc_create(h, N);
  if (!d)
    abort();
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, 1) != 1)
      abort();
  }
  acc_delete(h, N);
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, 1) != 0)
      abort();
  }
  free(h);
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<read_obs_seq_from_file>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x3f0,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    %rdx,%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x3e8(%rsp)
  xor    %eax,%eax
  mov    $0x0,%r13d
  mov    %rsp,%rbp
L22:
  mov    %rbx,%rdx
  mov    $0x3e8,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L54
  cmpb   $0x3e,(%rsp)
  je     L22
  mov    %rbp,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  lea    -0x1(%rsp),%rsi
L24:
  mov    %eax,%ecx
  movzbl (%rsi,%rax,1),%edx
  sub    $0x1,%rax
  cmp    $0xa,%dl
  je     L24
  cmp    $0xd,%dl
  je     L24
  add    %ecx,%r13d
  jmp    L22
L54:
  mov    %rbx,%rdi
  call   <rewind@plt>
  movl   $0x1,(%r12)
  mov    $0x8,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    %rax,(%r14)
  add    $0x1,%r13d
  mov    %r13d,%edi
  call   <malloc@plt>
  mov    %rax,%rdi
  mov    %rax,(%r12)
  mov    %r13d,%edx
  mov    $0x0,%esi
  call   <memset@plt>
  mov    $0x0,%r13d
  mov    %rsp,%rbp
L7:
  mov    %rbx,%rdx
  mov    $0x3e8,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L78
  cmpb   $0x3e,(%rsp)
  je     L7
  mov    %rbp,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  lea    -0x1(%rsp),%rcx
L79:
  mov    %eax,%r14d
  movzbl (%rcx,%rax,1),%edx
  sub    $0x1,%rax
  cmp    $0xa,%dl
  je     L79
  cmp    $0xd,%dl
  je     L79
  movslq %r13d,%rdi
  add    (%r12),%rdi
  mov    %r14d,%edx
  mov    %rbp,%rsi
  call   <memcpy@plt>
  add    %r14d,%r13d
  jmp    L7
L78:
  mov    0x3e8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L36
  add    $0x3f0,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L36:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void read_obs_seq_from_file(FILE *fp, int *num_seqs_ptr, char ***obs_seqs_ptr) {
  int i = 0;
  int j = 0;
  int bp_count;
  char mystring[1000];
  while (fgets(mystring, sizeof mystring, fp)) {
    if (mystring[0] == '>') {
    } else {
      bp_count = strlen(mystring) - 1;
      while (mystring[bp_count - 1] == 10 || mystring[bp_count - 1] == 13) {
        bp_count--;
      }
      i += bp_count;
    }
  }
  rewind(fp);
  *num_seqs_ptr = 1;
  *obs_seqs_ptr = (char **)malloc(*num_seqs_ptr * sizeof(char *));
  char **obs_seqs = *obs_seqs_ptr;
  obs_seqs[0] = (char *)malloc(i * sizeof(char) + 1);
  memset(obs_seqs[0], 0, i * sizeof(char) + 1);
  while (fgets(mystring, sizeof mystring, fp)) {
    if (mystring[0] == '>') {
    } else {
      bp_count = strlen(mystring) - 1;
      while (mystring[bp_count - 1] == 10 || mystring[bp_count - 1] == 13) {
        bp_count--;
      }
      memcpy(obs_seqs[0] + j, mystring, bp_count);
      j += bp_count;
    }
  }
}
```