user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<ios_game_rate>:
  endbr64
  push   %r15
  mov    %edx,%r15d
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  mov    %edi,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  mov    %r9,%rbx
  sub    $0x38,%rsp
  movsd  %xmm0,0x10(%rsp)
  call   <game_adapt_result@plt>
  movsd  0x10(%rsp),%xmm1
  movsd  %xmm0,0x8(%rsp)
  movapd %xmm1,%xmm0
  call   <game_adapt_K@plt>
  pxor   %xmm5,%xmm5
  movsd  D135(%rip),%xmm2
  cvtsi2sd %r12d,%xmm5
  movsd  %xmm0,0x10(%rsp)
  test   %r15d,%r15d
  je     L9
  pxor   %xmm2,%xmm2
  cvtsi2sd %r15d,%xmm2
L9:
  movsd  D135(%rip),%xmm3
  test   %r14d,%r14d
  je     L41
  pxor   %xmm3,%xmm3
  cvtsi2sd %r14d,%xmm3
L41:
  cmp    $0x9,%r13d
  jg     L59
  pxor   %xmm4,%xmm4
  movsd  D122(%rip),%xmm0
  movapd %xmm2,%xmm6
  cvtsi2sd %r13d,%xmm4
  mulsd  %xmm4,%xmm6
  addsd  %xmm4,%xmm0
  cmp    $0x9,%r12d
  jle    L13
  movsd  0x8(%rsp),%xmm1
  subsd  %xmm3,%xmm2
  movsd  D51(%rip),%xmm5
  movsd  %xmm4,0x28(%rsp)
  movsd  %xmm3,0x18(%rsp)
  mulsd  %xmm5,%xmm1
  divsd  %xmm5,%xmm2
  addsd  %xmm3,%xmm1
  addsd  %xmm6,%xmm1
  divsd  %xmm0,%xmm1
  movapd %xmm2,%xmm0
  movsd  %xmm1,0x20(%rsp)
  call   <exp10@plt>
  pxor   %xmm5,%xmm5
  movsd  D122(%rip),%xmm0
  subsd  0x8(%rsp),%xmm0
  lea    0x1(%rax),%ecx
  mov    $0x1,%eax
  movsd  0x28(%rsp),%xmm4
  movsd  0x18(%rsp),%xmm3
  mulsd  D37(%rip),%xmm0
  cltd
  movsd  0x20(%rsp),%xmm1
  idiv   %ecx
  movapd %xmm0,%xmm2
  movsd  0x10(%rsp),%xmm0
  cvtsi2sd %eax,%xmm5
  subsd  %xmm5,%xmm2
  mulsd  %xmm2,%xmm0
  mulsd  %xmm4,%xmm0
  divsd  D141(%rip),%xmm0
  addsd  %xmm0,%xmm3
  jmp    L61
  nopl   0x0(%rax,%rax,1)
L59:
  movsd  D122(%rip),%xmm1
  addsd  0x8(%rsp),%xmm1
  movapd %xmm3,%xmm0
  mulsd  D37(%rip),%xmm1
  subsd  %xmm2,%xmm0
  divsd  D51(%rip),%xmm0
  movq   %xmm1,%r14
  cmp    $0x9,%r12d
  jle    L2
  movsd  %xmm3,0x28(%rsp)
  mov    $0x1,%r12d
  movsd  %xmm2,0x18(%rsp)
  call   <exp10@plt>
  pxor   %xmm0,%xmm0
  movq   %r14,%xmm1
  movsd  0x18(%rsp),%xmm2
  lea    0x1(%rax),%ecx
  mov    %r12d,%eax
  movsd  0x28(%rsp),%xmm3
  cltd
  idiv   %ecx
  movsd  %xmm3,0x18(%rsp)
  cvtsi2sd %eax,%xmm0
  subsd  %xmm0,%xmm1
  mulsd  0x10(%rsp),%xmm1
  addsd  %xmm2,%xmm1
  subsd  %xmm3,%xmm2
  divsd  D51(%rip),%xmm2
  movapd %xmm2,%xmm0
  movsd  %xmm1,0x20(%rsp)
  call   <exp10@plt>
  pxor   %xmm2,%xmm2
  movsd  D122(%rip),%xmm0
  subsd  0x8(%rsp),%xmm0
  lea    0x1(%rax),%ecx
  mov    %r12d,%eax
  movsd  0x18(%rsp),%xmm3
  movsd  0x20(%rsp),%xmm1
  mulsd  D37(%rip),%xmm0
  cltd
  idiv   %ecx
  cvtsi2sd %eax,%xmm2
  subsd  %xmm2,%xmm0
  mulsd  0x10(%rsp),%xmm0
  addsd  %xmm0,%xmm3
L61:
  movapd %xmm1,%xmm0
  movsd  %xmm3,0x8(%rsp)
  call   <rint@plt>
  movsd  0x8(%rsp),%xmm3
  mov    %eax,0x0(%rbp)
  movapd %xmm3,%xmm0
  call   <rint@plt>
  mov    %eax,(%rbx)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L2:
  movsd  D51(%rip),%xmm4
  mulsd  0x8(%rsp),%xmm4
  movapd %xmm2,%xmm1
  movsd  %xmm2,0x20(%rsp)
  mulsd  %xmm5,%xmm3
  movsd  %xmm5,0x18(%rsp)
  subsd  %xmm4,%xmm1
  movsd  D122(%rip),%xmm4
  addsd  %xmm5,%xmm4
  addsd  %xmm1,%xmm3
  divsd  %xmm4,%xmm3
  movsd  %xmm3,0x8(%rsp)
  call   <exp10@plt>
  pxor   %xmm1,%xmm1
  movq   %r14,%xmm0
  movsd  0x18(%rsp),%xmm5
  lea    0x1(%rax),%ecx
  mov    $0x1,%eax
  movsd  0x20(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  cltd
  idiv   %ecx
  cvtsi2sd %eax,%xmm1
  subsd  %xmm1,%xmm0
  movsd  0x10(%rsp),%xmm1
  mulsd  %xmm0,%xmm1
  mulsd  %xmm5,%xmm1
  divsd  D141(%rip),%xmm1
  addsd  %xmm2,%xmm1
  jmp    L61
  nopw   0x0(%rax,%rax,1)
L13:
  addsd  %xmm3,%xmm2
  movsd  0x8(%rsp),%xmm4
  mulsd  D37(%rip),%xmm2
  mulsd  D92(%rip),%xmm4
  mulsd  %xmm5,%xmm3
  addsd  D122(%rip),%xmm5
  movapd %xmm2,%xmm1
  addsd  %xmm4,%xmm1
  subsd  %xmm4,%xmm2
  addsd  %xmm6,%xmm1
  addsd  %xmm2,%xmm3
  divsd  %xmm0,%xmm1
  divsd  %xmm5,%xmm3
  jmp    L61
```

tool_calls: name: parse_data
arguments: data_tag: D135
type_infered: byte[8]
name: parse_data
arguments: data_tag: D122
type_infered: byte[8]
name: parse_data
arguments: data_tag: D51
type_infered: byte[8]
name: parse_data
arguments: data_tag: D37
type_infered: byte[8]
name: parse_data
arguments: data_tag: D141
type_infered: byte[8]
name: parse_data
arguments: data_tag: D92
type_infered: byte[8]

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

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

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

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

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

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