user: What is the c source code of the assembly code below:

```asm
<ios_game_rate>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  movsd  %xmm0,0x8(%rsp)
  mov    %edi,%r12d
  mov    %esi,%ebp
  mov    %edx,%r13d
  mov    %ecx,%r14d
  mov    %r8,%r15
  mov    %r9,%rbx
  call   <game_adapt_result@plt>
  movsd  %xmm0,0x10(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <game_adapt_K@plt>
  movsd  %xmm0,0x18(%rsp)
  pxor   %xmm6,%xmm6
  cvtsi2sd %r12d,%xmm6
  movsd  %xmm6,0x28(%rsp)
  pxor   %xmm7,%xmm7
  cvtsi2sd %ebp,%xmm7
  movsd  %xmm7,0x20(%rsp)
  movsd  D161(%rip),%xmm4
  movsd  %xmm4,0x8(%rsp)
  test   %r13d,%r13d
  je     L82
  pxor   %xmm3,%xmm3
  cvtsi2sd %r13d,%xmm3
  movsd  %xmm3,0x8(%rsp)
L82:
  mov    D161(%rip),%r13
  test   %r14d,%r14d
  je     L28
  pxor   %xmm2,%xmm2
  cvtsi2sd %r14d,%xmm2
  movq   %xmm2,%r13
L28:
  cmp    $0x9,%ebp
  setle  %al
  cmp    $0x9,%r12d
  setle  %dl
  test   %al,%al
  je     L8
  test   %dl,%dl
  jne    L94
L8:
  cmp    $0x9,%ebp
  jle    L15
  test   %dl,%dl
  jne    L34
L15:
  cmp    $0x9,%r12d
  jle    L96
  test   %al,%al
  jne    L86
L96:
  movq   %r13,%xmm0
  subsd  0x8(%rsp),%xmm0
  divsd  D167(%rip),%xmm0
  call   <exp10@plt>
  movsd  D29(%rip),%xmm0
  addsd  0x10(%rsp),%xmm0
  mulsd  D198(%rip),%xmm0
  lea    0x1(%rax),%ecx
  mov    $0x1,%ebp
  mov    %ebp,%eax
  cltd
  idiv   %ecx
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  subsd  %xmm1,%xmm0
  mulsd  0x18(%rsp),%xmm0
  movsd  0x8(%rsp),%xmm5
  addsd  %xmm5,%xmm0
  movq   %xmm0,%r12
  movq   %r13,%xmm4
  subsd  %xmm4,%xmm5
  movapd %xmm5,%xmm0
  divsd  D167(%rip),%xmm0
  call   <exp10@plt>
  movsd  D29(%rip),%xmm0
  subsd  0x10(%rsp),%xmm0
  mulsd  D198(%rip),%xmm0
  lea    0x1(%rax),%ecx
  mov    %ebp,%eax
  cltd
  idiv   %ecx
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  subsd  %xmm1,%xmm0
  mulsd  0x18(%rsp),%xmm0
  movq   %r13,%xmm7
  addsd  %xmm0,%xmm7
  movq   %xmm7,%rbp
L87:
  movq   %r12,%xmm0
  call   <rint@plt>
  mov    %eax,(%r15)
  movq   %rbp,%xmm0
  call   <rint@plt>
  mov    %eax,(%rbx)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L94:
  movq   %r13,%xmm0
  movsd  0x8(%rsp),%xmm6
  addsd  %xmm6,%xmm0
  mulsd  D198(%rip),%xmm0
  movsd  0x10(%rsp),%xmm3
  mulsd  D18(%rip),%xmm3
  movsd  0x28(%rsp),%xmm7
  mulsd  %xmm7,%xmm6
  movapd %xmm6,%xmm1
  movapd %xmm0,%xmm2
  addsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm1
  movapd %xmm1,%xmm4
  movsd  D29(%rip),%xmm1
  movapd %xmm7,%xmm2
  addsd  %xmm1,%xmm2
  divsd  %xmm2,%xmm4
  movq   %xmm4,%r12
  movq   %r13,%xmm2
  movsd  0x20(%rsp),%xmm4
  mulsd  %xmm4,%xmm2
  subsd  %xmm3,%xmm0
  addsd  %xmm0,%xmm2
  addsd  %xmm4,%xmm1
  divsd  %xmm1,%xmm2
  movq   %xmm2,%rbp
  jmp    L87
L34:
  movsd  D167(%rip),%xmm1
  movsd  0x10(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  movq   %r13,%xmm3
  addsd  %xmm3,%xmm0
  movsd  0x8(%rsp),%xmm3
  movapd %xmm3,%xmm2
  movsd  0x28(%rsp),%xmm6
  mulsd  %xmm6,%xmm2
  addsd  %xmm2,%xmm0
  movsd  D29(%rip),%xmm2
  addsd  %xmm6,%xmm2
  movapd %xmm0,%xmm7
  divsd  %xmm2,%xmm7
  movq   %xmm7,%r12
  movq   %r13,%xmm4
  subsd  %xmm4,%xmm3
  movapd %xmm3,%xmm0
  divsd  %xmm1,%xmm0
  call   <exp10@plt>
  movsd  D29(%rip),%xmm1
  subsd  0x10(%rsp),%xmm1
  movapd %xmm1,%xmm0
  mulsd  D198(%rip),%xmm0
  lea    0x1(%rax),%ecx
  mov    $0x1,%eax
  cltd
  idiv   %ecx
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  subsd  %xmm1,%xmm0
  mulsd  0x18(%rsp),%xmm0
  mulsd  0x28(%rsp),%xmm0
  divsd  D52(%rip),%xmm0
  movq   %r13,%xmm5
  addsd  %xmm0,%xmm5
  movq   %xmm5,%rbp
  jmp    L87
L86:
  movsd  D167(%rip),%xmm1
  movsd  0x10(%rsp),%xmm2
  mulsd  %xmm1,%xmm2
  movsd  0x8(%rsp),%xmm4
  movapd %xmm4,%xmm0
  subsd  %xmm2,%xmm0
  movq   %r13,%xmm3
  movsd  0x20(%rsp),%xmm7
  mulsd  %xmm7,%xmm3
  addsd  %xmm3,%xmm0
  movsd  D29(%rip),%xmm3
  addsd  %xmm7,%xmm3
  divsd  %xmm3,%xmm0
  movq   %xmm0,%rbp
  movq   %r13,%xmm0
  subsd  %xmm4,%xmm0
  divsd  %xmm1,%xmm0
  call   <exp10@plt>
  movsd  D29(%rip),%xmm0
  addsd  0x10(%rsp),%xmm0
  mulsd  D198(%rip),%xmm0
  lea    0x1(%rax),%ecx
  mov    $0x1,%eax
  cltd
  idiv   %ecx
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  subsd  %xmm1,%xmm0
  mulsd  0x18(%rsp),%xmm0
  mulsd  0x20(%rsp),%xmm0
  divsd  D52(%rip),%xmm0
  addsd  0x8(%rsp),%xmm0
  movq   %xmm0,%r12
  jmp    L87
```

tool_calls: name: read_data
arguments: label: D161
type_infered: byte[8]
name: read_data
arguments: label: D167
type_infered: byte[8]
name: read_data
arguments: label: D29
type_infered: byte[8]
name: read_data
arguments: label: D198
type_infered: byte[8]
name: read_data
arguments: label: D18
type_infered: byte[8]
name: read_data
arguments: label: D52
type_infered: byte[8]

tool: {"D161": [0x00,0x00,0x00,0x00,0x00,0x00,0x99,0x40]}

tool: {"D167": [0x00,0x00,0x00,0x00,0x00,0x00,0x79,0x40]}

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

tool: {"D198": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: {"D18": [0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x40]}

tool: {"D52": [0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x40]}

assistant: ```c
void ios_game_rate(double f, int ogb, int ogw, int orb, int orw, int *nrb, int *nrw) {
  double vb, vw, nb, nw;
  double gb, gw, rb, rw, K, w;
  w = game_adapt_result(f);
  K = game_adapt_K(f);
  gb = (double)ogb;
  gw = (double)ogw;
  rb = (double)orb;
  rw = (double)orw;
  if (rb == 0)
    rb = 1600;
  if (rw == 0)
    rw = 1600;
  if (gb < 10 && gw < 10) {
    vb = (rb + rw) / 2 + 200 * w;
    nb = (rb * gb + vb) / (gb + 1);
    vw = (rb + rw) / 2 - 200 * w;
    nw = (rw * gw + vw) / (gw + 1);
    goto END;
  } else if (gb < 10 && gw >= 10) {
    vb = rw + 400 * w;
    nb = (rb * gb + vb) / (gb + 1);
    vw = (1 - w) / 2;
    nw = rw + K * (vw - 1 / (1 + exp10((rb - rw) / 400))) * gb / 10;
    goto END;
  } else if (gb >= 10 && gw < 10) {
    vw = rb - 400 * w;
    nw = (rw * gw + vw) / (gw + 1);
    vb = (1 + w) / 2;
    nb = rb + K * (vb - 1 / (1 + exp10((rw - rb) / 400))) * gw / 10;
    goto END;
  } else {
    vb = (1 + w) / 2;
    nb = rb + K * (vb - 1 / (1 + exp10((rw - rb) / 400)));
    vw = (1 - w) / 2;
    nw = rw + K * (vw - 1 / (1 + exp10((rb - rw) / 400)));
    goto END;
  }
END:;
  *nrb = rint(nb);
  *nrw = rint(nw);
}
```