#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int r, c, a[100][100], b[100][100], sum[100][100], i, j;
  printf("Enter number of rows (between 1 and 100): ");
  scanf("%d", &r);
  printf("Enter number of columns (between 1 and 100): ");
  scanf("%d", &c);
  printf("\nEnter elements of 1st matrix:\n");
  for (i = 0; i < r; ++i)
    for (j = 0; j < c; ++j) {
      printf("Enter element a%d%d: ", i + 1, j + 1);
      scanf("%d", &a[i][j]);
    }
  printf("Enter elements of 2nd matrix:\n");
  for (i = 0; i < r; ++i)
    for (j = 0; j < c; ++j) {
      printf("Enter element a%d%d: ", i + 1, j + 1);
      scanf("%d", &b[i][j]);
    }
  for (i = 0; i < r; ++i)
    for (j = 0; j < c; ++j)
      sum[i][j] = a[i][j] + b[i][j];
  printf("\nSum of two matrix is: \n\n");
  for (i = 0; i < r; ++i)
    for (j = 0; j < c; ++j) {
      printf("%d ", sum[i][j]);
      if (j == c - 1)
        printf("\n\n");
    }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d4e0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1d4d4(%rbp)
mov    -0x1d4d4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    122d <main+0x10d>
movl   $0x0,-0x1d4d8(%rbp)
mov    -0x1d4d8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1214 <main+0xf4>
mov    -0x1d4d4(%rbp),%esi
add    $0x1,%esi
mov    -0x1d4d8(%rbp),%edx
add    $0x1,%edx
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x1d4d4(%rbp),%rax
lea    -0x9c50(%rbp),%rsi
imul   $0x190,%rax,%rax
add    %rax,%rsi
movslq -0x1d4d8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe30(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x1d4d8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d4d8(%rbp)
jmp    119f <main+0x7f>
jmp    1219 <main+0xf9>
mov    -0x1d4d4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d4d4(%rbp)
jmp    1186 <main+0x66>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1d4d4(%rbp)
mov    -0x1d4d4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12ec <main+0x1cc>
movl   $0x0,-0x1d4d8(%rbp)
mov    -0x1d4d8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12d3 <main+0x1b3>
mov    -0x1d4d4(%rbp),%esi
add    $0x1,%esi
mov    -0x1d4d8(%rbp),%edx
add    $0x1,%edx
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x1d4d4(%rbp),%rax
lea    -0x13890(%rbp),%rsi
imul   $0x190,%rax,%rax
add    %rax,%rsi
movslq -0x1d4d8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xd71(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x1d4d8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d4d8(%rbp)
jmp    125e <main+0x13e>
jmp    12d8 <main+0x1b8>
mov    -0x1d4d4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d4d4(%rbp)
jmp    1245 <main+0x125>
movl   $0x0,-0x1d4d4(%rbp)
mov    -0x1d4d4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13b1 <main+0x291>
movl   $0x0,-0x1d4d8(%rbp)
mov    -0x1d4d8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1398 <main+0x278>
movslq -0x1d4d4(%rbp),%rcx
lea    -0x9c50(%rbp),%rax
imul   $0x190,%rcx,%rcx
add    %rcx,%rax
movslq -0x1d4d8(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
movslq -0x1d4d4(%rbp),%rcx
lea    -0x13890(%rbp),%rax
imul   $0x190,%rcx,%rcx
add    %rcx,%rax
movslq -0x1d4d8(%rbp),%rcx
add    (%rax,%rcx,4),%edx
movslq -0x1d4d4(%rbp),%rcx
lea    -0x1d4d0(%rbp),%rax
imul   $0x190,%rcx,%rcx
add    %rcx,%rax
movslq -0x1d4d8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1d4d8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d4d8(%rbp)
jmp    130f <main+0x1ef>
jmp    139d <main+0x27d>
mov    -0x1d4d4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d4d4(%rbp)
jmp    12f6 <main+0x1d6>
lea    0xcf9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1d4d4(%rbp)
mov    -0x1d4d4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1475 <main+0x355>
movl   $0x0,-0x1d4d8(%rbp)
mov    -0x1d4d8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    145c <main+0x33c>
movslq -0x1d4d4(%rbp),%rcx
lea    -0x1d4d0(%rbp),%rax
imul   $0x190,%rcx,%rcx
add    %rcx,%rax
movslq -0x1d4d8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xcb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1d4d8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    1443 <main+0x323>
lea    0xc8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1448 <main+0x328>
mov    -0x1d4d8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d4d8(%rbp)
jmp    13e2 <main+0x2c2>
jmp    1461 <main+0x341>
mov    -0x1d4d4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d4d4(%rbp)
jmp    13c9 <main+0x2a9>
xor    %eax,%eax
add    $0x1d4e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1d4e8,%rsp
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed5(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%ecx
test   %ecx,%ecx
jle    1212 <main+0xe2>
lea    0x138a0(%rsp),%rbp
mov    0x8(%rsp),%eax
lea    0xeb3(%rip),%r14
lea    0xe7b(%rip),%r15
xor    %r12d,%r12d
jmp    11cf <main+0x9f>
cs nopw 0x0(%rax,%rax,1)
nop
movslq %ecx,%rdx
add    $0x190,%rbp
cmp    %rdx,%r12
jge    1212 <main+0xe2>
add    $0x1,%r12
test   %eax,%eax
jle    11c0 <main+0x90>
mov    %rbp,%r13
xor    %ebx,%ebx
nopl   0x0(%rax)
add    $0x1,%rbx
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
movslq 0x8(%rsp),%rax
add    $0x4,%r13
cmp    %rax,%rbx
jl     11e0 <main+0xb0>
mov    0xc(%rsp),%ecx
jmp    11c0 <main+0x90>
lea    0xe7c(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    1457 <main+0x327>
lea    0x9c60(%rsp),%rbp
mov    0x8(%rsp),%ecx
lea    0xe1f(%rip),%r14
lea    0xde7(%rip),%r15
xor    %r12d,%r12d
jmp    125f <main+0x12f>
nopl   0x0(%rax)
movslq %eax,%rdx
add    $0x190,%rbp
cmp    %rdx,%r12
jge    12a2 <main+0x172>
add    $0x1,%r12
test   %ecx,%ecx
jle    1250 <main+0x120>
mov    %rbp,%r13
xor    %ebx,%ebx
nopl   0x0(%rax)
add    $0x1,%rbx
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
movslq 0x8(%rsp),%rcx
add    $0x4,%r13
cmp    %rcx,%rbx
jl     1270 <main+0x140>
mov    0xc(%rsp),%eax
jmp    1250 <main+0x120>
test   %eax,%eax
jle    1457 <main+0x327>
mov    0x8(%rsp),%r15d
mov    %eax,%r11d
mov    %r15d,%r10d
and    $0xfffffff8,%r10d
lea    -0x8(%r10),%r14
mov    %r14,%r9
shr    $0x3,%r9
add    $0x1,%r9
mov    %r9,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0x18(%rsp)
lea    0x138d0(%rsp),%rbx
lea    0x9c90(%rsp),%rsi
lea    0x50(%rsp),%rdi
lea    0x138a0(%rsp),%r13
lea    0x9c60(%rsp),%rcx
lea    0x20(%rsp),%rax
xor    %r12d,%r12d
mov    %r10,0x10(%rsp)
jmp    1346 <main+0x216>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12
add    $0x190,%rbx
add    $0x190,%rsi
add    $0x190,%rdi
add    $0x190,%r13
add    $0x190,%rcx
add    $0x190,%rax
cmp    %r11,%r12
je     1457 <main+0x327>
test   %r15d,%r15d
jle    1310 <main+0x1e0>
cmp    $0x8,%r15d
jae    1360 <main+0x230>
xor    %edx,%edx
jmp    1430 <main+0x300>
nopl   0x0(%rax,%rax,1)
test   %r14,%r14
je     1449 <main+0x319>
mov    0x18(%rsp),%rdx
xor    %ebp,%ebp
movdqa -0x30(%rsi,%rbp,4),%xmm0
movdqa -0x20(%rsi,%rbp,4),%xmm1
paddd  -0x30(%rbx,%rbp,4),%xmm0
paddd  -0x20(%rbx,%rbp,4),%xmm1
movdqa %xmm0,-0x30(%rdi,%rbp,4)
movdqa %xmm1,-0x20(%rdi,%rbp,4)
movdqa -0x10(%rsi,%rbp,4),%xmm0
movdqa (%rsi,%rbp,4),%xmm1
paddd  -0x10(%rbx,%rbp,4),%xmm0
paddd  (%rbx,%rbp,4),%xmm1
movdqa %xmm0,-0x10(%rdi,%rbp,4)
movdqa %xmm1,(%rdi,%rbp,4)
add    $0x10,%rbp
add    $0xfffffffffffffffe,%rdx
jne    1370 <main+0x240>
test   $0x1,%r9b
je     141c <main+0x2ec>
imul   $0x190,%r12,%rdx
lea    (%rsp,%rdx,1),%r8
add    $0x138a0,%r8
mov    %r11,%r10
mov    %r9,%r11
lea    0x9c60(%rsp,%rdx,1),%r9
movdqa (%r9,%rbp,4),%xmm0
movdqa 0x10(%r9,%rbp,4),%xmm1
mov    %r11,%r9
mov    %r10,%r11
paddd  (%r8,%rbp,4),%xmm0
paddd  0x10(%r8,%rbp,4),%xmm1
mov    0x10(%rsp),%r10
add    %rsp,%rdx
add    $0x20,%rdx
movdqa %xmm0,(%rdx,%rbp,4)
movdqa %xmm1,0x10(%rdx,%rbp,4)
mov    %r10,%rdx
cmp    %r15,%r10
je     1310 <main+0x1e0>
nopl   0x0(%rax,%rax,1)
mov    (%rcx,%rdx,4),%ebp
add    0x0(%r13,%rdx,4),%ebp
mov    %ebp,(%rax,%rdx,4)
add    $0x1,%rdx
cmp    %rdx,%r15
jne    1430 <main+0x300>
jmp    1310 <main+0x1e0>
xor    %ebp,%ebp
test   $0x1,%r9b
jne    13c5 <main+0x295>
jmp    141c <main+0x2ec>
lea    0xc55(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%ecx
test   %ecx,%ecx
jle    14e3 <main+0x3b3>
lea    0x20(%rsp),%rbx
mov    0x8(%rsp),%eax
lea    0xbf7(%rip),%r15
lea    0xc48(%rip),%r14
xor    %r12d,%r12d
jmp    14a7 <main+0x377>
nopw   0x0(%rax,%rax,1)
mov    0xc(%rsp),%ecx
add    $0x1,%r12
movslq %ecx,%rdx
add    $0x190,%rbx
cmp    %rdx,%r12
jge    14e3 <main+0x3b3>
test   %eax,%eax
jle    1494 <main+0x364>
xor    %ebp,%ebp
jmp    14bc <main+0x38c>
nop
add    $0x1,%rbp
movslq %eax,%rcx
cmp    %rcx,%rbp
jge    1490 <main+0x360>
mov    (%rbx,%rbp,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%eax
lea    -0x1(%rax),%ecx
cmp    %rcx,%rbp
jne    14b0 <main+0x380>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%eax
jmp    14b0 <main+0x380>
xor    %eax,%eax
add    $0x1d4e8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [43 x i8] c"Enter number of rows (between 1 and 100): \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [46 x i8] c"Enter number of columns (between 1 and 100): \00"
@.str.4 = [22 x i8] c"Enter element a%d%d: \00"
@.str.7 = [4 x i8] c"%d \00"
@str = [31 x i8] c"\0AEnter elements of 1st matrix:\00"
@str.9 = [30 x i8] c"Enter elements of 2nd matrix:\00"
@str.10 = [25 x i8] c"\0ASum of two matrix is: \0A\00"
@str.11 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x [100 x i32]]
%4 = alloca [100 x [100 x i32]]
%5 = alloca [100 x [100 x i32]]
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast [100 x [100 x i32]]* %3 to i8*
%9 = bitcast [100 x [100 x i32]]* %4 to i8*
%10 = bitcast [100 x [100 x i32]]* %5 to i8*
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%16 = load i32, i32* %1
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %45
18: ; preds = %0
%19 = load i32, i32* %2
br label %20
20: ; preds = %18, %40
%21 = phi i32 [ %16, %18 ], [ %41, %40 ]
%22 = phi i32 [ %19, %18 ], [ %42, %40 ]
%23 = phi i64 [ 0, %18 ], [ %25, %40 ]
%24 = icmp sgt i32 %22, 0
%25 = add nuw nsw i64 %23, 1
br i1 %24, label %26, label %40
26: ; preds = %20
%27 = trunc i64 %25 to i32
br label %28
28: ; preds = %26, %28
%29 = phi i64 [ 0, %26 ], [ %30, %28 ]
%30 = add nuw nsw i64 %29, 1
%31 = trunc i64 %30 to i32
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %27, i32 %31)
%33 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %3, i64 0, i64 %23, i64 %29
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %33)
%35 = load i32, i32* %2
%36 = sext i32 %35 to i64
%37 = icmp slt i64 %30, %36
br i1 %37, label %28, label %38
38: ; preds = %28
%39 = load i32, i32* %1
br label %40
40: ; preds = %20, %38
%41 = phi i32 [ %39, %38 ], [ %21, %20 ]
%42 = phi i32 [ %35, %38 ], [ %22, %20 ]
%43 = sext i32 %41 to i64
%44 = icmp slt i64 %25, %43
br i1 %44, label %20, label %45
45: ; preds = %40, %0
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.9, i64 0, i64 0))
%47 = load i32, i32* %1
%48 = icmp sgt i32 %47, 0
br i1 %48, label %49, label %178
49: ; preds = %45
%50 = load i32, i32* %2
br label %51
51: ; preds = %49, %89
%52 = phi i32 [ %47, %49 ], [ %90, %89 ]
%53 = phi i32 [ %50, %49 ], [ %91, %89 ]
%54 = phi i64 [ 0, %49 ], [ %56, %89 ]
%55 = icmp sgt i32 %53, 0
%56 = add nuw nsw i64 %54, 1
br i1 %55, label %57, label %89
57: ; preds = %51
%58 = trunc i64 %56 to i32
br label %77
59: ; preds = %89
%60 = icmp sgt i32 %90, 0
br i1 %60, label %61, label %178
61: ; preds = %59
%62 = load i32, i32* %2
%63 = icmp sgt i32 %62, 0
%64 = zext i32 %90 to i64
%65 = zext i32 %62 to i64
%66 = and i64 %65, 4294967288
%67 = add nsw i64 %66, -8
%68 = lshr exact i64 %67, 3
%69 = add nuw nsw i64 %68, 1
%70 = icmp ult i32 %62, 8
%71 = and i64 %65, 4294967288
%72 = and i64 %69, 1
%73 = icmp eq i64 %67, 0
%74 = and i64 %69, 4611686018427387902
%75 = icmp eq i64 %72, 0
%76 = icmp eq i64 %71, %65
br label %94
77: ; preds = %57, %77
%78 = phi i64 [ 0, %57 ], [ %79, %77 ]
%79 = add nuw nsw i64 %78, 1
%80 = trunc i64 %79 to i32
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %58, i32 %80)
%82 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %4, i64 0, i64 %54, i64 %78
%83 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %82)
%84 = load i32, i32* %2
%85 = sext i32 %84 to i64
%86 = icmp slt i64 %79, %85
br i1 %86, label %77, label %87
87: ; preds = %77
%88 = load i32, i32* %1
br label %89
89: ; preds = %51, %87
%90 = phi i32 [ %88, %87 ], [ %52, %51 ]
%91 = phi i32 [ %84, %87 ], [ %53, %51 ]
%92 = sext i32 %90 to i64
%93 = icmp slt i64 %56, %92
br i1 %93, label %51, label %59
94: ; preds = %61, %175
%95 = phi i64 [ 0, %61 ], [ %176, %175 ]
br i1 %63, label %96, label %175
96: ; preds = %94
br i1 %70, label %163, label %97
97: ; preds = %96
br i1 %73, label %141, label %98
98: ; preds = %97, %98
%99 = phi i64 [ %138, %98 ], [ 0, %97 ]
%100 = phi i64 [ %139, %98 ], [ 0, %97 ]
%101 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %3, i64 0, i64 %95, i64 %99
%102 = bitcast i32* %101 to <4 x i32>*
%103 = load <4 x i32>, <4 x i32>* %102
%104 = getelementptr inbounds i32, i32* %101, i64 4
%105 = bitcast i32* %104 to <4 x i32>*
%106 = load <4 x i32>, <4 x i32>* %105
%107 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %4, i64 0, i64 %95, i64 %99
%108 = bitcast i32* %107 to <4 x i32>*
%109 = load <4 x i32>, <4 x i32>* %108
%110 = getelementptr inbounds i32, i32* %107, i64 4
%111 = bitcast i32* %110 to <4 x i32>*
%112 = load <4 x i32>, <4 x i32>* %111
%113 = add nsw <4 x i32> %109, %103
%114 = add nsw <4 x i32> %112, %106
%115 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %5, i64 0, i64 %95, i64 %99
%116 = bitcast i32* %115 to <4 x i32>*
store <4 x i32> %113, <4 x i32>* %116
%117 = getelementptr inbounds i32, i32* %115, i64 4
%118 = bitcast i32* %117 to <4 x i32>*
store <4 x i32> %114, <4 x i32>* %118
%119 = or i64 %99, 8
%120 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %3, i64 0, i64 %95, i64 %119
%121 = bitcast i32* %120 to <4 x i32>*
%122 = load <4 x i32>, <4 x i32>* %121
%123 = getelementptr inbounds i32, i32* %120, i64 4
%124 = bitcast i32* %123 to <4 x i32>*
%125 = load <4 x i32>, <4 x i32>* %124
%126 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %4, i64 0, i64 %95, i64 %119
%127 = bitcast i32* %126 to <4 x i32>*
%128 = load <4 x i32>, <4 x i32>* %127
%129 = getelementptr inbounds i32, i32* %126, i64 4
%130 = bitcast i32* %129 to <4 x i32>*
%131 = load <4 x i32>, <4 x i32>* %130
%132 = add nsw <4 x i32> %128, %122
%133 = add nsw <4 x i32> %131, %125
%134 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %5, i64 0, i64 %95, i64 %119
%135 = bitcast i32* %134 to <4 x i32>*
store <4 x i32> %132, <4 x i32>* %135
%136 = getelementptr inbounds i32, i32* %134, i64 4
%137 = bitcast i32* %136 to <4 x i32>*
store <4 x i32> %133, <4 x i32>* %137
%138 = add nuw i64 %99, 16
%139 = add i64 %100, 2
%140 = icmp eq i64 %139, %74
br i1 %140, label %141, label %98
141: ; preds = %98, %97
%142 = phi i64 [ 0, %97 ], [ %138, %98 ]
br i1 %75, label %162, label %143
143: ; preds = %141
%144 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %3, i64 0, i64 %95, i64 %142
%145 = bitcast i32* %144 to <4 x i32>*
%146 = load <4 x i32>, <4 x i32>* %145
%147 = getelementptr inbounds i32, i32* %144, i64 4
%148 = bitcast i32* %147 to <4 x i32>*
%149 = load <4 x i32>, <4 x i32>* %148
%150 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %4, i64 0, i64 %95, i64 %142
%151 = bitcast i32* %150 to <4 x i32>*
%152 = load <4 x i32>, <4 x i32>* %151
%153 = getelementptr inbounds i32, i32* %150, i64 4
%154 = bitcast i32* %153 to <4 x i32>*
%155 = load <4 x i32>, <4 x i32>* %154
%156 = add nsw <4 x i32> %152, %146
%157 = add nsw <4 x i32> %155, %149
%158 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %5, i64 0, i64 %95, i64 %142
%159 = bitcast i32* %158 to <4 x i32>*
store <4 x i32> %156, <4 x i32>* %159
%160 = getelementptr inbounds i32, i32* %158, i64 4
%161 = bitcast i32* %160 to <4 x i32>*
store <4 x i32> %157, <4 x i32>* %161
br label %162
162: ; preds = %141, %143
br i1 %76, label %175, label %163
163: ; preds = %96, %162
%164 = phi i64 [ 0, %96 ], [ %71, %162 ]
br label %165
165: ; preds = %163, %165
%166 = phi i64 [ %173, %165 ], [ %164, %163 ]
%167 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %3, i64 0, i64 %95, i64 %166
%168 = load i32, i32* %167
%169 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %4, i64 0, i64 %95, i64 %166
%170 = load i32, i32* %169
%171 = add nsw i32 %170, %168
%172 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %5, i64 0, i64 %95, i64 %166
store i32 %171, i32* %172
%173 = add nuw nsw i64 %166, 1
%174 = icmp eq i64 %173, %65
br i1 %174, label %175, label %165
175: ; preds = %165, %162, %94
%176 = add nuw nsw i64 %95, 1
%177 = icmp eq i64 %176, %64
br i1 %177, label %178, label %94
178: ; preds = %175, %45, %59
%179 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.10, i64 0, i64 0))
%180 = load i32, i32* %1
%181 = icmp sgt i32 %180, 0
br i1 %181, label %182, label %214
182: ; preds = %178
%183 = load i32, i32* %2
br label %184
184: ; preds = %182, %208
%185 = phi i32 [ %180, %182 ], [ %209, %208 ]
%186 = phi i32 [ %183, %182 ], [ %210, %208 ]
%187 = phi i64 [ 0, %182 ], [ %211, %208 ]
%188 = icmp sgt i32 %186, 0
br i1 %188, label %189, label %208
189: ; preds = %184, %201
%190 = phi i64 [ %203, %201 ], [ 0, %184 ]
%191 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %5, i64 0, i64 %187, i64 %190
%192 = load i32, i32* %191
%193 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %192)
%194 = load i32, i32* %2
%195 = add nsw i32 %194, -1
%196 = zext i32 %195 to i64
%197 = icmp eq i64 %190, %196
br i1 %197, label %198, label %201
198: ; preds = %189
%199 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.11, i64 0, i64 0))
%200 = load i32, i32* %2
br label %201
201: ; preds = %189, %198
%202 = phi i32 [ %194, %189 ], [ %200, %198 ]
%203 = add nuw nsw i64 %190, 1
%204 = sext i32 %202 to i64
%205 = icmp slt i64 %203, %204
br i1 %205, label %189, label %206
206: ; preds = %201
%207 = load i32, i32* %1
br label %208
208: ; preds = %206, %184
%209 = phi i32 [ %207, %206 ], [ %185, %184 ]
%210 = phi i32 [ %202, %206 ], [ %186, %184 ]
%211 = add nuw nsw i64 %187, 1
%212 = sext i32 %209 to i64
%213 = icmp slt i64 %211, %212
br i1 %213, label %184, label %214
214: ; preds = %208, %178
ret i32 0
}