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

```asm
<wheelSwitchFormat>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x128,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r12
  mov    %rdx,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  movw   $0x20,0xe(%rsp)
  movl   $0x6,(%rsi)
  movl   $0x2,(%rdx)
  movss  D20(%rip),%xmm0
  call   <strchr@plt>
  test   %rax,%rax
  je     L135
  mov    %rax,%rbx
  movss  D36(%rip),%xmm0
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L135
  movb   $0x0,0x10(%rsp)
  mov    %rbx,%rdx
  sub    %r13,%rdx
  add    $0x1,%edx
  lea    0x10(%rsp),%rdi
  mov    %r13,%rsi
  call   <strncat@plt>
  lea    0x2(%rbx),%rax
  movabs $0x1200900000000,%rcx
  jmp    L137
L135:
  lea    0x10(%rsp),%rdi
  lea    D18(%rip),%rsi
  call   <strcpy@plt>
L43:
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L19
  add    $0x128,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L86:
  movb   $0x2b,0xe(%rsp)
L125:
  add    $0x1,%rax
L137:
  lea    -0x1(%rax),%rbx
  movzbl -0x1(%rax),%edx
  cmp    $0x2b,%dl
  je     L86
  cmp    $0x30,%dl
  ja     L107
  bt     %rdx,%rcx
  jb     L125
L107:
  lea    0xe(%rsp),%rsi
  lea    0x10(%rsp),%rdi
  call   <strcat@plt>
  mov    %rbp,%rcx
  mov    %r12,%rdx
  lea    D0(%rip),%rsi
  mov    %rbx,%rdi
  call   <sscanf@plt>
  cmp    $0x2,%eax
  je     L174
  cmp    $0x1,%eax
  je     L8
  movl   $0x6,(%r12)
  movl   $0x2,0x0(%rbp)
  jmp    L43
L174:
  cmpl   $0x0,(%r12)
  js     L102
L74:
  cmpl   $0x0,0x0(%rbp)
  js     L132
L181:
  mov    (%r12),%eax
  cmp    0x0(%rbp),%eax
  jg     L43
  sub    $0x1,%eax
  mov    $0x0,%edx
  cmovs  %edx,%eax
  mov    %eax,0x0(%rbp)
  jmp    L43
L102:
  movl   $0x6,(%r12)
  jmp    L74
L132:
  movl   $0x2,0x0(%rbp)
  jmp    L181
L8:
  cmpl   $0x0,(%r12)
  js     L127
  movl   $0x0,0x0(%rbp)
  jmp    L43
L127:
  movl   $0x6,(%r12)
  movl   $0x2,0x0(%rbp)
  jmp    L43
L19:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D20
data_type: byte[4]
name: disassemble_data
arguments: tag: D36
data_type: byte[4]
name: disassemble_data
arguments: tag: D18
data_type: string
name: disassemble_data
arguments: tag: D0
data_type: string

tool: {"D20": [0x00,0x00,0x14,0x42]}

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

tool: D18: % 6.2f

tool: D0: %d.%d

assistant: ```c
void wheelSwitchFormat(char *format, int *width, int *precision) {
  char *percent = NULL, *fpart = NULL, *ad;
  char format_used[255];
  char flag_char[2] = " ";
  int nparsed = 0;
  *width = 6;
  *precision = 2;
  percent = strchr(format, '%');
  if (percent != NULL) {
    fpart = strchr(percent, 'f');
  }
  if (percent == NULL || fpart == NULL) {
    strcpy(format_used, "% 6.2f");
  } else {
    format_used[0] = '\0';
    strncat(format_used, format, percent - format + 1);
    ad = percent + 1;
    while (1) {
      if (*ad == '+') {
        flag_char[0] = '+';
        ad++;
      } else if (*ad == ' ' || *ad == '#' || *ad == '0' || *ad == '-') {
        ad++;
      } else {
        break;
      }
    }
    strcat(format_used, flag_char);
    nparsed = sscanf(ad, "%d.%d", width, precision);
    if (nparsed == 2) {
      if (*width < 0)
        *width = 6;
      if (*precision < 0)
        *precision = 2;
      if (*precision > *width - 1)
        *precision = *width - 1;
      if (*precision < 0)
        *precision = 0;
    } else if (nparsed == 1) {
      if (*width < 0) {
        *width = 6;
        *precision = 2;
      } else {
        *precision = 0;
      }
    } else {
      *width = 6;
      *precision = 2;
    }
  }
}
```