user: Please show me the C implementation that matches the assembly code listed below:

```asm
<conv_spherical_to_mercator>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  movss  %xmm0,-0x24(%rbp)
  movss  %xmm1,-0x28(%rbp)
  mov    %edi,-0x2c(%rbp)
  mov    %rsi,-0x38(%rbp)
  mov    %rdx,-0x40(%rbp)
  movss  -0x24(%rbp),%xmm0
  comiss D85(%rip),%xmm0
  ja     L32
  movss  D46(%rip),%xmm0
  comiss -0x24(%rbp),%xmm0
  jae    L32
  pxor   %xmm0,%xmm0
  cvtss2sd -0x28(%rbp),%xmm0
  comisd D129(%rip),%xmm0
  ja     L32
  pxor   %xmm1,%xmm1
  cvtss2sd -0x28(%rbp),%xmm1
  movsd  D9(%rip),%xmm0
  comisd %xmm1,%xmm0
  jb     L4
L32:
  movl   $0xf,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  je     L4
  mov    $0x14,%ecx
  lea    D92(%rip),%rax
  mov    %rax,%rdx
  lea    D86(%rip),%rax
  mov    %rax,%rsi
  lea    D103(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  nop
  mov    -0x14(%rbp),%eax
  jmp    L38
L4:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x24(%rbp),%xmm1
  movsd  D163(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D50(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x10(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x28(%rbp),%xmm1
  movsd  D163(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D50(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0xc(%rbp)
  movss  -0x10(%rbp),%xmm0
  movss  %xmm0,-0x8(%rbp)
  movss  -0xc(%rbp),%xmm0
  movss  D37(%rip),%xmm1
  divss  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D3(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <tan@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <log@plt>
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
  pxor   %xmm2,%xmm2
  cvtss2sd -0x8(%rbp),%xmm2
  movsd  %xmm2,-0x48(%rbp)
  mov    -0x2c(%rbp),%eax
  add    $0x7,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    D132(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  mulsd  -0x48(%rbp),%xmm0
  movsd  D163(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
  pxor   %xmm3,%xmm3
  cvtss2sd -0x4(%rbp),%xmm3
  movsd  %xmm3,-0x48(%rbp)
  mov    -0x2c(%rbp),%eax
  add    $0x7,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    D132(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  mulsd  -0x48(%rbp),%xmm0
  movsd  D163(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
L38:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D85
data_type: byte[4]
name: disassemble_data
arguments: data_label: D46
data_type: byte[4]
name: disassemble_data
arguments: data_label: D129
data_type: f64[2]
name: disassemble_data
arguments: data_label: D9
data_type: byte[8]
name: disassemble_data
arguments: data_label: D92
data_type: string
name: disassemble_data
arguments: data_label: D86
data_type: string
name: disassemble_data
arguments: data_label: D103
data_type: string
name: disassemble_data
arguments: data_label: D163
data_type: f64
name: disassemble_data
arguments: data_label: D50
data_type: byte[8]
name: disassemble_data
arguments: data_label: D37
data_type: byte[4]
name: disassemble_data
arguments: data_label: D3
data_type: byte[8]
name: disassemble_data
arguments: data_label: D132
data_type: byte[8]

tool: {"D85": [0x00,0x00,0x34,0x43]}

tool: {"D46": [0x00,0x00,0x34,0xc3]}

tool: {"D129": [85.05115,-85.05115]}

tool: {"D9": [0x30,0x4c,0xa6,0x0a,0x46,0x43,0x55,0xc0]}

tool: D92: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/javellej/LocationFinder/refs/heads/master/src/coordinates.c

tool: D86: conv_spherical_to_mercator

tool: D103: Exception raised in '%s' : file %s line %d


tool: D163: 3.14159265358979

tool: {"D50": [0x00,0x00,0x00,0x00,0x00,0x80,0x66,0x40]}

tool: {"D37": [0x00,0x00,0x00,0x40]}

tool: {"D3": [0x11,0x2d,0x44,0x54,0xfb,0x21,0xe9,0x3f]}

tool: {"D132": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40]}

assistant: ```c
int conv_spherical_to_mercator(float i_lng, float i_lat, int i_zoom, int *o_x, int *o_y) {
  int retCode;
  float lng_rd, lat_rd;
  float mer_x, mer_y;
  if ((i_lng > 180) || (i_lng <= -180) || (i_lat > 85.05115) || (i_lat <= -85.05115)) {
    do {
      retCode = (15);
      if (retCode) {
        printf("Exception raised in '%s' : file %s line %d\n", __func__, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/javellej/LocationFinder/refs/heads/master/src/coordinates.c", 20);
        goto ERROR;
      }
    } while (0);
  }
  lng_rd = i_lng * 3.14159265358979 / 180;
  lat_rd = i_lat * 3.14159265358979 / 180;
  mer_x = lng_rd;
  mer_y = log(tan(3.14159265358979 / 4 + lat_rd / 2));
  *o_x = (int)(mer_x * pow(2, i_zoom + 7) / 3.14159265358979);
  *o_y = (int)(mer_y * pow(2, i_zoom + 7) / 3.14159265358979);
  return 0;
ERROR:
  return retCode;
}
```