#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 */
typedef int uint32_t;
typedef void *int16_t;

/* Variables and functions */
int /*<<< orphan*/ mt_initialize(int);
int /*<<< orphan*/ print_sq(void **);
int /*<<< orphan*/ printf(char *, ...);
int slam(int, int);
void *strtol(char *, int /*<<< orphan*/ *, int);
int main(int argc, char *argv[]) {
  if (argc == 4) {
    int seed = strtol(argv[1], NULL, 10);
    mt_initialize(seed);
    uint32_t min = strtol(argv[2], NULL, 10);
    uint32_t max = strtol(argv[3], NULL, 10);
    printf("Seed = %d, Min = %d, Max = %d\n", seed, min, max);
    return slam(min, max);
  }
  if (argc > 2) {
    int16_t input[9] = {0};
    input[0] = strtol(argv[1], NULL, 10);
    input[1] = strtol(argv[2], NULL, 10);
    input[2] = strtol(argv[3], NULL, 10);
    input[3] = strtol(argv[4], NULL, 10);
    input[4] = strtol(argv[5], NULL, 10);
    input[5] = strtol(argv[6], NULL, 10);
    input[6] = strtol(argv[7], NULL, 10);
    input[7] = strtol(argv[8], NULL, 10);
    input[8] = strtol(argv[9], NULL, 10);
    print_sq(input);
    return 0;
  }
  if (argc == 2) {
    int seed = strtol(argv[1], NULL, 10);
    mt_initialize(seed);
    printf("Seed = %d\n", seed);
    return slam(1, 101);
  }
  if (argc == 1) {
    mt_initialize(0);
    printf("Seed = 0\n");
    return slam(1, 101);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
jne    1200 <main+0xa0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1070 <mt_initialize@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1040 <slam@plt>
mov    %eax,-0x4(%rbp)
jmp    139d <main+0x23d>
cmpl   $0x2,-0x8(%rbp)
jle    1319 <main+0x1b9>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x48,%edx
call   1050 <memset@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x68(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    0x40(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x48(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x30(%rbp)
lea    -0x70(%rbp),%rdi
call   1080 <print_sq@plt>
movl   $0x0,-0x4(%rbp)
jmp    139d <main+0x23d>
cmpl   $0x2,-0x8(%rbp)
jne    136c <main+0x20c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%edi
call   1070 <mt_initialize@plt>
mov    -0x74(%rbp),%esi
lea    0xcd1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
mov    $0x65,%esi
call   1040 <slam@plt>
mov    %eax,-0x4(%rbp)
jmp    139d <main+0x23d>
cmpl   $0x1,-0x8(%rbp)
jne    139d <main+0x23d>
xor    %edi,%edi
call   1070 <mt_initialize@plt>
lea    0xca6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
mov    $0x65,%esi
call   1040 <slam@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x50,%rsp
mov    %rsi,%rbx
cmp    $0x4,%edi
jne    11d2 <main+0x72>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,%r14
mov    %r14d,%edi
call   1070 <mt_initialize@plt>
mov    0x10(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,%r15
mov    0x18(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,%rbx
lea    0xe47(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15d,%edi
mov    %ebx,%esi
jmp    1300 <main+0x1a0>
cmp    $0x3,%edi
jl     12a1 <main+0x141>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,(%rsp)
mov    0x10(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,0x8(%rsp)
mov    0x18(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,0x10(%rsp)
mov    0x20(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,0x18(%rsp)
mov    0x28(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,0x20(%rsp)
mov    0x30(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,0x28(%rsp)
mov    0x38(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,0x30(%rsp)
mov    0x40(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,0x38(%rsp)
mov    0x48(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,0x40(%rsp)
mov    %rsp,%rdi
call   1080 <print_sq@plt>
jmp    12d7 <main+0x177>
cmp    $0x1,%edi
je     12e3 <main+0x183>
cmp    $0x2,%edi
jne    12d7 <main+0x177>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,%rbx
mov    %ebx,%edi
call   1070 <mt_initialize@plt>
lea    0xd53(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    12f6 <main+0x196>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
xor    %edi,%edi
call   1070 <mt_initialize@plt>
lea    0xd39(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
mov    $0x65,%esi
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <slam@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Seed = %d, Min = %d, Max = %d\0A\00"
@.str.1 = [11 x i8] c"Seed = %d\0A\00"
@.str.2 = [10 x i8] c"Seed = 0\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
%9 = alloca [9 x i8*]
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 4
br i1 %12, label %13, label %38
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i8* @strtol(i8* %16, i32* null, i32 10)
%18 = ptrtoint i8* %17 to i32
store i32 %18, i32* %6
%19 = load i32, i32* %6
%20 = call i32 @mt_initialize(i32 %19)
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
%24 = call i8* @strtol(i8* %23, i32* null, i32 10)
%25 = ptrtoint i8* %24 to i32
store i32 %25, i32* %7
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 3
%28 = load i8*, i8** %27
%29 = call i8* @strtol(i8* %28, i32* null, i32 10)
%30 = ptrtoint i8* %29 to i32
store i32 %30, i32* %8
%31 = load i32, i32* %6
%32 = load i32, i32* %7
%33 = load i32, i32* %8
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %31, i32 %32, i32 %33)
%35 = load i32, i32* %7
%36 = load i32, i32* %8
%37 = call i32 @slam(i32 %35, i32 %36)
store i32 %37, i32* %3
br label %111
38: ; preds = %2
%39 = load i32, i32* %4
%40 = icmp sgt i32 %39, 2
br i1 %40, label %41, label %90
41: ; preds = %38
%42 = bitcast [9 x i8*]* %9 to i8*
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 1
%45 = load i8*, i8** %44
%46 = call i8* @strtol(i8* %45, i32* null, i32 10)
%47 = getelementptr inbounds [9 x i8*], [9 x i8*]* %9, i64 0, i64 0
store i8* %46, i8** %47
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 2
%50 = load i8*, i8** %49
%51 = call i8* @strtol(i8* %50, i32* null, i32 10)
%52 = getelementptr inbounds [9 x i8*], [9 x i8*]* %9, i64 0, i64 1
store i8* %51, i8** %52
%53 = load i8**, i8*** %5
%54 = getelementptr inbounds i8*, i8** %53, i64 3
%55 = load i8*, i8** %54
%56 = call i8* @strtol(i8* %55, i32* null, i32 10)
%57 = getelementptr inbounds [9 x i8*], [9 x i8*]* %9, i64 0, i64 2
store i8* %56, i8** %57
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 4
%60 = load i8*, i8** %59
%61 = call i8* @strtol(i8* %60, i32* null, i32 10)
%62 = getelementptr inbounds [9 x i8*], [9 x i8*]* %9, i64 0, i64 3
store i8* %61, i8** %62
%63 = load i8**, i8*** %5
%64 = getelementptr inbounds i8*, i8** %63, i64 5
%65 = load i8*, i8** %64
%66 = call i8* @strtol(i8* %65, i32* null, i32 10)
%67 = getelementptr inbounds [9 x i8*], [9 x i8*]* %9, i64 0, i64 4
store i8* %66, i8** %67
%68 = load i8**, i8*** %5
%69 = getelementptr inbounds i8*, i8** %68, i64 6
%70 = load i8*, i8** %69
%71 = call i8* @strtol(i8* %70, i32* null, i32 10)
%72 = getelementptr inbounds [9 x i8*], [9 x i8*]* %9, i64 0, i64 5
store i8* %71, i8** %72
%73 = load i8**, i8*** %5
%74 = getelementptr inbounds i8*, i8** %73, i64 7
%75 = load i8*, i8** %74
%76 = call i8* @strtol(i8* %75, i32* null, i32 10)
%77 = getelementptr inbounds [9 x i8*], [9 x i8*]* %9, i64 0, i64 6
store i8* %76, i8** %77
%78 = load i8**, i8*** %5
%79 = getelementptr inbounds i8*, i8** %78, i64 8
%80 = load i8*, i8** %79
%81 = call i8* @strtol(i8* %80, i32* null, i32 10)
%82 = getelementptr inbounds [9 x i8*], [9 x i8*]* %9, i64 0, i64 7
store i8* %81, i8** %82
%83 = load i8**, i8*** %5
%84 = getelementptr inbounds i8*, i8** %83, i64 9
%85 = load i8*, i8** %84
%86 = call i8* @strtol(i8* %85, i32* null, i32 10)
%87 = getelementptr inbounds [9 x i8*], [9 x i8*]* %9, i64 0, i64 8
store i8* %86, i8** %87
%88 = getelementptr inbounds [9 x i8*], [9 x i8*]* %9, i64 0, i64 0
%89 = call i32 @print_sq(i8** %88)
store i32 0, i32* %3
br label %111
90: ; preds = %38
%91 = load i32, i32* %4
%92 = icmp eq i32 %91, 2
br i1 %92, label %93, label %104
93: ; preds = %90
%94 = load i8**, i8*** %5
%95 = getelementptr inbounds i8*, i8** %94, i64 1
%96 = load i8*, i8** %95
%97 = call i8* @strtol(i8* %96, i32* null, i32 10)
%98 = ptrtoint i8* %97 to i32
store i32 %98, i32* %10
%99 = load i32, i32* %10
%100 = call i32 @mt_initialize(i32 %99)
%101 = load i32, i32* %10
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %101)
%103 = call i32 @slam(i32 1, i32 101)
store i32 %103, i32* %3
br label %111
104: ; preds = %90
%105 = load i32, i32* %4
%106 = icmp eq i32 %105, 1
br i1 %106, label %107, label %111
107: ; preds = %104
%108 = call i32 @mt_initialize(i32 0)
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%110 = call i32 @slam(i32 1, i32 101)
store i32 %110, i32* %3
br label %111
111: ; preds = %13, %41, %93, %107, %104
%112 = load i32, i32* %3
ret i32 %112
}

LLVM IR (-O2):
@.str = [31 x i8] c"Seed = %d, Min = %d, Max = %d\0A\00"
@.str.1 = [11 x i8] c"Seed = %d\0A\00"
@str = [9 x i8] c"Seed = 0\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [9 x i8*]
%4 = icmp eq i32 %0, 4
br i1 %4, label %5, label %24
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i8* @strtol(i8* nocapture %7, i32* null, i32 10)
%9 = ptrtoint i8* %8 to i64
%10 = trunc i64 %9 to i32
%11 = tail call i32 @mt_initialize(i32 %10)
%12 = getelementptr inbounds i8*, i8** %1, i64 2
%13 = load i8*, i8** %12
%14 = tail call i8* @strtol(i8* nocapture %13, i32* null, i32 10)
%15 = ptrtoint i8* %14 to i64
%16 = trunc i64 %15 to i32
%17 = getelementptr inbounds i8*, i8** %1, i64 3
%18 = load i8*, i8** %17
%19 = tail call i8* @strtol(i8* nocapture %18, i32* null, i32 10)
%20 = ptrtoint i8* %19 to i64
%21 = trunc i64 %20 to i32
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %16, i32 %21)
%23 = tail call i32 @slam(i32 %16, i32 %21)
br label %79
24: ; preds = %2
%25 = icmp sgt i32 %0, 2
br i1 %25, label %26, label %65
26: ; preds = %24
%27 = bitcast [9 x i8*]* %3 to i8*
%28 = getelementptr inbounds i8*, i8** %1, i64 1
%29 = load i8*, i8** %28
%30 = tail call i8* @strtol(i8* nocapture %29, i32* null, i32 10)
%31 = getelementptr inbounds [9 x i8*], [9 x i8*]* %3, i64 0, i64 0
store i8* %30, i8** %31
%32 = getelementptr inbounds i8*, i8** %1, i64 2
%33 = load i8*, i8** %32
%34 = tail call i8* @strtol(i8* nocapture %33, i32* null, i32 10)
%35 = getelementptr inbounds [9 x i8*], [9 x i8*]* %3, i64 0, i64 1
store i8* %34, i8** %35
%36 = getelementptr inbounds i8*, i8** %1, i64 3
%37 = load i8*, i8** %36
%38 = tail call i8* @strtol(i8* nocapture %37, i32* null, i32 10)
%39 = getelementptr inbounds [9 x i8*], [9 x i8*]* %3, i64 0, i64 2
store i8* %38, i8** %39
%40 = getelementptr inbounds i8*, i8** %1, i64 4
%41 = load i8*, i8** %40
%42 = tail call i8* @strtol(i8* nocapture %41, i32* null, i32 10)
%43 = getelementptr inbounds [9 x i8*], [9 x i8*]* %3, i64 0, i64 3
store i8* %42, i8** %43
%44 = getelementptr inbounds i8*, i8** %1, i64 5
%45 = load i8*, i8** %44
%46 = tail call i8* @strtol(i8* nocapture %45, i32* null, i32 10)
%47 = getelementptr inbounds [9 x i8*], [9 x i8*]* %3, i64 0, i64 4
store i8* %46, i8** %47
%48 = getelementptr inbounds i8*, i8** %1, i64 6
%49 = load i8*, i8** %48
%50 = tail call i8* @strtol(i8* nocapture %49, i32* null, i32 10)
%51 = getelementptr inbounds [9 x i8*], [9 x i8*]* %3, i64 0, i64 5
store i8* %50, i8** %51
%52 = getelementptr inbounds i8*, i8** %1, i64 7
%53 = load i8*, i8** %52
%54 = tail call i8* @strtol(i8* nocapture %53, i32* null, i32 10)
%55 = getelementptr inbounds [9 x i8*], [9 x i8*]* %3, i64 0, i64 6
store i8* %54, i8** %55
%56 = getelementptr inbounds i8*, i8** %1, i64 8
%57 = load i8*, i8** %56
%58 = tail call i8* @strtol(i8* nocapture %57, i32* null, i32 10)
%59 = getelementptr inbounds [9 x i8*], [9 x i8*]* %3, i64 0, i64 7
store i8* %58, i8** %59
%60 = getelementptr inbounds i8*, i8** %1, i64 9
%61 = load i8*, i8** %60
%62 = tail call i8* @strtol(i8* nocapture %61, i32* null, i32 10)
%63 = getelementptr inbounds [9 x i8*], [9 x i8*]* %3, i64 0, i64 8
store i8* %62, i8** %63
%64 = call i32 @print_sq(i8** %31)
br label %79
65: ; preds = %24
switch i32 %0, label %79 [
i32 2, label %66
i32 1, label %75
]
66: ; preds = %65
%67 = getelementptr inbounds i8*, i8** %1, i64 1
%68 = load i8*, i8** %67
%69 = tail call i8* @strtol(i8* nocapture %68, i32* null, i32 10)
%70 = ptrtoint i8* %69 to i64
%71 = trunc i64 %70 to i32
%72 = tail call i32 @mt_initialize(i32 %71)
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %71)
%74 = tail call i32 @slam(i32 1, i32 101)
br label %79
75: ; preds = %65
%76 = tail call i32 @mt_initialize(i32 0)
%77 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%78 = tail call i32 @slam(i32 1, i32 101)
br label %79
79: ; preds = %65, %5, %26, %66, %75
%80 = phi i32 [ %23, %5 ], [ 0, %26 ], [ %74, %66 ], [ %78, %75 ], [ 0, %65 ]
ret i32 %80
}