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

```asm
<main>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x18,%rsp
  mov    0x8(%rsi),%rdi
  mov    %rsi,0x8(%rsp)
  call   <atoi@plt>
  movl   $0x0,0x4(%rsp)
  mov    0x10(%r15),%r15
  mov    %eax,%ebp
  cmp    $0x3,%ebx
  jg     L2
L75:
  mov    %r15,%rdi
  xor    %ebx,%ebx
  xor    %r12d,%r12d
  call   <strlen@plt>
  mov    D3(%rip),%r14
  add    %ebp,%eax
  mov    %eax,(%rsp)
  nopl   (%rax)
L79:
  xor    %eax,%eax
  call   <getchar@plt>
  mov    %eax,%r13d
  cmp    %eax,(%r14)
  je     L46
L55:
  cmp    %ebp,%ebx
  setl   %al
  cmp    (%rsp),%ebx
  setge  %cl
  or     %cl,%al
  jne    L22
  cmp    0x4(%rsp),%r12d
  jge    L19
L22:
  movsbl %r13b,%edi
  call   <putchar@plt>
L33:
  add    $0x1,%ebx
  cmp    $0xa,%r13d
  jne    L79
  mov    0x8(%rsp),%rax
  add    $0x1,%r12d
  xor    %ebx,%ebx
  mov    0x10(%rax),%r15
  xor    %eax,%eax
  call   <getchar@plt>
  mov    %eax,%r13d
  cmp    %eax,(%r14)
  jne    L55
L46:
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L19:
  movsbl (%r15),%edi
  add    $0x1,%r15
  call   <putchar@plt>
  jmp    L33
L2:
  mov    0x8(%rsp),%rax
  mov    0x18(%rax),%rdi
  call   <atoi@plt>
  mov    %eax,0x4(%rsp)
  jmp    L75
```

assistant: ```c
int main(int argc, char **argv) {
  int h;
  int i;
  int c;
  int p = atoi(argv[1]);
  char *s = argv[2];
  int nh = 0;
  if (argc > 3)
    nh = atoi(argv[3]);
  int e = p + (int)strlen(s);
  i = 0;
  h = 0;
  while ((c = getchar()) != EOF) {
    if ((i < p) || (i >= e) || (h < nh)) {
      putchar(c);
    } else {
      putchar(s[0]);
      s++;
    }
    i++;
    if (c == '\n') {
      i = 0;
      s = argv[2];
      h++;
    }
  }
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<stats>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8,-0x38(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mov    -0x38(%rbp),%rax
  movss  %xmm0,(%rax)
  movl   $0x1,-0x4(%rbp)
  jmp    L11
L8:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L6
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
L6:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L35
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
L35:
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm1
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  addss  %xmm1,%xmm0
  mov    -0x38(%rbp),%rax
  movss  %xmm0,(%rax)
  addl   $0x1,-0x4(%rbp)
L11:
  mov    -0x4(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L8
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0x1c(%rbp),%xmm1
  divss  %xmm1,%xmm0
  mov    -0x38(%rbp),%rax
  movss  %xmm0,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void stats(int *tempos, int n, int *min, int *max, float *med) {
  *min = tempos[0];
  *max = tempos[0];
  *med = tempos[0];
  for (int i = 1; i < n; ++i) {
    if (*min > tempos[i]) {
      *min = tempos[i];
    }
    if (*max < tempos[i]) {
      *max = tempos[i];
    }
    *med += tempos[i];
  }
  *med /= (float)n;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<stats>:
  endbr64
  mov    %rdi,%r11
  mov    %esi,%edi
  mov    %rdx,%r9
  mov    %rcx,%r10
  mov    (%r11),%eax
  mov    %eax,(%rdx)
  mov    %eax,(%rcx)
  pxor   %xmm0,%xmm0
  cvtsi2ssl (%r11),%xmm0
  movss  %xmm0,(%r8)
  cmp    $0x1,%esi
  jle    L35
  lea    0x4(%r11),%rax
  lea    -0x2(%rsi),%edx
  lea    0x8(%r11,%rdx,4),%rsi
  jmp    L54
L41:
  pxor   %xmm0,%xmm0
  cvtsi2ssl (%rdx),%xmm0
  addss  (%r8),%xmm0
  movss  %xmm0,(%r8)
  add    $0x4,%rax
  cmp    %rsi,%rax
  je     L35
L54:
  mov    %rax,%rdx
  mov    (%rax),%ecx
  cmp    %ecx,(%r9)
  jle    L12
  mov    %ecx,(%r9)
L12:
  mov    (%rdx),%ecx
  cmp    %ecx,(%r10)
  jge    L41
  mov    %ecx,(%r10)
  jmp    L41
L35:
  pxor   %xmm1,%xmm1
  cvtsi2ss %edi,%xmm1
  movss  (%r8),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,(%r8)
  ret
```

assistant: ```c
void stats(int *tempos, int n, int *min, int *max, float *med) {
  *min = tempos[0];
  *max = tempos[0];
  *med = tempos[0];
  for (int i = 1; i < n; ++i) {
    if (*min > tempos[i]) {
      *min = tempos[i];
    }
    if (*max < tempos[i]) {
      *max = tempos[i];
    }
    *med += tempos[i];
  }
  *med /= (float)n;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<stats>:
  endbr64
  mov    %esi,%r9d
  mov    (%rdi),%esi
  pxor   %xmm0,%xmm0
  mov    %rdi,%rax
  mov    %esi,(%rdx)
  mov    %esi,(%rcx)
  cvtsi2ssl (%rdi),%xmm0
  movss  %xmm0,(%r8)
  cmp    $0x1,%r9d
  jle    L37
  lea    0x4(%rdi),%rsi
  lea    -0x2(%r9),%edi
  lea    0x8(%rax,%rdi,4),%rdi
L30:
  mov    (%rsi),%eax
  cmp    %eax,(%rdx)
  jle    L25
  mov    %eax,(%rdx)
L25:
  cmp    (%rcx),%eax
  jle    L33
  mov    %eax,(%rcx)
  mov    (%rsi),%eax
L33:
  pxor   %xmm1,%xmm1
  add    $0x4,%rsi
  cvtsi2ss %eax,%xmm1
  addss  %xmm1,%xmm0
  cmp    %rsi,%rdi
  jne    L30
L37:
  pxor   %xmm1,%xmm1
  cvtsi2ss %r9d,%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,(%r8)
  ret
```

assistant: ```c
void stats(int *tempos, int n, int *min, int *max, float *med) {
  *min = tempos[0];
  *max = tempos[0];
  *med = tempos[0];
  for (int i = 1; i < n; ++i) {
    if (*min > tempos[i]) {
      *min = tempos[i];
    }
    if (*max < tempos[i]) {
      *max = tempos[i];
    }
    *med += tempos[i];
  }
  *med /= (float)n;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<stats>:
  endbr64
  mov    (%rdi),%eax
  pxor   %xmm0,%xmm0
  mov    %esi,%r9d
  mov    %eax,(%rdx)
  mov    %eax,(%rcx)
  cvtsi2ssl (%rdi),%xmm0
  movss  %xmm0,(%r8)
  cmp    $0x1,%esi
  jle    L25
  lea    -0x2(%rsi),%esi
  lea    0x4(%rdi),%rax
  lea    0x8(%rdi,%rsi,4),%rdi
  nopl   0x0(%rax,%rax,1)
L3:
  mov    (%rax),%esi
  cmp    %esi,(%rdx)
  jle    L42
  mov    %esi,(%rdx)
L42:
  cmp    (%rcx),%esi
  jle    L22
  mov    %esi,(%rcx)
  pxor   %xmm1,%xmm1
  add    $0x4,%rax
  cvtsi2ssl -0x4(%rax),%xmm1
  addss  %xmm1,%xmm0
  cmp    %rdi,%rax
  jne    L3
L25:
  pxor   %xmm1,%xmm1
  cvtsi2ss %r9d,%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,(%r8)
  ret
  nopw   0x0(%rax,%rax,1)
L22:
  pxor   %xmm1,%xmm1
  add    $0x4,%rax
  cvtsi2ss %esi,%xmm1
  addss  %xmm1,%xmm0
  cmp    %rax,%rdi
  jne    L3
  pxor   %xmm1,%xmm1
  cvtsi2ss %r9d,%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,(%r8)
  ret
```

assistant: ```c
void stats(int *tempos, int n, int *min, int *max, float *med) {
  *min = tempos[0];
  *max = tempos[0];
  *med = tempos[0];
  for (int i = 1; i < n; ++i) {
    if (*min > tempos[i]) {
      *min = tempos[i];
    }
    if (*max < tempos[i]) {
      *max = tempos[i];
    }
    *med += tempos[i];
  }
  *med /= (float)n;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<ta_calc_prealloc_elems>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  movabs $0x7ffffffffffffffd,%rax
  cmp    %rax,-0x8(%rbp)
  jbe    L8
  mov    $0xffffffffffffffff,%rax
  jmp    L6
L8:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  add    %rax,%rax
L6:
  pop    %rbp
  ret
```

assistant: ```c
size_t ta_calc_prealloc_elems(size_t nextidx) {
  if (nextidx >= ((size_t)-1) / 2 - 1)
    return (size_t)-1;
  return (nextidx + 1) * 2;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<ta_calc_prealloc_elems>:
  endbr64
  lea    0x2(%rdi,%rdi,1),%rax
  movabs $0x7ffffffffffffffd,%rdx
  cmp    %rdx,%rdi
  mov    $0xffffffffffffffff,%rdx
  cmova  %rdx,%rax
  ret
```

assistant: ```c
size_t ta_calc_prealloc_elems(size_t nextidx) {
  if (nextidx >= ((size_t)-1) / 2 - 1)
    return (size_t)-1;
  return (nextidx + 1) * 2;
}
```
user: What is the c source code of the assembly code below?

```asm
<ta_calc_prealloc_elems>:
  endbr64
  movabs $0x7ffffffffffffffd,%rdx
  lea    0x2(%rdi,%rdi,1),%rax
  cmp    %rdx,%rdi
  mov    $0xffffffffffffffff,%rdx
  cmova  %rdx,%rax
  ret
```

assistant: ```c
size_t ta_calc_prealloc_elems(size_t nextidx) {
  if (nextidx >= ((size_t)-1) / 2 - 1)
    return (size_t)-1;
  return (nextidx + 1) * 2;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<ta_calc_prealloc_elems>:
  endbr64
  movabs $0x7ffffffffffffffd,%rdx
  lea    0x2(%rdi,%rdi,1),%rax
  cmp    %rdx,%rdi
  mov    $0xffffffffffffffff,%rdx
  cmova  %rdx,%rax
  ret
```

assistant: ```c
size_t ta_calc_prealloc_elems(size_t nextidx) {
  if (nextidx >= ((size_t)-1) / 2 - 1)
    return (size_t)-1;
  return (nextidx + 1) * 2;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<del_AST_parser>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  leave
  ret
```

assistant: ```c
void del_AST_parser(struct AST_parser *self) {
  free(self);
  return;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<del_AST_parser>:
  endbr64
  sub    $0x8,%rsp
  call   <free@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void del_AST_parser(struct AST_parser *self) {
  free(self);
  return;
}
```
user: Translate the below assembly code into C programming language:

```asm
<del_AST_parser>:
  endbr64
  jmp    1050 <free@plt>
```

assistant: ```c
void del_AST_parser(struct AST_parser *self) {
  free(self);
  return;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<del_AST_parser>:
  endbr64
  jmp    1050 <free@plt>
```

assistant: ```c
void del_AST_parser(struct AST_parser *self) {
  free(self);
  return;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<abs>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jns    L13
  mov    -0x4(%rbp),%eax
  neg    %eax
  jmp    L3
L13:
  mov    -0x4(%rbp),%eax
L3:
  pop    %rbp
  ret
```

assistant: ```c
int abs(int value) {
  if (value < 0) {
    return value * -1;
  }
  return value;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<abs>:
  endbr64
  mov    %edi,%eax
  neg    %eax
  cmovs  %edi,%eax
  ret
```

assistant: ```c
int abs(int value) {
  if (value < 0) {
    return value * -1;
  }
  return value;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<abs>:
  endbr64
  mov    %edi,%eax
  neg    %eax
  cmovs  %edi,%eax
  ret
```

assistant: ```c
int abs(int value) {
  if (value < 0) {
    return value * -1;
  }
  return value;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<abs>:
  endbr64
  mov    %edi,%eax
  neg    %eax
  cmovs  %edi,%eax
  ret
```

assistant: ```c
int abs(int value) {
  if (value < 0) {
    return value * -1;
  }
  return value;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<thread_exit>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%edi
  call   <pthread_exit@plt>
  mov    $0x0,%eax
  pop    %rbp
  ret
```

assistant: ```c
int thread_exit() {
  pthread_exit((void *)0);
  return (0);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<thread_exit>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%edi
  call   <pthread_exit@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int thread_exit() {
  pthread_exit((void *)0);
  return (0);
}
```
user: What is the c source code of the assembly code below?

```asm
<thread_exit>:
  endbr64
  sub    $0x8,%rsp
  xor    %edi,%edi
  call   <pthread_exit@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int thread_exit() {
  pthread_exit((void *)0);
  return (0);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<thread_exit>:
  endbr64
  sub    $0x8,%rsp
  xor    %edi,%edi
  call   <pthread_exit@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int thread_exit() {
  pthread_exit((void *)0);
  return (0);
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<strcpy>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  mov    %rdi,%rax
  mov    %rsi,%rcx
  mov    %rax,%rbx
  nop
L1:
  mov    %rcx,%rsi
  lea    0x1(%rsi),%rcx
  mov    %rax,%rdx
  lea    0x1(%rdx),%rax
  movzbl (%rsi),%esi
  mov    %sil,(%rdx)
  movzbl (%rdx),%edx
  test   %dl,%dl
  jne    L1
  mov    %rbx,%rax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
char *strcpy(s1, s2)
register char *s1;
register const char *s2;
{
  register char *os1;
  os1 = s1;
  while ((*s1++ = *s2++))
    ;
  return (os1);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<strcpy>:
  endbr64
  mov    %rdi,%rax
  mov    $0x0,%edx
L5:
  movzbl (%rsi,%rdx,1),%ecx
  mov    %cl,(%rax,%rdx,1)
  add    $0x1,%rdx
  test   %cl,%cl
  jne    L5
  ret
```

assistant: ```c
char *strcpy(s1, s2)
register char *s1;
register const char *s2;
{
  register char *os1;
  os1 = s1;
  while ((*s1++ = *s2++))
    ;
  return (os1);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<strcpy>:
  endbr64
  mov    %rdi,%rax
  xor    %edx,%edx
  nopl   0x0(%rax)
L6:
  movzbl (%rsi,%rdx,1),%ecx
  mov    %cl,(%rax,%rdx,1)
  add    $0x1,%rdx
  test   %cl,%cl
  jne    L6
  ret
```

assistant: ```c
char *strcpy(s1, s2)
register char *s1;
register const char *s2;
{
  register char *os1;
  os1 = s1;
  while ((*s1++ = *s2++))
    ;
  return (os1);
}
```
user: What is the c source code of the assembly code below?

```asm
<strcpy>:
  endbr64
  mov    %rdi,%rax
  xor    %edx,%edx
  nopl   0x0(%rax)
L8:
  movzbl (%rsi,%rdx,1),%ecx
  mov    %cl,(%rax,%rdx,1)
  add    $0x1,%rdx
  test   %cl,%cl
  jne    L8
  ret
```

assistant: ```c
char *strcpy(s1, s2)
register char *s1;
register const char *s2;
{
  register char *os1;
  os1 = s1;
  while ((*s1++ = *s2++))
    ;
  return (os1);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xa0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x98(%rbp),%rax
  mov    %rax,%rsi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movl   $0x1,-0x94(%rbp)
  jmp    L32
L48:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movl   $0x0,-0x90(%rbp)
  jmp    L12
L68:
  lea    -0x80(%rbp),%rdx
  mov    -0x90(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D50(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x90(%rbp),%eax
  cltq
  movsd  -0x80(%rbp,%rax,8),%xmm0
  movsd  -0x88(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  addl   $0x1,-0x90(%rbp)
L12:
  cmpl   $0xb,-0x90(%rbp)
  jle    L68
  movsd  -0x88(%rbp),%xmm0
  movsd  D18(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  D26(%rip),%xmm0
  comisd -0x88(%rbp),%xmm0
  jbe    L65
  movsd  -0x88(%rbp),%xmm0
  cvttsd2si %xmm0,%edx
  mov    -0x94(%rbp),%eax
  mov    %eax,%esi
  lea    D58(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L37
L65:
  movsd  -0x88(%rbp),%xmm0
  movsd  D26(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x8c(%rbp)
  mov    -0x8c(%rbp),%eax
  imul   $0x3e8,%eax,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x88(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  mov    -0x88(%rbp),%rcx
  mov    -0x8c(%rbp),%edx
  mov    -0x94(%rbp),%eax
  movq   %rcx,%xmm0
  mov    %eax,%esi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L37:
  addl   $0x1,-0x94(%rbp)
L32:
  mov    -0x98(%rbp),%eax
  cmp    %eax,-0x94(%rbp)
  jle    L48
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L50
  call   <__stack_chk_fail@plt>
L50:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D27
type_guessed: string
name: read_data
arguments: label: D50
type_guessed: string
name: read_data
arguments: label: D18
type_guessed: f64
name: read_data
arguments: label: D26
type_guessed: f32[2]
name: read_data
arguments: label: D58
type_guessed: string
name: read_data
arguments: label: D6
type_guessed: string

tool: D27: %d

tool: D50: %lf

tool: D18: 12

tool: {"D26": [0.0,4.4765625]}

tool: D58: %d $%.2lf


tool: D6: %d $%d,%.2lf


assistant: ```c
int main() {
  int t, i;
  double ara[15];
  scanf("%d", &t);
  for (i = 1; i <= t; i++) {
    int j, temp;
    double sum = 0;
    for (j = 0; j < 12; j++) {
      scanf("%lf", &ara[j]);
      sum += ara[j];
    }
    sum = sum / 12.0;
    if (sum < 1000) {
      printf("%d $%.2lf\n", i, sum);
      continue;
    }
    temp = sum / 1000;
    sum = sum - (temp * 1000);
    printf("%d $%d,%.2lf\n", i, temp, sum);
  }
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x90,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rsi
  lea    D31(%rip),%rdi
  call   <scanf@plt>
  cmpl   $0x0,0xc(%rsp)
  jle    L67
  mov    $0x1,%r14d
  lea    D38(%rip),%r13
  jmp    L13
L25:
  cvttsd2si %xmm0,%edx
  mov    %r14d,%esi
  lea    D4(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L28:
  add    $0x1,%r14d
  cmp    %r14d,0xc(%rsp)
  jl     L67
L13:
  lea    0x10(%rsp),%rbx
  lea    0x70(%rsp),%r12
  mov    D9(%rip),%rbp
L56:
  mov    %rbx,%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movq   %rbp,%xmm2
  addsd  (%rbx),%xmm2
  movq   %xmm2,%rbp
  add    $0x8,%rbx
  cmp    %r12,%rbx
  jne    L56
  movapd %xmm2,%xmm0
  divsd  D49(%rip),%xmm0
  movsd  D64(%rip),%xmm3
  comisd %xmm0,%xmm3
  ja     L25
  movapd %xmm0,%xmm1
  divsd  D64(%rip),%xmm1
  cvttsd2si %xmm1,%edx
  imul   $0x3e8,%edx,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  subsd  %xmm1,%xmm0
  mov    %r14d,%esi
  lea    D3(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  jmp    L28
L67:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L69
  mov    $0x0,%eax
  add    $0x90,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L69:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D31
type_guessed: string
name: unpack_data
arguments: data_tag: D38
type_guessed: string
name: unpack_data
arguments: data_tag: D4
type_guessed: string
name: unpack_data
arguments: data_tag: D9
type_guessed: f64
name: unpack_data
arguments: data_tag: D49
type_guessed: f64
name: unpack_data
arguments: data_tag: D64
type_guessed: byte[8]
name: unpack_data
arguments: data_tag: D3
type_guessed: string

tool: D31: %d

tool: D38: %lf

tool: D4: %d $%.2lf


tool: D9: 0

tool: D49: 12

tool: {"D64": [0x00,0x00,0x00,0x00,0x00,0x40,0x8f,0x40]}

tool: D3: %d $%d,%.2lf


assistant: ```c
int main() {
  int t, i;
  double ara[15];
  scanf("%d", &t);
  for (i = 1; i <= t; i++) {
    int j, temp;
    double sum = 0;
    for (j = 0; j < 12; j++) {
      scanf("%lf", &ara[j]);
      sum += ara[j];
    }
    sum = sum / 12.0;
    if (sum < 1000) {
      printf("%d $%.2lf\n", i, sum);
      continue;
    }
    temp = sum / 1000;
    sum = sum - (temp * 1000);
    printf("%d $%d,%.2lf\n", i, temp, sum);
  }
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %r15
  lea    D49(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rsi
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  jle    L52
  mov    $0x1,%r12d
  lea    0x20(%rsp),%r13
  lea    0x80(%rsp),%rbp
  lea    D21(%rip),%rbx
  lea    D42(%rip),%r14
  cs nopw 0x0(%rax,%rax,1)
L32:
  mov    %r13,%r15
  pxor   %xmm0,%xmm0
  nopw   0x0(%rax,%rax,1)
L13:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  movsd  %xmm0,0x8(%rsp)
  call   <scanf@plt>
  add    $0x8,%r15
  movsd  0x8(%rsp),%xmm0
  addsd  -0x8(%r15),%xmm0
  cmp    %rbp,%r15
  jne    L13
  movsd  D34(%rip),%xmm2
  divsd  D13(%rip),%xmm0
  comisd %xmm0,%xmm2
  ja     L44
  movapd %xmm0,%xmm1
  divsd  D34(%rip),%xmm1
  cvttsd2si %xmm1,%edx
  mov    %r12d,%esi
  pxor   %xmm1,%xmm1
  mov    %r14,%rdi
  imul   $0x3e8,%edx,%eax
  cvtsi2sd %eax,%xmm1
  mov    $0x1,%eax
  subsd  %xmm1,%xmm0
  call   <printf@plt>
L38:
  add    $0x1,%r12d
  cmp    %r12d,0x1c(%rsp)
  jge    L32
L52:
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L55
  add    $0xa8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L44:
  cvttsd2si %xmm0,%edx
  mov    %r12d,%esi
  lea    D0(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L38
L55:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D49
type: string
name: extract_symbolic_data
arguments: data_tag: D21
type: string
name: extract_symbolic_data
arguments: data_tag: D42
type: string
name: extract_symbolic_data
arguments: data_tag: D34
type: f32[2]
name: extract_symbolic_data
arguments: data_tag: D13
type: f64
name: extract_symbolic_data
arguments: data_tag: D0
type: string

tool: D49: %d

tool: D21: %lf

tool: D42: %d $%d,%.2lf


tool: {"D34": [0.0,4.4765625]}

tool: D13: 12

tool: D0: %d $%.2lf


assistant: ```c
int main() {
  int t, i;
  double ara[15];
  scanf("%d", &t);
  for (i = 1; i <= t; i++) {
    int j, temp;
    double sum = 0;
    for (j = 0; j < 12; j++) {
      scanf("%lf", &ara[j]);
      sum += ara[j];
    }
    sum = sum / 12.0;
    if (sum < 1000) {
      printf("%d $%.2lf\n", i, sum);
      continue;
    }
    temp = sum / 1000;
    sum = sum - (temp * 1000);
    printf("%d $%d,%.2lf\n", i, temp, sum);
  }
  return 0;
}
```