user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
L40:
  lea    D167(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D140(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D166(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D97(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D86(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D131(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x11(%rbp),%rax
  mov    %rax,%rsi
  lea    D160(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  movzbl -0x11(%rbp),%eax
  cmp    $0x30,%al
  jne    L53
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L40
L53:
  movzbl -0x11(%rbp),%eax
  cmp    $0x31,%al
  jne    L78
  lea    D163(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x10(%rbp),%eax
  movd   %eax,%xmm0
  call   <ytetr@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L40
L78:
  movzbl -0x11(%rbp),%eax
  cmp    $0x32,%al
  jne    L93
  lea    D95(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0xc(%rbp),%rdx
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D164(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movss  -0xc(%rbp),%xmm0
  mov    -0x10(%rbp),%eax
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <yparal@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D176(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L40
L93:
  movzbl -0x11(%rbp),%eax
  cmp    $0x33,%al
  jne    L65
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0xc(%rbp),%rdx
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D164(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movss  -0xc(%rbp),%xmm0
  mov    -0x10(%rbp),%eax
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <yotrig@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D161(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L40
L65:
  movzbl -0x11(%rbp),%eax
  cmp    $0x34,%al
  jne    L40
  lea    D59(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x10(%rbp),%eax
  movd   %eax,%xmm0
  call   <ykykl@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L40
```

tool_calls: name: unpack_data
arguments: data_tag: D167
type_infered: string
name: unpack_data
arguments: data_tag: D140
type_infered: string
name: unpack_data
arguments: data_tag: D166
type_infered: string
name: unpack_data
arguments: data_tag: D97
type_infered: string
name: unpack_data
arguments: data_tag: D86
type_infered: string
name: unpack_data
arguments: data_tag: D24
type_infered: string
name: unpack_data
arguments: data_tag: D131
type_infered: string
name: unpack_data
arguments: data_tag: D160
type_infered: string
name: unpack_data
arguments: data_tag: D163
type_infered: string
name: unpack_data
arguments: data_tag: D28
type_infered: string
name: unpack_data
arguments: data_tag: D135
type_infered: string
name: unpack_data
arguments: data_tag: D95
type_infered: string
name: unpack_data
arguments: data_tag: D164
type_infered: string
name: unpack_data
arguments: data_tag: D176
type_infered: string
name: unpack_data
arguments: data_tag: D54
type_infered: string
name: unpack_data
arguments: data_tag: D161
type_infered: string
name: unpack_data
arguments: data_tag: D59
type_infered: string
name: unpack_data
arguments: data_tag: D148
type_infered: string

tool: D167: Menu epilogwn ypologismoy perimetroy

tool: D140: 0. Exodos

tool: D166: 1. Tetragwno

tool: D97: 2. Parallhlogrammo

tool: D86: 3. Orthogwnio trigwno

tool: D24: 4. Kyklos

tool: D131: Eisagete thn epilogh sas: 

tool: D160:  %c

tool: D163: Dwste to mhkos ths pleyras toy tetragwnoy: 

tool: D28: %f

tool: D135: H perimetros toy tetragwnoy einai: %f

tool: D95: Dwste to mhkos kai to platos toy parallhlogrammoy: 

tool: D164: %f %f

tool: D176: H perimetros toy parallhlogrammoy einai: %f

tool: D54: Dwste to mhkos twn 2 kathetwn pleyrwn toy orthogwnioy trigwnoy: 

tool: D161: H perimetros toy orthogwnioy trigwnoy einai: %f

tool: D59: Dwste to mhkos ths aktinas toy kykloy: 

tool: D148: H perimetros toy kykloy einai: %f

assistant: ```c
int main() {
  char choice;
  float t1, t2;
  while (1) {
    printf("Menu epilogwn ypologismoy perimetroy\n");
    printf("0. Exodos\n");
    printf("1. Tetragwno\n");
    printf("2. Parallhlogrammo\n");
    printf("3. Orthogwnio trigwno\n");
    printf("4. Kyklos\n");
    printf("Eisagete thn epilogh sas: ");
    scanf(" %c", &choice);
    printf("\n");
    if (choice == '0') {
      exit(0);
    } else if (choice == '1') {
      printf("Dwste to mhkos ths pleyras toy tetragwnoy: ");
      scanf("%f", &t1);
      printf("H perimetros toy tetragwnoy einai: %f", ytetr(t1));
      exit(0);
    } else if (choice == '2') {
      printf("Dwste to mhkos kai to platos toy parallhlogrammoy: ");
      scanf("%f %f", &t1, &t2);
      printf("H perimetros toy parallhlogrammoy einai: %f", yparal(t1, t2));
      exit(0);
    } else if (choice == '3') {
      printf("Dwste to mhkos twn 2 kathetwn pleyrwn toy orthogwnioy trigwnoy: ");
      scanf("%f %f", &t1, &t2);
      printf("H perimetros toy orthogwnioy trigwnoy einai: %f", yotrig(t1, t2));
      exit(0);
    } else if (choice == '4') {
      printf("Dwste to mhkos ths aktinas toy kykloy: ");
      scanf("%f", &t1);
      printf("H perimetros toy kykloy einai: %f", ykykl(t1));
      exit(0);
    }
  }
}
```