int main(int argc, char const *argv[]) {
  char matrix[4][5] = {{'1', '0', '1', '1', '1'},
                       {'1', '0', '1', '1', '1'},
                       {'1', '1', '1', '1', '1'},
                       {'1', '0', '0', '1', '0'}};
  printf("%d\n", maximalSquare(matrix, 3, 5));
  printf("%p\n", &"7777");
  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    0xec3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xebe(%rip),%eax
mov    %eax,-0x20(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x3,%esi
mov    $0x5,%edx
mov    $0x0,%al
call   1040 <maximalSquare@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe97(%rip),%rdi
lea    0xe94(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x3,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <maximalSquare@plt>
lea    0xec0(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb4(%rip),%rdi
lea    0xeb1(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.matrix = [4 x [5 x i8]] [[5 x i8] c"10111", [5 x i8] c"10111", [5 x i8] c"11111", [5 x i8] c"10010"]
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%p\0A\00"
@.str.2 = [5 x i8] c"7777\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x [5 x i8]]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [4 x [5 x i8]]* %6 to i8*
%8 = getelementptr inbounds [4 x [5 x i8]], [4 x [5 x i8]]* %6, i64 0, i64 0
%9 = call i32 ([5 x i8]*, i32, i32, ...) bitcast (i32 (...)* @maximalSquare to i32 ([5 x i8]*, i32, i32, ...)*)([5 x i8]* %8, i32 3, i32 5)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), [5 x i8]* @.str.2)
ret i32 0
}

LLVM IR (-O2):
@__const.main.matrix = [4 x [5 x i8]] [[5 x i8] c"10111", [5 x i8] c"10111", [5 x i8] c"11111", [5 x i8] c"10010"]
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%p\0A\00"
@.str.2 = [5 x i8] c"7777\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x [5 x i8]]
%4 = getelementptr inbounds [4 x [5 x i8]], [4 x [5 x i8]]* %3, i64 0, i64 0, i64 0
%5 = getelementptr inbounds [4 x [5 x i8]], [4 x [5 x i8]]* %3, i64 0, i64 0
%6 = call i32 ([5 x i8]*, i32, i32, ...) bitcast (i32 (...)* @maximalSquare to i32 ([5 x i8]*, i32, i32, ...)*)([5 x i8]* %5, i32 3, i32 5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), [5 x i8]* @.str.2)
ret i32 0
}