ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 这段汇编代码用C语言表示是什么样的？

```asm
<gsm_hex2int>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %esi,%esi
  jle    L9
  mov    %rdi,%rbp
  lea    -0x1(%rsi),%ebx
  mov    $0x0,%r12d
  mov    $0x0,%r13d
  jmp    L0
L51:
  lea    -0x41(%rax),%edx
  cmp    $0x5,%dl
  ja     L23
  movsbl %al,%eax
  lea    -0x37(%rax),%r14d
L49:
  mov    %ebx,%esi
  mov    $0x10,%edi
  call   <pow@plt>
  mov    %rax,%rdx
  movslq %r14d,%rax
  imul   %rdx,%rax
  add    %rax,%r12
  add    $0x1,%rbp
  sub    $0x1,%ebx
  cmp    $0xffffffff,%ebx
  je     L34
L0:
  movzbl 0x0(%rbp),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  ja     L51
  movsbl %al,%eax
  lea    -0x30(%rax),%r14d
  jmp    L49
L23:
  lea    -0x61(%rax),%edx
  movsbl %al,%eax
  sub    $0x57,%eax
  cmp    $0x6,%dl
  cmovae %r13d,%eax
  mov    %eax,%r14d
  jmp    L49
L9:
  mov    $0x0,%r12d
L34:
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
unsigned long gsm_hex2int(const char *hex, int len) {
  int i, j;
  unsigned long res = 0;
  for (i = 0; i < len; i++) {
    j = 0;
    if ((hex[i] >= 48) && (hex[i] <= 57)) {
      j = hex[i] - 48;
    } else if ((hex[i] >= 65) && (hex[i] <= 70)) {
      j = hex[i] - 55;
    } else if ((hex[i] >= 97) && (hex[i] <= 102)) {
      j = hex[i] - 87;
    }
    res += j * (unsigned long)pow(16, len - i - 1);
  }
  return res;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<gsm_hex2int>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %esi,%esi
  jle    L14
  mov    %rdi,%r14
  lea    -0x1(%rsi),%ebp
  xor    %r12d,%r12d
  xor    %ebx,%ebx
  jmp    L5
  nopl   (%rax)
L48:
  sub    $0x37,%edx
  movsbq %dl,%r13
L15:
  mov    %ebp,%esi
  mov    $0x10,%edi
  add    $0x1,%r14
  call   <pow@plt>
  imul   %r13,%rax
  add    %rax,%r12
  sub    $0x1,%ebp
  jb     L44
L5:
  movzbl (%r14),%edx
  lea    -0x30(%rdx),%eax
  movsbq %al,%r13
  cmp    $0x9,%al
  jbe    L15
  lea    -0x41(%rdx),%eax
  cmp    $0x5,%al
  jbe    L48
  lea    -0x61(%rdx),%ecx
  sub    $0x57,%edx
  movsbq %dl,%rax
  cmp    $0x6,%cl
  cmovae %rbx,%rax
  mov    %rax,%r13
  jmp    L15
  nop
L14:
  xor    %r12d,%r12d
L44:
  pop    %rbx
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
unsigned long gsm_hex2int(const char *hex, int len) {
  int i, j;
  unsigned long res = 0;
  for (i = 0; i < len; i++) {
    j = 0;
    if ((hex[i] >= 48) && (hex[i] <= 57)) {
      j = hex[i] - 48;
    } else if ((hex[i] >= 65) && (hex[i] <= 70)) {
      j = hex[i] - 55;
    } else if ((hex[i] >= 97) && (hex[i] <= 102)) {
      j = hex[i] - 87;
    }
    res += j * (unsigned long)pow(16, len - i - 1);
  }
  return res;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<gsm_hex2int>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %esi,%esi
  jle    L58
  mov    %rdi,%r14
  lea    -0x1(%rsi),%ebp
  xor    %r12d,%r12d
  xor    %ebx,%ebx
  jmp    L20
  nopl   (%rax)
L43:
  sub    $0x37,%edx
  movsbq %dl,%r13
L1:
  mov    %ebp,%esi
  mov    $0x10,%edi
  add    $0x1,%r14
  call   <pow@plt>
  imul   %r13,%rax
  add    %rax,%r12
  sub    $0x1,%ebp
  jb     L24
L20:
  movzbl (%r14),%edx
  lea    -0x30(%rdx),%eax
  movsbq %al,%r13
  cmp    $0x9,%al
  jbe    L1
  lea    -0x41(%rdx),%eax
  cmp    $0x5,%al
  jbe    L43
  lea    -0x61(%rdx),%ecx
  sub    $0x57,%edx
  movsbq %dl,%rax
  cmp    $0x6,%cl
  cmovae %rbx,%rax
  mov    %rax,%r13
  jmp    L1
  nop
L58:
  xor    %r12d,%r12d
L24:
  pop    %rbx
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
unsigned long gsm_hex2int(const char *hex, int len) {
  int i, j;
  unsigned long res = 0;
  for (i = 0; i < len; i++) {
    j = 0;
    if ((hex[i] >= 48) && (hex[i] <= 57)) {
      j = hex[i] - 48;
    } else if ((hex[i] >= 65) && (hex[i] <= 70)) {
      j = hex[i] - 55;
    } else if ((hex[i] >= 97) && (hex[i] <= 102)) {
      j = hex[i] - 87;
    }
    res += j * (unsigned long)pow(16, len - i - 1);
  }
  return res;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<quaddobl_monodromy_permutation>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,-0x54(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x54(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L26:
  cmp    %rdx,%rsp
  je     L25
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L26
L25:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L32
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L32:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x30(%rbp),%rcx
  mov    -0x40(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    $0x0,%r8d
  mov    %rax,%rsi
  mov    $0x2a0,%edi
  call   <_ada_use_c2phc4c@plt>
  mov    %eax,-0x4c(%rbp)
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  mov    -0x30(%rbp),%rcx
  mov    -0x40(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    $0x0,%r8d
  mov    %rax,%rsi
  mov    $0x2a1,%edi
  call   <_ada_use_c2phc4c@plt>
  mov    %eax,-0x4c(%rbp)
  mov    -0x30(%rbp),%rcx
  mov    -0x28(%rbp),%rdx
  mov    -0x60(%rbp),%rax
  mov    $0x0,%r8d
  mov    %rax,%rsi
  mov    $0x2a3,%edi
  call   <_ada_use_c2phc4c@plt>
  mov    %eax,-0x4c(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %rbx,%rsp
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L22
  call   <__stack_chk_fail@plt>
L22:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int quaddobl_monodromy_permutation(int d, int *done) {
  int *a, *b, fail, i;
  int permutation[d];
  int nf[2];
  double *c;
  fail = _ada_use_c2phc4c(672, a, permutation, c, 0);
  if (0 > 0) {
    printf("the permutation :");
    for (i = 0; i < d; i++)
      printf(" %d", permutation[i]);
  }
  nf[0] = d;
  nf[1] = 0;
  fail = _ada_use_c2phc4c(673, nf, permutation, c, 0);
  if (0 > 0)
    printf(" : %d -> %d\n", nf[0], nf[1]);
  fail = _ada_use_c2phc4c(675, done, b, c, 0);
  return fail;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<quaddobl_monodromy_permutation>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x10,%rsp
  mov    %edi,%ebx
  mov    %rsi,%r12
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  movslq %edi,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L33:
  cmp    %rdx,%rsp
  je     L12
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L33
L12:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L31
  orq    $0x0,-0x8(%rsp,%rax,1)
L31:
  mov    %rsp,%r14
  mov    $0x0,%r8d
  mov    $0x0,%r13d
  mov    %r13,%rcx
  mov    %r14,%rdx
  mov    $0x0,%esi
  mov    $0x2a0,%edi
  call   <_ada_use_c2phc4c@plt>
  mov    %ebx,-0x30(%rbp)
  movl   $0x0,-0x2c(%rbp)
  lea    -0x30(%rbp),%rsi
  mov    $0x0,%r8d
  mov    %r13,%rcx
  mov    %r14,%rdx
  mov    $0x2a1,%edi
  call   <_ada_use_c2phc4c@plt>
  mov    $0x0,%r8d
  mov    %r13,%rcx
  mov    $0x0,%edx
  mov    %r12,%rsi
  mov    $0x2a3,%edi
  call   <_ada_use_c2phc4c@plt>
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L35
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
L35:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int quaddobl_monodromy_permutation(int d, int *done) {
  int *a, *b, fail, i;
  int permutation[d];
  int nf[2];
  double *c;
  fail = _ada_use_c2phc4c(672, a, permutation, c, 0);
  if (0 > 0) {
    printf("the permutation :");
    for (i = 0; i < d; i++)
      printf(" %d", permutation[i]);
  }
  nf[0] = d;
  nf[1] = 0;
  fail = _ada_use_c2phc4c(673, nf, permutation, c, 0);
  if (0 > 0)
    printf(" : %d -> %d\n", nf[0], nf[1]);
  fail = _ada_use_c2phc4c(675, done, b, c, 0);
  return fail;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<quaddobl_monodromy_permutation>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbx
  mov    %edi,%ebx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  movslq %edi,%rax
  mov    %rsp,%rcx
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L26
L43:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L43
L26:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L35
L27:
  xor    %r13d,%r13d
  mov    %rsp,%r14
  xor    %r8d,%r8d
  xor    %esi,%esi
  mov    %r13,%rcx
  mov    %r14,%rdx
  mov    $0x2a0,%edi
  call   <_ada_use_c2phc4c@plt>
  xor    %r8d,%r8d
  lea    -0x30(%rbp),%rsi
  mov    %r13,%rcx
  mov    %r14,%rdx
  mov    $0x2a1,%edi
  mov    %ebx,-0x30(%rbp)
  movl   $0x0,-0x2c(%rbp)
  call   <_ada_use_c2phc4c@plt>
  xor    %r8d,%r8d
  xor    %edx,%edx
  mov    %r13,%rcx
  mov    %r12,%rsi
  mov    $0x2a3,%edi
  call   <_ada_use_c2phc4c@plt>
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L19
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L35:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L27
L19:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int quaddobl_monodromy_permutation(int d, int *done) {
  int *a, *b, fail, i;
  int permutation[d];
  int nf[2];
  double *c;
  fail = _ada_use_c2phc4c(672, a, permutation, c, 0);
  if (0 > 0) {
    printf("the permutation :");
    for (i = 0; i < d; i++)
      printf(" %d", permutation[i]);
  }
  nf[0] = d;
  nf[1] = 0;
  fail = _ada_use_c2phc4c(673, nf, permutation, c, 0);
  if (0 > 0)
    printf(" : %d -> %d\n", nf[0], nf[1]);
  fail = _ada_use_c2phc4c(675, done, b, c, 0);
  return fail;
}
```
user: What is the c source code of the assembly code below:

```asm
<quaddobl_monodromy_permutation>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbx
  mov    %edi,%ebx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  movslq %edi,%rax
  mov    %rsp,%rcx
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L0
L35:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L35
L0:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L28
L34:
  xor    %r13d,%r13d
  mov    %rsp,%r14
  xor    %r8d,%r8d
  xor    %esi,%esi
  mov    %r13,%rcx
  mov    %r14,%rdx
  mov    $0x2a0,%edi
  call   <_ada_use_c2phc4c@plt>
  xor    %r8d,%r8d
  lea    -0x30(%rbp),%rsi
  mov    %r13,%rcx
  mov    %r14,%rdx
  mov    $0x2a1,%edi
  mov    %ebx,-0x30(%rbp)
  movl   $0x0,-0x2c(%rbp)
  call   <_ada_use_c2phc4c@plt>
  xor    %r8d,%r8d
  xor    %edx,%edx
  mov    %r13,%rcx
  mov    %r12,%rsi
  mov    $0x2a3,%edi
  call   <_ada_use_c2phc4c@plt>
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L43
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L28:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L34
L43:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int quaddobl_monodromy_permutation(int d, int *done) {
  int *a, *b, fail, i;
  int permutation[d];
  int nf[2];
  double *c;
  fail = _ada_use_c2phc4c(672, a, permutation, c, 0);
  if (0 > 0) {
    printf("the permutation :");
    for (i = 0; i < d; i++)
      printf(" %d", permutation[i]);
  }
  nf[0] = d;
  nf[1] = 0;
  fail = _ada_use_c2phc4c(673, nf, permutation, c, 0);
  if (0 > 0)
    printf(" : %d -> %d\n", nf[0], nf[1]);
  fail = _ada_use_c2phc4c(675, done, b, c, 0);
  return fail;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<dt2tai>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x2,%eax
  call   <dt2jd@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <utdt@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x2,%eax
  call   <dt2ts@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  addsd  -0x10(%rbp),%xmm0
  movsd  D5(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x30(%rbp),%rcx
  mov    -0x28(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <ts2dt@plt>
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D5
type_infered: f64

tool: D5: 32.184

assistant: ```c
void dt2tai(date, time) double *date;
double *time;
{
  double dj, dt, tsec;
  dj = dt2jd(*date, *time);
  dt = utdt(dj);
  tsec = dt2ts(*date, *time);
  tsec = tsec + dt - 32.184;
  ts2dt(tsec, date, time);
  return;
}
```
user: What is the c source code of the assembly code below?

```asm
<dt2tai>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  movsd  (%rsi),%xmm1
  movsd  (%rdi),%xmm0
  mov    $0x2,%eax
  call   <dt2jd@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    $0x1,%eax
  call   <utdt@plt>
  mov    %eax,%r12d
  movsd  0x0(%rbp),%xmm1
  movsd  (%rbx),%xmm0
  mov    $0x2,%eax
  call   <dt2ts@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %r12d,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  addsd  %xmm1,%xmm0
  subsd  D5(%rip),%xmm0
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <ts2dt@plt>
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D5
type_guessed: f64

tool: D5: 32.184

assistant: ```c
void dt2tai(date, time) double *date;
double *time;
{
  double dj, dt, tsec;
  dj = dt2jd(*date, *time);
  dt = utdt(dj);
  tsec = dt2ts(*date, *time);
  tsec = tsec + dt - 32.184;
  ts2dt(tsec, date, time);
  return;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<dt2tai>:
  endbr64
  push   %r12
  mov    $0x2,%eax
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  movsd  (%rsi),%xmm1
  movsd  (%rdi),%xmm0
  call   <dt2jd@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    $0x1,%eax
  call   <utdt@plt>
  movsd  (%r12),%xmm1
  movsd  0x0(%rbp),%xmm0
  mov    %eax,%ebx
  mov    $0x2,%eax
  call   <dt2ts@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  mov    %r12,%rsi
  cvtsi2sd %ebx,%xmm0
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  cvtsi2sd %eax,%xmm1
  pop    %r12
  mov    $0x1,%eax
  addsd  %xmm1,%xmm0
  subsd  D8(%rip),%xmm0
  jmp    1080 <ts2dt@plt>
```

tool_calls: name: parse_data
arguments: label: D8
type: f64

tool: D8: 32.184

assistant: ```c
void dt2tai(date, time) double *date;
double *time;
{
  double dj, dt, tsec;
  dj = dt2jd(*date, *time);
  dt = utdt(dj);
  tsec = dt2ts(*date, *time);
  tsec = tsec + dt - 32.184;
  ts2dt(tsec, date, time);
  return;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<dt2tai>:
  endbr64
  push   %r12
  mov    $0x2,%eax
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  movsd  (%rsi),%xmm1
  movsd  (%rdi),%xmm0
  call   <dt2jd@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    $0x1,%eax
  call   <utdt@plt>
  movsd  (%r12),%xmm1
  movsd  0x0(%rbp),%xmm0
  mov    %eax,%ebx
  mov    $0x2,%eax
  call   <dt2ts@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  mov    %r12,%rsi
  cvtsi2sd %ebx,%xmm0
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  cvtsi2sd %eax,%xmm1
  pop    %r12
  mov    $0x1,%eax
  addsd  %xmm1,%xmm0
  subsd  D1(%rip),%xmm0
  jmp    1080 <ts2dt@plt>
```

tool_calls: name: read_data
arguments: tag: D1
type_guessed: f64

tool: D1: 32.184

assistant: ```c
void dt2tai(date, time) double *date;
double *time;
{
  double dj, dt, tsec;
  dj = dt2jd(*date, *time);
  dt = utdt(dj);
  tsec = dt2ts(*date, *time);
  tsec = tsec + dt - 32.184;
  ts2dt(tsec, date, time);
  return;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<skip_to_next_directive>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movl   $0x0,-0x8(%rbp)
L133:
  mov    $0x0,%eax
  call   <input@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  je     L114
  cmpl   $0xa,-0x4(%rbp)
  jne    L59
  movl   $0x0,-0x8(%rbp)
  mov    $0x0,%eax
  call   <input@plt>
  mov    %eax,-0x4(%rbp)
L59:
  cmpl   $0x2f,-0x4(%rbp)
  jne    L9
  mov    $0x0,%eax
  call   <input@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x2a,-0x4(%rbp)
  jne    L9
  mov    $0x0,%eax
  call   <skip_comment@plt>
  test   %rax,%rax
  jne    L106
  mov    $0x0,%eax
  jmp    L19
L106:
  mov    $0x0,%eax
  call   <input@plt>
  mov    %eax,-0x4(%rbp)
L9:
  cmpl   $0x5c,-0x4(%rbp)
  jne    L7
  mov    $0x0,%eax
  call   <input@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0xd,-0x4(%rbp)
  jne    L169
  mov    $0x0,%eax
  call   <input@plt>
  mov    %eax,-0x4(%rbp)
L169:
  cmpl   $0xa,-0x4(%rbp)
  jne    L7
  mov    $0x0,%eax
  call   <input@plt>
  mov    %eax,-0x4(%rbp)
  jmp    L7
L54:
  mov    $0x0,%eax
  call   <input@plt>
  mov    %eax,-0x4(%rbp)
L7:
  cmpl   $0x20,-0x4(%rbp)
  je     L54
  cmpl   $0x9,-0x4(%rbp)
  je     L54
  cmpl   $0x0,-0x8(%rbp)
  jne    L111
  cmpl   $0x23,-0x4(%rbp)
  je     L70
L111:
  cmpl   $0x0,-0x4(%rbp)
  jne    L133
  jmp    L126
L114:
  nop
  jmp    L126
L70:
  nop
L126:
  mov    -0x4(%rbp),%eax
L19:
  leave
  ret
```

assistant: ```c
int skip_to_next_directive() {
  int state = 0;
  int c;
  do {
    c = input();
    if (c == 0) {
      break;
    }
    if (c == '\n') {
      state = 0;
      c = input();
    }
    if (c == '/') {
      if ((c = input()) == '*') {
        if (skip_comment() == 0) {
          return 0;
        }
        c = input();
      }
    }
    if (c == '\\') {
      if ((c = input()) == '\r') {
        c = input();
      }
      if (c == '\n') {
        c = input();
      }
    }
    while (c == ' ' || c == '\t') {
      c = input();
    }
    if (state == 0 && c == '#') {
      break;
    }
  } while (c != 0);
  return c;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<skip_to_next_directive>:
  endbr64
  sub    $0x8,%rsp
  jmp    L59
L119:
  mov    $0x0,%eax
  call   <input@plt>
  jmp    L60
L185:
  mov    $0x0,%eax
  call   <input@plt>
  cmp    $0x2a,%eax
  jne    L78
  mov    $0x0,%eax
  call   <skip_comment@plt>
  test   %rax,%rax
  je     L88
  mov    $0x0,%eax
  call   <input@plt>
  jmp    L78
L168:
  mov    $0x0,%eax
  call   <input@plt>
  cmp    $0xd,%eax
  je     L191
L161:
  cmp    $0xa,%eax
  jne    L110
  mov    $0x0,%eax
  call   <input@plt>
  jmp    L110
L191:
  mov    $0x0,%eax
  call   <input@plt>
  jmp    L161
L76:
  mov    $0x0,%eax
  call   <input@plt>
  cmp    $0x20,%eax
  je     L76
  cmp    $0x9,%eax
  je     L76
L174:
  test   %eax,%eax
  je     L160
  cmp    $0x23,%eax
  je     L160
L59:
  mov    $0x0,%eax
  call   <input@plt>
  test   %eax,%eax
  je     L160
  cmp    $0xa,%eax
  je     L119
L60:
  cmp    $0x2f,%eax
  je     L185
L78:
  cmp    $0x5c,%eax
  je     L168
L110:
  cmp    $0x20,%eax
  je     L76
  cmp    $0x9,%eax
  je     L76
  jmp    L174
L88:
  mov    $0x0,%eax
L160:
  add    $0x8,%rsp
  ret
```

assistant: ```c
int skip_to_next_directive() {
  int state = 0;
  int c;
  do {
    c = input();
    if (c == 0) {
      break;
    }
    if (c == '\n') {
      state = 0;
      c = input();
    }
    if (c == '/') {
      if ((c = input()) == '*') {
        if (skip_comment() == 0) {
          return 0;
        }
        c = input();
      }
    }
    if (c == '\\') {
      if ((c = input()) == '\r') {
        c = input();
      }
      if (c == '\n') {
        c = input();
      }
    }
    while (c == ' ' || c == '\t') {
      c = input();
    }
    if (state == 0 && c == '#') {
      break;
    }
  } while (c != 0);
  return c;
}
```
user: What is the c source code of the assembly code below:

```asm
<skip_to_next_directive>:
  endbr64
  sub    $0x8,%rsp
  nopl   0x0(%rax,%rax,1)
L126:
  xor    %eax,%eax
  call   <input@plt>
  test   %eax,%eax
  je     L16
  cmp    $0xa,%eax
  je     L162
L62:
  cmp    $0x2f,%eax
  je     L46
L70:
  cmp    $0x5c,%eax
  je     L12
L93:
  cmp    $0x9,%eax
  je     L147
  cmp    $0x20,%eax
  jne    L55
  nopl   0x0(%rax,%rax,1)
L147:
  xor    %eax,%eax
  call   <input@plt>
  cmp    $0x20,%eax
  je     L147
  cmp    $0x9,%eax
  je     L147
L55:
  cmp    $0x23,%eax
  je     L153
  test   %eax,%eax
  jne    L126
L16:
  xor    %eax,%eax
L153:
  add    $0x8,%rsp
  ret
  nopl   0x0(%rax)
L12:
  xor    %eax,%eax
  call   <input@plt>
  cmp    $0xd,%eax
  je     L131
L121:
  cmp    $0xa,%eax
  jne    L93
  xor    %eax,%eax
  call   <input@plt>
  jmp    L93
  nopw   0x0(%rax,%rax,1)
L46:
  xor    %eax,%eax
  call   <input@plt>
  cmp    $0x2a,%eax
  jne    L70
  xor    %eax,%eax
  call   <skip_comment@plt>
  test   %rax,%rax
  je     L16
  xor    %eax,%eax
  call   <input@plt>
  jmp    L70
  nopl   0x0(%rax)
L162:
  xor    %eax,%eax
  call   <input@plt>
  jmp    L62
L131:
  xor    %eax,%eax
  call   <input@plt>
  jmp    L121
```

assistant: ```c
int skip_to_next_directive() {
  int state = 0;
  int c;
  do {
    c = input();
    if (c == 0) {
      break;
    }
    if (c == '\n') {
      state = 0;
      c = input();
    }
    if (c == '/') {
      if ((c = input()) == '*') {
        if (skip_comment() == 0) {
          return 0;
        }
        c = input();
      }
    }
    if (c == '\\') {
      if ((c = input()) == '\r') {
        c = input();
      }
      if (c == '\n') {
        c = input();
      }
    }
    while (c == ' ' || c == '\t') {
      c = input();
    }
    if (state == 0 && c == '#') {
      break;
    }
  } while (c != 0);
  return c;
}
```