#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*/ atoi(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ writeGraph(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  if (argc < 4) {
    fprintf(stderr, "Usage: %s <xsize> <ysize> <zsize>\n", argv[0]);
    return 1;
  }
  srand(time(NULL));
  writeGraph(atoi(argv[1]), atoi(argv[2]), atoi(argv[3]));
  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)
cmpl   $0x4,-0x8(%rbp)
jge    1198 <main+0x48>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe79(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    11e9 <main+0x99>
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1070 <atoi@plt>
mov    -0x18(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    %eax,%edx
call   1040 <writeGraph@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x3,%edi
jg     117f <main+0x2f>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xe8e(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%r14d
jmp    11bc <main+0x6c>
xor    %r14d,%r14d
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    0x8(%rbx),%rdi
call   1070 <atoi@plt>
mov    %eax,%r15d
mov    0x10(%rbx),%rdi
call   1070 <atoi@plt>
mov    %eax,%ebp
mov    0x18(%rbx),%rdi
call   1070 <atoi@plt>
mov    %r15d,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <writeGraph@plt>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: %s <xsize> <ysize> <zsize>\0A\00"
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 = icmp slt i32 %6, 4
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %12)
store i32 1, i32* %3
br label %30
14: ; preds = %2
%15 = call i32 @time(i32* null)
%16 = call i32 @srand(i32 %15)
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @atoi(i8* %19)
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
%24 = call i32 @atoi(i8* %23)
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 3
%27 = load i8*, i8** %26
%28 = call i32 @atoi(i8* %27)
%29 = call i32 @writeGraph(i32 %20, i32 %24, i32 %28)
store i32 0, i32* %3
br label %30
30: ; preds = %14, %8
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: %s <xsize> <ysize> <zsize>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 4
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %21
8: ; preds = %2
%9 = tail call i32 @time(i32* null)
%10 = tail call i32 @srand(i32 %9)
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = tail call i32 @atoi(i8* %12)
%14 = getelementptr inbounds i8*, i8** %1, i64 2
%15 = load i8*, i8** %14
%16 = tail call i32 @atoi(i8* %15)
%17 = getelementptr inbounds i8*, i8** %1, i64 3
%18 = load i8*, i8** %17
%19 = tail call i32 @atoi(i8* %18)
%20 = tail call i32 @writeGraph(i32 %13, i32 %16, i32 %19)
br label %21
21: ; preds = %8, %4
%22 = phi i32 [ 1, %4 ], [ 0, %8 ]
ret i32 %22
}