ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<ischarMatch>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,%eax
  mov    %edx,-0x10(%rbp)
  mov    %al,-0xc(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x10(%rbp)
  jl     L39
  mov    $0x0,%eax
  jmp    L15
L39:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    %al,-0xc(%rbp)
  jne    L32
  mov    $0x1,%eax
  jmp    L15
L32:
  mov    $0x0,%eax
L15:
  leave
  ret
```

assistant: ```c
int ischarMatch(char *word, char lettre, int indice) {
  if ((int)strlen(word) <= indice)
    return 0;
  if (word[indice] == lettre)
    return 1;
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<ischarMatch>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  mov    %esi,%r12d
  mov    %edx,%ebx
  call   <strlen@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  cmp    %edx,%ebx
  jge    L0
  movslq %ebx,%rbx
  cmp    %r12b,0x0(%rbp,%rbx,1)
  sete   %al
  movzbl %al,%eax
L0:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int ischarMatch(char *word, char lettre, int indice) {
  if ((int)strlen(word) <= indice)
    return 0;
  if (word[indice] == lettre)
    return 1;
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<ischarMatch>:
  endbr64
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  movslq %edx,%rbx
  call   <strlen@plt>
  mov    %rax,%r8
  xor    %eax,%eax
  cmp    %r8d,%ebx
  jge    L7
  xor    %eax,%eax
  cmp    %r12b,0x0(%rbp,%rbx,1)
  sete   %al
L7:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int ischarMatch(char *word, char lettre, int indice) {
  if ((int)strlen(word) <= indice)
    return 0;
  if (word[indice] == lettre)
    return 1;
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<ischarMatch>:
  endbr64
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  movslq %edx,%rbx
  call   <strlen@plt>
  mov    %rax,%r8
  xor    %eax,%eax
  cmp    %r8d,%ebx
  jge    L9
  xor    %eax,%eax
  cmp    %r12b,0x0(%rbp,%rbx,1)
  sete   %al
L9:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int ischarMatch(char *word, char lettre, int indice) {
  if ((int)strlen(word) <= indice)
    return 0;
  if (word[indice] == lettre)
    return 1;
  return 0;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<test_align>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L18
L17:
  mov    $0x2e,%edi
  call   <putchar@plt>
  addl   $0x1,-0x4(%rbp)
L18:
  mov    -0x4(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L17
  nop
  nop
  leave
  ret
```

assistant: ```c
void test_align(int len) {
  for (int i = 0; i < len; ++i) {
    putchar('.');
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<test_align>:
  endbr64
  test   %edi,%edi
  jle    L9
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%ebp
  mov    $0x0,%ebx
L1:
  mov    $0x2e,%edi
  call   <putchar@plt>
  add    $0x1,%ebx
  cmp    %ebx,%ebp
  jne    L1
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L9:
  ret
```

assistant: ```c
void test_align(int len) {
  for (int i = 0; i < len; ++i) {
    putchar('.');
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<test_align>:
  endbr64
  test   %edi,%edi
  jle    L15
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  nopw   0x0(%rax,%rax,1)
L19:
  mov    $0x2e,%edi
  add    $0x1,%ebx
  call   <putchar@plt>
  cmp    %ebx,%ebp
  jne    L19
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L15:
  ret
```

assistant: ```c
void test_align(int len) {
  for (int i = 0; i < len; ++i) {
    putchar('.');
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<test_align>:
  endbr64
  test   %edi,%edi
  jle    L2
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  nopw   0x0(%rax,%rax,1)
L11:
  mov    $0x2e,%edi
  add    $0x1,%ebx
  call   <putchar@plt>
  cmp    %ebx,%ebp
  jne    L11
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L2:
  ret
```

assistant: ```c
void test_align(int len) {
  for (int i = 0; i < len; ++i) {
    putchar('.');
  }
}
```
user: What is the c source code of the assembly code below?

```asm
<insert_ram>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %edx,-0x14(%rbp)
  mov    %rcx,-0x20(%rbp)
  mov    -0x8(%rbp),%rax
  shr    $0x15,%rax
  and    $0x1f,%eax
  mov    %rax,%rdx
  mov    -0x10(%rbp),%rax
  cmp    %rax,%rdx
  ja     L0
  mov    -0x20(%rbp),%rax
  lea    D2(%rip),%rdx
  mov    %rdx,(%rax)
L0:
  mov    -0x10(%rbp),%rax
  shl    $0x10,%rax
  and    $0x1f0000,%eax
  or     -0x8(%rbp),%rax
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D2
type_guessed: string

tool: D2: index register in load range

assistant: ```c
unsigned long insert_ram(unsigned long insn, long value, int dialect __attribute__((unused)), const char **errmsg) {
  if ((unsigned long)value >= ((insn >> 21) & 0x1f))
    *errmsg = "index register in load range";
  return insn | ((value & 0x1f) << 16);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<insert_ram>:
  endbr64
  mov    %rdi,%rax
  shr    $0x15,%rax
  and    $0x1f,%eax
  cmp    %rsi,%rax
  ja     L0
  lea    D2(%rip),%rax
  mov    %rax,(%rcx)
L0:
  mov    %rsi,%rax
  shl    $0x10,%rax
  and    $0x1f0000,%eax
  or     %rdi,%rax
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D2
type: string

tool: D2: index register in load range

assistant: ```c
unsigned long insert_ram(unsigned long insn, long value, int dialect __attribute__((unused)), const char **errmsg) {
  if ((unsigned long)value >= ((insn >> 21) & 0x1f))
    *errmsg = "index register in load range";
  return insn | ((value & 0x1f) << 16);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<insert_ram>:
  endbr64
  mov    %rdi,%rax
  shr    $0x15,%rax
  and    $0x1f,%eax
  cmp    %rsi,%rax
  ja     L0
  lea    D8(%rip),%rax
  mov    %rax,(%rcx)
L0:
  mov    %rsi,%rax
  shl    $0x10,%rax
  and    $0x1f0000,%eax
  or     %rdi,%rax
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D8
datatype: string

tool: D8: index register in load range

assistant: ```c
unsigned long insert_ram(unsigned long insn, long value, int dialect __attribute__((unused)), const char **errmsg) {
  if ((unsigned long)value >= ((insn >> 21) & 0x1f))
    *errmsg = "index register in load range";
  return insn | ((value & 0x1f) << 16);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<insert_ram>:
  endbr64
  mov    %rdi,%rax
  shr    $0x15,%rax
  and    $0x1f,%eax
  cmp    %rsi,%rax
  ja     L7
  lea    D2(%rip),%rax
  mov    %rax,(%rcx)
L7:
  mov    %rsi,%rax
  shl    $0x10,%rax
  and    $0x1f0000,%eax
  or     %rdi,%rax
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D2
data_type: string

tool: D2: index register in load range

assistant: ```c
unsigned long insert_ram(unsigned long insn, long value, int dialect __attribute__((unused)), const char **errmsg) {
  if ((unsigned long)value >= ((insn >> 21) & 0x1f))
    *errmsg = "index register in load range";
  return insn | ((value & 0x1f) << 16);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<psvec4_snap>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    -0x18(%rbp),%rdx
  mov    -0x10(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <vec4_snap@plt>
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
__attribute__((always_)) struct vec4 *psvec4_snap(struct vec4 *result, struct vec4 *a, struct vec4 *b) {
  vec4_snap((float *)result, (float *)a, (float *)b);
  return result;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<psvec4_snap>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  call   <vec4_snap@plt>
  mov    %rbx,%rax
  pop    %rbx
  ret
```

assistant: ```c
__attribute__((always_)) struct vec4 *psvec4_snap(struct vec4 *result, struct vec4 *a, struct vec4 *b) {
  vec4_snap((float *)result, (float *)a, (float *)b);
  return result;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<psvec4_snap>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  call   <vec4_snap@plt>
  mov    %r12,%rax
  pop    %r12
  ret
```

assistant: ```c
__attribute__((always_)) struct vec4 *psvec4_snap(struct vec4 *result, struct vec4 *a, struct vec4 *b) {
  vec4_snap((float *)result, (float *)a, (float *)b);
  return result;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<psvec4_snap>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  call   <vec4_snap@plt>
  mov    %r12,%rax
  pop    %r12
  ret
```

assistant: ```c
__attribute__((always_)) struct vec4 *psvec4_snap(struct vec4 *result, struct vec4 *a, struct vec4 *b) {
  vec4_snap((float *)result, (float *)a, (float *)b);
  return result;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<rand>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x4,-0xc(%rbp)
  jmp    L35
L29:
  mov    $0xa,%edi
  call   <maxrand@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  addsd  -0x8(%rbp),%xmm0
  movsd  D10(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
L35:
  mov    -0xc(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  test   %eax,%eax
  jg     L29
  movsd  -0x8(%rbp),%xmm0
  movsd  D19(%rip),%xmm1
  comisd %xmm1,%xmm0
  jbe    L24
  movsd  D19(%rip),%xmm0
  jmp    L3
L24:
  movsd  -0x8(%rbp),%xmm0
L3:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D10
type_infered: f64
name: parse_data
arguments: label: D19
type_infered: f32[2]

tool: D10: 10

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

assistant: ```c
double rand() {
  double rst = 0;
  int count = 4;
  while (count-- > 0) {
    rst = (rst + maxrand(10)) / 10.0;
  }
  return rst > 1 ? 1 : rst;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<rand>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    $0x4,%ebp
  mov    D24(%rip),%rbx
L19:
  mov    $0xa,%edi
  call   <maxrand@plt>
  movq   %rbx,%xmm1
  addsd  %xmm1,%xmm0
  divsd  D15(%rip),%xmm0
  movq   %xmm0,%rbx
  sub    $0x1,%ebp
  jne    L19
  comisd D34(%rip),%xmm0
  jbe    L13
  mov    D34(%rip),%rbx
L13:
  movq   %rbx,%xmm0
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D24
type: f64
name: retrieve_data
arguments: tag: D15
type: f64
name: retrieve_data
arguments: tag: D34
type: byte[16]

tool: D24: 0

tool: D15: 10

tool: {"D34": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x40]}

assistant: ```c
double rand() {
  double rst = 0;
  int count = 4;
  while (count-- > 0) {
    rst = (rst + maxrand(10)) / 10.0;
  }
  return rst > 1 ? 1 : rst;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<rand>:
  endbr64
  push   %rbx
  pxor   %xmm1,%xmm1
  mov    $0x4,%ebx
  sub    $0x10,%rsp
L3:
  mov    $0xa,%edi
  movsd  %xmm1,0x8(%rsp)
  call   <maxrand@plt>
  movsd  0x8(%rsp),%xmm1
  addsd  %xmm0,%xmm1
  divsd  D0(%rip),%xmm1
  sub    $0x1,%ebx
  jne    L3
  movsd  D13(%rip),%xmm0
  add    $0x10,%rsp
  pop    %rbx
  minsd  %xmm1,%xmm0
  ret
```

tool_calls: name: unpack_data
arguments: tag: D0
type_guessed: f64
name: unpack_data
arguments: tag: D13
type_guessed: f32[2]

tool: D0: 10

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

assistant: ```c
double rand() {
  double rst = 0;
  int count = 4;
  while (count-- > 0) {
    rst = (rst + maxrand(10)) / 10.0;
  }
  return rst > 1 ? 1 : rst;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<rand>:
  endbr64
  push   %rbx
  pxor   %xmm1,%xmm1
  mov    $0x4,%ebx
  sub    $0x10,%rsp
L6:
  mov    $0xa,%edi
  movsd  %xmm1,0x8(%rsp)
  call   <maxrand@plt>
  movsd  0x8(%rsp),%xmm1
  addsd  %xmm0,%xmm1
  divsd  D0(%rip),%xmm1
  sub    $0x1,%ebx
  jne    L6
  movsd  D11(%rip),%xmm0
  add    $0x10,%rsp
  pop    %rbx
  minsd  %xmm1,%xmm0
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D0
data_type: f64
name: extract_symbolic_data
arguments: tag: D11
data_type: f32[2]

tool: D0: 10

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

assistant: ```c
double rand() {
  double rst = 0;
  int count = 4;
  while (count-- > 0) {
    rst = (rst + maxrand(10)) / 10.0;
  }
  return rst > 1 ? 1 : rst;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<norm_percent>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  ucomisd D117(%rip),%xmm0
  jp     L19
  movsd  -0x28(%rbp),%xmm0
  ucomisd D117(%rip),%xmm0
  jne    L19
  mov    D1(%rip),%rax
  jmp    L33
L19:
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  comisd D117(%rip),%xmm0
  jbe    L58
  movsd  D84(%rip),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
L58:
  movsd  -0x18(%rbp),%xmm1
  movsd  D79(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D84(%rip),%xmm0
  subsd  -0x18(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  movq   D64(%rip),%xmm0
  movq   %rax,%xmm2
  xorpd  %xmm0,%xmm2
  movapd %xmm2,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  D26(%rip),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x1,-0x1c(%rbp)
  jmp    L12
L75:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D26(%rip),%rax
  movsd  (%rdx,%rax,1),%xmm4
  movsd  %xmm4,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x1c(%rbp),%xmm0
  mov    -0x8(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  mulsd  -0x30(%rbp),%xmm0
  movsd  -0x10(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  addl   $0x1,-0x1c(%rbp)
L12:
  cmpl   $0xa,-0x1c(%rbp)
  jle    L75
  movsd  -0x28(%rbp),%xmm0
  comisd D117(%rip),%xmm0
  jbe    L8
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  movq   D64(%rip),%xmm0
  movq   %rax,%xmm3
  xorpd  %xmm0,%xmm3
  movq   %xmm3,%rax
  jmp    L33
L8:
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
L33:
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D117
type_guessed: f64[2]
name: extract_symbolic_data
arguments: label: D1
type_guessed: f64
name: extract_symbolic_data
arguments: label: D84
type_guessed: f64
name: extract_symbolic_data
arguments: label: D79
type_guessed: f64
name: extract_symbolic_data
arguments: label: D64
type_guessed: byte[8]

tool: {"D117": [0.5,0.0]}

tool: D1: 0

tool: D84: 1

tool: D79: 4

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

assistant: ```c
double norm_percent(const double alpha) {
  int i;
  double a, x, u;
  static double b[11] = {1.570796288, 0.03706987906, -0.8364353589e-3, -0.2250947176e-3, 0.6841218299e-5, 0.5824238515e-5, -0.104527497e-5, 0.8360937017e-7, -0.3231081277e-8, 0.3657763036e-10, 0.6936233982e-12};
  if (alpha == 0.5) {
    return 0.0;
  }
  a = alpha;
  if (a > 0.5) {
    a = 1.0 - a;
  }
  x = -log(4.0 * a * (1.0 - a));
  u = b[0];
  for (i = 1; i < 11; i++) {
    u += (b[i] * pow(x, (double)i));
  }
  if (alpha > 0.5) {
    return -sqrt(u * x);
  } else {
    return sqrt(u * x);
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<norm_percent>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  movq   %xmm0,%r13
  ucomisd D66(%rip),%xmm0
  jp     L41
  pxor   %xmm0,%xmm0
  je     L3
L41:
  movq   %r13,%xmm7
  movq   %r13,%xmm2
  comisd D66(%rip),%xmm7
  jbe    L31
  movsd  D48(%rip),%xmm2
  subsd  %xmm7,%xmm2
L31:
  movapd %xmm2,%xmm0
  mulsd  D73(%rip),%xmm0
  movsd  D48(%rip),%xmm1
  subsd  %xmm2,%xmm1
  mulsd  %xmm1,%xmm0
  call   <log@plt>
  xorpd  D61(%rip),%xmm0
  movsd  %xmm0,0x8(%rsp)
  mov    $0x1,%ebx
  movsd  D28(%rip),%xmm7
  movsd  %xmm7,(%rsp)
  lea    D45(%rip),%r12
L87:
  mov    (%r12,%rbx,8),%rbp
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebx,%xmm1
  movsd  0x8(%rsp),%xmm0
  call   <pow@plt>
  movq   %rbp,%xmm3
  mulsd  %xmm0,%xmm3
  movapd %xmm3,%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  add    $0x1,%rbx
  cmp    $0xb,%rbx
  jne    L87
  movq   %r13,%xmm6
  comisd D66(%rip),%xmm6
  jbe    L4
  movsd  0x8(%rsp),%xmm0
  mulsd  (%rsp),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L52
  sqrtsd %xmm0,%xmm0
L23:
  xorpd  D61(%rip),%xmm0
L3:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L52:
  call   <sqrt@plt>
  jmp    L23
L4:
  movsd  0x8(%rsp),%xmm0
  mulsd  (%rsp),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L18
  sqrtsd %xmm0,%xmm0
  jmp    L3
L18:
  call   <sqrt@plt>
  jmp    L3
```

tool_calls: name: extract_symbolic_data
arguments: tag: D66
type_infered: f64[2]
name: extract_symbolic_data
arguments: tag: D48
type_infered: f64
name: extract_symbolic_data
arguments: tag: D73
type_infered: f64
name: extract_symbolic_data
arguments: tag: D61
type_infered: f32[4]
name: extract_symbolic_data
arguments: tag: D28
type_infered: f64
name: extract_symbolic_data
arguments: tag: D45
type_infered: f64

tool: {"D66": [0.5,1.0]}

tool: D48: 1

tool: D73: 4

tool: {"D61": [0.0,-0.0,0.0,0.0]}

tool: D28: 1.570796288

tool: D45: 1.570796288

assistant: ```c
double norm_percent(const double alpha) {
  int i;
  double a, x, u;
  static double b[11] = {1.570796288, 0.03706987906, -0.8364353589e-3, -0.2250947176e-3, 0.6841218299e-5, 0.5824238515e-5, -0.104527497e-5, 0.8360937017e-7, -0.3231081277e-8, 0.3657763036e-10, 0.6936233982e-12};
  if (alpha == 0.5) {
    return 0.0;
  }
  a = alpha;
  if (a > 0.5) {
    a = 1.0 - a;
  }
  x = -log(4.0 * a * (1.0 - a));
  u = b[0];
  for (i = 1; i < 11; i++) {
    u += (b[i] * pow(x, (double)i));
  }
  if (alpha > 0.5) {
    return -sqrt(u * x);
  } else {
    return sqrt(u * x);
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<norm_percent>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  ucomisd D98(%rip),%xmm0
  movsd  %xmm0,0x18(%rsp)
  jp     L78
  je     L49
L78:
  movsd  0x18(%rsp),%xmm6
  comisd D98(%rip),%xmm6
  ja     L60
  movsd  0x18(%rsp),%xmm2
  movsd  D43(%rip),%xmm1
L73:
  subsd  %xmm2,%xmm1
  movsd  D25(%rip),%xmm0
  mov    $0x1,%ebx
  lea    D66(%rip),%rbp
  mulsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  call   <log@plt>
  movsd  D21(%rip),%xmm7
  xorpd  D29(%rip),%xmm0
  movsd  D34(%rip),%xmm2
  movsd  %xmm0,0x10(%rsp)
  movsd  %xmm7,0x8(%rsp)
  jmp    L79
  nopl   (%rax)
L15:
  movsd  0x0(%rbp,%rbx,8),%xmm4
  movsd  %xmm4,0x8(%rsp)
L79:
  pxor   %xmm1,%xmm1
  movsd  0x10(%rsp),%xmm0
  movsd  %xmm2,(%rsp)
  cvtsi2sd %ebx,%xmm1
  add    $0x1,%rbx
  call   <pow@plt>
  mulsd  0x8(%rsp),%xmm0
  movsd  (%rsp),%xmm2
  addsd  %xmm0,%xmm2
  cmp    $0xb,%rbx
  jne    L15
  movsd  0x18(%rsp),%xmm7
  movsd  0x10(%rsp),%xmm0
  pxor   %xmm1,%xmm1
  comisd D98(%rip),%xmm7
  mulsd  %xmm2,%xmm0
  jbe    L86
  ucomisd %xmm0,%xmm1
  ja     L32
  sqrtsd %xmm0,%xmm0
L93:
  xorpd  D29(%rip),%xmm0
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L60:
  movsd  D43(%rip),%xmm1
  movapd %xmm1,%xmm2
  subsd  %xmm6,%xmm2
  jmp    L73
  nopl   (%rax)
L49:
  add    $0x28,%rsp
  pxor   %xmm0,%xmm0
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L86:
  ucomisd %xmm0,%xmm1
  ja     L92
  add    $0x28,%rsp
  sqrtsd %xmm0,%xmm0
  pop    %rbx
  pop    %rbp
  ret
L32:
  call   <sqrt@plt>
  jmp    L93
L92:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  jmp    1080 <sqrt@plt>
```

tool_calls: name: parse_data
arguments: label: D98
data_type: f64[2]
name: parse_data
arguments: label: D43
data_type: f64
name: parse_data
arguments: label: D25
data_type: f64
name: parse_data
arguments: label: D66
data_type: f64
name: parse_data
arguments: label: D21
data_type: f64
name: parse_data
arguments: label: D29
data_type: f32[4]
name: parse_data
arguments: label: D34
data_type: f64

tool: {"D98": [0.5,1.0]}

tool: D43: 1

tool: D25: 4

tool: D66: 1.570796288

tool: D21: 0.03706987906

tool: {"D29": [0.0,-0.0,0.0,0.0]}

tool: D34: 1.570796288

assistant: ```c
double norm_percent(const double alpha) {
  int i;
  double a, x, u;
  static double b[11] = {1.570796288, 0.03706987906, -0.8364353589e-3, -0.2250947176e-3, 0.6841218299e-5, 0.5824238515e-5, -0.104527497e-5, 0.8360937017e-7, -0.3231081277e-8, 0.3657763036e-10, 0.6936233982e-12};
  if (alpha == 0.5) {
    return 0.0;
  }
  a = alpha;
  if (a > 0.5) {
    a = 1.0 - a;
  }
  x = -log(4.0 * a * (1.0 - a));
  u = b[0];
  for (i = 1; i < 11; i++) {
    u += (b[i] * pow(x, (double)i));
  }
  if (alpha > 0.5) {
    return -sqrt(u * x);
  } else {
    return sqrt(u * x);
  }
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<norm_percent>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  ucomisd D22(%rip),%xmm0
  movsd  %xmm0,0x18(%rsp)
  jp     L50
  je     L8
L50:
  movsd  0x18(%rsp),%xmm5
  comisd D22(%rip),%xmm5
  ja     L13
  movsd  D78(%rip),%xmm1
  movapd %xmm5,%xmm2
L1:
  subsd  %xmm2,%xmm1
  movsd  D91(%rip),%xmm0
  mov    $0x1,%ebx
  lea    D34(%rip),%rbp
  mulsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  call   <log@plt>
  xorpd  D44(%rip),%xmm0
  movsd  D31(%rip),%xmm2
  movsd  %xmm0,0x10(%rsp)
  nopl   0x0(%rax,%rax,1)
L87:
  pxor   %xmm1,%xmm1
  movsd  0x0(%rbp,%rbx,8),%xmm3
  movsd  0x10(%rsp),%xmm0
  movsd  %xmm2,0x8(%rsp)
  cvtsi2sd %ebx,%xmm1
  add    $0x1,%rbx
  movsd  %xmm3,(%rsp)
  call   <pow@plt>
  movsd  (%rsp),%xmm1
  movsd  0x8(%rsp),%xmm2
  mulsd  %xmm0,%xmm1
  addsd  %xmm1,%xmm2
  cmp    $0xb,%rbx
  jne    L87
  movsd  0x18(%rsp),%xmm6
  movsd  0x10(%rsp),%xmm0
  pxor   %xmm1,%xmm1
  comisd D22(%rip),%xmm6
  mulsd  %xmm2,%xmm0
  jbe    L32
  ucomisd %xmm0,%xmm1
  ja     L58
  sqrtsd %xmm0,%xmm0
L12:
  xorpd  D44(%rip),%xmm0
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L13:
  movsd  D78(%rip),%xmm1
  movapd %xmm1,%xmm2
  subsd  %xmm5,%xmm2
  jmp    L1
  nopl   (%rax)
L8:
  add    $0x28,%rsp
  pxor   %xmm0,%xmm0
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L32:
  ucomisd %xmm0,%xmm1
  ja     L77
  add    $0x28,%rsp
  sqrtsd %xmm0,%xmm0
  pop    %rbx
  pop    %rbp
  ret
L58:
  call   <sqrt@plt>
  jmp    L12
L77:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  jmp    1080 <sqrt@plt>
```

tool_calls: name: parse_data
arguments: label: D22
type_guessed: f64[2]
name: parse_data
arguments: label: D78
type_guessed: f64
name: parse_data
arguments: label: D91
type_guessed: f64
name: parse_data
arguments: label: D34
type_guessed: f64
name: parse_data
arguments: label: D44
type_guessed: f32[4]
name: parse_data
arguments: label: D31
type_guessed: f64

tool: {"D22": [0.5,1.0]}

tool: D78: 1

tool: D91: 4

tool: D34: 1.570796288

tool: {"D44": [0.0,-0.0,0.0,0.0]}

tool: D31: 1.570796288

assistant: ```c
double norm_percent(const double alpha) {
  int i;
  double a, x, u;
  static double b[11] = {1.570796288, 0.03706987906, -0.8364353589e-3, -0.2250947176e-3, 0.6841218299e-5, 0.5824238515e-5, -0.104527497e-5, 0.8360937017e-7, -0.3231081277e-8, 0.3657763036e-10, 0.6936233982e-12};
  if (alpha == 0.5) {
    return 0.0;
  }
  a = alpha;
  if (a > 0.5) {
    a = 1.0 - a;
  }
  x = -log(4.0 * a * (1.0 - a));
  u = b[0];
  for (i = 1; i < 11; i++) {
    u += (b[i] * pow(x, (double)i));
  }
  if (alpha > 0.5) {
    return -sqrt(u * x);
  } else {
    return sqrt(u * x);
  }
}
```