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

```asm
<__cl_append>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    %rdi,%rsi
  mov    $0x0,%ebp
  mov    %ebp,%edi
  call   <va_start@plt>
  mov    %ebp,%esi
  mov    %rbx,%rdi
  call   <__cl_vappend@plt>
  mov    %ebp,%edi
  call   <va_end@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
void __cl_append(const char *format, ...) {
  va_list args;
  va_start(args, format);
  __cl_vappend(format, args);
  va_end(args);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<__cl_append>:
  endbr64
  push   %r12
  xor    %r12d,%r12d
  mov    %rdi,%rsi
  push   %rbp
  mov    %rdi,%rbp
  mov    %r12d,%edi
  sub    $0x8,%rsp
  call   <va_start@plt>
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <__cl_vappend@plt>
  mov    %r12d,%edi
  call   <va_end@plt>
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void __cl_append(const char *format, ...) {
  va_list args;
  va_start(args, format);
  __cl_vappend(format, args);
  va_end(args);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<V3DLoadGetParmF>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movb   $0x0,D86(%rip)
  cmpq   $0x0,-0x18(%rbp)
  jne    L4
  lea    D86(%rip),%rax
  jmp    L35
L4:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <FSeekPastSpaces@plt>
  movl   $0x0,-0x4(%rbp)
  jmp    L104
L101:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x8(%rbp)
  mov    D60(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  je     L139
  cmpl   $0x20,-0x8(%rbp)
  je     L139
  cmpl   $0x9,-0x8(%rbp)
  jne    L38
L139:
  mov    -0x4(%rbp),%eax
  cltq
  lea    D86(%rip),%rdx
  movb   $0x0,(%rax,%rdx,1)
  jmp    L118
L38:
  cmpl   $0x5c,-0x8(%rbp)
  jne    L53
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x8(%rbp)
  mov    D60(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  jne    L159
  mov    -0x4(%rbp),%eax
  cltq
  lea    D86(%rip),%rdx
  movb   $0x0,(%rax,%rdx,1)
  jmp    L118
L159:
  cmpl   $0x5c,-0x8(%rbp)
  je     L23
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x8(%rbp)
L23:
  mov    D60(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  jne    L46
  mov    -0x4(%rbp),%eax
  cltq
  lea    D86(%rip),%rdx
  movb   $0x0,(%rax,%rdx,1)
  jmp    L118
L53:
  cmpl   $0xa,-0x8(%rbp)
  je     L3
  cmpl   $0xd,-0x8(%rbp)
  jne    L46
L3:
  mov    D1(%rip),%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    $0xffffffff,%esi
  mov    %rax,%rdi
  call   <fseek@plt>
  mov    -0x4(%rbp),%eax
  cltq
  lea    D86(%rip),%rdx
  movb   $0x0,(%rax,%rdx,1)
  jmp    L118
L46:
  mov    -0x8(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x4(%rbp),%eax
  cltq
  lea    D86(%rip),%rdx
  mov    %cl,(%rax,%rdx,1)
  addl   $0x1,-0x4(%rbp)
L104:
  cmpl   $0x4f,-0x4(%rbp)
  jle    L101
L118:
  lea    D86(%rip),%rax
L35:
  leave
  ret
```

assistant: ```c
char *V3DLoadGetParmF(FILE *fp) {
  int c, i;
  static char rtn_str[80];
  *rtn_str = '\0';
  if (fp == NULL)
    return (rtn_str);
  FSeekPastSpaces(fp);
  for (i = 0; i < 80; i++) {
    c = fgetc(fp);
    if ((c == EOF) || (((c) == ' ') || ((c) == '\t'))) {
      rtn_str[i] = '\0';
      break;
    } else if (c == '\\') {
      c = fgetc(fp);
      if (c == EOF) {
        rtn_str[i] = '\0';
        break;
      }
      if (c != '\\')
        c = fgetc(fp);
      if (c == EOF) {
        rtn_str[i] = '\0';
        break;
      }
    } else if ((((c) == '\n') || ((c) == '\r'))) {
      fseek(fp, -1, SEEK_CUR);
      rtn_str[i] = '\0';
      break;
    }
    rtn_str[i] = (char)c;
  }
  return (rtn_str);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<V3DLoadGetParmF>:
  endbr64
  movb   $0x0,D94(%rip)
  test   %rdi,%rdi
  je     L3
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  call   <FSeekPastSpaces@plt>
  lea    D94(%rip),%r13
  lea    0x50(%r13),%r14
  mov    %r13,%rbx
  jmp    L109
L56:
  movslq %r12d,%r12
  lea    D94(%rip),%rax
  movb   $0x0,(%rax,%r12,1)
L21:
  lea    D94(%rip),%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L15:
  mov    %rbp,%rdi
  call   <fgetc@plt>
  mov    D22(%rip),%rdx
  cmp    %eax,(%rdx)
  je     L88
  cmp    $0x5c,%eax
  jne    L101
L92:
  mov    D22(%rip),%rdx
  cmp    %eax,(%rdx)
  je     L17
L137:
  mov    %al,(%rbx)
  add    $0x1,%rbx
  cmp    %r14,%rbx
  je     L21
L109:
  mov    %ebx,%r12d
  sub    %r13d,%r12d
  mov    %rbp,%rdi
  call   <fgetc@plt>
  mov    D22(%rip),%rdx
  cmp    %eax,(%rdx)
  je     L56
  cmp    $0x20,%eax
  je     L56
  cmp    $0x9,%eax
  je     L56
  cmp    $0x5c,%eax
  je     L15
  cmp    $0xa,%eax
  je     L61
  cmp    $0xd,%eax
  jne    L137
L61:
  mov    D6(%rip),%rax
  mov    (%rax),%edx
  mov    $0xffffffff,%esi
  mov    %rbp,%rdi
  call   <fseek@plt>
  movslq %r12d,%r12
  lea    D94(%rip),%rax
  movb   $0x0,(%rax,%r12,1)
  jmp    L21
L88:
  movslq %r12d,%r12
  lea    D94(%rip),%rax
  movb   $0x0,(%rax,%r12,1)
  jmp    L21
L101:
  mov    %rbp,%rdi
  call   <fgetc@plt>
  jmp    L92
L17:
  movslq %r12d,%r12
  lea    D94(%rip),%rax
  movb   $0x0,(%rax,%r12,1)
  jmp    L21
L3:
  lea    D94(%rip),%rax
  ret
```

assistant: ```c
char *V3DLoadGetParmF(FILE *fp) {
  int c, i;
  static char rtn_str[80];
  *rtn_str = '\0';
  if (fp == NULL)
    return (rtn_str);
  FSeekPastSpaces(fp);
  for (i = 0; i < 80; i++) {
    c = fgetc(fp);
    if ((c == EOF) || (((c) == ' ') || ((c) == '\t'))) {
      rtn_str[i] = '\0';
      break;
    } else if (c == '\\') {
      c = fgetc(fp);
      if (c == EOF) {
        rtn_str[i] = '\0';
        break;
      }
      if (c != '\\')
        c = fgetc(fp);
      if (c == EOF) {
        rtn_str[i] = '\0';
        break;
      }
    } else if ((((c) == '\n') || ((c) == '\r'))) {
      fseek(fp, -1, SEEK_CUR);
      rtn_str[i] = '\0';
      break;
    }
    rtn_str[i] = (char)c;
  }
  return (rtn_str);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<V3DLoadGetParmF>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  lea    D1(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  movb   $0x0,D1(%rip)
  test   %rdi,%rdi
  je     L44
  mov    %rdi,%r15
  lea    0x50(%r12),%r13
  mov    %r12,%r14
  call   <FSeekPastSpaces@plt>
  mov    D2(%rip),%rbx
  jmp    L45
  nopw   0x0(%rax,%rax,1)
L86:
  cmp    $0xa,%eax
  je     L63
  cmp    $0xd,%eax
  je     L63
L57:
  mov    %al,(%r14)
  add    $0x1,%r14
  cmp    %r13,%r14
  je     L44
L45:
  mov    %r14d,%ebp
  mov    %r15,%rdi
  sub    %r12d,%ebp
  call   <fgetc@plt>
  cmp    %eax,(%rbx)
  je     L15
  cmp    $0x20,%eax
  je     L15
  cmp    $0x9,%eax
  je     L15
  cmp    $0x5c,%eax
  jne    L86
  mov    %r15,%rdi
  call   <fgetc@plt>
  mov    (%rbx),%edx
  cmp    %eax,%edx
  je     L15
  cmp    $0x5c,%eax
  je     L4
  mov    %r15,%rdi
  call   <fgetc@plt>
  mov    (%rbx),%edx
L4:
  cmp    %edx,%eax
  jne    L57
L15:
  movslq %ebp,%rbp
  movb   $0x0,(%r12,%rbp,1)
L44:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L63:
  mov    D26(%rip),%rax
  mov    $0xffffffff,%esi
  mov    %r15,%rdi
  mov    (%rax),%edx
  call   <fseek@plt>
  jmp    L15
```

assistant: ```c
char *V3DLoadGetParmF(FILE *fp) {
  int c, i;
  static char rtn_str[80];
  *rtn_str = '\0';
  if (fp == NULL)
    return (rtn_str);
  FSeekPastSpaces(fp);
  for (i = 0; i < 80; i++) {
    c = fgetc(fp);
    if ((c == EOF) || (((c) == ' ') || ((c) == '\t'))) {
      rtn_str[i] = '\0';
      break;
    } else if (c == '\\') {
      c = fgetc(fp);
      if (c == EOF) {
        rtn_str[i] = '\0';
        break;
      }
      if (c != '\\')
        c = fgetc(fp);
      if (c == EOF) {
        rtn_str[i] = '\0';
        break;
      }
    } else if ((((c) == '\n') || ((c) == '\r'))) {
      fseek(fp, -1, SEEK_CUR);
      rtn_str[i] = '\0';
      break;
    }
    rtn_str[i] = (char)c;
  }
  return (rtn_str);
}
```
user: What is the c source code of the assembly code below:

```asm
<V3DLoadGetParmF>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  lea    D38(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  movb   $0x0,D38(%rip)
  test   %rdi,%rdi
  je     L46
  mov    %rdi,%r15
  lea    0x50(%r12),%r13
  mov    %r12,%r14
  call   <FSeekPastSpaces@plt>
  mov    D5(%rip),%rbx
  jmp    L49
  nopw   0x0(%rax,%rax,1)
L71:
  cmp    $0xa,%eax
  je     L89
  cmp    $0xd,%eax
  je     L89
L96:
  mov    %al,(%r14)
  add    $0x1,%r14
  cmp    %r13,%r14
  je     L46
L49:
  mov    %r14d,%ebp
  mov    %r15,%rdi
  sub    %r12d,%ebp
  call   <fgetc@plt>
  cmp    %eax,(%rbx)
  je     L39
  cmp    $0x20,%eax
  je     L39
  cmp    $0x9,%eax
  je     L39
  cmp    $0x5c,%eax
  jne    L71
  mov    %r15,%rdi
  call   <fgetc@plt>
  mov    (%rbx),%edx
  cmp    %eax,%edx
  je     L39
  cmp    $0x5c,%eax
  je     L127
  mov    %r15,%rdi
  call   <fgetc@plt>
  mov    (%rbx),%edx
L127:
  cmp    %edx,%eax
  jne    L96
L39:
  movslq %ebp,%rbp
  movb   $0x0,(%r12,%rbp,1)
L46:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L89:
  mov    D27(%rip),%rax
  mov    $0xffffffff,%esi
  mov    %r15,%rdi
  mov    (%rax),%edx
  call   <fseek@plt>
  jmp    L39
```

assistant: ```c
char *V3DLoadGetParmF(FILE *fp) {
  int c, i;
  static char rtn_str[80];
  *rtn_str = '\0';
  if (fp == NULL)
    return (rtn_str);
  FSeekPastSpaces(fp);
  for (i = 0; i < 80; i++) {
    c = fgetc(fp);
    if ((c == EOF) || (((c) == ' ') || ((c) == '\t'))) {
      rtn_str[i] = '\0';
      break;
    } else if (c == '\\') {
      c = fgetc(fp);
      if (c == EOF) {
        rtn_str[i] = '\0';
        break;
      }
      if (c != '\\')
        c = fgetc(fp);
      if (c == EOF) {
        rtn_str[i] = '\0';
        break;
      }
    } else if ((((c) == '\n') || ((c) == '\r'))) {
      fseek(fp, -1, SEEK_CUR);
      rtn_str[i] = '\0';
      break;
    }
    rtn_str[i] = (char)c;
  }
  return (rtn_str);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<ts_hash>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L14
L17:
  mov    -0x8(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%eax
  shl    $0x10,%eax
  add    %edx,%eax
  sub    -0x8(%rbp),%eax
  mov    %eax,-0x8(%rbp)
L14:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jne    L17
  mov    -0x8(%rbp),%eax
  mov    $0x0,%edx
  divl   -0x1c(%rbp)
  mov    %edx,%eax
  pop    %rbp
  ret
```

assistant: ```c
unsigned int ts_hash(const char *key, unsigned int prime) {
  unsigned int hidx = 0;
  int c = 0;
  while (0 != (c = *key++)) {
    hidx = c + (hidx << 6) + (hidx << 16) - hidx;
  }
  return (hidx % prime);
}
```
user: Translate the below assembly code into C programming language:

```asm
<ts_hash>:
  endbr64
  lea    0x1(%rdi),%rcx
  movzbl (%rdi),%edx
  test   %dl,%dl
  je     L5
  mov    $0x0,%eax
L24:
  imul   $0x1003f,%eax,%eax
  movsbl %dl,%edx
  add    %edx,%eax
  add    $0x1,%rcx
  movzbl -0x1(%rcx),%edx
  test   %dl,%dl
  jne    L24
L29:
  mov    $0x0,%edx
  div    %esi
  mov    %edx,%eax
  ret
L5:
  mov    $0x0,%eax
  jmp    L29
```

assistant: ```c
unsigned int ts_hash(const char *key, unsigned int prime) {
  unsigned int hidx = 0;
  int c = 0;
  while (0 != (c = *key++)) {
    hidx = c + (hidx << 6) + (hidx << 16) - hidx;
  }
  return (hidx % prime);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<ts_hash>:
  endbr64
  movsbl (%rdi),%edx
  lea    0x1(%rdi),%rcx
  test   %dl,%dl
  je     L13
  xor    %eax,%eax
  nopl   0x0(%rax)
L8:
  imul   $0x1003f,%eax,%eax
  add    $0x1,%rcx
  add    %edx,%eax
  movsbl -0x1(%rcx),%edx
  test   %dl,%dl
  jne    L8
  xor    %edx,%edx
  div    %esi
  mov    %edx,%r8d
  mov    %r8d,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L13:
  xor    %r8d,%r8d
  mov    %r8d,%eax
  ret
```

assistant: ```c
unsigned int ts_hash(const char *key, unsigned int prime) {
  unsigned int hidx = 0;
  int c = 0;
  while (0 != (c = *key++)) {
    hidx = c + (hidx << 6) + (hidx << 16) - hidx;
  }
  return (hidx % prime);
}
```
user: Translate the below assembly code into C programming language:

```asm
<ts_hash>:
  endbr64
  movsbl (%rdi),%edx
  lea    0x1(%rdi),%rcx
  test   %dl,%dl
  je     L18
  xor    %eax,%eax
  nopl   0x0(%rax)
L2:
  imul   $0x1003f,%eax,%eax
  add    $0x1,%rcx
  add    %edx,%eax
  movsbl -0x1(%rcx),%edx
  test   %dl,%dl
  jne    L2
  xor    %edx,%edx
  div    %esi
  mov    %edx,%r8d
  mov    %r8d,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L18:
  xor    %r8d,%r8d
  mov    %r8d,%eax
  ret
```

assistant: ```c
unsigned int ts_hash(const char *key, unsigned int prime) {
  unsigned int hidx = 0;
  int c = 0;
  while (0 != (c = *key++)) {
    hidx = c + (hidx << 6) + (hidx << 16) - hidx;
  }
  return (hidx % prime);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x10(%rbp)
  lea    -0x14(%rbp),%rax
  mov    %rax,%rsi
  lea    D68(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  jmp    L42
L27:
  movss  -0x14(%rbp),%xmm0
  movss  D90(%rip),%xmm1
  comiss %xmm1,%xmm0
  jb     L12
  movss  -0x14(%rbp),%xmm1
  movss  D42(%rip),%xmm0
  comiss %xmm1,%xmm0
  jb     L12
  movss  D90(%rip),%xmm0
  movss  %xmm0,-0xc(%rbp)
  jmp    L73
L38:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x10(%rbp),%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd -0xc(%rbp),%xmm2
  movsd  D45(%rip),%xmm0
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x10(%rbp)
  movss  -0xc(%rbp),%xmm1
  movss  D90(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xc(%rbp)
L73:
  movss  -0x14(%rbp),%xmm0
  comiss -0x10(%rbp),%xmm0
  jae    L38
  movss  -0xc(%rbp),%xmm0
  movss  D90(%rip),%xmm1
  subss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,%esi
  lea    D119(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L47
L12:
  mov    $0x1,%esi
  lea    D119(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L47:
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x10(%rbp)
  lea    -0x14(%rbp),%rax
  mov    %rax,%rsi
  lea    D68(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
L42:
  movss  -0x14(%rbp),%xmm0
  movss  D8(%rip),%xmm1
  ucomiss %xmm1,%xmm0
  jp     L27
  movss  D8(%rip),%xmm1
  ucomiss %xmm1,%xmm0
  jne    L27
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L82
  call   <__stack_chk_fail@plt>
L82:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D68
type_guessed: string
name: disassemble_data
arguments: data_label: D90
type_guessed: f32
name: disassemble_data
arguments: data_label: D42
type_guessed: byte[4]
name: disassemble_data
arguments: data_label: D45
type_guessed: f32[2]
name: disassemble_data
arguments: data_label: D119
type_guessed: string
name: disassemble_data
arguments: data_label: D8
type_guessed: byte[4]

tool: D68: %f

tool: D90: 1

tool: {"D42": [0x00,0x00,0x70,0x41]}

tool: {"D45": [0.0,1.875]}

tool: D119: %d


tool: {"D8": [0x00,0x00,0x80,0xbf]}

assistant: ```c
int main() {
  float serie = 0.0, k, n;
  scanf("%f", &k);
  while (k != -1) {
    if (k >= 1 && k <= 15) {
      for (n = 1.0; serie <= k; ++n)
        serie += (1.0 / n);
      printf("%d\n", (int)(n - 1));
    } else
      printf("%d\n", 1);
    serie = 0.0;
    scanf("%f", &k);
  }
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rsi
  lea    D106(%rip),%rdi
  call   <scanf@plt>
  movss  0x4(%rsp),%xmm1
  ucomiss D44(%rip),%xmm1
  jp     L72
  jne    L72
L58:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  mov    $0x0,%eax
  add    $0x18,%rsp
  ret
L39:
  movss  D51(%rip),%xmm3
  jmp    L37
L7:
  mov    $0x1,%esi
  lea    D19(%rip),%rdi
  call   <printf@plt>
L24:
  lea    0x4(%rsp),%rsi
  lea    D106(%rip),%rdi
  call   <scanf@plt>
  movss  0x4(%rsp),%xmm1
  ucomiss D44(%rip),%xmm1
  jp     L72
  je     L58
L72:
  comiss D51(%rip),%xmm1
  jb     L7
  movss  D90(%rip),%xmm7
  comiss %xmm1,%xmm7
  jb     L7
  movss  D51(%rip),%xmm3
  pxor   %xmm0,%xmm0
  movsd  D33(%rip),%xmm6
  movaps %xmm3,%xmm5
  comiss %xmm0,%xmm1
  jb     L39
L43:
  pxor   %xmm4,%xmm4
  cvtss2sd %xmm3,%xmm4
  movapd %xmm6,%xmm2
  divsd  %xmm4,%xmm2
  cvtss2sd %xmm0,%xmm0
  addsd  %xmm2,%xmm0
  cvtsd2ss %xmm0,%xmm0
  addss  %xmm5,%xmm3
  comiss %xmm0,%xmm1
  jae    L43
L37:
  subss  D51(%rip),%xmm3
  cvttss2si %xmm3,%esi
  lea    D19(%rip),%rdi
  call   <printf@plt>
  jmp    L24
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D106
type_guessed: string
name: retrieve_data
arguments: tag: D44
type_guessed: byte[4]
name: retrieve_data
arguments: tag: D51
type_guessed: f32
name: retrieve_data
arguments: tag: D19
type_guessed: string
name: retrieve_data
arguments: tag: D90
type_guessed: byte[4]
name: retrieve_data
arguments: tag: D33
type_guessed: f32[2]

tool: D106: %f

tool: {"D44": [0x00,0x00,0x80,0xbf]}

tool: D51: 1

tool: D19: %d


tool: {"D90": [0x00,0x00,0x70,0x41]}

tool: {"D33": [0.0,1.875]}

assistant: ```c
int main() {
  float serie = 0.0, k, n;
  scanf("%f", &k);
  while (k != -1) {
    if (k >= 1 && k <= 15) {
      for (n = 1.0; serie <= k; ++n)
        serie += (1.0 / n);
      printf("%d\n", (int)(n - 1));
    } else
      printf("%d\n", 1);
    serie = 0.0;
    scanf("%f", &k);
  }
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  lea    D72(%rip),%rbp
  push   %rbx
  mov    %rbp,%rdi
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rbx
  mov    %rbx,%rsi
  call   <scanf@plt>
  movss  0x4(%rsp),%xmm2
  ucomiss D3(%rip),%xmm2
  jp     L87
  je     L48
L87:
  lea    D77(%rip),%r12
  jmp    L14
  nopl   0x0(%rax)
L38:
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <printf@plt>
L23:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  movss  0x4(%rsp),%xmm2
  ucomiss D3(%rip),%xmm2
  jp     L14
  je     L48
L14:
  comiss D40(%rip),%xmm2
  jb     L38
  movss  D99(%rip),%xmm5
  comiss %xmm2,%xmm5
  jb     L38
  pxor   %xmm6,%xmm6
  movss  D40(%rip),%xmm3
  pxor   %xmm0,%xmm0
  comiss %xmm6,%xmm2
  jb     L9
  nopl   0x0(%rax)
L85:
  movsd  D63(%rip),%xmm1
  pxor   %xmm4,%xmm4
  cvtss2sd %xmm0,%xmm0
  cvtss2sd %xmm3,%xmm4
  addss  D40(%rip),%xmm3
  divsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  comiss %xmm0,%xmm2
  jae    L85
L29:
  subss  D40(%rip),%xmm3
  mov    %r12,%rdi
  cvttss2si %xmm3,%esi
  call   <printf@plt>
  jmp    L23
  cs nopw 0x0(%rax,%rax,1)
L48:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L55
  add    $0x10,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L9:
  movss  D40(%rip),%xmm3
  jmp    L29
L55:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D72
type_guessed: string
name: unpack_data
arguments: data_label: D3
type_guessed: byte[4]
name: unpack_data
arguments: data_label: D77
type_guessed: string
name: unpack_data
arguments: data_label: D40
type_guessed: f32
name: unpack_data
arguments: data_label: D99
type_guessed: byte[4]
name: unpack_data
arguments: data_label: D63
type_guessed: f32[2]

tool: D72: %f

tool: {"D3": [0x00,0x00,0x80,0xbf]}

tool: D77: %d


tool: D40: 1

tool: {"D99": [0x00,0x00,0x70,0x41]}

tool: {"D63": [0.0,1.875]}

assistant: ```c
int main() {
  float serie = 0.0, k, n;
  scanf("%f", &k);
  while (k != -1) {
    if (k >= 1 && k <= 15) {
      for (n = 1.0; serie <= k; ++n)
        serie += (1.0 / n);
      printf("%d\n", (int)(n - 1));
    } else
      printf("%d\n", 1);
    serie = 0.0;
    scanf("%f", &k);
  }
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  lea    D67(%rip),%rbp
  push   %rbx
  mov    %rbp,%rdi
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rbx
  mov    %rbx,%rsi
  call   <scanf@plt>
  movss  0x4(%rsp),%xmm2
  ucomiss D29(%rip),%xmm2
  jp     L57
  je     L12
L57:
  lea    D70(%rip),%r12
  jmp    L16
  nopl   0x0(%rax)
L4:
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <printf@plt>
L41:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  movss  0x4(%rsp),%xmm2
  ucomiss D29(%rip),%xmm2
  jp     L16
  je     L12
L16:
  comiss D3(%rip),%xmm2
  jb     L4
  movss  D63(%rip),%xmm5
  comiss %xmm2,%xmm5
  jb     L4
  pxor   %xmm6,%xmm6
  movss  D3(%rip),%xmm3
  pxor   %xmm0,%xmm0
  comiss %xmm6,%xmm2
  jb     L53
  nopl   0x0(%rax)
L118:
  movsd  D68(%rip),%xmm1
  pxor   %xmm4,%xmm4
  cvtss2sd %xmm0,%xmm0
  cvtss2sd %xmm3,%xmm4
  addss  D3(%rip),%xmm3
  divsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  comiss %xmm0,%xmm2
  jae    L118
L65:
  subss  D3(%rip),%xmm3
  mov    %r12,%rdi
  cvttss2si %xmm3,%esi
  call   <printf@plt>
  jmp    L41
  cs nopw 0x0(%rax,%rax,1)
L12:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L39
  add    $0x10,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L53:
  movss  D3(%rip),%xmm3
  jmp    L65
L39:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D67
type_guessed: string
name: read_data
arguments: data_label: D29
type_guessed: byte[4]
name: read_data
arguments: data_label: D70
type_guessed: string
name: read_data
arguments: data_label: D3
type_guessed: f32
name: read_data
arguments: data_label: D63
type_guessed: byte[4]
name: read_data
arguments: data_label: D68
type_guessed: f32[2]

tool: D67: %f

tool: {"D29": [0x00,0x00,0x80,0xbf]}

tool: D70: %d


tool: D3: 1

tool: {"D63": [0x00,0x00,0x70,0x41]}

tool: {"D68": [0.0,1.875]}

assistant: ```c
int main() {
  float serie = 0.0, k, n;
  scanf("%f", &k);
  while (k != -1) {
    if (k >= 1 && k <= 15) {
      for (n = 1.0; serie <= k; ++n)
        serie += (1.0 / n);
      printf("%d\n", (int)(n - 1));
    } else
      printf("%d\n", 1);
    serie = 0.0;
    scanf("%f", &k);
  }
  return 0;
}
```