ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What is the c source code of the assembly code below:

```asm
<_check_times>:
  endbr64
  mov    %edi,%edi
  mov    %esi,%esi
  push   %r12
  imul   %rsi,%rdi
  mov    %edi,%eax
  mov    %edi,%r12d
  cmp    %rax,%rdi
  ja     L19
  cmp    $0x10000000,%edi
  ja     L19
  mov    %r12d,%eax
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L19:
  mov    $0x180,%esi
  lea    D9(%rip),%rdi
  xor    %eax,%eax
  call   <_throw_badalloc_fn@plt>
  mov    %r12d,%eax
  pop    %r12
  ret
```

tool_calls: name: read_data
arguments: tag: D9
data_type: string

tool: D9: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pgerakios/Concurrent-Cyclone-with-inference/refs/heads/master/bin/genfiles/position.c

assistant: ```c
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans = ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pgerakios/Concurrent-Cyclone-with-inference/refs/heads/master/bin/genfiles/position.c", 384));
  return word_ans;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<insertsort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x2,-0x8(%rbp)
  jmp    L48
L42:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  jmp    L49
L46:
  mov    -0x4(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
L49:
  cmpl   $0x0,-0x4(%rbp)
  jle    L41
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L46
L41:
  mov    -0x4(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x8(%rbp)
L48:
  mov    -0x8(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jle    L42
  nop
  pop    %rbp
  ret
```

assistant: ```c
insertsort(int a[], int n) {
  int i, j;
  for (i = 2; i <= n; i++) {
    a[0] = a[i];
    j = i - 1;
    while (j > 0 && a[0] > a[j])
      a[j + 1] = a[j--];
    a[j + 1] = a[0];
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<insertsort>:
  endbr64
  cmp    $0x1,%esi
  jle    L20
  lea    0x4(%rdi),%r9
  mov    $0x1,%r8d
  jmp    L47
L29:
  cltq
  mov    %ecx,0x4(%rdi,%rax,4)
  add    $0x1,%r8d
  add    $0x4,%r9
  cmp    %esi,%r8d
  je     L20
L47:
  mov    0x4(%r9),%ecx
  mov    %ecx,(%rdi)
  mov    %r8d,%eax
  mov    %r9,%rdx
  test   %r8d,%r8d
  jle    L29
L32:
  cmp    (%rdx),%ecx
  jle    L29
  sub    $0x4,%rdx
  sub    $0x1,%eax
  jne    L32
  jmp    L29
L20:
  ret
```

assistant: ```c
insertsort(int a[], int n) {
  int i, j;
  for (i = 2; i <= n; i++) {
    a[0] = a[i];
    j = i - 1;
    while (j > 0 && a[0] > a[j])
      a[j + 1] = a[j--];
    a[j + 1] = a[0];
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<insertsort>:
  endbr64
  movslq %esi,%r9
  mov    $0x1,%r8d
  cmp    $0x1,%esi
  jle    L29
  nopw   0x0(%rax,%rax,1)
L42:
  mov    0x4(%rdi,%r8,4),%ecx
  mov    %r8,%rax
  mov    %ecx,(%rdi)
  nopw   0x0(%rax,%rax,1)
L32:
  cmp    (%rdi,%rax,4),%ecx
  jle    L20
  sub    $0x1,%rax
  test   %eax,%eax
  jne    L32
  mov    $0x4,%eax
L43:
  add    $0x1,%r8
  mov    %ecx,(%rdi,%rax,1)
  cmp    %r8,%r9
  jne    L42
L29:
  xor    %eax,%eax
  ret
  nopl   0x0(%rax)
L20:
  lea    0x1(%rax),%eax
  cltq
  shl    $0x2,%rax
  jmp    L43
```

assistant: ```c
insertsort(int a[], int n) {
  int i, j;
  for (i = 2; i <= n; i++) {
    a[0] = a[i];
    j = i - 1;
    while (j > 0 && a[0] > a[j])
      a[j + 1] = a[j--];
    a[j + 1] = a[0];
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<insertsort>:
  endbr64
  movslq %esi,%r9
  mov    $0x1,%r8d
  cmp    $0x1,%esi
  jle    L19
  nopw   0x0(%rax,%rax,1)
L15:
  mov    0x4(%rdi,%r8,4),%ecx
  mov    %r8,%rax
  mov    %ecx,(%rdi)
  nopw   0x0(%rax,%rax,1)
L23:
  cmp    (%rdi,%rax,4),%ecx
  jle    L18
  sub    $0x1,%rax
  test   %eax,%eax
  jne    L23
  mov    $0x4,%eax
L5:
  add    $0x1,%r8
  mov    %ecx,(%rdi,%rax,1)
  cmp    %r8,%r9
  jne    L15
L19:
  xor    %eax,%eax
  ret
  nopl   0x0(%rax)
L18:
  lea    0x1(%rax),%eax
  cltq
  shl    $0x2,%rax
  jmp    L5
```

assistant: ```c
insertsort(int a[], int n) {
  int i, j;
  for (i = 2; i <= n; i++) {
    a[0] = a[i];
    j = i - 1;
    while (j > 0 && a[0] > a[j])
      a[j + 1] = a[j--];
    a[j + 1] = a[0];
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<invalid_encoder>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  nop
  leave
  ret
```

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

tool: D4: Error!
There is no %s encoder! Exiting...


assistant: ```c
void invalid_encoder(const char *encoder) {
  printf("Error!\nThere is no %s encoder! Exiting...\n", encoder);
  exit(1);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<invalid_encoder>:
  endbr64
  sub    $0x8,%rsp
  mov    %rdi,%rsi
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D9
type_guessed: string

tool: D9: Error!
There is no %s encoder! Exiting...


assistant: ```c
void invalid_encoder(const char *encoder) {
  printf("Error!\nThere is no %s encoder! Exiting...\n", encoder);
  exit(1);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<invalid_encoder>:
  endbr64
  sub    $0x8,%rsp
  mov    %rdi,%rsi
  lea    D8(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  add    $0x8,%rsp
  jmp    1070 <exit@plt>
```

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

tool: D8: Error!
There is no %s encoder! Exiting...


assistant: ```c
void invalid_encoder(const char *encoder) {
  printf("Error!\nThere is no %s encoder! Exiting...\n", encoder);
  exit(1);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<invalid_encoder>:
  endbr64
  sub    $0x8,%rsp
  mov    %rdi,%rsi
  lea    D7(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  add    $0x8,%rsp
  jmp    1070 <exit@plt>
```

tool_calls: name: read_data
arguments: tag: D7
type: string

tool: D7: Error!
There is no %s encoder! Exiting...


assistant: ```c
void invalid_encoder(const char *encoder) {
  printf("Error!\nThere is no %s encoder! Exiting...\n", encoder);
  exit(1);
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<math_vector_zero>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L2
L4:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x4(%rbp)
L2:
  mov    -0x4(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L4
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void math_vector_zero(float *v, int n) {
  for (int i = 0; i < n; i++) {
    v[i] = 0.0f;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<math_vector_zero>:
  endbr64
  test   %esi,%esi
  jle    L10
  mov    %rdi,%rax
  lea    -0x1(%rsi),%edx
  lea    0x4(%rdi,%rdx,4),%rdx
L9:
  movl   $0x0,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L9
L10:
  ret
```

assistant: ```c
void math_vector_zero(float *v, int n) {
  for (int i = 0; i < n; i++) {
    v[i] = 0.0f;
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<math_vector_zero>:
  endbr64
  test   %esi,%esi
  jle    L1
  movslq %esi,%rsi
  lea    0x0(,%rsi,4),%rdx
  xor    %esi,%esi
  jmp    1050 <memset@plt>
  nopw   0x0(%rax,%rax,1)
L1:
  ret
```

assistant: ```c
void math_vector_zero(float *v, int n) {
  for (int i = 0; i < n; i++) {
    v[i] = 0.0f;
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<math_vector_zero>:
  endbr64
  test   %esi,%esi
  jle    L8
  movslq %esi,%rsi
  lea    0x0(,%rsi,4),%rdx
  xor    %esi,%esi
  jmp    1050 <memset@plt>
  nopw   0x0(%rax,%rax,1)
L8:
  ret
```

assistant: ```c
void math_vector_zero(float *v, int n) {
  for (int i = 0; i < n; i++) {
    v[i] = 0.0f;
  }
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<getfile>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0x20000(%rsp),%r11
L38:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L38
  sub    $0x40,%rsp
  mov    %rdi,-0x20028(%rbp)
  mov    %rsi,-0x20030(%rbp)
  mov    %edx,-0x20034(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x20030(%rbp),%rax
  lea    D5(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x20018(%rbp)
  cmpq   $0x0,-0x20018(%rbp)
  jne    L69
  mov    $0x0,%eax
  call   <std_err@plt>
L69:
  movl   $0x1ffff,-0x2001c(%rbp)
  jmp    L30
L22:
  mov    -0x2001c(%rbp),%eax
  cmp    -0x20034(%rbp),%eax
  jle    L67
  mov    -0x20034(%rbp),%eax
  mov    %eax,-0x2001c(%rbp)
L67:
  mov    -0x20028(%rbp),%rdx
  mov    -0x2001c(%rbp),%esi
  lea    -0x20010(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x1,%edx
  mov    %rax,%rdi
  call   <fread@plt>
  cmp    $0x1,%eax
  je     L62
  mov    $0x0,%eax
  call   <read_err@plt>
L62:
  mov    -0x20018(%rbp),%rdx
  mov    -0x2001c(%rbp),%esi
  lea    -0x20010(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x1,%edx
  mov    %rax,%rdi
  call   <fwrite@plt>
  cmp    $0x1,%eax
  je     L5
  mov    $0x0,%eax
  call   <write_err@plt>
L5:
  mov    -0x2001c(%rbp),%eax
  sub    %eax,-0x20034(%rbp)
L30:
  cmpl   $0x0,-0x20034(%rbp)
  jne    L22
  mov    -0x20018(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L70
  call   <__stack_chk_fail@plt>
L70:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D5
data_type: string

tool: D5: wb

assistant: ```c
void getfile(FILE *fdin, u_char *fname, u_int size) {
  FILE *fdout;
  int len;
  u_char buff[32768];
  fdout = fopen(fname, "wb");
  if (!fdout)
    std_err();
  for (len = sizeof(buff) - 1; size; size -= len) {
    if (len > size)
      len = size;
    if (fread(buff, len, 1, fdin) != 1)
      read_err();
    if (fwrite(buff, len, 1, fdout) != 1)
      write_err();
  }
  fclose(fdout);
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<getfile>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x20000(%rsp),%r11
L61:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L61
  sub    $0x10,%rsp
  mov    %rdi,%r14
  mov    %rsi,%rdi
  mov    %edx,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x20008(%rsp)
  xor    %eax,%eax
  lea    D8(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L80
L52:
  test   %ebp,%ebp
  je     L93
  mov    $0x1ffff,%ebx
  mov    %rsp,%r12
  jmp    L48
L80:
  mov    $0x0,%eax
  call   <std_err@plt>
  jmp    L52
L68:
  mov    $0x0,%eax
  call   <read_err@plt>
  jmp    L50
L95:
  sub    %ebx,%ebp
  je     L93
L48:
  cmp    %ebp,%ebx
  cmovg  %ebp,%ebx
  mov    %r14,%rcx
  mov    $0x1,%edx
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <fread@plt>
  cmp    $0x1,%eax
  jne    L68
L50:
  mov    %r13,%rcx
  mov    $0x1,%edx
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <fwrite@plt>
  cmp    $0x1,%eax
  je     L95
  mov    $0x0,%eax
  call   <write_err@plt>
  jmp    L95
L93:
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    0x20008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L67
  add    $0x20010,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L67:
  call   <__stack_chk_fail@plt>
```

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

tool: D8: wb

assistant: ```c
void getfile(FILE *fdin, u_char *fname, u_int size) {
  FILE *fdout;
  int len;
  u_char buff[32768];
  fdout = fopen(fname, "wb");
  if (!fdout)
    std_err();
  for (len = sizeof(buff) - 1; size; size -= len) {
    if (len > size)
      len = size;
    if (fread(buff, len, 1, fdin) != 1)
      read_err();
    if (fwrite(buff, len, 1, fdout) != 1)
      write_err();
  }
  fclose(fdout);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<getfile>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x20000(%rsp),%r11
L59:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L59
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x20008(%rsp)
  xor    %eax,%eax
  mov    %rdi,%r14
  mov    %rsi,%rdi
  lea    D5(%rip),%rsi
  mov    %edx,%ebp
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L77
L7:
  test   %ebp,%ebp
  je     L26
  mov    $0x1ffff,%ebx
  mov    %rsp,%r12
  nopl   0x0(%rax,%rax,1)
L1:
  cmp    %ebp,%ebx
  mov    %r14,%rcx
  mov    $0x1,%edx
  mov    %r12,%rdi
  cmovg  %ebp,%ebx
  mov    %ebx,%esi
  call   <fread@plt>
  cmp    $0x1,%eax
  je     L37
  xor    %eax,%eax
  call   <read_err@plt>
L37:
  mov    %r13,%rcx
  mov    $0x1,%edx
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <fwrite@plt>
  cmp    $0x1,%eax
  je     L49
  xor    %eax,%eax
  call   <write_err@plt>
L49:
  sub    %ebx,%ebp
  jne    L1
L26:
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    0x20008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L28
  add    $0x20010,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L77:
  xor    %eax,%eax
  call   <std_err@plt>
  jmp    L7
L28:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D5
type_guessed: string

tool: D5: wb

assistant: ```c
void getfile(FILE *fdin, u_char *fname, u_int size) {
  FILE *fdout;
  int len;
  u_char buff[32768];
  fdout = fopen(fname, "wb");
  if (!fdout)
    std_err();
  for (len = sizeof(buff) - 1; size; size -= len) {
    if (len > size)
      len = size;
    if (fread(buff, len, 1, fdin) != 1)
      read_err();
    if (fwrite(buff, len, 1, fdout) != 1)
      write_err();
  }
  fclose(fdout);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<getfile>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x20000(%rsp),%r11
L43:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L43
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x20008(%rsp)
  xor    %eax,%eax
  mov    %rdi,%r14
  mov    %rsi,%rdi
  lea    D5(%rip),%rsi
  mov    %edx,%ebp
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L68
L7:
  test   %ebp,%ebp
  je     L65
  mov    $0x1ffff,%ebx
  mov    %rsp,%r12
  nopl   0x0(%rax,%rax,1)
L9:
  cmp    %ebp,%ebx
  mov    %r14,%rcx
  mov    $0x1,%edx
  mov    %r12,%rdi
  cmovg  %ebp,%ebx
  mov    %ebx,%esi
  call   <fread@plt>
  cmp    $0x1,%eax
  je     L78
  xor    %eax,%eax
  call   <read_err@plt>
L78:
  mov    %r13,%rcx
  mov    $0x1,%edx
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <fwrite@plt>
  cmp    $0x1,%eax
  je     L2
  xor    %eax,%eax
  call   <write_err@plt>
L2:
  sub    %ebx,%ebp
  jne    L9
L65:
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    0x20008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L64
  add    $0x20010,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L68:
  xor    %eax,%eax
  call   <std_err@plt>
  jmp    L7
L64:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D5
type_infered: string

tool: D5: wb

assistant: ```c
void getfile(FILE *fdin, u_char *fname, u_int size) {
  FILE *fdout;
  int len;
  u_char buff[32768];
  fdout = fopen(fname, "wb");
  if (!fdout)
    std_err();
  for (len = sizeof(buff) - 1; size; size -= len) {
    if (len > size)
      len = size;
    if (fread(buff, len, 1, fdin) != 1)
      read_err();
    if (fwrite(buff, len, 1, fdout) != 1)
      write_err();
  }
  fclose(fdout);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<hexfloattofloatintpart>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  movl   $0x0,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L14
  movl   $0x1,-0x14(%rbp)
L14:
  fldz
  fstpt  -0x10(%rbp)
  movl   $0x0,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  jmp    L16
L48:
  cmpl   $0x0,-0x1c(%rbp)
  je     L7
  mov    -0x18(%rbp),%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <get_digit@plt>
  fstpt  -0x40(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  mov    $0x10,%edi
  call   <powl@plt>
  fldt   -0x40(%rbp)
  fmulp  %st,%st(1)
  fldt   -0x10(%rbp)
  faddp  %st,%st(1)
  fstpt  -0x10(%rbp)
  jmp    L18
L7:
  mov    -0x18(%rbp),%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <get_digit@plt>
  fstpt  -0x10(%rbp)
L18:
  addl   $0x1,-0x1c(%rbp)
  subl   $0x1,-0x18(%rbp)
L16:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    -0x14(%rbp),%eax
  cmp    %eax,-0x1c(%rbp)
  jb     L48
  fldt   -0x10(%rbp)
  leave
  ret
```

assistant: ```c
long double hexfloattofloatintpart(const char *hex_str) {
  unsigned int c, i, pad;
  long double res;
  pad = 0;
  if (hex_str[0] == '-') {
    pad = 1;
  }
  res = 0.0;
  for (c = 0, i = strlen(hex_str) - 1; c < strlen(hex_str) - pad; c++, i--) {
    if (!c == 0) {
      res = res + (get_digit(hex_str[i]) * powl(16, c));
    } else {
      res = get_digit(hex_str[i]);
    }
  }
  return res;
}
```
user: What is the c source code of the assembly code below:

```asm
<hexfloattofloatintpart>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %rdi,%r12
  cmpb   $0x2d,(%rdi)
  sete   %r14b
  movzbl %r14b,%r14d
  call   <strlen@plt>
  lea    -0x1(%rax),%r13d
  fldz
  fstpt  (%rsp)
  mov    $0x0,%ebx
  jmp    L2
L16:
  mov    %ebp,%ebp
  movsbl (%r12,%rbp,1),%edi
  call   <get_digit@plt>
  fstpt  (%rsp)
L18:
  add    $0x1,%ebx
L2:
  mov    %r13d,%ebp
  sub    %ebx,%ebp
  mov    %r12,%rdi
  call   <strlen@plt>
  sub    %r14d,%eax
  cmp    %ebx,%eax
  jbe    L17
  test   %ebx,%ebx
  je     L16
  mov    %ebp,%ebp
  movsbl (%r12,%rbp,1),%edi
  call   <get_digit@plt>
  fstpt  0x10(%rsp)
  mov    %ebx,%esi
  mov    $0x10,%edi
  call   <powl@plt>
  fldt   0x10(%rsp)
  fmulp  %st,%st(1)
  fldt   (%rsp)
  faddp  %st,%st(1)
  fstpt  (%rsp)
  jmp    L18
L17:
  fldt   (%rsp)
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
long double hexfloattofloatintpart(const char *hex_str) {
  unsigned int c, i, pad;
  long double res;
  pad = 0;
  if (hex_str[0] == '-') {
    pad = 1;
  }
  res = 0.0;
  for (c = 0, i = strlen(hex_str) - 1; c < strlen(hex_str) - pad; c++, i--) {
    if (!c == 0) {
      res = res + (get_digit(hex_str[i]) * powl(16, c));
    } else {
      res = get_digit(hex_str[i]);
    }
  }
  return res;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<hexfloattofloatintpart>:
  endbr64
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  cmpb   $0x2d,(%rdi)
  sete   %r14b
  xor    %ebx,%ebx
  call   <strlen@plt>
  fldz
  lea    -0x1(%rax),%r13d
  fstpt  (%rsp)
  jmp    L30
  nop
L7:
  call   <get_digit@plt>
  mov    %ebx,%esi
  mov    $0x10,%edi
  fstpt  0x10(%rsp)
  call   <powl@plt>
  fldt   0x10(%rsp)
  fmulp  %st,%st(1)
  fldt   (%rsp)
  faddp  %st,%st(1)
  fstpt  (%rsp)
L23:
  add    $0x1,%ebx
L30:
  mov    %r12,%rdi
  mov    %r13d,%ebp
  call   <strlen@plt>
  sub    %ebx,%ebp
  sub    %r14d,%eax
  cmp    %ebx,%eax
  jbe    L32
  movsbl (%r12,%rbp,1),%edi
  test   %ebx,%ebx
  jne    L7
  call   <get_digit@plt>
  fstpt  (%rsp)
  jmp    L23
  nopl   (%rax)
L32:
  fldt   (%rsp)
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
long double hexfloattofloatintpart(const char *hex_str) {
  unsigned int c, i, pad;
  long double res;
  pad = 0;
  if (hex_str[0] == '-') {
    pad = 1;
  }
  res = 0.0;
  for (c = 0, i = strlen(hex_str) - 1; c < strlen(hex_str) - pad; c++, i--) {
    if (!c == 0) {
      res = res + (get_digit(hex_str[i]) * powl(16, c));
    } else {
      res = get_digit(hex_str[i]);
    }
  }
  return res;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<hexfloattofloatintpart>:
  endbr64
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  cmpb   $0x2d,(%rdi)
  sete   %r14b
  xor    %ebx,%ebx
  call   <strlen@plt>
  fldz
  lea    -0x1(%rax),%r13d
  fstpt  (%rsp)
  jmp    L37
  nop
L14:
  call   <get_digit@plt>
  mov    %ebx,%esi
  mov    $0x10,%edi
  fstpt  0x10(%rsp)
  call   <powl@plt>
  fldt   0x10(%rsp)
  fmulp  %st,%st(1)
  fldt   (%rsp)
  faddp  %st,%st(1)
  fstpt  (%rsp)
L32:
  add    $0x1,%ebx
L37:
  mov    %r12,%rdi
  mov    %r13d,%ebp
  call   <strlen@plt>
  sub    %ebx,%ebp
  sub    %r14d,%eax
  cmp    %ebx,%eax
  jbe    L15
  movsbl (%r12,%rbp,1),%edi
  test   %ebx,%ebx
  jne    L14
  call   <get_digit@plt>
  fstpt  (%rsp)
  jmp    L32
  nopl   (%rax)
L15:
  fldt   (%rsp)
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
long double hexfloattofloatintpart(const char *hex_str) {
  unsigned int c, i, pad;
  long double res;
  pad = 0;
  if (hex_str[0] == '-') {
    pad = 1;
  }
  res = 0.0;
  for (c = 0, i = strlen(hex_str) - 1; c < strlen(hex_str) - pad; c++, i--) {
    if (!c == 0) {
      res = res + (get_digit(hex_str[i]) * powl(16, c));
    } else {
      res = get_digit(hex_str[i]);
    }
  }
  return res;
}
```