#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 */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int N;
  int Cont;
  int Num;
  int Min;
  printf("Inserire un numero ");
  scanf("%d", &N);
  Cont = 1;
  printf("Inserisci primo numero:");
  scanf("%d", &Num);
  Min = Num;
  while (Cont < N) {
    printf("Inserisci un altro numero:");
    scanf("%d", &Num);
    if (Num < Min) {
      Min = Num;
    }
    Cont++;
  }
  printf("Il numero minimo e':%d", Min);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0xc(%rbp)
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c2 <main+0xa2>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11b4 <main+0x94>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1178 <main+0x58>
mov    -0x14(%rbp),%esi
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf1a(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%ebx
cmpl   $0x2,0xc(%rsp)
jl     11b7 <main+0x97>
mov    $0x1,%ebp
lea    0xeac(%rip),%r14
lea    0xed4(%rip),%r15
lea    0x8(%rsp),%r12
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
cmp    %ebx,%eax
cmovl  %eax,%ebx
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jl     1190 <main+0x70>
lea    0xe89(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Inserire un numero \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"Inserisci primo numero:\00"
@.str.3 = [27 x i8] c"Inserisci un altro numero:\00"
@.str.4 = [23 x i8] c"Il numero minimo e':%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
store i32 1, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%10 = load i32, i32* %4
store i32 %10, i32* %5
br label %11
11: ; preds = %23, %0
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %26
15: ; preds = %11
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %23
21: ; preds = %15
%22 = load i32, i32* %4
store i32 %22, i32* %5
br label %23
23: ; preds = %21, %15
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %11
26: ; preds = %11
%27 = load i32, i32* %5
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %27)
%29 = load i32, i32* %1
ret i32 %29
}

LLVM IR (-O2):
@.str = [20 x i8] c"Inserire un numero \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"Inserisci primo numero:\00"
@.str.3 = [27 x i8] c"Inserisci un altro numero:\00"
@.str.4 = [23 x i8] c"Il numero minimo e':%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %2
%10 = load i32, i32* %1
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %23
12: ; preds = %0, %12
%13 = phi i32 [ %19, %12 ], [ %9, %0 ]
%14 = phi i32 [ %20, %12 ], [ 1, %0 ]
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%17 = load i32, i32* %2
%18 = icmp slt i32 %17, %13
%19 = select i1 %18, i32 %17, i32 %13
%20 = add nuw nsw i32 %14, 1
%21 = load i32, i32* %1
%22 = icmp slt i32 %20, %21
br i1 %22, label %12, label %23
23: ; preds = %12, %0
%24 = phi i32 [ %9, %0 ], [ %19, %12 ]
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %24)
ret i32 0
}