ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 这段汇编代码用C语言表示是什么样的:

```asm
<WRITE>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x18(%rbp)
  jmp    L20
L22:
  mov    -0x18(%rbp),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x14(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jg     L36
  mov    $0xffffffff,%eax
  jmp    L16
L36:
  mov    -0x4(%rbp),%eax
  sub    %eax,-0x18(%rbp)
  mov    -0x4(%rbp),%eax
  cltq
  add    %rax,-0x20(%rbp)
L20:
  cmpl   $0x0,-0x18(%rbp)
  jg     L22
  mov    $0x0,%eax
L16:
  leave
  ret
```

assistant: ```c
int WRITE(int sock, char *s, int len) {
  while (len > 0) {
    int rc = write(sock, s, len);
    if (rc <= 0)
      return -1;
    len -= rc;
    s += rc;
  }
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<WRITE>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r12d
  mov    %rsi,%rbp
  mov    %edx,%ebx
  test   %edx,%edx
  jle    L32
L1:
  mov    %ebx,%edx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <write@plt>
  test   %eax,%eax
  jle    L5
  sub    %eax,%ebx
  cltq
  add    %rax,%rbp
  test   %ebx,%ebx
  jg     L1
  mov    $0x0,%eax
  jmp    L36
L32:
  mov    $0x0,%eax
  jmp    L36
L5:
  mov    $0xffffffff,%eax
L36:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int WRITE(int sock, char *s, int len) {
  while (len > 0) {
    int rc = write(sock, s, len);
    if (rc <= 0)
      return -1;
    len -= rc;
    s += rc;
  }
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<WRITE>:
  endbr64
  test   %edx,%edx
  jle    L3
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %edx,%ebx
  jmp    L28
  nopl   (%rax)
L10:
  sub    %eax,%ebx
  cltq
  add    %rax,%r12
  test   %ebx,%ebx
  jle    L19
L28:
  mov    %ebx,%edx
  mov    %r12,%rsi
  mov    %ebp,%edi
  call   <write@plt>
  test   %eax,%eax
  jg     L10
  pop    %rbx
  mov    $0xffffffff,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L19:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
L3:
  xor    %eax,%eax
  ret
```

assistant: ```c
int WRITE(int sock, char *s, int len) {
  while (len > 0) {
    int rc = write(sock, s, len);
    if (rc <= 0)
      return -1;
    len -= rc;
    s += rc;
  }
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<WRITE>:
  endbr64
  test   %edx,%edx
  jle    L22
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %edx,%ebx
  jmp    L5
  nopl   (%rax)
L18:
  sub    %eax,%ebx
  cltq
  add    %rax,%r12
  test   %ebx,%ebx
  jle    L4
L5:
  mov    %ebx,%edx
  mov    %r12,%rsi
  mov    %ebp,%edi
  call   <write@plt>
  test   %eax,%eax
  jg     L18
  pop    %rbx
  mov    $0xffffffff,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L4:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
L22:
  xor    %eax,%eax
  ret
```

assistant: ```c
int WRITE(int sock, char *s, int len) {
  while (len > 0) {
    int rc = write(sock, s, len);
    if (rc <= 0)
      return -1;
    len -= rc;
    s += rc;
  }
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<print_hexbuf>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movabs $0x3736353433323130,%rax
  movabs $0x6665646362613938,%rdx
  mov    %rax,-0x20(%rbp)
  mov    %rdx,-0x18(%rbp)
  movb   $0x0,-0x10(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L2
L10:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  shr    $0x4,%al
  movzbl %al,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xf,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  movsbl %al,%edx
  mov    -0x28(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  addl   $0x1,-0x2c(%rbp)
L2:
  mov    -0x2c(%rbp),%eax
  cltq
  cmp    %rax,-0x40(%rbp)
  jg     L10
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L9
  call   <__stack_chk_fail@plt>
L9:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D7
data_type: string

tool: D7: %c%c

assistant: ```c
void print_hexbuf(const unsigned char *buffer, long len) {
  char hexdigits[] = "0123456789abcdef";
  for (int i = 0; i < len; i++) {
    int nib1 = buffer[i] >> 4;
    int nib2 = buffer[i] & 15;
    printf("%c%c", hexdigits[nib1], hexdigits[nib2]);
  }
}
```
user: What is the c source code of the assembly code below?

```asm
<print_hexbuf>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movabs $0x3736353433323130,%rax
  movabs $0x6665646362613938,%rdx
  mov    %rax,(%rsp)
  mov    %rdx,0x8(%rsp)
  movb   $0x0,0x10(%rsp)
  test   %rsi,%rsi
  jle    L19
  mov    %rdi,%rbx
  lea    (%rdi,%rsi,1),%rbp
  lea    D3(%rip),%r12
L1:
  movzbl (%rbx),%eax
  mov    %rax,%rdx
  and    $0xf,%edx
  movsbl (%rsp,%rdx,1),%edx
  shr    $0x4,%al
  and    $0xf,%eax
  movsbl (%rsp,%rax,1),%esi
  mov    %r12,%rdi
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  jne    L1
L19:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L16
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L16:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D3
data_type: string

tool: D3: %c%c

assistant: ```c
void print_hexbuf(const unsigned char *buffer, long len) {
  char hexdigits[] = "0123456789abcdef";
  for (int i = 0; i < len; i++) {
    int nib1 = buffer[i] >> 4;
    int nib2 = buffer[i] & 15;
    printf("%c%c", hexdigits[nib1], hexdigits[nib2]);
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<print_hexbuf>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  movdqa D8(%rip),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movb   $0x0,0x10(%rsp)
  movaps %xmm0,(%rsp)
  test   %rsi,%rsi
  jle    L3
  mov    %rdi,%rbx
  lea    (%rdi,%rsi,1),%rbp
  lea    D13(%rip),%r12
L17:
  movzbl (%rbx),%eax
  mov    %r12,%rdi
  add    $0x1,%rbx
  mov    %rax,%rdx
  shr    $0x4,%al
  and    $0xf,%eax
  and    $0xf,%edx
  movsbl (%rsp,%rdx,1),%edx
  movsbl (%rsp,%rax,1),%esi
  call   <printf@plt>
  cmp    %rbx,%rbp
  jne    L17
L3:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L22
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L22:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D8
type: byte[16]
name: read_data
arguments: label: D13
type: string

tool: {"D8": [0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x61,0x62,0x63,0x64,0x65,0x66]}

tool: D13: %c%c

assistant: ```c
void print_hexbuf(const unsigned char *buffer, long len) {
  char hexdigits[] = "0123456789abcdef";
  for (int i = 0; i < len; i++) {
    int nib1 = buffer[i] >> 4;
    int nib2 = buffer[i] & 15;
    printf("%c%c", hexdigits[nib1], hexdigits[nib2]);
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<print_hexbuf>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  movdqa D2(%rip),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movb   $0x0,0x10(%rsp)
  movaps %xmm0,(%rsp)
  test   %rsi,%rsi
  jle    L15
  mov    %rdi,%rbx
  lea    (%rdi,%rsi,1),%rbp
  lea    D17(%rip),%r12
L9:
  movzbl (%rbx),%eax
  mov    %r12,%rdi
  add    $0x1,%rbx
  mov    %rax,%rdx
  shr    $0x4,%al
  and    $0xf,%eax
  and    $0xf,%edx
  movsbl (%rsp,%rdx,1),%edx
  movsbl (%rsp,%rax,1),%esi
  call   <printf@plt>
  cmp    %rbx,%rbp
  jne    L9
L15:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L8:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D2
type_guessed: byte[16]
name: unpack_data
arguments: data_tag: D17
type_guessed: string

tool: {"D2": [0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x61,0x62,0x63,0x64,0x65,0x66]}

tool: D17: %c%c

assistant: ```c
void print_hexbuf(const unsigned char *buffer, long len) {
  char hexdigits[] = "0123456789abcdef";
  for (int i = 0; i < len; i++) {
    int nib1 = buffer[i] >> 4;
    int nib2 = buffer[i] & 15;
    printf("%c%c", hexdigits[nib1], hexdigits[nib2]);
  }
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<pkg_name_from_fname>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L31
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4(%rbp)
  mov    $0x0,%eax
  call   <dir_sep@plt>
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <ends_with@plt>
  test   %rax,%rax
  jne    L24
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  jmp    L30
L24:
  mov    -0x4(%rbp),%eax
L30:
  mov    %eax,-0x8(%rbp)
  jmp    L16
L31:
  movl   $0x0,-0x8(%rbp)
L16:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  lea    -0x2(%rax),%ecx
  mov    -0x20(%rbp),%rdx
  mov    -0x8(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <slice_str@plt>
  leave
  ret
```

assistant: ```c
char *pkg_name_from_fname(const char *root, const char *name) {
  int len_root, start;
  if (root != NULL) {
    len_root = strlen(root);
    start = (ends_with(root, dir_sep())) ? len_root : len_root + 1;
  } else {
    start = 0;
  }
  return slice_str(start, (strlen(name) - 2), name);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<pkg_name_from_fname>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbp
  mov    $0x0,%r12d
  test   %rdi,%rdi
  je     L9
  mov    %rdi,%rbx
  call   <strlen@plt>
  mov    %eax,%r12d
  mov    $0x0,%eax
  call   <dir_sep@plt>
  mov    %eax,%esi
  mov    %rbx,%rdi
  call   <ends_with@plt>
  cmp    $0x1,%rax
  adc    $0x0,%r12d
L9:
  mov    %rbp,%rdi
  call   <strlen@plt>
  lea    -0x2(%rax),%esi
  mov    %rbp,%rdx
  mov    %r12d,%edi
  call   <slice_str@plt>
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
char *pkg_name_from_fname(const char *root, const char *name) {
  int len_root, start;
  if (root != NULL) {
    len_root = strlen(root);
    start = (ends_with(root, dir_sep())) ? len_root : len_root + 1;
  } else {
    start = 0;
  }
  return slice_str(start, (strlen(name) - 2), name);
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<pkg_name_from_fname>:
  endbr64
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  test   %rdi,%rdi
  je     L7
  mov    %rdi,%rbp
  call   <strlen@plt>
  mov    %eax,%r13d
  xor    %eax,%eax
  call   <dir_sep@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  call   <ends_with@plt>
  cmp    $0x1,%rax
  adc    $0x0,%r13d
L7:
  mov    %r12,%rdi
  call   <strlen@plt>
  pop    %rbp
  mov    %r12,%rdx
  mov    %r13d,%edi
  pop    %r12
  lea    -0x2(%rax),%esi
  pop    %r13
  jmp    1080 <slice_str@plt>
```

assistant: ```c
char *pkg_name_from_fname(const char *root, const char *name) {
  int len_root, start;
  if (root != NULL) {
    len_root = strlen(root);
    start = (ends_with(root, dir_sep())) ? len_root : len_root + 1;
  } else {
    start = 0;
  }
  return slice_str(start, (strlen(name) - 2), name);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<pkg_name_from_fname>:
  endbr64
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  test   %rdi,%rdi
  je     L0
  mov    %rdi,%rbp
  call   <strlen@plt>
  mov    %eax,%r13d
  xor    %eax,%eax
  call   <dir_sep@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  call   <ends_with@plt>
  cmp    $0x1,%rax
  adc    $0x0,%r13d
L0:
  mov    %r12,%rdi
  call   <strlen@plt>
  pop    %rbp
  mov    %r12,%rdx
  mov    %r13d,%edi
  pop    %r12
  lea    -0x2(%rax),%esi
  pop    %r13
  jmp    1080 <slice_str@plt>
```

assistant: ```c
char *pkg_name_from_fname(const char *root, const char *name) {
  int len_root, start;
  if (root != NULL) {
    len_root = strlen(root);
    start = (ends_with(root, dir_sep())) ? len_root : len_root + 1;
  } else {
    start = 0;
  }
  return slice_str(start, (strlen(name) - 2), name);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<xrop3_247_1_0>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,%edx
  mov    %esi,%eax
  mov    %dl,-0x24(%rbp)
  mov    %al,-0x28(%rbp)
  movl   $0xff,-0x14(%rbp)
  movzbl -0x24(%rbp),%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  movzbl -0x24(%rbp),%eax
  or     %edx,%eax
  mov    %eax,-0x10(%rbp)
  movzbl -0x28(%rbp),%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  movzbl -0x28(%rbp),%eax
  or     %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x14(%rbp),%eax
  and    -0x10(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  notl   -0x8(%rbp)
  mov    -0xc(%rbp),%eax
  or     -0x8(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x10(%rbp),%eax
  not    %eax
  and    -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  and    -0x10(%rbp),%eax
  or     %edx,%eax
  pop    %rbp
  ret
```

assistant: ```c
unsigned xrop3_247_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D & S;
  stk2 = ~stk2;
  stk1 = T | stk2;
  return (stk1 & (~S)) | (D & S);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<xrop3_247_1_0>:
  endbr64
  movzbl %dil,%edi
  mov    %edi,%edx
  shl    $0x8,%edx
  or     %edi,%edx
  movzbl %sil,%eax
  mov    %eax,%esi
  shl    $0x8,%esi
  or     %eax,%esi
  not    %edi
  or     %edi,%esi
  mov    %esi,%eax
  xor    $0xff,%al
  and    %edx,%eax
  xor    %esi,%eax
  ret
```

assistant: ```c
unsigned xrop3_247_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D & S;
  stk2 = ~stk2;
  stk1 = T | stk2;
  return (stk1 & (~S)) | (D & S);
}
```
user: Translate the below assembly code into C programming language:

```asm
<xrop3_247_1_0>:
  endbr64
  movzbl %dil,%edi
  movzbl %sil,%eax
  mov    %edi,%edx
  mov    %eax,%esi
  shl    $0x8,%edx
  shl    $0x8,%esi
  or     %edi,%edx
  or     %eax,%esi
  not    %edi
  or     %edi,%esi
  mov    %esi,%eax
  xor    $0xff,%al
  and    %edx,%eax
  xor    %esi,%eax
  ret
```

assistant: ```c
unsigned xrop3_247_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D & S;
  stk2 = ~stk2;
  stk1 = T | stk2;
  return (stk1 & (~S)) | (D & S);
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<xrop3_247_1_0>:
  endbr64
  movzbl %dil,%edi
  movzbl %sil,%eax
  mov    %edi,%edx
  mov    %eax,%esi
  shl    $0x8,%edx
  shl    $0x8,%esi
  or     %edi,%edx
  or     %eax,%esi
  not    %edi
  or     %edi,%esi
  mov    %esi,%eax
  xor    $0xff,%al
  and    %edx,%eax
  xor    %esi,%eax
  ret
```

assistant: ```c
unsigned xrop3_247_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D & S;
  stk2 = ~stk2;
  stk1 = T | stk2;
  return (stk1 & (~S)) | (D & S);
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<LCD_init>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <LCD_init_gpio@plt>
  mov    $0x0,%edx
  mov    $0x2,%esi
  mov    $0x40004000,%edi
  call   <GPIOPinWrite@plt>
  mov    $0x0,%eax
  call   <SysCtlClockGet@plt>
  movslq %eax,%rdx
  imul   $0x165e9f81,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x12,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,%edi
  call   <SysCtlDelay@plt>
  mov    $0xff,%edx
  mov    $0x2,%esi
  mov    $0x40004000,%edi
  call   <GPIOPinWrite@plt>
  mov    $0x0,%edx
  mov    $0x1,%esi
  mov    $0x40004000,%edi
  call   <GPIOPinWrite@plt>
  mov    $0x0,%eax
  call   <SysCtlClockGet@plt>
  movslq %eax,%rdx
  imul   $0x165e9f81,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x12,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,%edi
  call   <SysCtlDelay@plt>
  mov    $0xff,%edx
  mov    $0x1,%esi
  mov    $0x40004000,%edi
  call   <GPIOPinWrite@plt>
  mov    $0x0,%eax
  call   <SysCtlClockGet@plt>
  movslq %eax,%rdx
  imul   $0x165e9f81,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x12,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,%edi
  call   <SysCtlDelay@plt>
  mov    $0x0,%esi
  mov    $0x21,%edi
  call   <LCD_write_byte@plt>
  mov    $0x0,%esi
  mov    $0xc8,%edi
  call   <LCD_write_byte@plt>
  mov    $0x0,%esi
  mov    $0x13,%edi
  call   <LCD_write_byte@plt>
  mov    $0x0,%esi
  mov    $0x6,%edi
  call   <LCD_write_byte@plt>
  mov    $0x0,%esi
  mov    $0x20,%edi
  call   <LCD_write_byte@plt>
  mov    $0x0,%esi
  mov    $0xc,%edi
  call   <LCD_write_byte@plt>
  mov    $0x0,%eax
  call   <LCD_clean@plt>
  nop
  pop    %rbp
  ret
```

assistant: ```c
void LCD_init(void) {
  LCD_init_gpio();
  GPIOPinWrite(0x40004000, 0x00000002, 0x00);
  SysCtlDelay((1) * (SysCtlClockGet() / 3000000));
  ;
  GPIOPinWrite(0x40004000, 0x00000002, 0xff);
  GPIOPinWrite(0x40004000, 0x00000001, 0x00);
  SysCtlDelay((1) * (SysCtlClockGet() / 3000000));
  ;
  GPIOPinWrite(0x40004000, 0x00000001, 0xff);
  SysCtlDelay((1) * (SysCtlClockGet() / 3000000));
  ;
  LCD_write_byte(0x21, 0);
  LCD_write_byte(0xc8, 0);
  LCD_write_byte(0x13, 0);
  LCD_write_byte(0x06, 0);
  LCD_write_byte(0x20, 0);
  LCD_write_byte(0x0c, 0);
  LCD_clean();
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<LCD_init>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <LCD_init_gpio@plt>
  mov    $0x0,%edx
  mov    $0x2,%esi
  mov    $0x40004000,%edi
  call   <GPIOPinWrite@plt>
  mov    $0x0,%eax
  call   <SysCtlClockGet@plt>
  movslq %eax,%rdi
  imul   $0x165e9f81,%rdi,%rdi
  sar    $0x32,%rdi
  sar    $0x1f,%eax
  sub    %eax,%edi
  call   <SysCtlDelay@plt>
  mov    $0xff,%edx
  mov    $0x2,%esi
  mov    $0x40004000,%edi
  call   <GPIOPinWrite@plt>
  mov    $0x0,%edx
  mov    $0x1,%esi
  mov    $0x40004000,%edi
  call   <GPIOPinWrite@plt>
  mov    $0x0,%eax
  call   <SysCtlClockGet@plt>
  movslq %eax,%rdi
  imul   $0x165e9f81,%rdi,%rdi
  sar    $0x32,%rdi
  sar    $0x1f,%eax
  sub    %eax,%edi
  call   <SysCtlDelay@plt>
  mov    $0xff,%edx
  mov    $0x1,%esi
  mov    $0x40004000,%edi
  call   <GPIOPinWrite@plt>
  mov    $0x0,%eax
  call   <SysCtlClockGet@plt>
  movslq %eax,%rdi
  imul   $0x165e9f81,%rdi,%rdi
  sar    $0x32,%rdi
  sar    $0x1f,%eax
  sub    %eax,%edi
  call   <SysCtlDelay@plt>
  mov    $0x0,%esi
  mov    $0x21,%edi
  call   <LCD_write_byte@plt>
  mov    $0x0,%esi
  mov    $0xc8,%edi
  call   <LCD_write_byte@plt>
  mov    $0x0,%esi
  mov    $0x13,%edi
  call   <LCD_write_byte@plt>
  mov    $0x0,%esi
  mov    $0x6,%edi
  call   <LCD_write_byte@plt>
  mov    $0x0,%esi
  mov    $0x20,%edi
  call   <LCD_write_byte@plt>
  mov    $0x0,%esi
  mov    $0xc,%edi
  call   <LCD_write_byte@plt>
  mov    $0x0,%eax
  call   <LCD_clean@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void LCD_init(void) {
  LCD_init_gpio();
  GPIOPinWrite(0x40004000, 0x00000002, 0x00);
  SysCtlDelay((1) * (SysCtlClockGet() / 3000000));
  ;
  GPIOPinWrite(0x40004000, 0x00000002, 0xff);
  GPIOPinWrite(0x40004000, 0x00000001, 0x00);
  SysCtlDelay((1) * (SysCtlClockGet() / 3000000));
  ;
  GPIOPinWrite(0x40004000, 0x00000001, 0xff);
  SysCtlDelay((1) * (SysCtlClockGet() / 3000000));
  ;
  LCD_write_byte(0x21, 0);
  LCD_write_byte(0xc8, 0);
  LCD_write_byte(0x13, 0);
  LCD_write_byte(0x06, 0);
  LCD_write_byte(0x20, 0);
  LCD_write_byte(0x0c, 0);
  LCD_clean();
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<LCD_init>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <LCD_init_gpio@plt>
  xor    %edx,%edx
  mov    $0x2,%esi
  mov    $0x40004000,%edi
  call   <GPIOPinWrite@plt>
  xor    %eax,%eax
  call   <SysCtlClockGet@plt>
  movslq %eax,%rdi
  sar    $0x1f,%eax
  imul   $0x165e9f81,%rdi,%rdi
  sar    $0x32,%rdi
  sub    %eax,%edi
  call   <SysCtlDelay@plt>
  mov    $0xff,%edx
  mov    $0x2,%esi
  mov    $0x40004000,%edi
  call   <GPIOPinWrite@plt>
  xor    %edx,%edx
  mov    $0x1,%esi
  mov    $0x40004000,%edi
  call   <GPIOPinWrite@plt>
  xor    %eax,%eax
  call   <SysCtlClockGet@plt>
  movslq %eax,%rdi
  sar    $0x1f,%eax
  imul   $0x165e9f81,%rdi,%rdi
  sar    $0x32,%rdi
  sub    %eax,%edi
  call   <SysCtlDelay@plt>
  mov    $0xff,%edx
  mov    $0x1,%esi
  mov    $0x40004000,%edi
  call   <GPIOPinWrite@plt>
  xor    %eax,%eax
  call   <SysCtlClockGet@plt>
  movslq %eax,%rdi
  sar    $0x1f,%eax
  imul   $0x165e9f81,%rdi,%rdi
  sar    $0x32,%rdi
  sub    %eax,%edi
  call   <SysCtlDelay@plt>
  xor    %esi,%esi
  mov    $0x21,%edi
  call   <LCD_write_byte@plt>
  xor    %esi,%esi
  mov    $0xc8,%edi
  call   <LCD_write_byte@plt>
  xor    %esi,%esi
  mov    $0x13,%edi
  call   <LCD_write_byte@plt>
  xor    %esi,%esi
  mov    $0x6,%edi
  call   <LCD_write_byte@plt>
  xor    %esi,%esi
  mov    $0x20,%edi
  call   <LCD_write_byte@plt>
  xor    %esi,%esi
  mov    $0xc,%edi
  call   <LCD_write_byte@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    10c0 <LCD_clean@plt>
```

assistant: ```c
void LCD_init(void) {
  LCD_init_gpio();
  GPIOPinWrite(0x40004000, 0x00000002, 0x00);
  SysCtlDelay((1) * (SysCtlClockGet() / 3000000));
  ;
  GPIOPinWrite(0x40004000, 0x00000002, 0xff);
  GPIOPinWrite(0x40004000, 0x00000001, 0x00);
  SysCtlDelay((1) * (SysCtlClockGet() / 3000000));
  ;
  GPIOPinWrite(0x40004000, 0x00000001, 0xff);
  SysCtlDelay((1) * (SysCtlClockGet() / 3000000));
  ;
  LCD_write_byte(0x21, 0);
  LCD_write_byte(0xc8, 0);
  LCD_write_byte(0x13, 0);
  LCD_write_byte(0x06, 0);
  LCD_write_byte(0x20, 0);
  LCD_write_byte(0x0c, 0);
  LCD_clean();
}
```