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

```asm
<uncompress_location_values>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  mov    (%rdi),%rax
  movl   $0x0,(%rcx)
  lea    0x1(%rax),%rdx
  mov    %rdx,(%rsp)
  movzbl (%rax),%eax
  mov    $0x1,%edx
  mov    %al,(%rsi)
  test   %al,%al
  jns    L21
  and    $0xf,%eax
  or     (%rcx),%eax
  mov    %eax,%edx
L21:
  mov    %edx,(%rbx)
  mov    %rsp,%r13
  mov    %r13,%rdi
  call   <uncompress2@plt>
  mov    %eax,(%r12)
  mov    (%rbx),%eax
  test   %eax,%eax
  je     L38
L32:
  mov    (%rsp),%rax
  mov    %rax,0x0(%rbp)
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L10
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L38:
  mov    %r13,%rdi
  call   <uncompress2@plt>
  mov    %eax,(%rbx)
  jmp    L32
L10:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void uncompress_location_values(unsigned char **buf, unsigned char *flag, int *filenum, int *frequency) {
  unsigned char *p = *buf;
  *frequency = 0;
  *flag = *p++;
  if (!((*flag) & 0x80)) {
    *frequency = 1;
  } else
    (*frequency) |= (*flag) & 15;
  *filenum = uncompress2(&p);
  if (!(*frequency))
    *frequency = uncompress2(&p);
  *buf = p;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<uncompress_location_values>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  mov    (%rdi),%rax
  movl   $0x0,(%rcx)
  lea    0x1(%rax),%rdx
  mov    %rdx,(%rsp)
  movzbl (%rax),%eax
  mov    $0x1,%edx
  mov    %al,(%rsi)
  test   %al,%al
  jns    L39
  and    $0xf,%eax
  or     (%rcx),%eax
  mov    %eax,%edx
L39:
  mov    %edx,(%rbx)
  mov    %rsp,%r13
  mov    %r13,%rdi
  call   <uncompress2@plt>
  mov    %eax,(%r12)
  mov    (%rbx),%eax
  test   %eax,%eax
  je     L1
L37:
  mov    (%rsp),%rax
  mov    %rax,0x0(%rbp)
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L1:
  mov    %r13,%rdi
  call   <uncompress2@plt>
  mov    %eax,(%rbx)
  jmp    L37
L0:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void uncompress_location_values(unsigned char **buf, unsigned char *flag, int *filenum, int *frequency) {
  unsigned char *p = *buf;
  *frequency = 0;
  *flag = *p++;
  if (!((*flag) & 0x80)) {
    *frequency = 1;
  } else
    (*frequency) |= (*flag) & 15;
  *filenum = uncompress2(&p);
  if (!(*frequency))
    *frequency = uncompress2(&p);
  *buf = p;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<SL24_char_to_int>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jns    L8
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  or     %eax,%edx
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %edx,%eax
  sub    $0x1000000,%eax
  jmp    L13
L8:
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  or     %eax,%edx
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %edx,%eax
L13:
  pop    %rbp
  ret
```

assistant: ```c
int SL24_char_to_int(unsigned char *s) {
  if (s[2] & 0x80) {
    return -(int)(0x1000000 - ((s[2] << 16) | (s[1] << 8) | s[0]));
  } else {
    return (int)((s[2] << 16) | (s[1] << 8) | s[0]);
  }
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<SL24_char_to_int>:
  endbr64
  movzbl 0x2(%rdi),%edx
  test   %dl,%dl
  js     L0
  movzbl 0x1(%rdi),%eax
  shl    $0x8,%eax
  movzbl %dl,%edx
  shl    $0x10,%edx
  or     %edx,%eax
  movzbl (%rdi),%edx
  or     %edx,%eax
  ret
L0:
  movzbl 0x1(%rdi),%eax
  shl    $0x8,%eax
  movzbl %dl,%edx
  shl    $0x10,%edx
  or     %edx,%eax
  movzbl (%rdi),%edx
  or     %edx,%eax
  sub    $0x1000000,%eax
  ret
```

assistant: ```c
int SL24_char_to_int(unsigned char *s) {
  if (s[2] & 0x80) {
    return -(int)(0x1000000 - ((s[2] << 16) | (s[1] << 8) | s[0]));
  } else {
    return (int)((s[2] << 16) | (s[1] << 8) | s[0]);
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<SL24_char_to_int>:
  endbr64
  movzbl 0x2(%rdi),%edx
  movzbl 0x1(%rdi),%eax
  mov    %edx,%ecx
  shl    $0x8,%eax
  shl    $0x10,%edx
  or     %edx,%eax
  movzbl (%rdi),%edx
  or     %edx,%eax
  test   %cl,%cl
  lea    -0x1000000(%rax),%edx
  cmovs  %edx,%eax
  ret
```

assistant: ```c
int SL24_char_to_int(unsigned char *s) {
  if (s[2] & 0x80) {
    return -(int)(0x1000000 - ((s[2] << 16) | (s[1] << 8) | s[0]));
  } else {
    return (int)((s[2] << 16) | (s[1] << 8) | s[0]);
  }
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<SL24_char_to_int>:
  endbr64
  movzbl 0x2(%rdi),%edx
  movzbl 0x1(%rdi),%eax
  mov    %edx,%ecx
  shl    $0x8,%eax
  shl    $0x10,%edx
  or     %edx,%eax
  movzbl (%rdi),%edx
  or     %edx,%eax
  test   %cl,%cl
  lea    -0x1000000(%rax),%edx
  cmovs  %edx,%eax
  ret
```

assistant: ```c
int SL24_char_to_int(unsigned char *s) {
  if (s[2] & 0x80) {
    return -(int)(0x1000000 - ((s[2] << 16) | (s[1] << 8) | s[0]));
  } else {
    return (int)((s[2] << 16) | (s[1] << 8) | s[0]);
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<do_fsave>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  fninit
  fldpi
  fld1
  fldln2
  mov    -0x8(%rbp),%rax
  fsave  (%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void do_fsave(void *p) {
  asm __volatile__("fninit");
  asm __volatile__("fldpi");
  asm __volatile__("fld1");
  asm __volatile__("fldln2");
  asm __volatile__("fsave (%0)" : : "r"(p) : "memory");
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<do_fsave>:
  endbr64
  fninit
  fldpi
  fld1
  fldln2
  fsave  (%rdi)
  ret
```

assistant: ```c
void do_fsave(void *p) {
  asm __volatile__("fninit");
  asm __volatile__("fldpi");
  asm __volatile__("fld1");
  asm __volatile__("fldln2");
  asm __volatile__("fsave (%0)" : : "r"(p) : "memory");
}
```
user: Translate the below assembly code into C programming language:

```asm
<do_fsave>:
  endbr64
  fninit
  fldpi
  fld1
  fldln2
  fsave  (%rdi)
  ret
```

assistant: ```c
void do_fsave(void *p) {
  asm __volatile__("fninit");
  asm __volatile__("fldpi");
  asm __volatile__("fld1");
  asm __volatile__("fldln2");
  asm __volatile__("fsave (%0)" : : "r"(p) : "memory");
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<get_Delaunay_reduction>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,%r12
  movq   %xmm0,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  call   <get_exteneded_basis@plt>
  mov    %rsp,%rbx
L22:
  movq   %rbp,%xmm0
  mov    %rbx,%rdi
  call   <get_Delaunay_reduction_basis@plt>
  test   %rax,%rax
  je     L22
  mov    %rsp,%rbx
  movq   %rbp,%xmm0
  mov    %rbx,%rdi
  call   <get_Delaunay_shortest_vectors@plt>
  mov    %rbx,%rdx
  mov    %r12,%rbx
  lea    0x48(%r12),%r13
  mov    %r12,%rax
L54:
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  movsd  0x18(%rdx),%xmm0
  movsd  %xmm0,0x8(%rax)
  movsd  0x30(%rdx),%xmm0
  movsd  %xmm0,0x10(%rax)
  add    $0x8,%rdx
  add    $0x18,%rax
  cmp    %rax,%r13
  jne    L54
  mov    %r12,%rdi
  call   <mat_get_determinant_d3@plt>
  movq   %xmm0,%r12
  call   <mat_Dabs@plt>
  mov    $0x0,%eax
  movq   %rbp,%xmm2
  comisd %xmm0,%xmm2
  ja     L19
  pxor   %xmm0,%xmm0
  movq   %r12,%xmm3
  mov    $0x1,%eax
  comisd %xmm3,%xmm0
  ja     L63
L19:
  mov    0x68(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L66
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L63:
  movq   D7(%rip),%xmm1
L6:
  movsd  (%rbx),%xmm0
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x8(%rbx),%xmm0
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x10(%rbx),%xmm0
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rbx)
  add    $0x18,%rbx
  cmp    %rbx,%r13
  jne    L6
  mov    $0x1,%eax
  jmp    L19
L66:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D7
type_guessed: byte[8]

tool: {"D7": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

assistant: ```c
int get_Delaunay_reduction(double red_lattice[3][3], double lattice[3][3], const double symprec) {
  int i, j;
  double volume, sum;
  double basis[4][3];
  get_exteneded_basis(basis, lattice);
  sum = 0;
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 3; j++) {
      sum += basis[i][j] * basis[i][j];
    }
  }
  while (1) {
    if (get_Delaunay_reduction_basis(basis, symprec)) {
      break;
    }
  }
  get_Delaunay_shortest_vectors(basis, symprec);
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      red_lattice[i][j] = basis[j][i];
    }
  }
  volume = mat_get_determinant_d3(red_lattice);
  if (mat_Dabs(volume) < symprec) {
    ;
    goto err;
  }
  if (volume < 0) {
    for (i = 0; i < 3; i++) {
      for (j = 0; j < 3; j++) {
        red_lattice[i][j] = -red_lattice[i][j];
      }
    }
  }
  return 1;
err:
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<get_Delaunay_reduction>:
  endbr64
  push   %r14
  movq   %xmm0,%r14
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbx
  mov    %rbx,%rdi
  call   <get_exteneded_basis@plt>
  cs nopw 0x0(%rax,%rax,1)
L17:
  movq   %r14,%xmm0
  mov    %rbx,%rdi
  call   <get_Delaunay_reduction_basis@plt>
  test   %rax,%rax
  je     L17
  mov    %rbx,%rdi
  movq   %r14,%xmm0
  lea    0x48(%rbp),%r12
  call   <get_Delaunay_shortest_vectors@plt>
  mov    %rbx,%rax
  mov    %rbp,%rdx
  mov    %rbp,%rbx
L5:
  movsd  (%rax),%xmm0
  add    $0x18,%rdx
  add    $0x8,%rax
  movsd  %xmm0,-0x18(%rdx)
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,-0x10(%rdx)
  movsd  0x28(%rax),%xmm0
  movsd  %xmm0,-0x8(%rdx)
  cmp    %r12,%rdx
  jne    L5
  mov    %rbp,%rdi
  call   <mat_get_determinant_d3@plt>
  movsd  %xmm0,0x8(%rsp)
  call   <mat_Dabs@plt>
  movq   %r14,%xmm2
  xor    %eax,%eax
  comisd %xmm0,%xmm2
  ja     L14
  movsd  0x8(%rsp),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  ja     L58
L60:
  mov    $0x1,%eax
L14:
  mov    0x78(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L25
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r14
  ret
  nopl   0x0(%rax)
L58:
  movq   D9(%rip),%xmm1
L54:
  movsd  (%rbx),%xmm0
  add    $0x18,%rbx
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbx)
  movsd  -0x10(%rbx),%xmm0
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbx)
  movsd  -0x8(%rbx),%xmm0
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbx)
  cmp    %r12,%rbx
  jne    L54
  jmp    L60
L25:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D9
type: byte[8]

tool: {"D9": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

assistant: ```c
int get_Delaunay_reduction(double red_lattice[3][3], double lattice[3][3], const double symprec) {
  int i, j;
  double volume, sum;
  double basis[4][3];
  get_exteneded_basis(basis, lattice);
  sum = 0;
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 3; j++) {
      sum += basis[i][j] * basis[i][j];
    }
  }
  while (1) {
    if (get_Delaunay_reduction_basis(basis, symprec)) {
      break;
    }
  }
  get_Delaunay_shortest_vectors(basis, symprec);
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      red_lattice[i][j] = basis[j][i];
    }
  }
  volume = mat_get_determinant_d3(red_lattice);
  if (mat_Dabs(volume) < symprec) {
    ;
    goto err;
  }
  if (volume < 0) {
    for (i = 0; i < 3; i++) {
      for (j = 0; j < 3; j++) {
        red_lattice[i][j] = -red_lattice[i][j];
      }
    }
  }
  return 1;
err:
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<get_Delaunay_reduction>:
  endbr64
  push   %r14
  movq   %xmm0,%r14
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  add    $0xffffffffffffff80,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbp
  mov    %rbp,%rdi
  call   <get_exteneded_basis@plt>
  nopl   0x0(%rax)
L49:
  movq   %r14,%xmm0
  mov    %rbp,%rdi
  call   <get_Delaunay_reduction_basis@plt>
  test   %rax,%rax
  je     L49
  movq   %r14,%xmm0
  mov    %rbp,%rdi
  call   <get_Delaunay_shortest_vectors@plt>
  movapd 0x10(%rsp),%xmm0
  movapd 0x10(%rsp),%xmm4
  mov    %rbx,%rdi
  movapd 0x30(%rsp),%xmm5
  movhpd 0x28(%rsp),%xmm0
  movlpd 0x40(%rsp),%xmm4
  movups %xmm0,(%rbx)
  movupd 0x28(%rsp),%xmm0
  movlpd 0x20(%rsp),%xmm5
  shufpd $0x1,0x10(%rsp),%xmm0
  movhps 0x48(%rsp),%xmm0
  movups %xmm4,0x10(%rbx)
  movups %xmm5,0x30(%rbx)
  movups %xmm0,0x20(%rbx)
  movsd  0x50(%rsp),%xmm0
  movsd  %xmm0,0x40(%rbx)
  call   <mat_get_determinant_d3@plt>
  movsd  %xmm0,0x8(%rsp)
  call   <mat_Dabs@plt>
  movq   %r14,%xmm6
  xor    %eax,%eax
  comisd %xmm0,%xmm6
  ja     L24
  movsd  0x8(%rsp),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  ja     L27
L11:
  mov    $0x1,%eax
L24:
  mov    0x78(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L28
  sub    $0xffffffffffffff80,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r14
  ret
  nopl   (%rax)
L27:
  movapd D1(%rip),%xmm0
  movupd 0x10(%rbx),%xmm2
  movupd 0x20(%rbx),%xmm1
  movupd (%rbx),%xmm3
  movupd 0x30(%rbx),%xmm7
  xorpd  %xmm0,%xmm2
  xorpd  %xmm0,%xmm1
  xorpd  %xmm0,%xmm3
  movups %xmm2,0x10(%rbx)
  xorpd  %xmm7,%xmm0
  movups %xmm3,(%rbx)
  movups %xmm0,0x30(%rbx)
  movsd  0x40(%rbx),%xmm0
  xorpd  D11(%rip),%xmm0
  movups %xmm1,0x20(%rbx)
  movsd  %xmm0,0x40(%rbx)
  jmp    L11
L28:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D1
datatype: byte[16]
name: disassemble_data
arguments: label: D11
datatype: byte[16]

tool: {"D1": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

tool: {"D11": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
int get_Delaunay_reduction(double red_lattice[3][3], double lattice[3][3], const double symprec) {
  int i, j;
  double volume, sum;
  double basis[4][3];
  get_exteneded_basis(basis, lattice);
  sum = 0;
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 3; j++) {
      sum += basis[i][j] * basis[i][j];
    }
  }
  while (1) {
    if (get_Delaunay_reduction_basis(basis, symprec)) {
      break;
    }
  }
  get_Delaunay_shortest_vectors(basis, symprec);
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      red_lattice[i][j] = basis[j][i];
    }
  }
  volume = mat_get_determinant_d3(red_lattice);
  if (mat_Dabs(volume) < symprec) {
    ;
    goto err;
  }
  if (volume < 0) {
    for (i = 0; i < 3; i++) {
      for (j = 0; j < 3; j++) {
        red_lattice[i][j] = -red_lattice[i][j];
      }
    }
  }
  return 1;
err:
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<point_lies_seg>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  movsd  %xmm0,-0x8(%rbp)
  movsd  %xmm1,-0x10(%rbp)
  movsd  %xmm2,-0x18(%rbp)
  movsd  %xmm3,-0x20(%rbp)
  movsd  %xmm4,-0x28(%rbp)
  movsd  %xmm5,-0x30(%rbp)
  movsd  -0x8(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jg     L181
  movsd  -0x28(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jg     L104
  movsd  -0x30(%rbp),%xmm0
  comisd -0x10(%rbp),%xmm0
  jb     L4
  movsd  -0x20(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  jae    L175
L4:
  movsd  -0x10(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  jb     L104
  movsd  -0x30(%rbp),%xmm0
  comisd -0x20(%rbp),%xmm0
  jb     L104
L175:
  mov    $0x1,%eax
  jmp    L179
L181:
  movsd  -0x10(%rbp),%xmm0
  subsd  -0x20(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jg     L151
  movsd  -0x30(%rbp),%xmm0
  subsd  -0x20(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jg     L104
  movsd  -0x28(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jb     L73
  movsd  -0x18(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  jae    L126
L73:
  movsd  -0x8(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  jb     L104
  movsd  -0x28(%rbp),%xmm0
  comisd -0x18(%rbp),%xmm0
  jb     L104
L126:
  mov    $0x1,%eax
  jmp    L179
L151:
  movsd  -0x28(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jb     L159
  movsd  -0x18(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  jae    L7
L159:
  movsd  -0x8(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  jb     L104
  movsd  -0x28(%rbp),%xmm0
  comisd -0x18(%rbp),%xmm0
  jb     L104
L7:
  movsd  -0x30(%rbp),%xmm0
  comisd -0x10(%rbp),%xmm0
  jb     L89
  movsd  -0x20(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  jae    L166
L89:
  movsd  -0x10(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  jb     L104
  movsd  -0x30(%rbp),%xmm0
  comisd -0x20(%rbp),%xmm0
  jb     L104
L166:
  mov    $0x1,%eax
  jmp    L179
L104:
  mov    $0x0,%eax
L179:
  leave
  ret
```

assistant: ```c
int point_lies_seg(double p1x, double p1y, double p2x, double p2y, double x, double y) {
  if (fabs(p1x - p2x) < 1e-6) {
    if ((fabs(x - p2x) < 1e-6) && (((y >= p1y) && (y <= p2y)) || ((y <= p1y) && (y >= p2y)))) {
      return 1;
    }
  } else if (fabs(p1y - p2y) < 1e-6) {
    if ((fabs(y - p2y) < 1e-6) && (((x >= p1x) && (x <= p2x)) || ((x <= p1x) && (x >= p2x)))) {
      return 1;
    }
  } else if ((((x >= p1x) && (x <= p2x)) || ((x <= p1x) && (x >= p2x))) && (((y >= p1y) && (y <= p2y)) || ((y <= p1y) && (y >= p2y)))) {
    return 1;
  }
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<point_lies_seg>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  movq   %xmm0,%rbp
  movq   %xmm1,%r13
  movq   %xmm3,%r14
  movq   %xmm4,%rbx
  movq   %xmm5,%r12
  movsd  %xmm2,0x8(%rsp)
  subsd  %xmm2,%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jle    L152
  movq   %r13,%xmm0
  movq   %r14,%xmm6
  subsd  %xmm6,%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jle    L145
  movq   %rbx,%xmm7
  movq   %rbp,%xmm6
  comisd %xmm6,%xmm7
  jb     L133
  movsd  0x8(%rsp),%xmm7
  movq   %rbx,%xmm6
  comisd %xmm6,%xmm7
  jae    L87
L133:
  movq   %rbp,%xmm7
  movq   %rbx,%xmm6
  mov    $0x0,%eax
  comisd %xmm6,%xmm7
  jb     L174
  mov    $0x0,%eax
  comisd 0x8(%rsp),%xmm6
  jb     L174
L87:
  movq   %r12,%xmm7
  movq   %r13,%xmm1
  comisd %xmm1,%xmm7
  jb     L59
  mov    $0x1,%eax
  movq   %r14,%xmm3
  comisd %xmm7,%xmm3
  jae    L174
L59:
  movq   %r13,%xmm5
  movq   %r12,%xmm7
  mov    $0x0,%eax
  comisd %xmm7,%xmm5
  jb     L174
  movq   %r12,%xmm3
  movq   %r14,%xmm7
  comisd %xmm7,%xmm3
  setae  %al
  movzbl %al,%eax
  jmp    L174
L152:
  movq   %rbx,%xmm0
  subsd  0x8(%rsp),%xmm0
  call   <fabs@plt>
  mov    %eax,%edx
  mov    $0x0,%eax
  test   %edx,%edx
  jle    L7
L174:
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L7:
  movq   %r12,%xmm7
  movq   %r13,%xmm3
  comisd %xmm3,%xmm7
  jb     L39
  mov    $0x1,%eax
  movq   %r14,%xmm1
  comisd %xmm7,%xmm1
  jae    L174
L39:
  movq   %r13,%xmm5
  movq   %r12,%xmm4
  mov    $0x0,%eax
  comisd %xmm4,%xmm5
  jb     L174
  movq   %r14,%xmm5
  comisd %xmm5,%xmm4
  setae  %al
  movzbl %al,%eax
  jmp    L174
L145:
  movq   %r12,%xmm0
  movq   %r14,%xmm6
  subsd  %xmm6,%xmm0
  call   <fabs@plt>
  mov    %eax,%edx
  mov    $0x0,%eax
  test   %edx,%edx
  jg     L174
  movq   %rbx,%xmm4
  movq   %rbp,%xmm6
  comisd %xmm6,%xmm4
  jb     L112
  mov    $0x1,%eax
  movsd  0x8(%rsp),%xmm7
  comisd %xmm4,%xmm7
  jae    L174
L112:
  movq   %rbp,%xmm3
  movq   %rbx,%xmm1
  mov    $0x0,%eax
  comisd %xmm1,%xmm3
  jb     L174
  comisd 0x8(%rsp),%xmm1
  setae  %al
  movzbl %al,%eax
  jmp    L174
```

assistant: ```c
int point_lies_seg(double p1x, double p1y, double p2x, double p2y, double x, double y) {
  if (fabs(p1x - p2x) < 1e-6) {
    if ((fabs(x - p2x) < 1e-6) && (((y >= p1y) && (y <= p2y)) || ((y <= p1y) && (y >= p2y)))) {
      return 1;
    }
  } else if (fabs(p1y - p2y) < 1e-6) {
    if ((fabs(y - p2y) < 1e-6) && (((x >= p1x) && (x <= p2x)) || ((x <= p1x) && (x >= p2x)))) {
      return 1;
    }
  } else if ((((x >= p1x) && (x <= p2x)) || ((x <= p1x) && (x >= p2x))) && (((y >= p1y) && (y <= p2y)) || ((y <= p1y) && (y >= p2y)))) {
    return 1;
  }
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<point_lies_seg>:
  endbr64
  sub    $0x38,%rsp
  movsd  %xmm0,0x18(%rsp)
  subsd  %xmm2,%xmm0
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm4,(%rsp)
  movsd  %xmm5,0x28(%rsp)
  movsd  %xmm2,0x20(%rsp)
  call   <fabs@plt>
  test   %eax,%eax
  jle    L11
  movsd  0x8(%rsp),%xmm0
  subsd  0x10(%rsp),%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jle    L33
  movsd  (%rsp),%xmm7
  comisd 0x18(%rsp),%xmm7
  jb     L41
  movsd  0x20(%rsp),%xmm3
  comisd %xmm7,%xmm3
  jae    L142
L41:
  movsd  0x18(%rsp),%xmm7
  movsd  (%rsp),%xmm6
  comisd %xmm6,%xmm7
  jb     L64
  comisd 0x20(%rsp),%xmm6
  jb     L64
L142:
  movsd  0x28(%rsp),%xmm1
  comisd 0x8(%rsp),%xmm1
  jb     L184
  movsd  0x10(%rsp),%xmm7
  comisd %xmm1,%xmm7
  jae    L111
L184:
  movsd  0x8(%rsp),%xmm6
  movsd  0x28(%rsp),%xmm5
  comisd %xmm5,%xmm6
  jb     L64
  comisd 0x10(%rsp),%xmm5
  jae    L111
L64:
  xor    %eax,%eax
  add    $0x38,%rsp
  ret
  nopw   0x0(%rax,%rax,1)
L11:
  movsd  (%rsp),%xmm0
  subsd  0x20(%rsp),%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jg     L64
  movsd  0x28(%rsp),%xmm4
  comisd 0x8(%rsp),%xmm4
  jb     L202
  movsd  0x10(%rsp),%xmm1
  comisd %xmm4,%xmm1
  jae    L111
L202:
  movsd  0x8(%rsp),%xmm4
  movsd  0x28(%rsp),%xmm3
  comisd %xmm3,%xmm4
  jb     L64
  comisd 0x10(%rsp),%xmm3
  jb     L64
L111:
  mov    $0x1,%eax
  add    $0x38,%rsp
  ret
  nopw   0x0(%rax,%rax,1)
L33:
  movsd  0x28(%rsp),%xmm0
  subsd  0x10(%rsp),%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jg     L64
  movsd  (%rsp),%xmm5
  comisd 0x18(%rsp),%xmm5
  jb     L42
  movsd  0x20(%rsp),%xmm4
  comisd %xmm5,%xmm4
  jae    L111
L42:
  movsd  0x18(%rsp),%xmm7
  movsd  (%rsp),%xmm3
  comisd %xmm3,%xmm7
  jb     L64
  comisd 0x20(%rsp),%xmm3
  jb     L64
  jmp    L111
```

assistant: ```c
int point_lies_seg(double p1x, double p1y, double p2x, double p2y, double x, double y) {
  if (fabs(p1x - p2x) < 1e-6) {
    if ((fabs(x - p2x) < 1e-6) && (((y >= p1y) && (y <= p2y)) || ((y <= p1y) && (y >= p2y)))) {
      return 1;
    }
  } else if (fabs(p1y - p2y) < 1e-6) {
    if ((fabs(y - p2y) < 1e-6) && (((x >= p1x) && (x <= p2x)) || ((x <= p1x) && (x >= p2x)))) {
      return 1;
    }
  } else if ((((x >= p1x) && (x <= p2x)) || ((x <= p1x) && (x >= p2x))) && (((y >= p1y) && (y <= p2y)) || ((y <= p1y) && (y >= p2y)))) {
    return 1;
  }
  return 0;
}
```