#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 atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ recursive(int /*<<< orphan*/, int *, int *, int *);
int main(int argc, char *argv[]) {
  int end = 0, n, t;
  n = atoi(argv[1]);
  t = atoi(argv[2]);
  if (argc != 3) {
    printf("Errore\n");
    exit(1);
  }
  recursive(getpid(), &end, &n, &t);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11ad <main+0x5d>
lea    0xe62(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1050 <recursive@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
movl   $0x0,0x14(%rsp)
mov    0x8(%rsi),%rdi
call   1060 <atoi@plt>
mov    %eax,0x10(%rsp)
mov    0x10(%rbx),%rdi
call   1060 <atoi@plt>
mov    %eax,0xc(%rsp)
cmp    $0x3,%ebp
jne    11a8 <main+0x58>
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
mov    %eax,%edi
call   1050 <recursive@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe51(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Errore\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
store i32 %12, i32* %7
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i32 @atoi(i8* %15)
store i32 %16, i32* %8
%17 = load i32, i32* %4
%18 = icmp ne i32 %17, 3
br i1 %18, label %19, label %22
19: ; preds = %2
%20 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%21 = call i32 @exit(i32 1)
unreachable
22: ; preds = %2
%23 = call i32 (...) @getpid()
%24 = call i32 @recursive(i32 %23, i32* %6, i32* %7, i32* %8)
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"Errore\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @atoi(i8* %10)
store i32 %11, i32* %4
%12 = getelementptr inbounds i8*, i8** %1, i64 2
%13 = load i8*, i8** %12
%14 = tail call i32 @atoi(i8* %13)
store i32 %14, i32* %5
%15 = icmp eq i32 %0, 3
br i1 %15, label %19, label %16
16: ; preds = %2
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%18 = tail call i32 @exit(i32 1)
unreachable
19: ; preds = %2
%20 = tail call i32 (...) @getpid()
%21 = call i32 @recursive(i32 %20, i32* %3, i32* %4, i32* %5)
ret i32 0
}