#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*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, int *);
int main() {
  int a, b, result_a, result_b;
  char *msg = "Wieksza liczba to: %d\n";
  printf("Podaj pierwsza liczbe: ");
  result_a = scanf("%d", &a);
  if (result_a == 0) {
    printf("Error blad w konwersji pierwszej liczby\n");
    exit(1);
  }
  printf("Podaj druga liczbe: ");
  result_b = scanf("%d", &b);
  if (result_b == 0) {
    printf("Error blad w konwersji drugiej liczby\n");
  }
  if (a > b)
    printf(msg, a);
  else {
    printf(msg, a);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    118d <main+0x5d>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8d(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    11c6 <main+0x96>
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11e5 <main+0xb5>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f3 <main+0xc3>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
test   %eax,%eax
je     11a6 <main+0x66>
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
test   %eax,%eax
jne    1191 <main+0x51>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
mov    (%rsp),%esi
lea    0xe65(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Wieksza liczba to: %d\0A\00"
@.str.1 = [24 x i8] c"Podaj pierwsza liczbe: \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [41 x i8] c"Error blad w konwersji pierwszej liczby\0A\00"
@.str.4 = [21 x i8] c"Podaj druga liczbe: \00"
@.str.5 = [39 x i8] c"Error blad w konwersji drugiej liczby\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %14
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
br label %21
21: ; preds = %19, %14
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = icmp sgt i32 %22, %23
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = load i8*, i8** %6
%27 = load i32, i32* %2
%28 = call i32 (i8*, ...) @printf(i8* %26, i32 %27)
br label %33
29: ; preds = %21
%30 = load i8*, i8** %6
%31 = load i32, i32* %2
%32 = call i32 (i8*, ...) @printf(i8* %30, i32 %31)
br label %33
33: ; preds = %29, %25
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Wieksza liczba to: %d\0A\00"
@.str.1 = [24 x i8] c"Podaj pierwsza liczbe: \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.4 = [21 x i8] c"Podaj druga liczbe: \00"
@str = [38 x i8] c"Error blad w konwersji drugiej liczby\00"
@str.6 = [40 x i8] c"Error blad w konwersji pierwszej liczby\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 ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.6, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %0
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
br label %17
17: ; preds = %15, %11
%18 = load i32, i32* %1
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %18)
ret i32 0
}