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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rsi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    D98(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x1c(%rbp),%rax
  mov    %rax,%rsi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    D64(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L6
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  je     L215
L6:
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jle    L127
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  jle    L127
  mov    -0x20(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L141
L127:
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jge    L216
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  jge    L216
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L141
L216:
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x10(%rbp)
L141:
  mov    -0x1c(%rbp),%edx
  mov    -0x20(%rbp),%eax
  cmp    %eax,%edx
  jle    L12
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  jle    L12
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L174
L12:
  mov    -0x1c(%rbp),%edx
  mov    -0x20(%rbp),%eax
  cmp    %eax,%edx
  jge    L11
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  jge    L11
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L174
L11:
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x10(%rbp)
L174:
  mov    -0x18(%rbp),%edx
  mov    -0x20(%rbp),%eax
  cmp    %eax,%edx
  jle    L214
  mov    -0x18(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jle    L214
  mov    -0x18(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L103
L214:
  mov    -0x18(%rbp),%edx
  mov    -0x20(%rbp),%eax
  cmp    %eax,%edx
  jge    L144
  mov    -0x18(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jge    L144
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L103
L144:
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  jmp    L179
L103:
  jmp    L179
L215:
  lea    D73(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L179:
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xc(%rbp),%eax
  mov    %eax,%esi
  lea    D89(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L89
  call   <__stack_chk_fail@plt>
L89:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D8
type_infered: string
name: read_data
arguments: label: D21
type_infered: string
name: read_data
arguments: label: D98
type_infered: string
name: read_data
arguments: label: D64
type_infered: string
name: read_data
arguments: label: D73
type_infered: string
name: read_data
arguments: label: D60
type_infered: string
name: read_data
arguments: label: D16
type_infered: string
name: read_data
arguments: label: D89
type_infered: string

tool: D8: NUM1: 

tool: D21: %i

tool: D98: NUM2: 

tool: D64: NUM3: 

tool: D73: Erro: Numeros Iguais

tool: D60: 
Menor : %i


tool: D16: Meio  : %i


tool: D89: Maior : %i


assistant: ```c
main() {
  int num1, num2, num3, menor, meio, maior;
  printf("NUM1: ");
  scanf("%i", &num1);
  printf("NUM2: ");
  scanf("%i", &num2);
  printf("NUM3: ");
  scanf("%i", &num3);
  if (!(num1 == num2 && num1 == num3)) {
    if (num1 > num2 && num1 > num3)
      maior = num1;
    else if (num1 < num2 && num1 < num3)
      menor = num1;
    else
      meio = num1;
    if (num2 > num1 && num2 > num3)
      maior = num2;
    else if (num2 < num1 && num2 < num3)
      menor = num2;
    else
      meio = num2;
    if (num3 > num1 && num3 > num2)
      maior = num3;
    else if (num3 < num1 && num3 < num2)
      menor = num3;
    else
      meio = num3;
  } else
    printf("Erro: Numeros Iguais");
  printf("\nMenor : %i\n", menor);
  printf("Meio  : %i\n", meio);
  printf("Maior : %i\n", maior);
}
```