#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 EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ help(int, char **);
scalar_t__ kontrolaArgumentu(int, char **);
int /*<<< orphan*/ nacitani(char **);
int main(int argc, char *argv[]) {
  if (kontrolaArgumentu(argc, argv) == 0)
    return EXIT_FAILURE;
  if (help(argc, argv))
    return EXIT_SUCCESS;
  if (!nacitani(argv))
    return EXIT_FAILURE;
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <kontrolaArgumentu@plt>
cmp    $0x0,%rax
jne    116d <main+0x3d>
mov    0x2e7d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11c3 <main+0x93>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <help@plt>
cmp    $0x0,%rax
je     1194 <main+0x64>
mov    0x2e4e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11c3 <main+0x93>
mov    -0x10(%rbp),%rdi
call   1030 <nacitani@plt>
cmp    $0x0,%eax
jne    11b7 <main+0x87>
mov    0x2e33(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11c3 <main+0x93>
mov    0x2e1a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <kontrolaArgumentu@plt>
test   %rax,%rax
je     115d <main+0x2d>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <help@plt>
test   %rax,%rax
jne    1166 <main+0x36>
mov    %rbx,%rdi
call   1030 <nacitani@plt>
test   %eax,%eax
jne    1166 <main+0x36>
mov    0x2e7c(%rip),%rax
jmp    116d <main+0x3d>
mov    0x2e6b(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i64 @kontrolaArgumentu(i32 %6, i8** %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* @EXIT_FAILURE
store i32 %11, i32* %3
br label %27
12: ; preds = %2
%13 = load i32, i32* %4
%14 = load i8**, i8*** %5
%15 = call i64 @help(i32 %13, i8** %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = load i32, i32* @EXIT_SUCCESS
store i32 %18, i32* %3
br label %27
19: ; preds = %12
%20 = load i8**, i8*** %5
%21 = call i32 @nacitani(i8** %20)
%22 = icmp ne i32 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %19
%24 = load i32, i32* @EXIT_FAILURE
store i32 %24, i32* %3
br label %27
25: ; preds = %19
%26 = load i32, i32* @EXIT_SUCCESS
store i32 %26, i32* %3
br label %27
27: ; preds = %25, %23, %17, %10
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i64 @kontrolaArgumentu(i32 %0, i8** %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = tail call i64 @help(i32 %0, i8** %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = tail call i32 @nacitani(i8** %1)
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i32* @EXIT_FAILURE, i32* @EXIT_SUCCESS
br label %12
12: ; preds = %8, %5, %2
%13 = phi i32* [ @EXIT_FAILURE, %2 ], [ @EXIT_SUCCESS, %5 ], [ %11, %8 ]
%14 = load i32, i32* %13
ret i32 %14
}