ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Translate the below assembly code into C programming language:

```asm
<draw>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,0xc(%rsp)
  test   %esi,%esi
  jle    L92
  xor    %ebx,%ebx
  lea    D30(%rip),%r12
  cs nopw 0x0(%rax,%rax,1)
L5:
  mov    %r12,%rdi
  add    $0x1,%ebx
  call   <printf@plt>
  cmp    %ebx,%r13d
  jne    L5
L92:
  lea    D32(%rip),%rdi
  call   <printf@plt>
  mov    0xc(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x8(%rsp)
  cmp    $0x1,%eax
  jle    L22
  lea    -0x1(%r13),%ebx
  mov    $0x1,%r14d
  lea    D30(%rip),%r12
  lea    D3(%rip),%rbp
  nopl   0x0(%rax)
L71:
  mov    %r12,%rdi
  call   <printf@plt>
  cmp    $0x1,%ebx
  jle    L102
  mov    $0x1,%r15d
  nopl   0x0(%rax,%rax,1)
L121:
  mov    %rbp,%rdi
  add    $0x1,%r15d
  call   <printf@plt>
  cmp    %ebx,%r15d
  jne    L121
L102:
  cmp    $0x1,%r13d
  jg     L13
  lea    D32(%rip),%rdi
  add    $0x1,%r14d
  call   <printf@plt>
  cmp    0x8(%rsp),%r14d
  jne    L71
L22:
  cmpl   $0x1,0xc(%rsp)
  jle    L38
  test   %r13d,%r13d
  jle    L38
  lea    D30(%rip),%r12
L15:
  xor    %ebx,%ebx
  nopl   0x0(%rax,%rax,1)
L91:
  mov    %r12,%rdi
  add    $0x1,%ebx
  call   <printf@plt>
  cmp    %ebx,%r13d
  jne    L91
L38:
  add    $0x18,%rsp
  lea    D25(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <printf@plt>
  nopw   0x0(%rax,%rax,1)
L13:
  mov    %r12,%rdi
  add    $0x1,%r14d
  call   <printf@plt>
  lea    D32(%rip),%rdi
  call   <printf@plt>
  cmp    0x8(%rsp),%r14d
  jne    L71
  cmpl   $0x1,0xc(%rsp)
  jg     L15
  jmp    L38
```

tool_calls: name: extract_symbolic_data
arguments: label: D30
type: string
name: extract_symbolic_data
arguments: label: D32
type: string
name: extract_symbolic_data
arguments: label: D3
type: string
name: extract_symbolic_data
arguments: label: D25
type: string

tool: D30: *

tool: D32: 


tool: D3: .

tool: D25: 



assistant: ```c
void draw(int l, int c) {
  for (int x = 0; x < c; ++x) {
    printf("*");
  }
  printf("\n");
  for (int m = 1; m < l - 1; ++m) {
    printf("*");
    for (int n = 1; n < c - 1; ++n) {
      printf(".");
    }
    if (c > 1) {
      printf("*");
    }
    printf("\n");
  }
  if (l > 1) {
    for (int x = 0; x < c; ++x) {
      printf("*");
    }
  }
  printf("\n\n");
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<to_lock>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jns    L111
  mov    $0x0,%eax
  jmp    L35
L111:
  cmpl   $0x17,-0x4(%rbp)
  jg     L2
  mov    -0x4(%rbp),%eax
  jmp    L35
L2:
  cmpl   $0x47,-0x4(%rbp)
  jg     L122
  mov    -0x4(%rbp),%eax
  add    $0x18,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  jmp    L35
L122:
  cmpl   $0xa7,-0x4(%rbp)
  jg     L50
  mov    -0x4(%rbp),%eax
  add    $0x78,%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  jmp    L35
L50:
  cmpl   $0x167,-0x4(%rbp)
  jg     L68
  mov    -0x4(%rbp),%eax
  add    $0x198,%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  jmp    L35
L68:
  cmpl   $0x2e7,-0x4(%rbp)
  jg     L54
  mov    -0x4(%rbp),%eax
  add    $0x498,%eax
  lea    0xf(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x4,%eax
  jmp    L35
L54:
  cmpl   $0x3a8,-0x4(%rbp)
  jg     L73
  mov    -0x4(%rbp),%eax
  add    $0xc18,%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  jmp    L35
L73:
  mov    $0x7f,%eax
L35:
  pop    %rbp
  ret
```

assistant: ```c
int to_lock(int lock) {
  if (lock < 0)
    return 0;
  if (lock < 24)
    return lock;
  if (lock < 72)
    return (lock + 24) / 2;
  if (lock < 168)
    return (lock + 120) / 4;
  if (lock < 360)
    return (lock + 408) / 8;
  if (lock < 744)
    return (lock + 1176) / 16;
  if (lock < 937)
    return (lock + 3096) / 32;
  return 127;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<to_lock>:
  endbr64
  mov    $0x0,%eax
  test   %edi,%edi
  js     L9
  mov    %edi,%eax
  cmp    $0x17,%edi
  jle    L9
  cmp    $0x47,%edi
  jle    L51
  cmp    $0xa7,%edi
  jle    L63
  cmp    $0x167,%edi
  jle    L11
  cmp    $0x2e7,%edi
  jle    L75
  mov    $0x7f,%eax
  cmp    $0x3a8,%edi
  jle    L79
L9:
  ret
L51:
  add    $0x18,%edi
  mov    %edi,%eax
  shr    $0x1f,%eax
  add    %edi,%eax
  sar    %eax
  ret
L63:
  lea    0x7b(%rdi),%eax
  add    $0x78,%edi
  cmovns %edi,%eax
  sar    $0x2,%eax
  ret
L11:
  lea    0x19f(%rdi),%eax
  add    $0x198,%edi
  cmovns %edi,%eax
  sar    $0x3,%eax
  ret
L75:
  lea    0x4a7(%rdi),%eax
  add    $0x498,%edi
  cmovns %edi,%eax
  sar    $0x4,%eax
  ret
L79:
  lea    0xc37(%rdi),%eax
  add    $0xc18,%edi
  cmovns %edi,%eax
  sar    $0x5,%eax
  jmp    L9
```

assistant: ```c
int to_lock(int lock) {
  if (lock < 0)
    return 0;
  if (lock < 24)
    return lock;
  if (lock < 72)
    return (lock + 24) / 2;
  if (lock < 168)
    return (lock + 120) / 4;
  if (lock < 360)
    return (lock + 408) / 8;
  if (lock < 744)
    return (lock + 1176) / 16;
  if (lock < 937)
    return (lock + 3096) / 32;
  return 127;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<to_lock>:
  endbr64
  xor    %eax,%eax
  test   %edi,%edi
  js     L22
  mov    %edi,%eax
  cmp    $0x17,%edi
  jle    L22
  cmp    $0x47,%edi
  jle    L1
  cmp    $0xa7,%edi
  jle    L13
  cmp    $0x167,%edi
  jle    L41
  cmp    $0x2e7,%edi
  jle    L2
  lea    0xc18(%rdi),%edx
  mov    $0x7f,%eax
  sar    $0x5,%edx
  cmp    $0x3a9,%edi
  cmovl  %edx,%eax
L22:
  ret
  cs nopw 0x0(%rax,%rax,1)
L41:
  add    $0x198,%eax
  sar    $0x3,%eax
  ret
  nopl   0x0(%rax)
L1:
  add    $0x18,%eax
  sar    %eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L13:
  add    $0x78,%eax
  sar    $0x2,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L2:
  add    $0x498,%eax
  sar    $0x4,%eax
  ret
```

assistant: ```c
int to_lock(int lock) {
  if (lock < 0)
    return 0;
  if (lock < 24)
    return lock;
  if (lock < 72)
    return (lock + 24) / 2;
  if (lock < 168)
    return (lock + 120) / 4;
  if (lock < 360)
    return (lock + 408) / 8;
  if (lock < 744)
    return (lock + 1176) / 16;
  if (lock < 937)
    return (lock + 3096) / 32;
  return 127;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<to_lock>:
  endbr64
  xor    %eax,%eax
  test   %edi,%edi
  js     L39
  mov    %edi,%eax
  cmp    $0x17,%edi
  jle    L39
  cmp    $0x47,%edi
  jle    L10
  cmp    $0xa7,%edi
  jle    L16
  cmp    $0x167,%edi
  jle    L43
  cmp    $0x2e7,%edi
  jle    L40
  lea    0xc18(%rdi),%edx
  mov    $0x7f,%eax
  sar    $0x5,%edx
  cmp    $0x3a9,%edi
  cmovl  %edx,%eax
L39:
  ret
  cs nopw 0x0(%rax,%rax,1)
L43:
  add    $0x198,%eax
  sar    $0x3,%eax
  ret
  nopl   0x0(%rax)
L10:
  add    $0x18,%eax
  sar    %eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L16:
  add    $0x78,%eax
  sar    $0x2,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L40:
  add    $0x498,%eax
  sar    $0x4,%eax
  ret
```

assistant: ```c
int to_lock(int lock) {
  if (lock < 0)
    return 0;
  if (lock < 24)
    return lock;
  if (lock < 72)
    return (lock + 24) / 2;
  if (lock < 168)
    return (lock + 120) / 4;
  if (lock < 360)
    return (lock + 408) / 8;
  if (lock < 744)
    return (lock + 1176) / 16;
  if (lock < 937)
    return (lock + 3096) / 32;
  return 127;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x20(%rbp),%rdx
  mov    -0x14(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <trueMain@plt>
  mov    %eax,-0x4(%rbp)
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <exit@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D27
datatype: string
name: read_data
arguments: data_tag: D35
datatype: string
name: read_data
arguments: data_tag: D19
datatype: string
name: read_data
arguments: data_tag: D4
datatype: string
name: read_data
arguments: data_tag: D47
datatype: string
name: read_data
arguments: data_tag: D12
datatype: string

tool: D27: 
A application to study DNS functions


tool: D35: Version 0.0.1


tool: D19: Author: Andrew Chang


tool: D4: main() build time: 15:42:24, Mar 16 2022


tool: D47: ----START----


tool: D12: ----ENDS-----



assistant: ```c
int main(int argc, char *argv[]) {
  int mainRet;
  printf("\n"
         "A application to study DNS functions"
         "\n");
  printf("Version "
         "0.0.1"
         "\n");
  printf("Author: "
         "Andrew Chang"
         "\n");
  printf("main() build time: "
         "15:42:24"
         ", "
         "Mar 16 2022"
         "\n");
  printf("----START----\n");
  mainRet = trueMain(argc, argv);
  printf("----ENDS-----\n\n");
  exit(mainRet);
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%ebx
  mov    %rsi,%rbp
  lea    D30(%rip),%rdi
  call   <printf@plt>
  lea    D18(%rip),%rdi
  call   <printf@plt>
  lea    D36(%rip),%rdi
  call   <printf@plt>
  lea    D49(%rip),%rdi
  call   <printf@plt>
  lea    D25(%rip),%rdi
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <trueMain@plt>
  mov    %eax,%ebx
  lea    D21(%rip),%rdi
  call   <printf@plt>
  mov    %ebx,%edi
  call   <exit@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: label: D30
type_guessed: string
name: read_data
arguments: label: D18
type_guessed: string
name: read_data
arguments: label: D36
type_guessed: string
name: read_data
arguments: label: D49
type_guessed: string
name: read_data
arguments: label: D25
type_guessed: string
name: read_data
arguments: label: D21
type_guessed: string

tool: D30: 
A application to study DNS functions


tool: D18: Version 0.0.1


tool: D36: Author: Andrew Chang


tool: D49: main() build time: 15:42:24, Mar 16 2022


tool: D25: ----START----


tool: D21: ----ENDS-----



assistant: ```c
int main(int argc, char *argv[]) {
  int mainRet;
  printf("\n"
         "A application to study DNS functions"
         "\n");
  printf("Version "
         "0.0.1"
         "\n");
  printf("Author: "
         "Andrew Chang"
         "\n");
  printf("main() build time: "
         "15:42:24"
         ", "
         "Mar 16 2022"
         "\n");
  printf("----START----\n");
  mainRet = trueMain(argc, argv);
  printf("----ENDS-----\n\n");
  exit(mainRet);
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %edi,%ebp
  lea    D36(%rip),%rdi
  sub    $0x8,%rsp
  call   <printf@plt>
  lea    D39(%rip),%rdi
  call   <printf@plt>
  lea    D38(%rip),%rdi
  call   <printf@plt>
  lea    D37(%rip),%rdi
  call   <printf@plt>
  lea    D50(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %ebp,%edi
  call   <trueMain@plt>
  lea    D52(%rip),%rdi
  mov    %eax,%ebp
  call   <printf@plt>
  mov    %ebp,%edi
  call   <exit@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: retrieve_data
arguments: label: D36
type_infered: string
name: retrieve_data
arguments: label: D39
type_infered: string
name: retrieve_data
arguments: label: D38
type_infered: string
name: retrieve_data
arguments: label: D37
type_infered: string
name: retrieve_data
arguments: label: D50
type_infered: string
name: retrieve_data
arguments: label: D52
type_infered: string

tool: D36: 
A application to study DNS functions


tool: D39: Version 0.0.1


tool: D38: Author: Andrew Chang


tool: D37: main() build time: 15:42:24, Mar 16 2022


tool: D50: ----START----


tool: D52: ----ENDS-----



assistant: ```c
int main(int argc, char *argv[]) {
  int mainRet;
  printf("\n"
         "A application to study DNS functions"
         "\n");
  printf("Version "
         "0.0.1"
         "\n");
  printf("Author: "
         "Andrew Chang"
         "\n");
  printf("main() build time: "
         "15:42:24"
         ", "
         "Mar 16 2022"
         "\n");
  printf("----START----\n");
  mainRet = trueMain(argc, argv);
  printf("----ENDS-----\n\n");
  exit(mainRet);
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %edi,%ebp
  lea    D31(%rip),%rdi
  sub    $0x8,%rsp
  call   <printf@plt>
  lea    D36(%rip),%rdi
  call   <printf@plt>
  lea    D50(%rip),%rdi
  call   <printf@plt>
  lea    D45(%rip),%rdi
  call   <printf@plt>
  lea    D48(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %ebp,%edi
  call   <trueMain@plt>
  lea    D53(%rip),%rdi
  mov    %eax,%ebp
  call   <printf@plt>
  mov    %ebp,%edi
  call   <exit@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: parse_data
arguments: data_label: D31
data_type: string
name: parse_data
arguments: data_label: D36
data_type: string
name: parse_data
arguments: data_label: D50
data_type: string
name: parse_data
arguments: data_label: D45
data_type: string
name: parse_data
arguments: data_label: D48
data_type: string
name: parse_data
arguments: data_label: D53
data_type: string

tool: D31: 
A application to study DNS functions


tool: D36: Version 0.0.1


tool: D50: Author: Andrew Chang


tool: D45: main() build time: 15:42:24, Mar 16 2022


tool: D48: ----START----


tool: D53: ----ENDS-----



assistant: ```c
int main(int argc, char *argv[]) {
  int mainRet;
  printf("\n"
         "A application to study DNS functions"
         "\n");
  printf("Version "
         "0.0.1"
         "\n");
  printf("Author: "
         "Andrew Chang"
         "\n");
  printf("main() build time: "
         "15:42:24"
         ", "
         "Mar 16 2022"
         "\n");
  printf("----START----\n");
  mainRet = trueMain(argc, argv);
  printf("----ENDS-----\n\n");
  exit(mainRet);
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<softfloat_normRoundPackMToF128M>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %rdx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x10(%rbp)
L19:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  jne    L0
  addl   $0x20,-0x10(%rbp)
  cmpl   $0x9f,-0x10(%rbp)
  jle    L49
  mov    -0x14(%rbp),%eax
  shl    $0x1f,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  add    $0x4,%rax
  movl   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  movl   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
  add    $0xc,%rax
  movl   $0x0,(%rax)
  jmp    L11
L49:
  addq   $0x4,-0x8(%rbp)
  jmp    L19
L0:
  nop
  mov    -0xc(%rbp),%eax
  mov    %eax,%edi
  call   <softfloat_countLeadingZeros32@plt>
  sub    $0xf,%eax
  add    %eax,-0x10(%rbp)
  cmpl   $0x0,-0x10(%rbp)
  je     L27
  mov    -0x10(%rbp),%eax
  sub    %eax,-0x18(%rbp)
  mov    -0x20(%rbp),%rcx
  mov    -0x10(%rbp),%edx
  mov    -0x20(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x5,%edi
  call   <softfloat_shiftLeftM@plt>
L27:
  mov    -0x28(%rbp),%rcx
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <softfloat_roundPackMToF128M@plt>
L11:
  leave
  ret
```

assistant: ```c
void softfloat_normRoundPackMToF128M(bool sign, int32_t exp, uint32_t *extSigPtr, uint32_t *zWPtr) {
  const uint32_t *ptr;
  int_fast16_t shiftCount;
  uint32_t wordSig;
  ptr = extSigPtr + 0;
  shiftCount = 0;
  for (;;) {
    wordSig = *ptr;
    if (wordSig)
      break;
    shiftCount += 32;
    if (160 <= shiftCount) {
      zWPtr[0] = (((uint32_t)(sign) << 31) + ((uint32_t)(0) << 16) + (0));
      zWPtr[((4) - 1 - (2))] = 0;
      zWPtr[((4) - 1 - (1))] = 0;
      zWPtr[((4) - 1 - (0))] = 0;
      return;
    }
    ptr -= -1;
  }
  shiftCount += softfloat_countLeadingZeros32(wordSig) - 15;
  if (shiftCount) {
    exp -= shiftCount;
    softfloat_shiftLeftM(5, extSigPtr, shiftCount, extSigPtr);
  }
  softfloat_roundPackMToF128M(sign, exp, extSigPtr, zWPtr);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<softfloat_normRoundPackMToF128M>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r12d
  mov    %esi,%r14d
  mov    %rdx,%r13
  mov    %rcx,%rbp
  mov    (%rdx),%edi
  test   %edi,%edi
  jne    L20
  mov    %rdx,%rax
  mov    $0x20,%ebx
L16:
  add    $0x4,%rax
  mov    (%rax),%edi
  test   %edi,%edi
  jne    L4
  add    $0x20,%ebx
  cmp    $0xa0,%ebx
  jne    L16
  shl    $0x1f,%r12d
  mov    %r12d,0x0(%rbp)
  movl   $0x0,0x4(%rbp)
  movl   $0x0,0x8(%rbp)
  movl   $0x0,0xc(%rbp)
L37:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L20:
  mov    $0x0,%ebx
L4:
  call   <softfloat_countLeadingZeros32@plt>
  lea    -0xf(%rbx,%rax,1),%edx
  test   %edx,%edx
  jne    L31
L56:
  mov    %rbp,%rcx
  mov    %r13,%rdx
  mov    %r14d,%esi
  mov    %r12d,%edi
  call   <softfloat_roundPackMToF128M@plt>
  jmp    L37
L31:
  sub    %edx,%r14d
  mov    %r13,%rcx
  mov    %r13,%rsi
  mov    $0x5,%edi
  call   <softfloat_shiftLeftM@plt>
  jmp    L56
```

assistant: ```c
void softfloat_normRoundPackMToF128M(bool sign, int32_t exp, uint32_t *extSigPtr, uint32_t *zWPtr) {
  const uint32_t *ptr;
  int_fast16_t shiftCount;
  uint32_t wordSig;
  ptr = extSigPtr + 0;
  shiftCount = 0;
  for (;;) {
    wordSig = *ptr;
    if (wordSig)
      break;
    shiftCount += 32;
    if (160 <= shiftCount) {
      zWPtr[0] = (((uint32_t)(sign) << 31) + ((uint32_t)(0) << 16) + (0));
      zWPtr[((4) - 1 - (2))] = 0;
      zWPtr[((4) - 1 - (1))] = 0;
      zWPtr[((4) - 1 - (0))] = 0;
      return;
    }
    ptr -= -1;
  }
  shiftCount += softfloat_countLeadingZeros32(wordSig) - 15;
  if (shiftCount) {
    exp -= shiftCount;
    softfloat_shiftLeftM(5, extSigPtr, shiftCount, extSigPtr);
  }
  softfloat_roundPackMToF128M(sign, exp, extSigPtr, zWPtr);
}
```
user: What is the c source code of the assembly code below?

```asm
<softfloat_normRoundPackMToF128M>:
  endbr64
  push   %r14
  mov    %esi,%r14d
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    (%rdx),%edi
  test   %edi,%edi
  jne    L33
  mov    %rdx,%rax
  mov    $0x20,%ebx
L0:
  mov    0x4(%rax),%edi
  add    $0x4,%rax
  test   %edi,%edi
  jne    L13
  add    $0x20,%ebx
  cmp    $0xa0,%ebx
  jne    L0
  movq   $0x0,0x4(%r12)
  shl    $0x1f,%ebp
  pop    %rbx
  mov    %ebp,(%r12)
  pop    %rbp
  movl   $0x0,0xc(%r12)
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L33:
  xor    %ebx,%ebx
L13:
  call   <softfloat_countLeadingZeros32@plt>
  lea    -0xf(%rbx,%rax,1),%edx
  test   %edx,%edx
  jne    L8
L38:
  pop    %rbx
  mov    %r12,%rcx
  mov    %r13,%rdx
  mov    %r14d,%esi
  mov    %ebp,%edi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1070 <softfloat_roundPackMToF128M@plt>
  nopw   0x0(%rax,%rax,1)
L8:
  mov    %r13,%rcx
  mov    %r13,%rsi
  mov    $0x5,%edi
  sub    %edx,%r14d
  call   <softfloat_shiftLeftM@plt>
  jmp    L38
```

assistant: ```c
void softfloat_normRoundPackMToF128M(bool sign, int32_t exp, uint32_t *extSigPtr, uint32_t *zWPtr) {
  const uint32_t *ptr;
  int_fast16_t shiftCount;
  uint32_t wordSig;
  ptr = extSigPtr + 0;
  shiftCount = 0;
  for (;;) {
    wordSig = *ptr;
    if (wordSig)
      break;
    shiftCount += 32;
    if (160 <= shiftCount) {
      zWPtr[0] = (((uint32_t)(sign) << 31) + ((uint32_t)(0) << 16) + (0));
      zWPtr[((4) - 1 - (2))] = 0;
      zWPtr[((4) - 1 - (1))] = 0;
      zWPtr[((4) - 1 - (0))] = 0;
      return;
    }
    ptr -= -1;
  }
  shiftCount += softfloat_countLeadingZeros32(wordSig) - 15;
  if (shiftCount) {
    exp -= shiftCount;
    softfloat_shiftLeftM(5, extSigPtr, shiftCount, extSigPtr);
  }
  softfloat_roundPackMToF128M(sign, exp, extSigPtr, zWPtr);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<softfloat_normRoundPackMToF128M>:
  endbr64
  push   %r14
  mov    %esi,%r14d
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    (%rdx),%edi
  test   %edi,%edi
  jne    L94
  mov    0x4(%rdx),%edi
  test   %edi,%edi
  jne    L88
  mov    0x8(%rdx),%edi
  test   %edi,%edi
  jne    L28
  mov    0xc(%rdx),%edi
  test   %edi,%edi
  jne    L15
  mov    0x10(%rdx),%edi
  mov    $0x80,%ebx
  test   %edi,%edi
  jne    L56
  shl    $0x1f,%ebp
  pop    %rbx
  movq   $0x0,0x4(%r13)
  mov    %ebp,0x0(%r13)
  pop    %rbp
  movl   $0x0,0xc(%r13)
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L94:
  xor    %ebx,%ebx
L56:
  call   <softfloat_countLeadingZeros32@plt>
  lea    -0xf(%rbx,%rax,1),%edx
  test   %edx,%edx
  jne    L37
L69:
  pop    %rbx
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %r14d,%esi
  mov    %ebp,%edi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1070 <softfloat_roundPackMToF128M@plt>
  nopw   0x0(%rax,%rax,1)
L37:
  mov    %r12,%rcx
  mov    %r12,%rsi
  mov    $0x5,%edi
  sub    %edx,%r14d
  call   <softfloat_shiftLeftM@plt>
  jmp    L69
  nopl   (%rax)
L88:
  mov    $0x20,%ebx
  jmp    L56
  nop
L28:
  mov    $0x40,%ebx
  jmp    L56
  nopw   0x0(%rax,%rax,1)
L15:
  mov    $0x60,%ebx
  jmp    L56
```

assistant: ```c
void softfloat_normRoundPackMToF128M(bool sign, int32_t exp, uint32_t *extSigPtr, uint32_t *zWPtr) {
  const uint32_t *ptr;
  int_fast16_t shiftCount;
  uint32_t wordSig;
  ptr = extSigPtr + 0;
  shiftCount = 0;
  for (;;) {
    wordSig = *ptr;
    if (wordSig)
      break;
    shiftCount += 32;
    if (160 <= shiftCount) {
      zWPtr[0] = (((uint32_t)(sign) << 31) + ((uint32_t)(0) << 16) + (0));
      zWPtr[((4) - 1 - (2))] = 0;
      zWPtr[((4) - 1 - (1))] = 0;
      zWPtr[((4) - 1 - (0))] = 0;
      return;
    }
    ptr -= -1;
  }
  shiftCount += softfloat_countLeadingZeros32(wordSig) - 15;
  if (shiftCount) {
    exp -= shiftCount;
    softfloat_shiftLeftM(5, extSigPtr, shiftCount, extSigPtr);
  }
  softfloat_roundPackMToF128M(sign, exp, extSigPtr, zWPtr);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<HibernateClockConfig>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    $0x400fc010,%eax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  andq   $0xfffffffffffcffff,-0x8(%rbp)
  mov    -0x18(%rbp),%rax
  and    $0x30000,%eax
  or     %rax,-0x8(%rbp)
  mov    $0x400fc010,%edx
  mov    -0x8(%rbp),%rax
  mov    %rax,(%rdx)
  mov    $0x0,%eax
  call   <HibernateWriteComplete@plt>
  nop
  leave
  ret
```

assistant: ```c
void HibernateClockConfig(unsigned long ulConfig) {
  unsigned long ulHIBCtl;

  ;
  ulHIBCtl = (*((volatile unsigned long *)(0x400FC010)));
  ulHIBCtl &= ~(0x00020000 | 0x00000000 | 0x00010000);
  ulHIBCtl |= ulConfig & (0x00020000 | 0x00000000 | 0x00010000);
  (*((volatile unsigned long *)(0x400FC010))) = ulHIBCtl;
  HibernateWriteComplete();
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<HibernateClockConfig>:
  endbr64
  sub    $0x8,%rsp
  mov    0x400fc010,%rax
  and    $0xfffffffffffcffff,%rax
  and    $0x30000,%edi
  or     %rax,%rdi
  mov    %rdi,0x400fc010
  mov    $0x0,%eax
  call   <HibernateWriteComplete@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void HibernateClockConfig(unsigned long ulConfig) {
  unsigned long ulHIBCtl;

  ;
  ulHIBCtl = (*((volatile unsigned long *)(0x400FC010)));
  ulHIBCtl &= ~(0x00020000 | 0x00000000 | 0x00010000);
  ulHIBCtl |= ulConfig & (0x00020000 | 0x00000000 | 0x00010000);
  (*((volatile unsigned long *)(0x400FC010))) = ulHIBCtl;
  HibernateWriteComplete();
}
```