#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 *);
unsigned long atol(char *);
int /*<<< orphan*/ gnumb_generate(char const *, int, unsigned long);
int main(int argc, char *argv[]) {
  const char *filename = "float.data";
  int num = 1100;
  unsigned long seed = 12345679;
  if (argc >= 2)
    filename = argv[1];
  if (argc >= 3)
    num = atoi(argv[2]);
  if (argc >= 4)
    seed = atol(argv[3]);
  gnumb_generate(filename, num, seed);
  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)
lea    0xeb3(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x44c,-0x1c(%rbp)
movq   $0xbc614f,-0x28(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     1176 <main+0x46>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x3,-0x8(%rbp)
jl     1190 <main+0x60>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x4,-0x8(%rbp)
jl     11ab <main+0x7b>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1030 <atol@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x28(%rbp),%rdx
call   1050 <gnumb_generate@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0xbc614f,%r15d
mov    $0x44c,%r12d
cmp    $0x2,%edi
jl     1173 <main+0x43>
mov    %rsi,%rbx
mov    0x8(%rsi),%r14
je     117a <main+0x4a>
mov    %edi,%ebp
mov    0x10(%rbx),%rdi
call   1040 <atoi@plt>
mov    %eax,%r12d
cmp    $0x4,%ebp
jb     117a <main+0x4a>
mov    0x18(%rbx),%rdi
call   1030 <atol@plt>
mov    %rax,%r15
jmp    117a <main+0x4a>
lea    0xe86(%rip),%r14
mov    %r14,%rdi
mov    %r12d,%esi
mov    %r15,%rdx
call   1050 <gnumb_generate@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"float.data\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %6
store i32 1100, i32* %7
store i64 12345679, i64* %8
%9 = load i32, i32* %4
%10 = icmp sge i32 %9, 2
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
store i8* %14, i8** %6
br label %15
15: ; preds = %11, %2
%16 = load i32, i32* %4
%17 = icmp sge i32 %16, 3
br i1 %17, label %18, label %23
18: ; preds = %15
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 2
%21 = load i8*, i8** %20
%22 = call i32 @atoi(i8* %21)
store i32 %22, i32* %7
br label %23
23: ; preds = %18, %15
%24 = load i32, i32* %4
%25 = icmp sge i32 %24, 4
br i1 %25, label %26, label %31
26: ; preds = %23
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 3
%29 = load i8*, i8** %28
%30 = call i64 @atol(i8* %29)
store i64 %30, i64* %8
br label %31
31: ; preds = %26, %23
%32 = load i8*, i8** %6
%33 = load i32, i32* %7
%34 = load i64, i64* %8
%35 = call i32 @gnumb_generate(i8* %32, i32 %33, i64 %34)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"float.data\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %17
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = icmp eq i32 %0, 2
br i1 %7, label %17, label %8
8: ; preds = %4
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = load i8*, i8** %9
%11 = tail call i32 @atoi(i8* %10)
%12 = icmp ugt i32 %0, 3
br i1 %12, label %13, label %17
13: ; preds = %8
%14 = getelementptr inbounds i8*, i8** %1, i64 3
%15 = load i8*, i8** %14
%16 = tail call i64 @atol(i8* %15)
br label %17
17: ; preds = %2, %4, %13, %8
%18 = phi i32 [ %11, %13 ], [ %11, %8 ], [ 1100, %4 ], [ 1100, %2 ]
%19 = phi i8* [ %6, %13 ], [ %6, %8 ], [ %6, %4 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), %2 ]
%20 = phi i64 [ %16, %13 ], [ 12345679, %8 ], [ 12345679, %4 ], [ 12345679, %2 ]
%21 = tail call i32 @gnumb_generate(i8* %19, i32 %18, i64 %20)
ret i32 0
}