#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 *);
int main(int argc, const char *argv[]) {
  int a, b, c;
  printf("Digite um numero: \n");
  scanf("%d", &a);
  printf("Digite outro numero: \n");
  scanf("%d", &b);
  printf("Digite outro numero: \n");
  scanf("%d", &c);
  if (a < b && a < c) {
    printf("%d", a);
  } else if (b < a && b < c) {
    printf("%d", b);
  } else if (c < a && c < b) {
    printf("%d", c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeab(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8d(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11be <main+0x9e>
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11be <main+0x9e>
mov    -0x14(%rbp),%esi
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121f <main+0xff>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11ec <main+0xcc>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11ec <main+0xcc>
mov    -0x18(%rbp),%esi
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121a <main+0xfa>
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1215 <main+0xf5>
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1215 <main+0xf5>
mov    -0x1c(%rbp),%esi
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121a <main+0xfa>
jmp    121f <main+0xff>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb6(%rip),%rbx
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeb8(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x14(%rsp),%ecx
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%esi
cmp    %eax,%ecx
jge    11a0 <main+0x70>
cmp    %esi,%ecx
jge    11a0 <main+0x70>
mov    %ecx,%esi
jmp    11b4 <main+0x84>
cmp    %ecx,%eax
jge    11ac <main+0x7c>
cmp    %esi,%eax
jge    11ac <main+0x7c>
mov    %eax,%esi
jmp    11b4 <main+0x84>
cmp    %ecx,%esi
jge    11c2 <main+0x92>
cmp    %eax,%esi
jge    11c2 <main+0x92>
lea    0xe45(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Digite um numero: \0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"Digite outro numero: \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %25
18: ; preds = %2
%19 = load i32, i32* %6
%20 = load i32, i32* %8
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %25
22: ; preds = %18
%23 = load i32, i32* %6
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %23)
br label %49
25: ; preds = %18, %2
%26 = load i32, i32* %7
%27 = load i32, i32* %6
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %36
29: ; preds = %25
%30 = load i32, i32* %7
%31 = load i32, i32* %8
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %36
33: ; preds = %29
%34 = load i32, i32* %7
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %34)
br label %48
36: ; preds = %29, %25
%37 = load i32, i32* %8
%38 = load i32, i32* %6
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %47
40: ; preds = %36
%41 = load i32, i32* %8
%42 = load i32, i32* %7
%43 = icmp slt i32 %41, %42
br i1 %43, label %44, label %47
44: ; preds = %40
%45 = load i32, i32* %8
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %45)
br label %47
47: ; preds = %44, %40, %36
br label %48
48: ; preds = %47, %33
br label %49
49: ; preds = %48, %22
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [19 x i8] c"Digite um numero: \00"
@str.4 = [22 x i8] c"Digite outro numero: \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.4, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.4, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
%18 = load i32, i32* %5
%19 = icmp slt i32 %15, %18
%20 = select i1 %17, i1 %19, i1 false
br i1 %20, label %29, label %21
21: ; preds = %2
%22 = icmp slt i32 %16, %15
%23 = icmp slt i32 %16, %18
%24 = select i1 %22, i1 %23, i1 false
br i1 %24, label %29, label %25
25: ; preds = %21
%26 = icmp slt i32 %18, %15
%27 = icmp slt i32 %18, %16
%28 = select i1 %26, i1 %27, i1 false
br i1 %28, label %29, label %32
29: ; preds = %25, %21, %2
%30 = phi i32 [ %15, %2 ], [ %16, %21 ], [ %18, %25 ]
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %30)
br label %32
32: ; preds = %29, %25
ret i32 0
}