ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What would the C source look like for the assembly code provided here?

```asm
<surface_incidence_angle>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  movq   %xmm1,%r12
  movss  %xmm2,0x8(%rsp)
  movss  %xmm3,0xc(%rsp)
  call   <deg2rad@plt>
  movq   %xmm0,%r13
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  call   <deg2rad@plt>
  movq   %xmm0,%rbx
  movq   %r13,%xmm0
  call   <cos@plt>
  mov    %eax,%ebp
  movq   %rbx,%xmm0
  call   <cos@plt>
  imul   %eax,%ebp
  movq   %rbx,%xmm0
  call   <sin@plt>
  mov    %eax,%ebx
  movq   %r13,%xmm0
  call   <sin@plt>
  imul   %eax,%ebx
  pxor   %xmm1,%xmm1
  cvtss2sd 0x8(%rsp),%xmm1
  movq   %r12,%xmm0
  subsd  %xmm1,%xmm0
  call   <deg2rad@plt>
  call   <cos@plt>
  imul   %eax,%ebx
  lea    (%rbx,%rbp,1),%edi
  call   <acos@plt>
  mov    %eax,%edi
  call   <rad2deg@plt>
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
double surface_incidence_angle(double zenith, double azimuth180, float azm_rotation, float slope) {
  double zenith_rad = deg2rad(zenith);
  double slope_rad = deg2rad(slope);
  return rad2deg(acos(cos(zenith_rad) * cos(slope_rad) + sin(slope_rad) * sin(zenith_rad) * cos(deg2rad(azimuth180 - azm_rotation))));
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<surface_incidence_angle>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  movsd  %xmm1,0x18(%rsp)
  movss  %xmm2,0x14(%rsp)
  movss  %xmm3,(%rsp)
  call   <deg2rad@plt>
  movss  (%rsp),%xmm3
  movsd  %xmm0,0x8(%rsp)
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm3,%xmm0
  call   <deg2rad@plt>
  movsd  0x8(%rsp),%xmm4
  movsd  %xmm0,(%rsp)
  movapd %xmm4,%xmm0
  call   <cos@plt>
  movsd  (%rsp),%xmm3
  mov    %eax,%ebp
  movapd %xmm3,%xmm0
  call   <cos@plt>
  movsd  (%rsp),%xmm3
  imul   %eax,%ebp
  movapd %xmm3,%xmm0
  call   <sin@plt>
  movsd  0x8(%rsp),%xmm4
  mov    %eax,%ebx
  movapd %xmm4,%xmm0
  call   <sin@plt>
  movss  0x14(%rsp),%xmm2
  movsd  0x18(%rsp),%xmm1
  imul   %eax,%ebx
  cvtss2sd %xmm2,%xmm2
  subsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  call   <deg2rad@plt>
  call   <cos@plt>
  imul   %eax,%ebx
  lea    (%rbx,%rbp,1),%edi
  call   <acos@plt>
  add    $0x28,%rsp
  pop    %rbx
  mov    %eax,%edi
  pop    %rbp
  jmp    10c0 <rad2deg@plt>
```

assistant: ```c
double surface_incidence_angle(double zenith, double azimuth180, float azm_rotation, float slope) {
  double zenith_rad = deg2rad(zenith);
  double slope_rad = deg2rad(slope);
  return rad2deg(acos(cos(zenith_rad) * cos(slope_rad) + sin(slope_rad) * sin(zenith_rad) * cos(deg2rad(azimuth180 - azm_rotation))));
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<surface_incidence_angle>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  movsd  %xmm1,0x18(%rsp)
  movss  %xmm2,0x14(%rsp)
  movss  %xmm3,(%rsp)
  call   <deg2rad@plt>
  movss  (%rsp),%xmm3
  movsd  %xmm0,0x8(%rsp)
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm3,%xmm0
  call   <deg2rad@plt>
  movsd  0x8(%rsp),%xmm4
  movsd  %xmm0,(%rsp)
  movapd %xmm4,%xmm0
  call   <cos@plt>
  movsd  (%rsp),%xmm3
  mov    %eax,%ebp
  movapd %xmm3,%xmm0
  call   <cos@plt>
  movsd  (%rsp),%xmm3
  imul   %eax,%ebp
  movapd %xmm3,%xmm0
  call   <sin@plt>
  movsd  0x8(%rsp),%xmm4
  mov    %eax,%ebx
  movapd %xmm4,%xmm0
  call   <sin@plt>
  movss  0x14(%rsp),%xmm2
  movsd  0x18(%rsp),%xmm1
  imul   %eax,%ebx
  cvtss2sd %xmm2,%xmm2
  subsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  call   <deg2rad@plt>
  call   <cos@plt>
  imul   %eax,%ebx
  lea    (%rbx,%rbp,1),%edi
  call   <acos@plt>
  add    $0x28,%rsp
  pop    %rbx
  mov    %eax,%edi
  pop    %rbp
  jmp    10c0 <rad2deg@plt>
```

assistant: ```c
double surface_incidence_angle(double zenith, double azimuth180, float azm_rotation, float slope) {
  double zenith_rad = deg2rad(zenith);
  double slope_rad = deg2rad(slope);
  return rad2deg(acos(cos(zenith_rad) * cos(slope_rad) + sin(slope_rad) * sin(zenith_rad) * cos(deg2rad(azimuth180 - azm_rotation))));
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<RandomFunc>:
  endbr64
  movzwl (%rdi),%ecx
  movzwl 0x2(%rdi),%edx
  test   %dx,%dx
  je     L9
  mov    $0x0,%eax
L4:
  add    $0x2,%eax
  cmp    %ax,%dx
  ja     L4
L9:
  lea    -0x42f5(%rcx),%eax
  mov    %ax,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  char copy11;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      if (state[0UL] > local1) {
        if (state[0UL] > local1) {
          copy11 = *((char *)(&state[local1]) + 1);
          *((char *)(&state[local1]) + 1) = *((char *)(&state[local1]) + 0);
          *((char *)(&state[local1]) + 0) = copy11;
          copy11 = *((char *)(&state[local1]) + 0);
          *((char *)(&state[local1]) + 0) = *((char *)(&state[local1]) + 1);
          *((char *)(&state[local1]) + 1) = copy11;
        } else {
          state[0UL] += state[0UL];
        }
      } else if (!(state[0UL] <= local1)) {
        state[local1] *= state[local1];
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + 293908934UL;
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<RandomFunc>:
  endbr64
  movzwl 0x2(%rdi),%edx
  movzwl (%rdi),%ecx
  test   %dx,%dx
  je     L2
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L14:
  add    $0x2,%eax
  cmp    %ax,%dx
  ja     L14
L2:
  lea    -0x42f5(%rcx),%eax
  mov    %ax,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  char copy11;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      if (state[0UL] > local1) {
        if (state[0UL] > local1) {
          copy11 = *((char *)(&state[local1]) + 1);
          *((char *)(&state[local1]) + 1) = *((char *)(&state[local1]) + 0);
          *((char *)(&state[local1]) + 0) = copy11;
          copy11 = *((char *)(&state[local1]) + 0);
          *((char *)(&state[local1]) + 0) = *((char *)(&state[local1]) + 1);
          *((char *)(&state[local1]) + 1) = copy11;
        } else {
          state[0UL] += state[0UL];
        }
      } else if (!(state[0UL] <= local1)) {
        state[local1] *= state[local1];
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + 293908934UL;
  }
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<RandomFunc>:
  endbr64
  movzwl 0x2(%rdi),%edx
  movzwl (%rdi),%ecx
  test   %dx,%dx
  je     L19
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L14:
  add    $0x2,%eax
  cmp    %ax,%dx
  ja     L14
L19:
  lea    -0x42f5(%rcx),%eax
  mov    %ax,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  char copy11;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      if (state[0UL] > local1) {
        if (state[0UL] > local1) {
          copy11 = *((char *)(&state[local1]) + 1);
          *((char *)(&state[local1]) + 1) = *((char *)(&state[local1]) + 0);
          *((char *)(&state[local1]) + 0) = copy11;
          copy11 = *((char *)(&state[local1]) + 0);
          *((char *)(&state[local1]) + 0) = *((char *)(&state[local1]) + 1);
          *((char *)(&state[local1]) + 1) = copy11;
        } else {
          state[0UL] += state[0UL];
        }
      } else if (!(state[0UL] <= local1)) {
        state[local1] *= state[local1];
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + 293908934UL;
  }
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movb   $0x3,-0x1(%rbp)
  movzbl -0x1(%rbp),%eax
  add    $0x2,%eax
  mov    %al,-0x1(%rbp)
  cmpb   $0x5,-0x1(%rbp)
  je     L9
  mov    $0x0,%eax
  call   <abort@plt>
L9:
  mov    $0x0,%eax
  leave
  ret
```

assistant: ```c
main() {
  char c = 3;
  c += 2;
  if (c != 5)
    abort();
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  mov    $0x0,%eax
  ret
```

assistant: ```c
main() {
  char c = 3;
  c += 2;
  if (c != 5)
    abort();
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  xor    %eax,%eax
  ret
```

assistant: ```c
main() {
  char c = 3;
  c += 2;
  if (c != 5)
    abort();
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  xor    %eax,%eax
  ret
```

assistant: ```c
main() {
  char c = 3;
  c += 2;
  if (c != 5)
    abort();
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x10(%rbp)
  movb   $0x0,-0x11(%rbp)
  movl   $0x0,-0xc(%rbp)
  movb   $0x20,-0x12(%rbp)
L21:
  lea    -0x12(%rbp),%rax
  mov    %rax,%rsi
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movzbl -0x12(%rbp),%eax
  cmp    $0xa,%al
  je     L17
  movzbl -0x12(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x10(%rbp)
L17:
  movzbl -0x12(%rbp),%eax
  cmp    $0xa,%al
  jne    L21
  mov    -0x10(%rbp),%eax
  cltd
  shr    $0x1a,%edx
  add    %edx,%eax
  and    $0x3f,%eax
  sub    %edx,%eax
  add    $0x20,%eax
  mov    %al,-0x11(%rbp)
  movsbl -0x11(%rbp),%eax
  mov    %eax,%esi
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L12
  call   <__stack_chk_fail@plt>
L12:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D20
data_type: string
name: extract_symbolic_data
arguments: tag: D14
data_type: string
name: extract_symbolic_data
arguments: tag: D28
data_type: string

tool: D20: Enter an abitrarily long string, ending with carriage return > 

tool: D14: %c

tool: D28: Check sum is %c


assistant: ```c
int main() {
  char orig;
  int code, accum;
  char checksum;
  printf("Enter an abitrarily long string, ending with carriage return > ");
  accum = 0;
  checksum = 0;
  code = 0;
  orig = ' ';
  do {
    scanf("%c", &orig);
    if (orig != '\n') {
      code = (int)orig;
      accum += code;
    }
  } while (orig != '\n');
  checksum = (char)((accum % 64) + 32);
  printf("Check sum is %c\n", checksum);
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D18(%rip),%rdi
  call   <printf@plt>
  movb   $0x20,0x7(%rsp)
  mov    $0x0,%ebx
  lea    D15(%rip),%rbp
  jmp    L9
L21:
  movsbl %al,%eax
  add    %eax,%ebx
L9:
  lea    0x7(%rsp),%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  movzbl 0x7(%rsp),%eax
  cmp    $0xa,%al
  jne    L21
  mov    %ebx,%eax
  sar    $0x1f,%eax
  shr    $0x1a,%eax
  lea    (%rbx,%rax,1),%esi
  and    $0x3f,%esi
  sub    %eax,%esi
  add    $0x20,%esi
  movsbl %sil,%esi
  lea    D4(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  mov    $0x0,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  ret
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D18
type_infered: string
name: unpack_data
arguments: label: D15
type_infered: string
name: unpack_data
arguments: label: D4
type_infered: string

tool: D18: Enter an abitrarily long string, ending with carriage return > 

tool: D15: %c

tool: D4: Check sum is %c


assistant: ```c
int main() {
  char orig;
  int code, accum;
  char checksum;
  printf("Enter an abitrarily long string, ending with carriage return > ");
  accum = 0;
  checksum = 0;
  code = 0;
  orig = ' ';
  do {
    scanf("%c", &orig);
    if (orig != '\n') {
      code = (int)orig;
      accum += code;
    }
  } while (orig != '\n');
  checksum = (char)((accum % 64) + 32);
  printf("Check sum is %c\n", checksum);
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %r12
  lea    D11(%rip),%rdi
  push   %rbp
  lea    D28(%rip),%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x7(%rsp),%r12
  call   <printf@plt>
  movb   $0x20,0x7(%rsp)
  nopl   0x0(%rax,%rax,1)
L14:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  movsbl 0x7(%rsp),%eax
  cmp    $0xa,%al
  je     L17
  add    %eax,%ebx
  jmp    L14
  nopl   0x0(%rax,%rax,1)
L17:
  mov    %ebx,%eax
  lea    D16(%rip),%rdi
  sar    $0x1f,%eax
  shr    $0x1a,%eax
  lea    (%rbx,%rax,1),%esi
  and    $0x3f,%esi
  sub    %eax,%esi
  xor    %eax,%eax
  add    $0x20,%esi
  movsbl %sil,%esi
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L16
  add    $0x10,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L16:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D11
data_type: string
name: unpack_data
arguments: data_label: D28
data_type: string
name: unpack_data
arguments: data_label: D16
data_type: string

tool: D11: Enter an abitrarily long string, ending with carriage return > 

tool: D28: %c

tool: D16: Check sum is %c


assistant: ```c
int main() {
  char orig;
  int code, accum;
  char checksum;
  printf("Enter an abitrarily long string, ending with carriage return > ");
  accum = 0;
  checksum = 0;
  code = 0;
  orig = ' ';
  do {
    scanf("%c", &orig);
    if (orig != '\n') {
      code = (int)orig;
      accum += code;
    }
  } while (orig != '\n');
  checksum = (char)((accum % 64) + 32);
  printf("Check sum is %c\n", checksum);
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %r12
  lea    D5(%rip),%rdi
  push   %rbp
  lea    D25(%rip),%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x7(%rsp),%r12
  call   <printf@plt>
  movb   $0x20,0x7(%rsp)
  nopl   0x0(%rax,%rax,1)
L2:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  movsbl 0x7(%rsp),%eax
  cmp    $0xa,%al
  je     L4
  add    %eax,%ebx
  jmp    L2
  nopl   0x0(%rax,%rax,1)
L4:
  mov    %ebx,%eax
  lea    D18(%rip),%rdi
  sar    $0x1f,%eax
  shr    $0x1a,%eax
  lea    (%rbx,%rax,1),%esi
  and    $0x3f,%esi
  sub    %eax,%esi
  xor    %eax,%eax
  add    $0x20,%esi
  movsbl %sil,%esi
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L20
  add    $0x10,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L20:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D5
type_infered: string
name: disassemble_data
arguments: data_tag: D25
type_infered: string
name: disassemble_data
arguments: data_tag: D18
type_infered: string

tool: D5: Enter an abitrarily long string, ending with carriage return > 

tool: D25: %c

tool: D18: Check sum is %c


assistant: ```c
int main() {
  char orig;
  int code, accum;
  char checksum;
  printf("Enter an abitrarily long string, ending with carriage return > ");
  accum = 0;
  checksum = 0;
  code = 0;
  orig = ' ';
  do {
    scanf("%c", &orig);
    if (orig != '\n') {
      code = (int)orig;
      accum += code;
    }
  } while (orig != '\n');
  checksum = (char)((accum % 64) + 32);
  printf("Check sum is %c\n", checksum);
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<read_llint>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  movl   $0x0,-0x14(%rbp)
  movb   $0x0,-0x19(%rbp)
  mov    $0x0,%eax
  call   <read_space@plt>
  lea    -0x19(%rbp),%rax
  mov    %rax,%rdi
  call   <read_char@plt>
  movzbl -0x19(%rbp),%eax
  cmp    $0x2d,%al
  jne    L78
  movl   $0x1,-0x14(%rbp)
  jmp    L87
L78:
  movzbl -0x19(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <unread_char@plt>
  jmp    L87
L15:
  mov    -0x10(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  movzbl -0x19(%rbp),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  cltq
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x1,-0x18(%rbp)
L87:
  lea    -0x19(%rbp),%rax
  mov    %rax,%rdi
  call   <read_char@plt>
  test   %rax,%rax
  je     L61
  movzbl -0x19(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <naive_isdigit@plt>
  test   %rax,%rax
  jne    L15
L61:
  movzbl -0x19(%rbp),%eax
  test   %al,%al
  je     L57
  movzbl -0x19(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <unread_char@plt>
L57:
  cmpl   $0x0,-0x18(%rbp)
  je     L63
  cmpl   $0x0,-0x14(%rbp)
  je     L58
  mov    -0x10(%rbp),%rax
  neg    %rax
  jmp    L17
L58:
  mov    -0x10(%rbp),%rax
L17:
  mov    -0x28(%rbp),%rdx
  mov    %rax,(%rdx)
L63:
  cmpl   $0x0,-0x18(%rbp)
  jne    L44
  cmpl   $0x0,-0x14(%rbp)
  je     L44
  mov    $0x2d,%edi
  call   <unread_char@plt>
L44:
  mov    -0x18(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L34
  call   <__stack_chk_fail@plt>
L34:
  leave
  ret
```

assistant: ```c
int read_llint(long long *lldp) {
  int flag = 0;
  long long lld = 0;
  int f = 0;
  char c = '\0';
  read_space();
  read_char(&c);
  if (c == '-')
    f = 1;
  else
    unread_char(c);
  while (read_char(&c) && naive_isdigit(c)) {
    lld = lld * 10 + (c - '0');
    flag = 1;
  }
  if (c)
    unread_char(c);
  if (flag)
    *lldp = f ? -lld : lld;
  if (!flag && f)
    unread_char('-');
  return flag;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<read_llint>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movb   $0x0,0x7(%rsp)
  call   <read_space@plt>
  lea    0x7(%rsp),%rdi
  call   <read_char@plt>
  movzbl 0x7(%rsp),%edi
  mov    $0x1,%r12d
  cmp    $0x2d,%dil
  jne    L62
L50:
  mov    $0x0,%r13d
  mov    $0x0,%r14d
  lea    0x7(%rsp),%rbx
  jmp    L92
L62:
  movsbl %dil,%edi
  call   <unread_char@plt>
  mov    $0x0,%r12d
  jmp    L50
L27:
  lea    0x0(%r13,%r13,4),%rdx
  movsbl 0x7(%rsp),%eax
  sub    $0x30,%eax
  cltq
  lea    (%rax,%rdx,2),%r13
  mov    $0x1,%r14d
L92:
  mov    %rbx,%rdi
  call   <read_char@plt>
  test   %rax,%rax
  je     L5
  movsbl 0x7(%rsp),%edi
  call   <naive_isdigit@plt>
  test   %rax,%rax
  jne    L27
L5:
  movzbl 0x7(%rsp),%edi
  test   %dil,%dil
  jne    L14
L110:
  test   %r14d,%r14d
  je     L26
  mov    %r13,%rax
  neg    %rax
  test   %r12d,%r12d
  cmovne %rax,%r13
  mov    %r13,0x0(%rbp)
L105:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L113
  mov    %r14d,%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L14:
  movsbl %dil,%edi
  call   <unread_char@plt>
  jmp    L110
L26:
  jne    L105
  test   %r12d,%r12d
  je     L105
  mov    $0x2d,%edi
  call   <unread_char@plt>
  jmp    L105
L113:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int read_llint(long long *lldp) {
  int flag = 0;
  long long lld = 0;
  int f = 0;
  char c = '\0';
  read_space();
  read_char(&c);
  if (c == '-')
    f = 1;
  else
    unread_char(c);
  while (read_char(&c) && naive_isdigit(c)) {
    lld = lld * 10 + (c - '0');
    flag = 1;
  }
  if (c)
    unread_char(c);
  if (flag)
    *lldp = f ? -lld : lld;
  if (!flag && f)
    unread_char('-');
  return flag;
}
```
user: What is the c source code of the assembly code below:

```asm
<read_llint>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    $0x1,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x7(%rsp),%rbx
  movb   $0x0,0x7(%rsp)
  call   <read_space@plt>
  mov    %rbx,%rdi
  call   <read_char@plt>
  movsbl 0x7(%rsp),%edi
  cmp    $0x2d,%dil
  je     L4
  call   <unread_char@plt>
  xor    %r12d,%r12d
L4:
  xor    %r13d,%r13d
  xor    %r14d,%r14d
  jmp    L76
  nopl   0x0(%rax,%rax,1)
L62:
  movsbl 0x7(%rsp),%edi
  call   <naive_isdigit@plt>
  test   %rax,%rax
  je     L2
  movsbl 0x7(%rsp),%eax
  lea    0x0(%r13,%r13,4),%rdx
  mov    $0x1,%r14d
  sub    $0x30,%eax
  cltq
  lea    (%rax,%rdx,2),%r13
L76:
  mov    %rbx,%rdi
  call   <read_char@plt>
  test   %rax,%rax
  jne    L62
L2:
  movsbl 0x7(%rsp),%edi
  test   %dil,%dil
  jne    L94
L37:
  test   %r14d,%r14d
  je     L1
  mov    %r13,%rax
  neg    %rax
  test   %r12d,%r12d
  cmovne %rax,%r13
  mov    %r13,0x0(%rbp)
L3:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L50
  add    $0x10,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L1:
  test   %r12d,%r12d
  je     L3
  mov    $0x2d,%edi
  call   <unread_char@plt>
  jmp    L3
  nopl   0x0(%rax)
L94:
  call   <unread_char@plt>
  jmp    L37
L50:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int read_llint(long long *lldp) {
  int flag = 0;
  long long lld = 0;
  int f = 0;
  char c = '\0';
  read_space();
  read_char(&c);
  if (c == '-')
    f = 1;
  else
    unread_char(c);
  while (read_char(&c) && naive_isdigit(c)) {
    lld = lld * 10 + (c - '0');
    flag = 1;
  }
  if (c)
    unread_char(c);
  if (flag)
    *lldp = f ? -lld : lld;
  if (!flag && f)
    unread_char('-');
  return flag;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<read_llint>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    $0x1,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x7(%rsp),%rbx
  movb   $0x0,0x7(%rsp)
  call   <read_space@plt>
  mov    %rbx,%rdi
  call   <read_char@plt>
  movsbl 0x7(%rsp),%edi
  cmp    $0x2d,%dil
  je     L58
  call   <unread_char@plt>
  xor    %r12d,%r12d
L58:
  xor    %r13d,%r13d
  xor    %r14d,%r14d
  jmp    L34
  nopl   0x0(%rax,%rax,1)
L57:
  movsbl 0x7(%rsp),%edi
  call   <naive_isdigit@plt>
  test   %rax,%rax
  je     L4
  movsbl 0x7(%rsp),%eax
  lea    0x0(%r13,%r13,4),%rdx
  mov    $0x1,%r14d
  sub    $0x30,%eax
  cltq
  lea    (%rax,%rdx,2),%r13
L34:
  mov    %rbx,%rdi
  call   <read_char@plt>
  test   %rax,%rax
  jne    L57
L4:
  movsbl 0x7(%rsp),%edi
  test   %dil,%dil
  jne    L9
L31:
  test   %r14d,%r14d
  je     L30
  mov    %r13,%rax
  neg    %rax
  test   %r12d,%r12d
  cmovne %rax,%r13
  mov    %r13,0x0(%rbp)
L47:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L95
  add    $0x10,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L30:
  test   %r12d,%r12d
  je     L47
  mov    $0x2d,%edi
  call   <unread_char@plt>
  jmp    L47
  nopl   0x0(%rax)
L9:
  call   <unread_char@plt>
  jmp    L31
L95:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int read_llint(long long *lldp) {
  int flag = 0;
  long long lld = 0;
  int f = 0;
  char c = '\0';
  read_space();
  read_char(&c);
  if (c == '-')
    f = 1;
  else
    unread_char(c);
  while (read_char(&c) && naive_isdigit(c)) {
    lld = lld * 10 + (c - '0');
    flag = 1;
  }
  if (c)
    unread_char(c);
  if (flag)
    *lldp = f ? -lld : lld;
  if (!flag && f)
    unread_char('-');
  return flag;
}
```