#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
float inputfloat(char *);
int /*<<< orphan*/ pari(float);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ segno(float);
int main() {
  int check;
  float e;
  do {
    e = inputfloat("inserisci un numero");
    segno(e);
    pari(e);
    printf("Inserisci 0 per smettere inserire numeri, altrimenti inserisci un "
           "altro numero\n");
    scanf("%d", &check);
    printf("\n\n");
  } while (check);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1040 <inputfloat@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
call   1070 <segno@plt>
movss  -0xc(%rbp),%xmm0
call   1060 <pari@plt>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    115f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xe9c(%rip),%r14
lea    0xeac(%rip),%r15
lea    0xea2(%rip),%r12
lea    0xc(%rsp),%r13
lea    0xee8(%rip),%rbx
xchg   %ax,%ax
mov    %r14,%rdi
call   1040 <inputfloat@plt>
movss  %xmm0,0x8(%rsp)
call   1070 <segno@plt>
movss  0x8(%rsp),%xmm0
call   1060 <pari@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
cmpl   $0x0,0xc(%rsp)
jne    1180 <main+0x30>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [20 x i8] c"inserisci un numero\00"
@.str.1 = [80 x i8] c"Inserisci 0 per smettere inserire numeri, altrimenti inserisci un altro numero\0A\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 0, i32* %1
br label %4
4: ; preds = %13, %0
%5 = call float @inputfloat(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store float %5, float* %3
%6 = load float, float* %3
%7 = call i32 @segno(float %6)
%8 = load float, float* %3
%9 = call i32 @pari(float %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %13
13: ; preds = %4
%14 = load i32, i32* %2
%15 = icmp ne i32 %14, 0
br i1 %15, label %4, label %16
16: ; preds = %13
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@.str = [20 x i8] c"inserisci un numero\00"
@.str.2 = [3 x i8] c"%d\00"
@str = [79 x i8] c"Inserisci 0 per smettere inserire numeri, altrimenti inserisci un altro numero\00"
@str.4 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call float @inputfloat(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @segno(float %4)
%6 = call i32 @pari(float %4)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0))
%10 = load i32, i32* %1
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %3
12: ; preds = %3
ret i32 0
}