ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<multiply>:
  endbr64
  movslq %edi,%r11
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  mov    %r11,%r9
  test   %r11d,%r11d
  jle    L9
  mov    %r8,%rdi
  mov    %esi,%r10d
  lea    0x0(,%r11,4),%rbx
  xor    %r8d,%r8d
  nopl   (%rax)
L17:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L24:
  mov    (%rdx,%rax,4),%esi
  imul   %r10d,%esi
  add    (%rcx,%rax,4),%esi
  mov    %esi,(%rdi,%rax,4)
  add    $0x1,%rax
  cmp    %rax,%r11
  jne    L24
  add    $0x1,%r8d
  add    %rbx,%rdx
  add    %rbx,%rcx
  add    %rbx,%rdi
  cmp    %r8d,%r9d
  jne    L17
L9:
  mov    %r9d,%eax
  pop    %rbx
  shr    $0x1f,%eax
  add    %r9d,%eax
  sar    %eax
  cltq
  imul   %rax,%r11
  shl    $0x2,%rax
  lea    (%rax,%r11,4),%rax
  mov    0x0(%rbp,%rax,1),%eax
  pop    %rbp
  ret
```

assistant: ```c
int multiply(int n, int a, int tab1[n][n], int tab2[n][n], int tab3[n][n]) {
  int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      tab3[i][j] = a * tab1[i][j] + tab2[i][j];
    }
  }
  return tab3[n / 2][n / 2];
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<multiply>:
  endbr64
  push   %r15
  mov    %edi,%r11d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  movslq %edi,%rsi
  mov    %r8,-0x10(%rsp)
  mov    %rsi,-0x18(%rsp)
  test   %edi,%edi
  jle    L64
  lea    0x4(%rdx),%r10
  lea    0x0(,%rsi,4),%r12
  mov    %edi,%edx
  mov    %edi,%esi
  and    $0xfffffffc,%esi
  shr    $0x2,%edx
  mov    %r8,%rax
  lea    0x4(%rcx),%r9
  lea    0x2(%rsi),%edi
  lea    0x1(%rsi),%ecx
  mov    %esi,-0x34(%rsp)
  movd   %ebx,%xmm4
  lea    -0x1(%rdx),%r8d
  movslq %esi,%r13
  lea    -0x1(%r11),%edx
  mov    %r11d,%esi
  pshufd $0x0,%xmm4,%xmm2
  mov    %ecx,-0x30(%rsp)
  add    $0x1,%r8
  xor    %ebp,%ebp
  mov    %edi,-0x2c(%rsp)
  movdqa %xmm2,%xmm3
  shl    $0x4,%r8
  movslq %ecx,%r14
  mov    %edx,-0x38(%rsp)
  psrlq  $0x20,%xmm3
  movslq %edi,%r15
  mov    %rsi,-0x20(%rsp)
L14:
  mov    %rax,%rdx
  lea    -0x4(%r10),%rcx
  lea    -0x4(%r9),%rsi
  sub    %r9,%rdx
  cmp    $0x8,%rdx
  mov    %rax,%rdx
  seta   %dil
  sub    %r10,%rdx
  cmp    $0x8,%rdx
  seta   %dl
  test   %dl,%dil
  je     L37
  xor    %edx,%edx
  cmpl   $0x2,-0x38(%rsp)
  jbe    L37
  nopl   0x0(%rax)
L13:
  movdqu (%rcx,%rdx,1),%xmm0
  movdqu (%rcx,%rdx,1),%xmm1
  psrlq  $0x20,%xmm0
  pmuludq %xmm2,%xmm1
  pmuludq %xmm3,%xmm0
  pshufd $0x8,%xmm1,%xmm1
  pshufd $0x8,%xmm0,%xmm0
  punpckldq %xmm0,%xmm1
  movdqu (%rsi,%rdx,1),%xmm0
  paddd  %xmm1,%xmm0
  movups %xmm0,(%rax,%rdx,1)
  add    $0x10,%rdx
  cmp    %r8,%rdx
  jne    L13
  cmp    -0x34(%rsp),%r11d
  je     L3
  mov    (%rcx,%r13,4),%edx
  imul   %ebx,%edx
  add    (%rsi,%r13,4),%edx
  mov    %edx,(%rax,%r13,4)
  cmp    -0x30(%rsp),%r11d
  jle    L3
  mov    (%rcx,%r14,4),%edx
  imul   %ebx,%edx
  add    (%rsi,%r14,4),%edx
  mov    %edx,(%rax,%r14,4)
  cmp    -0x2c(%rsp),%r11d
  jle    L3
  mov    (%rcx,%r15,4),%edx
  imul   %ebx,%edx
  add    (%rsi,%r15,4),%edx
  mov    %edx,(%rax,%r15,4)
L3:
  add    $0x1,%ebp
  add    %r12,%rax
  add    %r12,%r10
  add    %r12,%r9
  cmp    %ebp,%r11d
  jne    L14
L64:
  mov    %r11d,%eax
  mov    -0x18(%rsp),%rdx
  mov    -0x10(%rsp),%rbx
  shr    $0x1f,%eax
  add    %r11d,%eax
  sar    %eax
  cltq
  imul   %rax,%rdx
  shl    $0x2,%rax
  lea    (%rax,%rdx,4),%rax
  mov    (%rbx,%rax,1),%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L37:
  mov    %r8,-0x28(%rsp)
  mov    -0x20(%rsp),%r8
  xor    %edx,%edx
  nopl   0x0(%rax)
L23:
  mov    (%rcx,%rdx,4),%edi
  imul   %ebx,%edi
  add    (%rsi,%rdx,4),%edi
  mov    %edi,(%rax,%rdx,4)
  add    $0x1,%rdx
  cmp    %rdx,%r8
  jne    L23
  mov    -0x28(%rsp),%r8
  jmp    L3
```

assistant: ```c
int multiply(int n, int a, int tab1[n][n], int tab2[n][n], int tab3[n][n]) {
  int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      tab3[i][j] = a * tab1[i][j] + tab2[i][j];
    }
  }
  return tab3[n / 2][n / 2];
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<displayOutput>:
  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    %r9d,-0x2c(%rbp)
  movl   $0x0,-0x4(%rbp)
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  jmp    L1
L23:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  subl   $0x1,-0x4(%rbp)
L1:
  cmpl   $0x0,-0x4(%rbp)
  jns    L23
  cmpl   $0xffffffff,-0x20(%rbp)
  je     L10
  cmpl   $0xffffffff,-0x2c(%rbp)
  jne    L22
L10:
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L28
L22:
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x24(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L28:
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D36
datatype: string
name: read_data
arguments: label: D21
datatype: string
name: read_data
arguments: label: D39
datatype: string
name: read_data
arguments: label: D54
datatype: string
name: read_data
arguments: label: D56
datatype: string
name: read_data
arguments: label: D13
datatype: string

tool: D36: The input array is: 

tool: D21: %d 

tool: D39: 
Recursive result: Did not Find, Time taken: %d 


tool: D54: 
Iterative result: Did not Find, Time taken: %d 


tool: D56: 
Recursive result: %d, Time taken: %d 


tool: D13: 
Iterative result: %d, Time taken: %d 


assistant: ```c
int displayOutput(int data_array[], int array_size, int recursive_result, int recursive_time, int iterative_time, int iterative_result) {
  int j = 0;
  printf("The input array is: ");
  for (j = array_size; j >= 0; j--) {
    printf("%d ", data_array[j]);
  }
  if (recursive_result == -1 || iterative_result == -1) {
    printf("\nRecursive result: Did not Find, Time taken: %d \n", recursive_time);
    printf("\nIterative result: Did not Find, Time taken: %d \n", recursive_time);
  } else {
    printf("\nRecursive result: %d, Time taken: %d \n", recursive_result, recursive_time);
    printf("\nIterative result: %d, Time taken: %d \n", iterative_result, recursive_time);
  }
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<displayOutput>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    %esi,%r12d
  mov    %edx,%r14d
  mov    %ecx,%r13d
  mov    %r9d,%r15d
  lea    D34(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %r12d,%r12d
  js     L48
  movslq %r12d,%rax
  shl    $0x2,%rax
  lea    0x0(%rbp,%rax,1),%rbx
  lea    -0x4(%rbp,%rax,1),%rbp
  mov    %r12d,%r12d
  shl    $0x2,%r12
  sub    %r12,%rbp
  lea    D46(%rip),%r12
L29:
  mov    (%rbx),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  sub    $0x4,%rbx
  cmp    %rbp,%rbx
  jne    L29
L48:
  cmp    $0xffffffff,%r14d
  je     L40
  cmp    $0xffffffff,%r15d
  je     L40
  mov    %r13d,%edx
  mov    %r14d,%esi
  lea    D38(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r13d,%edx
  mov    %r15d,%esi
  lea    D25(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L23
L40:
  mov    %r13d,%esi
  lea    D52(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r13d,%esi
  lea    D45(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L23:
  mov    $0x0,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: label: D34
type_guessed: string
name: unpack_data
arguments: label: D46
type_guessed: string
name: unpack_data
arguments: label: D38
type_guessed: string
name: unpack_data
arguments: label: D25
type_guessed: string
name: unpack_data
arguments: label: D52
type_guessed: string
name: unpack_data
arguments: label: D45
type_guessed: string

tool: D34: The input array is: 

tool: D46: %d 

tool: D38: 
Recursive result: %d, Time taken: %d 


tool: D25: 
Iterative result: %d, Time taken: %d 


tool: D52: 
Recursive result: Did not Find, Time taken: %d 


tool: D45: 
Iterative result: Did not Find, Time taken: %d 


assistant: ```c
int displayOutput(int data_array[], int array_size, int recursive_result, int recursive_time, int iterative_time, int iterative_result) {
  int j = 0;
  printf("The input array is: ");
  for (j = array_size; j >= 0; j--) {
    printf("%d ", data_array[j]);
  }
  if (recursive_result == -1 || iterative_result == -1) {
    printf("\nRecursive result: Did not Find, Time taken: %d \n", recursive_time);
    printf("\nIterative result: Did not Find, Time taken: %d \n", recursive_time);
  } else {
    printf("\nRecursive result: %d, Time taken: %d \n", recursive_result, recursive_time);
    printf("\nIterative result: %d, Time taken: %d \n", iterative_result, recursive_time);
  }
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<displayOutput>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  mov    %r9d,%r14d
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %rdi,%rbp
  lea    D19(%rip),%rdi
  push   %rbx
  movslq %esi,%rbx
  sub    $0x8,%rsp
  call   <printf@plt>
  test   %ebx,%ebx
  js     L37
  lea    0x0(%rbp,%rbx,4),%rbx
  lea    D13(%rip),%r15
  sub    $0x4,%rbp
  nopl   0x0(%rax,%rax,1)
L14:
  mov    (%rbx),%esi
  mov    %r15,%rdi
  xor    %eax,%eax
  sub    $0x4,%rbx
  call   <printf@plt>
  cmp    %rbp,%rbx
  jne    L14
L37:
  cmp    $0xffffffff,%r13d
  je     L46
  cmp    $0xffffffff,%r14d
  je     L46
  mov    %r12d,%edx
  mov    %r13d,%esi
  lea    D2(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12d,%edx
  mov    %r14d,%esi
  xor    %eax,%eax
  lea    D20(%rip),%rdi
  call   <printf@plt>
L44:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L46:
  mov    %r12d,%esi
  lea    D37(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12d,%esi
  lea    D34(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L44
```

tool_calls: name: read_data
arguments: label: D19
datatype: string
name: read_data
arguments: label: D13
datatype: string
name: read_data
arguments: label: D2
datatype: string
name: read_data
arguments: label: D20
datatype: string
name: read_data
arguments: label: D37
datatype: string
name: read_data
arguments: label: D34
datatype: string

tool: D19: The input array is: 

tool: D13: %d 

tool: D2: 
Recursive result: %d, Time taken: %d 


tool: D20: 
Iterative result: %d, Time taken: %d 


tool: D37: 
Recursive result: Did not Find, Time taken: %d 


tool: D34: 
Iterative result: Did not Find, Time taken: %d 


assistant: ```c
int displayOutput(int data_array[], int array_size, int recursive_result, int recursive_time, int iterative_time, int iterative_result) {
  int j = 0;
  printf("The input array is: ");
  for (j = array_size; j >= 0; j--) {
    printf("%d ", data_array[j]);
  }
  if (recursive_result == -1 || iterative_result == -1) {
    printf("\nRecursive result: Did not Find, Time taken: %d \n", recursive_time);
    printf("\nIterative result: Did not Find, Time taken: %d \n", recursive_time);
  } else {
    printf("\nRecursive result: %d, Time taken: %d \n", recursive_result, recursive_time);
    printf("\nIterative result: %d, Time taken: %d \n", iterative_result, recursive_time);
  }
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<displayOutput>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  mov    %r9d,%r14d
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %rdi,%rbp
  lea    D49(%rip),%rdi
  push   %rbx
  movslq %esi,%rbx
  sub    $0x8,%rsp
  call   <printf@plt>
  test   %ebx,%ebx
  js     L3
  lea    0x0(%rbp,%rbx,4),%rbx
  lea    D6(%rip),%r15
  sub    $0x4,%rbp
  nopl   0x0(%rax,%rax,1)
L24:
  mov    (%rbx),%esi
  mov    %r15,%rdi
  xor    %eax,%eax
  sub    $0x4,%rbx
  call   <printf@plt>
  cmp    %rbp,%rbx
  jne    L24
L3:
  cmp    $0xffffffff,%r13d
  je     L46
  cmp    $0xffffffff,%r14d
  je     L46
  mov    %r12d,%edx
  mov    %r13d,%esi
  lea    D44(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12d,%edx
  mov    %r14d,%esi
  xor    %eax,%eax
  lea    D36(%rip),%rdi
  call   <printf@plt>
L21:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L46:
  mov    %r12d,%esi
  lea    D32(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12d,%esi
  lea    D48(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L21
```

tool_calls: name: parse_data
arguments: data_label: D49
datatype: string
name: parse_data
arguments: data_label: D6
datatype: string
name: parse_data
arguments: data_label: D44
datatype: string
name: parse_data
arguments: data_label: D36
datatype: string
name: parse_data
arguments: data_label: D32
datatype: string
name: parse_data
arguments: data_label: D48
datatype: string

tool: D49: The input array is: 

tool: D6: %d 

tool: D44: 
Recursive result: %d, Time taken: %d 


tool: D36: 
Iterative result: %d, Time taken: %d 


tool: D32: 
Recursive result: Did not Find, Time taken: %d 


tool: D48: 
Iterative result: Did not Find, Time taken: %d 


assistant: ```c
int displayOutput(int data_array[], int array_size, int recursive_result, int recursive_time, int iterative_time, int iterative_result) {
  int j = 0;
  printf("The input array is: ");
  for (j = array_size; j >= 0; j--) {
    printf("%d ", data_array[j]);
  }
  if (recursive_result == -1 || iterative_result == -1) {
    printf("\nRecursive result: Did not Find, Time taken: %d \n", recursive_time);
    printf("\nIterative result: Did not Find, Time taken: %d \n", recursive_time);
  } else {
    printf("\nRecursive result: %d, Time taken: %d \n", recursive_result, recursive_time);
    printf("\nIterative result: %d, Time taken: %d \n", iterative_result, recursive_time);
  }
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<Epoll_create>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    $0xa,%edi
  call   <epoll_create@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jns    L2
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <unix_error@plt>
L2:
  mov    -0x4(%rbp),%eax
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D4
data_type: string

tool: D4: Epoll create error

assistant: ```c
int Epoll_create() {
  int epollfd;
  if ((epollfd = epoll_create(10)) < 0)
    unix_error("Epoll create error");
  return epollfd;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<Epoll_create>:
  endbr64
  push   %rbx
  mov    $0xa,%edi
  call   <epoll_create@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  js     L16
L0:
  mov    %ebx,%eax
  pop    %rbx
  ret
L16:
  lea    D8(%rip),%rdi
  call   <unix_error@plt>
  jmp    L0
```

tool_calls: name: extract_symbolic_data
arguments: label: D8
type: string

tool: D8: Epoll create error

assistant: ```c
int Epoll_create() {
  int epollfd;
  if ((epollfd = epoll_create(10)) < 0)
    unix_error("Epoll create error");
  return epollfd;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<Epoll_create>:
  endbr64
  push   %r12
  mov    $0xa,%edi
  call   <epoll_create@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  js     L3
  mov    %r12d,%eax
  pop    %r12
  ret
  nopl   (%rax)
L3:
  lea    D8(%rip),%rdi
  call   <unix_error@plt>
  mov    %r12d,%eax
  pop    %r12
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D8
type: string

tool: D8: Epoll create error

assistant: ```c
int Epoll_create() {
  int epollfd;
  if ((epollfd = epoll_create(10)) < 0)
    unix_error("Epoll create error");
  return epollfd;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<Epoll_create>:
  endbr64
  push   %r12
  mov    $0xa,%edi
  call   <epoll_create@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  js     L4
  mov    %r12d,%eax
  pop    %r12
  ret
  nopl   (%rax)
L4:
  lea    D8(%rip),%rdi
  call   <unix_error@plt>
  mov    %r12d,%eax
  pop    %r12
  ret
```

tool_calls: name: parse_data
arguments: label: D8
type_guessed: string

tool: D8: Epoll create error

assistant: ```c
int Epoll_create() {
  int epollfd;
  if ((epollfd = epoll_create(10)) < 0)
    unix_error("Epoll create error");
  return epollfd;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<eeprom_write_word>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x7fe,-0x4(%rbp)
  jg     L57
  mov    $0x40020001,%eax
  mov    (%rax),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L5
  mov    $0x0,%eax
  call   <eeprom_initialize@plt>
L5:
  mov    -0x4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L33
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    $0x14000000,%rax
  mov    (%rax),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  je     L34
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    0x14000000(%rax),%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,(%rdx)
  mov    $0x0,%eax
  call   <flexram_wait@plt>
  jmp    L34
L33:
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    $0x14000000,%rax
  mov    (%rax),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  je     L66
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    0x14000000(%rax),%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,(%rdx)
  mov    $0x0,%eax
  call   <flexram_wait@plt>
L66:
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    $0x14000004,%rax
  mov    (%rax),%eax
  mov    -0x1c(%rbp),%edx
  sar    $0x8,%edx
  cmp    %edx,%eax
  je     L34
  mov    -0x1c(%rbp),%edx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    $0x14000004,%rax
  sar    $0x8,%edx
  mov    %edx,(%rax)
  mov    $0x0,%eax
  call   <flexram_wait@plt>
  jmp    L34
L57:
  nop
L34:
  leave
  ret
```

assistant: ```c
void eeprom_write_word(uint16_t *addr, uint16_t value) {
  uint32_t offset = (uint32_t)addr;
  if (offset >= 2048 - 1)
    return;
  if (!((*(volatile uint8_t *)0x40020001) & ((uint8_t)0x01)))
    eeprom_initialize();
  if ((offset & 1) == 0) {
    if (*(uint16_t *)(&((uint8_t *)0x14000000)[offset]) != value) {
      *(uint16_t *)(&((uint8_t *)0x14000000)[offset]) = value;
      flexram_wait();
    }
  } else {
    if (((uint8_t *)0x14000000)[offset] != value) {
      ((uint8_t *)0x14000000)[offset] = value;
      flexram_wait();
    }
    if (((uint8_t *)0x14000000)[offset + 1] != (value >> 8)) {
      ((uint8_t *)0x14000000)[offset + 1] = value >> 8;
      flexram_wait();
    }
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<eeprom_write_word>:
  endbr64
  push   %rbx
  sub    $0x10,%rsp
  mov    %esi,0xc(%rsp)
  cmp    $0x7fe,%edi
  jg     L63
  mov    %rdi,%rbx
  mov    0x40020001,%eax
  test   $0x1,%al
  je     L42
L97:
  test   $0x1,%bl
  jne    L47
  movslq %ebx,%rbx
  mov    0x14000000(,%rbx,4),%edx
  mov    0xc(%rsp),%eax
  cmp    %eax,%edx
  jne    L24
L63:
  add    $0x10,%rsp
  pop    %rbx
  ret
L42:
  mov    $0x0,%eax
  call   <eeprom_initialize@plt>
  jmp    L97
L24:
  mov    0xc(%rsp),%eax
  mov    %eax,0x14000000(,%rbx,4)
  mov    $0x0,%eax
  call   <flexram_wait@plt>
  jmp    L63
L47:
  movslq %ebx,%rbx
  mov    0x14000000(,%rbx,4),%edx
  mov    0xc(%rsp),%eax
  cmp    %eax,%edx
  jne    L38
L83:
  mov    0x14000004(,%rbx,4),%edx
  mov    0xc(%rsp),%eax
  sar    $0x8,%eax
  cmp    %eax,%edx
  je     L63
  mov    0xc(%rsp),%eax
  sar    $0x8,%eax
  mov    %eax,0x14000004(,%rbx,4)
  mov    $0x0,%eax
  call   <flexram_wait@plt>
  jmp    L63
L38:
  mov    0xc(%rsp),%eax
  mov    %eax,0x14000000(,%rbx,4)
  mov    $0x0,%eax
  call   <flexram_wait@plt>
  jmp    L83
```

assistant: ```c
void eeprom_write_word(uint16_t *addr, uint16_t value) {
  uint32_t offset = (uint32_t)addr;
  if (offset >= 2048 - 1)
    return;
  if (!((*(volatile uint8_t *)0x40020001) & ((uint8_t)0x01)))
    eeprom_initialize();
  if ((offset & 1) == 0) {
    if (*(uint16_t *)(&((uint8_t *)0x14000000)[offset]) != value) {
      *(uint16_t *)(&((uint8_t *)0x14000000)[offset]) = value;
      flexram_wait();
    }
  } else {
    if (((uint8_t *)0x14000000)[offset] != value) {
      ((uint8_t *)0x14000000)[offset] = value;
      flexram_wait();
    }
    if (((uint8_t *)0x14000000)[offset + 1] != (value >> 8)) {
      ((uint8_t *)0x14000000)[offset + 1] = value >> 8;
      flexram_wait();
    }
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<eeprom_write_word>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %esi,0xc(%rsp)
  cmp    $0x7fe,%edi
  jg     L60
  mov    0x40020001,%eax
  mov    %rdi,%rbx
  test   $0x1,%al
  je     L31
L32:
  movslq %ebx,%rbp
  and    $0x1,%ebx
  mov    0x14000000(,%rbp,4),%edx
  mov    0xc(%rsp),%eax
  jne    L27
  cmp    %eax,%edx
  jne    L34
L60:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L27:
  cmp    %eax,%edx
  jne    L62
L67:
  mov    0x14000004(,%rbp,4),%edx
  mov    0xc(%rsp),%eax
  sar    $0x8,%eax
  cmp    %eax,%edx
  je     L60
  mov    0xc(%rsp),%eax
  sar    $0x8,%eax
  mov    %eax,0x14000004(,%rbp,4)
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  jmp    1060 <flexram_wait@plt>
  nopl   0x0(%rax)
L31:
  xor    %eax,%eax
  call   <eeprom_initialize@plt>
  jmp    L32
  nopl   0x0(%rax)
L34:
  mov    0xc(%rsp),%eax
  mov    %eax,0x14000000(,%rbp,4)
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  jmp    1060 <flexram_wait@plt>
  nopl   0x0(%rax,%rax,1)
L62:
  mov    0xc(%rsp),%eax
  mov    %eax,0x14000000(,%rbp,4)
  xor    %eax,%eax
  call   <flexram_wait@plt>
  jmp    L67
```

assistant: ```c
void eeprom_write_word(uint16_t *addr, uint16_t value) {
  uint32_t offset = (uint32_t)addr;
  if (offset >= 2048 - 1)
    return;
  if (!((*(volatile uint8_t *)0x40020001) & ((uint8_t)0x01)))
    eeprom_initialize();
  if ((offset & 1) == 0) {
    if (*(uint16_t *)(&((uint8_t *)0x14000000)[offset]) != value) {
      *(uint16_t *)(&((uint8_t *)0x14000000)[offset]) = value;
      flexram_wait();
    }
  } else {
    if (((uint8_t *)0x14000000)[offset] != value) {
      ((uint8_t *)0x14000000)[offset] = value;
      flexram_wait();
    }
    if (((uint8_t *)0x14000000)[offset + 1] != (value >> 8)) {
      ((uint8_t *)0x14000000)[offset + 1] = value >> 8;
      flexram_wait();
    }
  }
}
```