#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 dfs(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int i, j;
  int maxBlob = 0;
  int curBlob = 0;
  for (i = 0; i < (4); i++) {
    for (j = 0; j < (8); j++) {
      curBlob = dfs(i, j);
      if (curBlob > maxBlob)
        maxBlob = curBlob;
    }
  }
  printf("C - Max Blob size: %d\n", maxBlob);
  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)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    11ac <main+0x8c>
movl   $0x0,-0x18(%rbp)
cmpl   $0x8,-0x18(%rbp)
jge    1199 <main+0x79>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <dfs@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    1186 <main+0x66>
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    118b <main+0x6b>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    115c <main+0x3c>
jmp    119e <main+0x7e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114b <main+0x2b>
mov    -0x1c(%rbp),%esi
lea    0xe4a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %r14d,%r14d
xor    %ebx,%ebx
jmp    113c <main+0x1c>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
cmp    $0x4,%ebx
je     11f2 <main+0xd2>
mov    %ebx,%edi
xor    %esi,%esi
call   1040 <dfs@plt>
mov    %eax,%ebp
cmp    %r14d,%eax
jg     114f <main+0x2f>
mov    %r14d,%ebp
mov    %ebx,%edi
mov    $0x1,%esi
call   1040 <dfs@plt>
mov    %eax,%r14d
cmp    %ebp,%eax
jg     1165 <main+0x45>
mov    %ebp,%r14d
mov    %ebx,%edi
mov    $0x2,%esi
call   1040 <dfs@plt>
mov    %eax,%ebp
cmp    %r14d,%eax
jg     117b <main+0x5b>
mov    %r14d,%ebp
mov    %ebx,%edi
mov    $0x3,%esi
call   1040 <dfs@plt>
mov    %eax,%r14d
cmp    %ebp,%eax
jg     1191 <main+0x71>
mov    %ebp,%r14d
mov    %ebx,%edi
mov    $0x4,%esi
call   1040 <dfs@plt>
mov    %eax,%ebp
cmp    %r14d,%eax
jg     11a7 <main+0x87>
mov    %r14d,%ebp
mov    %ebx,%edi
mov    $0x5,%esi
call   1040 <dfs@plt>
mov    %eax,%r14d
cmp    %ebp,%eax
jg     11bd <main+0x9d>
mov    %ebp,%r14d
mov    %ebx,%edi
mov    $0x6,%esi
call   1040 <dfs@plt>
mov    %eax,%ebp
cmp    %r14d,%eax
jg     11d3 <main+0xb3>
mov    %r14d,%ebp
mov    %ebx,%edi
mov    $0x7,%esi
call   1040 <dfs@plt>
mov    %eax,%r14d
cmp    %ebp,%eax
jg     1130 <main+0x10>
mov    %ebp,%r14d
jmp    1130 <main+0x10>
lea    0xe07(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"C - Max Blob size: %d\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 i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %6
br label %10
10: ; preds = %31, %2
%11 = load i32, i32* %6
%12 = icmp slt i32 %11, 4
br i1 %12, label %13, label %34
13: ; preds = %10
store i32 0, i32* %7
br label %14
14: ; preds = %27, %13
%15 = load i32, i32* %7
%16 = icmp slt i32 %15, 8
br i1 %16, label %17, label %30
17: ; preds = %14
%18 = load i32, i32* %6
%19 = load i32, i32* %7
%20 = call i32 @dfs(i32 %18, i32 %19)
store i32 %20, i32* %9
%21 = load i32, i32* %9
%22 = load i32, i32* %8
%23 = icmp sgt i32 %21, %22
br i1 %23, label %24, label %26
24: ; preds = %17
%25 = load i32, i32* %9
store i32 %25, i32* %8
br label %26
26: ; preds = %24, %17
br label %27
27: ; preds = %26
%28 = load i32, i32* %7
%29 = add nsw i32 %28, 1
store i32 %29, i32* %7
br label %14
30: ; preds = %14
br label %31
31: ; preds = %30
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
store i32 %33, i32* %6
br label %10
34: ; preds = %10
%35 = load i32, i32* %8
%36 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %35)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"C - Max Blob size: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %29, %3 ]
%5 = phi i32 [ 0, %2 ], [ %30, %3 ]
%6 = tail call i32 @dfs(i32 %5, i32 0)
%7 = icmp sgt i32 %6, %4
%8 = select i1 %7, i32 %6, i32 %4
%9 = tail call i32 @dfs(i32 %5, i32 1)
%10 = icmp sgt i32 %9, %8
%11 = select i1 %10, i32 %9, i32 %8
%12 = tail call i32 @dfs(i32 %5, i32 2)
%13 = icmp sgt i32 %12, %11
%14 = select i1 %13, i32 %12, i32 %11
%15 = tail call i32 @dfs(i32 %5, i32 3)
%16 = icmp sgt i32 %15, %14
%17 = select i1 %16, i32 %15, i32 %14
%18 = tail call i32 @dfs(i32 %5, i32 4)
%19 = icmp sgt i32 %18, %17
%20 = select i1 %19, i32 %18, i32 %17
%21 = tail call i32 @dfs(i32 %5, i32 5)
%22 = icmp sgt i32 %21, %20
%23 = select i1 %22, i32 %21, i32 %20
%24 = tail call i32 @dfs(i32 %5, i32 6)
%25 = icmp sgt i32 %24, %23
%26 = select i1 %25, i32 %24, i32 %23
%27 = tail call i32 @dfs(i32 %5, i32 7)
%28 = icmp sgt i32 %27, %26
%29 = select i1 %28, i32 %27, i32 %26
%30 = add nuw nsw i32 %5, 1
%31 = icmp eq i32 %30, 4
br i1 %31, label %32, label %3
32: ; preds = %3
%33 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %29)
ret i32 0
}