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

```asm
<main>:
  endbr64
  push   %r15
  lea    D55(%rip),%r15
  push   %r14
  lea    D90(%rip),%r14
  push   %r13
  lea    D12(%rip),%r13
  push   %r12
  lea    D83(%rip),%r12
  push   %rbp
  lea    D118(%rip),%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rbx
  jmp    L71
  nopl   0x0(%rax)
L23:
  cmp    $0x1,%eax
  je     L24
  cmp    $0x2,%eax
  je     L80
  cmp    $0x3,%eax
  je     L77
  cmp    $0x4,%eax
  je     L52
  lea    D208(%rip),%rdi
  call   <puts@plt>
L90:
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  je     L113
L71:
  mov    %r15,%rdi
  call   <puts@plt>
  mov    %r14,%rdi
  call   <puts@plt>
  mov    %r13,%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  mov    %rbx,%rsi
  lea    D188(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jne    L23
  lea    D129(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jne    L71
L113:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L53
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L24:
  lea    D40(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  lea    D39(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  movss  0xc(%rsp),%xmm0
  call   <perimetros_tetragonou@plt>
  lea    D16(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  jmp    L90
  nopw   0x0(%rax,%rax,1)
L52:
  lea    D197(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  lea    D39(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  movss  0xc(%rsp),%xmm0
  call   <perimetros_kykloy@plt>
  lea    D212(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  jmp    L90
  nopw   0x0(%rax,%rax,1)
L80:
  lea    D163(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x14(%rsp),%rdx
  lea    0x10(%rsp),%rsi
  xor    %eax,%eax
  lea    D33(%rip),%rdi
  call   <scanf@plt>
  movss  0x14(%rsp),%xmm1
  movss  0x10(%rsp),%xmm0
  call   <perimetros_parllhlogrammou@plt>
  lea    D6(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  jmp    L90
  nopl   (%rax)
L77:
  lea    D62(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  lea    D39(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  lea    D108(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x14(%rsp),%rsi
  lea    D39(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  movss  0x14(%rsp),%xmm1
  movss  0x10(%rsp),%xmm0
  call   <perimetros_trigwnou@plt>
  lea    D86(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  jmp    L90
L53:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D55
type_infered: string
name: parse_data
arguments: data_tag: D90
type_infered: string
name: parse_data
arguments: data_tag: D12
type_infered: string
name: parse_data
arguments: data_tag: D83
type_infered: string
name: parse_data
arguments: data_tag: D118
type_infered: string
name: parse_data
arguments: data_tag: D208
type_infered: string
name: parse_data
arguments: data_tag: D188
type_infered: string
name: parse_data
arguments: data_tag: D129
type_infered: string
name: parse_data
arguments: data_tag: D40
type_infered: string
name: parse_data
arguments: data_tag: D39
type_infered: string
name: parse_data
arguments: data_tag: D16
type_infered: string
name: parse_data
arguments: data_tag: D197
type_infered: string
name: parse_data
arguments: data_tag: D212
type_infered: string
name: parse_data
arguments: data_tag: D163
type_infered: string
name: parse_data
arguments: data_tag: D33
type_infered: string
name: parse_data
arguments: data_tag: D6
type_infered: string
name: parse_data
arguments: data_tag: D62
type_infered: string
name: parse_data
arguments: data_tag: D108
type_infered: string
name: parse_data
arguments: data_tag: D86
type_infered: string

tool: D55: 0. Ejodos

tool: D90: 1. Tetragono

tool: D12: 2. Parallhlogrammo

tool: D83: 3. Orthogonio trigono

tool: D118: 4. Kyklos

tool: D208: Lathos epilogh! 

tool: D188: %d

tool: D129: To programma termatisthke

tool: D40: Dwse pleura tetragonou:

tool: D39: %f

tool: D16: 
H perimetros tetragonou einai:%.2f


tool: D197: Dwse aktina kykloy:

tool: D212: H perimetros kykloy einai:%.2f


tool: D163: Dwse vash kai ypsos parallhlogrammou:

tool: D33: %f%f

tool: D6: 
H perimetros parallhlogrammou einai:%.2f


tool: D62: Dwse to mhkos ths mias kathetou:

tool: D108: Dwse to mhkos ths allhs kathetou:

tool: D86: 
H perimetros trigwnoy einai:%.2f


assistant: ```c
main() {
  int choice;
  float a, b, y;
  do {
    printf("0. Ejodos\n");
    printf("1. Tetragono\n");
    printf("2. Parallhlogrammo\n");
    printf("3. Orthogonio trigono\n");
    printf("4. Kyklos\n");
    scanf("%d", &choice);
    if (choice == 0)
      printf("To programma termatisthke\n");
    else if (choice == 1) {
      printf("Dwse pleura tetragonou:");
      scanf("%f", &a);
      printf("\nH perimetros tetragonou einai:%.2f\n", perimetros_tetragonou(a));
    } else if (choice == 2) {
      printf("Dwse vash kai ypsos parallhlogrammou:");
      scanf("%f%f", &b, &y);
      printf("\nH perimetros parallhlogrammou einai:%.2f\n", perimetros_parllhlogrammou(b, y));
    } else if (choice == 3) {
      printf("Dwse to mhkos ths mias kathetou:");
      scanf("%f", &b);
      printf("Dwse to mhkos ths allhs kathetou:");
      scanf("%f", &y);
      printf("\nH perimetros trigwnoy einai:%.2f\n", perimetros_trigwnou(b, y));
    } else if (choice == 4) {
      printf("Dwse aktina kykloy:");
      scanf("%f", &a);
      printf("H perimetros kykloy einai:%.2f\n", perimetros_kykloy(a));
    } else
      printf("Lathos epilogh! \n");
  } while (choice);
  return 0;
}
```