#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 a, b;
  printf("podaj liczbe\n");
  scanf("%d%d", &a, &b);
  if (a > b)
    printf(" a jest większe od b\n");
  else if (a == b)
    printf("liczby są równe\n");
  else
    printf(" a jest mniejsze od b \n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    116c <main+0x4c>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
jmp    119a <main+0x7a>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1189 <main+0x69>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
jmp    1195 <main+0x75>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
jmp    119a <main+0x7a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    (%rsp),%eax
lea    0xeda(%rip),%rax
lea    0xebc(%rip),%rcx
cmove  %rax,%rcx
lea    0xeda(%rip),%rdi
cmovle %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"podaj liczbe\0A\00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [23 x i8] c" a jest wi\C4\99ksze od b\0A\00"
@.str.3 = [19 x i8] c"liczby s\C4\85 r\C3\B3wne\0A\00"
@.str.4 = [24 x i8] c" a jest mniejsze od b \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
br label %20
11: ; preds = %0
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
br label %19
17: ; preds = %11
%18 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
br label %20
20: ; preds = %19, %9
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%d%d\00"
@str = [13 x i8] c"podaj liczbe\00"
@str.5 = [23 x i8] c" a jest mniejsze od b \00"
@str.6 = [18 x i8] c"liczby s\C4\85 r\C3\B3wne\00"
@str.7 = [22 x i8] c" a jest wi\C4\99ksze od b\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 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = icmp sgt i32 %7, %8
%10 = icmp eq i32 %7, %8
%11 = select i1 %10, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.6, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.5, i64 0, i64 0)
%12 = select i1 %9, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.7, i64 0, i64 0), i8* %11
%13 = call i32 @puts(i8* dereferenceable(1) %12)
ret i32 0
}