user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r13
  pxor   %xmm0,%xmm0
  lea    D42(%rip),%rdi
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  lea    0xf(%rsp),%rsi
  movaps %xmm0,0x10(%rsp)
  call   <scanf@plt>
  movzbl 0xf(%rsp),%eax
  cmp    $0x68,%al
  je     L25
L48:
  cmp    $0x64,%al
  je     L116
L84:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L261
  add    $0x68,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L25:
  lea    0x51(%rsp),%rsi
  lea    D57(%rip),%rdi
  call   <scanf@plt>
  movzbl 0x52(%rsp),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  jbe    L243
  lea    -0x61(%rax),%edx
  cmp    $0x5,%dl
  ja     L26
  sub    $0x57,%eax
  movsbl %al,%eax
  mov    %eax,0x24(%rsp)
L26:
  movzbl 0x53(%rsp),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  jbe    L253
  lea    -0x61(%rax),%edx
  cmp    $0x5,%dl
  ja     L141
  sub    $0x57,%eax
  movsbl %al,%eax
  mov    %eax,0x28(%rsp)
L141:
  movzbl 0x54(%rsp),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  jbe    L102
  lea    -0x61(%rax),%edx
  cmp    $0x5,%dl
  ja     L72
  sub    $0x57,%eax
  movsbl %al,%eax
  mov    %eax,0x2c(%rsp)
L72:
  movzbl 0x55(%rsp),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  jbe    L188
  lea    -0x61(%rax),%edx
  cmp    $0x5,%dl
  ja     L128
  sub    $0x57,%eax
  movsbl %al,%eax
  mov    %eax,0x30(%rsp)
L128:
  movzbl 0x56(%rsp),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  jbe    L115
  lea    -0x61(%rax),%edx
  cmp    $0x5,%dl
  ja     L8
  sub    $0x57,%eax
  movsbl %al,%eax
  mov    %eax,0x34(%rsp)
L8:
  movzbl 0x57(%rsp),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  ja     L100
  movsbl %dl,%edx
  mov    %edx,0x38(%rsp)
L67:
  mov    0x24(%rsp),%esi
  mov    0x2c(%rsp),%edx
  lea    D55(%rip),%rdi
  xor    %eax,%eax
  mov    0x34(%rsp),%ecx
  shl    $0x4,%esi
  shl    $0x4,%edx
  add    0x28(%rsp),%esi
  add    0x30(%rsp),%edx
  shl    $0x4,%ecx
  add    0x38(%rsp),%ecx
  mov    %esi,0x14(%rsp)
  movsbl %sil,%esi
  mov    %edx,0x18(%rsp)
  movsbl %dl,%edx
  mov    %ecx,0x1c(%rsp)
  movsbl %cl,%ecx
  call   <printf@plt>
  movzbl 0xf(%rsp),%eax
  jmp    L48
L116:
  lea    0x47(%rsp),%rbp
  lea    D57(%rip),%r13
  xor    %ebx,%ebx
  lea    0x4c(%rsp),%r12
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    $0x1,%r12d
  call   <strcat@plt>
  jmp    L19
  nopl   0x0(%rax,%rax,1)
L332:
  movslq %r12d,%rdx
  mov    0x10(%rsp,%rdx,4),%ecx
  lea    (%rcx,%rcx,4),%ecx
  lea    -0x30(%rax,%rcx,2),%eax
  mov    %eax,0x10(%rsp,%rdx,4)
L83:
  add    $0x1,%rbx
L19:
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    %ebx,%eax
  jle    L76
  movsbl 0x0(%rbp,%rbx,1),%eax
  cmp    $0x2c,%al
  jne    L332
  add    $0x1,%r12d
  jmp    L83
L76:
  movss  D99(%rip),%xmm4
  lea    0x10(%rsp),%rax
  lea    0x51(%rsp),%rdx
  movss  D4(%rip),%xmm3
  movss  D34(%rip),%xmm2
  lea    0x1c(%rsp),%rdi
L57:
  mov    0x4(%rax),%ecx
  cmp    $0x10,%ecx
  jle    L256
  pxor   %xmm0,%xmm0
  mov    %ecx,%esi
  pxor   %xmm1,%xmm1
  cvtsi2ss %ecx,%xmm0
  sar    $0x4,%esi
  cvtsi2ss %esi,%xmm1
  lea    0x57(%rsi),%ecx
  mulss  %xmm4,%xmm0
  subss  %xmm1,%xmm0
  mulss  %xmm3,%xmm0
  cmp    $0x9,%esi
  jg     L198
  lea    0x30(%rsi),%ecx
L198:
  comiss %xmm0,%xmm2
  mov    %esi,0x4(%rax)
  mov    %cl,0x1(%rdx)
  jbe    L78
  addss  D20(%rip),%xmm0
  cvttss2si %xmm0,%esi
L305:
  add    $0x4,%rax
  mov    %sil,0x2(%rdx)
  add    $0x2,%rdx
  cmp    %rdi,%rax
  jne    L57
  movsbl 0x54(%rsp),%ecx
  movsbl 0x53(%rsp),%edx
  lea    D91(%rip),%rdi
  movsbl 0x52(%rsp),%esi
  push   %rax
  movsbl 0x5f(%rsp),%eax
  push   %rax
  movsbl 0x66(%rsp),%r9d
  xor    %eax,%eax
  movsbl 0x65(%rsp),%r8d
  call   <printf@plt>
  pop    %rdx
  pop    %rcx
  jmp    L84
L256:
  cmpl   $0x9,(%rax)
  movb   $0x30,0x1(%rdx)
  lea    0x57(%rcx),%esi
  jg     L305
  lea    0x30(%rcx),%esi
  jmp    L305
L78:
  addss  D0(%rip),%xmm0
  cvttss2si %xmm0,%esi
  jmp    L305
L243:
  movsbl %dl,%edx
  mov    %edx,0x24(%rsp)
  jmp    L26
L115:
  movsbl %dl,%edx
  mov    %edx,0x34(%rsp)
  jmp    L8
L188:
  movsbl %dl,%edx
  mov    %edx,0x30(%rsp)
  jmp    L128
L102:
  movsbl %dl,%edx
  mov    %edx,0x2c(%rsp)
  jmp    L72
L253:
  movsbl %dl,%edx
  mov    %edx,0x28(%rsp)
  jmp    L141
L100:
  lea    -0x61(%rax),%edx
  cmp    $0x5,%dl
  ja     L67
  sub    $0x57,%eax
  movsbl %al,%eax
  mov    %eax,0x38(%rsp)
  jmp    L67
L261:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D42
datatype: string
name: unpack_data
arguments: label: D57
datatype: string
name: unpack_data
arguments: label: D55
datatype: string
name: unpack_data
arguments: label: D99
datatype: byte[4]
name: unpack_data
arguments: label: D4
datatype: byte[4]
name: unpack_data
arguments: label: D34
datatype: byte[4]
name: unpack_data
arguments: label: D20
datatype: byte[4]
name: unpack_data
arguments: label: D91
datatype: string
name: unpack_data
arguments: label: D0
datatype: byte[4]

tool: D42: %c

tool: D57: %s

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


tool: {"D99": [0x00,0x00,0x80,0x3d]}

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

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

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

tool: D91: #%c%c%c%c%c%c


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

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;
}
```