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

```asm
<first_larger_prime>:
  endbr64
  push   %r12
  mov    %edi,%r12d
  nopl   0x0(%rax)
L9:
  add    $0x1,%r12d
  mov    $0x3,%esi
  mov    %r12d,%edi
  call   <is_prime@plt>
  test   %rax,%rax
  je     L9
  mov    %r12d,%eax
  pop    %r12
  ret
```

assistant: ```c
int first_larger_prime(int n) {
  if (is_prime(n + 1, 3))
    return n + 1;
  else
    return first_larger_prime(n + 1);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<irmo_string_nocase_compare>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x8(%rbp)
L11:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  je     L39
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jge    L35
  mov    $0xffffffff,%eax
  jmp    L34
L35:
  mov    $0x1,%eax
  jmp    L34
L39:
  cmpl   $0x0,-0x18(%rbp)
  je     L38
  addq   $0x1,-0x10(%rbp)
  addq   $0x1,-0x8(%rbp)
  jmp    L11
L38:
  nop
  mov    $0x0,%eax
L34:
  leave
  ret
```

assistant: ```c
int irmo_string_nocase_compare(void *string1, void *string2) {
  char *p1;
  char *p2;
  int c1, c2;
  p1 = (char *)string1;
  p2 = (char *)string2;
  for (;;) {
    c1 = tolower(*p1);
    c2 = tolower(*p2);
    if (c1 != c2) {
      if (c1 < c2) {
        return -1;
      } else {
        return 1;
      }
    }
    if (c1 == '\0')
      break;
    ++p1;
    ++p2;
  }
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<irmo_string_nocase_compare>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r12
  mov    %rsi,%rbp
  jmp    L31
L33:
  setge  %bl
  movzbl %bl,%ebx
  lea    -0x1(%rbx,%rbx,1),%ebx
L21:
  mov    %ebx,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L1:
  add    $0x1,%r12
  add    $0x1,%rbp
L31:
  movsbl (%r12),%edi
  call   <tolower@plt>
  mov    %eax,%ebx
  movsbl 0x0(%rbp),%edi
  call   <tolower@plt>
  cmp    %eax,%ebx
  jne    L33
  test   %ebx,%ebx
  jne    L1
  jmp    L21
```

assistant: ```c
int irmo_string_nocase_compare(void *string1, void *string2) {
  char *p1;
  char *p2;
  int c1, c2;
  p1 = (char *)string1;
  p2 = (char *)string2;
  for (;;) {
    c1 = tolower(*p1);
    c2 = tolower(*p2);
    if (c1 != c2) {
      if (c1 < c2) {
        return -1;
      } else {
        return 1;
      }
    }
    if (c1 == '\0')
      break;
    ++p1;
    ++p2;
  }
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<irmo_string_nocase_compare>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rsi,%rbx
  jmp    L3
L17:
  test   %r12d,%r12d
  je     L25
  add    $0x1,%rbp
  add    $0x1,%rbx
L3:
  movsbl 0x0(%rbp),%edi
  call   <tolower@plt>
  movsbl (%rbx),%edi
  mov    %eax,%r12d
  call   <tolower@plt>
  cmp    %eax,%r12d
  je     L17
  setge  %r12b
  movzbl %r12b,%r12d
  lea    -0x1(%r12,%r12,1),%r12d
L25:
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int irmo_string_nocase_compare(void *string1, void *string2) {
  char *p1;
  char *p2;
  int c1, c2;
  p1 = (char *)string1;
  p2 = (char *)string2;
  for (;;) {
    c1 = tolower(*p1);
    c2 = tolower(*p2);
    if (c1 != c2) {
      if (c1 < c2) {
        return -1;
      } else {
        return 1;
      }
    }
    if (c1 == '\0')
      break;
    ++p1;
    ++p2;
  }
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<irmo_string_nocase_compare>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rsi,%rbx
  jmp    L13
L8:
  test   %r12d,%r12d
  je     L20
  add    $0x1,%rbp
  add    $0x1,%rbx
L13:
  movsbl 0x0(%rbp),%edi
  call   <tolower@plt>
  movsbl (%rbx),%edi
  mov    %eax,%r12d
  call   <tolower@plt>
  cmp    %eax,%r12d
  je     L8
  setge  %r12b
  movzbl %r12b,%r12d
  lea    -0x1(%r12,%r12,1),%r12d
L20:
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int irmo_string_nocase_compare(void *string1, void *string2) {
  char *p1;
  char *p2;
  int c1, c2;
  p1 = (char *)string1;
  p2 = (char *)string2;
  for (;;) {
    c1 = tolower(*p1);
    c2 = tolower(*p2);
    if (c1 != c2) {
      if (c1 < c2) {
        return -1;
      } else {
        return 1;
      }
    }
    if (c1 == '\0')
      break;
    ++p1;
    ++p2;
  }
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<kings_hall>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  mov    %rdx,-0x18(%rbp)
  cmpl   $0xb0,-0xc(%rbp)
  je     L15
  mov    $0x0,%eax
  jmp    L18
L15:
  mov    -0x18(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    $0xb0,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <do_action@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  call   <send_to_char@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <send_to_char@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    %rax,%rdx
  mov    $0x1,%esi
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  call   <act@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <char_from_room@plt>
  mov    $0x58c,%edi
  call   <real_room@plt>
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <char_to_room@plt>
  mov    -0x8(%rbp),%rax
  mov    $0xf,%edx
  lea    D17(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <do_look@plt>
  mov    $0x1,%eax
L18:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D29
type_guessed: string
name: read_data
arguments: data_label: D10
type_guessed: string
name: read_data
arguments: data_label: D31
type_guessed: string
name: read_data
arguments: data_label: D17
type_guessed: string

tool: D29: You feel as if some mighty force has been offended.


tool: D10: You are torn out of reality!
You roll and tumble through endless voids for what seems like eternity...

After a time, a new reality comes into focus... you are elsewhere.


tool: D31: $n is struck by an intense beam of light and vanishes.

tool: 

assistant: ```c
int kings_hall(struct char_data *ch, int cmd, char *arg) {
  if (cmd != 176)
    return (0);
  do_action(ch, arg, 176);
  send_to_char("You feel as if some mighty force has been offended.\n\r", ch);
  send_to_char("You are torn out of reality!\n\rYou roll and tumble through endless voids for what seems like eternity...\n\r\n\rAfter a time, a new reality comes into focus... you are elsewhere.\n\r", ch);
  act("$n is struck by an intense beam of light and vanishes.", 1, ch, 0, 0, 0);
  char_from_room(ch);
  char_to_room(ch, real_room(1420));
  do_look(ch, "", 15);
  return (1);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<kings_hall>:
  endbr64
  mov    $0x0,%eax
  cmp    $0xb0,%esi
  je     L0
  ret
L0:
  push   %rbx
  mov    %rdi,%rbx
  mov    %rdx,%rsi
  mov    $0xb0,%edx
  call   <do_action@plt>
  mov    %rbx,%rsi
  lea    D11(%rip),%rdi
  call   <send_to_char@plt>
  mov    %rbx,%rsi
  lea    D29(%rip),%rdi
  call   <send_to_char@plt>
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    %rbx,%rdx
  mov    $0x1,%esi
  lea    D15(%rip),%rdi
  call   <act@plt>
  mov    %rbx,%rdi
  call   <char_from_room@plt>
  mov    $0x58c,%edi
  call   <real_room@plt>
  mov    %eax,%esi
  mov    %rbx,%rdi
  call   <char_to_room@plt>
  mov    $0xf,%edx
  lea    D35(%rip),%rsi
  mov    %rbx,%rdi
  call   <do_look@plt>
  mov    $0x1,%eax
  pop    %rbx
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D11
type: string
name: retrieve_data
arguments: data_tag: D29
type: string
name: retrieve_data
arguments: data_tag: D15
type: string
name: retrieve_data
arguments: data_tag: D35
type: string

tool: D11: You feel as if some mighty force has been offended.


tool: D29: You are torn out of reality!
You roll and tumble through endless voids for what seems like eternity...

After a time, a new reality comes into focus... you are elsewhere.


tool: D15: $n is struck by an intense beam of light and vanishes.

tool: 

assistant: ```c
int kings_hall(struct char_data *ch, int cmd, char *arg) {
  if (cmd != 176)
    return (0);
  do_action(ch, arg, 176);
  send_to_char("You feel as if some mighty force has been offended.\n\r", ch);
  send_to_char("You are torn out of reality!\n\rYou roll and tumble through endless voids for what seems like eternity...\n\r\n\rAfter a time, a new reality comes into focus... you are elsewhere.\n\r", ch);
  act("$n is struck by an intense beam of light and vanishes.", 1, ch, 0, 0, 0);
  char_from_room(ch);
  char_to_room(ch, real_room(1420));
  do_look(ch, "", 15);
  return (1);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<kings_hall>:
  endbr64
  cmp    $0xb0,%esi
  je     L4
  xor    %eax,%eax
  ret
  nop
L4:
  push   %rbp
  mov    %rdx,%rsi
  mov    %rdi,%rbp
  mov    $0xb0,%edx
  call   <do_action@plt>
  mov    %rbp,%rsi
  lea    D31(%rip),%rdi
  call   <send_to_char@plt>
  mov    %rbp,%rsi
  lea    D26(%rip),%rdi
  call   <send_to_char@plt>
  mov    %rbp,%rdx
  xor    %r9d,%r9d
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0x1,%esi
  lea    D21(%rip),%rdi
  call   <act@plt>
  mov    %rbp,%rdi
  call   <char_from_room@plt>
  mov    $0x58c,%edi
  call   <real_room@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  call   <char_to_room@plt>
  mov    %rbp,%rdi
  mov    $0xf,%edx
  lea    D32(%rip),%rsi
  call   <do_look@plt>
  mov    $0x1,%eax
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D31
type: string
name: unpack_data
arguments: data_tag: D26
type: string
name: unpack_data
arguments: data_tag: D21
type: string
name: unpack_data
arguments: data_tag: D32
type: string

tool: D31: You feel as if some mighty force has been offended.


tool: D26: You are torn out of reality!
You roll and tumble through endless voids for what seems like eternity...

After a time, a new reality comes into focus... you are elsewhere.


tool: D21: $n is struck by an intense beam of light and vanishes.

tool: 

assistant: ```c
int kings_hall(struct char_data *ch, int cmd, char *arg) {
  if (cmd != 176)
    return (0);
  do_action(ch, arg, 176);
  send_to_char("You feel as if some mighty force has been offended.\n\r", ch);
  send_to_char("You are torn out of reality!\n\rYou roll and tumble through endless voids for what seems like eternity...\n\r\n\rAfter a time, a new reality comes into focus... you are elsewhere.\n\r", ch);
  act("$n is struck by an intense beam of light and vanishes.", 1, ch, 0, 0, 0);
  char_from_room(ch);
  char_to_room(ch, real_room(1420));
  do_look(ch, "", 15);
  return (1);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<kings_hall>:
  endbr64
  cmp    $0xb0,%esi
  je     L0
  xor    %eax,%eax
  ret
  nop
L0:
  push   %rbp
  mov    %rdx,%rsi
  mov    %rdi,%rbp
  mov    $0xb0,%edx
  call   <do_action@plt>
  mov    %rbp,%rsi
  lea    D26(%rip),%rdi
  call   <send_to_char@plt>
  mov    %rbp,%rsi
  lea    D27(%rip),%rdi
  call   <send_to_char@plt>
  mov    %rbp,%rdx
  xor    %r9d,%r9d
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0x1,%esi
  lea    D28(%rip),%rdi
  call   <act@plt>
  mov    %rbp,%rdi
  call   <char_from_room@plt>
  mov    $0x58c,%edi
  call   <real_room@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  call   <char_to_room@plt>
  mov    %rbp,%rdi
  mov    $0xf,%edx
  lea    D16(%rip),%rsi
  call   <do_look@plt>
  mov    $0x1,%eax
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D26
data_type: string
name: extract_symbolic_data
arguments: data_tag: D27
data_type: string
name: extract_symbolic_data
arguments: data_tag: D28
data_type: string
name: extract_symbolic_data
arguments: data_tag: D16
data_type: string

tool: D26: You feel as if some mighty force has been offended.


tool: D27: You are torn out of reality!
You roll and tumble through endless voids for what seems like eternity...

After a time, a new reality comes into focus... you are elsewhere.


tool: D28: $n is struck by an intense beam of light and vanishes.

tool: 

assistant: ```c
int kings_hall(struct char_data *ch, int cmd, char *arg) {
  if (cmd != 176)
    return (0);
  do_action(ch, arg, 176);
  send_to_char("You feel as if some mighty force has been offended.\n\r", ch);
  send_to_char("You are torn out of reality!\n\rYou roll and tumble through endless voids for what seems like eternity...\n\r\n\rAfter a time, a new reality comes into focus... you are elsewhere.\n\r", ch);
  act("$n is struck by an intense beam of light and vanishes.", 1, ch, 0, 0, 0);
  char_from_room(ch);
  char_to_room(ch, real_room(1420));
  do_look(ch, "", 15);
  return (1);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<do_calcs>:
  endbr64
  sub    $0x8,%rsp
  mov    $0xa,%eax
  movss  D3(%rip),%xmm0
  movss  D41(%rip),%xmm3
  movss  D61(%rip),%xmm2
  movss  D64(%rip),%xmm1
L20:
  addss  %xmm3,%xmm0
  mulss  %xmm2,%xmm0
  divss  %xmm1,%xmm0
  mulss  %xmm1,%xmm0
  divss  %xmm2,%xmm0
  subss  %xmm3,%xmm0
  sub    $0x1,%eax
  jne    L20
  subss  D3(%rip),%xmm0
  call   <fabs@plt>
  comisd D11(%rip),%xmm0
  ja     L38
L10:
  pxor   %xmm0,%xmm0
  call   <fabs@plt>
  comisd D11(%rip),%xmm0
  ja     L2
L45:
  add    $0x8,%rsp
  ret
L38:
  mov    $0x1,%esi
  mov    $0x8,%edi
  call   <err@plt>
  jmp    L10
L2:
  mov    $0x2,%esi
  mov    $0x8,%edi
  call   <err@plt>
  jmp    L45
```

tool_calls: name: read_data
arguments: tag: D3
datatype: byte[4]
name: read_data
arguments: tag: D41
datatype: f32
name: read_data
arguments: tag: D61
datatype: f32
name: read_data
arguments: tag: D64
datatype: f32
name: read_data
arguments: tag: D11
datatype: f64

tool: {"D3": [0x48,0xe1,0x1a,0x40]}

tool: D41: 3.3

tool: D61: 4.4

tool: D64: 5.5

tool: D11: 0.0001

assistant: ```c
void do_calcs(void) {
  float a, b, c, d, e;
  float foo, bar;
  int i;
  a = 1.1;
  b = 2.2;
  c = 3.3;
  d = 4.4;
  e = 5.5;
  foo = a * b;
  bar = c * d;
  i = 0;
  while (i < 10) {
    foo += c;
    foo *= d;
    foo /= e;
    bar -= a;
    bar *= b;
    bar /= e;
    foo *= e;
    foo /= d;
    foo -= c;
    bar *= e;
    bar /= b;
    bar += a;
    i++;
  }
  if (fabs(foo - (a * b)) > 0.0001)
    err(8, 1);
  if (fabs(bar - (c * d)) > 0.0001)
    err(8, 2);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<do_calcs>:
  endbr64
  sub    $0x8,%rsp
  movss  D29(%rip),%xmm4
  movss  D28(%rip),%xmm3
  mov    $0xa,%eax
  movss  D47(%rip),%xmm2
  movss  D39(%rip),%xmm1
  movaps %xmm4,%xmm0
L20:
  addss  %xmm3,%xmm0
  mulss  %xmm2,%xmm0
  divss  %xmm1,%xmm0
  mulss  %xmm1,%xmm0
  divss  %xmm2,%xmm0
  subss  %xmm3,%xmm0
  sub    $0x1,%eax
  jne    L20
  subss  %xmm4,%xmm0
  call   <fabs@plt>
  comisd D32(%rip),%xmm0
  ja     L28
L4:
  pxor   %xmm0,%xmm0
  call   <fabs@plt>
  comisd D32(%rip),%xmm0
  ja     L31
  add    $0x8,%rsp
  ret
  nopl   0x0(%rax,%rax,1)
L28:
  mov    $0x1,%esi
  mov    $0x8,%edi
  call   <err@plt>
  jmp    L4
  nopl   0x0(%rax)
L31:
  mov    $0x2,%esi
  mov    $0x8,%edi
  add    $0x8,%rsp
  jmp    1070 <err@plt>
```

tool_calls: name: read_data
arguments: data_tag: D29
type_guessed: byte[4]
name: read_data
arguments: data_tag: D28
type_guessed: f32
name: read_data
arguments: data_tag: D47
type_guessed: f32
name: read_data
arguments: data_tag: D39
type_guessed: f32
name: read_data
arguments: data_tag: D32
type_guessed: f64

tool: {"D29": [0x48,0xe1,0x1a,0x40]}

tool: D28: 3.3

tool: D47: 4.4

tool: D39: 5.5

tool: D32: 0.0001

assistant: ```c
void do_calcs(void) {
  float a, b, c, d, e;
  float foo, bar;
  int i;
  a = 1.1;
  b = 2.2;
  c = 3.3;
  d = 4.4;
  e = 5.5;
  foo = a * b;
  bar = c * d;
  i = 0;
  while (i < 10) {
    foo += c;
    foo *= d;
    foo /= e;
    bar -= a;
    bar *= b;
    bar /= e;
    foo *= e;
    foo /= d;
    foo -= c;
    bar *= e;
    bar /= b;
    bar += a;
    i++;
  }
  if (fabs(foo - (a * b)) > 0.0001)
    err(8, 1);
  if (fabs(bar - (c * d)) > 0.0001)
    err(8, 2);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<do_calcs>:
  endbr64
  sub    $0x8,%rsp
  movss  D27(%rip),%xmm0
  call   <fabs@plt>
  comisd D1(%rip),%xmm0
  ja     L27
L4:
  pxor   %xmm0,%xmm0
  call   <fabs@plt>
  comisd D1(%rip),%xmm0
  ja     L2
  add    $0x8,%rsp
  ret
  nopw   0x0(%rax,%rax,1)
L27:
  mov    $0x1,%esi
  mov    $0x8,%edi
  call   <err@plt>
  jmp    L4
  nopl   0x0(%rax)
L2:
  mov    $0x2,%esi
  mov    $0x8,%edi
  add    $0x8,%rsp
  jmp    1070 <err@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D27
datatype: byte[4]
name: retrieve_data
arguments: tag: D1
datatype: f64

tool: {"D27": [0x00,0x00,0x80,0x34]}

tool: D1: 0.0001

assistant: ```c
void do_calcs(void) {
  float a, b, c, d, e;
  float foo, bar;
  int i;
  a = 1.1;
  b = 2.2;
  c = 3.3;
  d = 4.4;
  e = 5.5;
  foo = a * b;
  bar = c * d;
  i = 0;
  while (i < 10) {
    foo += c;
    foo *= d;
    foo /= e;
    bar -= a;
    bar *= b;
    bar /= e;
    foo *= e;
    foo /= d;
    foo -= c;
    bar *= e;
    bar /= b;
    bar += a;
    i++;
  }
  if (fabs(foo - (a * b)) > 0.0001)
    err(8, 1);
  if (fabs(bar - (c * d)) > 0.0001)
    err(8, 2);
}
```
user: What is the c source code of the assembly code below:

```asm
<curses_setup>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    D40(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x30(%rbp)
  mov    D153(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x2c(%rbp)
  mov    D107(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x28(%rbp)
  mov    D74(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x24(%rbp)
  mov    D53(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x20(%rbp)
  mov    D13(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    D83(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x18(%rbp)
  mov    D147(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
  mov    $0x0,%eax
  call   <initscr@plt>
  mov    $0x0,%eax
  call   <noecho@plt>
  mov    D47(%rip),%rax
  mov    (%rax),%edx
  mov    D75(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <intrflush@plt>
  mov    D111(%rip),%rax
  mov    (%rax),%edx
  mov    D75(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <nodelay@plt>
  mov    $0x0,%eax
  call   <nonl@plt>
  mov    D111(%rip),%rax
  mov    (%rax),%edx
  mov    D75(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <keypad@plt>
  mov    $0x0,%eax
  call   <start_color@plt>
  mov    $0x0,%eax
  call   <raw@plt>
  mov    D47(%rip),%rax
  mov    (%rax),%edx
  mov    D75(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <scrollok@plt>
  movl   $0x0,-0x34(%rbp)
  jmp    L10
L5:
  mov    -0x34(%rbp),%eax
  sar    $0x3,%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%edx
  mov    -0x34(%rbp),%eax
  and    $0x7,%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%ecx
  mov    -0x34(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <init_pair@plt>
  addl   $0x1,-0x34(%rbp)
L10:
  cmpl   $0x3f,-0x34(%rbp)
  jle    L5
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L24
  call   <__stack_chk_fail@plt>
L24:
  leave
  ret
```

assistant: ```c
void curses_setup(void) {
  int i, colour_default[8] = {
             COLOR_BLACK, COLOR_BLUE, COLOR_GREEN, COLOR_CYAN, COLOR_RED, COLOR_MAGENTA, COLOR_YELLOW, COLOR_WHITE,
         };
  initscr();
  noecho();
  intrflush(stdscr, FALSE);
  nodelay(stdscr, TRUE);
  nonl();
  keypad(stdscr, TRUE);
  start_color();
  raw();
  scrollok(stdscr, FALSE);
  for (i = 0; i < 64; i++)
    init_pair(i, colour_default[i & 7], colour_default[i >> 3]);
}
```
user: Translate the below assembly code into C programming language:

```asm
<curses_setup>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    D8(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,(%rsp)
  mov    D42(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x4(%rsp)
  mov    D29(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x8(%rsp)
  mov    D84(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0xc(%rsp)
  mov    D98(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x10(%rsp)
  mov    D85(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x14(%rsp)
  mov    D101(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x18(%rsp)
  mov    D1(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x1c(%rsp)
  mov    $0x0,%eax
  call   <initscr@plt>
  mov    $0x0,%eax
  call   <noecho@plt>
  mov    D41(%rip),%rbp
  mov    D96(%rip),%rbx
  mov    0x0(%rbp),%esi
  mov    (%rbx),%edi
  call   <intrflush@plt>
  mov    D89(%rip),%r12
  mov    (%r12),%esi
  mov    (%rbx),%edi
  call   <nodelay@plt>
  mov    $0x0,%eax
  call   <nonl@plt>
  mov    (%r12),%esi
  mov    (%rbx),%edi
  call   <keypad@plt>
  mov    $0x0,%eax
  call   <start_color@plt>
  mov    $0x0,%eax
  call   <raw@plt>
  mov    0x0(%rbp),%esi
  mov    (%rbx),%edi
  call   <scrollok@plt>
  mov    $0x0,%ebx
L5:
  mov    %ebx,%eax
  sar    $0x3,%eax
  cltq
  mov    (%rsp,%rax,4),%edx
  mov    %ebx,%eax
  and    $0x7,%eax
  mov    (%rsp,%rax,4),%esi
  mov    %ebx,%edi
  call   <init_pair@plt>
  add    $0x1,%ebx
  cmp    $0x40,%ebx
  jne    L5
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L15:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void curses_setup(void) {
  int i, colour_default[8] = {
             COLOR_BLACK, COLOR_BLUE, COLOR_GREEN, COLOR_CYAN, COLOR_RED, COLOR_MAGENTA, COLOR_YELLOW, COLOR_WHITE,
         };
  initscr();
  noecho();
  intrflush(stdscr, FALSE);
  nodelay(stdscr, TRUE);
  nonl();
  keypad(stdscr, TRUE);
  start_color();
  raw();
  scrollok(stdscr, FALSE);
  for (i = 0; i < 64; i++)
    init_pair(i, colour_default[i & 7], colour_default[i >> 3]);
}
```