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

```asm
<driveCalcMecPolarDegrees>:
  endbr64
  push   %r15
  movaps %xmm0,%xmm2
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  sub    $0x38,%rsp
  cmp    $0x168,%edi
  ja     L16
  movss  %xmm1,0x8(%rsp)
  mov    %rsi,%rbx
  mov    %rdx,%r12
  mov    %rcx,%r13
  mov    %r8,%r14
  mov    %r9,%r15
  movss  %xmm0,0x4(%rsp)
  call   <abs@plt>
  comiss D42(%rip),%xmm0
  movss  0x4(%rsp),%xmm2
  movss  0x8(%rsp),%xmm1
  jbe    L18
L16:
  add    $0x38,%rsp
  movaps %xmm2,%xmm0
  lea    D32(%rip),%rdi
  mov    %ebp,%esi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10c0 <writeDebugStream@plt>
  nopl   0x0(%rax,%rax,1)
L18:
  movaps %xmm1,%xmm0
  movss  %xmm2,0x8(%rsp)
  movss  %xmm1,0x4(%rsp)
  call   <abs@plt>
  comiss D42(%rip),%xmm0
  movss  0x4(%rsp),%xmm1
  movss  0x8(%rsp),%xmm2
  ja     L16
  pxor   %xmm4,%xmm4
  movsd  D38(%rip),%xmm0
  movss  %xmm1,0x18(%rsp)
  cvtsi2ss %ebp,%xmm4
  movss  %xmm2,0x10(%rsp)
  cvtss2sd %xmm4,%xmm4
  subsd  %xmm4,%xmm0
  movsd  %xmm4,0x8(%rsp)
  call   <cosDegrees@plt>
  movsd  0x8(%rsp),%xmm4
  movss  %xmm0,0x4(%rsp)
  movsd  D38(%rip),%xmm0
  addsd  %xmm4,%xmm0
  call   <cosDegrees@plt>
  movss  0x10(%rsp),%xmm2
  movss  0x4(%rsp),%xmm3
  movss  %xmm0,0x14(%rsp)
  movaps %xmm2,%xmm5
  movaps %xmm3,%xmm0
  movss  %xmm3,0x20(%rsp)
  mulss  %xmm3,%xmm5
  movss  %xmm2,0x8(%rsp)
  movss  %xmm5,0x4(%rsp)
  call   <abs@plt>
  movss  0x14(%rsp),%xmm4
  movss  0x8(%rsp),%xmm2
  movss  0x18(%rsp),%xmm1
  movaps %xmm0,%xmm6
  mulss  %xmm4,%xmm2
  movaps %xmm4,%xmm0
  mulss  %xmm1,%xmm6
  movss  %xmm1,0x10(%rsp)
  addss  0x4(%rsp),%xmm6
  movss  %xmm2,0x8(%rsp)
  movss  %xmm6,0x1c(%rsp)
  call   <abs@plt>
  movss  0x10(%rsp),%xmm1
  movss  0x8(%rsp),%xmm5
  movss  0x14(%rsp),%xmm4
  mulss  %xmm1,%xmm0
  movss  %xmm4,0x28(%rsp)
  addss  %xmm0,%xmm5
  movaps %xmm4,%xmm0
  movss  %xmm5,0x2c(%rsp)
  call   <abs@plt>
  movss  0x10(%rsp),%xmm1
  movss  0x8(%rsp),%xmm2
  movss  0x20(%rsp),%xmm3
  mulss  %xmm1,%xmm0
  movss  %xmm1,0x18(%rsp)
  movss  %xmm3,0x10(%rsp)
  subss  %xmm0,%xmm2
  movaps %xmm3,%xmm0
  movss  %xmm2,0x14(%rsp)
  call   <abs@plt>
  movss  0x18(%rsp),%xmm1
  movss  0x4(%rsp),%xmm7
  movss  0x1c(%rsp),%xmm6
  mulss  %xmm1,%xmm0
  movss  %xmm6,0x8(%rsp)
  subss  %xmm0,%xmm7
  movaps %xmm6,%xmm0
  movss  %xmm7,0x24(%rsp)
  call   <sgn@plt>
  movss  0x10(%rsp),%xmm3
  movss  0x8(%rsp),%xmm6
  movss  %xmm0,0x4(%rsp)
  movaps %xmm3,%xmm1
  movaps %xmm6,%xmm0
  movss  %xmm3,0x20(%rsp)
  call   <helpFindMinAbsFloat@plt>
  movss  0x4(%rsp),%xmm6
  movss  0x2c(%rsp),%xmm5
  mulss  %xmm0,%xmm6
  movaps %xmm5,%xmm0
  movss  %xmm5,0x8(%rsp)
  movss  %xmm6,0x1c(%rsp)
  call   <sgn@plt>
  movss  0x28(%rsp),%xmm4
  movss  0x8(%rsp),%xmm5
  movss  %xmm0,0x4(%rsp)
  movaps %xmm4,%xmm1
  movaps %xmm5,%xmm0
  movss  %xmm4,0x10(%rsp)
  call   <helpFindMinAbsFloat@plt>
  movss  0x4(%rsp),%xmm5
  movss  0x14(%rsp),%xmm2
  mulss  %xmm0,%xmm5
  movaps %xmm2,%xmm0
  movss  %xmm2,0x8(%rsp)
  movss  %xmm5,0x18(%rsp)
  call   <sgn@plt>
  movss  0x8(%rsp),%xmm2
  movss  0x10(%rsp),%xmm4
  movss  %xmm0,0x4(%rsp)
  movaps %xmm4,%xmm1
  movaps %xmm2,%xmm0
  movss  %xmm4,0x14(%rsp)
  call   <helpFindMinAbsFloat@plt>
  movss  0x4(%rsp),%xmm3
  movss  0x24(%rsp),%xmm7
  mulss  %xmm0,%xmm3
  movaps %xmm7,%xmm0
  movss  %xmm7,0x8(%rsp)
  movd   %xmm3,%ebp
  call   <sgn@plt>
  movss  0x20(%rsp),%xmm3
  movss  0x8(%rsp),%xmm7
  movss  %xmm0,0x4(%rsp)
  movaps %xmm3,%xmm1
  movaps %xmm7,%xmm0
  movss  %xmm3,0x10(%rsp)
  call   <helpFindMinAbsFloat@plt>
  movss  0x4(%rsp),%xmm6
  movss  0x14(%rsp),%xmm4
  movss  0x10(%rsp),%xmm3
  mulss  %xmm0,%xmm6
  movaps %xmm4,%xmm1
  movaps %xmm3,%xmm0
  movss  %xmm6,0x8(%rsp)
  call   <helpFindMaxAbsFloat@plt>
  pxor   %xmm7,%xmm7
  movss  0x1c(%rsp),%xmm6
  movaps %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ss %rbx,%xmm0
  divss  %xmm1,%xmm0
  cvttss2si %xmm0,%rax
  movaps %xmm6,%xmm0
  cvtsi2ss %rax,%xmm7
  mulss  %xmm7,%xmm0
  movss  %xmm7,0x4(%rsp)
  call   <round@plt>
  movss  0x18(%rsp),%xmm5
  mulss  0x4(%rsp),%xmm5
  mov    %rax,(%r12)
  movaps %xmm5,%xmm0
  call   <round@plt>
  movd   %ebp,%xmm3
  mulss  0x4(%rsp),%xmm3
  mov    %rax,0x0(%r13)
  movaps %xmm3,%xmm0
  call   <round@plt>
  movss  0x4(%rsp),%xmm0
  mulss  0x8(%rsp),%xmm0
  mov    %rax,(%r14)
  call   <round@plt>
  mov    %rax,(%r15)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D42
data_type: f32
name: disassemble_data
arguments: data_tag: D32
data_type: string
name: disassemble_data
arguments: data_tag: D38
data_type: f64

tool: D42: 1

tool: D32: Drive parameters do not fit constraints! Ang: %d, Pow: %f, Rot: %f

tool: D38: 45

assistant: ```c
void driveCalcMecPolarDegrees(int angle, float powerRatio, float rotationRatio, long maxRefVal, long *mecFL, long *mecBL, long *mecFR, long *mecBR) {
  if (angle > 360 || angle < 0 || abs(powerRatio) > 1.0 || abs(rotationRatio) > 1.0) {
    writeDebugStream("Drive parameters do not fit constraints! Ang: %d, Pow: %f, Rot: %f", angle, powerRatio, rotationRatio);
  } else {
    float maxPowFLBR = cosDegrees(45.0 - (float)angle);
    float maxPowFRBL = cosDegrees(45.0 + (float)angle);
    float powFL = (powerRatio * maxPowFLBR) + (rotationRatio * abs(maxPowFLBR));
    float powBL = (powerRatio * maxPowFRBL) + (rotationRatio * abs(maxPowFRBL));
    float powFR = (powerRatio * maxPowFRBL) - (rotationRatio * abs(maxPowFRBL));
    float powBR = (powerRatio * maxPowFLBR) - (rotationRatio * abs(maxPowFLBR));
    powFL = sgn(powFL) * helpFindMinAbsFloat(powFL, maxPowFLBR);
    powBL = sgn(powBL) * helpFindMinAbsFloat(powBL, maxPowFRBL);
    powFR = sgn(powFR) * helpFindMinAbsFloat(powFR, maxPowFRBL);
    powBR = sgn(powBR) * helpFindMinAbsFloat(powBR, maxPowFLBR);
    float absHighestPow = helpFindMaxAbsFloat(maxPowFLBR, maxPowFRBL);
    long multiplier = maxRefVal / absHighestPow;
    *mecFL = round(powFL * multiplier);
    *mecBL = round(powBL * multiplier);
    *mecFR = round(powFR * multiplier);
    *mecBR = round(powBR * multiplier);
  }
}
```