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

```asm
<rdangle>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %edx,%eax
  mov    %rcx,-0x60(%rbp)
  mov    %al,-0x54(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D47(%rip),%rax
  mov    %rax,-0x18(%rbp)
  lea    D39(%rip),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L240
L123:
  addq   $0x1,-0x20(%rbp)
L240:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L143
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L123
L143:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L91
  mov    $0x0,%eax
  jmp    L204
L91:
  cmpb   $0x68,-0x54(%rbp)
  jne    L140
  movl   $0x1,-0x2c(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L48
  movl   $0xffffffff,-0x2c(%rbp)
  addq   $0x1,-0x20(%rbp)
L48:
  lea    -0x28(%rbp),%rsi
  lea    -0x38(%rbp),%rcx
  lea    -0x3c(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  mov    %rsi,%r8
  lea    D13(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    %eax,-0x30(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x2c(%rbp),%xmm1
  movsd  -0x28(%rbp),%xmm0
  movsd  D36(%rip),%xmm3
  movapd %xmm0,%xmm2
  divsd  %xmm3,%xmm2
  mov    -0x38(%rbp),%eax
  mov    %eax,%eax
  test   %rax,%rax
  js     L126
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L111
L126:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L111:
  addsd  %xmm2,%xmm0
  movsd  D36(%rip),%xmm3
  movapd %xmm0,%xmm2
  divsd  %xmm3,%xmm2
  mov    -0x3c(%rbp),%eax
  mov    %eax,%eax
  test   %rax,%rax
  js     L70
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L160
L70:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L160:
  addsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x60(%rbp),%rax
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x34(%rbp)
  jmp    L147
L110:
  addq   $0x1,-0x20(%rbp)
L32:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L133
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L110
  jmp    L133
L58:
  addq   $0x1,-0x20(%rbp)
L133:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L88
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L58
L88:
  addl   $0x1,-0x34(%rbp)
L147:
  mov    -0x34(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L32
  cmpl   $0x3,-0x30(%rbp)
  jne    L219
  movl   $0x1,-0x30(%rbp)
  jmp    L159
L219:
  movl   $0x0,-0x30(%rbp)
  jmp    L159
L140:
  mov    -0x60(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  lea    D57(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    %eax,-0x30(%rbp)
  jmp    L46
L134:
  addq   $0x1,-0x20(%rbp)
L46:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L159
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L134
L159:
  mov    -0x50(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x30(%rbp),%eax
L204:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L243
  call   <__stack_chk_fail@plt>
L243:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D47
datatype: string
name: extract_symbolic_data
arguments: data_tag: D39
datatype: string
name: extract_symbolic_data
arguments: data_tag: D13
datatype: string
name: extract_symbolic_data
arguments: data_tag: D36
datatype: f64
name: extract_symbolic_data
arguments: data_tag: D57
datatype: string

tool: D47:  	


tool: D39: +-.0123456789eE

tool: D13: %d %d %lf

tool: D36: 60

tool: D57: %lf

assistant: ```c
int rdangle(char *word, char **next, char unit, double *angle) {
  const char *blank = " \t\n";
  const char *number = "+-.0123456789eE";
  int i, ird, sgn;
  unsigned int deg, min;
  double sec;
  char *ch;
  ch = word;
  while (*ch && strchr(blank, *ch))
    ch++;
  if (!*ch)
    return (0);
  if (unit == 'h') {
    sgn = 1;
    if (*ch == '-') {
      sgn = -1;
      ch++;
    }
    ird = sscanf(ch, "%d %d %lf", &deg, &min, &sec);
    *angle = sgn * ((sec / 60. + min) / 60. + deg);
    for (i = 0; i < ird; i++) {
      while (*ch && strchr(blank, *ch))
        ch++;
      while (*ch && strchr(number, *ch))
        ch++;
    }
    if (ird == 3) {
      ird = 1;
    } else {
      ird = 0;
    }
  } else {
    ird = sscanf(ch, "%lf", angle);
    while (*ch && strchr(number, *ch))
      ch++;
  }
  *next = ch;
  return (ird);
}
```