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

```asm
<BattleThree>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x4(%rbp)
  mov    %esi,-0x8(%rbp)
  mov    %rdx,-0x10(%rbp)
  mov    %rcx,-0x18(%rbp)
  mov    -0x8(%rbp),%eax
  add    %eax,%eax
  cmp    %eax,-0x4(%rbp)
  jle    L108
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%ecx
  movslq %ecx,%rax
  imul   $0x2e8ba2e9,%rax,%rax
  shr    $0x20,%rax
  sar    %eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  mov    %edx,%eax
  imul   -0x4(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  mov    %edx,%ecx
  sar    $0x5,%ecx
  sar    $0x1f,%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x1,%eax
  jmp    L61
L108:
  mov    -0x4(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jle    L88
  mov    $0x0,%eax
  call   <rand@plt>
  movslq %eax,%rdx
  imul   $0x10fef011,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x4,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0xf1,%edx,%ecx
  sub    %ecx,%eax
  mov    %eax,%edx
  lea    0xa(%rdx),%eax
  imul   -0x8(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  mov    %edx,%ecx
  sar    $0x5,%ecx
  sar    $0x1f,%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jg     L56
  cmpl   $0x5,-0x8(%rbp)
  jle    L56
  movl   $0x5,-0x8(%rbp)
  mov    $0x0,%eax
  jmp    L61
L56:
  mov    $0x1,%eax
  jmp    L61
L88:
  mov    -0x4(%rbp),%eax
  add    %eax,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L74
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%ecx
  movslq %ecx,%rax
  imul   $0x2e8ba2e9,%rax,%rax
  shr    $0x20,%rax
  sar    %eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  mov    %edx,%eax
  imul   -0x8(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  mov    %edx,%ecx
  sar    $0x5,%ecx
  sar    $0x1f,%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  jmp    L61
L74:
  mov    $0x0,%eax
  call   <rand@plt>
  movslq %eax,%rdx
  imul   $0x10fef011,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x4,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0xf1,%edx,%ecx
  sub    %ecx,%eax
  mov    %eax,%edx
  lea    0xa(%rdx),%eax
  imul   -0x4(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  mov    %edx,%ecx
  sar    $0x5,%ecx
  sar    $0x1f,%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jg     L19
  cmpl   $0x5,-0x4(%rbp)
  jle    L19
  movl   $0x5,-0x4(%rbp)
  mov    $0x1,%eax
  jmp    L61
L19:
  mov    $0x0,%eax
L61:
  leave
  ret
```

assistant: ```c
int BattleThree(int atkForce, int defForce, int *atkSurvivors, int *defSurvivors) {
  if (atkForce > 2 * defForce) {
    *defSurvivors = defForce - (atkForce * (rand() % 11)) / 100;
    return 1;
  } else if (atkForce > defForce) {
    *atkSurvivors = atkForce - (defForce * (10 + rand() % 241)) / 100;
    if ((*atkSurvivors <= 0) && (defForce > 5)) {
      defForce = 5;
      return 0;
    } else
      return 1;
  } else if (defForce >= 2 * atkForce) {
    *atkSurvivors = atkForce - (defForce * (rand() % 11)) / 100;
    return 0;
  } else {
    *defSurvivors = defForce - (atkForce * (10 + rand() % 241)) / 100;
    if ((*defSurvivors <= 0) && (atkForce > 5)) {
      atkForce = 5;
      return 1;
    } else
      return 0;
  }
}
```