ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %rbx
  mov    $0x9,%edx
  mov    $0x12d687,%esi
  lea    D4(%rip),%rbx
  mov    %rbx,%rdi
  call   <printf@plt>
  mov    $0x4f,%edx
  mov    $0x1e240,%esi
  mov    %rbx,%rdi
  call   <printf@plt>
  mov    $0x2a7,%edx
  mov    $0x3039,%esi
  mov    %rbx,%rdi
  call   <printf@plt>
  mov    $0x162f,%edx
  mov    $0x4d2,%esi
  mov    %rbx,%rdi
  call   <printf@plt>
  mov    $0xb26f,%edx
  mov    $0x7b,%esi
  mov    %rbx,%rdi
  call   <printf@plt>
  mov    $0x5464f,%edx
  mov    $0xc,%esi
  mov    %rbx,%rdi
  call   <printf@plt>
  mov    $0x23cacf,%edx
  mov    $0x1,%esi
  mov    %rbx,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  pop    %rbx
  ret
```

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

tool: D4: %d8%d


assistant: ```c
int main() {
  int shuzi1 = 1234567, shuzi2 = 9, jishu = 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %rbp
  lea    D9(%rip),%rbp
  mov    $0x9,%edx
  mov    $0x12d687,%esi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0x4f,%edx
  mov    $0x1e240,%esi
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0x2a7,%edx
  mov    $0x3039,%esi
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0x162f,%edx
  mov    $0x4d2,%esi
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0xb26f,%edx
  mov    $0x7b,%esi
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0x5464f,%edx
  mov    $0xc,%esi
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0x23cacf,%edx
  mov    $0x1,%esi
  call   <printf@plt>
  xor    %eax,%eax
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D9
datatype: string

tool: D9: %d8%d


assistant: ```c
int main() {
  int shuzi1 = 1234567, shuzi2 = 9, jishu = 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  lea    D5(%rip),%rbp
  mov    $0x9,%edx
  mov    $0x12d687,%esi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0x4f,%edx
  mov    $0x1e240,%esi
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0x2a7,%edx
  mov    $0x3039,%esi
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0x162f,%edx
  mov    $0x4d2,%esi
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0xb26f,%edx
  mov    $0x7b,%esi
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0x5464f,%edx
  mov    $0xc,%esi
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0x23cacf,%edx
  mov    $0x1,%esi
  call   <printf@plt>
  xor    %eax,%eax
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D5
data_type: string

tool: D5: %d8%d


assistant: ```c
int main() {
  int shuzi1 = 1234567, shuzi2 = 9, jishu = 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  shuzi2 = shuzi1 % 10 * jishu + shuzi2;
  shuzi1 = shuzi1 / 10;
  jishu = jishu * 10;
  printf("%d8%d\n", shuzi1, shuzi2);
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<test_init>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  call   <OpenSSL_add_all_algorithms@plt>
  mov    $0x6f,%eax
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D4
type: string

tool: D4: OTP Test Engine Initializatzion!


assistant: ```c
int test_init(ENGINE *e) {
  printf("OTP Test Engine Initializatzion!\r\n");
  OpenSSL_add_all_algorithms();
  return 111;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<test_init>:
  endbr64
  sub    $0x8,%rsp
  lea    D4(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  call   <OpenSSL_add_all_algorithms@plt>
  mov    $0x6f,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: unpack_data
arguments: label: D4
data_type: string

tool: D4: OTP Test Engine Initializatzion!


assistant: ```c
int test_init(ENGINE *e) {
  printf("OTP Test Engine Initializatzion!\r\n");
  OpenSSL_add_all_algorithms();
  return 111;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<test_init>:
  endbr64
  sub    $0x8,%rsp
  lea    D6(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  call   <OpenSSL_add_all_algorithms@plt>
  mov    $0x6f,%eax
  add    $0x8,%rsp
  ret
```

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

tool: D6: OTP Test Engine Initializatzion!


assistant: ```c
int test_init(ENGINE *e) {
  printf("OTP Test Engine Initializatzion!\r\n");
  OpenSSL_add_all_algorithms();
  return 111;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<test_init>:
  endbr64
  sub    $0x8,%rsp
  lea    D5(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  call   <OpenSSL_add_all_algorithms@plt>
  mov    $0x6f,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D5
type: string

tool: D5: OTP Test Engine Initializatzion!


assistant: ```c
int test_init(ENGINE *e) {
  printf("OTP Test Engine Initializatzion!\r\n");
  OpenSSL_add_all_algorithms();
  return 111;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<fn1>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  and    -0x18(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  sub    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int fn1(int a, int b) {
  int tem1 = a + b;
  int tem2 = a & b;
  return tem1 - tem2;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<fn1>:
  endbr64
  mov    %edi,%eax
  or     %esi,%eax
  ret
```

assistant: ```c
int fn1(int a, int b) {
  int tem1 = a + b;
  int tem2 = a & b;
  return tem1 - tem2;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<fn1>:
  endbr64
  mov    %edi,%eax
  or     %esi,%eax
  ret
```

assistant: ```c
int fn1(int a, int b) {
  int tem1 = a + b;
  int tem2 = a & b;
  return tem1 - tem2;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<sem_trywait>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    D19(%rip),%rax
  mov    (%rax),%edx
  mov    D8(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  pop    %rbp
  ret
```

assistant: ```c
int sem_trywait() {
  ;
  errno = EAGAIN;
  return -1;
}
```
user: What is the c source code of the assembly code below:

```asm
<sem_trywait>:
  endbr64
  mov    D12(%rip),%rax
  mov    (%rax),%edx
  mov    D9(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int sem_trywait() {
  ;
  errno = EAGAIN;
  return -1;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<sem_trywait>:
  endbr64
  mov    D2(%rip),%rax
  mov    (%rax),%edx
  mov    D6(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int sem_trywait() {
  ;
  errno = EAGAIN;
  return -1;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<sem_trywait>:
  endbr64
  mov    D4(%rip),%rax
  mov    (%rax),%edx
  mov    D3(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int sem_trywait() {
  ;
  errno = EAGAIN;
  return -1;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<unique_insert>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  cmpl   $0x27ff,-0x1c(%rbp)
  jle    L51
  mov    $0xffffffff,%eax
  jmp    L83
L51:
  movl   $0x0,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L101
L66:
  mov    -0x10(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x20(%rbp)
  jne    L53
  mov    $0x0,%eax
  jmp    L83
L53:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x20(%rbp)
  jge    L96
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L101
L96:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x20(%rbp)
  jle    L101
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
L101:
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jle    L66
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L105
L19:
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  subl   $0x1,-0x8(%rbp)
L105:
  mov    -0x8(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jg     L19
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  mov    %eax,(%rdx)
  mov    $0x1,%eax
L83:
  pop    %rbp
  ret
```

assistant: ```c
int unique_insert(int data[], int n, int new_data) {
  if (n >= 10240)
    return -1;
  int start = 0, mid, end = n - 1, i;
  while (start <= end) {
    mid = (start + end) / 2;
    if (new_data == data[mid])
      return 0;
    else if (new_data < data[mid])
      end = mid - 1;
    else if (new_data > data[mid])
      start = mid + 1;
  }
  for (i = n; i > start; i--)
    data[i] = data[i - 1];
  data[i] = new_data;
  return 1;
}
```
user: Translate the below assembly code into C programming language:

```asm
<unique_insert>:
  endbr64
  mov    %rdi,%r8
  mov    %esi,%r9d
  mov    %edx,%esi
  mov    $0xffffffff,%eax
  cmp    $0x27ff,%r9d
  jg     L11
  mov    %r9d,%edi
  sub    $0x1,%edi
  js     L90
  mov    $0x0,%ecx
  jmp    L72
L92:
  add    $0x1,%eax
  cmp    %esi,%edx
  cmovl  %eax,%ecx
L62:
  cmp    %edi,%ecx
  jg     L75
L72:
  lea    (%rcx,%rdi,1),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  movslq %eax,%rdx
  mov    (%r8,%rdx,4),%edx
  cmp    %esi,%edx
  je     L27
  jle    L92
  lea    -0x1(%rax),%edi
  jmp    L62
L90:
  mov    $0x0,%ecx
L75:
  cmp    %ecx,%r9d
  jle    L0
  movslq %r9d,%rdx
  shl    $0x2,%rdx
  lea    (%r8,%rdx,1),%rax
  lea    -0x4(%r8,%rdx,1),%rdi
  sub    $0x1,%r9d
  sub    %ecx,%r9d
  lea    0x0(,%r9,4),%rdx
  sub    %rdx,%rdi
L12:
  mov    -0x4(%rax),%edx
  mov    %edx,(%rax)
  sub    $0x4,%rax
  cmp    %rdi,%rax
  jne    L12
L63:
  movslq %ecx,%rcx
  mov    %esi,(%r8,%rcx,4)
  mov    $0x1,%eax
  ret
L0:
  mov    %r9d,%ecx
  jmp    L63
L27:
  mov    $0x0,%eax
L11:
  ret
```

assistant: ```c
int unique_insert(int data[], int n, int new_data) {
  if (n >= 10240)
    return -1;
  int start = 0, mid, end = n - 1, i;
  while (start <= end) {
    mid = (start + end) / 2;
    if (new_data == data[mid])
      return 0;
    else if (new_data < data[mid])
      end = mid - 1;
    else if (new_data > data[mid])
      start = mid + 1;
  }
  for (i = n; i > start; i--)
    data[i] = data[i - 1];
  data[i] = new_data;
  return 1;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<unique_insert>:
  endbr64
  mov    $0xffffffff,%eax
  cmp    $0x27ff,%esi
  jg     L86
  push   %r12
  mov    %edx,%r12d
  mov    %esi,%edx
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x1,%edx
  jns    L41
  jmp    L0
  nopw   0x0(%rax,%rax,1)
L47:
  lea    -0x1(%rax),%edx
L4:
  cmp    %ebx,%edx
  jl     L0
L41:
  lea    (%rdx,%rbx,1),%eax
  sar    %eax
  movslq %eax,%rcx
  cmp    %r12d,0x0(%rbp,%rcx,4)
  je     L14
  jg     L47
  jge    L4
  lea    0x1(%rax),%ebx
  cmp    %ebx,%edx
  jge    L41
L0:
  cmp    %ebx,%esi
  jle    L28
  mov    %esi,%eax
  movslq %esi,%rsi
  sub    %ebx,%eax
  lea    -0x1(%rax),%ecx
  lea    0x0(,%rsi,4),%rax
  mov    %rcx,%rdx
  lea    0x4(,%rcx,4),%r8
  neg    %rdx
  shl    $0x2,%rdx
  lea    -0x4(%rax,%rdx,1),%rsi
  add    %rax,%rdx
  lea    0x0(%rbp,%rdx,1),%rdi
  add    %rbp,%rsi
  mov    %r8,%rdx
  call   <memmove@plt>
L3:
  movslq %ebx,%rbx
  mov    $0x1,%eax
  mov    %r12d,0x0(%rbp,%rbx,4)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L86:
  ret
  nopl   0x0(%rax)
L14:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
L28:
  mov    %esi,%ebx
  jmp    L3
```

assistant: ```c
int unique_insert(int data[], int n, int new_data) {
  if (n >= 10240)
    return -1;
  int start = 0, mid, end = n - 1, i;
  while (start <= end) {
    mid = (start + end) / 2;
    if (new_data == data[mid])
      return 0;
    else if (new_data < data[mid])
      end = mid - 1;
    else if (new_data > data[mid])
      start = mid + 1;
  }
  for (i = n; i > start; i--)
    data[i] = data[i - 1];
  data[i] = new_data;
  return 1;
}
```
user: Translate the below assembly code into C programming language:

```asm
<unique_insert>:
  endbr64
  mov    $0xffffffff,%eax
  cmp    $0x27ff,%esi
  jg     L30
  push   %r12
  mov    %edx,%r12d
  mov    %esi,%edx
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x1,%edx
  jns    L70
  jmp    L1
  nopw   0x0(%rax,%rax,1)
L64:
  lea    -0x1(%rax),%edx
L79:
  cmp    %ebx,%edx
  jl     L1
L70:
  lea    (%rdx,%rbx,1),%eax
  sar    %eax
  movslq %eax,%rcx
  cmp    %r12d,0x0(%rbp,%rcx,4)
  je     L37
  jg     L64
  jge    L79
  lea    0x1(%rax),%ebx
  cmp    %ebx,%edx
  jge    L70
L1:
  cmp    %ebx,%esi
  jle    L40
  mov    %esi,%eax
  movslq %esi,%rsi
  sub    %ebx,%eax
  lea    -0x1(%rax),%ecx
  lea    0x0(,%rsi,4),%rax
  mov    %rcx,%rdx
  lea    0x4(,%rcx,4),%r8
  neg    %rdx
  shl    $0x2,%rdx
  lea    -0x4(%rax,%rdx,1),%rsi
  add    %rax,%rdx
  lea    0x0(%rbp,%rdx,1),%rdi
  add    %rbp,%rsi
  mov    %r8,%rdx
  call   <memmove@plt>
L92:
  movslq %ebx,%rbx
  mov    $0x1,%eax
  mov    %r12d,0x0(%rbp,%rbx,4)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L30:
  ret
  nopl   0x0(%rax)
L37:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
L40:
  mov    %esi,%ebx
  jmp    L92
```

assistant: ```c
int unique_insert(int data[], int n, int new_data) {
  if (n >= 10240)
    return -1;
  int start = 0, mid, end = n - 1, i;
  while (start <= end) {
    mid = (start + end) / 2;
    if (new_data == data[mid])
      return 0;
    else if (new_data < data[mid])
      end = mid - 1;
    else if (new_data > data[mid])
      start = mid + 1;
  }
  for (i = n; i > start; i--)
    data[i] = data[i - 1];
  data[i] = new_data;
  return 1;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<t_lower>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  movsd  %xmm0,-0x28(%rbp)
  mov    %edi,-0x2c(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x2c(%rbp),%xmm1
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0x2c(%rbp),%xmm2
  movsd  -0x28(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm2
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  D47(%rip),%xmm0
  subsd  -0x8(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L33
  movsd  -0x10(%rbp),%xmm0
  movq   D45(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
L33:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x2c(%rbp),%eax
  cltd
  shr    $0x1f,%edx
  add    %edx,%eax
  and    $0x1,%eax
  sub    %edx,%eax
  add    $0x2,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L8
L19:
  movsd  -0x18(%rbp),%xmm0
  addsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  -0x8(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x1c(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  movsd  -0x10(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  addl   $0x2,-0x1c(%rbp)
L8:
  mov    -0x1c(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jle    L19
  mov    -0x2c(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L1
  movsd  -0x8(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm3
  mulsd  -0x18(%rbp),%xmm3
  movsd  %xmm3,-0x38(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movsd  -0x28(%rbp),%xmm1
  divsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <atan@plt>
  addsd  -0x38(%rbp),%xmm0
  movsd  D16(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D19(%rip),%xmm0
  addsd  %xmm1,%xmm0
  jmp    L39
L1:
  movsd  -0x18(%rbp),%xmm1
  movsd  D47(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  D7(%rip),%xmm1
  divsd  %xmm1,%xmm0
L39:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D47
datatype: byte[8]
name: disassemble_data
arguments: data_label: D45
datatype: byte[8]
name: disassemble_data
arguments: data_label: D16
datatype: f64
name: disassemble_data
arguments: data_label: D19
datatype: f64
name: disassemble_data
arguments: data_label: D7
datatype: byte[8]

tool: {"D47": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

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

tool: D16: 3.141592653589793

tool: D19: 0.5

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

assistant: ```c
double t_lower(const double t, const int df) {
  int i;
  double c2, p, s;
  c2 = df / (df + t * t);
  s = sqrt(1 - c2);
  if (t < 0) {
    s = -s;
  }
  p = 0;
  for (i = df % 2 + 2; i <= df; i += 2) {
    p += s;
    s *= (i - 1) * c2 / i;
  }
  if (df & 1) {
    return (0.5 + (p * sqrt(c2) + atan(t / sqrt(df))) / 3.14159265358979323846);
  } else {
    return ((1 + p) / 2);
  }
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<t_lower>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%ebx
  pxor   %xmm1,%xmm1
  cvtsi2sd %edi,%xmm1
  movsd  %xmm0,0x8(%rsp)
  mulsd  %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsp)
  movsd  D62(%rip),%xmm0
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%edi
  call   <sqrt@plt>
  pxor   %xmm1,%xmm1
  comisd 0x8(%rsp),%xmm1
  ja     L1
L51:
  mov    %ebx,%edx
  shr    $0x1f,%edx
  lea    (%rbx,%rdx,1),%eax
  and    $0x1,%eax
  sub    %edx,%eax
  add    $0x2,%eax
  cmp    %eax,%ebx
  jl     L66
  mov    D23(%rip),%rbp
L38:
  movq   %rbp,%xmm3
  addsd  %xmm0,%xmm3
  movq   %xmm3,%rbp
  lea    -0x1(%rax),%edx
  pxor   %xmm1,%xmm1
  cvtsi2sd %edx,%xmm1
  mulsd  (%rsp),%xmm1
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  divsd  %xmm2,%xmm1
  mulsd  %xmm1,%xmm0
  add    $0x2,%eax
  cmp    %eax,%ebx
  jge    L38
L63:
  test   $0x1,%bl
  jne    L37
  movq   %rbp,%xmm0
  addsd  D62(%rip),%xmm0
  mulsd  D49(%rip),%xmm0
L45:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  ret
L1:
  xorpd  D55(%rip),%xmm0
  jmp    L51
L66:
  mov    D23(%rip),%rbp
  jmp    L63
L37:
  cvttsd2si (%rsp),%edi
  call   <sqrt@plt>
  movq   %rbp,%xmm6
  mulsd  %xmm0,%xmm6
  movsd  %xmm6,(%rsp)
  mov    %ebx,%edi
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  call   <atan@plt>
  addsd  (%rsp),%xmm0
  divsd  D79(%rip),%xmm0
  addsd  D49(%rip),%xmm0
  jmp    L45
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D62
type_guessed: byte[8]
name: extract_symbolic_data
arguments: data_tag: D23
type_guessed: byte[8]
name: extract_symbolic_data
arguments: data_tag: D49
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D55
type_guessed: byte[16]
name: extract_symbolic_data
arguments: data_tag: D79
type_guessed: f64

tool: {"D62": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D23": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D49: 0.5

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

tool: D79: 3.141592653589793

assistant: ```c
double t_lower(const double t, const int df) {
  int i;
  double c2, p, s;
  c2 = df / (df + t * t);
  s = sqrt(1 - c2);
  if (t < 0) {
    s = -s;
  }
  p = 0;
  for (i = df % 2 + 2; i <= df; i += 2) {
    p += s;
    s *= (i - 1) * c2 / i;
  }
  if (df & 1) {
    return (0.5 + (p * sqrt(c2) + atan(t / sqrt(df))) / 3.14159265358979323846);
  } else {
    return ((1 + p) / 2);
  }
}
```