#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 *);
int main() {
  int x[2];
  printf("Podaj dwie liczby calkowite: ");
  scanf("%i %i", x, x + 1);
  printf("Wieksza liczba jest liczba: %i\n", x[0] >= x[1] ? x[0] : x[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xc(%rbp),%rsi
lea    -0xc(%rbp),%rdx
add    $0x4,%rdx
lea    0xece(%rip),%rdi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     116c <main+0x4c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1172 <main+0x52>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x4(%rsp),%rdx
lea    0xee3(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%esi
mov    0x4(%rsp),%eax
cmp    %eax,%esi
cmovl  %eax,%esi
lea    0xece(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Podaj dwie liczby calkowite: \00"
@.str.1 = [6 x i8] c"%i %i\00"
@.str.2 = [32 x i8] c"Wieksza liczba jest liczba: %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%6 = getelementptr inbounds i32, i32* %5, i64 1
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %4, i32* %6)
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%9 = load i32, i32* %8
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%11 = load i32, i32* %10
%12 = icmp sge i32 %9, %11
br i1 %12, label %13, label %16
13: ; preds = %0
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%15 = load i32, i32* %14
br label %19
16: ; preds = %0
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%18 = load i32, i32* %17
br label %19
19: ; preds = %16, %13
%20 = phi i32 [ %15, %13 ], [ %18, %16 ]
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Podaj dwie liczby calkowite: \00"
@.str.1 = [6 x i8] c"%i %i\00"
@.str.2 = [32 x i8] c"Wieksza liczba jest liczba: %i\0A\00"
define i32 @main() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %4, i32* %5)
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp slt i32 %7, %8
%10 = select i1 %9, i32 %8, i32 %7
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}