#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 */
unsigned long long Ackermann(unsigned long long, unsigned long long);
unsigned long long atoi(char *);
int /*<<< orphan*/ printf(char *, unsigned long long, unsigned long long,
                          unsigned long long);
int main(int argc, char *argv[]) {
  unsigned long long int m;
  unsigned long long int n;
  m = atoi(argv[1]);
  n = atoi(argv[2]);
  unsigned long long int wynik = Ackermann(m, n);
  printf("Wartosc Accermana dla m=%d i n=%d wynosi %llu\n", m, n, wynik);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atoi@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <Ackermann@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %rax,%r14
mov    0x10(%rbx),%rdi
call   1050 <atoi@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1040 <Ackermann@plt>
lea    0xe9f(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [47 x i8] c"Wartosc Accermana dla m=%d i n=%d wynosi %llu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @atoi(i8* %11)
store i64 %12, i64* %6
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i64 @atoi(i8* %15)
store i64 %16, i64* %7
%17 = load i64, i64* %6
%18 = load i64, i64* %7
%19 = call i64 @Ackermann(i64 %17, i64 %18)
store i64 %19, i64* %8
%20 = load i64, i64* %6
%21 = load i64, i64* %7
%22 = load i64, i64* %8
%23 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i64 %20, i64 %21, i64 %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [47 x i8] c"Wartosc Accermana dla m=%d i n=%d wynosi %llu\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i64 @atoi(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i64 @atoi(i8* %7)
%9 = tail call i64 @Ackermann(i64 %5, i64 %8)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i64 %5, i64 %8, i64 %9)
ret i32 0
}