user: What would the C source look like for the assembly code provided here:

```asm
<ReadBearing>:
  endbr64
  push   %rbx
  sub    $0x40,%rsp
  mov    %rdi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x10(%rsp)
  movb   $0x0,0x20(%rsp)
  call   <strlen@plt>
  test   %eax,%eax
  jle    L164
  mov    %eax,%esi
  mov    $0x1,%eax
  mov    $0x0,%ecx
  jmp    L201
L5:
  movslq %ecx,%rdi
  mov    %dl,0x20(%rsp,%rdi,1)
  add    $0x1,%ecx
L110:
  mov    %eax,%edx
  add    $0x1,%rax
  cmp    %edx,%esi
  jle    L29
  cmp    $0x11,%edx
  jg     L29
L201:
  movzbl -0x1(%rbx,%rax,1),%edx
  cmp    $0x20,%dl
  je     L162
  cmp    $0xa,%dl
  jne    L5
L162:
  cmp    $0x20,%dl
  jne    L110
  cmpb   $0x20,(%rbx,%rax,1)
  je     L110
  test   %ecx,%ecx
  je     L110
  jmp    L5
L164:
  mov    $0x0,%ecx
L29:
  movslq %ecx,%rcx
  movb   $0x0,0x20(%rsp,%rcx,1)
  lea    0x20(%rsp),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L135
  lea    0x20(%rsp),%rdx
  lea    -0x1(%rax),%eax
  lea    0x21(%rsp,%rax,1),%rsi
  mov    $0x0,%eax
L15:
  cmpb   $0x20,(%rdx)
  sete   %cl
  movzbl %cl,%ecx
  add    %ecx,%eax
  add    $0x1,%rdx
  cmp    %rsi,%rdx
  jne    L15
  test   %eax,%eax
  je     L135
  cmp    $0x2,%eax
  jne    L144
  lea    0xc(%rsp),%rcx
  lea    0x8(%rsp),%rdx
  lea    0x20(%rsp),%rdi
  lea    0x18(%rsp),%r8
  lea    D69(%rip),%rsi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  js     L75
L62:
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0xc(%rsp),%xmm0
  divsd  D59(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x18(%rsp),%xmm1
  divsd  D19(%rip),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rsp)
  jmp    L183
L135:
  lea    0x10(%rsp),%rdx
  lea    0x20(%rsp),%rdi
  lea    D23(%rip),%rsi
  mov    $0x0,%eax
  call   <sscanf@plt>
L183:
  movsd  0x10(%rsp),%xmm0
  comisd D66(%rip),%xmm0
  jbe    L65
L153:
  movq   $0x0,0x10(%rsp)
L144:
  movsd  0x10(%rsp),%xmm0
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L155
  add    $0x40,%rsp
  pop    %rbx
  ret
L75:
  negl   0xc(%rsp)
  movsd  0x18(%rsp),%xmm0
  xorpd  D57(%rip),%xmm0
  movsd  %xmm0,0x18(%rsp)
  jmp    L62
L65:
  movsd  D38(%rip),%xmm1
  comisd %xmm0,%xmm1
  ja     L153
  jmp    L144
L155:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D69
type_infered: string
name: retrieve_data
arguments: data_label: D59
type_infered: f32[2]
name: retrieve_data
arguments: data_label: D19
type_infered: f32[2]
name: retrieve_data
arguments: data_label: D23
type_infered: string
name: retrieve_data
arguments: data_label: D66
type_infered: f64[2]
name: retrieve_data
arguments: data_label: D57
type_infered: f32[4]
name: retrieve_data
arguments: data_label: D38
type_infered: f32[2]

tool: D69: %d %d %lf

tool: {"D59": [0.0,3.21875]}

tool: {"D19": [0.0,5.37890625]}

tool: D23: %lf

tool: {"D66": [360.0,-360.0]}

tool: {"D57": [0.0,-0.0,0.0,0.0]}

tool: {"D38": [0.0,-3.8515625]}

assistant: ```c
double ReadBearing(input)
char *input;
{
  char string[20];
  double bearing = 0.0, seconds;
  int a, b, length, degrees, minutes;
  string[0] = 0;
  length = strlen(input);
  for (a = 0, b = 0; a < length && a < 18; a++) {
    if ((input[a] != 32 && input[a] != '\n') || (input[a] == 32 && input[a + 1] != 32 && b != 0)) {
      string[b] = input[a];
      b++;
    }
  }
  string[b] = 0;
  length = strlen(string);
  for (a = 0, b = 0; a < length; a++)
    if (string[a] == 32)
      b++;
  if (b == 0)
    sscanf(string, "%lf", &bearing);
  if (b == 2) {
    sscanf(string, "%d %d %lf", &degrees, &minutes, &seconds);
    if (degrees < 0.0) {
      minutes = -minutes;
      seconds = -seconds;
    }
    bearing = (double)degrees + ((double)minutes / 60) + (seconds / 3600);
  }
  if (bearing > 360.0 || bearing < -360.0)
    bearing = 0.0;
  return bearing;
}
```