user: What would the C source look like for the assembly code provided here?

```asm
<ios_game_rate>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  movsd  %xmm0,-0x58(%rbp)
  mov    %edi,-0x5c(%rbp)
  mov    %esi,-0x60(%rbp)
  mov    %edx,-0x64(%rbp)
  mov    %ecx,-0x68(%rbp)
  mov    %r8,-0x70(%rbp)
  mov    %r9,-0x78(%rbp)
  mov    -0x58(%rbp),%rax
  movq   %rax,%xmm0
  call   <game_adapt_result@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x58(%rbp),%rax
  movq   %rax,%xmm0
  call   <game_adapt_K@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x5c(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x60(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x64(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x68(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  pxor   %xmm0,%xmm0
  ucomisd -0x40(%rbp),%xmm0
  jp     L0
  pxor   %xmm0,%xmm0
  ucomisd -0x40(%rbp),%xmm0
  jne    L0
  movsd  D206(%rip),%xmm0
  movsd  %xmm0,-0x40(%rbp)
L0:
  pxor   %xmm0,%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jp     L107
  pxor   %xmm0,%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jne    L107
  movsd  D206(%rip),%xmm0
  movsd  %xmm0,-0x38(%rbp)
L107:
  movsd  D30(%rip),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L111
  movsd  D30(%rip),%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L111
  movsd  -0x40(%rbp),%xmm0
  addsd  -0x38(%rbp),%xmm0
  movsd  D42(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  -0x30(%rbp),%xmm2
  movsd  D190(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x40(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  addsd  -0x10(%rbp),%xmm0
  movsd  -0x20(%rbp),%xmm2
  movsd  D169(%rip),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x40(%rbp),%xmm0
  addsd  -0x38(%rbp),%xmm0
  movsd  D42(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  -0x30(%rbp),%xmm2
  movsd  D190(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x38(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  addsd  -0x8(%rbp),%xmm0
  movsd  -0x18(%rbp),%xmm2
  movsd  D169(%rip),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  jmp    L109
L111:
  movsd  D30(%rip),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L6
  movsd  -0x18(%rbp),%xmm0
  comisd D30(%rip),%xmm0
  jb     L6
  movsd  -0x30(%rbp),%xmm1
  movsd  D146(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x40(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  addsd  -0x10(%rbp),%xmm0
  movsd  -0x20(%rbp),%xmm2
  movsd  D169(%rip),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  D169(%rip),%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  D42(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x38(%rbp),%xmm0
  movsd  D146(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp10@plt>
  lea    0x1(%rax),%ecx
  mov    $0x1,%eax
  cltd
  idiv   %ecx
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  mulsd  -0x28(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movsd  D30(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  jmp    L109
L6:
  movsd  -0x20(%rbp),%xmm0
  comisd D30(%rip),%xmm0
  jb     L70
  movsd  D30(%rip),%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L70
  movsd  -0x30(%rbp),%xmm1
  movsd  D146(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x40(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x38(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  addsd  -0x8(%rbp),%xmm0
  movsd  -0x18(%rbp),%xmm2
  movsd  D169(%rip),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x30(%rbp),%xmm1
  movsd  D169(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  D42(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x38(%rbp),%xmm0
  subsd  -0x40(%rbp),%xmm0
  movsd  D146(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp10@plt>
  lea    0x1(%rax),%esi
  mov    $0x1,%eax
  cltd
  idiv   %esi
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x10(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  mulsd  -0x28(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  D30(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  -0x40(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  jmp    L109
L70:
  movsd  -0x30(%rbp),%xmm1
  movsd  D169(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  D42(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x38(%rbp),%xmm0
  subsd  -0x40(%rbp),%xmm0
  movsd  D146(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp10@plt>
  lea    0x1(%rax),%edi
  mov    $0x1,%eax
  cltd
  idiv   %edi
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x10(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  mulsd  -0x28(%rbp),%xmm0
  movsd  -0x40(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  D169(%rip),%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  D42(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x38(%rbp),%xmm0
  movsd  D146(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp10@plt>
  lea    0x1(%rax),%ecx
  mov    $0x1,%eax
  cltd
  idiv   %ecx
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  mulsd  -0x28(%rbp),%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  nop
L109:
  mov    -0x50(%rbp),%rax
  movq   %rax,%xmm0
  call   <rint@plt>
  mov    -0x70(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x48(%rbp),%rax
  movq   %rax,%xmm0
  call   <rint@plt>
  mov    -0x78(%rbp),%rdx
  mov    %eax,(%rdx)
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D206
type_infered: byte[8]
name: parse_data
arguments: label: D30
type_infered: byte[16]
name: parse_data
arguments: label: D42
type_infered: byte[8]
name: parse_data
arguments: label: D190
type_infered: byte[8]
name: parse_data
arguments: label: D169
type_infered: byte[8]
name: parse_data
arguments: label: D146
type_infered: byte[8]

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

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

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

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

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

tool: {"D146": [0x00,0x00,0x00,0x00,0x00,0x00,0x79,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);
}
```