ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Converte this assembly snippet into its equivalent C code:

```asm
<log_2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  movl   $0x1,-0x8(%rbp)
  movl   $0xffffffff,-0x4(%rbp)
  jmp    L5
L7:
  shll   -0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L5:
  mov    -0x8(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jle    L7
  mov    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int log_2(int n) {
  int c = 1, d = -1;
  while (c <= n) {
    c <<= 1;
    ++d;
  }
  return (d);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<log_2>:
  endbr64
  test   %edi,%edi
  jle    L0
  mov    $0xffffffff,%edx
  mov    $0x1,%eax
L8:
  add    %eax,%eax
  add    $0x1,%edx
  cmp    %eax,%edi
  jge    L8
L29:
  mov    %edx,%eax
  ret
L0:
  mov    $0xffffffff,%edx
  jmp    L29
```

assistant: ```c
int log_2(int n) {
  int c = 1, d = -1;
  while (c <= n) {
    c <<= 1;
    ++d;
  }
  return (d);
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<log_2>:
  endbr64
  mov    $0xffffffff,%r8d
  test   %edi,%edi
  jle    L3
  mov    $0x1,%eax
  nopl   0x0(%rax,%rax,1)
L19:
  add    %eax,%eax
  add    $0x1,%r8d
  cmp    %eax,%edi
  jge    L19
L3:
  mov    %r8d,%eax
  ret
```

assistant: ```c
int log_2(int n) {
  int c = 1, d = -1;
  while (c <= n) {
    c <<= 1;
    ++d;
  }
  return (d);
}
```
user: What is the c source code of the assembly code below:

```asm
<log_2>:
  endbr64
  mov    $0xffffffff,%r8d
  test   %edi,%edi
  jle    L13
  mov    $0x1,%eax
  nopl   0x0(%rax,%rax,1)
L12:
  add    %eax,%eax
  add    $0x1,%r8d
  cmp    %eax,%edi
  jge    L12
L13:
  mov    %r8d,%eax
  ret
```

assistant: ```c
int log_2(int n) {
  int c = 1, d = -1;
  while (c <= n) {
    c <<= 1;
    ++d;
  }
  return (d);
}
```
user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  call   <getDouble@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movq   %rax,%xmm0
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0x28(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  movq   %rdx,%xmm0
  mov    %rax,%rdi
  call   <splitDouble@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rsi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x20(%rbp),%rax
  add    $0x9,%rax
  mov    %rax,%rsi
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L4
  call   <__stack_chk_fail@plt>
L4:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D15
datatype: string
name: parse_data
arguments: data_label: D29
datatype: string
name: parse_data
arguments: data_label: D17
datatype: string
name: parse_data
arguments: data_label: D12
datatype: string

tool: D15: Enter double string (MAX 12 CHARS) > 

tool: D29: num1 = %f


tool: D17: lhs = %s


tool: D12: rhs = %s


assistant: ```c
int main() {
  char sides[2][9];
  double num1;
  printf("Enter double string (MAX 12 CHARS) > ");
  num1 = getDouble();
  printf("num1 = %f\n", num1);
  splitDouble(sides, num1);
  printf("lhs = %s\n", sides[0]);
  printf("rhs = %s\n", sides[1]);
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    D13(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  call   <getDouble@plt>
  movq   %xmm0,%rbx
  lea    D20(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    %rsp,%rbp
  movq   %rbx,%xmm0
  mov    %rbp,%rdi
  call   <splitDouble@plt>
  mov    %rbp,%rsi
  lea    D36(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x9(%rsp),%rsi
  lea    D27(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  mov    $0x0,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D13
type_guessed: string
name: extract_symbolic_data
arguments: tag: D20
type_guessed: string
name: extract_symbolic_data
arguments: tag: D36
type_guessed: string
name: extract_symbolic_data
arguments: tag: D27
type_guessed: string

tool: D13: Enter double string (MAX 12 CHARS) > 

tool: D20: num1 = %f


tool: D36: lhs = %s


tool: D27: rhs = %s


assistant: ```c
int main() {
  char sides[2][9];
  double num1;
  printf("Enter double string (MAX 12 CHARS) > ");
  num1 = getDouble();
  printf("num1 = %f\n", num1);
  splitDouble(sides, num1);
  printf("lhs = %s\n", sides[0]);
  printf("rhs = %s\n", sides[1]);
  return 0;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<main>:
  endbr64
  push   %rbp
  lea    D31(%rip),%rdi
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbp
  call   <printf@plt>
  xor    %eax,%eax
  call   <getDouble@plt>
  lea    D11(%rip),%rdi
  mov    $0x1,%eax
  movsd  %xmm0,0x8(%rsp)
  call   <printf@plt>
  movsd  0x8(%rsp),%xmm0
  mov    %rbp,%rdi
  call   <splitDouble@plt>
  mov    %rbp,%rsi
  lea    D24(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  lea    0x19(%rsp),%rsi
  lea    D0(%rip),%rdi
  call   <printf@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x30,%rsp
  xor    %eax,%eax
  pop    %rbp
  ret
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D31
type_infered: string
name: parse_data
arguments: data_tag: D11
type_infered: string
name: parse_data
arguments: data_tag: D24
type_infered: string
name: parse_data
arguments: data_tag: D0
type_infered: string

tool: D31: Enter double string (MAX 12 CHARS) > 

tool: D11: num1 = %f


tool: D24: lhs = %s


tool: D0: rhs = %s


assistant: ```c
int main() {
  char sides[2][9];
  double num1;
  printf("Enter double string (MAX 12 CHARS) > ");
  num1 = getDouble();
  printf("num1 = %f\n", num1);
  splitDouble(sides, num1);
  printf("lhs = %s\n", sides[0]);
  printf("rhs = %s\n", sides[1]);
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  lea    D29(%rip),%rdi
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbp
  call   <printf@plt>
  xor    %eax,%eax
  call   <getDouble@plt>
  lea    D31(%rip),%rdi
  mov    $0x1,%eax
  movsd  %xmm0,0x8(%rsp)
  call   <printf@plt>
  movsd  0x8(%rsp),%xmm0
  mov    %rbp,%rdi
  call   <splitDouble@plt>
  mov    %rbp,%rsi
  lea    D22(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  lea    0x19(%rsp),%rsi
  lea    D23(%rip),%rdi
  call   <printf@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x30,%rsp
  xor    %eax,%eax
  pop    %rbp
  ret
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D29
data_type: string
name: unpack_data
arguments: tag: D31
data_type: string
name: unpack_data
arguments: tag: D22
data_type: string
name: unpack_data
arguments: tag: D23
data_type: string

tool: D29: Enter double string (MAX 12 CHARS) > 

tool: D31: num1 = %f


tool: D22: lhs = %s


tool: D23: rhs = %s


assistant: ```c
int main() {
  char sides[2][9];
  double num1;
  printf("Enter double string (MAX 12 CHARS) > ");
  num1 = getDouble();
  printf("num1 = %f\n", num1);
  splitDouble(sides, num1);
  printf("lhs = %s\n", sides[0]);
  printf("rhs = %s\n", sides[1]);
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<my_malloc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L9
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L9:
  mov    -0x8(%rbp),%rax
  mov    $0x8,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x8(%rbp),%rax
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D3
data_type: string

tool: D3: Out of memory.


assistant: ```c
char *my_malloc(size_t len) {
  char *s;
  s = (char *)malloc(sizeof(char) * len);
  if (s == NULL) {
    printf("Out of memory.\n");
    exit(1);
  }
  memset(s, '\0', sizeof(s));
  return s;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<my_malloc>:
  endbr64
  push   %rbx
  call   <malloc@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L2
L8:
  mov    $0x8,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    %rbx,%rax
  pop    %rbx
  ret
L2:
  lea    D7(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L8
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D7
type_guessed: string

tool: D7: Out of memory.


assistant: ```c
char *my_malloc(size_t len) {
  char *s;
  s = (char *)malloc(sizeof(char) * len);
  if (s == NULL) {
    printf("Out of memory.\n");
    exit(1);
  }
  memset(s, '\0', sizeof(s));
  return s;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<my_malloc>:
  endbr64
  push   %r12
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L13
L0:
  mov    %r12,%rdi
  mov    $0x8,%edx
  xor    %esi,%esi
  call   <memset@plt>
  mov    %r12,%rax
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L13:
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L0
```

tool_calls: name: unpack_data
arguments: label: D9
type_infered: string

tool: D9: Out of memory.


assistant: ```c
char *my_malloc(size_t len) {
  char *s;
  s = (char *)malloc(sizeof(char) * len);
  if (s == NULL) {
    printf("Out of memory.\n");
    exit(1);
  }
  memset(s, '\0', sizeof(s));
  return s;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<my_malloc>:
  endbr64
  push   %r12
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L0
L16:
  mov    %r12,%rdi
  mov    $0x8,%edx
  xor    %esi,%esi
  call   <memset@plt>
  mov    %r12,%rax
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L0:
  lea    D2(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L16
```

tool_calls: name: disassemble_data
arguments: data_tag: D2
datatype: string

tool: D2: Out of memory.


assistant: ```c
char *my_malloc(size_t len) {
  char *s;
  s = (char *)malloc(sizeof(char) * len);
  if (s == NULL) {
    printf("Out of memory.\n");
    exit(1);
  }
  memset(s, '\0', sizeof(s));
  return s;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<lowerBinarySearch>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    %ecx,-0x24(%rbp)
  mov    %r8d,-0x28(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x4(%rbp)
  mov    -0x24(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jne    L19
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x20(%rbp)
  jne    L10
  mov    -0x24(%rbp),%eax
  jmp    L18
L10:
  mov    $0xffffffff,%eax
  jmp    L18
L19:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x20(%rbp)
  jg     L37
  mov    -0x4(%rbp),%edi
  mov    -0x24(%rbp),%ecx
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%esi
  mov    -0x18(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <lowerBinarySearch>
  jmp    L18
L37:
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x28(%rbp),%edi
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%esi
  mov    -0x18(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <lowerBinarySearch>
L18:
  leave
  ret
```

assistant: ```c
int lowerBinarySearch(int *n, int s, int t, int l, int r) {
  int m = (l + r) / 2;
  if (l == r)
    return t == n[l] ? l : -1;
  if (t <= n[m])
    return lowerBinarySearch(n, s, t, l, m);
  return lowerBinarySearch(n, s, t, m + 1, r);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<lowerBinarySearch>:
  endbr64
  lea    (%rcx,%r8,1),%r9d
  mov    %r9d,%eax
  shr    $0x1f,%eax
  add    %r9d,%eax
  sar    %eax
  cmp    %r8d,%ecx
  je     L28
  sub    $0x8,%rsp
  movslq %eax,%r9
  cmp    %edx,(%rdi,%r9,4)
  jge    L22
  lea    0x1(%rax),%ecx
  call   <lowerBinarySearch>
L21:
  add    $0x8,%rsp
  ret
L28:
  movslq %ecx,%rax
  cmp    %edx,(%rdi,%rax,4)
  mov    $0xffffffff,%eax
  cmove  %ecx,%eax
  ret
L22:
  mov    %eax,%r8d
  call   <lowerBinarySearch>
  jmp    L21
```

assistant: ```c
int lowerBinarySearch(int *n, int s, int t, int l, int r) {
  int m = (l + r) / 2;
  if (l == r)
    return t == n[l] ? l : -1;
  if (t <= n[m])
    return lowerBinarySearch(n, s, t, l, m);
  return lowerBinarySearch(n, s, t, m + 1, r);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<lowerBinarySearch>:
  endbr64
  mov    %rdi,%r9
  mov    %ecx,%eax
  jmp    L25
  nopl   0x0(%rax,%rax,1)
L16:
  movslq %r8d,%rcx
  cmp    %edx,(%r9,%rcx,4)
  jl     L18
L25:
  lea    (%rax,%r8,1),%edi
  mov    %r8d,%esi
  mov    %edi,%r8d
  shr    $0x1f,%r8d
  add    %edi,%r8d
  sar    %r8d
  cmp    %esi,%eax
  jne    L16
  movslq %eax,%rcx
  cmp    %edx,(%r9,%rcx,4)
  mov    $0xffffffff,%edx
  cmovne %edx,%eax
  ret
  nopl   0x0(%rax)
L18:
  lea    0x1(%r8),%eax
  mov    %esi,%r8d
  jmp    L25
```

assistant: ```c
int lowerBinarySearch(int *n, int s, int t, int l, int r) {
  int m = (l + r) / 2;
  if (l == r)
    return t == n[l] ? l : -1;
  if (t <= n[m])
    return lowerBinarySearch(n, s, t, l, m);
  return lowerBinarySearch(n, s, t, m + 1, r);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<lowerBinarySearch>:
  endbr64
  mov    %rdi,%r9
  mov    %ecx,%eax
  jmp    L23
  nopl   0x0(%rax,%rax,1)
L13:
  movslq %r8d,%rcx
  cmp    %edx,(%r9,%rcx,4)
  jl     L8
L23:
  lea    (%rax,%r8,1),%edi
  mov    %r8d,%esi
  mov    %edi,%r8d
  shr    $0x1f,%r8d
  add    %edi,%r8d
  sar    %r8d
  cmp    %esi,%eax
  jne    L13
  movslq %eax,%rcx
  cmp    %edx,(%r9,%rcx,4)
  mov    $0xffffffff,%edx
  cmovne %edx,%eax
  ret
  nopl   0x0(%rax)
L8:
  lea    0x1(%r8),%eax
  mov    %esi,%r8d
  jmp    L23
```

assistant: ```c
int lowerBinarySearch(int *n, int s, int t, int l, int r) {
  int m = (l + r) / 2;
  if (l == r)
    return t == n[l] ? l : -1;
  if (t <= n[m])
    return lowerBinarySearch(n, s, t, l, m);
  return lowerBinarySearch(n, s, t, m + 1, r);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<init_array>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  movl   $0x400,-0x4(%rbp)
  mov    $0x2a,%edi
  call   <srand@plt>
  movl   $0x0,-0x10(%rbp)
  jmp    L89
L42:
  movl   $0x0,-0xc(%rbp)
  jmp    L17
L33:
  movl   $0x0,-0x8(%rbp)
  jmp    L13
L4:
  mov    -0x10(%rbp),%eax
  cltq
  imul   $0x2d200,%rax,%rdx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x8(%rbp),%eax
  movslq %eax,%rsi
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rsi,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
  mov    -0x10(%rbp),%eax
  cltq
  imul   $0x2d200,%rax,%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x8(%rbp),%eax
  movslq %eax,%rsi
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rsi,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
  addl   $0x1,-0x8(%rbp)
L13:
  cmpl   $0x97,-0x8(%rbp)
  jle    L4
  addl   $0x1,-0xc(%rbp)
L17:
  cmpl   $0x97,-0xc(%rbp)
  jle    L33
  addl   $0x1,-0x10(%rbp)
L89:
  cmpl   $0x97,-0x10(%rbp)
  jle    L42
  movl   $0x1,-0x10(%rbp)
  jmp    L55
L10:
  movl   $0x1,-0xc(%rbp)
  jmp    L0
L113:
  movl   $0x0,-0x8(%rbp)
  jmp    L15
L86:
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  idivl  -0x4(%rbp)
  mov    %edx,%esi
  mov    -0x10(%rbp),%eax
  cltq
  imul   $0x2d200,%rax,%rdx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  pxor   %xmm0,%xmm0
  cvtsi2sd %esi,%xmm0
  mov    -0x8(%rbp),%eax
  movslq %eax,%rsi
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rsi,%rax
  movsd  %xmm0,(%rcx,%rax,8)
  addl   $0x1,-0x8(%rbp)
L15:
  cmpl   $0x97,-0x8(%rbp)
  jle    L86
  addl   $0x1,-0xc(%rbp)
L0:
  cmpl   $0x96,-0xc(%rbp)
  jle    L113
  addl   $0x1,-0x10(%rbp)
L55:
  cmpl   $0x96,-0x10(%rbp)
  jle    L10
  nop
  nop
  leave
  ret
```

assistant: ```c
void init_array(double point[150L + 2][150L + 2][150L + 2], double new_point[150L + 2][150L + 2][150L + 2]) {
  const int BASE = 1024;
  int i, j, k;
  srand(42);
  for (i = 0; i < 150L + 2; i++) {
    for (j = 0; j < 150L + 2; j++) {
      for (k = 0; k < 150L + 2; k++) {
        point[i][j][k] = 0.0;
        new_point[i][j][k] = 0.0;
      }
    }
  }
  for (i = 1; i < 150L + 1; i++) {
    for (j = 1; j < 150L + 1; j++) {
      for (k = 0; k < 150L + 2; k++) {
        point[i][j][k] = 1.0 * (rand() % BASE);
      }
    }
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<init_array>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r14
  mov    %rsi,%rbp
  mov    $0x2a,%edi
  call   <srand@plt>
  mov    %rbp,%rdi
  lea    0x1acb000(%r14),%r9
  mov    %r14,%r8
L17:
  mov    %r8,%rsi
  mov    %rdi,%rcx
  mov    $0x4c0,%edx
L39:
  lea    -0x4c0(%rdx),%rax
L52:
  movq   $0x0,(%rsi,%rax,1)
  movq   $0x0,(%rcx,%rax,1)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L52
  add    $0x4c0,%rdx
  cmp    $0x2d6c0,%rdx
  jne    L39
  add    $0x2d200,%r8
  add    $0x2d200,%rdi
  cmp    %r9,%r8
  jne    L17
  lea    0x2db80(%r14),%r13
  add    $0x1a9e780,%r14
L55:
  mov    %r13,%rbp
  lea    0x2c880(%r13),%r12
L34:
  lea    -0x4c0(%rbp),%rbx
L37:
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  shr    $0x16,%edx
  add    %edx,%eax
  and    $0x3ff,%eax
  sub    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,(%rbx)
  add    $0x8,%rbx
  cmp    %rbp,%rbx
  jne    L37
  add    $0x4c0,%rbp
  cmp    %r12,%rbp
  jne    L34
  add    $0x2d200,%r13
  cmp    %r14,%r13
  jne    L55
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
void init_array(double point[150L + 2][150L + 2][150L + 2], double new_point[150L + 2][150L + 2][150L + 2]) {
  const int BASE = 1024;
  int i, j, k;
  srand(42);
  for (i = 0; i < 150L + 2; i++) {
    for (j = 0; j < 150L + 2; j++) {
      for (k = 0; k < 150L + 2; k++) {
        point[i][j][k] = 0.0;
        new_point[i][j][k] = 0.0;
      }
    }
  }
  for (i = 1; i < 150L + 1; i++) {
    for (j = 1; j < 150L + 1; j++) {
      for (k = 0; k < 150L + 2; k++) {
        point[i][j][k] = 1.0 * (rand() % BASE);
      }
    }
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<init_array>:
  endbr64
  push   %r14
  mov    %rdi,%r14
  mov    $0x2a,%edi
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  call   <srand@plt>
  mov    %rbp,%r9
  mov    %r14,%r8
  xor    %r11d,%r11d
  xor    %eax,%eax
L5:
  mov    $0x4c0,%esi
  xor    %r10d,%r10d
L72:
  lea    (%r10,%r9,1),%rdx
  lea    (%rsi,%r8,1),%rdi
  lea    (%r10,%r8,1),%rcx
  cmp    %rdi,%rdx
  jae    L76
  lea    (%rsi,%r9,1),%rdi
  cmp    %rdi,%rcx
  jb     L10
L76:
  lea    0x8(%rcx),%rdi
  movq   $0x0,(%rcx)
  movq   $0x0,0x4b8(%rcx)
  and    $0xfffffffffffffff8,%rdi
  sub    %rdi,%rcx
  add    $0x4c0,%ecx
  shr    $0x3,%ecx
  rep stos %rax,%es:(%rdi)
  lea    0x8(%rdx),%rdi
  movq   $0x0,(%rdx)
  movq   $0x0,0x4b8(%rdx)
  and    $0xfffffffffffffff8,%rdi
  sub    %rdi,%rdx
  lea    0x4c0(%rdx),%ecx
  shr    $0x3,%ecx
  rep stos %rax,%es:(%rdi)
L38:
  add    $0x4c0,%rsi
  add    $0x4c0,%r10
  cmp    $0x2d6c0,%rsi
  jne    L72
  add    $0x2d200,%r11
  add    $0x2d200,%r8
  add    $0x2d200,%r9
  cmp    $0x1acb000,%r11
  jne    L5
  lea    0x2db80(%r14),%r12
  add    $0x1a9e780,%r14
L13:
  mov    %r12,%rbx
  lea    0x2c880(%r12),%rbp
L0:
  lea    -0x4c0(%rbx),%r13
  nopl   0x0(%rax)
L69:
  xor    %eax,%eax
  add    $0x8,%r13
  call   <rand@plt>
  pxor   %xmm0,%xmm0
  cltd
  shr    $0x16,%edx
  add    %edx,%eax
  and    $0x3ff,%eax
  sub    %edx,%eax
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x8(%r13)
  cmp    %rbx,%r13
  jne    L69
  lea    0x4c0(%r13),%rbx
  cmp    %rbp,%rbx
  jne    L0
  add    $0x2d200,%r12
  cmp    %r14,%r12
  jne    L13
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L10:
  mov    %r10,%rdx
  nop
L8:
  movq   $0x0,(%r8,%rdx,1)
  movq   $0x0,(%r9,%rdx,1)
  add    $0x8,%rdx
  cmp    %rsi,%rdx
  jne    L8
  jmp    L38
```

assistant: ```c
void init_array(double point[150L + 2][150L + 2][150L + 2], double new_point[150L + 2][150L + 2][150L + 2]) {
  const int BASE = 1024;
  int i, j, k;
  srand(42);
  for (i = 0; i < 150L + 2; i++) {
    for (j = 0; j < 150L + 2; j++) {
      for (k = 0; k < 150L + 2; k++) {
        point[i][j][k] = 0.0;
        new_point[i][j][k] = 0.0;
      }
    }
  }
  for (i = 1; i < 150L + 1; i++) {
    for (j = 1; j < 150L + 1; j++) {
      for (k = 0; k < 150L + 2; k++) {
        point[i][j][k] = 1.0 * (rand() % BASE);
      }
    }
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<init_array>:
  endbr64
  push   %r14
  mov    %rdi,%r14
  mov    $0x2a,%edi
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  call   <srand@plt>
  mov    %rbp,%r9
  mov    %r14,%r8
  xor    %r11d,%r11d
  xor    %eax,%eax
L79:
  mov    $0x4c0,%esi
  xor    %r10d,%r10d
L28:
  lea    (%r10,%r9,1),%rdx
  lea    (%rsi,%r8,1),%rdi
  lea    (%r10,%r8,1),%rcx
  cmp    %rdi,%rdx
  jae    L21
  lea    (%rsi,%r9,1),%rdi
  cmp    %rdi,%rcx
  jb     L85
L21:
  lea    0x8(%rcx),%rdi
  movq   $0x0,(%rcx)
  movq   $0x0,0x4b8(%rcx)
  and    $0xfffffffffffffff8,%rdi
  sub    %rdi,%rcx
  add    $0x4c0,%ecx
  shr    $0x3,%ecx
  rep stos %rax,%es:(%rdi)
  lea    0x8(%rdx),%rdi
  movq   $0x0,(%rdx)
  movq   $0x0,0x4b8(%rdx)
  and    $0xfffffffffffffff8,%rdi
  sub    %rdi,%rdx
  lea    0x4c0(%rdx),%ecx
  shr    $0x3,%ecx
  rep stos %rax,%es:(%rdi)
L82:
  add    $0x4c0,%rsi
  add    $0x4c0,%r10
  cmp    $0x2d6c0,%rsi
  jne    L28
  add    $0x2d200,%r11
  add    $0x2d200,%r8
  add    $0x2d200,%r9
  cmp    $0x1acb000,%r11
  jne    L79
  lea    0x2db80(%r14),%r12
  add    $0x1a9e780,%r14
L3:
  mov    %r12,%rbx
  lea    0x2c880(%r12),%rbp
L51:
  lea    -0x4c0(%rbx),%r13
  nopl   0x0(%rax)
L56:
  xor    %eax,%eax
  add    $0x8,%r13
  call   <rand@plt>
  pxor   %xmm0,%xmm0
  cltd
  shr    $0x16,%edx
  add    %edx,%eax
  and    $0x3ff,%eax
  sub    %edx,%eax
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x8(%r13)
  cmp    %rbx,%r13
  jne    L56
  lea    0x4c0(%r13),%rbx
  cmp    %rbp,%rbx
  jne    L51
  add    $0x2d200,%r12
  cmp    %r14,%r12
  jne    L3
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L85:
  mov    %r10,%rdx
  nop
L32:
  movq   $0x0,(%r8,%rdx,1)
  movq   $0x0,(%r9,%rdx,1)
  add    $0x8,%rdx
  cmp    %rsi,%rdx
  jne    L32
  jmp    L82
```

assistant: ```c
void init_array(double point[150L + 2][150L + 2][150L + 2], double new_point[150L + 2][150L + 2][150L + 2]) {
  const int BASE = 1024;
  int i, j, k;
  srand(42);
  for (i = 0; i < 150L + 2; i++) {
    for (j = 0; j < 150L + 2; j++) {
      for (k = 0; k < 150L + 2; k++) {
        point[i][j][k] = 0.0;
        new_point[i][j][k] = 0.0;
      }
    }
  }
  for (i = 1; i < 150L + 1; i++) {
    for (j = 1; j < 150L + 1; j++) {
      for (k = 0; k < 150L + 2; k++) {
        point[i][j][k] = 1.0 * (rand() % BASE);
      }
    }
  }
}
```