ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将以下的汇编代码转换成C语言代码：

```asm
<nextStringLine>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    (%rdi),%rdx
  movzbl (%rdx),%eax
  mov    %rdx,%rbx
  cmp    $0xa,%al
  je     L24
  test   %al,%al
  je     L24
  nopl   0x0(%rax,%rax,1)
L77:
  mov    %rbx,%rbp
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  cmp    $0xa,%al
  je     L81
  test   %al,%al
  jne    L77
L81:
  mov    %rbx,%r14
  xor    %r13d,%r13d
  sub    %rdx,%r14
  je     L13
  lea    0x1(%r14),%rdi
  call   <eMalloc@plt>
  mov    (%r12),%rsi
  mov    %r14,%rdx
  mov    %rax,%r13
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,0x0(%r13,%r14,1)
  movzbl 0x1(%rbp),%eax
L13:
  cmp    $0xa,%al
  je     L2
  cmp    $0xd,%al
  je     L0
L32:
  mov    %rbx,(%r12)
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L0:
  cmpb   $0xa,0x1(%rbx)
  je     L16
L2:
  add    $0x1,%rbx
  mov    %r13,%rax
  mov    %rbx,(%r12)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L16:
  add    $0x2,%rbx
  jmp    L32
L24:
  xor    %r13d,%r13d
  jmp    L13
```

assistant: ```c
char *nextStringLine(const char **const next) {
  char *result = NULL;
  size_t length;
  const char *end;
  ;
  for (end = *next; *end != '\n' && *end != '\0'; ++end)
    ;
  length = end - *next;
  if (length > 0) {
    result = (char *)eMalloc((size_t)(length + 1) * sizeof(char));
    strncpy(result, *next, length);
    result[length] = '\0';
  }
  if (*end == '\n')
    ++end;
  else if (*end == '\r') {
    ++end;
    if (*end == '\n')
      ++end;
  }
  *next = end;
  return result;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<fun>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    D6(%rip),%rax
  mov    (%rax),%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  add    %eax,%eax
  cltq
  lea    0x1(%rax),%rdx
  lea    -0x11(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  add    $0x7,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %dl,(%rax)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L2
  call   <__stack_chk_fail@plt>
L2:
  leave
  ret
```

assistant: ```c
void fun() {
  char c;
  char *ret;
  ret = &c + sizeof(c) + 2 * (__WORDSIZE / 8);
  *ret += 0x7;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<fun>:
  endbr64
  ret
```

assistant: ```c
void fun() {
  char c;
  char *ret;
  ret = &c + sizeof(c) + 2 * (__WORDSIZE / 8);
  *ret += 0x7;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<fun>:
  endbr64
  ret
```

assistant: ```c
void fun() {
  char c;
  char *ret;
  ret = &c + sizeof(c) + 2 * (__WORDSIZE / 8);
  *ret += 0x7;
}
```
user: What is the c source code of the assembly code below:

```asm
<fun>:
  endbr64
  ret
```

assistant: ```c
void fun() {
  char c;
  char *ret;
  ret = &c + sizeof(c) + 2 * (__WORDSIZE / 8);
  *ret += 0x7;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  movsd  D8(%rip),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoll@plt>
  mov    %rax,-0x20(%rbp)
  subq   $0x80000,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  shl    $0xa,%rax
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  movsd  D8(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  fildll -0x20(%rbp)
  fldt   0xe49(%rip)        # 2010 <_fini+0xdd0>
  fdivrp %st,%st(1)
  fstpt  -0x10(%rbp)
  push   -0x8(%rbp)
  push   -0x10(%rbp)
  call   <sqrtl@plt>
  add    $0x10,%rsp
  fstpt  -0x10(%rbp)
  fldt   -0x10(%rbp)
  fnstcw -0x36(%rbp)
  movzwl -0x36(%rbp),%eax
  or     $0xc,%ah
  mov    %ax,-0x38(%rbp)
  fldcw  -0x38(%rbp)
  fistpl -0x48(%rbp)
  fldcw  -0x36(%rbp)
  mov    -0x48(%rbp),%eax
  lea    0x7f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x7,%eax
  cltq
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  shl    $0x7,%rax
  mov    %rax,-0x48(%rbp)
  fildll -0x48(%rbp)
  fstpt  -0x10(%rbp)
  push   -0x8(%rbp)
  push   -0x10(%rbp)
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  add    $0x10,%rsp
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D8
type: byte[8]
name: retrieve_data
arguments: data_tag: D3
type: string

tool: {"D8": [0x14,0xae,0x47,0xe1,0x7a,0x14,0xee,0x3f]}

tool: D3: %.0Lf


assistant: ```c
int main(int argc, char **argv) {
  long long int ram;
  long int divider;
  long double n;
  long double jn;
  double mem_percent = .94;
  ;
  ram = atoll(argv[1]);
  ram = ram - 1024 * 512;
  ;
  ram = ram * 1024 * .94;
  ;
  n = (long double)ram / 8;
  n = sqrtl(n);
  divider = (int)n / 128;
  n = divider * 128;
  printf("%.0Lf\n", n);
}
```
user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  mov    0x8(%rsi),%rdi
  call   <atoll@plt>
  sub    $0x80000,%rax
  shl    $0xa,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  mulsd  D8(%rip),%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,(%rsp)
  fildll (%rsp)
  fmuls  0xe79(%rip)        # 2010 <_fini+0xe08>
  fldz
  fucomip %st(1),%st
  ja     L10
  fsqrt
L8:
  fnstcw 0xe(%rsp)
  movzwl 0xe(%rsp),%eax
  or     $0xc,%ah
  mov    %ax,0xc(%rsp)
  fldcw  0xc(%rsp)
  fistpl (%rsp)
  fldcw  0xe(%rsp)
  mov    (%rsp),%edx
  lea    0x7f(%rdx),%eax
  test   %edx,%edx
  cmovns %edx,%eax
  sar    $0x7,%eax
  cltq
  shl    $0x7,%rax
  mov    %rax,(%rsp)
  fildll (%rsp)
  lea    -0x10(%rsp),%rsp
  fstpt  (%rsp)
  lea    D1(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  add    $0x28,%rsp
  ret
L10:
  lea    -0x10(%rsp),%rsp
  fstpt  (%rsp)
  call   <sqrtl@plt>
  add    $0x10,%rsp
  jmp    L8
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D8
type_guessed: byte[8]
name: extract_symbolic_data
arguments: data_label: D1
type_guessed: string

tool: {"D8": [0x14,0xae,0x47,0xe1,0x7a,0x14,0xee,0x3f]}

tool: D1: %.0Lf


assistant: ```c
int main(int argc, char **argv) {
  long long int ram;
  long int divider;
  long double n;
  long double jn;
  double mem_percent = .94;
  ;
  ram = atoll(argv[1]);
  ram = ram - 1024 * 512;
  ;
  ram = ram * 1024 * .94;
  ;
  n = (long double)ram / 8;
  n = sqrtl(n);
  divider = (int)n / 128;
  n = divider * 128;
  printf("%.0Lf\n", n);
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  mov    0x8(%rsi),%rdi
  call   <atoll@plt>
  pxor   %xmm0,%xmm0
  sub    $0x80000,%rax
  shl    $0xa,%rax
  cvtsi2sd %rax,%xmm0
  mulsd  D10(%rip),%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,(%rsp)
  fildll (%rsp)
  fmuls  0xf32(%rip)        # 2010 <_fini+0xe04>
  fldz
  fucomip %st(1),%st
  ja     L10
  fsqrt
L17:
  fnstcw 0xe(%rsp)
  lea    D7(%rip),%rdi
  movzwl 0xe(%rsp),%eax
  or     $0xc,%ah
  mov    %ax,0xc(%rsp)
  fldcw  0xc(%rsp)
  fistpl (%rsp)
  fldcw  0xe(%rsp)
  mov    (%rsp),%edx
  test   %edx,%edx
  lea    0x7f(%rdx),%eax
  cmovns %edx,%eax
  sub    $0x10,%rsp
  sar    $0x7,%eax
  cltq
  shl    $0x7,%rax
  mov    %rax,0x10(%rsp)
  fildll 0x10(%rsp)
  fstpt  (%rsp)
  call   <printf@plt>
  xor    %eax,%eax
  add    $0x28,%rsp
  ret
L10:
  push   %rax
  push   %rax
  fstpt  (%rsp)
  call   <sqrtl@plt>
  pop    %rdx
  pop    %rcx
  jmp    L17
```

tool_calls: name: parse_data
arguments: tag: D10
type_infered: byte[8]
name: parse_data
arguments: tag: D7
type_infered: string

tool: {"D10": [0x14,0xae,0x47,0xe1,0x7a,0x14,0xee,0x3f]}

tool: D7: %.0Lf


assistant: ```c
int main(int argc, char **argv) {
  long long int ram;
  long int divider;
  long double n;
  long double jn;
  double mem_percent = .94;
  ;
  ram = atoll(argv[1]);
  ram = ram - 1024 * 512;
  ;
  ram = ram * 1024 * .94;
  ;
  n = (long double)ram / 8;
  n = sqrtl(n);
  divider = (int)n / 128;
  n = divider * 128;
  printf("%.0Lf\n", n);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  mov    0x8(%rsi),%rdi
  call   <atoll@plt>
  pxor   %xmm0,%xmm0
  sub    $0x80000,%rax
  shl    $0xa,%rax
  cvtsi2sd %rax,%xmm0
  mulsd  D17(%rip),%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,(%rsp)
  fildll (%rsp)
  fmuls  0xf32(%rip)        # 2010 <_fini+0xe04>
  fldz
  fucomip %st(1),%st
  ja     L10
  fsqrt
L18:
  fnstcw 0xe(%rsp)
  lea    D7(%rip),%rdi
  movzwl 0xe(%rsp),%eax
  or     $0xc,%ah
  mov    %ax,0xc(%rsp)
  fldcw  0xc(%rsp)
  fistpl (%rsp)
  fldcw  0xe(%rsp)
  mov    (%rsp),%edx
  test   %edx,%edx
  lea    0x7f(%rdx),%eax
  cmovns %edx,%eax
  sub    $0x10,%rsp
  sar    $0x7,%eax
  cltq
  shl    $0x7,%rax
  mov    %rax,0x10(%rsp)
  fildll 0x10(%rsp)
  fstpt  (%rsp)
  call   <printf@plt>
  xor    %eax,%eax
  add    $0x28,%rsp
  ret
L10:
  push   %rax
  push   %rax
  fstpt  (%rsp)
  call   <sqrtl@plt>
  pop    %rdx
  pop    %rcx
  jmp    L18
```

tool_calls: name: parse_data
arguments: label: D17
datatype: byte[8]
name: parse_data
arguments: label: D7
datatype: string

tool: {"D17": [0x14,0xae,0x47,0xe1,0x7a,0x14,0xee,0x3f]}

tool: D7: %.0Lf


assistant: ```c
int main(int argc, char **argv) {
  long long int ram;
  long int divider;
  long double n;
  long double jn;
  double mem_percent = .94;
  ;
  ram = atoll(argv[1]);
  ram = ram - 1024 * 512;
  ;
  ram = ram * 1024 * .94;
  ;
  n = (long double)ram / 8;
  n = sqrtl(n);
  divider = (int)n / 128;
  n = divider * 128;
  printf("%.0Lf\n", n);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <ncurs_init@plt>
  mov    $0x0,%eax
  call   <ncurs_cleanup@plt>
  mov    $0x0,%eax
  pop    %rbp
  ret
```

assistant: ```c
int main() {
  ncurs_init();
  ncurs_cleanup();
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <ncurs_init@plt>
  mov    $0x0,%eax
  call   <ncurs_cleanup@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main() {
  ncurs_init();
  ncurs_cleanup();
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <ncurs_init@plt>
  xor    %eax,%eax
  call   <ncurs_cleanup@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main() {
  ncurs_init();
  ncurs_cleanup();
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <ncurs_init@plt>
  xor    %eax,%eax
  call   <ncurs_cleanup@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main() {
  ncurs_init();
  ncurs_cleanup();
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<rpi2_delay_loop>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x34(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  je     L37
  movq   $0x3f003004,-0x20(%rbp)
  movq   $0x0,-0x28(%rbp)
  mov    -0x34(%rbp),%eax
  imul   $0x3e8,%eax,%eax
  mov    %eax,%eax
  mov    %rax,-0x18(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L26
L32:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  sub    -0x8(%rbp),%rax
  mov    %rax,-0x28(%rbp)
L26:
  mov    -0x28(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jl     L32
  jmp    L10
L37:
  nop
L10:
  pop    %rbp
  ret
```

assistant: ```c
void rpi2_delay_loop(unsigned int delay_ms) {
  uint32_t tm_start, tm_curr, tm_period, tm_delay;
  volatile uint32_t *tmr;
  if (delay_ms == 0)
    return;
  tmr = (volatile uint32_t *)0x3f003004;
  tm_period = 0;
  tm_delay = (uint32_t)(delay_ms * 1000);
  tm_start = tm_curr = *tmr;
  while (tm_period < tm_delay) {
    tm_curr = *tmr;
    tm_period = (uint32_t)(tm_curr - tm_start);
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<rpi2_delay_loop>:
  endbr64
  test   %edi,%edi
  je     L28
  imul   $0x3e8,%edi,%edi
  mov    %edi,%edx
  mov    0x3f003004,%rcx
  test   %rdx,%rdx
  jle    L28
L20:
  mov    0x3f003004,%rax
  sub    %rcx,%rax
  cmp    %rax,%rdx
  jg     L20
L28:
  ret
```

assistant: ```c
void rpi2_delay_loop(unsigned int delay_ms) {
  uint32_t tm_start, tm_curr, tm_period, tm_delay;
  volatile uint32_t *tmr;
  if (delay_ms == 0)
    return;
  tmr = (volatile uint32_t *)0x3f003004;
  tm_period = 0;
  tm_delay = (uint32_t)(delay_ms * 1000);
  tm_start = tm_curr = *tmr;
  while (tm_period < tm_delay) {
    tm_curr = *tmr;
    tm_period = (uint32_t)(tm_curr - tm_start);
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<rpi2_delay_loop>:
  endbr64
  test   %edi,%edi
  je     L11
  imul   $0x3e8,%edi,%edx
  mov    0x3f003004,%rcx
  test   %rdx,%rdx
  je     L11
  nopl   0x0(%rax,%rax,1)
L18:
  mov    0x3f003004,%rax
  sub    %rcx,%rax
  cmp    %rax,%rdx
  jg     L18
L11:
  ret
```

assistant: ```c
void rpi2_delay_loop(unsigned int delay_ms) {
  uint32_t tm_start, tm_curr, tm_period, tm_delay;
  volatile uint32_t *tmr;
  if (delay_ms == 0)
    return;
  tmr = (volatile uint32_t *)0x3f003004;
  tm_period = 0;
  tm_delay = (uint32_t)(delay_ms * 1000);
  tm_start = tm_curr = *tmr;
  while (tm_period < tm_delay) {
    tm_curr = *tmr;
    tm_period = (uint32_t)(tm_curr - tm_start);
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<rpi2_delay_loop>:
  endbr64
  test   %edi,%edi
  je     L7
  imul   $0x3e8,%edi,%edx
  mov    0x3f003004,%rcx
  test   %rdx,%rdx
  je     L7
  nopl   0x0(%rax,%rax,1)
L28:
  mov    0x3f003004,%rax
  sub    %rcx,%rax
  cmp    %rax,%rdx
  jg     L28
L7:
  ret
```

assistant: ```c
void rpi2_delay_loop(unsigned int delay_ms) {
  uint32_t tm_start, tm_curr, tm_period, tm_delay;
  volatile uint32_t *tmr;
  if (delay_ms == 0)
    return;
  tmr = (volatile uint32_t *)0x3f003004;
  tm_period = 0;
  tm_delay = (uint32_t)(delay_ms * 1000);
  tm_start = tm_curr = *tmr;
  while (tm_period < tm_delay) {
    tm_curr = *tmr;
    tm_period = (uint32_t)(tm_curr - tm_start);
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<get_nodelay>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    D1(%rip),%rax
  mov    (%rax),%edx
  mov    D2(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  pop    %rbp
  ret
```

assistant: ```c
int get_nodelay(int fd, void *optval, int *optlen) {
  errno = EOPNOTSUPP;
  return -1;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<get_nodelay>:
  endbr64
  mov    D9(%rip),%rax
  mov    (%rax),%edx
  mov    D8(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int get_nodelay(int fd, void *optval, int *optlen) {
  errno = EOPNOTSUPP;
  return -1;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<get_nodelay>:
  endbr64
  mov    D11(%rip),%rax
  mov    (%rax),%edx
  mov    D10(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int get_nodelay(int fd, void *optval, int *optlen) {
  errno = EOPNOTSUPP;
  return -1;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<get_nodelay>:
  endbr64
  mov    D1(%rip),%rax
  mov    (%rax),%edx
  mov    D11(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int get_nodelay(int fd, void *optval, int *optlen) {
  errno = EOPNOTSUPP;
  return -1;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<init_LCD>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0xe0028008,%eax
  mov    (%rax),%rdx
  mov    $0xe0028008,%eax
  or     $0x40400000,%rdx
  mov    %rdx,(%rax)
  mov    $0xe0028018,%eax
  mov    (%rax),%rdx
  mov    $0xe0028018,%eax
  or     $0x3ff0000,%rdx
  mov    %rdx,(%rax)
  mov    $0xe002801c,%eax
  movq   $0x2000000,(%rax)
  mov    $0xe002800c,%eax
  movq   $0x400000,(%rax)
  mov    $0xe0028004,%eax
  movq   $0x40000000,(%rax)
  mov    $0x38,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  mov    $0x38,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  mov    $0xf,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  mov    $0x1,%edi
  call   <send_instruction@plt>
  mov    $0xc062,%edi
  call   <delay@plt>
  mov    $0x6,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  nop
  pop    %rbp
  ret
```

assistant: ```c
void init_LCD(void) {
  (*((volatile unsigned long *)0xE0028008)) |= 0x00400000 | 0x40000000;
  (*((volatile unsigned long *)0xE0028018)) |= 0x00FF0000 | 0x02000000 | 0x01000000;
  (*((volatile unsigned long *)0xE002801C)) = 0x02000000;
  (*((volatile unsigned long *)0xE002800C)) = 0x00400000;
  (*((volatile unsigned long *)0xE0028004)) = 0x40000000;
  send_instruction(0x38);
  delay(1200);
  send_instruction(0x38);
  delay(1200);
  send_instruction(0x0F);
  delay(1200);
  send_instruction(0x01);
  delay(49250);
  send_instruction(0x06);
  delay(1200);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<init_LCD>:
  endbr64
  sub    $0x8,%rsp
  mov    $0xe0028008,%edx
  mov    (%rdx),%rax
  or     $0x40400000,%rax
  mov    %rax,(%rdx)
  lea    0x10(%rdx),%rdx
  mov    (%rdx),%rax
  or     $0x3ff0000,%rax
  mov    %rax,(%rdx)
  mov    $0xe002801c,%eax
  movq   $0x2000000,(%rax)
  lea    -0x10(%rax),%rax
  movq   $0x400000,(%rax)
  lea    -0x8(%rax),%rax
  movq   $0x40000000,(%rax)
  mov    $0x38,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  mov    $0x38,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  mov    $0xf,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  mov    $0x1,%edi
  call   <send_instruction@plt>
  mov    $0xc062,%edi
  call   <delay@plt>
  mov    $0x6,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void init_LCD(void) {
  (*((volatile unsigned long *)0xE0028008)) |= 0x00400000 | 0x40000000;
  (*((volatile unsigned long *)0xE0028018)) |= 0x00FF0000 | 0x02000000 | 0x01000000;
  (*((volatile unsigned long *)0xE002801C)) = 0x02000000;
  (*((volatile unsigned long *)0xE002800C)) = 0x00400000;
  (*((volatile unsigned long *)0xE0028004)) = 0x40000000;
  send_instruction(0x38);
  delay(1200);
  send_instruction(0x38);
  delay(1200);
  send_instruction(0x0F);
  delay(1200);
  send_instruction(0x01);
  delay(49250);
  send_instruction(0x06);
  delay(1200);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<init_LCD>:
  endbr64
  mov    $0xe0028008,%edx
  sub    $0x8,%rsp
  mov    $0x38,%edi
  mov    (%rdx),%rax
  or     $0x40400000,%rax
  mov    %rax,(%rdx)
  mov    0x10(%rdx),%rax
  or     $0x3ff0000,%rax
  mov    %rax,0x10(%rdx)
  mov    $0xe002801c,%eax
  movq   $0x2000000,(%rax)
  movq   $0x400000,-0x10(%rax)
  movq   $0x40000000,-0x18(%rax)
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  mov    $0x38,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  mov    $0xf,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  mov    $0x1,%edi
  call   <send_instruction@plt>
  mov    $0xc062,%edi
  call   <delay@plt>
  mov    $0x6,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  add    $0x8,%rsp
  jmp    1060 <delay@plt>
```

assistant: ```c
void init_LCD(void) {
  (*((volatile unsigned long *)0xE0028008)) |= 0x00400000 | 0x40000000;
  (*((volatile unsigned long *)0xE0028018)) |= 0x00FF0000 | 0x02000000 | 0x01000000;
  (*((volatile unsigned long *)0xE002801C)) = 0x02000000;
  (*((volatile unsigned long *)0xE002800C)) = 0x00400000;
  (*((volatile unsigned long *)0xE0028004)) = 0x40000000;
  send_instruction(0x38);
  delay(1200);
  send_instruction(0x38);
  delay(1200);
  send_instruction(0x0F);
  delay(1200);
  send_instruction(0x01);
  delay(49250);
  send_instruction(0x06);
  delay(1200);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<init_LCD>:
  endbr64
  mov    $0xe0028008,%edx
  sub    $0x8,%rsp
  mov    $0x38,%edi
  mov    (%rdx),%rax
  or     $0x40400000,%rax
  mov    %rax,(%rdx)
  mov    0x10(%rdx),%rax
  or     $0x3ff0000,%rax
  mov    %rax,0x10(%rdx)
  mov    $0xe002801c,%eax
  movq   $0x2000000,(%rax)
  movq   $0x400000,-0x10(%rax)
  movq   $0x40000000,-0x18(%rax)
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  mov    $0x38,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  mov    $0xf,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  call   <delay@plt>
  mov    $0x1,%edi
  call   <send_instruction@plt>
  mov    $0xc062,%edi
  call   <delay@plt>
  mov    $0x6,%edi
  call   <send_instruction@plt>
  mov    $0x4b0,%edi
  add    $0x8,%rsp
  jmp    1060 <delay@plt>
```

assistant: ```c
void init_LCD(void) {
  (*((volatile unsigned long *)0xE0028008)) |= 0x00400000 | 0x40000000;
  (*((volatile unsigned long *)0xE0028018)) |= 0x00FF0000 | 0x02000000 | 0x01000000;
  (*((volatile unsigned long *)0xE002801C)) = 0x02000000;
  (*((volatile unsigned long *)0xE002800C)) = 0x00400000;
  (*((volatile unsigned long *)0xE0028004)) = 0x40000000;
  send_instruction(0x38);
  delay(1200);
  send_instruction(0x38);
  delay(1200);
  send_instruction(0x0F);
  delay(1200);
  send_instruction(0x01);
  delay(49250);
  send_instruction(0x06);
  delay(1200);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<get_current_time>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x10(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <gettimeofday@plt>
  mov    -0x10(%rbp),%eax
  imul   $0xf4240,%eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  leave
  ret
```

assistant: ```c
int get_current_time(void) {
  struct timeval curtime;
  gettimeofday(&curtime, NULL);
  return (curtime.tv_sec * 1000000) + curtime.tv_usec;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<get_current_time>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  mov    $0x0,%esi
  call   <gettimeofday@plt>
  imul   $0xf4240,(%rsp),%eax
  add    0x4(%rsp),%eax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L4
  add    $0x18,%rsp
  ret
L4:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int get_current_time(void) {
  struct timeval curtime;
  gettimeofday(&curtime, NULL);
  return (curtime.tv_sec * 1000000) + curtime.tv_usec;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<get_current_time>:
  endbr64
  sub    $0x18,%rsp
  xor    %esi,%esi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  call   <gettimeofday@plt>
  imul   $0xf4240,(%rsp),%eax
  add    0x4(%rsp),%eax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L6
  add    $0x18,%rsp
  ret
L6:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int get_current_time(void) {
  struct timeval curtime;
  gettimeofday(&curtime, NULL);
  return (curtime.tv_sec * 1000000) + curtime.tv_usec;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<get_current_time>:
  endbr64
  sub    $0x18,%rsp
  xor    %esi,%esi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  call   <gettimeofday@plt>
  imul   $0xf4240,(%rsp),%eax
  add    0x4(%rsp),%eax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L8
  add    $0x18,%rsp
  ret
L8:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int get_current_time(void) {
  struct timeval curtime;
  gettimeofday(&curtime, NULL);
  return (curtime.tv_sec * 1000000) + curtime.tv_usec;
}
```