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

```asm
<replace_digits>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  movl   $0x0,-0xc(%rbp)
  movq   $0x0,-0x8(%rbp)
  jmp    L4
L2:
  mov    -0xc(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x31,%al
  jne    L13
  mov    -0x24(%rbp),%eax
  add    %eax,-0xc(%rbp)
  jmp    L30
L13:
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %eax,-0xc(%rbp)
L30:
  addq   $0x1,-0x8(%rbp)
L4:
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L2
  mov    -0xc(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int replace_digits(const char *digits, const char *mask, int replacement) {
  int result = 0;
  for (size_t i = 0; digits[i] != '\0'; i++) {
    result *= 10;
    if (mask[i] == '1')
      result += replacement;
    else
      result += digits[i] - '0';
  }
  return result;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<replace_digits>:
  endbr64
  movzbl (%rdi),%eax
  test   %al,%al
  je     L12
  mov    $0x0,%r8d
  mov    $0x0,%r9d
  jmp    L20
L6:
  add    $0x1,%r8
  movzbl (%rdi,%r8,1),%eax
  test   %al,%al
  je     L2
L20:
  lea    (%r9,%r9,4),%ecx
  add    %ecx,%ecx
  movsbl %al,%eax
  lea    -0x30(%rcx,%rax,1),%r9d
  cmpb   $0x31,(%rsi,%r8,1)
  jne    L6
  lea    (%rcx,%rdx,1),%r9d
  jmp    L6
L12:
  mov    $0x0,%r9d
L2:
  mov    %r9d,%eax
  ret
```

assistant: ```c
int replace_digits(const char *digits, const char *mask, int replacement) {
  int result = 0;
  for (size_t i = 0; digits[i] != '\0'; i++) {
    result *= 10;
    if (mask[i] == '1')
      result += replacement;
    else
      result += digits[i] - '0';
  }
  return result;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<replace_digits>:
  endbr64
  movsbl (%rdi),%eax
  test   %al,%al
  je     L28
  xor    %r8d,%r8d
  xor    %r9d,%r9d
  nopl   0x0(%rax)
L25:
  lea    (%r9,%r9,4),%ecx
  add    %ecx,%ecx
  cmpb   $0x31,(%rsi,%r8,1)
  lea    -0x30(%rcx,%rax,1),%r9d
  jne    L6
  lea    (%rcx,%rdx,1),%r9d
L6:
  add    $0x1,%r8
  movsbl (%rdi,%r8,1),%eax
  test   %al,%al
  jne    L25
  mov    %r9d,%eax
  ret
  nop
L28:
  xor    %r9d,%r9d
  mov    %r9d,%eax
  ret
```

assistant: ```c
int replace_digits(const char *digits, const char *mask, int replacement) {
  int result = 0;
  for (size_t i = 0; digits[i] != '\0'; i++) {
    result *= 10;
    if (mask[i] == '1')
      result += replacement;
    else
      result += digits[i] - '0';
  }
  return result;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<replace_digits>:
  endbr64
  movsbl (%rdi),%eax
  test   %al,%al
  je     L10
  xor    %r8d,%r8d
  xor    %r9d,%r9d
  nopl   0x0(%rax)
L23:
  lea    (%r9,%r9,4),%ecx
  add    %ecx,%ecx
  cmpb   $0x31,(%rsi,%r8,1)
  lea    -0x30(%rcx,%rax,1),%r9d
  jne    L13
  lea    (%rdx,%rcx,1),%r9d
L13:
  add    $0x1,%r8
  movsbl (%rdi,%r8,1),%eax
  test   %al,%al
  jne    L23
  mov    %r9d,%eax
  ret
  nop
L10:
  xor    %r9d,%r9d
  mov    %r9d,%eax
  ret
```

assistant: ```c
int replace_digits(const char *digits, const char *mask, int replacement) {
  int result = 0;
  for (size_t i = 0; digits[i] != '\0'; i++) {
    result *= 10;
    if (mask[i] == '1')
      result += replacement;
    else
      result += digits[i] - '0';
  }
  return result;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<print_timing>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rsi,%rbx
  mov    %edx,%ebp
  test   %ecx,%ecx
  jne    L11
  lea    D36(%rip),%rdi
  call   <puts@plt>
  lea    D14(%rip),%rdi
  call   <puts@plt>
  movsd  0x20(%rbx),%xmm4
  movsd  0x18(%rbx),%xmm3
  movsd  0x10(%rbx),%xmm2
  movsd  0x8(%rbx),%xmm1
  movsd  (%rbx),%xmm0
  lea    D31(%rip),%rdi
  mov    $0x5,%eax
  call   <printf@plt>
  mov    %ebp,%edi
  call   <ops_solve@plt>
  divsd  0x18(%rbx),%xmm0
  divsd  D15(%rip),%xmm0
  lea    D7(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
L14:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L11:
  mov    %rdi,%r15
  movq   %xmm0,%r12
  mov    0x10(%rsi),%r14
  mov    0x18(%rsi),%r13
  mov    %edx,%edi
  call   <ops_matvec@plt>
  divsd  0x10(%rbx),%xmm0
  movsd  %xmm0,0x8(%rsp)
  mov    %ebp,%edi
  call   <ops_solve@plt>
  divsd  0x18(%rbx),%xmm0
  movq   %r12,%xmm4
  movq   %r14,%xmm3
  movq   %r13,%xmm2
  movsd  0x8(%rsp),%xmm1
  mov    %ebp,%edx
  mov    %r15,%rsi
  lea    D30(%rip),%rdi
  mov    $0x5,%eax
  call   <printf@plt>
  jmp    L14
```

tool_calls: name: parse_data
arguments: label: D36
type: string
name: parse_data
arguments: label: D14
type: string
name: parse_data
arguments: label: D31
type: string
name: parse_data
arguments: label: D15
type: f64
name: parse_data
arguments: label: D7
type: string
name: parse_data
arguments: label: D30
type: string

tool: D36: 
real time information:

tool: D14: memory alloc	 matrix init	 A*x		 solving	 total

tool: D31: %f	 %f	 %f	 %f	 %f


tool: D15: 1000000

tool: D7: 
mflops: %f



tool: D30: %s, %i, %.3e, %.3e, %.4e, %.4e, %.3e


assistant: ```c
void print_timing(char *prog, double t[5], int n, double norm, int csvout) {
  if (!csvout) {
    printf("\nreal time information:\n");
    printf("memory alloc\t matrix init\t A*x\t\t solving\t total\n");
    printf("%f\t %f\t %f\t %f\t %f\n", t[0], t[1], t[2], t[3], t[4]);
    printf("\nmflops: %f\n\n", ops_solve(n) / t[3] / 1e6);
    printf("\n");
  } else {
    printf("%s, %i, %.3e, %.3e, %.4e, %.4e, %.3e\n", prog, n, ops_solve(n) / t[3], ops_matvec(n) / t[2], t[3], t[2], norm);
  }
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<print_timing>:
  endbr64
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x20,%rsp
  test   %ecx,%ecx
  jne    L6
  lea    D25(%rip),%rdi
  call   <puts@plt>
  lea    D3(%rip),%rdi
  call   <puts@plt>
  movsd  0x20(%rbx),%xmm4
  movsd  0x18(%rbx),%xmm3
  lea    D44(%rip),%rdi
  movsd  0x10(%rbx),%xmm2
  movsd  0x8(%rbx),%xmm1
  mov    $0x5,%eax
  movsd  (%rbx),%xmm0
  call   <printf@plt>
  mov    %r12d,%edi
  call   <ops_solve@plt>
  mov    $0x1,%eax
  divsd  0x18(%rbx),%xmm0
  lea    D0(%rip),%rdi
  divsd  D35(%rip),%xmm0
  call   <printf@plt>
  add    $0x20,%rsp
  mov    $0xa,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  jmp    1090 <putchar@plt>
  nop
L6:
  movsd  0x10(%rsi),%xmm3
  movsd  0x18(%rsi),%xmm2
  mov    %rdi,%rbp
  mov    %edx,%edi
  movsd  %xmm0,0x18(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  call   <ops_matvec@plt>
  mov    %r12d,%edi
  movapd %xmm0,%xmm1
  divsd  0x10(%rbx),%xmm1
  movsd  %xmm1,(%rsp)
  call   <ops_solve@plt>
  movsd  0x18(%rsp),%xmm4
  divsd  0x18(%rbx),%xmm0
  movsd  0x10(%rsp),%xmm3
  movsd  (%rsp),%xmm1
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    $0x5,%eax
  movsd  0x8(%rsp),%xmm2
  add    $0x20,%rsp
  lea    D34(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  jmp    10b0 <printf@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D25
data_type: string
name: retrieve_data
arguments: tag: D3
data_type: string
name: retrieve_data
arguments: tag: D44
data_type: string
name: retrieve_data
arguments: tag: D0
data_type: string
name: retrieve_data
arguments: tag: D35
data_type: f64
name: retrieve_data
arguments: tag: D34
data_type: string

tool: D25: 
real time information:

tool: D3: memory alloc	 matrix init	 A*x		 solving	 total

tool: D44: %f	 %f	 %f	 %f	 %f


tool: D0: 
mflops: %f



tool: D35: 1000000

tool: D34: %s, %i, %.3e, %.3e, %.4e, %.4e, %.3e


assistant: ```c
void print_timing(char *prog, double t[5], int n, double norm, int csvout) {
  if (!csvout) {
    printf("\nreal time information:\n");
    printf("memory alloc\t matrix init\t A*x\t\t solving\t total\n");
    printf("%f\t %f\t %f\t %f\t %f\n", t[0], t[1], t[2], t[3], t[4]);
    printf("\nmflops: %f\n\n", ops_solve(n) / t[3] / 1e6);
    printf("\n");
  } else {
    printf("%s, %i, %.3e, %.3e, %.4e, %.4e, %.3e\n", prog, n, ops_solve(n) / t[3], ops_matvec(n) / t[2], t[3], t[2], norm);
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<print_timing>:
  endbr64
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x20,%rsp
  test   %ecx,%ecx
  jne    L1
  lea    D45(%rip),%rdi
  call   <puts@plt>
  lea    D41(%rip),%rdi
  call   <puts@plt>
  movsd  0x20(%rbx),%xmm4
  movsd  0x18(%rbx),%xmm3
  lea    D43(%rip),%rdi
  movsd  0x10(%rbx),%xmm2
  movsd  0x8(%rbx),%xmm1
  mov    $0x5,%eax
  movsd  (%rbx),%xmm0
  call   <printf@plt>
  mov    %r12d,%edi
  call   <ops_solve@plt>
  mov    $0x1,%eax
  divsd  0x18(%rbx),%xmm0
  lea    D35(%rip),%rdi
  divsd  D15(%rip),%xmm0
  call   <printf@plt>
  add    $0x20,%rsp
  mov    $0xa,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  jmp    1090 <putchar@plt>
  nop
L1:
  movsd  0x10(%rsi),%xmm3
  movsd  0x18(%rsi),%xmm2
  mov    %rdi,%rbp
  mov    %edx,%edi
  movsd  %xmm0,0x18(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  call   <ops_matvec@plt>
  mov    %r12d,%edi
  movapd %xmm0,%xmm1
  divsd  0x10(%rbx),%xmm1
  movsd  %xmm1,(%rsp)
  call   <ops_solve@plt>
  movsd  0x18(%rsp),%xmm4
  divsd  0x18(%rbx),%xmm0
  movsd  0x10(%rsp),%xmm3
  movsd  (%rsp),%xmm1
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    $0x5,%eax
  movsd  0x8(%rsp),%xmm2
  add    $0x20,%rsp
  lea    D5(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  jmp    10b0 <printf@plt>
```

tool_calls: name: disassemble_data
arguments: label: D45
type_infered: string
name: disassemble_data
arguments: label: D41
type_infered: string
name: disassemble_data
arguments: label: D43
type_infered: string
name: disassemble_data
arguments: label: D35
type_infered: string
name: disassemble_data
arguments: label: D15
type_infered: f64
name: disassemble_data
arguments: label: D5
type_infered: string

tool: D45: 
real time information:

tool: D41: memory alloc	 matrix init	 A*x		 solving	 total

tool: D43: %f	 %f	 %f	 %f	 %f


tool: D35: 
mflops: %f



tool: D15: 1000000

tool: D5: %s, %i, %.3e, %.3e, %.4e, %.4e, %.3e


assistant: ```c
void print_timing(char *prog, double t[5], int n, double norm, int csvout) {
  if (!csvout) {
    printf("\nreal time information:\n");
    printf("memory alloc\t matrix init\t A*x\t\t solving\t total\n");
    printf("%f\t %f\t %f\t %f\t %f\n", t[0], t[1], t[2], t[3], t[4]);
    printf("\nmflops: %f\n\n", ops_solve(n) / t[3] / 1e6);
    printf("\n");
  } else {
    printf("%s, %i, %.3e, %.3e, %.4e, %.4e, %.3e\n", prog, n, ops_solve(n) / t[3], ops_matvec(n) / t[2], t[3], t[2], norm);
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<qiksort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x8(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <qikcore@plt>
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
int *qiksort(int *a, size_t n) {
  qikcore(a, 0, n - 1);
  return a;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<qiksort>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  lea    -0x1(%rsi),%rdx
  mov    $0x0,%esi
  call   <qikcore@plt>
  mov    %rbx,%rax
  pop    %rbx
  ret
```

assistant: ```c
int *qiksort(int *a, size_t n) {
  qikcore(a, 0, n - 1);
  return a;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<qiksort>:
  endbr64
  push   %r12
  lea    -0x1(%rsi),%rdx
  mov    %rdi,%r12
  xor    %esi,%esi
  call   <qikcore@plt>
  mov    %r12,%rax
  pop    %r12
  ret
```

assistant: ```c
int *qiksort(int *a, size_t n) {
  qikcore(a, 0, n - 1);
  return a;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<qiksort>:
  endbr64
  push   %r12
  lea    -0x1(%rsi),%rdx
  mov    %rdi,%r12
  xor    %esi,%esi
  call   <qikcore@plt>
  mov    %r12,%rax
  pop    %r12
  ret
```

assistant: ```c
int *qiksort(int *a, size_t n) {
  qikcore(a, 0, n - 1);
  return a;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<irc_topic>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x220,%rsp
  mov    %rdi,-0x218(%rbp)
  mov    %rsi,-0x220(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x220(%rbp),%rcx
  mov    -0x218(%rbp),%rdx
  lea    -0x210(%rbp),%rax
  mov    %rcx,%r9
  mov    %rdx,%r8
  lea    D19(%rip),%rdx
  mov    %rdx,%rcx
  lea    D8(%rip),%rdx
  mov    $0x1fd,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  lea    -0x210(%rbp),%rax
  mov    %rax,%rdi
  call   <net_send@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L1
  call   <__stack_chk_fail@plt>
L1:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D19
datatype: string
name: retrieve_data
arguments: data_tag: D8
datatype: string

tool: D19: TOPIC

tool: D8: %s %s :%s

assistant: ```c
void irc_topic(char *channel, char *topic) {
  char msg[(512 - 3)];
  snprintf(msg, (512 - 3), "%s %s :%s", "TOPIC", channel, topic);
  net_send(msg);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<irc_topic>:
  endbr64
  push   %rbx
  sub    $0x210,%rsp
  mov    %rdi,%r8
  mov    %rsi,%r9
  mov    %fs:0x28,%rax
  mov    %rax,0x208(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  lea    D18(%rip),%rcx
  lea    D1(%rip),%rdx
  mov    $0x1fd,%esi
  mov    %rbx,%rdi
  call   <snprintf@plt>
  mov    %rbx,%rdi
  call   <net_send@plt>
  mov    0x208(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L5
  add    $0x210,%rsp
  pop    %rbx
  ret
L5:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D18
data_type: string
name: read_data
arguments: data_label: D1
data_type: string

tool: D18: TOPIC

tool: D1: %s %s :%s

assistant: ```c
void irc_topic(char *channel, char *topic) {
  char msg[(512 - 3)];
  snprintf(msg, (512 - 3), "%s %s :%s", "TOPIC", channel, topic);
  net_send(msg);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<irc_topic>:
  endbr64
  push   %rbp
  mov    %rdi,%r8
  mov    %rsi,%r9
  lea    D15(%rip),%rcx
  lea    D7(%rip),%rdx
  mov    $0x1fd,%esi
  sub    $0x210,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x208(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    %rbp,%rdi
  call   <snprintf@plt>
  mov    %rbp,%rdi
  call   <net_send@plt>
  mov    0x208(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x210,%rsp
  pop    %rbp
  ret
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D15
type: string
name: extract_symbolic_data
arguments: data_label: D7
type: string

tool: D15: TOPIC

tool: D7: %s %s :%s

assistant: ```c
void irc_topic(char *channel, char *topic) {
  char msg[(512 - 3)];
  snprintf(msg, (512 - 3), "%s %s :%s", "TOPIC", channel, topic);
  net_send(msg);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<irc_topic>:
  endbr64
  push   %rbp
  mov    %rdi,%r8
  mov    %rsi,%r9
  lea    D9(%rip),%rcx
  lea    D3(%rip),%rdx
  mov    $0x1fd,%esi
  sub    $0x210,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x208(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    %rbp,%rdi
  call   <snprintf@plt>
  mov    %rbp,%rdi
  call   <net_send@plt>
  mov    0x208(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x210,%rsp
  pop    %rbp
  ret
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D9
data_type: string
name: retrieve_data
arguments: label: D3
data_type: string

tool: D9: TOPIC

tool: D3: %s %s :%s

assistant: ```c
void irc_topic(char *channel, char *topic) {
  char msg[(512 - 3)];
  snprintf(msg, (512 - 3), "%s %s :%s", "TOPIC", channel, topic);
  net_send(msg);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<operation_help>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <show_help@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  nop
  pop    %rbp
  ret
```

assistant: ```c
void operation_help(void) {
  show_help();
  exit(0);
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<operation_help>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <show_help@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void operation_help(void) {
  show_help();
  exit(0);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<operation_help>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <show_help@plt>
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    1070 <exit@plt>
```

assistant: ```c
void operation_help(void) {
  show_help();
  exit(0);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<operation_help>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <show_help@plt>
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    1070 <exit@plt>
```

assistant: ```c
void operation_help(void) {
  show_help();
  exit(0);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<RunEncryptionKeySchedule>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rsi,%r13
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    (%rdi),%rax
  mov    %rax,(%rsi)
  mov    0x8(%rdi),%rax
  mov    %rax,0x8(%rsi)
  mov    0x10(%rdi),%rax
  mov    %rax,0x10(%rsi)
  mov    0x18(%rdi),%rax
  mov    %rax,0x18(%rsi)
  mov    0x20(%rdi),%rax
  mov    %rax,0x20(%rsi)
  mov    0x28(%rdi),%rax
  mov    %rax,0x28(%rsi)
  mov    0x30(%rdi),%rax
  mov    %rax,(%rsp)
  mov    0x38(%rdi),%rax
  mov    %rax,0x8(%rsp)
  mov    %rsi,%rbx
  mov    $0x1,%ebp
  mov    %rsp,%r12
L6:
  mov    (%rsp),%rax
  mov    %rax,0x30(%rbx)
  mov    %rbp,%rax
  add    0x8(%rsp),%rax
  mov    %rax,0x38(%rbx)
  mov    (%rbx),%rax
  mov    %rax,(%rsp)
  mov    0x8(%rbx),%rax
  mov    %rax,0x8(%rsp)
  lea    0x8(%rsp),%rsi
  mov    %r12,%rdi
  call   <speckey@plt>
  mov    (%rsp),%rdx
  mov    %rdx,0x40(%rbx)
  mov    0x8(%rsp),%rax
  mov    %rax,0x48(%rbx)
  add    0x10(%rbx),%rdx
  mov    %rdx,0x50(%rbx)
  add    0x18(%rbx),%rax
  mov    %rax,0x58(%rbx)
  mov    0x20(%rbx),%rdx
  mov    %rdx,(%rsp)
  mov    0x28(%rbx),%rax
  mov    %rax,0x8(%rsp)
  add    $0x1,%rbp
  add    $0x30,%rbx
  cmp    $0x10,%rbp
  jne    L6
  mov    %rdx,0x300(%r13)
  add    $0x10,%rax
  mov    %rax,0x308(%r13)
  mov    0x2d0(%r13),%rax
  mov    %rax,(%rsp)
  mov    0x2d8(%r13),%rax
  mov    %rax,0x8(%rsp)
  mov    %rsp,%rdi
  lea    0x8(%rsp),%rsi
  call   <speckey@plt>
  mov    (%rsp),%rax
  mov    %rax,0x310(%r13)
  mov    0x8(%rsp),%rax
  mov    %rax,0x318(%r13)
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L17
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L17:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void RunEncryptionKeySchedule(uint8_t *key, uint8_t *roundKeys) {
  uint8_t i;
  uint16_t temp[2];
  uint16_t *Key = (uint16_t *)key;
  uint16_t *RoundKeys = (uint16_t *)roundKeys;
  RoundKeys[0] = Key[0];
  RoundKeys[1] = Key[1];
  RoundKeys[2] = Key[2];
  RoundKeys[3] = Key[3];
  RoundKeys[4] = Key[4];
  RoundKeys[5] = Key[5];
  temp[0] = Key[6];
  temp[1] = Key[7];
  for (i = 1; i < 2 * 8; i++) {
    RoundKeys[6 * i + 0] = temp[0];
    RoundKeys[6 * i + 1] = temp[1] + i;
    temp[0] = RoundKeys[6 * (i - 1) + 0];
    temp[1] = RoundKeys[6 * (i - 1) + 1];
    speckey(temp, temp + 1);
    RoundKeys[6 * i + 2] = temp[0];
    RoundKeys[6 * i + 3] = temp[1];
    RoundKeys[6 * i + 4] = temp[0] + RoundKeys[6 * (i - 1) + 2];
    RoundKeys[6 * i + 5] = temp[1] + RoundKeys[6 * (i - 1) + 3];
    temp[0] = RoundKeys[6 * (i - 1) + 4];
    temp[1] = RoundKeys[6 * (i - 1) + 5];
  }
  RoundKeys[6 * 2 * 8 + 0] = temp[0];
  RoundKeys[6 * 2 * 8 + 1] = temp[1] + 2 * 8;
  temp[0] = RoundKeys[6 * (2 * 8 - 1) + 0];
  temp[1] = RoundKeys[6 * (2 * 8 - 1) + 1];
  speckey(temp, temp + 1);
  RoundKeys[6 * 2 * 8 + 2] = temp[0];
  RoundKeys[6 * 2 * 8 + 3] = temp[1];
}
```
user: Translate the below assembly code into C programming language:

```asm
<RunEncryptionKeySchedule>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    $0x1,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  mov    (%rdi),%rax
  mov    %rsp,%r13
  lea    0x8(%rsp),%r14
  mov    %rax,(%rsi)
  mov    0x8(%rdi),%rax
  mov    %rax,0x8(%rsi)
  mov    0x10(%rdi),%rax
  mov    %rax,0x10(%rsi)
  mov    0x18(%rdi),%rax
  mov    %rax,0x18(%rsi)
  mov    0x20(%rdi),%rax
  mov    %rax,0x20(%rsi)
  mov    0x28(%rdi),%rax
  mov    %rax,0x28(%rsi)
  mov    0x30(%rdi),%rdx
  mov    0x38(%rdi),%rax
  nopl   0x0(%rax,%rax,1)
L19:
  add    %r12,%rax
  mov    %rdx,0x30(%rbx)
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    %rax,0x38(%rbx)
  mov    (%rbx),%rax
  add    $0x1,%r12
  add    $0x30,%rbx
  mov    %rax,(%rsp)
  mov    -0x28(%rbx),%rax
  mov    %rax,0x8(%rsp)
  call   <speckey@plt>
  mov    (%rsp),%rdx
  mov    0x8(%rsp),%rax
  mov    %rdx,0x10(%rbx)
  add    -0x20(%rbx),%rdx
  mov    %rax,0x18(%rbx)
  add    -0x18(%rbx),%rax
  mov    %rdx,0x20(%rbx)
  mov    -0x10(%rbx),%rdx
  mov    %rax,0x28(%rbx)
  mov    -0x8(%rbx),%rax
  mov    %rdx,(%rsp)
  mov    %rax,0x8(%rsp)
  cmp    $0x10,%r12
  jne    L19
  add    $0x10,%rax
  mov    %rdx,0x300(%rbp)
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    %rax,0x308(%rbp)
  mov    0x2d0(%rbp),%rax
  mov    %rax,(%rsp)
  mov    0x2d8(%rbp),%rax
  mov    %rax,0x8(%rsp)
  call   <speckey@plt>
  mov    (%rsp),%rax
  mov    %rax,0x310(%rbp)
  mov    0x8(%rsp),%rax
  mov    %rax,0x318(%rbp)
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L2:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void RunEncryptionKeySchedule(uint8_t *key, uint8_t *roundKeys) {
  uint8_t i;
  uint16_t temp[2];
  uint16_t *Key = (uint16_t *)key;
  uint16_t *RoundKeys = (uint16_t *)roundKeys;
  RoundKeys[0] = Key[0];
  RoundKeys[1] = Key[1];
  RoundKeys[2] = Key[2];
  RoundKeys[3] = Key[3];
  RoundKeys[4] = Key[4];
  RoundKeys[5] = Key[5];
  temp[0] = Key[6];
  temp[1] = Key[7];
  for (i = 1; i < 2 * 8; i++) {
    RoundKeys[6 * i + 0] = temp[0];
    RoundKeys[6 * i + 1] = temp[1] + i;
    temp[0] = RoundKeys[6 * (i - 1) + 0];
    temp[1] = RoundKeys[6 * (i - 1) + 1];
    speckey(temp, temp + 1);
    RoundKeys[6 * i + 2] = temp[0];
    RoundKeys[6 * i + 3] = temp[1];
    RoundKeys[6 * i + 4] = temp[0] + RoundKeys[6 * (i - 1) + 2];
    RoundKeys[6 * i + 5] = temp[1] + RoundKeys[6 * (i - 1) + 3];
    temp[0] = RoundKeys[6 * (i - 1) + 4];
    temp[1] = RoundKeys[6 * (i - 1) + 5];
  }
  RoundKeys[6 * 2 * 8 + 0] = temp[0];
  RoundKeys[6 * 2 * 8 + 1] = temp[1] + 2 * 8;
  temp[0] = RoundKeys[6 * (2 * 8 - 1) + 0];
  temp[1] = RoundKeys[6 * (2 * 8 - 1) + 1];
  speckey(temp, temp + 1);
  RoundKeys[6 * 2 * 8 + 2] = temp[0];
  RoundKeys[6 * 2 * 8 + 3] = temp[1];
}
```