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

```asm
<RunGea>:
  endbr64
  push   %r15
  mov    $0x2,%edi
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbp
  lea    0x30(%rsp),%rbx
  call   <MesFil@plt>
  movb   $0x0,0xf(%rsp)
  movb   $0x0,0xe(%rsp)
  jmp    L75
  nopl   0x0(%rax,%rax,1)
L35:
  add    $0x1,%r12d
L1:
  movzwl 0x30(%rsp),%esi
  mov    %eax,%edx
  mov    %esi,%r8d
  sub    %esi,%edx
  sub    %eax,%r8d
  cmp    %ax,%si
  mov    %r8d,%eax
  cmovle %edx,%eax
  cmp    $0x10,%ax
  jbe    L37
  add    $0x1,%r14d
  cmp    $0x9,%dil
  je     L12
L31:
  add    $0x1,%r13
L75:
  xor    %esi,%esi
  mov    $0x194,%edi
  call   <RegWriteA@plt>
  xor    %esi,%esi
  mov    $0x195,%edi
  call   <RegWriteA@plt>
  mov    $0x2,%esi
  mov    $0x1000,%edi
  call   <ClrGyr@plt>
  xor    %esi,%esi
  mov    $0x144a,%edi
  call   <GenMes@plt>
  xor    %esi,%esi
  mov    $0x194,%edi
  mov    %ax,0x0(%rbp,%r13,2)
  mov    %rax,%r15
  call   <RegWriteA@plt>
  xor    %esi,%esi
  mov    $0x195,%edi
  call   <RegWriteA@plt>
  mov    $0x2,%esi
  mov    $0x1000,%edi
  call   <ClrGyr@plt>
  mov    $0x14ca,%edi
  xor    %esi,%esi
  call   <GenMes@plt>
  mov    %r13d,%edi
  mov    %ax,(%rbx,%r13,2)
  test   %r13,%r13
  je     L31
  movzwl 0x10(%rsp),%r8d
  mov    %r15d,%esi
  mov    %r8d,%r9d
  sub    %r8d,%esi
  sub    %r15d,%r9d
  cmp    %r15w,%r8w
  mov    %r9d,%edx
  cmovle %esi,%edx
  cmp    $0x10,%dx
  ja     L35
  cmp    $0x1,%dx
  adcb   $0x0,0xe(%rsp)
  jmp    L1
  nopl   0x0(%rax,%rax,1)
L37:
  cmp    $0x1,%ax
  adcb   $0x0,0xf(%rsp)
  cmp    $0x9,%dil
  jne    L31
L12:
  cmp    $0x1,%r12b
  sbb    %edx,%edx
  and    $0xfffffffc,%edx
  add    $0xe,%edx
  cmp    $0x1,%r12b
  sbb    %eax,%eax
  and    $0xfffffffc,%eax
  add    $0x6,%eax
  cmpb   $0x9,0xe(%rsp)
  cmovae %edx,%eax
  mov    %eax,%edx
  or     $0x12,%edx
  test   %r14b,%r14b
  cmovne %edx,%eax
  mov    %eax,%edx
  or     $0x22,%edx
  cmpb   $0x8,0xf(%rsp)
  cmova  %edx,%eax
  mov    0x48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L79
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L79:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
unsigned char RunGea(void) {
  unsigned char UcRst, UcCnt, UcXLowCnt, UcYLowCnt, UcXHigCnt, UcYHigCnt;
  unsigned short UsGxoVal[10], UsGyoVal[10], UsDif;
  UcRst = 0x02;
  UcXLowCnt = UcYLowCnt = UcXHigCnt = UcYHigCnt = 0;
  MesFil(2);
  for (UcCnt = 0; UcCnt < 10; UcCnt++) {
    RegWriteA(0x0194, 0x00);
    RegWriteA(0x0195, 0x00);
    ClrGyr(0x1000, 0x02);
    UsGxoVal[UcCnt] = (unsigned short)GenMes(0x144A, 0);
    RegWriteA(0x0194, 0x00);
    RegWriteA(0x0195, 0x00);
    ClrGyr(0x1000, 0x02);
    UsGyoVal[UcCnt] = (unsigned short)GenMes(0x14CA, 0);
    if (UcCnt > 0) {
      if ((short)UsGxoVal[0] > (short)UsGxoVal[UcCnt]) {
        UsDif = (unsigned short)((short)UsGxoVal[0] - (short)UsGxoVal[UcCnt]);
      } else {
        UsDif = (unsigned short)((short)UsGxoVal[UcCnt] - (short)UsGxoVal[0]);
      }
      if (UsDif > 0x0010) {
        UcXHigCnt++;
      }
      if (UsDif < 0x0001) {
        UcXLowCnt++;
      }
      if ((short)UsGyoVal[0] > (short)UsGyoVal[UcCnt]) {
        UsDif = (unsigned short)((short)UsGyoVal[0] - (short)UsGyoVal[UcCnt]);
      } else {
        UsDif = (unsigned short)((short)UsGyoVal[UcCnt] - (short)UsGyoVal[0]);
      }
      if (UsDif > 0x0010) {
        UcYHigCnt++;
      }
      if (UsDif < 0x0001) {
        UcYLowCnt++;
      }
    }
  }
  if (UcXHigCnt >= 1) {
    UcRst = UcRst | 0x06;
  }
  if (UcXLowCnt > 8) {
    UcRst = UcRst | 0x0A;
  }
  if (UcYHigCnt >= 1) {
    UcRst = UcRst | 0x12;
  }
  if (UcYLowCnt > 8) {
    UcRst = UcRst | 0x22;
  }
  return (UcRst);
}
```