ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movl   $0x0,-0x4(%rbp)
  jmp    L2
L19:
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x4(%rbp)
L2:
  cmpl   $0x9,-0x4(%rbp)
  jle    L19
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D6
datatype: string
name: retrieve_data
arguments: data_tag: D11
datatype: string

tool: D6: %d


tool: D11: Done.

assistant: ```c
int main() {
  for (int i = 0; i < 10; i++) {
    printf("%d\n", i);
  }
  printf("Done.");
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    $0x0,%ebx
  lea    D3(%rip),%rbp
L5:
  mov    %ebx,%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%ebx
  cmp    $0xa,%ebx
  jne    L5
  lea    D1(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D3
datatype: string
name: unpack_data
arguments: data_tag: D1
datatype: string

tool: D3: %d


tool: D1: Done.

assistant: ```c
int main() {
  for (int i = 0; i < 10; i++) {
    printf("%d\n", i);
  }
  printf("Done.");
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %rbp
  lea    D14(%rip),%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  nopl   0x0(%rax,%rax,1)
L2:
  mov    %ebx,%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <printf@plt>
  cmp    $0xa,%ebx
  jne    L2
  lea    D16(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D14
datatype: string
name: disassemble_data
arguments: data_label: D16
datatype: string

tool: D14: %d


tool: D16: Done.

assistant: ```c
int main() {
  for (int i = 0; i < 10; i++) {
    printf("%d\n", i);
  }
  printf("Done.");
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %rbp
  lea    D10(%rip),%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  nopl   0x0(%rax,%rax,1)
L1:
  mov    %ebx,%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <printf@plt>
  cmp    $0xa,%ebx
  jne    L1
  lea    D1(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: label: D10
type_infered: string
name: retrieve_data
arguments: label: D1
type_infered: string

tool: D10: %d


tool: D1: Done.

assistant: ```c
int main() {
  for (int i = 0; i < 10; i++) {
    printf("%d\n", i);
  }
  printf("Done.");
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<usage>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  nop
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: label: D46
type_infered: string
name: unpack_data
arguments: label: D38
type_infered: string
name: unpack_data
arguments: label: D8
type_infered: string
name: unpack_data
arguments: label: D17
type_infered: string
name: unpack_data
arguments: label: D42
type_infered: string

tool: D46: -t <start_time> unix epoch time to start write at (REQUIRED)


tool: D38: -n <interval> time between write starts, 10 by default


tool: D8: -i <iters> number of writes, 16 by default


tool: D17: -v for verbose


tool: D42: -h for help


assistant: ```c
void usage() {
  printf("-t <start_time> unix epoch time to start write at (REQUIRED)\n");
  printf("-n <interval> time between write starts, 10 by default\n");
  printf("-i <iters> number of writes, 16 by default\n");
  printf("-v for verbose\n");
  printf("-h for help\n");
  exit(0);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<usage>:
  endbr64
  sub    $0x8,%rsp
  lea    D21(%rip),%rdi
  call   <printf@plt>
  lea    D20(%rip),%rdi
  call   <printf@plt>
  lea    D6(%rip),%rdi
  call   <printf@plt>
  lea    D48(%rip),%rdi
  call   <printf@plt>
  lea    D47(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: unpack_data
arguments: tag: D21
type: string
name: unpack_data
arguments: tag: D20
type: string
name: unpack_data
arguments: tag: D6
type: string
name: unpack_data
arguments: tag: D48
type: string
name: unpack_data
arguments: tag: D47
type: string

tool: D21: -t <start_time> unix epoch time to start write at (REQUIRED)


tool: D20: -n <interval> time between write starts, 10 by default


tool: D6: -i <iters> number of writes, 16 by default


tool: D48: -v for verbose


tool: D47: -h for help


assistant: ```c
void usage() {
  printf("-t <start_time> unix epoch time to start write at (REQUIRED)\n");
  printf("-n <interval> time between write starts, 10 by default\n");
  printf("-i <iters> number of writes, 16 by default\n");
  printf("-v for verbose\n");
  printf("-h for help\n");
  exit(0);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<usage>:
  endbr64
  sub    $0x8,%rsp
  lea    D36(%rip),%rdi
  call   <printf@plt>
  lea    D28(%rip),%rdi
  call   <printf@plt>
  lea    D4(%rip),%rdi
  call   <printf@plt>
  lea    D17(%rip),%rdi
  call   <printf@plt>
  lea    D46(%rip),%rdi
  call   <printf@plt>
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    1070 <exit@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D36
type: string
name: parse_data
arguments: data_tag: D28
type: string
name: parse_data
arguments: data_tag: D4
type: string
name: parse_data
arguments: data_tag: D17
type: string
name: parse_data
arguments: data_tag: D46
type: string

tool: D36: -t <start_time> unix epoch time to start write at (REQUIRED)


tool: D28: -n <interval> time between write starts, 10 by default


tool: D4: -i <iters> number of writes, 16 by default


tool: D17: -v for verbose


tool: D46: -h for help


assistant: ```c
void usage() {
  printf("-t <start_time> unix epoch time to start write at (REQUIRED)\n");
  printf("-n <interval> time between write starts, 10 by default\n");
  printf("-i <iters> number of writes, 16 by default\n");
  printf("-v for verbose\n");
  printf("-h for help\n");
  exit(0);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<usage>:
  endbr64
  sub    $0x8,%rsp
  lea    D3(%rip),%rdi
  call   <printf@plt>
  lea    D48(%rip),%rdi
  call   <printf@plt>
  lea    D19(%rip),%rdi
  call   <printf@plt>
  lea    D22(%rip),%rdi
  call   <printf@plt>
  lea    D4(%rip),%rdi
  call   <printf@plt>
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    1070 <exit@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D3
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D48
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D19
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D22
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D4
type_guessed: string

tool: D3: -t <start_time> unix epoch time to start write at (REQUIRED)


tool: D48: -n <interval> time between write starts, 10 by default


tool: D19: -i <iters> number of writes, 16 by default


tool: D22: -v for verbose


tool: D4: -h for help


assistant: ```c
void usage() {
  printf("-t <start_time> unix epoch time to start write at (REQUIRED)\n");
  printf("-n <interval> time between write starts, 10 by default\n");
  printf("-i <iters> number of writes, 16 by default\n");
  printf("-v for verbose\n");
  printf("-h for help\n");
  exit(0);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<find_in_buf>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %ecx,-0x28(%rbp)
  mov    %r8d,-0x2c(%rbp)
  jmp    L73
L59:
  movl   $0x0,-0x4(%rbp)
  jmp    L54
L56:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x4(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L42
  addl   $0x1,-0x4(%rbp)
L54:
  mov    -0x4(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L56
  jmp    L10
L42:
  nop
L10:
  mov    -0x4(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jne    L40
  mov    -0x2c(%rbp),%eax
  jmp    L30
L40:
  addl   $0x1,-0x2c(%rbp)
L73:
  mov    -0x2c(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L59
  mov    $0x0,%eax
L30:
  pop    %rbp
  ret
```

assistant: ```c
int find_in_buf(char *buf, char *what, int sz, int len, int start) {
  int i;
  for (; start < sz; start++) {
    for (i = 0; i < len; i++) {
      if (*(buf + start + i) != *(what + i))
        break;
    }
    if (i == len)
      return (start);
  }
  return (0);
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<find_in_buf>:
  endbr64
  cmp    %edx,%r8d
  jge    L84
  mov    %rsi,%r9
  mov    %edx,%r10d
  movslq %r8d,%rax
  lea    (%rdi,%rax,1),%rsi
  mov    %ecx,%edi
  mov    $0x0,%r11d
L106:
  mov    $0x0,%eax
  test   %ecx,%ecx
  jle    L37
  push   %rbx
  jmp    L107
L83:
  mov    %r11d,%edx
L4:
  cmp    %edx,%ecx
  je     L52
  add    $0x1,%r8d
  add    $0x1,%rsi
  cmp    %r8d,%r10d
  je     L46
  mov    $0x0,%eax
  test   %ecx,%ecx
  jle    L83
L107:
  mov    %eax,%edx
  movzbl (%r9,%rax,1),%ebx
  cmp    %bl,(%rsi,%rax,1)
  jne    L4
  lea    0x1(%rax),%edx
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L107
  jmp    L4
L84:
  mov    $0x0,%r8d
L50:
  mov    %r8d,%eax
  ret
L46:
  mov    $0x0,%r8d
L52:
  mov    %r8d,%eax
  pop    %rbx
  ret
L37:
  cmp    %r11d,%ecx
  je     L50
  add    $0x1,%r8d
  add    $0x1,%rsi
  cmp    %r8d,%r10d
  jne    L106
  mov    $0x0,%r8d
  jmp    L50
```

assistant: ```c
int find_in_buf(char *buf, char *what, int sz, int len, int start) {
  int i;
  for (; start < sz; start++) {
    for (i = 0; i < len; i++) {
      if (*(buf + start + i) != *(what + i))
        break;
    }
    if (i == len)
      return (start);
  }
  return (0);
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<find_in_buf>:
  endbr64
  mov    %rsi,%r9
  cmp    %edx,%r8d
  jge    L28
  movslq %r8d,%rax
  lea    0x1(%rcx),%r10d
  lea    (%rdi,%rax,1),%rsi
  nopw   0x0(%rax,%rax,1)
L71:
  mov    $0x1,%eax
  xor    %edi,%edi
  test   %ecx,%ecx
  jg     L17
  jmp    L20
  nopl   (%rax)
L2:
  mov    %eax,%edi
  add    $0x1,%rax
  cmp    %r10,%rax
  je     L20
L17:
  movzbl -0x1(%r9,%rax,1),%edi
  cmp    %dil,-0x1(%rax,%rsi,1)
  je     L2
  add    $0x1,%r8d
  add    $0x1,%rsi
  cmp    %r8d,%edx
  jne    L71
L28:
  xor    %r8d,%r8d
L53:
  mov    %r8d,%eax
  ret
  nopl   0x0(%rax)
L20:
  cmp    %edi,%ecx
  je     L53
  add    $0x1,%r8d
  add    $0x1,%rsi
  cmp    %r8d,%edx
  jne    L71
  jmp    L28
```

assistant: ```c
int find_in_buf(char *buf, char *what, int sz, int len, int start) {
  int i;
  for (; start < sz; start++) {
    for (i = 0; i < len; i++) {
      if (*(buf + start + i) != *(what + i))
        break;
    }
    if (i == len)
      return (start);
  }
  return (0);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<find_in_buf>:
  endbr64
  mov    %rsi,%r9
  cmp    %edx,%r8d
  jge    L15
  movslq %r8d,%rax
  lea    0x1(%rcx),%r10d
  lea    (%rdi,%rax,1),%rsi
  nopw   0x0(%rax,%rax,1)
L40:
  mov    $0x1,%eax
  xor    %edi,%edi
  test   %ecx,%ecx
  jg     L70
  jmp    L12
  nopl   (%rax)
L33:
  mov    %eax,%edi
  add    $0x1,%rax
  cmp    %rax,%r10
  je     L12
L70:
  movzbl -0x1(%r9,%rax,1),%edi
  cmp    %dil,-0x1(%rax,%rsi,1)
  je     L33
  add    $0x1,%r8d
  add    $0x1,%rsi
  cmp    %r8d,%edx
  jne    L40
L15:
  xor    %r8d,%r8d
L9:
  mov    %r8d,%eax
  ret
  nopl   0x0(%rax)
L12:
  cmp    %edi,%ecx
  je     L9
  add    $0x1,%r8d
  add    $0x1,%rsi
  cmp    %r8d,%edx
  jne    L40
  jmp    L15
```

assistant: ```c
int find_in_buf(char *buf, char *what, int sz, int len, int start) {
  int i;
  for (; start < sz; start++) {
    for (i = 0; i < len; i++) {
      if (*(buf + start + i) != *(what + i))
        break;
    }
    if (i == len)
      return (start);
  }
  return (0);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<verrx>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,-0x4(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %edx,-0x8(%rbp)
  mov    -0x8(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <vwarnx@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <exit@plt>
  nop
  leave
  ret
```

assistant: ```c
extern void verrx(int status, const char *format, va_list args) {
  vwarnx(format, args);
  exit(status);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<verrx>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  mov    %rsi,%rdi
  mov    %edx,%esi
  call   <vwarnx@plt>
  mov    %ebx,%edi
  call   <exit@plt>
  pop    %rbx
  ret
```

assistant: ```c
extern void verrx(int status, const char *format, va_list args) {
  vwarnx(format, args);
  exit(status);
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<verrx>:
  endbr64
  push   %rbp
  mov    %edi,%ebp
  mov    %rsi,%rdi
  mov    %edx,%esi
  call   <vwarnx@plt>
  mov    %ebp,%edi
  pop    %rbp
  jmp    1070 <exit@plt>
```

assistant: ```c
extern void verrx(int status, const char *format, va_list args) {
  vwarnx(format, args);
  exit(status);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<verrx>:
  endbr64
  push   %rbp
  mov    %edi,%ebp
  mov    %rsi,%rdi
  mov    %edx,%esi
  call   <vwarnx@plt>
  mov    %ebp,%edi
  pop    %rbp
  jmp    1070 <exit@plt>
```

assistant: ```c
extern void verrx(int status, const char *format, va_list args) {
  vwarnx(format, args);
  exit(status);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<stdlib_strided_dnanmax>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jg     L114
  pxor   %xmm0,%xmm0
  divsd  %xmm0,%xmm0
  jmp    L128
L114:
  cmpq   $0x1,-0x28(%rbp)
  je     L65
  cmpq   $0x0,-0x38(%rbp)
  jne    L119
L65:
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm0
  jmp    L128
L119:
  cmpq   $0x0,-0x38(%rbp)
  jns    L142
  mov    $0x1,%eax
  sub    -0x28(%rbp),%rax
  mov    -0x38(%rbp),%rdx
  imul   %rdx,%rax
  mov    %rax,-0x18(%rbp)
  jmp    L165
L142:
  movq   $0x0,-0x18(%rbp)
L165:
  movq   $0x0,-0x10(%rbp)
  jmp    L143
L166:
  mov    -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  ucomisd -0x8(%rbp),%xmm0
  jnp    L120
  mov    -0x38(%rbp),%rax
  add    %rax,-0x18(%rbp)
  addq   $0x1,-0x10(%rbp)
L143:
  mov    -0x10(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jl     L166
  jmp    L22
L120:
  nop
L22:
  mov    -0x10(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jne    L74
  pxor   %xmm0,%xmm0
  divsd  %xmm0,%xmm0
  jmp    L128
L74:
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  addq   $0x1,-0x10(%rbp)
  jmp    L46
L183:
  mov    -0x38(%rbp),%rax
  add    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  call   <stdlib_base_is_nan@plt>
  test   %rax,%rax
  jne    L135
  movsd  -0x8(%rbp),%xmm0
  comisd -0x20(%rbp),%xmm0
  ja     L84
  movsd  -0x8(%rbp),%xmm0
  ucomisd -0x20(%rbp),%xmm0
  jp     L87
  movsd  -0x8(%rbp),%xmm0
  ucomisd -0x20(%rbp),%xmm0
  jne    L87
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  call   <stdlib_base_is_positive_zero@plt>
  test   %rax,%rax
  je     L87
L84:
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  jmp    L87
L135:
  nop
L87:
  addq   $0x1,-0x10(%rbp)
L46:
  mov    -0x10(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jl     L183
  movsd  -0x20(%rbp),%xmm0
L128:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

assistant: ```c
double stdlib_strided_dnanmax(const int64_t N, const double *X, const int64_t stride) {
  double max;
  int64_t ix;
  int64_t i;
  double v;
  if (N <= 0) {
    return 0.0 / 0.0;
  }
  if (N == 1 || stride == 0) {
    return X[0];
  }
  if (stride < 0) {
    ix = (1 - N) * stride;
  } else {
    ix = 0;
  }
  for (i = 0; i < N; i++) {
    v = X[ix];
    if (v == v) {
      break;
    }
    ix += stride;
  }
  if (i == N) {
    return 0.0 / 0.0;
  }
  max = v;
  i += 1;
  for (; i < N; i++) {
    ix += stride;
    v = X[ix];
    if (stdlib_base_is_nan(v)) {
      continue;
    }
    if (v > max || (v == max && stdlib_base_is_positive_zero(v))) {
      max = v;
    }
  }
  return max;
}
```
user: What is the c source code of the assembly code below?

```asm
<stdlib_strided_dnanmax>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %rdi,%rdi
  jle    L131
  mov    %rdi,%rbp
  cmp    $0x1,%rdi
  je     L47
  test   %rdx,%rdx
  je     L47
  mov    $0x0,%eax
  js     L188
L103:
  mov    $0x0,%ecx
L8:
  mov    (%rsi,%rax,8),%r12
  movq   %r12,%xmm1
  ucomisd %xmm1,%xmm1
  jnp    L0
  add    %rdx,%rax
  add    $0x1,%rcx
  cmp    %rcx,%rbp
  jne    L8
L73:
  pxor   %xmm0,%xmm0
  divsd  %xmm0,%xmm0
  movq   %xmm0,%r12
  jmp    L93
L131:
  pxor   %xmm0,%xmm0
  divsd  %xmm0,%xmm0
  movq   %xmm0,%r12
L93:
  movq   %r12,%xmm0
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L47:
  mov    (%rsi),%r12
  jmp    L93
L188:
  mov    $0x1,%eax
  sub    %rdi,%rax
  imul   %rdx,%rax
  jmp    L103
L0:
  cmp    %rcx,%rbp
  je     L73
  lea    0x1(%rcx),%rbx
  cmp    %rbx,%rbp
  jle    L93
  lea    0x0(,%rdx,8),%r14
  add    %rax,%rdx
  lea    (%rsi,%rdx,8),%r15
  jmp    L182
L113:
  mov    %r13,%r12
L37:
  add    $0x1,%rbx
  add    %r14,%r15
  cmp    %rbx,%rbp
  je     L93
L182:
  mov    (%r15),%r13
  movq   %r13,%xmm0
  call   <stdlib_base_is_nan@plt>
  test   %rax,%rax
  jne    L37
  movq   %r13,%xmm2
  movq   %r12,%xmm3
  comisd %xmm3,%xmm2
  ja     L113
  ucomisd %xmm3,%xmm2
  jp     L37
  jne    L37
  movq   %r13,%xmm0
  call   <stdlib_base_is_positive_zero@plt>
  test   %rax,%rax
  je     L37
  mov    %r13,%r12
  jmp    L37
```

assistant: ```c
double stdlib_strided_dnanmax(const int64_t N, const double *X, const int64_t stride) {
  double max;
  int64_t ix;
  int64_t i;
  double v;
  if (N <= 0) {
    return 0.0 / 0.0;
  }
  if (N == 1 || stride == 0) {
    return X[0];
  }
  if (stride < 0) {
    ix = (1 - N) * stride;
  } else {
    ix = 0;
  }
  for (i = 0; i < N; i++) {
    v = X[ix];
    if (v == v) {
      break;
    }
    ix += stride;
  }
  if (i == N) {
    return 0.0 / 0.0;
  }
  max = v;
  i += 1;
  for (; i < N; i++) {
    ix += stride;
    v = X[ix];
    if (stdlib_base_is_nan(v)) {
      continue;
    }
    if (v > max || (v == max && stdlib_base_is_positive_zero(v))) {
      max = v;
    }
  }
  return max;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<stdlib_strided_dnanmax>:
  endbr64
  test   %rdi,%rdi
  jle    L138
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  cmp    $0x1,%rdi
  je     L173
  test   %rdx,%rdx
  je     L173
  mov    $0x0,%ecx
  js     L57
L153:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L157:
  movsd  (%rsi,%rcx,8),%xmm1
  ucomisd %xmm1,%xmm1
  jnp    L33
  add    $0x1,%rax
  add    %rdx,%rcx
  cmp    %rax,%rbp
  jne    L157
L77:
  pxor   %xmm1,%xmm1
  divsd  %xmm1,%xmm1
L20:
  add    $0x18,%rsp
  movapd %xmm1,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  cs nopw 0x0(%rax,%rax,1)
L173:
  movsd  (%rsi),%xmm1
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  movapd %xmm1,%xmm0
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L33:
  cmp    %rax,%rbp
  je     L77
  lea    0x1(%rax),%rbx
  cmp    %rbx,%rbp
  jle    L20
  lea    0x0(,%rdx,8),%r12
  add    %rcx,%rdx
  lea    (%rsi,%rdx,8),%r13
  jmp    L49
  nopw   0x0(%rax,%rax,1)
L106:
  ucomisd %xmm0,%xmm1
  jp     L150
  je     L46
L150:
  add    $0x1,%rbx
  add    %r12,%r13
  cmp    %rbx,%rbp
  je     L20
L49:
  movsd  0x0(%r13),%xmm0
  movsd  %xmm1,(%rsp)
  movsd  %xmm0,0x8(%rsp)
  call   <stdlib_base_is_nan@plt>
  movsd  (%rsp),%xmm1
  test   %rax,%rax
  jne    L150
  movsd  0x8(%rsp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L106
  movapd %xmm0,%xmm1
  jmp    L150
  cs nopw 0x0(%rax,%rax,1)
L46:
  call   <stdlib_base_is_positive_zero@plt>
  movsd  (%rsp),%xmm1
  test   %rax,%rax
  je     L150
  movsd  0x8(%rsp),%xmm0
  movapd %xmm0,%xmm1
  jmp    L150
  nopl   0x0(%rax,%rax,1)
L57:
  mov    $0x1,%ecx
  sub    %rdi,%rcx
  imul   %rdx,%rcx
  jmp    L153
  nopl   0x0(%rax)
L138:
  pxor   %xmm1,%xmm1
  divsd  %xmm1,%xmm1
  movapd %xmm1,%xmm0
  ret
```

assistant: ```c
double stdlib_strided_dnanmax(const int64_t N, const double *X, const int64_t stride) {
  double max;
  int64_t ix;
  int64_t i;
  double v;
  if (N <= 0) {
    return 0.0 / 0.0;
  }
  if (N == 1 || stride == 0) {
    return X[0];
  }
  if (stride < 0) {
    ix = (1 - N) * stride;
  } else {
    ix = 0;
  }
  for (i = 0; i < N; i++) {
    v = X[ix];
    if (v == v) {
      break;
    }
    ix += stride;
  }
  if (i == N) {
    return 0.0 / 0.0;
  }
  max = v;
  i += 1;
  for (; i < N; i++) {
    ix += stride;
    v = X[ix];
    if (stdlib_base_is_nan(v)) {
      continue;
    }
    if (v > max || (v == max && stdlib_base_is_positive_zero(v))) {
      max = v;
    }
  }
  return max;
}
```