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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x60(%rbp)
  movl   $0x0,-0x50(%rbp)
  movl   $0x0,-0x4c(%rbp)
  movl   $0x0,-0x48(%rbp)
  movl   $0x0,-0x44(%rbp)
  movl   $0x1,-0x5c(%rbp)
  lea    -0x61(%rbp),%rax
  mov    %rax,%rsi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movzbl -0x61(%rbp),%eax
  cmp    $0x68,%al
  jne    L45
  lea    -0xf(%rbp),%rax
  mov    %rax,%rsi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0x60(%rbp)
  jmp    L169
L220:
  mov    -0x60(%rbp),%eax
  cltq
  movzbl -0xf(%rbp,%rax,1),%eax
  cmp    $0x2f,%al
  jle    L83
  mov    -0x60(%rbp),%eax
  cltq
  movzbl -0xf(%rbp,%rax,1),%eax
  cmp    $0x39,%al
  jg     L83
  mov    -0x60(%rbp),%eax
  cltq
  movzbl -0xf(%rbp,%rax,1),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    -0x60(%rbp),%eax
  cltq
  mov    %edx,-0x40(%rbp,%rax,4)
L83:
  mov    -0x60(%rbp),%eax
  cltq
  movzbl -0xf(%rbp,%rax,1),%eax
  cmp    $0x60,%al
  jle    L211
  mov    -0x60(%rbp),%eax
  cltq
  movzbl -0xf(%rbp,%rax,1),%eax
  cmp    $0x66,%al
  jg     L211
  mov    -0x60(%rbp),%eax
  cltq
  movzbl -0xf(%rbp,%rax,1),%eax
  movsbl %al,%eax
  lea    -0x57(%rax),%edx
  mov    -0x60(%rbp),%eax
  cltq
  mov    %edx,-0x40(%rbp,%rax,4)
L211:
  addl   $0x1,-0x60(%rbp)
L169:
  cmpl   $0x6,-0x60(%rbp)
  jle    L220
  movl   $0x1,-0x60(%rbp)
  jmp    L48
L223:
  mov    -0x60(%rbp),%eax
  add    %eax,%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%edx
  mov    -0x60(%rbp),%eax
  add    %eax,%eax
  sub    $0x1,%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  shl    $0x4,%eax
  add    %eax,%edx
  mov    -0x60(%rbp),%eax
  cltq
  mov    %edx,-0x50(%rbp,%rax,4)
  addl   $0x1,-0x60(%rbp)
L48:
  cmpl   $0x3,-0x60(%rbp)
  jle    L223
  mov    -0x44(%rbp),%eax
  movsbl %al,%ecx
  mov    -0x48(%rbp),%eax
  movsbl %al,%edx
  mov    -0x4c(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L45:
  movzbl -0x61(%rbp),%eax
  cmp    $0x64,%al
  jne    L31
  lea    -0x19(%rbp),%rax
  mov    %rax,%rsi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x14(%rbp),%rax
  mov    %rax,%rsi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x14(%rbp),%rdx
  lea    -0x19(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x14(%rbp),%rax
  mov    %rax,%rsi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x14(%rbp),%rdx
  lea    -0x19(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  movl   $0x0,-0x60(%rbp)
  jmp    L125
L3:
  mov    -0x60(%rbp),%eax
  cltq
  movzbl -0x19(%rbp,%rax,1),%eax
  cmp    $0x2c,%al
  je     L65
  mov    -0x5c(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x60(%rbp),%eax
  cltq
  movzbl -0x19(%rbp,%rax,1),%eax
  movsbl %al,%eax
  add    %edx,%eax
  lea    -0x30(%rax),%edx
  mov    -0x5c(%rbp),%eax
  cltq
  mov    %edx,-0x50(%rbp,%rax,4)
  jmp    L201
L65:
  addl   $0x1,-0x5c(%rbp)
L201:
  addl   $0x1,-0x60(%rbp)
L125:
  lea    -0x19(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x60(%rbp)
  jl     L3
  movl   $0x0,-0x5c(%rbp)
  movl   $0x1,-0x60(%rbp)
  jmp    L139
L67:
  mov    -0x60(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  cmp    $0x10,%eax
  jle    L132
  mov    -0x60(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x58(%rbp)
  movss  -0x58(%rbp),%xmm0
  movss  D102(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x54(%rbp)
  mov    -0x60(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  lea    0xf(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x4,%eax
  mov    %eax,%edx
  mov    -0x60(%rbp),%eax
  cltq
  mov    %edx,-0x50(%rbp,%rax,4)
  mov    -0x60(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  pxor   %xmm2,%xmm2
  cvtsi2ss %eax,%xmm2
  movss  -0x54(%rbp),%xmm0
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D102(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x54(%rbp)
  mov    -0x60(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  cmp    $0x9,%eax
  jg     L66
  mov    -0x60(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  lea    0x30(%rax),%edx
  mov    -0x60(%rbp),%eax
  add    %eax,%eax
  sub    $0x1,%eax
  cltq
  mov    %dl,-0xf(%rbp,%rax,1)
  jmp    L46
L66:
  mov    -0x60(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  lea    0x57(%rax),%edx
  mov    -0x60(%rbp),%eax
  add    %eax,%eax
  sub    $0x1,%eax
  cltq
  mov    %dl,-0xf(%rbp,%rax,1)
L46:
  movss  D30(%rip),%xmm0
  comiss -0x54(%rbp),%xmm0
  jbe    L153
  movss  -0x54(%rbp),%xmm1
  movss  D46(%rip),%xmm0
  addss  %xmm1,%xmm0
  mov    -0x60(%rbp),%eax
  add    %eax,%eax
  cvttss2si %xmm0,%edx
  cltq
  mov    %dl,-0xf(%rbp,%rax,1)
  jmp    L30
L153:
  movss  -0x54(%rbp),%xmm1
  movss  D114(%rip),%xmm0
  addss  %xmm1,%xmm0
  mov    -0x60(%rbp),%eax
  add    %eax,%eax
  cvttss2si %xmm0,%edx
  cltq
  mov    %dl,-0xf(%rbp,%rax,1)
  jmp    L30
L132:
  mov    -0x60(%rbp),%eax
  add    %eax,%eax
  sub    $0x1,%eax
  cltq
  movb   $0x30,-0xf(%rbp,%rax,1)
  mov    -0x60(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  cmp    $0x9,%eax
  jg     L11
  mov    -0x60(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  lea    0x30(%rax),%edx
  mov    -0x60(%rbp),%eax
  add    %eax,%eax
  cltq
  mov    %dl,-0xf(%rbp,%rax,1)
  jmp    L30
L11:
  mov    -0x60(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  lea    0x57(%rax),%edx
  mov    -0x60(%rbp),%eax
  add    %eax,%eax
  cltq
  mov    %dl,-0xf(%rbp,%rax,1)
L30:
  addl   $0x1,-0x60(%rbp)
L139:
  cmpl   $0x3,-0x60(%rbp)
  jle    L67
  movzbl -0x9(%rbp),%eax
  movsbl %al,%esi
  movzbl -0xa(%rbp),%eax
  movsbl %al,%r8d
  movzbl -0xb(%rbp),%eax
  movsbl %al,%edi
  movzbl -0xc(%rbp),%eax
  movsbl %al,%ecx
  movzbl -0xd(%rbp),%eax
  movsbl %al,%edx
  movzbl -0xe(%rbp),%eax
  movsbl %al,%eax
  sub    $0x8,%rsp
  push   %rsi
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %eax,%esi
  lea    D74(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x10,%rsp
L31:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L144
  call   <__stack_chk_fail@plt>
L144:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D4
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D35
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D44
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D102
type_guessed: byte[4]
name: extract_symbolic_data
arguments: data_label: D30
type_guessed: byte[4]
name: extract_symbolic_data
arguments: data_label: D46
type_guessed: byte[4]
name: extract_symbolic_data
arguments: data_label: D114
type_guessed: byte[4]
name: extract_symbolic_data
arguments: data_label: D74
type_guessed: string

tool: D4: %c

tool: D35: %s

tool: D44: rgb(%d, %d, %d)


tool: {"D102": [0x00,0x00,0x80,0x41]}

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

tool: {"D46": [0x00,0x00,0x40,0x42]}

tool: {"D114": [0x00,0x00,0xae,0x42]}

tool: D74: #%c%c%c%c%c%c


assistant: ```c
int main() {
  char tip, hexa[7], decain[5], decain2[5];
  int i = 0, deca[4] = {0, 0, 0, 0}, hexanum[7], p = 1;
  float helper, tupezik;
  scanf("%c", &tip);
  if (tip == 'h') {
    scanf("%s", hexa);
    for (i = 0; i < 7; i++) {
      if (hexa[i] >= '0' && hexa[i] <= '9')
        hexanum[i] = hexa[i] - 48;
      if (hexa[i] >= 'a' && hexa[i] <= 'f')
        hexanum[i] = hexa[i] - 87;
    }
    for (i = 1; i < 4; i++) {
      deca[i] = hexanum[i * 2] + hexanum[i * 2 - 1] * 16;
    }
    printf("rgb(%d, %d, %d)\n", deca[1], deca[2], deca[3]);
  }
  if (tip == 'd') {
    scanf("%s", decain);
    scanf("%s", decain2);
    strcat(decain, decain2);
    scanf("%s", decain2);
    strcat(decain, decain2);
    for (i = 0; i < strlen(decain); i++) {
      if (decain[i] != ',')
        deca[p] = deca[p] * 10 + decain[i] - 48;
      else
        p++;
    }
    p = 0;
    for (i = 1; i <= 3; i++) {
      if (deca[i] > 16) {
        tupezik = deca[i];
        helper = tupezik / 16;
        deca[i] = deca[i] / 16;
        helper = (helper - deca[i]) * 16;
        if (deca[i] < 10) {
          hexa[i * 2 - 1] = deca[i] + 48;
        } else
          hexa[i * 2 - 1] = deca[i] + 87;
        if (helper < 10) {
          hexa[i * 2] = helper + 48;
        } else
          hexa[i * 2] = helper + 87;
      } else {
        hexa[i * 2 - 1] = '0';
        if (deca[i - 1] < 10) {
          hexa[i * 2] = deca[i] + 48;
        } else
          hexa[i * 2] = deca[i] + 87;
      }
    }
    printf("#%c%c%c%c%c%c\n", hexa[1], hexa[2], hexa[3], hexa[4], hexa[5], hexa[6]);
  }
  return 0;
}
```