user: What is the c source code of the assembly code below:

```asm
<calc_rudder_gain>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x5a,-0x14(%rbp)
  jle    L64
  movl   $0x5a,-0x14(%rbp)
L64:
  cmpl   $0x9,-0x14(%rbp)
  jg     L83
  mov    -0x14(%rbp),%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x4(%rbp)
L83:
  cmpl   $0x9,-0x14(%rbp)
  jle    L114
  cmpl   $0x13,-0x14(%rbp)
  jg     L114
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x14(%rbp),%xmm0
  movsd  D7(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
L114:
  cmpl   $0x13,-0x14(%rbp)
  jle    L131
  cmpl   $0x1d,-0x14(%rbp)
  jg     L131
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x4(%rbp)
L131:
  cmpl   $0x1d,-0x14(%rbp)
  jle    L74
  cmpl   $0x27,-0x14(%rbp)
  jg     L74
  mov    -0x14(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x4(%rbp)
L74:
  cmpl   $0x27,-0x14(%rbp)
  jle    L14
  cmpl   $0x31,-0x14(%rbp)
  jg     L14
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x14(%rbp),%xmm0
  movsd  D46(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
L14:
  cmpl   $0x31,-0x14(%rbp)
  jle    L111
  cmpl   $0x45,-0x14(%rbp)
  jg     L111
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x14(%rbp),%xmm0
  movsd  D40(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
L111:
  cmpl   $0x45,-0x14(%rbp)
  jle    L49
  cmpl   $0x59,-0x14(%rbp)
  jg     L49
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x14(%rbp),%xmm0
  movsd  D44(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
L49:
  cmpl   $0x59,-0x14(%rbp)
  jle    L52
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x14(%rbp),%xmm0
  movsd  D13(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
L52:
  pxor   %xmm0,%xmm0
  cvtss2sd -0x4(%rbp),%xmm0
  movsd  D5(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  movd   %eax,%xmm0
  call   <floor@plt>
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D7
type: f64
name: unpack_data
arguments: label: D46
type: f64
name: unpack_data
arguments: label: D40
type: f64
name: unpack_data
arguments: label: D44
type: f64
name: unpack_data
arguments: label: D13
type: f64
name: unpack_data
arguments: label: D5
type: f64

tool: D7: 3.5

tool: D46: 1.4

tool: D40: 1.3

tool: D44: 1.2

tool: D13: 1.1

tool: D5: 1.8

assistant: ```c
int calc_rudder_gain(int diff) {
  float gain;
  diff = abs(diff);
  if (diff > 90)
    diff = 90;
  if (diff < 10)
    gain = diff / 4;
  if (diff >= 10 && diff < 20)
    gain = diff / 3.5;
  if (diff >= 20 && diff < 30)
    gain = diff / 3;
  if (diff >= 30 && diff < 40)
    gain = diff / 2;
  if (diff >= 40 && diff < 50)
    gain = diff / 1.4;
  if (diff >= 50 && diff < 70)
    gain = diff / 1.3;
  if (diff >= 70 && diff < 90)
    gain = diff / 1.2;
  if (diff >= 90)
    gain = diff / 1.1;
  gain = gain / 1.8;
  return (int)floor(gain);
}
```