#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 */
scalar_t__ malloc(int);
int num_islands(char **, int, int);
int /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int islands;
  srand(time(NULL));
  char **grid = (char **)malloc(4 * sizeof(char *));
  for (int y = 0; y < 4; y++) {
    grid[y] = (char *)malloc(5 * sizeof(char));
    for (int x = 0; x < 5; x++)
      grid[y][x] = (rand() % 3) < 1 ? '1' : '0';
  }
  for (int y = 0; y < 4; y++) {
    for (int x = 0; x < 5; x++)
      printf("%c ", grid[y][x]);
    printf("\n");
  }
  islands = num_islands(grid, 4, 5);
  printf("number of islands: %d\n", islands);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    $0x20,%edi
call   1070 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    121d <main+0xbd>
mov    $0x5,%edi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movl   $0x0,-0x18(%rbp)
cmpl   $0x5,-0x18(%rbp)
jge    120a <main+0xaa>
mov    $0x0,%al
call   1080 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    $0x30,%eax
mov    $0x31,%ecx
cmp    $0x1,%edx
cmovl  %ecx,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11be <main+0x5e>
jmp    120f <main+0xaf>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1194 <main+0x34>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    128b <main+0x12b>
movl   $0x0,-0x20(%rbp)
cmpl   $0x5,-0x20(%rbp)
jge    126f <main+0x10f>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xda6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1235 <main+0xd5>
lea    0xda3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1224 <main+0xc4>
mov    -0x10(%rbp),%rdi
mov    $0x4,%esi
mov    $0x5,%edx
call   1040 <num_islands@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xd59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x5,%edi
call   1080 <malloc@plt>
mov    %rax,(%r15,%rbx,8)
xor    %eax,%eax
call   1090 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
test   %eax,%eax
setle  %al
or     $0x30,%al
mov    (%r15,%rbx,8),%rcx
mov    %al,(%rcx)
xor    %eax,%eax
call   1090 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
test   %eax,%eax
setle  %al
or     $0x30,%al
mov    (%r15,%rbx,8),%rcx
mov    %al,0x1(%rcx)
xor    %eax,%eax
call   1090 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
test   %eax,%eax
setle  %al
or     $0x30,%al
mov    (%r15,%rbx,8),%rcx
mov    %al,0x2(%rcx)
xor    %eax,%eax
call   1090 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
test   %eax,%eax
setle  %al
or     $0x30,%al
mov    (%r15,%rbx,8),%rcx
mov    %al,0x3(%rcx)
xor    %eax,%eax
call   1090 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
test   %eax,%eax
setle  %al
or     $0x30,%al
mov    (%r15,%rbx,8),%rcx
mov    %al,0x4(%rcx)
add    $0x1,%rbx
cmp    $0x4,%rbx
jne    11a0 <main+0x30>
mov    (%r15),%rax
movsbl (%rax),%esi
lea    0xd48(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r15),%rax
movsbl 0x1(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r15),%rax
movsbl 0x2(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r15),%rax
movsbl 0x3(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r15),%rax
movsbl 0x4(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%r15),%rax
movsbl (%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%r15),%rax
movsbl 0x1(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%r15),%rax
movsbl 0x2(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%r15),%rax
movsbl 0x3(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%r15),%rax
movsbl 0x4(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x10(%r15),%rax
movsbl (%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%r15),%rax
movsbl 0x1(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%r15),%rax
movsbl 0x2(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%r15),%rax
movsbl 0x3(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%r15),%rax
movsbl 0x4(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x18(%r15),%rax
movsbl (%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%r15),%rax
movsbl 0x1(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%r15),%rax
movsbl 0x2(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%r15),%rax
movsbl 0x3(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%r15),%rax
movsbl 0x4(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
mov    $0x4,%esi
mov    $0x5,%edx
call   1050 <num_islands@plt>
lea    0xbb2(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%c \00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [23 x i8] c"number of islands: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 @time(i32* null)
%9 = call i32 @srand(i32 %8)
%10 = call i64 @malloc(i32 32)
%11 = inttoptr i64 %10 to i8**
store i8** %11, i8*** %3
store i32 0, i32* %4
br label %12
12: ; preds = %44, %0
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 4
br i1 %14, label %15, label %47
15: ; preds = %12
%16 = call i64 @malloc(i32 5)
%17 = inttoptr i64 %16 to i8*
%18 = load i8**, i8*** %3
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
store i8* %17, i8** %21
store i32 0, i32* %5
br label %22
22: ; preds = %40, %15
%23 = load i32, i32* %5
%24 = icmp slt i32 %23, 5
br i1 %24, label %25, label %43
25: ; preds = %22
%26 = call i32 (...) @rand()
%27 = srem i32 %26, 3
%28 = icmp slt i32 %27, 1
%29 = zext i1 %28 to i64
%30 = select i1 %28, i32 49, i32 48
%31 = trunc i32 %30 to i8
%32 = load i8**, i8*** %3
%33 = load i32, i32* %4
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8*, i8** %32, i64 %34
%36 = load i8*, i8** %35
%37 = load i32, i32* %5
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8, i8* %36, i64 %38
store i8 %31, i8* %39
br label %40
40: ; preds = %25
%41 = load i32, i32* %5
%42 = add nsw i32 %41, 1
store i32 %42, i32* %5
br label %22
43: ; preds = %22
br label %44
44: ; preds = %43
%45 = load i32, i32* %4
%46 = add nsw i32 %45, 1
store i32 %46, i32* %4
br label %12
47: ; preds = %12
store i32 0, i32* %6
br label %48
48: ; preds = %72, %47
%49 = load i32, i32* %6
%50 = icmp slt i32 %49, 4
br i1 %50, label %51, label %75
51: ; preds = %48
store i32 0, i32* %7
br label %52
52: ; preds = %67, %51
%53 = load i32, i32* %7
%54 = icmp slt i32 %53, 5
br i1 %54, label %55, label %70
55: ; preds = %52
%56 = load i8**, i8*** %3
%57 = load i32, i32* %6
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8*, i8** %56, i64 %58
%60 = load i8*, i8** %59
%61 = load i32, i32* %7
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8, i8* %60, i64 %62
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %65)
br label %67
67: ; preds = %55
%68 = load i32, i32* %7
%69 = add nsw i32 %68, 1
store i32 %69, i32* %7
br label %52
70: ; preds = %52
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %72
72: ; preds = %70
%73 = load i32, i32* %6
%74 = add nsw i32 %73, 1
store i32 %74, i32* %6
br label %48
75: ; preds = %48
%76 = load i8**, i8*** %3
%77 = call i32 @num_islands(i8** %76, i32 4, i32 5)
store i32 %77, i32* %2
%78 = load i32, i32* %2
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %78)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%c \00"
@.str.2 = [23 x i8] c"number of islands: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i64 @malloc(i32 32)
%4 = inttoptr i64 %3 to i8**
br label %5
5: ; preds = %0, %5
%6 = phi i64 [ 0, %0 ], [ %39, %5 ]
%7 = tail call i64 @malloc(i32 5)
%8 = inttoptr i64 %7 to i8*
%9 = getelementptr inbounds i8*, i8** %4, i64 %6
store i8* %8, i8** %9
%10 = tail call i32 (...) @rand()
%11 = srem i32 %10, 3
%12 = icmp slt i32 %11, 1
%13 = select i1 %12, i8 49, i8 48
%14 = load i8*, i8** %9
store i8 %13, i8* %14
%15 = tail call i32 (...) @rand()
%16 = srem i32 %15, 3
%17 = icmp slt i32 %16, 1
%18 = select i1 %17, i8 49, i8 48
%19 = load i8*, i8** %9
%20 = getelementptr inbounds i8, i8* %19, i64 1
store i8 %18, i8* %20
%21 = tail call i32 (...) @rand()
%22 = srem i32 %21, 3
%23 = icmp slt i32 %22, 1
%24 = select i1 %23, i8 49, i8 48
%25 = load i8*, i8** %9
%26 = getelementptr inbounds i8, i8* %25, i64 2
store i8 %24, i8* %26
%27 = tail call i32 (...) @rand()
%28 = srem i32 %27, 3
%29 = icmp slt i32 %28, 1
%30 = select i1 %29, i8 49, i8 48
%31 = load i8*, i8** %9
%32 = getelementptr inbounds i8, i8* %31, i64 3
store i8 %30, i8* %32
%33 = tail call i32 (...) @rand()
%34 = srem i32 %33, 3
%35 = icmp slt i32 %34, 1
%36 = select i1 %35, i8 49, i8 48
%37 = load i8*, i8** %9
%38 = getelementptr inbounds i8, i8* %37, i64 4
store i8 %36, i8* %38
%39 = add nuw nsw i64 %6, 1
%40 = icmp eq i64 %39, 4
br i1 %40, label %41, label %5
41: ; preds = %5
%42 = load i8*, i8** %4
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %44)
%46 = load i8*, i8** %4
%47 = getelementptr inbounds i8, i8* %46, i64 1
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %49)
%51 = load i8*, i8** %4
%52 = getelementptr inbounds i8, i8* %51, i64 2
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %54)
%56 = load i8*, i8** %4
%57 = getelementptr inbounds i8, i8* %56, i64 3
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %59)
%61 = load i8*, i8** %4
%62 = getelementptr inbounds i8, i8* %61, i64 4
%63 = load i8, i8* %62
%64 = sext i8 %63 to i32
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %64)
%66 = tail call i32 @putchar(i32 10)
%67 = getelementptr inbounds i8*, i8** %4, i64 1
%68 = load i8*, i8** %67
%69 = load i8, i8* %68
%70 = sext i8 %69 to i32
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %70)
%72 = load i8*, i8** %67
%73 = getelementptr inbounds i8, i8* %72, i64 1
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %75)
%77 = load i8*, i8** %67
%78 = getelementptr inbounds i8, i8* %77, i64 2
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %80)
%82 = load i8*, i8** %67
%83 = getelementptr inbounds i8, i8* %82, i64 3
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %85)
%87 = load i8*, i8** %67
%88 = getelementptr inbounds i8, i8* %87, i64 4
%89 = load i8, i8* %88
%90 = sext i8 %89 to i32
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %90)
%92 = tail call i32 @putchar(i32 10)
%93 = getelementptr inbounds i8*, i8** %4, i64 2
%94 = load i8*, i8** %93
%95 = load i8, i8* %94
%96 = sext i8 %95 to i32
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %96)
%98 = load i8*, i8** %93
%99 = getelementptr inbounds i8, i8* %98, i64 1
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %101)
%103 = load i8*, i8** %93
%104 = getelementptr inbounds i8, i8* %103, i64 2
%105 = load i8, i8* %104
%106 = sext i8 %105 to i32
%107 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %106)
%108 = load i8*, i8** %93
%109 = getelementptr inbounds i8, i8* %108, i64 3
%110 = load i8, i8* %109
%111 = sext i8 %110 to i32
%112 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %111)
%113 = load i8*, i8** %93
%114 = getelementptr inbounds i8, i8* %113, i64 4
%115 = load i8, i8* %114
%116 = sext i8 %115 to i32
%117 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %116)
%118 = tail call i32 @putchar(i32 10)
%119 = getelementptr inbounds i8*, i8** %4, i64 3
%120 = load i8*, i8** %119
%121 = load i8, i8* %120
%122 = sext i8 %121 to i32
%123 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %122)
%124 = load i8*, i8** %119
%125 = getelementptr inbounds i8, i8* %124, i64 1
%126 = load i8, i8* %125
%127 = sext i8 %126 to i32
%128 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %127)
%129 = load i8*, i8** %119
%130 = getelementptr inbounds i8, i8* %129, i64 2
%131 = load i8, i8* %130
%132 = sext i8 %131 to i32
%133 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %132)
%134 = load i8*, i8** %119
%135 = getelementptr inbounds i8, i8* %134, i64 3
%136 = load i8, i8* %135
%137 = sext i8 %136 to i32
%138 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %137)
%139 = load i8*, i8** %119
%140 = getelementptr inbounds i8, i8* %139, i64 4
%141 = load i8, i8* %140
%142 = sext i8 %141 to i32
%143 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %142)
%144 = tail call i32 @putchar(i32 10)
%145 = tail call i32 @num_islands(i8** %4, i32 4, i32 5)
%146 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %145)
ret i32 0
}