ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What is the c source code of the assembly code below:

```asm
<funcHeader>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  mov    $0x3,%edi
  push   %rbp
  sub    $0x218,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x208(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  call   <vspace@plt>
  mov    %r12,%rdx
  lea    D7(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <codeln@plt>
  lea    D13(%rip),%rdi
  call   <codeln@plt>
  xor    %eax,%eax
  call   <pushIndent@plt>
  lea    D3(%rip),%rdi
  call   <codeln@plt>
  mov    0x208(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x218,%rsp
  pop    %rbp
  pop    %r12
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D7
data_type: string
name: read_data
arguments: data_tag: D13
data_type: string
name: read_data
arguments: data_tag: D3
data_type: string

tool: D7: float * %s (void *pa, const float * inBuf, float * outBuf, size_t buflen)

tool: D13: {

tool: D3: struct b_preamp *pp = (struct b_preamp *) pa;

assistant: ```c
void funcHeader(char *funcName) {
  char buf[512];
  vspace(3);
  sprintf(buf, "float * %s (void *pa, const float * inBuf, float * outBuf, size_t buflen)", funcName);
  codeln(buf);
  codeln("{");
  pushIndent();
  codeln("struct b_preamp *pp = (struct b_preamp *) pa;");
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<funcHeader>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  mov    $0x3,%edi
  push   %rbp
  sub    $0x218,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x208(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  call   <vspace@plt>
  mov    %r12,%rdx
  lea    D0(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <codeln@plt>
  lea    D15(%rip),%rdi
  call   <codeln@plt>
  xor    %eax,%eax
  call   <pushIndent@plt>
  lea    D10(%rip),%rdi
  call   <codeln@plt>
  mov    0x208(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x218,%rsp
  pop    %rbp
  pop    %r12
  ret
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D0
data_type: string
name: read_data
arguments: data_tag: D15
data_type: string
name: read_data
arguments: data_tag: D10
data_type: string

tool: D0: float * %s (void *pa, const float * inBuf, float * outBuf, size_t buflen)

tool: D15: {

tool: D10: struct b_preamp *pp = (struct b_preamp *) pa;

assistant: ```c
void funcHeader(char *funcName) {
  char buf[512];
  vspace(3);
  sprintf(buf, "float * %s (void *pa, const float * inBuf, float * outBuf, size_t buflen)", funcName);
  codeln(buf);
  codeln("{");
  pushIndent();
  codeln("struct b_preamp *pp = (struct b_preamp *) pa;");
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<isinf>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movsd  %xmm0,-0x18(%rbp)
  lea    -0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  lea    -0x18(%rbp),%rax
  mov    (%rax),%rax
  shr    $0x20,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  and    $0x7fffffff,%eax
  xor    $0x7ff00000,%rax
  or     %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  neg    %rax
  or     %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  sar    $0x1f,%rax
  not    %eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  sar    $0x1e,%rax
  and    %edx,%eax
  pop    %rbp
  ret
```

assistant: ```c
int isinf(double x) {
  long hx, lx;
  lx = *(unsigned long long *)&x;
  hx = (*(unsigned long long *)&x) >> 32;
  lx |= (hx & 0x7fffffff) ^ 0x7ff00000;
  lx |= -lx;
  return ~(lx >> 31) & (hx >> 30);
}
```
user: Translate the below assembly code into C programming language:

```asm
<isinf>:
  endbr64
  movq   %xmm0,%rax
  movq   %xmm0,%rcx
  shr    $0x20,%rcx
  mov    %rcx,%rdx
  and    $0x7fffffff,%edx
  xor    $0x7ff00000,%rdx
  or     %rax,%rdx
  mov    %rdx,%rax
  neg    %rax
  or     %rdx,%rax
  sar    $0x1f,%rax
  not    %eax
  sar    $0x1e,%rcx
  and    %ecx,%eax
  ret
```

assistant: ```c
int isinf(double x) {
  long hx, lx;
  lx = *(unsigned long long *)&x;
  hx = (*(unsigned long long *)&x) >> 32;
  lx |= (hx & 0x7fffffff) ^ 0x7ff00000;
  lx |= -lx;
  return ~(lx >> 31) & (hx >> 30);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<isinf>:
  endbr64
  movq   %xmm0,%rcx
  movq   %xmm0,%rax
  shr    $0x20,%rcx
  mov    %rcx,%rdx
  sar    $0x1e,%rcx
  and    $0x7fffffff,%edx
  xor    $0x7ff00000,%rdx
  or     %rax,%rdx
  mov    %rdx,%rax
  neg    %rax
  or     %rdx,%rax
  sar    $0x1f,%rax
  not    %eax
  and    %ecx,%eax
  ret
```

assistant: ```c
int isinf(double x) {
  long hx, lx;
  lx = *(unsigned long long *)&x;
  hx = (*(unsigned long long *)&x) >> 32;
  lx |= (hx & 0x7fffffff) ^ 0x7ff00000;
  lx |= -lx;
  return ~(lx >> 31) & (hx >> 30);
}
```
user: What is the c source code of the assembly code below:

```asm
<isinf>:
  endbr64
  movq   %xmm0,%rcx
  movq   %xmm0,%rax
  shr    $0x20,%rcx
  mov    %rcx,%rdx
  sar    $0x1e,%rcx
  and    $0x7fffffff,%edx
  xor    $0x7ff00000,%rdx
  or     %rax,%rdx
  mov    %rdx,%rax
  neg    %rax
  or     %rdx,%rax
  sar    $0x1f,%rax
  not    %eax
  and    %ecx,%eax
  ret
```

assistant: ```c
int isinf(double x) {
  long hx, lx;
  lx = *(unsigned long long *)&x;
  hx = (*(unsigned long long *)&x) >> 32;
  lx |= (hx & 0x7fffffff) ^ 0x7ff00000;
  lx |= -lx;
  return ~(lx >> 31) & (hx >> 30);
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<jump_table_a>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0xc(%rbp),%rax
  mov    %rax,%rsi
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0xc(%rbp),%eax
  cmp    $0xa,%eax
  ja     L50
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D2(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D2(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D63(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L15
  lea    D89(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L15
  lea    D69(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L15
  lea    D94(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L15
  lea    D116(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L15
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L15
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L15
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L15
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L15
  lea    D74(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L15
  lea    D128(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L15
L50:
  lea    D111(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  nop
L15:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L49
  call   <__stack_chk_fail@plt>
L49:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D30
type: string
name: retrieve_data
arguments: data_label: D63
type: string
name: retrieve_data
arguments: data_label: D89
type: string
name: retrieve_data
arguments: data_label: D69
type: string
name: retrieve_data
arguments: data_label: D94
type: string
name: retrieve_data
arguments: data_label: D116
type: string
name: retrieve_data
arguments: data_label: D53
type: string
name: retrieve_data
arguments: data_label: D25
type: string
name: retrieve_data
arguments: data_label: D32
type: string
name: retrieve_data
arguments: data_label: D12
type: string
name: retrieve_data
arguments: data_label: D74
type: string
name: retrieve_data
arguments: data_label: D128
type: string
name: retrieve_data
arguments: data_label: D111
type: string

tool: D30: %d

tool: D63: 0

tool: D89: 1

tool: D69: 2

tool: D94: 3

tool: D116: 4

tool: D53: 5

tool: D25: 6

tool: D32: 7

tool: D12: 8

tool: D74: 9

tool: D128: 10

tool: D111: other values

assistant: ```c
void jump_table_a() {
  int input;
  scanf("%d", &input);
  switch (input) {
  case 0:
    puts("0");
    break;
  case 1:
    puts("1");
    break;
  case 2:
    puts("2");
    break;
  case 3:
    puts("3");
    break;
  case 4:
    puts("4");
    break;
  case 5:
    puts("5");
    break;
  case 6:
    puts("6");
    break;
  case 7:
    puts("7");
    break;
  case 8:
    puts("8");
    break;
  case 9:
    puts("9");
    break;
  case 10:
    puts("10");
    break;
  default:
    puts("other values");
    break;
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<jump_table_a>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rsi
  lea    D133(%rip),%rdi
  call   <scanf@plt>
  cmpl   $0xa,0x4(%rsp)
  ja     L107
  mov    0x4(%rsp),%eax
  lea    D93(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D14(%rip),%rdi
  call   <puts@plt>
L129:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L97
  add    $0x18,%rsp
  ret
  lea    D115(%rip),%rdi
  call   <puts@plt>
  jmp    L129
  lea    D68(%rip),%rdi
  call   <puts@plt>
  jmp    L129
  lea    D75(%rip),%rdi
  call   <puts@plt>
  jmp    L129
  lea    D109(%rip),%rdi
  call   <puts@plt>
  jmp    L129
  lea    D120(%rip),%rdi
  call   <puts@plt>
  jmp    L129
  lea    D32(%rip),%rdi
  call   <puts@plt>
  jmp    L129
  lea    D15(%rip),%rdi
  call   <puts@plt>
  jmp    L129
  lea    D66(%rip),%rdi
  call   <puts@plt>
  jmp    L129
  lea    D62(%rip),%rdi
  call   <puts@plt>
  jmp    L129
  lea    D105(%rip),%rdi
  call   <puts@plt>
  jmp    L129
L107:
  lea    D6(%rip),%rdi
  call   <puts@plt>
  jmp    L129
L97:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D133
type_guessed: string
name: retrieve_data
arguments: tag: D14
type_guessed: string
name: retrieve_data
arguments: tag: D115
type_guessed: string
name: retrieve_data
arguments: tag: D68
type_guessed: string
name: retrieve_data
arguments: tag: D75
type_guessed: string
name: retrieve_data
arguments: tag: D109
type_guessed: string
name: retrieve_data
arguments: tag: D120
type_guessed: string
name: retrieve_data
arguments: tag: D32
type_guessed: string
name: retrieve_data
arguments: tag: D15
type_guessed: string
name: retrieve_data
arguments: tag: D66
type_guessed: string
name: retrieve_data
arguments: tag: D62
type_guessed: string
name: retrieve_data
arguments: tag: D105
type_guessed: string
name: retrieve_data
arguments: tag: D6
type_guessed: string

tool: D133: %d

tool: D14: 0

tool: D115: 1

tool: D68: 2

tool: D75: 3

tool: D109: 4

tool: D120: 5

tool: D32: 6

tool: D15: 7

tool: D66: 8

tool: D62: 9

tool: D105: 10

tool: D6: other values

assistant: ```c
void jump_table_a() {
  int input;
  scanf("%d", &input);
  switch (input) {
  case 0:
    puts("0");
    break;
  case 1:
    puts("1");
    break;
  case 2:
    puts("2");
    break;
  case 3:
    puts("3");
    break;
  case 4:
    puts("4");
    break;
  case 5:
    puts("5");
    break;
  case 6:
    puts("6");
    break;
  case 7:
    puts("7");
    break;
  case 8:
    puts("8");
    break;
  case 9:
    puts("9");
    break;
  case 10:
    puts("10");
    break;
  default:
    puts("other values");
    break;
  }
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<jump_table_a>:
  endbr64
  sub    $0x18,%rsp
  lea    D42(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rsi
  call   <scanf@plt>
  cmpl   $0xa,0x4(%rsp)
  ja     L60
  mov    0x4(%rsp),%eax
  lea    D59(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
  lea    D40(%rip),%rdi
  call   <puts@plt>
  nopl   0x0(%rax)
L39:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L78
  add    $0x18,%rsp
  ret
  nopl   0x0(%rax)
  lea    D82(%rip),%rdi
  call   <puts@plt>
  jmp    L39
  xchg   %ax,%ax
  lea    D120(%rip),%rdi
  call   <puts@plt>
  jmp    L39
  xchg   %ax,%ax
  lea    D96(%rip),%rdi
  call   <puts@plt>
  jmp    L39
  xchg   %ax,%ax
  lea    D47(%rip),%rdi
  call   <puts@plt>
  jmp    L39
  xchg   %ax,%ax
  lea    D125(%rip),%rdi
  call   <puts@plt>
  jmp    L39
  xchg   %ax,%ax
  lea    D87(%rip),%rdi
  call   <puts@plt>
  jmp    L39
  xchg   %ax,%ax
  lea    D34(%rip),%rdi
  call   <puts@plt>
  jmp    L39
  nopl   0x0(%rax)
  lea    D55(%rip),%rdi
  call   <puts@plt>
  jmp    L39
  nopl   0x0(%rax)
  lea    D88(%rip),%rdi
  call   <puts@plt>
  jmp    L39
  nopl   0x0(%rax)
  lea    D7(%rip),%rdi
  call   <puts@plt>
  jmp    L39
L60:
  lea    D56(%rip),%rdi
  call   <puts@plt>
  jmp    L39
L78:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D42
data_type: string
name: parse_data
arguments: tag: D40
data_type: string
name: parse_data
arguments: tag: D82
data_type: string
name: parse_data
arguments: tag: D120
data_type: string
name: parse_data
arguments: tag: D96
data_type: string
name: parse_data
arguments: tag: D47
data_type: string
name: parse_data
arguments: tag: D125
data_type: string
name: parse_data
arguments: tag: D87
data_type: string
name: parse_data
arguments: tag: D34
data_type: string
name: parse_data
arguments: tag: D55
data_type: string
name: parse_data
arguments: tag: D88
data_type: string
name: parse_data
arguments: tag: D7
data_type: string
name: parse_data
arguments: tag: D56
data_type: string

tool: D42: %d

tool: D40: 9

tool: D82: 10

tool: D120: 0

tool: D96: 1

tool: D47: 2

tool: D125: 3

tool: D87: 4

tool: D34: 5

tool: D55: 6

tool: D88: 7

tool: D7: 8

tool: D56: other values

assistant: ```c
void jump_table_a() {
  int input;
  scanf("%d", &input);
  switch (input) {
  case 0:
    puts("0");
    break;
  case 1:
    puts("1");
    break;
  case 2:
    puts("2");
    break;
  case 3:
    puts("3");
    break;
  case 4:
    puts("4");
    break;
  case 5:
    puts("5");
    break;
  case 6:
    puts("6");
    break;
  case 7:
    puts("7");
    break;
  case 8:
    puts("8");
    break;
  case 9:
    puts("9");
    break;
  case 10:
    puts("10");
    break;
  default:
    puts("other values");
    break;
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<jump_table_a>:
  endbr64
  sub    $0x18,%rsp
  lea    D55(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rsi
  call   <scanf@plt>
  cmpl   $0xa,0x4(%rsp)
  ja     L57
  mov    0x4(%rsp),%eax
  lea    D77(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
  lea    D37(%rip),%rdi
  call   <puts@plt>
  nopl   0x0(%rax)
L17:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L26
  add    $0x18,%rsp
  ret
  nopl   0x0(%rax)
  lea    D43(%rip),%rdi
  call   <puts@plt>
  jmp    L17
  xchg   %ax,%ax
  lea    D62(%rip),%rdi
  call   <puts@plt>
  jmp    L17
  xchg   %ax,%ax
  lea    D74(%rip),%rdi
  call   <puts@plt>
  jmp    L17
  xchg   %ax,%ax
  lea    D83(%rip),%rdi
  call   <puts@plt>
  jmp    L17
  xchg   %ax,%ax
  lea    D28(%rip),%rdi
  call   <puts@plt>
  jmp    L17
  xchg   %ax,%ax
  lea    D111(%rip),%rdi
  call   <puts@plt>
  jmp    L17
  xchg   %ax,%ax
  lea    D29(%rip),%rdi
  call   <puts@plt>
  jmp    L17
  nopl   0x0(%rax)
  lea    D15(%rip),%rdi
  call   <puts@plt>
  jmp    L17
  nopl   0x0(%rax)
  lea    D139(%rip),%rdi
  call   <puts@plt>
  jmp    L17
  nopl   0x0(%rax)
  lea    D99(%rip),%rdi
  call   <puts@plt>
  jmp    L17
L57:
  lea    D18(%rip),%rdi
  call   <puts@plt>
  jmp    L17
L26:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D55
type_guessed: string
name: disassemble_data
arguments: tag: D37
type_guessed: string
name: disassemble_data
arguments: tag: D43
type_guessed: string
name: disassemble_data
arguments: tag: D62
type_guessed: string
name: disassemble_data
arguments: tag: D74
type_guessed: string
name: disassemble_data
arguments: tag: D83
type_guessed: string
name: disassemble_data
arguments: tag: D28
type_guessed: string
name: disassemble_data
arguments: tag: D111
type_guessed: string
name: disassemble_data
arguments: tag: D29
type_guessed: string
name: disassemble_data
arguments: tag: D15
type_guessed: string
name: disassemble_data
arguments: tag: D139
type_guessed: string
name: disassemble_data
arguments: tag: D99
type_guessed: string
name: disassemble_data
arguments: tag: D18
type_guessed: string

tool: D55: %d

tool: D37: 9

tool: D43: 10

tool: D62: 0

tool: D74: 1

tool: D83: 2

tool: D28: 3

tool: D111: 4

tool: D29: 5

tool: D15: 6

tool: D139: 7

tool: D99: 8

tool: D18: other values

assistant: ```c
void jump_table_a() {
  int input;
  scanf("%d", &input);
  switch (input) {
  case 0:
    puts("0");
    break;
  case 1:
    puts("1");
    break;
  case 2:
    puts("2");
    break;
  case 3:
    puts("3");
    break;
  case 4:
    puts("4");
    break;
  case 5:
    puts("5");
    break;
  case 6:
    puts("6");
    break;
  case 7:
    puts("7");
    break;
  case 8:
    puts("8");
    break;
  case 9:
    puts("9");
    break;
  case 10:
    puts("10");
    break;
  default:
    puts("other values");
    break;
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<count_neighbors>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  movl   $0x0,-0x4(%rbp)
  mov    -0x20(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x1c(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <world_get_cell@plt>
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x20(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <world_get_cell@plt>
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x20(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <world_get_cell@plt>
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x1c(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <world_get_cell@plt>
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <world_get_cell@plt>
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x20(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x1c(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <world_get_cell@plt>
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x20(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <world_get_cell@plt>
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x20(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <world_get_cell@plt>
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  leave
  ret
```

assistant: ```c
int count_neighbors(const struct world *w, int x, int y) {
  int count = 0;
  count += world_get_cell(w, x - 1, y + 1);
  count += world_get_cell(w, x - 0, y + 1);
  count += world_get_cell(w, x + 1, y + 1);
  count += world_get_cell(w, x - 1, y + 0);
  count += world_get_cell(w, x + 1, y + 0);
  count += world_get_cell(w, x - 1, y - 1);
  count += world_get_cell(w, x - 0, y - 1);
  count += world_get_cell(w, x + 1, y - 1);
  return count;
}
```
user: Translate the below assembly code into C programming language:

```asm
<count_neighbors>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  mov    %esi,%r12d
  mov    %edx,%ebp
  lea    0x1(%rdx),%r15d
  lea    -0x1(%rsi),%r14d
  mov    %r15d,%edx
  mov    %r14d,%esi
  call   <world_get_cell@plt>
  mov    %rax,%r13
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %rbx,%rdi
  call   <world_get_cell@plt>
  add    %r13d,%eax
  mov    %eax,0xc(%rsp)
  lea    0x1(%r12),%r13d
  mov    %r15d,%edx
  mov    %r13d,%esi
  mov    %rbx,%rdi
  call   <world_get_cell@plt>
  mov    0xc(%rsp),%ecx
  lea    (%rcx,%rax,1),%r15d
  mov    %ebp,%edx
  mov    %r14d,%esi
  mov    %rbx,%rdi
  call   <world_get_cell@plt>
  add    %eax,%r15d
  mov    %ebp,%edx
  mov    %r13d,%esi
  mov    %rbx,%rdi
  call   <world_get_cell@plt>
  add    %eax,%r15d
  sub    $0x1,%ebp
  mov    %ebp,%edx
  mov    %r14d,%esi
  mov    %rbx,%rdi
  call   <world_get_cell@plt>
  add    %eax,%r15d
  mov    %ebp,%edx
  mov    %r12d,%esi
  mov    %rbx,%rdi
  call   <world_get_cell@plt>
  add    %eax,%r15d
  mov    %ebp,%edx
  mov    %r13d,%esi
  mov    %rbx,%rdi
  call   <world_get_cell@plt>
  add    %r15d,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int count_neighbors(const struct world *w, int x, int y) {
  int count = 0;
  count += world_get_cell(w, x - 1, y + 1);
  count += world_get_cell(w, x - 0, y + 1);
  count += world_get_cell(w, x + 1, y + 1);
  count += world_get_cell(w, x - 1, y + 0);
  count += world_get_cell(w, x + 1, y + 0);
  count += world_get_cell(w, x - 1, y - 1);
  count += world_get_cell(w, x - 0, y - 1);
  count += world_get_cell(w, x + 1, y - 1);
  return count;
}
```
user: What is the c source code of the assembly code below:

```asm
<count_neighbors>:
  endbr64
  push   %r15
  lea    -0x1(%rsi),%r8d
  push   %r14
  mov    %esi,%r14d
  mov    %r8d,%esi
  push   %r13
  lea    0x1(%rdx),%r13d
  lea    0x1(%r14),%r15d
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %edx,%ebx
  mov    %r13d,%edx
  sub    $0x18,%rsp
  mov    %r8d,0xc(%rsp)
  call   <world_get_cell@plt>
  mov    %r13d,%edx
  mov    %r14d,%esi
  mov    %rbp,%rdi
  mov    %rax,%r12
  call   <world_get_cell@plt>
  mov    %r13d,%edx
  mov    %r15d,%esi
  mov    %rbp,%rdi
  add    %eax,%r12d
  call   <world_get_cell@plt>
  mov    0xc(%rsp),%esi
  mov    %ebx,%edx
  mov    %rbp,%rdi
  lea    (%r12,%rax,1),%r13d
  lea    -0x1(%rbx),%r12d
  call   <world_get_cell@plt>
  mov    %ebx,%edx
  mov    %r15d,%esi
  mov    %rbp,%rdi
  add    %eax,%r13d
  call   <world_get_cell@plt>
  mov    0xc(%rsp),%esi
  mov    %r12d,%edx
  mov    %rbp,%rdi
  add    %eax,%r13d
  call   <world_get_cell@plt>
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    %rbp,%rdi
  lea    0x0(%r13,%rax,1),%ebx
  call   <world_get_cell@plt>
  mov    %r12d,%edx
  mov    %r15d,%esi
  mov    %rbp,%rdi
  add    %eax,%ebx
  call   <world_get_cell@plt>
  add    $0x18,%rsp
  add    %ebx,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int count_neighbors(const struct world *w, int x, int y) {
  int count = 0;
  count += world_get_cell(w, x - 1, y + 1);
  count += world_get_cell(w, x - 0, y + 1);
  count += world_get_cell(w, x + 1, y + 1);
  count += world_get_cell(w, x - 1, y + 0);
  count += world_get_cell(w, x + 1, y + 0);
  count += world_get_cell(w, x - 1, y - 1);
  count += world_get_cell(w, x - 0, y - 1);
  count += world_get_cell(w, x + 1, y - 1);
  return count;
}
```