user: Converte this assembly snippet into its equivalent C code:

```asm
<local_compensation>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  mov    %eax,-0x14(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x14(%rbp),%xmm0
  movss  D338(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x8(%rbp)
  movss  -0x8(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comiss %xmm1,%xmm0
  jb     L77
  movss  D458(%rip),%xmm0
  comiss -0x8(%rbp),%xmm0
  jb     L77
  movss  -0x8(%rbp),%xmm1
  movss  D53(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  D458(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  movss  -0x4(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L40
L77:
  movss  -0x8(%rbp),%xmm0
  comiss D458(%rip),%xmm0
  jbe    L165
  movss  D183(%rip),%xmm0
  comiss -0x8(%rbp),%xmm0
  jb     L165
  movss  -0x8(%rbp),%xmm0
  movss  D458(%rip),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D110(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  D458(%rip),%xmm2
  movaps %xmm0,%xmm1
  divss  %xmm2,%xmm1
  movss  D53(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  movss  -0x4(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L40
L165:
  movss  -0x8(%rbp),%xmm0
  comiss D183(%rip),%xmm0
  jbe    L96
  movss  D303(%rip),%xmm0
  comiss -0x8(%rbp),%xmm0
  jb     L96
  movss  -0x8(%rbp),%xmm0
  movss  D183(%rip),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D109(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  D183(%rip),%xmm2
  movaps %xmm0,%xmm1
  divss  %xmm2,%xmm1
  movss  D109(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  movss  -0x4(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L40
L96:
  movss  -0x8(%rbp),%xmm0
  comiss D303(%rip),%xmm0
  jbe    L151
  movss  D197(%rip),%xmm0
  comiss -0x8(%rbp),%xmm0
  jb     L151
  movss  -0x8(%rbp),%xmm0
  movss  D303(%rip),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D353(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  D183(%rip),%xmm2
  movaps %xmm0,%xmm1
  divss  %xmm2,%xmm1
  movss  D499(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  movss  -0x4(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L40
L151:
  movss  -0x8(%rbp),%xmm0
  comiss D197(%rip),%xmm0
  jbe    L166
  movss  D434(%rip),%xmm0
  comiss -0x8(%rbp),%xmm0
  jb     L166
  movss  -0x8(%rbp),%xmm0
  movss  D197(%rip),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D353(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  D183(%rip),%xmm2
  movaps %xmm0,%xmm1
  divss  %xmm2,%xmm1
  movss  D97(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  movss  -0x4(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L40
L166:
  movss  -0x8(%rbp),%xmm0
  comiss D434(%rip),%xmm0
  jbe    L210
  movss  D18(%rip),%xmm0
  comiss -0x8(%rbp),%xmm0
  jb     L210
  movss  -0x8(%rbp),%xmm0
  movss  D434(%rip),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D517(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  D183(%rip),%xmm2
  movaps %xmm0,%xmm1
  divss  %xmm2,%xmm1
  movss  D410(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  movss  -0x4(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L40
L210:
  movss  -0x8(%rbp),%xmm0
  comiss D18(%rip),%xmm0
  jbe    L83
  movss  D386(%rip),%xmm0
  comiss -0x8(%rbp),%xmm0
  jb     L83
  movss  -0x8(%rbp),%xmm0
  movss  D18(%rip),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D517(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  D183(%rip),%xmm2
  movaps %xmm0,%xmm1
  divss  %xmm2,%xmm1
  movss  D123(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  movss  -0x4(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L40
L83:
  movss  -0x8(%rbp),%xmm0
  comiss D386(%rip),%xmm0
  jbe    L251
  movss  D40(%rip),%xmm0
  comiss -0x8(%rbp),%xmm0
  jb     L251
  movss  -0x8(%rbp),%xmm0
  movss  D386(%rip),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D390(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  D303(%rip),%xmm2
  movaps %xmm0,%xmm1
  divss  %xmm2,%xmm1
  movss  D243(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  movss  -0x4(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L40
L251:
  movss  -0x8(%rbp),%xmm0
  comiss D40(%rip),%xmm0
  jbe    L65
  movss  D446(%rip),%xmm0
  comiss -0x8(%rbp),%xmm0
  jb     L65
  movss  -0x8(%rbp),%xmm0
  movss  D40(%rip),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D442(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  D451(%rip),%xmm2
  movaps %xmm0,%xmm1
  divss  %xmm2,%xmm1
  movss  D354(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  movss  -0x4(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L40
L65:
  movl   $0x0,-0xc(%rbp)
L40:
  mov    -0xc(%rbp),%eax
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: label: D338
type: byte[4]
name: parse_data
arguments: label: D458
type: byte[4]
name: parse_data
arguments: label: D53
type: byte[4]
name: parse_data
arguments: label: D183
type: byte[4]
name: parse_data
arguments: label: D110
type: byte[4]
name: parse_data
arguments: label: D303
type: byte[4]
name: parse_data
arguments: label: D109
type: byte[4]
name: parse_data
arguments: label: D197
type: byte[4]
name: parse_data
arguments: label: D353
type: byte[4]
name: parse_data
arguments: label: D499
type: byte[4]
name: parse_data
arguments: label: D434
type: byte[4]
name: parse_data
arguments: label: D97
type: byte[4]
name: parse_data
arguments: label: D18
type: byte[4]
name: parse_data
arguments: label: D517
type: byte[4]
name: parse_data
arguments: label: D410
type: byte[4]
name: parse_data
arguments: label: D386
type: byte[4]
name: parse_data
arguments: label: D123
type: byte[4]
name: parse_data
arguments: label: D40
type: byte[4]
name: parse_data
arguments: label: D390
type: byte[4]
name: parse_data
arguments: label: D243
type: byte[4]
name: parse_data
arguments: label: D446
type: byte[4]
name: parse_data
arguments: label: D442
type: byte[4]
name: parse_data
arguments: label: D451
type: byte[4]
name: parse_data
arguments: label: D354
type: byte[4]

tool: {"D338": [0x00,0x00,0x00,0x42]}

tool: {"D458": [0x00,0x00,0xa0,0x40]}

tool: {"D53": [0x00,0x00,0xc8,0x41]}

tool: {"D183": [0x00,0x00,0x20,0x41]}

tool: {"D110": [0x00,0x00,0xd0,0x41]}

tool: {"D303": [0x00,0x00,0xa0,0x41]}

tool: {"D109": [0x00,0x00,0x4c,0x42]}

tool: {"D197": [0x00,0x00,0xf0,0x41]}

tool: {"D353": [0x00,0x00,0x50,0x42]}

tool: {"D499": [0x00,0x00,0xcc,0x42]}

tool: {"D434": [0x00,0x00,0x20,0x42]}

tool: {"D97": [0x00,0x00,0x1a,0x43]}

tool: {"D18": [0x00,0x00,0x48,0x42]}

tool: {"D517": [0x00,0x00,0x54,0x42]}

tool: {"D410": [0x00,0x00,0x4e,0x43]}

tool: {"D386": [0x00,0x00,0x70,0x42]}

tool: {"D123": [0x00,0x80,0x81,0x43]}

tool: {"D40": [0x00,0x00,0xa0,0x42]}

tool: {"D390": [0x00,0x00,0xd4,0x42]}

tool: {"D243": [0x00,0x00,0x9c,0x43]}

tool: {"D446": [0x00,0x00,0xfa,0x42]}

tool: {"D442": [0x00,0x00,0x6e,0x43]}

tool: {"D451": [0x00,0x00,0x34,0x42]}

tool: {"D354": [0x00,0x00,0xd1,0x43]}

assistant: ```c
int local_compensation(int local_code) {
  float tmp, local_temp;
  int comp;
  local_code = local_code / 4;
  local_temp = (float)local_code / 32;
  if (local_temp >= 0 && local_temp <= 5) {
    tmp = (0x0019 * local_temp) / 5;
    comp = tmp;
  } else if (local_temp > 5 && local_temp <= 10) {
    tmp = (0x001A * (local_temp - 5)) / 5 + 0x0019;
    comp = tmp;
  } else if (local_temp > 10 && local_temp <= 20) {
    tmp = (0x0033 * (local_temp - 10)) / 10 + 0x0033;
    comp = tmp;
  } else if (local_temp > 20 && local_temp <= 30) {
    tmp = (0x0034 * (local_temp - 20)) / 10 + 0x0066;
    comp = tmp;
  } else if (local_temp > 30 && local_temp <= 40) {
    tmp = (0x0034 * (local_temp - 30)) / 10 + 0x009A;
    comp = tmp;
  } else if (local_temp > 40 && local_temp <= 50) {
    tmp = (0x0035 * (local_temp - 40)) / 10 + 0x00CE;
    comp = tmp;
  } else if (local_temp > 50 && local_temp <= 60) {
    tmp = (0x0035 * (local_temp - 50)) / 10 + 0x0103;
    comp = tmp;
  } else if (local_temp > 60 && local_temp <= 80) {
    tmp = (0x006A * (local_temp - 60)) / 20 + 0x0138;
    comp = tmp;
  } else if (local_temp > 80 && local_temp <= 125) {
    tmp = (0x00EE * (local_temp - 80)) / 45 + 0x01A2;
    comp = tmp;
  } else {
    comp = 0;
  }
  return comp;
}
```