#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*/ exit(int);
int maximalRectangle(char **, int, int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  char *h[] = {"10100", "10111", "11111", "10010"};
  if (!(maximalRectangle(h, 4, 5) == 6)) {
    printf("assert fail: %s\n", "6");
    exit(-1);
  };
  printf("everything is fine!\n");
  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)
mov    0x2cb3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cb0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cad(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2caa(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x4,%esi
mov    $0x5,%edx
call   1030 <maximalRectangle@plt>
cmp    $0x6,%eax
je     11ad <main+0x7d>
lea    0xe83(%rip),%rdi
lea    0xe8d(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0x2cc5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2ca9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
mov    $0x5,%edx
call   1040 <maximalRectangle@plt>
cmp    $0x6,%eax
jne    1185 <main+0x45>
lea    0xeb2(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret
lea    0xe8c(%rip),%rdi
lea    0xe96(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"10100\00"
@.str.1 = [6 x i8] c"10111\00"
@.str.2 = [6 x i8] c"11111\00"
@.str.3 = [6 x i8] c"10010\00"
@__const.main.h = [4 x i8*] [i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [17 x i8] c"assert fail: %s\0A\00"
@.str.5 = [2 x i8] c"6\00"
@.str.6 = [21 x i8] c"everything is fine!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x i8*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [4 x i8*]* %6 to i8*
%8 = getelementptr inbounds [4 x i8*], [4 x i8*]* %6, i64 0, i64 0
%9 = call i32 @maximalRectangle(i8** %8, i32 4, i32 5)
%10 = icmp eq i32 %9, 6
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 @exit(i32 -1)
unreachable
14: ; preds = %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"10100\00"
@.str.1 = [6 x i8] c"10111\00"
@.str.2 = [6 x i8] c"11111\00"
@.str.3 = [6 x i8] c"10010\00"
@__const.main.h = [4 x i8*] [i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [17 x i8] c"assert fail: %s\0A\00"
@.str.5 = [2 x i8] c"6\00"
@str = [20 x i8] c"everything is fine!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i8*]
%4 = bitcast [4 x i8*]* %3 to i8*
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
%6 = call i32 @maximalRectangle(i8** %5, i32 4, i32 5)
%7 = icmp eq i32 %6, 6
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 @exit(i32 -1)
unreachable
11: ; preds = %2
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}