user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %r14
  lea    D101(%rip),%rdi
  xor    %r14d,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rsi
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  jle    L66
  pxor   %xmm1,%xmm1
  xor    %r13d,%r13d
  lea    0x20(%rsp),%r12
  movapd %xmm1,%xmm0
  lea    0x18(%rsp),%rbp
  lea    D50(%rip),%rbx
  jmp    L63
  xchg   %ax,%ax
L43:
  pxor   %xmm2,%xmm2
  movsd  D28(%rip),%xmm3
  add    $0x1,%r13d
  cvtsi2sd %eax,%xmm2
  mulsd  0x20(%rsp),%xmm2
  mulsd  %xmm2,%xmm3
  mulsd  D100(%rip),%xmm2
  divsd  D99(%rip),%xmm3
  addsd  %xmm3,%xmm0
  divsd  D99(%rip),%xmm2
  addsd  %xmm2,%xmm1
  cmp    %r13d,0x1c(%rsp)
  jle    L23
L63:
  xor    %eax,%eax
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm0,(%rsp)
  call   <scanf@plt>
  mov    0x18(%rsp),%eax
  movsd  (%rsp),%xmm0
  movsd  0x8(%rsp),%xmm1
  add    %eax,%r14d
  cmp    $0x13,%eax
  jg     L43
  mov    %eax,%edx
  pxor   %xmm2,%xmm2
  pxor   %xmm3,%xmm3
  movsd  0x20(%rsp),%xmm4
  shr    $0x1f,%edx
  add    $0x1,%r13d
  add    %eax,%edx
  and    $0xfffffffe,%edx
  cvtsi2sd %edx,%xmm2
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  and    $0x1,%eax
  mulsd  %xmm4,%xmm2
  sub    %edx,%eax
  cvtsi2sd %eax,%xmm3
  mulsd  %xmm4,%xmm3
  movsd  D14(%rip),%xmm4
  mulsd  %xmm2,%xmm4
  divsd  D99(%rip),%xmm4
  mulsd  D24(%rip),%xmm2
  divsd  D99(%rip),%xmm2
  addsd  %xmm2,%xmm1
  addsd  %xmm4,%xmm3
  addsd  %xmm3,%xmm0
  cmp    %r13d,0x1c(%rsp)
  jg     L63
L23:
  pxor   %xmm2,%xmm2
  mov    %r14d,%esi
  lea    D1(%rip),%rdi
  cvtsi2sd %r14d,%xmm2
  divsd  %xmm2,%xmm0
  call   <printf@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  add    $0x30,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L66:
  pxor   %xmm1,%xmm1
  movapd %xmm1,%xmm0
  jmp    L23
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D101
data_type: string
name: parse_data
arguments: data_label: D50
data_type: string
name: parse_data
arguments: data_label: D28
data_type: f64
name: parse_data
arguments: data_label: D100
data_type: f64
name: parse_data
arguments: data_label: D99
data_type: f32[2]
name: parse_data
arguments: data_label: D14
data_type: f64
name: parse_data
arguments: data_label: D24
data_type: f64
name: parse_data
arguments: data_label: D1
data_type: string

tool: D101: %d

tool: D50: %d %lf

tool: D28: 80

tool: D100: 20

tool: {"D99": [0.0,3.390625]}

tool: D14: 90

tool: D24: 10

tool: D1: %d
%.2f
%.0f

assistant: ```c
int main() {
  double sum = 0, price, discount = 0;
  int user, n, i, cnt = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d %lf", &user, &price);
    cnt += user;
    sum += (user >= 20) ? price * user * 80.0 / 100 : ((user / 2) * 2) * price * 90.0 / 100 + (user % 2) * price;
    discount += (user >= 20) ? price * user * 20.0 / 100 : ((user / 2) * 2) * price * 10.0 / 100;
  }
  printf("%d\n%.2f\n%.0f", cnt, sum / cnt, discount);
  return 0;
}
```