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

```asm
<EDMA3CrossBarChannelMap>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  shr    $0x2,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%edx
  mov    -0x1c(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x3,-0x4(%rbp)
  je     L7
  cmpl   $0x3,-0x4(%rbp)
  ja     L72
  cmpl   $0x2,-0x4(%rbp)
  je     L18
  cmpl   $0x2,-0x4(%rbp)
  ja     L72
  cmpl   $0x0,-0x4(%rbp)
  je     L47
  cmpl   $0x1,-0x4(%rbp)
  je     L105
  jmp    L72
L47:
  movl   $0x0,-0xc(%rbp)
  jmp    L26
L105:
  movl   $0x8,-0xc(%rbp)
  jmp    L26
L18:
  movl   $0x10,-0xc(%rbp)
  jmp    L26
L7:
  movl   $0x18,-0xc(%rbp)
  jmp    L26
L72:
  nop
L26:
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0xf90,%eax
  mov    %eax,%eax
  mov    (%rax),%esi
  mov    -0xc(%rbp),%eax
  mov    -0x18(%rbp),%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  not    %eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0xf90,%eax
  mov    %eax,%eax
  mov    %rax,%rdx
  mov    %esi,%eax
  and    %ecx,%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0xf90,%eax
  mov    %eax,%eax
  mov    (%rax),%esi
  mov    -0xc(%rbp),%eax
  mov    -0x18(%rbp),%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%ecx
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0xf90,%eax
  mov    %eax,%eax
  mov    %rax,%rdx
  mov    %esi,%eax
  or     %ecx,%eax
  mov    %eax,(%rdx)
  mov    $0x0,%eax
  pop    %rbp
  ret
```

assistant: ```c
unsigned int EDMA3CrossBarChannelMap(unsigned int baseAdd, unsigned int crossBarEvent, unsigned int Channel) {
  unsigned int offset;
  unsigned int select;
  unsigned int n = 0;
  offset = Channel / 4;
  select = Channel - offset * 4;
  switch (select) {
  case 0:
    n = 0;
    break;
  case 1:
    n = 8;
    break;
  case 2:
    n = 16;
    break;
  case 3:
    n = 24;
    break;
  default:
    break;
  }
  (*((volatile unsigned int *)(baseAdd + 0xF90 + ((offset)*4)))) &= ~(crossBarEvent << n);
  (*((volatile unsigned int *)(baseAdd + 0xF90 + ((offset)*4)))) |= crossBarEvent << n;
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<EDMA3CrossBarChannelMap>:
  endbr64
  mov    %edx,%eax
  and    $0xfffffffc,%eax
  and    $0x3,%edx
  mov    $0x10,%ecx
  cmp    $0x2,%edx
  je     L14
  mov    $0x18,%ecx
  cmp    $0x3,%edx
  je     L14
  cmp    $0x1,%edx
  sete   %cl
  movzbl %cl,%ecx
  shl    $0x3,%ecx
L14:
  lea    0xf90(%rax,%rdi,1),%eax
  mov    (%eax),%edi
  shl    %cl,%esi
  mov    %esi,%edx
  not    %edx
  and    %edi,%edx
  mov    %edx,(%eax)
  mov    (%eax),%edx
  or     %edx,%esi
  mov    %esi,(%eax)
  mov    $0x0,%eax
  ret
```

assistant: ```c
unsigned int EDMA3CrossBarChannelMap(unsigned int baseAdd, unsigned int crossBarEvent, unsigned int Channel) {
  unsigned int offset;
  unsigned int select;
  unsigned int n = 0;
  offset = Channel / 4;
  select = Channel - offset * 4;
  switch (select) {
  case 0:
    n = 0;
    break;
  case 1:
    n = 8;
    break;
  case 2:
    n = 16;
    break;
  case 3:
    n = 24;
    break;
  default:
    break;
  }
  (*((volatile unsigned int *)(baseAdd + 0xF90 + ((offset)*4)))) &= ~(crossBarEvent << n);
  (*((volatile unsigned int *)(baseAdd + 0xF90 + ((offset)*4)))) |= crossBarEvent << n;
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<EDMA3CrossBarChannelMap>:
  endbr64
  mov    %esi,%eax
  mov    %edx,%esi
  and    $0x3,%edx
  lea    -0x1(%rdx),%r8d
  lea    0x0(,%rdx,8),%ecx
  mov    %eax,%edx
  and    $0xfffffffc,%esi
  shl    %cl,%edx
  cmp    $0x3,%r8d
  cmovb  %edx,%eax
  lea    0xf90(%rsi,%rdi,1),%edx
  mov    (%edx),%esi
  mov    %eax,%ecx
  not    %ecx
  and    %esi,%ecx
  mov    %ecx,(%edx)
  mov    (%edx),%ecx
  or     %ecx,%eax
  mov    %eax,(%edx)
  xor    %eax,%eax
  ret
```

assistant: ```c
unsigned int EDMA3CrossBarChannelMap(unsigned int baseAdd, unsigned int crossBarEvent, unsigned int Channel) {
  unsigned int offset;
  unsigned int select;
  unsigned int n = 0;
  offset = Channel / 4;
  select = Channel - offset * 4;
  switch (select) {
  case 0:
    n = 0;
    break;
  case 1:
    n = 8;
    break;
  case 2:
    n = 16;
    break;
  case 3:
    n = 24;
    break;
  default:
    break;
  }
  (*((volatile unsigned int *)(baseAdd + 0xF90 + ((offset)*4)))) &= ~(crossBarEvent << n);
  (*((volatile unsigned int *)(baseAdd + 0xF90 + ((offset)*4)))) |= crossBarEvent << n;
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<EDMA3CrossBarChannelMap>:
  endbr64
  mov    %esi,%eax
  mov    %edx,%esi
  and    $0x3,%edx
  lea    -0x1(%rdx),%r8d
  lea    0x0(,%rdx,8),%ecx
  mov    %eax,%edx
  and    $0xfffffffc,%esi
  shl    %cl,%edx
  cmp    $0x3,%r8d
  cmovb  %edx,%eax
  lea    0xf90(%rsi,%rdi,1),%edx
  mov    (%edx),%esi
  mov    %eax,%ecx
  not    %ecx
  and    %esi,%ecx
  mov    %ecx,(%edx)
  mov    (%edx),%ecx
  or     %ecx,%eax
  mov    %eax,(%edx)
  xor    %eax,%eax
  ret
```

assistant: ```c
unsigned int EDMA3CrossBarChannelMap(unsigned int baseAdd, unsigned int crossBarEvent, unsigned int Channel) {
  unsigned int offset;
  unsigned int select;
  unsigned int n = 0;
  offset = Channel / 4;
  select = Channel - offset * 4;
  switch (select) {
  case 0:
    n = 0;
    break;
  case 1:
    n = 8;
    break;
  case 2:
    n = 16;
    break;
  case 3:
    n = 24;
    break;
  default:
    break;
  }
  (*((volatile unsigned int *)(baseAdd + 0xF90 + ((offset)*4)))) &= ~(crossBarEvent << n);
  (*((volatile unsigned int *)(baseAdd + 0xF90 + ((offset)*4)))) |= crossBarEvent << n;
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<evdns_debug_ntoa>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <ntohl@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  movzbl %al,%eax
  mov    -0x4(%rbp),%edx
  sar    $0x8,%edx
  movzbl %dl,%esi
  mov    -0x4(%rbp),%edx
  sar    $0x10,%edx
  movzbl %dl,%ecx
  mov    -0x4(%rbp),%edx
  shr    $0x18,%edx
  sub    $0x8,%rsp
  push   %rax
  mov    %esi,%r9d
  mov    %ecx,%r8d
  mov    %edx,%ecx
  lea    D6(%rip),%rax
  mov    %rax,%rdx
  mov    $0x20,%esi
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  call   <evutil_snprintf@plt>
  add    $0x10,%rsp
  lea    D26(%rip),%rax
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D6
datatype: string

tool: D6: %d.%d.%d.%d

assistant: ```c
const char *evdns_debug_ntoa(uint32_t address) {
  static char buf[32];
  uint32_t a = ntohl(address);
  evutil_snprintf(buf, sizeof(buf), "%d.%d.%d.%d", (int)(uint8_t)((a >> 24) & 0xff), (int)(uint8_t)((a >> 16) & 0xff), (int)(uint8_t)((a >> 8) & 0xff), (int)(uint8_t)((a)&0xff));
  return buf;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<evdns_debug_ntoa>:
  endbr64
  push   %rbx
  call   <ntohl@plt>
  movzbl %ah,%esi
  mov    %esi,%r9d
  mov    %eax,%r8d
  sar    $0x10,%r8d
  mov    %eax,%ecx
  shr    $0x18,%ecx
  sub    $0x8,%rsp
  movzbl %al,%eax
  push   %rax
  movzbl %r8b,%r8d
  lea    D19(%rip),%rdx
  mov    $0x20,%esi
  lea    D18(%rip),%rbx
  mov    %rbx,%rdi
  call   <evutil_snprintf@plt>
  add    $0x10,%rsp
  mov    %rbx,%rax
  pop    %rbx
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D19
type_guessed: string

tool: D19: %d.%d.%d.%d

assistant: ```c
const char *evdns_debug_ntoa(uint32_t address) {
  static char buf[32];
  uint32_t a = ntohl(address);
  evutil_snprintf(buf, sizeof(buf), "%d.%d.%d.%d", (int)(uint8_t)((a >> 24) & 0xff), (int)(uint8_t)((a >> 16) & 0xff), (int)(uint8_t)((a >> 8) & 0xff), (int)(uint8_t)((a)&0xff));
  return buf;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<evdns_debug_ntoa>:
  endbr64
  push   %r12
  lea    D4(%rip),%r12
  call   <ntohl@plt>
  sub    $0x8,%rsp
  lea    D8(%rip),%rdx
  mov    %r12,%rdi
  movzbl %ah,%esi
  mov    %eax,%r8d
  mov    %eax,%ecx
  movzbl %al,%eax
  push   %rax
  sar    $0x10,%r8d
  mov    %esi,%r9d
  shr    $0x18,%ecx
  movzbl %r8b,%r8d
  mov    $0x20,%esi
  call   <evutil_snprintf@plt>
  pop    %rax
  mov    %r12,%rax
  pop    %rdx
  pop    %r12
  ret
```

tool_calls: name: read_data
arguments: data_label: D8
type_guessed: string

tool: D8: %d.%d.%d.%d

assistant: ```c
const char *evdns_debug_ntoa(uint32_t address) {
  static char buf[32];
  uint32_t a = ntohl(address);
  evutil_snprintf(buf, sizeof(buf), "%d.%d.%d.%d", (int)(uint8_t)((a >> 24) & 0xff), (int)(uint8_t)((a >> 16) & 0xff), (int)(uint8_t)((a >> 8) & 0xff), (int)(uint8_t)((a)&0xff));
  return buf;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<evdns_debug_ntoa>:
  endbr64
  push   %r12
  lea    D12(%rip),%r12
  call   <ntohl@plt>
  sub    $0x8,%rsp
  lea    D6(%rip),%rdx
  mov    %r12,%rdi
  movzbl %ah,%esi
  mov    %eax,%r8d
  mov    %eax,%ecx
  movzbl %al,%eax
  push   %rax
  sar    $0x10,%r8d
  mov    %esi,%r9d
  shr    $0x18,%ecx
  movzbl %r8b,%r8d
  mov    $0x20,%esi
  call   <evutil_snprintf@plt>
  pop    %rax
  mov    %r12,%rax
  pop    %rdx
  pop    %r12
  ret
```

tool_calls: name: parse_data
arguments: tag: D6
type_infered: string

tool: D6: %d.%d.%d.%d

assistant: ```c
const char *evdns_debug_ntoa(uint32_t address) {
  static char buf[32];
  uint32_t a = ntohl(address);
  evutil_snprintf(buf, sizeof(buf), "%d.%d.%d.%d", (int)(uint8_t)((a >> 24) & 0xff), (int)(uint8_t)((a >> 16) & 0xff), (int)(uint8_t)((a >> 8) & 0xff), (int)(uint8_t)((a)&0xff));
  return buf;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<sem_wait1>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x18(%rbp)
  mov    -0x28(%rbp),%eax
  neg    %eax
  mov    %eax,-0x20(%rbp)
  movl   $0x1,-0x1c(%rbp)
  lea    -0x20(%rbp),%rcx
  mov    -0x24(%rbp),%eax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <semop@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L8
  call   <__stack_chk_fail@plt>
L8:
  leave
  ret
```

assistant: ```c
void sem_wait1(int semid, int val) {
  struct sembuf semaphore;
  semaphore.sem_num = 0;
  semaphore.sem_op = (-1 * val);
  semaphore.sem_flg = 1;
  semop(semid, &semaphore, 1);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<sem_wait1>:
  endbr64
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x8(%rsp)
  neg    %esi
  mov    %esi,(%rsp)
  movl   $0x1,0x4(%rsp)
  mov    %rsp,%rsi
  mov    $0x1,%edx
  call   <semop@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x28,%rsp
  ret
L2:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void sem_wait1(int semid, int val) {
  struct sembuf semaphore;
  semaphore.sem_num = 0;
  semaphore.sem_op = (-1 * val);
  semaphore.sem_flg = 1;
  semop(semid, &semaphore, 1);
}
```
user: Translate the below assembly code into C programming language:

```asm
<sem_wait1>:
  endbr64
  sub    $0x28,%rsp
  neg    %esi
  mov    $0x1,%edx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %esi,(%rsp)
  mov    %rsp,%rsi
  movq   $0x0,0x8(%rsp)
  movl   $0x1,0x4(%rsp)
  call   <semop@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0x28,%rsp
  ret
L9:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void sem_wait1(int semid, int val) {
  struct sembuf semaphore;
  semaphore.sem_num = 0;
  semaphore.sem_op = (-1 * val);
  semaphore.sem_flg = 1;
  semop(semid, &semaphore, 1);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<sem_wait1>:
  endbr64
  sub    $0x28,%rsp
  neg    %esi
  mov    $0x1,%edx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %esi,(%rsp)
  mov    %rsp,%rsi
  movq   $0x0,0x8(%rsp)
  movl   $0x1,0x4(%rsp)
  call   <semop@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0x28,%rsp
  ret
L9:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void sem_wait1(int semid, int val) {
  struct sembuf semaphore;
  semaphore.sem_num = 0;
  semaphore.sem_op = (-1 * val);
  semaphore.sem_flg = 1;
  semop(semid, &semaphore, 1);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<hf1Int>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  imul   $0xffffffff84210843,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x4,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,%ecx
  shl    $0x5,%ecx
  sub    %edx,%ecx
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  pop    %rbp
  ret
```

assistant: ```c
int hf1Int(const void *const e) {
  int *e_int = (int *)e;
  return (*e_int) % 31;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<hf1Int>:
  endbr64
  mov    (%rdi),%edx
  movslq %edx,%rax
  imul   $0xffffffff84210843,%rax,%rax
  shr    $0x20,%rax
  add    %edx,%eax
  sar    $0x4,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x5,%ecx
  sub    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  ret
```

assistant: ```c
int hf1Int(const void *const e) {
  int *e_int = (int *)e;
  return (*e_int) % 31;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<hf1Int>:
  endbr64
  movslq (%rdi),%rax
  mov    %rax,%rdx
  imul   $0xffffffff84210843,%rax,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  shr    $0x20,%rax
  add    %edx,%eax
  sar    $0x4,%eax
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x5,%ecx
  sub    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  ret
```

assistant: ```c
int hf1Int(const void *const e) {
  int *e_int = (int *)e;
  return (*e_int) % 31;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<hf1Int>:
  endbr64
  movslq (%rdi),%rax
  mov    %rax,%rdx
  imul   $0xffffffff84210843,%rax,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  shr    $0x20,%rax
  add    %edx,%eax
  sar    $0x4,%eax
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x5,%ecx
  sub    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  ret
```

assistant: ```c
int hf1Int(const void *const e) {
  int *e_int = (int *)e;
  return (*e_int) % 31;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<funsigned2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jg     L5
  mov    $0x1,%eax
  jmp    L6
L5:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rcx
  movabs $0xfffffffe00000001,%rax
  cqto
  idiv   %rcx
  test   %rax,%rax
  sete   %al
  movzbl %al,%eax
L6:
  pop    %rbp
  ret
```

assistant: ```c
int funsigned2(uint32_t a) {
  if (a < 1)
    return 1;
  return (-1 * 0x1ffffffffL) / a == 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<funsigned2>:
  endbr64
  test   %edi,%edi
  setle  %al
  movzbl %al,%eax
  ret
```

assistant: ```c
int funsigned2(uint32_t a) {
  if (a < 1)
    return 1;
  return (-1 * 0x1ffffffffL) / a == 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<funsigned2>:
  endbr64
  xor    %eax,%eax
  test   %edi,%edi
  setle  %al
  ret
```

assistant: ```c
int funsigned2(uint32_t a) {
  if (a < 1)
    return 1;
  return (-1 * 0x1ffffffffL) / a == 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<funsigned2>:
  endbr64
  xor    %eax,%eax
  test   %edi,%edi
  setle  %al
  ret
```

assistant: ```c
int funsigned2(uint32_t a) {
  if (a < 1)
    return 1;
  return (-1 * 0x1ffffffffL) / a == 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<deparse_uint32>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r13
  mov    %edx,%ebp
  mov    %ecx,%r12d
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    (%rsi),%edi
  call   <ntohl@plt>
  mov    $0x20,%ecx
  sub    %r12d,%ecx
  shl    %cl,%eax
  mov    %eax,%edi
  call   <htonl@plt>
  mov    %eax,0x4(%rsp)
  mov    $0xffffff00,%edx
  mov    %ebp,%ecx
  sar    %cl,%edx
  and    0x0(%r13),%edx
  sar    %cl,%eax
  or     %eax,%edx
  mov    %edx,0x0(%r13)
  mov    $0x1,%ebx
  mov    $0x8,%r14d
  jmp    L12
L9:
  mov    %r14d,%ecx
  sub    %ebp,%ecx
  mov    (%rsp,%rbx,4),%eax
  shl    %cl,%eax
  mov    0x4(%rsp,%rbx,4),%edx
  mov    %ebp,%ecx
  sar    %cl,%edx
  or     %edx,%eax
  mov    %eax,0x0(%r13,%rbx,4)
  add    $0x1,%rbx
L12:
  mov    %ebx,%r15d
  mov    %r12d,%edi
  call   <BYTE_ROUND_UP@plt>
  cmp    %ebx,%eax
  jg     L9
  lea    (%r12,%rbp,1),%ebx
  mov    %r12d,%edi
  call   <BYTE_ROUND_UP@plt>
  shl    $0x3,%eax
  cmp    %eax,%ebx
  jle    L22
  movslq %r15d,%r15
  mov    $0x8,%ecx
  sub    %ebp,%ecx
  mov    (%rsp,%r15,4),%eax
  shl    %cl,%eax
  mov    %eax,0x0(%r13,%r15,4)
L22:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L23
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L23:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void deparse_uint32(uint8_t *dst, uint8_t *src, int bit_offset, int width) {
  uint32_t tmp = htonl((ntohl(*(uint32_t *)src)) << (32 - width));
  uint8_t *new_src = (uint8_t *)&tmp;
  int i;
  uint8_t mask = (0xFF >> bit_offset);
  mask = ~mask;
  dst[0] = (dst[0] & mask);
  dst[0] |= (new_src[0] >> bit_offset);
  for (i = 1; i < BYTE_ROUND_UP(width); i++) {
    dst[i] = (new_src[i] >> bit_offset) | (new_src[i - 1] << (8 - bit_offset));
  }
  if ((bit_offset + width) > (BYTE_ROUND_UP(width) << 3))
    dst[i] = new_src[i - 1] << (8 - bit_offset);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<deparse_uint32>:
  endbr64
  push   %r15
  mov    %ecx,%r15d
  push   %r14
  mov    %edx,%r14d
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    $0x1,%ebx
  sub    $0x18,%rsp
  mov    (%rsi),%edi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <ntohl@plt>
  mov    $0x20,%ecx
  sub    %r15d,%ecx
  shl    %cl,%eax
  mov    %eax,%edi
  call   <htonl@plt>
  mov    %r14d,%ecx
  mov    %eax,%ebp
  mov    %eax,%edx
  mov    %eax,0x4(%rsp)
  mov    $0xffffff00,%eax
  sar    %cl,%edx
  sar    %cl,%eax
  mov    $0x8,%ecx
  and    (%r12),%eax
  sub    %r14d,%ecx
  or     %edx,%eax
  shl    %cl,%ebp
  mov    %eax,(%r12)
  or     %edx,%ebp
  jmp    L26
  nopl   0x0(%rax)
L38:
  mov    %ebp,(%r12,%rbx,4)
  add    $0x1,%rbx
L26:
  mov    %r15d,%edi
  movslq %ebx,%r13
  call   <BYTE_ROUND_UP@plt>
  cmp    %ebx,%eax
  jg     L38
  mov    %r15d,%edi
  lea    (%r15,%r14,1),%ebx
  call   <BYTE_ROUND_UP@plt>
  shl    $0x3,%eax
  cmp    %eax,%ebx
  jle    L34
  mov    (%rsp,%r13,4),%eax
  mov    $0x8,%ecx
  sub    %r14d,%ecx
  shl    %cl,%eax
  mov    %eax,(%r12,%r13,4)
L34:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L4:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void deparse_uint32(uint8_t *dst, uint8_t *src, int bit_offset, int width) {
  uint32_t tmp = htonl((ntohl(*(uint32_t *)src)) << (32 - width));
  uint8_t *new_src = (uint8_t *)&tmp;
  int i;
  uint8_t mask = (0xFF >> bit_offset);
  mask = ~mask;
  dst[0] = (dst[0] & mask);
  dst[0] |= (new_src[0] >> bit_offset);
  for (i = 1; i < BYTE_ROUND_UP(width); i++) {
    dst[i] = (new_src[i] >> bit_offset) | (new_src[i - 1] << (8 - bit_offset));
  }
  if ((bit_offset + width) > (BYTE_ROUND_UP(width) << 3))
    dst[i] = new_src[i - 1] << (8 - bit_offset);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<deparse_uint32>:
  endbr64
  push   %r15
  mov    %ecx,%r15d
  push   %r14
  mov    %edx,%r14d
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    $0x1,%ebx
  sub    $0x18,%rsp
  mov    (%rsi),%edi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <ntohl@plt>
  mov    $0x20,%ecx
  sub    %r15d,%ecx
  shl    %cl,%eax
  mov    %eax,%edi
  call   <htonl@plt>
  mov    %r14d,%ecx
  mov    %eax,%ebp
  mov    %eax,%edx
  mov    %eax,0x4(%rsp)
  mov    $0xffffff00,%eax
  sar    %cl,%edx
  sar    %cl,%eax
  mov    $0x8,%ecx
  and    (%r12),%eax
  sub    %r14d,%ecx
  or     %edx,%eax
  shl    %cl,%ebp
  mov    %eax,(%r12)
  or     %edx,%ebp
  jmp    L32
  nopl   0x0(%rax)
L24:
  mov    %ebp,(%r12,%rbx,4)
  add    $0x1,%rbx
L32:
  mov    %r15d,%edi
  movslq %ebx,%r13
  call   <BYTE_ROUND_UP@plt>
  cmp    %ebx,%eax
  jg     L24
  mov    %r15d,%edi
  lea    (%r15,%r14,1),%ebx
  call   <BYTE_ROUND_UP@plt>
  shl    $0x3,%eax
  cmp    %eax,%ebx
  jle    L10
  mov    (%rsp,%r13,4),%eax
  mov    $0x8,%ecx
  sub    %r14d,%ecx
  shl    %cl,%eax
  mov    %eax,(%r12,%r13,4)
L10:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L5
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L5:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void deparse_uint32(uint8_t *dst, uint8_t *src, int bit_offset, int width) {
  uint32_t tmp = htonl((ntohl(*(uint32_t *)src)) << (32 - width));
  uint8_t *new_src = (uint8_t *)&tmp;
  int i;
  uint8_t mask = (0xFF >> bit_offset);
  mask = ~mask;
  dst[0] = (dst[0] & mask);
  dst[0] |= (new_src[0] >> bit_offset);
  for (i = 1; i < BYTE_ROUND_UP(width); i++) {
    dst[i] = (new_src[i] >> bit_offset) | (new_src[i - 1] << (8 - bit_offset));
  }
  if ((bit_offset + width) > (BYTE_ROUND_UP(width) << 3))
    dst[i] = new_src[i - 1] << (8 - bit_offset);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<Decrypt>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    (%rsi),%edi
  call   <READ_ROUND_KEY_DOUBLE_WORD@plt>
  xor    %eax,(%rbx)
  mov    0x4(%r12),%edi
  call   <READ_ROUND_KEY_DOUBLE_WORD@plt>
  xor    %eax,0x4(%rbx)
  mov    0x8(%r12),%edi
  call   <READ_ROUND_KEY_DOUBLE_WORD@plt>
  xor    %eax,0x8(%rbx)
  mov    0xc(%r12),%edi
  call   <READ_ROUND_KEY_DOUBLE_WORD@plt>
  xor    %eax,0xc(%rbx)
  mov    $0x10,%ebp
L7:
  mov    0x8(%rbx),%edi
  mov    $0x10,%esi
  call   <ror@plt>
  mov    %eax,%edi
  mov    %eax,0x8(%rbx)
  xor    0x4(%rbx),%edi
  mov    %edi,0x4(%rbx)
  mov    $0x7,%esi
  call   <ror@plt>
  mov    %eax,0x4(%rbx)
  sub    %eax,0x8(%rbx)
  mov    0xc(%rbx),%edi
  xor    (%rbx),%edi
  mov    %edi,0xc(%rbx)
  mov    $0xd,%esi
  call   <ror@plt>
  mov    %eax,%edi
  sub    %eax,(%rbx)
  xor    0x8(%rbx),%edi
  mov    %edi,0xc(%rbx)
  mov    $0x8,%esi
  call   <ror@plt>
  mov    %eax,0xc(%rbx)
  sub    %eax,0x8(%rbx)
  mov    $0x10,%esi
  mov    (%rbx),%edi
  call   <ror@plt>
  mov    %eax,%edi
  mov    %eax,(%rbx)
  xor    0x4(%rbx),%edi
  mov    %edi,0x4(%rbx)
  mov    $0x5,%esi
  call   <ror@plt>
  mov    %eax,0x4(%rbx)
  sub    %eax,(%rbx)
  sub    $0x1,%ebp
  jne    L7
  mov    (%r12),%edi
  call   <READ_ROUND_KEY_DOUBLE_WORD@plt>
  xor    %eax,(%rbx)
  mov    0x4(%r12),%edi
  call   <READ_ROUND_KEY_DOUBLE_WORD@plt>
  xor    %eax,0x4(%rbx)
  mov    0x8(%r12),%edi
  call   <READ_ROUND_KEY_DOUBLE_WORD@plt>
  xor    %eax,0x8(%rbx)
  mov    0xc(%r12),%edi
  call   <READ_ROUND_KEY_DOUBLE_WORD@plt>
  xor    %eax,0xc(%rbx)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void Decrypt(uint8_t *block, uint8_t *keyBytes) {
  uint32_t *v = (uint32_t *)block;
  uint32_t *k = (uint32_t *)keyBytes;
  uint8_t i;
  v[0] ^= READ_ROUND_KEY_DOUBLE_WORD(k[0]);
  v[1] ^= READ_ROUND_KEY_DOUBLE_WORD(k[1]);
  v[2] ^= READ_ROUND_KEY_DOUBLE_WORD(k[2]);
  v[3] ^= READ_ROUND_KEY_DOUBLE_WORD(k[3]);
  for (i = 0; i < 16; ++i) {
    v[2] = ror(v[2], 16);
    v[1] ^= v[2];
    v[1] = ror(v[1], 7);
    v[2] -= v[1];
    v[3] ^= v[0];
    v[3] = ror(v[3], 13);
    v[0] -= v[3];
    v[3] ^= v[2];
    v[3] = ror(v[3], 8);
    v[2] -= v[3];
    v[0] = ror(v[0], 16);
    v[1] ^= v[0];
    v[1] = ror(v[1], 5);
    v[0] -= v[1];
  }
  v[0] ^= READ_ROUND_KEY_DOUBLE_WORD(k[0]);
  v[1] ^= READ_ROUND_KEY_DOUBLE_WORD(k[1]);
  v[2] ^= READ_ROUND_KEY_DOUBLE_WORD(k[2]);
  v[3] ^= READ_ROUND_KEY_DOUBLE_WORD(k[3]);
}
```