#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*/ printf(char *);
int main(int argc) {
  int x = 1;
  if (argc > 2) {
    do {
      x = 2;
      if (argc > 2)
        goto nine;
      x = 3;
      if (argc > 3) {
        x = 4;
        if (argc > 4) {
        five:
          x = 5;
          printf("5");
        } else
          x = 8;
      } else {
      nine:
        x = 9;
        printf("9");
        x = 10;
        goto five;
      }
      x = 6;
    } while (argc < 6);
  } else {
    do {
      x = 11;
      if (argc == 11)
        goto thirteen;
      x = 12;
    } while (argc < 12);
  thirteen:
    x = 13;
  }
  x = 7;
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    11d3 <main+0xc3>
jmp    1138 <main+0x28>
movl   $0x2,-0xc(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    114e <main+0x3e>
jmp    119e <main+0x8e>
movl   $0x3,-0xc(%rbp)
cmpl   $0x3,-0x8(%rbp)
jle    1199 <main+0x89>
movl   $0x4,-0xc(%rbp)
cmpl   $0x4,-0x8(%rbp)
jle    118d <main+0x7d>
jmp    1175 <main+0x65>
movl   $0x5,-0xc(%rbp)
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
jmp    1194 <main+0x84>
movl   $0x8,-0xc(%rbp)
jmp    11bd <main+0xad>
jmp    119e <main+0x8e>
movl   $0x9,-0xc(%rbp)
lea    0xe56(%rip),%rdi
call   1030 <printf@plt>
movl   $0xa,-0xc(%rbp)
jmp    1175 <main+0x65>
movl   $0x6,-0xc(%rbp)
cmpl   $0x6,-0x8(%rbp)
jl     1138 <main+0x28>
jmp    120b <main+0xfb>
jmp    11d8 <main+0xc8>
movl   $0xb,-0xc(%rbp)
cmpl   $0xb,-0x8(%rbp)
jne    11ee <main+0xde>
jmp    1204 <main+0xf4>
movl   $0xc,-0xc(%rbp)
cmpl   $0xc,-0x8(%rbp)
jl     11d8 <main+0xc8>
jmp    1204 <main+0xf4>
movl   $0xd,-0xc(%rbp)
movl   $0x7,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x39,%edi
call   1030 <putchar@plt>
mov    $0x35,%edi
call   1030 <putchar@plt>
cmp    $0x6,%ebx
jb     1120 <main+0x10>
mov    $0x7,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"5\00"
@.str.1 = [2 x i8] c"9\00"
define i32 @main(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %2
store i32 %0, i32* %3
store i32 1, i32* %4
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 2
br i1 %6, label %7, label %31
7: ; preds = %1
br label %8
8: ; preds = %27, %7
store i32 2, i32* %4
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 2
br i1 %10, label %11, label %12
11: ; preds = %8
br label %24
12: ; preds = %8
store i32 3, i32* %4
%13 = load i32, i32* %3
%14 = icmp sgt i32 %13, 3
br i1 %14, label %15, label %23
15: ; preds = %12
store i32 4, i32* %4
%16 = load i32, i32* %3
%17 = icmp sgt i32 %16, 4
br i1 %17, label %18, label %21
18: ; preds = %15
br label %19
19: ; preds = %24, %18
store i32 5, i32* %4
%20 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %22
21: ; preds = %15
store i32 8, i32* %4
br label %22
22: ; preds = %21, %19
br label %26
23: ; preds = %12
br label %24
24: ; preds = %23, %11
store i32 9, i32* %4
%25 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 10, i32* %4
br label %19
26: ; preds = %22
store i32 6, i32* %4
br label %27
27: ; preds = %26
%28 = load i32, i32* %3
%29 = icmp slt i32 %28, 6
br i1 %29, label %8, label %30
30: ; preds = %27
br label %42
31: ; preds = %1
br label %32
32: ; preds = %37, %31
store i32 11, i32* %4
%33 = load i32, i32* %3
%34 = icmp eq i32 %33, 11
br i1 %34, label %35, label %36
35: ; preds = %32
br label %41
36: ; preds = %32
store i32 12, i32* %4
br label %37
37: ; preds = %36
%38 = load i32, i32* %3
%39 = icmp slt i32 %38, 12
br i1 %39, label %32, label %40
40: ; preds = %37
br label %41
41: ; preds = %40, %35
store i32 13, i32* %4
br label %42
42: ; preds = %41, %30
store i32 7, i32* %4
%43 = load i32, i32* %4
ret i32 %43
}

LLVM IR (-O2):
define i32 @main(i32 %0) {
%2 = icmp sgt i32 %0, 2
%3 = icmp ult i32 %0, 6
br label %4
4: ; preds = %1, %4
%5 = tail call i32 @putchar(i32 57)
%6 = tail call i32 @putchar(i32 53)
br i1 %3, label %4, label %7
7: ; preds = %4
ret i32 7
}