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

```asm
<benchmark>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edi,%r12d
  push   %rbx
  mov    %esi,%ebx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %esi,%rax
  mov    %rsp,%rcx
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L90
L36:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L36
L90:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L79
L99:
  mov    %rsp,%r13
  test   %ebx,%ebx
  jle    L75
  mov    %ebx,%eax
  mov    %r13,%r15
  lea    0x0(%r13,%rax,4),%r14
  nopl   0x0(%rax)
L71:
  xor    %eax,%eax
  add    $0x4,%r15
  call   <rand_float@plt>
  mulss  D21(%rip),%xmm0
  subss  D29(%rip),%xmm0
  movss  %xmm0,-0x4(%r15)
  cmp    %r14,%r15
  jne    L71
L75:
  xor    %eax,%eax
  call   <tic@plt>
  movsd  %xmm0,-0x48(%rbp)
  test   %r12d,%r12d
  jle    L41
  xor    %r14d,%r14d
  jmp    L59
  nopl   0x0(%rax)
L110:
  add    $0x1,%r14d
  cmp    %r14d,%r12d
  je     L41
L59:
  mov    $0x1,%edx
  mov    %r13,%rsi
  mov    %ebx,%edi
  call   <stdlib_strided_srange@plt>
  ucomiss %xmm0,%xmm0
  jnp    L110
  lea    D13(%rip),%r12
  mov    %r12,%rdi
  call   <printf@plt>
  xor    %eax,%eax
  call   <tic@plt>
  subsd  -0x48(%rbp),%xmm0
  mov    %r12,%rdi
  movsd  %xmm0,-0x48(%rbp)
  call   <printf@plt>
  movsd  -0x48(%rbp),%xmm0
L76:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L93
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L41:
  xor    %eax,%eax
  call   <tic@plt>
  subsd  -0x48(%rbp),%xmm0
  jmp    L76
  xchg   %ax,%ax
L79:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L99
L93:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D21
type_infered: byte[4]
name: extract_symbolic_data
arguments: tag: D29
type_infered: byte[4]
name: extract_symbolic_data
arguments: tag: D13
type_infered: string

tool: {"D21": [0x00,0x40,0x9c,0x46]}

tool: {"D29": [0x00,0x40,0x1c,0x46]}

tool: D13: should not return NaN


assistant: ```c
double benchmark(int iterations, int len) {
  double elapsed;
  float x[len];
  float v;
  double t;
  int i;
  for (i = 0; i < len; i++) {
    x[i] = (rand_float() * 20000.0f) - 10000.0f;
  }
  v = 0.0f;
  t = tic();
  for (i = 0; i < iterations; i++) {
    v = stdlib_strided_srange(len, x, 1);
    if (v != v) {
      printf("should not return NaN\n");
      break;
    }
  }
  elapsed = tic() - t;
  if (v != v) {
    printf("should not return NaN\n");
  }
  return elapsed;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<compute_length>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movl   $0x1,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L128
L16:
  cmpl   $0x0,-0x10(%rbp)
  je     L92
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x7e,%al
  jne    L92
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L92
  mov    $0x0,%eax
  call   <home_dir_len@plt>
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
  addq   $0x1,-0x18(%rbp)
  jmp    L61
L92:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x24,%al
  jne    L147
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x7b,%al
  jne    L147
  addq   $0x2,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L116
L182:
  addq   $0x1,-0x8(%rbp)
L116:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L58
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x7d,%al
  jne    L182
L58:
  mov    -0x8(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <env_lookup_len@plt>
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L64
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  jmp    L55
L64:
  mov    -0x8(%rbp),%rax
L55:
  mov    %rax,-0x18(%rbp)
  jmp    L61
L147:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x24,%al
  jne    L187
  addq   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L131
L160:
  addq   $0x1,-0x8(%rbp)
L131:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L30
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isenv@plt>
  test   %rax,%rax
  jne    L160
L30:
  mov    -0x8(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <env_lookup_len@plt>
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L61
L187:
  addl   $0x1,-0xc(%rbp)
  addq   $0x1,-0x18(%rbp)
L61:
  movl   $0x0,-0x10(%rbp)
L128:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L16
  mov    -0xc(%rbp),%eax
  leave
  ret
```

assistant: ```c
int compute_length(const char *p) {
  const char *q;
  int first;
  int len;
  first = 1;
  len = 0;
  while (*p) {
    if (first && (*p == '~') && (p[1] == '/')) {
      len += home_dir_len();
      p++;
    } else if ((*p == '$') && (p[1] == '{')) {
      p += 2;
      q = p;
      while (*q && (*q != '}'))
        q++;
      len += env_lookup_len(p, q);
      p = *q ? (q + 1) : q;
    } else if (*p == '$') {
      p++;
      q = p;
      while (*q && isenv(*(unsigned char *)q))
        q++;
      len += env_lookup_len(p, q);
      p = q;
    } else {
      len++;
      p++;
    }
    first = 0;
  }
  return len;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<compute_length>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  movzbl (%rdi),%eax
  test   %al,%al
  je     L52
  mov    %rdi,%rbx
  mov    $0x0,%ebp
  mov    $0x1,%edx
  mov    $0x0,%r12d
  jmp    L158
L198:
  cmp    $0x24,%al
  je     L171
L91:
  add    $0x1,%ebp
  add    $0x1,%rbx
L142:
  movzbl (%rbx),%eax
  mov    %r12d,%edx
  test   %al,%al
  je     L29
L158:
  cmp    $0x7e,%al
  jne    L198
  test   %edx,%edx
  je     L198
  cmpb   $0x2f,0x1(%rbx)
  jne    L91
  mov    $0x0,%eax
  call   <home_dir_len@plt>
  add    %eax,%ebp
  add    $0x1,%rbx
  jmp    L142
L171:
  movzbl 0x1(%rbx),%edi
  cmp    $0x7b,%dil
  je     L95
  lea    0x1(%rbx),%r13
  mov    %r13,%rbx
  test   %dil,%dil
  je     L160
L16:
  movzbl %dil,%edi
  call   <isenv@plt>
  test   %rax,%rax
  je     L160
  add    $0x1,%rbx
  movzbl (%rbx),%edi
  test   %dil,%dil
  jne    L16
L160:
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <env_lookup_len@plt>
  add    %eax,%ebp
  jmp    L142
L95:
  lea    0x2(%rbx),%rdi
  movzbl 0x2(%rbx),%eax
  test   %al,%al
  je     L120
  cmp    $0x7d,%al
  je     L120
  mov    %rdi,%rbx
L178:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  test   %al,%al
  je     L31
  cmp    $0x7d,%al
  jne    L178
L31:
  mov    %rbx,%rsi
  call   <env_lookup_len@plt>
  add    %eax,%ebp
  cmpb   $0x0,(%rbx)
  je     L29
  add    $0x1,%rbx
  jmp    L142
L120:
  mov    %rdi,%rbx
  jmp    L31
L52:
  mov    $0x0,%ebp
L29:
  mov    %ebp,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
int compute_length(const char *p) {
  const char *q;
  int first;
  int len;
  first = 1;
  len = 0;
  while (*p) {
    if (first && (*p == '~') && (p[1] == '/')) {
      len += home_dir_len();
      p++;
    } else if ((*p == '$') && (p[1] == '{')) {
      p += 2;
      q = p;
      while (*q && (*q != '}'))
        q++;
      len += env_lookup_len(p, q);
      p = *q ? (q + 1) : q;
    } else if (*p == '$') {
      p++;
      q = p;
      while (*q && isenv(*(unsigned char *)q))
        q++;
      len += env_lookup_len(p, q);
      p = q;
    } else {
      len++;
      p++;
    }
    first = 0;
  }
  return len;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<compute_length>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  movzbl (%rdi),%eax
  test   %al,%al
  je     L15
  mov    %rdi,%rbx
  xor    %r12d,%r12d
  movzbl 0x1(%rdi),%edi
  cmp    $0x7e,%al
  jne    L150
  jmp    L123
  nopl   0x0(%rax,%rax,1)
L72:
  add    $0x1,%r12d
  add    $0x1,%rbx
  test   %dil,%dil
  je     L6
L98:
  mov    %edi,%eax
  movzbl 0x1(%rbx),%edi
L150:
  cmp    $0x24,%al
  jne    L72
  cmp    $0x7b,%dil
  je     L118
  lea    0x1(%rbx),%rbp
  mov    %rbp,%rbx
  test   %dil,%dil
  jne    L217
  jmp    L91
  nopl   0x0(%rax,%rax,1)
L180:
  movzbl 0x1(%rbx),%edi
  add    $0x1,%rbx
  test   %dil,%dil
  je     L91
L217:
  call   <isenv@plt>
  test   %rax,%rax
  jne    L180
L91:
  mov    %rbp,%rdi
  mov    %rbx,%rsi
  call   <env_lookup_len@plt>
  movzbl (%rbx),%edi
  add    %eax,%r12d
  test   %dil,%dil
  jne    L98
L6:
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L123:
  cmp    $0x2f,%dil
  jne    L150
  xor    %eax,%eax
  call   <home_dir_len@plt>
  lea    0x1(%rbx),%rdx
  mov    %eax,%r12d
  movzbl 0x1(%rbx),%eax
  test   %al,%al
  je     L6
  movzbl 0x2(%rbx),%edi
  mov    %rdx,%rbx
  jmp    L150
  nopl   (%rax)
L118:
  movzbl 0x2(%rbx),%eax
  lea    0x2(%rbx),%rdi
  mov    %rdi,%rbp
  cmp    $0x7d,%al
  je     L87
  test   %al,%al
  jne    L138
  jmp    L87
  nopl   (%rax)
L139:
  cmp    $0x7d,%al
  je     L87
L138:
  movzbl 0x1(%rbp),%eax
  add    $0x1,%rbp
  test   %al,%al
  jne    L139
L87:
  mov    %rbp,%rsi
  call   <env_lookup_len@plt>
  add    %eax,%r12d
  cmpb   $0x0,0x0(%rbp)
  je     L6
  movzbl 0x1(%rbp),%edi
  lea    0x1(%rbp),%rbx
  test   %dil,%dil
  jne    L98
  jmp    L6
L15:
  xor    %r12d,%r12d
  pop    %rbx
  pop    %rbp
  mov    %r12d,%eax
  pop    %r12
  ret
```

assistant: ```c
int compute_length(const char *p) {
  const char *q;
  int first;
  int len;
  first = 1;
  len = 0;
  while (*p) {
    if (first && (*p == '~') && (p[1] == '/')) {
      len += home_dir_len();
      p++;
    } else if ((*p == '$') && (p[1] == '{')) {
      p += 2;
      q = p;
      while (*q && (*q != '}'))
        q++;
      len += env_lookup_len(p, q);
      p = *q ? (q + 1) : q;
    } else if (*p == '$') {
      p++;
      q = p;
      while (*q && isenv(*(unsigned char *)q))
        q++;
      len += env_lookup_len(p, q);
      p = q;
    } else {
      len++;
      p++;
    }
    first = 0;
  }
  return len;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<compute_length>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  movzbl (%rdi),%eax
  test   %al,%al
  je     L132
  mov    %rdi,%rbx
  xor    %r12d,%r12d
  movzbl 0x1(%rdi),%edi
  cmp    $0x7e,%al
  jne    L135
  jmp    L7
  nopl   0x0(%rax,%rax,1)
L193:
  add    $0x1,%r12d
  add    $0x1,%rbx
  test   %dil,%dil
  je     L165
L134:
  mov    %edi,%eax
  movzbl 0x1(%rbx),%edi
L135:
  cmp    $0x24,%al
  jne    L193
  cmp    $0x7b,%dil
  je     L89
  lea    0x1(%rbx),%rbp
  mov    %rbp,%rbx
  test   %dil,%dil
  jne    L112
  jmp    L106
  nopl   0x0(%rax,%rax,1)
L107:
  movzbl 0x1(%rbx),%edi
  add    $0x1,%rbx
  test   %dil,%dil
  je     L106
L112:
  call   <isenv@plt>
  test   %rax,%rax
  jne    L107
L106:
  mov    %rbp,%rdi
  mov    %rbx,%rsi
  call   <env_lookup_len@plt>
  movzbl (%rbx),%edi
  add    %eax,%r12d
  test   %dil,%dil
  jne    L134
L165:
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L7:
  cmp    $0x2f,%dil
  jne    L135
  xor    %eax,%eax
  call   <home_dir_len@plt>
  lea    0x1(%rbx),%rdx
  mov    %eax,%r12d
  movzbl 0x1(%rbx),%eax
  test   %al,%al
  je     L165
  movzbl 0x2(%rbx),%edi
  mov    %rdx,%rbx
  jmp    L135
  nopl   (%rax)
L89:
  movzbl 0x2(%rbx),%eax
  lea    0x2(%rbx),%rdi
  mov    %rdi,%rbp
  cmp    $0x7d,%al
  je     L197
  test   %al,%al
  jne    L157
  jmp    L197
  nopl   (%rax)
L185:
  cmp    $0x7d,%al
  je     L197
L157:
  movzbl 0x1(%rbp),%eax
  add    $0x1,%rbp
  test   %al,%al
  jne    L185
L197:
  mov    %rbp,%rsi
  call   <env_lookup_len@plt>
  add    %eax,%r12d
  cmpb   $0x0,0x0(%rbp)
  je     L165
  movzbl 0x1(%rbp),%edi
  lea    0x1(%rbp),%rbx
  test   %dil,%dil
  jne    L134
  jmp    L165
L132:
  xor    %r12d,%r12d
  pop    %rbx
  pop    %rbp
  mov    %r12d,%eax
  pop    %r12
  ret
```

assistant: ```c
int compute_length(const char *p) {
  const char *q;
  int first;
  int len;
  first = 1;
  len = 0;
  while (*p) {
    if (first && (*p == '~') && (p[1] == '/')) {
      len += home_dir_len();
      p++;
    } else if ((*p == '$') && (p[1] == '{')) {
      p += 2;
      q = p;
      while (*q && (*q != '}'))
        q++;
      len += env_lookup_len(p, q);
      p = *q ? (q + 1) : q;
    } else if (*p == '$') {
      p++;
      q = p;
      while (*q && isenv(*(unsigned char *)q))
        q++;
      len += env_lookup_len(p, q);
      p = q;
    } else {
      len++;
      p++;
    }
    first = 0;
  }
  return len;
}
```
user: What is the c source code of the assembly code below:

```asm
<lz_str_2_llong>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  movq   $0x0,-0x8(%rbp)
  movl   $0x0,-0x10(%rbp)
  movb   $0x0,-0x11(%rbp)
  jmp    L42
L113:
  addl   $0x1,-0x10(%rbp)
L42:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L113
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x2b,%eax
  je     L6
  cmp    $0x2d,%eax
  jne    L103
  movb   $0x1,-0x11(%rbp)
L6:
  addl   $0x1,-0x10(%rbp)
  nop
L103:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L53
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L19
L53:
  mov    D2(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <exit@plt>
L19:
  mov    -0x10(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L83
L68:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L115
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jg     L115
  mov    -0x8(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rcx
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  cltq
  add    %rcx,%rax
  mov    %rax,-0x8(%rbp)
  addl   $0x1,-0xc(%rbp)
L83:
  mov    -0xc(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L68
L115:
  cmpb   $0x0,-0x11(%rbp)
  je     L49
  mov    -0x8(%rbp),%rax
  neg    %rax
  jmp    L94
L49:
  mov    -0x8(%rbp),%rax
L94:
  leave
  ret
```

assistant: ```c
long long lz_str_2_llong(char *buf, int len) {
  long long ret = 0;
  int stx = 0, i;
  char minus_f = 0;
  while (*(buf + stx) == ' ')
    stx++;
  switch (*(buf + stx)) {
  case '-':
    minus_f = 1;
  case '+':
    stx++;
    break;
  }
  if (*(buf + stx) < '0' || *(buf + stx) > '9')
    exit(EXIT_FAILURE);
  for (i = stx; i < len; i++) {
    if (*(buf + i) >= '0' && *(buf + i) <= '9')
      ret = ret * 10 + (*(buf + i) - '0');
    else
      break;
  }
  return minus_f ? ((~ret) + 1) : ret;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<lz_str_2_llong>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    %esi,%r13d
  movzbl (%rdi),%edx
  cmp    $0x20,%dl
  jne    L35
  mov    $0x1,%eax
L95:
  mov    %eax,%r12d
  add    $0x1,%rax
  movzbl -0x1(%rbp,%rax,1),%edx
  cmp    $0x20,%dl
  je     L95
L119:
  cmp    $0x2b,%dl
  je     L72
  mov    $0x0,%ebx
  cmp    $0x2d,%dl
  jne    L107
  mov    $0x1,%ebx
L73:
  add    $0x1,%r12d
L107:
  movslq %r12d,%r14
  lea    0x0(%rbp,%r14,1),%r15
  movzbl (%r15),%eax
  sub    $0x30,%eax
  cmp    $0x9,%al
  ja     L84
L116:
  cmp    %r13d,%r12d
  jge    L100
  mov    %r15,%rdx
  lea    0x1(%rbp,%r14,1),%rdi
  sub    $0x1,%r13d
  sub    %r12d,%r13d
  add    %r13,%rdi
  mov    $0x0,%ecx
L40:
  movzbl (%rdx),%eax
  lea    -0x30(%rax),%esi
  cmp    $0x9,%sil
  ja     L96
  lea    (%rcx,%rcx,4),%rcx
  movsbl %al,%eax
  sub    $0x30,%eax
  cltq
  lea    (%rax,%rcx,2),%rcx
  add    $0x1,%rdx
  cmp    %rdi,%rdx
  jne    L40
L96:
  mov    %rcx,%rax
  neg    %rax
  test   %bl,%bl
  cmovne %rax,%rcx
  mov    %rcx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L35:
  mov    $0x0,%r12d
  jmp    L119
L72:
  mov    $0x0,%ebx
  jmp    L73
L84:
  mov    D2(%rip),%rax
  mov    (%rax),%edi
  call   <exit@plt>
  jmp    L116
L100:
  mov    $0x0,%ecx
  jmp    L96
```

assistant: ```c
long long lz_str_2_llong(char *buf, int len) {
  long long ret = 0;
  int stx = 0, i;
  char minus_f = 0;
  while (*(buf + stx) == ' ')
    stx++;
  switch (*(buf + stx)) {
  case '-':
    minus_f = 1;
  case '+':
    stx++;
    break;
  }
  if (*(buf + stx) < '0' || *(buf + stx) > '9')
    exit(EXIT_FAILURE);
  for (i = stx; i < len; i++) {
    if (*(buf + i) >= '0' && *(buf + i) <= '9')
      ret = ret * 10 + (*(buf + i) - '0');
    else
      break;
  }
  return minus_f ? ((~ret) + 1) : ret;
}
```
user: What is the c source code of the assembly code below:

```asm
<lz_str_2_llong>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  sub    $0x8,%rsp
  movzbl (%rdi),%edx
  cmp    $0x20,%dl
  jne    L84
  mov    $0x1,%eax
  nopl   0x0(%rax,%rax,1)
L41:
  mov    %eax,%r14d
  add    $0x1,%rax
  movzbl -0x1(%r12,%rax,1),%edx
  cmp    $0x20,%dl
  je     L41
L74:
  xor    %r13d,%r13d
  cmp    $0x2b,%dl
  je     L26
  cmp    $0x2d,%dl
  jne    L75
  mov    $0x1,%r13d
L26:
  add    $0x1,%r14d
L75:
  movslq %r14d,%r15
  lea    (%r12,%r15,1),%rbx
  movzbl (%rbx),%eax
  sub    $0x30,%eax
  cmp    $0x9,%al
  ja     L80
L93:
  cmp    %ebp,%r14d
  jge    L17
  sub    $0x1,%ebp
  lea    0x1(%r12,%r15,1),%rax
  mov    %rbx,%rdx
  xor    %r8d,%r8d
  sub    %r14d,%ebp
  lea    0x0(%rbp,%rax,1),%rcx
  jmp    L86
  nopw   0x0(%rax,%rax,1)
L3:
  lea    (%r8,%r8,4),%rsi
  movsbq %al,%rax
  add    $0x1,%rdx
  lea    (%rax,%rsi,2),%r8
  cmp    %rcx,%rdx
  je     L61
L86:
  movzbl (%rdx),%eax
  sub    $0x30,%eax
  cmp    $0x9,%al
  jbe    L3
L61:
  mov    %r8,%rax
  neg    %rax
  test   %r13b,%r13b
  cmovne %rax,%r8
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  mov    %r8,%rax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L80:
  mov    D9(%rip),%rax
  mov    (%rax),%edi
  call   <exit@plt>
  jmp    L93
L84:
  xor    %r14d,%r14d
  jmp    L74
L17:
  xor    %r8d,%r8d
  jmp    L61
```

assistant: ```c
long long lz_str_2_llong(char *buf, int len) {
  long long ret = 0;
  int stx = 0, i;
  char minus_f = 0;
  while (*(buf + stx) == ' ')
    stx++;
  switch (*(buf + stx)) {
  case '-':
    minus_f = 1;
  case '+':
    stx++;
    break;
  }
  if (*(buf + stx) < '0' || *(buf + stx) > '9')
    exit(EXIT_FAILURE);
  for (i = stx; i < len; i++) {
    if (*(buf + i) >= '0' && *(buf + i) <= '9')
      ret = ret * 10 + (*(buf + i) - '0');
    else
      break;
  }
  return minus_f ? ((~ret) + 1) : ret;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<lz_str_2_llong>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x8,%rsp
  movzbl (%rdi),%edx
  cmp    $0x20,%dl
  jne    L87
  mov    $0x1,%eax
  nopl   0x0(%rax)
L53:
  mov    %eax,%r13d
  add    $0x1,%rax
  movzbl -0x1(%rbp,%rax,1),%edx
  cmp    $0x20,%dl
  je     L53
L79:
  xor    %r12d,%r12d
  cmp    $0x2b,%dl
  je     L90
  cmp    $0x2d,%dl
  jne    L98
  mov    $0x1,%r12d
L90:
  add    $0x1,%r13d
  movslq %r13d,%rax
  movzbl 0x0(%rbp,%rax,1),%edx
L98:
  sub    $0x30,%edx
  cmp    $0x9,%dl
  ja     L35
L74:
  cmp    %ebx,%r13d
  jge    L19
  movslq %r13d,%rax
  sub    $0x1,%ebx
  xor    %r8d,%r8d
  lea    0x0(%rbp,%rax,1),%rdx
  sub    %r13d,%ebx
  lea    0x1(%rbp,%rax,1),%rax
  lea    (%rbx,%rax,1),%rcx
  jmp    L78
  nopl   (%rax)
L76:
  lea    (%r8,%r8,4),%rsi
  movsbq %al,%rax
  add    $0x1,%rdx
  lea    (%rax,%rsi,2),%r8
  cmp    %rdx,%rcx
  je     L54
L78:
  movzbl (%rdx),%eax
  sub    $0x30,%eax
  cmp    $0x9,%al
  jbe    L76
L54:
  mov    %r8,%rax
  neg    %rax
  test   %r12b,%r12b
  cmovne %rax,%r8
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  mov    %r8,%rax
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L35:
  mov    D9(%rip),%rax
  mov    (%rax),%edi
  call   <exit@plt>
  jmp    L74
  nopl   0x0(%rax,%rax,1)
L87:
  xor    %r13d,%r13d
  jmp    L79
L19:
  xor    %r8d,%r8d
  jmp    L54
```

assistant: ```c
long long lz_str_2_llong(char *buf, int len) {
  long long ret = 0;
  int stx = 0, i;
  char minus_f = 0;
  while (*(buf + stx) == ' ')
    stx++;
  switch (*(buf + stx)) {
  case '-':
    minus_f = 1;
  case '+':
    stx++;
    break;
  }
  if (*(buf + stx) < '0' || *(buf + stx) > '9')
    exit(EXIT_FAILURE);
  for (i = stx; i < len; i++) {
    if (*(buf + i) >= '0' && *(buf + i) <= '9')
      ret = ret * 10 + (*(buf + i) - '0');
    else
      break;
  }
  return minus_f ? ((~ret) + 1) : ret;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<posToOrd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %ecx,-0x28(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L23
L6:
  movl   $0x0,-0x10(%rbp)
  jmp    L29
L17:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  ucomisd %xmm1,%xmm0
  jp     L67
  ucomisd %xmm1,%xmm0
  jne    L67
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  mov    %eax,(%rdx)
  jmp    L63
L67:
  addl   $0x1,-0x10(%rbp)
L29:
  mov    -0x10(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L17
L63:
  addl   $0x1,-0xc(%rbp)
L23:
  mov    -0xc(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L6
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
int *posToOrd(double *dna, double *lmut, int len, int nsites) {
  int cmut, pos, *out;
  out = (int *)malloc(len * sizeof(int));
  for (pos = 0; pos < len; pos++) {
    for (cmut = 0; cmut < nsites; cmut++) {
      if (dna[pos] == lmut[cmut]) {
        out[pos] = cmut;
        break;
      }
    }
  }
  return out;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<posToOrd>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r13
  mov    %rsi,%rbx
  mov    %edx,%r12d
  mov    %ecx,%ebp
  lea    0x0(,%rdx,4),%edi
  call   <malloc@plt>
  test   %r12d,%r12d
  jle    L75
  mov    %rax,%rdi
  mov    %r12d,%r12d
  lea    (%rax,%r12,4),%r8
  mov    %rax,%rdx
  neg    %rdx
  lea    0x0(%r13,%rdx,2),%r9
  mov    %ebp,%esi
  jmp    L57
L13:
  mov    %edx,(%rdi)
L37:
  add    $0x4,%rdi
  cmp    %r8,%rdi
  je     L75
L57:
  test   %ebp,%ebp
  jle    L37
  movsd  (%r9,%rdi,2),%xmm0
  mov    $0x0,%edx
L45:
  ucomisd (%rbx,%rdx,8),%xmm0
  jp     L54
  je     L13
L54:
  add    $0x1,%rdx
  cmp    %rsi,%rdx
  jne    L45
  jmp    L37
L75:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
int *posToOrd(double *dna, double *lmut, int len, int nsites) {
  int cmut, pos, *out;
  out = (int *)malloc(len * sizeof(int));
  for (pos = 0; pos < len; pos++) {
    for (cmut = 0; cmut < nsites; cmut++) {
      if (dna[pos] == lmut[cmut]) {
        out[pos] = cmut;
        break;
      }
    }
  }
  return out;
}
```