#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*/ brighten_image(int, int, int, int **);
int /*<<< orphan*/ darken_image(int, int, int, int **);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int num_pixel_row, num_pixel_column, num_bright, num_menu;
  int pixel_data[100][100] = {
      0,
  };
  while (1) {
    printf("1) 이미지 입력\n2) 이미지 밝기 증가\n3) 이미지 밝기 감소\n4) "
           "이미지 밝기 출력\n5) 프로그램 종료\n");
    printf("메뉴를 입력하세요: ");
    scanf("%d", &num_menu);
    if (num_menu == 1) {
      scanf("%d %d", &num_pixel_row, &num_pixel_column);
      for (int i = 0; i < num_pixel_row; i++) {
        for (int j = 0; j < num_pixel_column; j++) {
          scanf("%d", &pixel_data[i][j]);
        }
      }
      printf("\n");
    } else if (num_menu == 2) {
      printf("증가시킬 밝기의 양을 입력하세요: ");
      scanf("%d", &num_bright);
      brighten_image(num_pixel_row, num_pixel_column, num_bright, pixel_data);
      printf("\n");
    } else if (num_menu == 3) {
      printf("감소시킬 밝기의 양을 입력하세요: ");
      scanf("%d", &num_bright);
      darken_image(num_pixel_row, num_pixel_column, num_bright, pixel_data);
      printf("\n");
    } else if (num_menu == 4) {
      for (int i = 0; i < num_pixel_row; i++) {
        for (int j = 0; j < num_pixel_column; j++) {
          printf("%d ", pixel_data[i][j]);
        }
        printf("\n");
      }
      printf("\n");
    } else if (num_menu == 5) {
      break;
    } else {
      continue;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9c70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x9c60(%rbp),%rdi
xor    %esi,%esi
mov    $0x9c40,%edx
call   1050 <memset@plt>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf04(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
cmpl   $0x1,-0x14(%rbp)
jne    1269 <main+0x119>
lea    0xee5(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1070 <scanf@plt>
movl   $0x0,-0x9c64(%rbp)
mov    -0x9c64(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1256 <main+0x106>
movl   $0x0,-0x9c68(%rbp)
mov    -0x9c68(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    123d <main+0xed>
movslq -0x9c64(%rbp),%rax
lea    -0x9c60(%rbp),%rsi
imul   $0x190,%rax,%rax
add    %rax,%rsi
movslq -0x9c68(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
mov    -0x9c68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c68(%rbp)
jmp    11e6 <main+0x96>
jmp    1242 <main+0xf2>
mov    -0x9c64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c64(%rbp)
jmp    11cd <main+0x7d>
lea    0xe1e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13e5 <main+0x295>
cmpl   $0x2,-0x14(%rbp)
jne    12bb <main+0x16b>
lea    0xe25(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe14(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x9c60(%rbp),%rcx
call   1060 <brighten_image@plt>
lea    0xdcc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13e0 <main+0x290>
cmpl   $0x3,-0x14(%rbp)
jne    130d <main+0x1bd>
lea    0xe03(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdc2(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x9c60(%rbp),%rcx
call   1030 <darken_image@plt>
lea    0xd7a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13db <main+0x28b>
cmpl   $0x4,-0x14(%rbp)
jne    13c2 <main+0x272>
movl   $0x0,-0x9c6c(%rbp)
mov    -0x9c6c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13af <main+0x25f>
movl   $0x0,-0x9c70(%rbp)
mov    -0x9c70(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    138d <main+0x23d>
movslq -0x9c6c(%rbp),%rcx
lea    -0x9c60(%rbp),%rax
imul   $0x190,%rcx,%rcx
add    %rcx,%rax
movslq -0x9c70(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd8d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x9c70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c70(%rbp)
jmp    133a <main+0x1ea>
lea    0xce7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x9c6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c6c(%rbp)
jmp    1321 <main+0x1d1>
lea    0xcc5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13d6 <main+0x286>
cmpl   $0x5,-0x14(%rbp)
jne    13d1 <main+0x281>
jmp    13ea <main+0x29a>
jmp    1175 <main+0x25>
jmp    13db <main+0x28b>
jmp    13e0 <main+0x290>
jmp    13e5 <main+0x295>
jmp    1175 <main+0x25>
xor    %eax,%eax
add    $0x9c70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x9c58,%rsp
lea    0x10(%rsp),%rdi
mov    $0x9c40,%edx
xor    %esi,%esi
call   1070 <memset@plt>
lea    0xe9a(%rip),%rbp
lea    0xef6(%rip),%r15
jmp    11de <main+0x6e>
lea    0xe8d(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
mov    0x8(%rsp),%edx
lea    0x10(%rsp),%rcx
call   1080 <brighten_image@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeb5(%rip),%rdi
call   1040 <puts@plt>
lea    0xe23(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0xc(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x4,%eax
ja     11de <main+0x6e>
lea    0xde6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe06(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0x4(%rsp),%ecx
test   %ecx,%ecx
jle    11d4 <main+0x64>
mov    (%rsp),%eax
lea    0x10(%rsp),%r12
xor    %r13d,%r13d
jmp    1267 <main+0xf7>
xchg   %ax,%ax
add    $0x1,%r13
movslq %ecx,%rdx
add    $0x190,%r12
cmp    %rdx,%r13
jge    11d4 <main+0x64>
test   %eax,%eax
jle    1250 <main+0xe0>
mov    %r12,%r14
xor    %ebx,%ebx
mov    %rbp,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
add    $0x1,%rbx
movslq (%rsp),%rax
add    $0x4,%r14
cmp    %rax,%rbx
jl     1270 <main+0x100>
mov    0x4(%rsp),%ecx
jmp    1250 <main+0xe0>
lea    0xdcb(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
mov    0x8(%rsp),%edx
lea    0x10(%rsp),%rcx
call   1050 <darken_image@plt>
jmp    11d4 <main+0x64>
cmpl   $0x0,0x4(%rsp)
jle    11d4 <main+0x64>
lea    0x10(%rsp),%rbx
xor    %r14d,%r14d
jmp    1306 <main+0x196>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r14
movslq 0x4(%rsp),%rax
add    $0x190,%rbx
cmp    %rax,%r14
mov    %r12,%rbp
jge    11d4 <main+0x64>
mov    %rbp,%r12
cmpl   $0x0,(%rsp)
jle    12e0 <main+0x170>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rbx,%rbp,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%rbp
movslq (%rsp),%rax
cmp    %rax,%rbp
jl     1320 <main+0x1b0>
jmp    12e0 <main+0x170>
xor    %eax,%eax
add    $0x9c58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [125 x i8] c"1) \EC\9D\B4\EB\AF\B8\EC\A7\80 \EC\9E\85\EB\A0\A5\0A2) \EC\9D\B4\EB\AF\B8\EC\A7\80 \EB\B0\9D\EA\B8\B0 \EC\A6\9D\EA\B0\80\0A3) \EC\9D\B4\EB\AF\B8\EC\A7\80 \EB\B0\9D\EA\B8\B0 \EA\B0\90\EC\86\8C\0A4) \EC\9D\B4\EB\AF\B8\EC\A7\80 \EB\B0\9D\EA\B8\B0 \EC\B6\9C\EB\A0\A5\0A5) \ED\94\84\EB\A1\9C\EA\B7\B8\EB\9E\A8 \EC\A2\85\EB\A3\8C\0A\00"
@.str.1 = [28 x i8] c"\EB\A9\94\EB\89\B4\EB\A5\BC \EC\9E\85\EB\A0\A5\ED\95\98\EC\84\B8\EC\9A\94: \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [6 x i8] c"%d %d\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [48 x i8] c"\EC\A6\9D\EA\B0\80\EC\8B\9C\ED\82\AC \EB\B0\9D\EA\B8\B0\EC\9D\98 \EC\96\91\EC\9D\84 \EC\9E\85\EB\A0\A5\ED\95\98\EC\84\B8\EC\9A\94: \00"
@.str.6 = [48 x i8] c"\EA\B0\90\EC\86\8C\EC\8B\9C\ED\82\AC \EB\B0\9D\EA\B8\B0\EC\9D\98 \EC\96\91\EC\9D\84 \EC\9E\85\EB\A0\A5\ED\95\98\EC\84\B8\EC\9A\94: \00"
@.str.7 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [100 x [100 x i32]]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
%11 = bitcast [100 x [100 x i32]]* %6 to i8*
br label %12
12: ; preds = %0, %108, %112
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
%16 = load i32, i32* %5
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %46
18: ; preds = %12
%19 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32* %2, i32* %3)
store i32 0, i32* %7
br label %20
20: ; preds = %41, %18
%21 = load i32, i32* %7
%22 = load i32, i32* %2
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %44
24: ; preds = %20
store i32 0, i32* %8
br label %25
25: ; preds = %37, %24
%26 = load i32, i32* %8
%27 = load i32, i32* %3
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %40
29: ; preds = %25
%30 = load i32, i32* %7
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %6, i64 0, i64 %31
%33 = load i32, i32* %8
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [100 x i32], [100 x i32]* %32, i64 0, i64 %34
%36 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %35)
br label %37
37: ; preds = %29
%38 = load i32, i32* %8
%39 = add nsw i32 %38, 1
store i32 %39, i32* %8
br label %25
40: ; preds = %25
br label %41
41: ; preds = %40
%42 = load i32, i32* %7
%43 = add nsw i32 %42, 1
store i32 %43, i32* %7
br label %20
44: ; preds = %20
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %112
46: ; preds = %12
%47 = load i32, i32* %5
%48 = icmp eq i32 %47, 2
br i1 %48, label %49, label %59
49: ; preds = %46
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%51 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%52 = load i32, i32* %2
%53 = load i32, i32* %3
%54 = load i32, i32* %4
%55 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %6, i64 0, i64 0
%56 = bitcast [100 x i32]* %55 to i32**
%57 = call i32 @brighten_image(i32 %52, i32 %53, i32 %54, i32** %56)
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %111
59: ; preds = %46
%60 = load i32, i32* %5
%61 = icmp eq i32 %60, 3
br i1 %61, label %62, label %72
62: ; preds = %59
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%64 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%65 = load i32, i32* %2
%66 = load i32, i32* %3
%67 = load i32, i32* %4
%68 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %6, i64 0, i64 0
%69 = bitcast [100 x i32]* %68 to i32**
%70 = call i32 @darken_image(i32 %65, i32 %66, i32 %67, i32** %69)
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %110
72: ; preds = %59
%73 = load i32, i32* %5
%74 = icmp eq i32 %73, 4
br i1 %74, label %75, label %104
75: ; preds = %72
store i32 0, i32* %9
br label %76
76: ; preds = %99, %75
%77 = load i32, i32* %9
%78 = load i32, i32* %2
%79 = icmp slt i32 %77, %78
br i1 %79, label %80, label %102
80: ; preds = %76
store i32 0, i32* %10
br label %81
81: ; preds = %94, %80
%82 = load i32, i32* %10
%83 = load i32, i32* %3
%84 = icmp slt i32 %82, %83
br i1 %84, label %85, label %97
85: ; preds = %81
%86 = load i32, i32* %9
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %6, i64 0, i64 %87
%89 = load i32, i32* %10
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [100 x i32], [100 x i32]* %88, i64 0, i64 %90
%92 = load i32, i32* %91
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %92)
br label %94
94: ; preds = %85
%95 = load i32, i32* %10
%96 = add nsw i32 %95, 1
store i32 %96, i32* %10
br label %81
97: ; preds = %81
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %99
99: ; preds = %97
%100 = load i32, i32* %9
%101 = add nsw i32 %100, 1
store i32 %101, i32* %9
br label %76
102: ; preds = %76
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %109
104: ; preds = %72
%105 = load i32, i32* %5
%106 = icmp eq i32 %105, 5
br i1 %106, label %107, label %108
107: ; preds = %104
br label %113
108: ; preds = %104
br label %12
109: ; preds = %102
br label %110
110: ; preds = %109, %62
br label %111
111: ; preds = %110, %49
br label %112
112: ; preds = %111, %44
br label %12
113: ; preds = %107
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [28 x i8] c"\EB\A9\94\EB\89\B4\EB\A5\BC \EC\9E\85\EB\A0\A5\ED\95\98\EC\84\B8\EC\9A\94: \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [6 x i8] c"%d %d\00"
@.str.5 = [48 x i8] c"\EC\A6\9D\EA\B0\80\EC\8B\9C\ED\82\AC \EB\B0\9D\EA\B8\B0\EC\9D\98 \EC\96\91\EC\9D\84 \EC\9E\85\EB\A0\A5\ED\95\98\EC\84\B8\EC\9A\94: \00"
@.str.6 = [48 x i8] c"\EA\B0\90\EC\86\8C\EC\8B\9C\ED\82\AC \EB\B0\9D\EA\B8\B0\EC\9D\98 \EC\96\91\EC\9D\84 \EC\9E\85\EB\A0\A5\ED\95\98\EC\84\B8\EC\9A\94: \00"
@.str.7 = [4 x i8] c"%d \00"
@str = [124 x i8] c"1) \EC\9D\B4\EB\AF\B8\EC\A7\80 \EC\9E\85\EB\A0\A5\0A2) \EC\9D\B4\EB\AF\B8\EC\A7\80 \EB\B0\9D\EA\B8\B0 \EC\A6\9D\EA\B0\80\0A3) \EC\9D\B4\EB\AF\B8\EC\A7\80 \EB\B0\9D\EA\B8\B0 \EA\B0\90\EC\86\8C\0A4) \EC\9D\B4\EB\AF\B8\EC\A7\80 \EB\B0\9D\EA\B8\B0 \EC\B6\9C\EB\A0\A5\0A5) \ED\94\84\EB\A1\9C\EA\B7\B8\EB\9E\A8 \EC\A2\85\EB\A3\8C\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [100 x [100 x i32]]
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast [100 x [100 x i32]]* %5 to i8*
%11 = bitcast [100 x [100 x i32]]* %5 to i32**
br label %12
12: ; preds = %82, %0
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([124 x i8], [124 x i8]* @str, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%16 = load i32, i32* %4
switch i32 %16, label %82 [
i32 1, label %20
i32 2, label %47
i32 3, label %54
i32 4, label %17
i32 5, label %83
]
17: ; preds = %12
%18 = load i32, i32* %1
%19 = icmp sgt i32 %18, 0
br i1 %19, label %61, label %80
20: ; preds = %12
%21 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32* %1, i32* %2)
%22 = load i32, i32* %1
%23 = icmp sgt i32 %22, 0
br i1 %23, label %24, label %80
24: ; preds = %20
%25 = load i32, i32* %2
br label %26
26: ; preds = %24, %33
%27 = phi i32 [ %22, %24 ], [ %34, %33 ]
%28 = phi i32 [ %25, %24 ], [ %35, %33 ]
%29 = phi i64 [ 0, %24 ], [ %36, %33 ]
%30 = icmp sgt i32 %28, 0
br i1 %30, label %39, label %33
31: ; preds = %39
%32 = load i32, i32* %1
br label %33
33: ; preds = %31, %26
%34 = phi i32 [ %32, %31 ], [ %27, %26 ]
%35 = phi i32 [ %44, %31 ], [ %28, %26 ]
%36 = add nuw nsw i64 %29, 1
%37 = sext i32 %34 to i64
%38 = icmp slt i64 %36, %37
br i1 %38, label %26, label %80
39: ; preds = %26, %39
%40 = phi i64 [ %43, %39 ], [ 0, %26 ]
%41 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %5, i64 0, i64 %29, i64 %40
%42 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %41)
%43 = add nuw nsw i64 %40, 1
%44 = load i32, i32* %2
%45 = sext i32 %44 to i64
%46 = icmp slt i64 %43, %45
br i1 %46, label %39, label %31
47: ; preds = %12
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%49 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%50 = load i32, i32* %1
%51 = load i32, i32* %2
%52 = load i32, i32* %3
%53 = call i32 @brighten_image(i32 %50, i32 %51, i32 %52, i32** %11)
br label %80
54: ; preds = %12
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%56 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%57 = load i32, i32* %1
%58 = load i32, i32* %2
%59 = load i32, i32* %3
%60 = call i32 @darken_image(i32 %57, i32 %58, i32 %59, i32** %11)
br label %80
61: ; preds = %17, %65
%62 = phi i64 [ %67, %65 ], [ 0, %17 ]
%63 = load i32, i32* %2
%64 = icmp sgt i32 %63, 0
br i1 %64, label %71, label %65
65: ; preds = %71, %61
%66 = call i32 @putchar(i32 10)
%67 = add nuw nsw i64 %62, 1
%68 = load i32, i32* %1
%69 = sext i32 %68 to i64
%70 = icmp slt i64 %67, %69
br i1 %70, label %61, label %80
71: ; preds = %61, %71
%72 = phi i64 [ %76, %71 ], [ 0, %61 ]
%73 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %5, i64 0, i64 %62, i64 %72
%74 = load i32, i32* %73
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %74)
%76 = add nuw nsw i64 %72, 1
%77 = load i32, i32* %2
%78 = sext i32 %77 to i64
%79 = icmp slt i64 %76, %78
br i1 %79, label %71, label %65
80: ; preds = %65, %33, %17, %20, %47, %54
%81 = call i32 @putchar(i32 10)
br label %82
82: ; preds = %80, %12
br label %12
83: ; preds = %12
ret i32 0
}