#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);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, const char *agrv[]) {
  int i, numeros[5], maior;
  for (i = 1; i < 6; i++) {
    printf("Digite o %d° número: \n", i);
    scanf("%d", &numeros[i]);
  }
  maior = numeros[1];
  for (i = 1; i < 6; i++) {
    if (numeros[i] > maior) {
      maior = numeros[i];
    }
  }
  printf("O maior numero: %d \n", maior);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    117f <main+0x5f>
mov    -0x14(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
movslq -0x14(%rbp),%rax
lea    -0x30(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xead(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    11c5 <main+0xa5>
movslq -0x14(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
cmp    -0x34(%rbp),%eax
jle    11b2 <main+0x92>
movslq -0x14(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
mov    %eax,-0x34(%rbp)
jmp    11b7 <main+0x97>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118c <main+0x6c>
mov    -0x34(%rbp),%esi
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xed2(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0x4(%rsp),%rsi
lea    0xed2(%rip),%rbx
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    0x8(%rsp),%eax
cmp    %esi,%eax
cmovg  %eax,%esi
mov    0xc(%rsp),%eax
cmp    %esi,%eax
cmovg  %eax,%esi
mov    0x10(%rsp),%eax
cmp    %esi,%eax
cmovg  %eax,%esi
mov    0x14(%rsp),%eax
cmp    %esi,%eax
cmovg  %eax,%esi
lea    0xe36(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [25 x i8] c"Digite o %d\C2\B0 n\C3\BAmero: \0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [21 x i8] c"O maior numero: %d \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i32]
%4 = bitcast [5 x i32]* %3 to i8*
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 1
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 2)
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 2
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 3)
%12 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 3
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 4)
%15 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 4
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 5)
%18 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 5
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %18)
%20 = load i32, i32* %6
%21 = load i32, i32* %9
%22 = icmp sgt i32 %21, %20
%23 = select i1 %22, i32 %21, i32 %20
%24 = load i32, i32* %12
%25 = icmp sgt i32 %24, %23
%26 = select i1 %25, i32 %24, i32 %23
%27 = load i32, i32* %15
%28 = icmp sgt i32 %27, %26
%29 = select i1 %28, i32 %27, i32 %26
%30 = load i32, i32* %18
%31 = icmp sgt i32 %30, %29
%32 = select i1 %31, i32 %30, i32 %29
%33 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %32)
ret i32 0
}