#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*/ abort();
int /*<<< orphan*/ souper_opt();
long strtol(char *, int /*<<< orphan*/, int);
int main(int argc, char *argv[]) {
  if (argc != 2)
    abort();
  long arg = strtol(argv[1], 0, 10);
  if (arg < 0 || arg > 7)
    abort();
  if (arg & 1)
    souper_opt();
  int i;
  for (i = 0; i < 100; ++i) {
    if (arg & 2)
      souper_opt();
    int j;
    for (j = 0; j < 100; ++j) {
      if (arg & 4)
        souper_opt();
    }
  }
  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   $0x2,-0x8(%rbp)
je     1157 <main+0x27>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtol@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jl     1185 <main+0x55>
cmpq   $0x7,-0x18(%rbp)
jle    118c <main+0x5c>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     11a5 <main+0x75>
mov    $0x0,%al
call   1040 <souper_opt@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x64,-0x1c(%rbp)
jge    121f <main+0xef>
mov    -0x18(%rbp),%rax
and    $0x2,%rax
cmp    $0x0,%rax
je     11cf <main+0x9f>
mov    $0x0,%al
call   1040 <souper_opt@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x64,-0x20(%rbp)
jge    120c <main+0xdc>
mov    -0x18(%rbp),%rax
and    $0x4,%rax
cmp    $0x0,%rax
je     11f9 <main+0xc9>
mov    $0x0,%al
call   1040 <souper_opt@plt>
jmp    11fe <main+0xce>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11d6 <main+0xa6>
jmp    1211 <main+0xe1>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11ac <main+0x7c>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%edi
jne    11aa <main+0x7a>
mov    0x8(%rsi),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtol@plt>
cmp    $0x8,%rax
jae    11aa <main+0x7a>
mov    %rax,%rbx
test   $0x1,%bl
je     115e <main+0x2e>
xor    %eax,%eax
call   1040 <souper_opt@plt>
xor    %r14d,%r14d
jmp    117a <main+0x4a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r14d
cmp    $0x64,%r14d
je     11a3 <main+0x73>
test   $0x2,%bl
je     1186 <main+0x56>
xor    %eax,%eax
call   1040 <souper_opt@plt>
mov    $0x64,%ebp
jmp    1195 <main+0x65>
nopl   (%rax)
add    $0xffffffff,%ebp
je     1170 <main+0x40>
test   $0x4,%bl
je     1190 <main+0x60>
xor    %eax,%eax
call   1040 <souper_opt@plt>
jmp    1190 <main+0x60>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 2
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i64 @strtol(i8* %16, i32 0, i32 10)
store i64 %17, i64* %6
%18 = load i64, i64* %6
%19 = icmp slt i64 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %13
%21 = load i64, i64* %6
%22 = icmp sgt i64 %21, 7
br i1 %22, label %23, label %25
23: ; preds = %20, %13
%24 = call i32 (...) @abort()
unreachable
25: ; preds = %20
%26 = load i64, i64* %6
%27 = and i64 %26, 1
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = call i32 (...) @souper_opt()
br label %31
31: ; preds = %29, %25
store i32 0, i32* %7
br label %32
32: ; preds = %56, %31
%33 = load i32, i32* %7
%34 = icmp slt i32 %33, 100
br i1 %34, label %35, label %59
35: ; preds = %32
%36 = load i64, i64* %6
%37 = and i64 %36, 2
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = call i32 (...) @souper_opt()
br label %41
41: ; preds = %39, %35
store i32 0, i32* %8
br label %42
42: ; preds = %52, %41
%43 = load i32, i32* %8
%44 = icmp slt i32 %43, 100
br i1 %44, label %45, label %55
45: ; preds = %42
%46 = load i64, i64* %6
%47 = and i64 %46, 4
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %45
%50 = call i32 (...) @souper_opt()
br label %51
51: ; preds = %49, %45
br label %52
52: ; preds = %51
%53 = load i32, i32* %8
%54 = add nsw i32 %53, 1
store i32 %54, i32* %8
br label %42
55: ; preds = %42
br label %56
56: ; preds = %55
%57 = load i32, i32* %7
%58 = add nsw i32 %57, 1
store i32 %58, i32* %7
br label %32
59: ; preds = %32
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i64 @strtol(i8* %8, i32 0, i32 10)
%10 = icmp ugt i64 %9, 7
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = tail call i32 (...) @abort()
unreachable
13: ; preds = %6
%14 = and i64 %9, 1
%15 = icmp eq i64 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %13
%17 = tail call i32 (...) @souper_opt()
br label %18
18: ; preds = %16, %13
%19 = and i64 %9, 2
%20 = icmp eq i64 %19, 0
%21 = and i64 %9, 4
%22 = icmp eq i64 %21, 0
br label %23
23: ; preds = %18, %35
%24 = phi i32 [ 0, %18 ], [ %36, %35 ]
br i1 %20, label %27, label %25
25: ; preds = %23
%26 = tail call i32 (...) @souper_opt()
br label %27
27: ; preds = %25, %23
br label %28
28: ; preds = %27, %32
%29 = phi i32 [ %33, %32 ], [ 0, %27 ]
br i1 %22, label %32, label %30
30: ; preds = %28
%31 = tail call i32 (...) @souper_opt()
br label %32
32: ; preds = %28, %30
%33 = add nuw nsw i32 %29, 1
%34 = icmp eq i32 %33, 100
br i1 %34, label %35, label %28
35: ; preds = %32
%36 = add nuw nsw i32 %24, 1
%37 = icmp eq i32 %36, 100
br i1 %37, label %38, label %23
38: ; preds = %35
ret i32 0
}