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

```asm
<CMS_digest_create>:
  endbr64
  push   %r13
  mov    %edx,%r13d
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  mov    %rsi,%rdi
  test   %rsi,%rsi
  je     L47
L39:
  call   <cms_DigestedData_create@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L60
  mov    D13(%rip),%rax
  mov    %r13d,%ecx
  and    (%rax),%ecx
  je     L49
L36:
  mov    D2(%rip),%rax
  mov    %r13d,%ecx
  and    (%rax),%ecx
  je     L32
L60:
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L32:
  xor    %edx,%edx
  mov    %r13d,%ecx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <CMS_final@plt>
  test   %rax,%rax
  jne    L60
  mov    %r12,%rdi
  xor    %r12d,%r12d
  call   <CMS_ContentInfo_free@plt>
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L49:
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <CMS_set_detached@plt>
  jmp    L36
  nopl   0x0(%rax)
L47:
  xor    %eax,%eax
  call   <EVP_sha1@plt>
  mov    %rax,%rdi
  jmp    L39
```

assistant: ```c
CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md, unsigned int flags) {
  CMS_ContentInfo *cms;
  if (!md)
    md = EVP_sha1();
  cms = cms_DigestedData_create(md);
  if (!cms)
    return NULL;
  if (!(flags & CMS_DETACHED))
    CMS_set_detached(cms, 0);
  if ((flags & CMS_STREAM) || CMS_final(cms, in, NULL, flags))
    return cms;
  CMS_ContentInfo_free(cms);
  return NULL;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<foo>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  call   <bar@plt>
  nop
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D4
datatype: string

tool: D4: foo


assistant: ```c
void foo(void) {
  printf("foo\n");
  bar();
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<foo>:
  endbr64
  sub    $0x8,%rsp
  lea    D2(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  call   <bar@plt>
  add    $0x8,%rsp
  ret
```

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

tool: D2: foo


assistant: ```c
void foo(void) {
  printf("foo\n");
  bar();
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<foo>:
  endbr64
  sub    $0x8,%rsp
  lea    D4(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1060 <bar@plt>
```

tool_calls: name: parse_data
arguments: label: D4
type_guessed: string

tool: D4: foo


assistant: ```c
void foo(void) {
  printf("foo\n");
  bar();
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<foo>:
  endbr64
  sub    $0x8,%rsp
  lea    D6(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1060 <bar@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D6
data_type: string

tool: D6: foo


assistant: ```c
void foo(void) {
  printf("foo\n");
  bar();
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<insert>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  mov    %edx,-0x10(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  pop    %rbp
  ret
```

assistant: ```c
int insert(int set[], int size, int value) {
  set[size] = value;
  return size + 1;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<insert>:
  endbr64
  movslq %esi,%rax
  mov    %edx,(%rdi,%rax,4)
  lea    0x1(%rsi),%eax
  ret
```

assistant: ```c
int insert(int set[], int size, int value) {
  set[size] = value;
  return size + 1;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<insert>:
  endbr64
  movslq %esi,%rax
  mov    %edx,(%rdi,%rax,4)
  lea    0x1(%rsi),%eax
  ret
```

assistant: ```c
int insert(int set[], int size, int value) {
  set[size] = value;
  return size + 1;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<insert>:
  endbr64
  movslq %esi,%rax
  mov    %edx,(%rdi,%rax,4)
  lea    0x1(%rsi),%eax
  ret
```

assistant: ```c
int insert(int set[], int size, int value) {
  set[size] = value;
  return size + 1;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<cli_terminate_string>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L33
L24:
  addl   $0x1,-0x4(%rbp)
L33:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L38
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  je     L38
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L38
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x4(%rbp)
  jl     L24
L38:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
char *cli_terminate_string(char *str, int maxlen) {
  int i = 0;
  while (str[i] != '\n' && str[i] != '\r' && str[i] != '\0' && i < maxlen - 1) {
    i++;
  }
  str[i] = '\0';
  return str;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<cli_terminate_string>:
  endbr64
  mov    %rdi,%rax
  movzbl (%rdi),%edx
  cmp    $0xd,%dl
  ja     L23
  mov    $0x2401,%ecx
  bt     %rdx,%rcx
  jb     L40
L23:
  cmp    $0x1,%esi
  jle    L15
  lea    0x1(%rax),%rdx
  lea    -0x2(%rsi),%ecx
  lea    0x2(%rax,%rcx,1),%r8
  mov    $0x2401,%edi
  jmp    L71
L14:
  add    $0x1,%rdx
  cmp    %rdx,%r8
  je     L63
L71:
  mov    %rdx,%rsi
  movzbl (%rdx),%ecx
  cmp    $0xd,%cl
  ja     L14
  bt     %rcx,%rdi
  jae    L14
L63:
  movb   $0x0,(%rsi)
  ret
L40:
  mov    %rdi,%rsi
  jmp    L63
L15:
  mov    %rax,%rsi
  jmp    L63
```

assistant: ```c
char *cli_terminate_string(char *str, int maxlen) {
  int i = 0;
  while (str[i] != '\n' && str[i] != '\r' && str[i] != '\0' && i < maxlen - 1) {
    i++;
  }
  str[i] = '\0';
  return str;
}
```
user: What is the c source code of the assembly code below?

```asm
<cli_terminate_string>:
  endbr64
  movzbl (%rdi),%edx
  mov    %rdi,%rax
  cmp    $0xd,%dl
  ja     L22
  mov    $0xffffffffffffdbfe,%rcx
  mov    %rdi,%r8
  bt     %rdx,%rcx
  jae    L61
L22:
  cmp    $0x1,%esi
  jle    L57
  lea    -0x2(%rsi),%ecx
  lea    0x1(%rax),%rdx
  mov    $0xffffffffffffdbfe,%rdi
  lea    0x2(%rax,%rcx,1),%rsi
  jmp    L29
  nopl   0x0(%rax)
L33:
  add    $0x1,%rdx
  cmp    %rdx,%rsi
  je     L61
L29:
  movzbl (%rdx),%ecx
  mov    %rdx,%r8
  cmp    $0xd,%cl
  ja     L33
  bt     %rcx,%rdi
  jb     L33
L61:
  movb   $0x0,(%r8)
  ret
L57:
  mov    %rax,%r8
  jmp    L61
```

assistant: ```c
char *cli_terminate_string(char *str, int maxlen) {
  int i = 0;
  while (str[i] != '\n' && str[i] != '\r' && str[i] != '\0' && i < maxlen - 1) {
    i++;
  }
  str[i] = '\0';
  return str;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<cli_terminate_string>:
  endbr64
  movzbl (%rdi),%edx
  mov    %rdi,%rax
  cmp    $0xd,%dl
  ja     L75
  mov    $0xffffffffffffdbfe,%rcx
  mov    %rdi,%r8
  bt     %rdx,%rcx
  jae    L76
L75:
  cmp    $0x1,%esi
  jle    L73
  lea    -0x2(%rsi),%ecx
  lea    0x1(%rax),%rdx
  mov    $0xffffffffffffdbfe,%rdi
  lea    0x2(%rax,%rcx,1),%rsi
  jmp    L44
  nopl   0x0(%rax)
L52:
  add    $0x1,%rdx
  cmp    %rdx,%rsi
  je     L76
L44:
  movzbl (%rdx),%ecx
  mov    %rdx,%r8
  cmp    $0xd,%cl
  ja     L52
  bt     %rcx,%rdi
  jb     L52
L76:
  movb   $0x0,(%r8)
  ret
L73:
  mov    %rax,%r8
  jmp    L76
```

assistant: ```c
char *cli_terminate_string(char *str, int maxlen) {
  int i = 0;
  while (str[i] != '\n' && str[i] != '\r' && str[i] != '\0' && i < maxlen - 1) {
    i++;
  }
  str[i] = '\0';
  return str;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<_tga_write_count_diff_pixels>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x8(%rbp)
  cmpq   $0x1,-0x38(%rbp)
  jne    L74
  mov    -0x38(%rbp),%rax
  jmp    L41
L74:
  mov    -0x2c(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <_tga_write_get_pixel@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L31
L19:
  mov    -0x2c(%rbp),%eax
  cltq
  add    %rax,-0x28(%rbp)
  mov    -0x2c(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <_tga_write_get_pixel@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  je     L28
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  addq   $0x1,-0x8(%rbp)
  subq   $0x1,-0x38(%rbp)
L31:
  cmpq   $0x1,-0x38(%rbp)
  jg     L19
  jmp    L57
L28:
  nop
L57:
  mov    -0x10(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jne    L1
  mov    -0x8(%rbp),%rax
  jmp    L41
L1:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
L41:
  leave
  ret
```

assistant: ```c
long _tga_write_count_diff_pixels(unsigned char *ucp_will_encode, int l_samples_per_pixel, long l_pixel_count) {
  unsigned long ul_pixel;
  unsigned long ul_next_pixel = 0;
  long l_count;
  l_count = 0;
  if ((long)1 == l_pixel_count)
    return l_pixel_count;
  ul_pixel = _tga_write_get_pixel(ucp_will_encode, l_samples_per_pixel);
  while ((long)1 < l_pixel_count) {
    ucp_will_encode += l_samples_per_pixel;
    ul_next_pixel = _tga_write_get_pixel(ucp_will_encode, l_samples_per_pixel);
    if (ul_next_pixel == ul_pixel)
      break;
    ul_pixel = ul_next_pixel;
    ++l_count;
    --l_pixel_count;
  }
  if (ul_next_pixel == ul_pixel)
    return l_count;
  return l_count + 1;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<_tga_write_count_diff_pixels>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdx,%rbp
  cmp    $0x1,%rdx
  je     L14
  mov    %rdi,%rbx
  mov    %esi,%r14d
  mov    %rdx,%r12
  call   <_tga_write_get_pixel@plt>
  cmp    $0x1,%rbp
  jle    L8
  sub    $0x1,%r12
  mov    $0x0,%ebp
  movslq %r14d,%r15
L1:
  add    %r15,%rbx
  mov    %rax,%r13
  mov    %r14d,%esi
  mov    %rbx,%rdi
  call   <_tga_write_get_pixel@plt>
  cmp    %r13,%rax
  je     L14
  add    $0x1,%rbp
  cmp    %rbp,%r12
  jne    L1
  mov    %r12,%rbp
  jmp    L14
L8:
  test   %rax,%rax
  setne  %bpl
  movzbl %bpl,%ebp
L14:
  mov    %rbp,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
long _tga_write_count_diff_pixels(unsigned char *ucp_will_encode, int l_samples_per_pixel, long l_pixel_count) {
  unsigned long ul_pixel;
  unsigned long ul_next_pixel = 0;
  long l_count;
  l_count = 0;
  if ((long)1 == l_pixel_count)
    return l_pixel_count;
  ul_pixel = _tga_write_get_pixel(ucp_will_encode, l_samples_per_pixel);
  while ((long)1 < l_pixel_count) {
    ucp_will_encode += l_samples_per_pixel;
    ul_next_pixel = _tga_write_get_pixel(ucp_will_encode, l_samples_per_pixel);
    if (ul_next_pixel == ul_pixel)
      break;
    ul_pixel = ul_next_pixel;
    ++l_count;
    --l_pixel_count;
  }
  if (ul_next_pixel == ul_pixel)
    return l_count;
  return l_count + 1;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<_tga_write_count_diff_pixels>:
  endbr64
  push   %r15
  mov    $0x1,%r15d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  cmp    $0x1,%rdx
  je     L57
  mov    %rdx,%rbp
  mov    %rdi,%r14
  mov    %esi,%r12d
  call   <_tga_write_get_pixel@plt>
  cmp    $0x1,%rbp
  jle    L43
  movslq %r12d,%r13
  sub    $0x1,%rbp
  xor    %r15d,%r15d
  jmp    L21
  xchg   %ax,%ax
L23:
  add    $0x1,%r15
  cmp    %r15,%rbp
  je     L57
L21:
  add    %r13,%r14
  mov    %r12d,%esi
  mov    %rax,%rbx
  mov    %r14,%rdi
  call   <_tga_write_get_pixel@plt>
  cmp    %rbx,%rax
  jne    L23
L57:
  add    $0x8,%rsp
  mov    %r15,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L43:
  xor    %r15d,%r15d
  test   %rax,%rax
  setne  %r15b
  jmp    L57
```

assistant: ```c
long _tga_write_count_diff_pixels(unsigned char *ucp_will_encode, int l_samples_per_pixel, long l_pixel_count) {
  unsigned long ul_pixel;
  unsigned long ul_next_pixel = 0;
  long l_count;
  l_count = 0;
  if ((long)1 == l_pixel_count)
    return l_pixel_count;
  ul_pixel = _tga_write_get_pixel(ucp_will_encode, l_samples_per_pixel);
  while ((long)1 < l_pixel_count) {
    ucp_will_encode += l_samples_per_pixel;
    ul_next_pixel = _tga_write_get_pixel(ucp_will_encode, l_samples_per_pixel);
    if (ul_next_pixel == ul_pixel)
      break;
    ul_pixel = ul_next_pixel;
    ++l_count;
    --l_pixel_count;
  }
  if (ul_next_pixel == ul_pixel)
    return l_count;
  return l_count + 1;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<_tga_write_count_diff_pixels>:
  endbr64
  push   %r15
  mov    $0x1,%r15d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  cmp    $0x1,%rdx
  je     L46
  mov    %rdx,%rbp
  mov    %rdi,%r14
  mov    %esi,%r12d
  call   <_tga_write_get_pixel@plt>
  cmp    $0x1,%rbp
  jle    L42
  movslq %r12d,%r13
  sub    $0x1,%rbp
  xor    %r15d,%r15d
  jmp    L22
  xchg   %ax,%ax
L11:
  add    $0x1,%r15
  cmp    %r15,%rbp
  je     L46
L22:
  add    %r13,%r14
  mov    %r12d,%esi
  mov    %rax,%rbx
  mov    %r14,%rdi
  call   <_tga_write_get_pixel@plt>
  cmp    %rbx,%rax
  jne    L11
L46:
  add    $0x8,%rsp
  mov    %r15,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L42:
  xor    %r15d,%r15d
  test   %rax,%rax
  setne  %r15b
  jmp    L46
```

assistant: ```c
long _tga_write_count_diff_pixels(unsigned char *ucp_will_encode, int l_samples_per_pixel, long l_pixel_count) {
  unsigned long ul_pixel;
  unsigned long ul_next_pixel = 0;
  long l_count;
  l_count = 0;
  if ((long)1 == l_pixel_count)
    return l_pixel_count;
  ul_pixel = _tga_write_get_pixel(ucp_will_encode, l_samples_per_pixel);
  while ((long)1 < l_pixel_count) {
    ucp_will_encode += l_samples_per_pixel;
    ul_next_pixel = _tga_write_get_pixel(ucp_will_encode, l_samples_per_pixel);
    if (ul_next_pixel == ul_pixel)
      break;
    ul_pixel = ul_next_pixel;
    ++l_count;
    --l_pixel_count;
  }
  if (ul_next_pixel == ul_pixel)
    return l_count;
  return l_count + 1;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<sqrtl>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  fldt   0x10(%rbp)
  fldz
  fcomip %st(1),%st
  fstp   %st(0)
  jbe    L101
  mov    $0xffffffff,%edi
  call   <sqrt@plt>
  mov    %rax,-0x48(%rbp)
  fildll -0x48(%rbp)
  jmp    L94
L101:
  fldt   0x10(%rbp)
  fadd   %st(0),%st
  fldt   0x10(%rbp)
  fucomip %st(1),%st
  jp     L80
  fldt   0x10(%rbp)
  fucomip %st(1),%st
  fstp   %st(0)
  je     L24
  jmp    L83
L80:
  fstp   %st(0)
L83:
  fldt   0x10(%rbp)
  fldt   0x10(%rbp)
  fucomip %st(1),%st
  fstp   %st(0)
  jnp    L108
L24:
  fldt   0x10(%rbp)
  jmp    L94
L108:
  lea    -0x34(%rbp),%rax
  push   0x18(%rbp)
  push   0x10(%rbp)
  mov    %rax,%rdi
  call   <frexpl@plt>
  add    $0x10,%rsp
  mov    -0x34(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  neg    %eax
  push   0x18(%rbp)
  push   0x10(%rbp)
  mov    %eax,%edi
  call   <ldexpl@plt>
  add    $0x10,%rsp
  fstpt  -0x30(%rbp)
L109:
  fldt   -0x30(%rbp)
  fstpt  -0x20(%rbp)
  fldt   0x10(%rbp)
  fldt   -0x30(%rbp)
  fdivrp %st,%st(1)
  fldt   -0x30(%rbp)
  faddp  %st,%st(1)
  fldt   0xdd0(%rip)        # 2000 <_fini+0xd8c>
  fmulp  %st,%st(1)
  fstpt  -0x30(%rbp)
  fldt   -0x20(%rbp)
  fldt   -0x30(%rbp)
  fsubrp %st,%st(1)
  fstpt  -0x20(%rbp)
  fldt   -0x20(%rbp)
  fldz
  fucomip %st(1),%st
  fstp   %st(0)
  jp     L109
  fldt   -0x20(%rbp)
  fldz
  fucomip %st(1),%st
  fstp   %st(0)
  je     L72
  jmp    L109
L72:
  fldt   -0x30(%rbp)
L94:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L63
  fstp   %st(0)
  call   <__stack_chk_fail@plt>
L63:
  leave
  ret
```

assistant: ```c
long double sqrtl(long double x) {
  long double delta, y;
  int exponent;
  if (x < 0.0L)
    return (long double)sqrt(-1);
  if (x + x == x || x != x)
    return x;
  frexpl(x, &exponent);
  y = ldexpl(x, -exponent / 2);
  do {
    delta = y;
    y = (y + x / y) * 0.5L;
    delta -= y;
  } while (delta != 0.0L);
  return y;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<sqrtl>:
  endbr64
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  fldt   0x30(%rsp)
  fldz
  fcomip %st(1),%st
  fstp   %st(0)
  ja     L94
  fldt   0x30(%rsp)
  fld    %st(0)
  fadd   %st(0),%st
  fucomip %st(1),%st
  setnp  %al
  mov    $0x0,%edx
  cmovne %edx,%eax
  test   %al,%al
  jne    L59
  fucomi %st(0),%st
  jnp    L27
  fstp   %st(0)
  jmp    L0
L59:
  fstp   %st(0)
L0:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L35
  fldt   0x30(%rsp)
  add    $0x28,%rsp
  ret
L94:
  mov    $0xffffffff,%edi
  call   <sqrt@plt>
  mov    %rax,0x8(%rsp)
  fildll 0x8(%rsp)
  fstpt  0x30(%rsp)
  jmp    L0
L27:
  lea    0x14(%rsp),%rdi
  lea    -0x10(%rsp),%rsp
  fstpt  (%rsp)
  call   <frexpl@plt>
  mov    0x24(%rsp),%eax
  mov    %eax,%edi
  shr    $0x1f,%edi
  add    %eax,%edi
  sar    %edi
  neg    %edi
  push   0x48(%rsp)
  push   0x48(%rsp)
  call   <ldexpl@plt>
  add    $0x20,%rsp
  flds   0xdd2(%rip)        # 2000 <_fini+0xd9c>
  fldz
  fld    %st(0)
  jmp    L71
L64:
  fstp   %st(4)
L71:
  fldt   0x30(%rsp)
  fdiv   %st(4),%st
  fadd   %st(4),%st
  fmul   %st(3),%st
  fsubr  %st,%st(4)
  fld    %st(2)
  fucomip %st(5),%st
  jp     L64
  fld    %st(1)
  fucomip %st(5),%st
  fstp   %st(4)
  jne    L71
  fstp   %st(0)
  fstp   %st(0)
  fstp   %st(0)
  fstpt  0x30(%rsp)
  jmp    L0
L35:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
long double sqrtl(long double x) {
  long double delta, y;
  int exponent;
  if (x < 0.0L)
    return (long double)sqrt(-1);
  if (x + x == x || x != x)
    return x;
  frexpl(x, &exponent);
  y = ldexpl(x, -exponent / 2);
  do {
    delta = y;
    y = (y + x / y) * 0.5L;
    delta -= y;
  } while (delta != 0.0L);
  return y;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<sqrtl>:
  endbr64
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  fldt   0x30(%rsp)
  fldz
  fcomip %st(1),%st
  ja     L38
  fld    %st(0)
  mov    $0x0,%edx
  fadd   %st(1),%st
  fucomip %st(1),%st
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  jne    L40
  fucomi %st(0),%st
  jp     L40
  lea    0x14(%rsp),%rdi
  sub    $0x10,%rsp
  fld    %st(0)
  fstpt  (%rsp)
  fstpt  0x40(%rsp)
  call   <frexpl@plt>
  fldt   0x40(%rsp)
  mov    0x24(%rsp),%eax
  sub    $0x10,%rsp
  mov    %eax,%edi
  fld    %st(0)
  fstpt  (%rsp)
  shr    $0x1f,%edi
  add    %eax,%edi
  sar    %edi
  fstpt  0x50(%rsp)
  neg    %edi
  call   <ldexpl@plt>
  add    $0x20,%rsp
  flds   0xdfb(%rip)        # 2000 <_fini+0xda0>
  fldt   0x30(%rsp)
  nopl   0x0(%rax)
L15:
  fld    %st(0)
  fdiv   %st(3),%st
  fadd   %st(3),%st
  fmul   %st(2),%st
  fsubr  %st,%st(3)
  fldz
  fxch   %st(4)
  fucomip %st(4),%st
  fstp   %st(3)
  jp     L15
  jne    L15
  fstp   %st(0)
  fstp   %st(0)
L40:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L41
  add    $0x28,%rsp
  ret
  nop
L38:
  fstp   %st(0)
  mov    $0xffffffff,%edi
  call   <sqrt@plt>
  mov    %rax,0x8(%rsp)
  fildll 0x8(%rsp)
  jmp    L40
L41:
  fstp   %st(0)
  call   <__stack_chk_fail@plt>
```

assistant: ```c
long double sqrtl(long double x) {
  long double delta, y;
  int exponent;
  if (x < 0.0L)
    return (long double)sqrt(-1);
  if (x + x == x || x != x)
    return x;
  frexpl(x, &exponent);
  y = ldexpl(x, -exponent / 2);
  do {
    delta = y;
    y = (y + x / y) * 0.5L;
    delta -= y;
  } while (delta != 0.0L);
  return y;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<sqrtl>:
  endbr64
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  fldt   0x30(%rsp)
  fldz
  fcomip %st(1),%st
  ja     L23
  fld    %st(0)
  mov    $0x0,%edx
  fadd   %st(1),%st
  fucomip %st(1),%st
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  jne    L60
  fucomi %st(0),%st
  jp     L60
  lea    0x14(%rsp),%rdi
  sub    $0x10,%rsp
  fld    %st(0)
  fstpt  (%rsp)
  fstpt  0x40(%rsp)
  call   <frexpl@plt>
  fldt   0x40(%rsp)
  mov    0x24(%rsp),%eax
  sub    $0x10,%rsp
  mov    %eax,%edi
  fld    %st(0)
  fstpt  (%rsp)
  shr    $0x1f,%edi
  add    %eax,%edi
  sar    %edi
  fstpt  0x50(%rsp)
  neg    %edi
  call   <ldexpl@plt>
  add    $0x20,%rsp
  flds   0xdfb(%rip)        # 2000 <_fini+0xda0>
  fldt   0x30(%rsp)
  nopl   0x0(%rax)
L65:
  fld    %st(0)
  fdiv   %st(3),%st
  fadd   %st(3),%st
  fmul   %st(2),%st
  fsubr  %st,%st(3)
  fldz
  fxch   %st(4)
  fucomip %st(4),%st
  fstp   %st(3)
  jp     L65
  jne    L65
  fstp   %st(0)
  fstp   %st(0)
L60:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  add    $0x28,%rsp
  ret
  nop
L23:
  fstp   %st(0)
  mov    $0xffffffff,%edi
  call   <sqrt@plt>
  mov    %rax,0x8(%rsp)
  fildll 0x8(%rsp)
  jmp    L60
L15:
  fstp   %st(0)
  call   <__stack_chk_fail@plt>
```

assistant: ```c
long double sqrtl(long double x) {
  long double delta, y;
  int exponent;
  if (x < 0.0L)
    return (long double)sqrt(-1);
  if (x + x == x || x != x)
    return x;
  frexpl(x, &exponent);
  y = ldexpl(x, -exponent / 2);
  do {
    delta = y;
    y = (y + x / y) * 0.5L;
    delta -= y;
  } while (delta != 0.0L);
  return y;
}
```