#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 /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main(void) {
  int iM, iN, iP, iQ, i, j, k, iaMat1[10][10], iaMat2[10][10];
  int iaProd[10][10] = {0};
  printf("\n*********************************************************");
  printf("\n*\tPROGRAM TO IMPLEMENT MATRIX MULIPLICATION\t*\n");
  printf("*********************************************************");
  printf("\nEnter the order of Matrix1\n");
  scanf("%d%d", &iM, &iN);
  printf("\nEnter the order of Matrix2\n");
  scanf("%d%d", &iP, &iQ);
  if (iN != iP) {
    printf("\nMatrix Multiplication not possible\n");
    exit(0);
  }
  printf("\nEnter the elements of Matrix 1 in row major order\n");
  for (i = 0; i < iM; i++)
    for (j = 0; j < iN; j++)
      scanf("%d", &iaMat1[i][j]);
  printf("\nEnter the elements of Matrix 2 in column major order\n");
  for (i = 0; i < iQ; i++)
    for (j = 0; j < iP; j++)
      scanf("%d", &iaMat2[j][i]);
  for (i = 0; i < iM; i++) {
    for (j = 0; j < iQ; j++) {
      for (k = 0; k < iN; k++) {
        iaProd[i][j] += iaMat1[i][k] * iaMat2[k][j];
      }
    }
  }
  printf("\nMatrix 1\n");
  for (i = 0; i < iM; i++) {
    for (j = 0; j < iN; j++) {
      printf("%d\t", iaMat1[i][j]);
    }
    printf("\n");
  }
  printf("\n");
  printf("\nMatrix 2\n");
  for (i = 0; i < iP; i++) {
    for (j = 0; j < iQ; j++) {
      printf("%d\t", iaMat2[i][j]);
    }
    printf("\n");
  }
  printf("\n");
  printf("\nThe Product matrix is is \n");
  for (i = 0; i < iM; i++) {
    for (j = 0; j < iQ; j++) {
      printf("%d\t", iaProd[i][j]);
    }
    printf("\n");
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4d0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x4d0(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1040 <memset@plt>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     11f8 <main+0xb8>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1278 <main+0x138>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1265 <main+0x125>
movslq -0x18(%rbp),%rax
lea    -0x1b0(%rbp),%rsi
imul   $0x28,%rax,%rax
add    %rax,%rsi
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1220 <main+0xe0>
jmp    126a <main+0x12a>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    120d <main+0xcd>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12f8 <main+0x1b8>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    12e5 <main+0x1a5>
movslq -0x1c(%rbp),%rax
lea    -0x340(%rbp),%rsi
imul   $0x28,%rax,%rax
add    %rax,%rsi
movslq -0x18(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xdba(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12a0 <main+0x160>
jmp    12ea <main+0x1aa>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    128d <main+0x14d>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13b4 <main+0x274>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13a1 <main+0x261>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    138e <main+0x24e>
movslq -0x18(%rbp),%rcx
lea    -0x1b0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
movslq -0x20(%rbp),%rcx
lea    -0x340(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
imul   (%rax,%rcx,4),%edx
movslq -0x18(%rbp),%rcx
lea    -0x4d0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
add    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1325 <main+0x1e5>
jmp    1393 <main+0x253>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1312 <main+0x1d2>
jmp    13a6 <main+0x266>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12ff <main+0x1bf>
lea    0xd7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1439 <main+0x2f9>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    141d <main+0x2dd>
movslq -0x18(%rbp),%rcx
lea    -0x1b0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    13dc <main+0x29c>
lea    0xd4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    13c9 <main+0x289>
lea    0xd2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcfb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    14cc <main+0x38c>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    14b0 <main+0x370>
movslq -0x18(%rbp),%rcx
lea    -0x340(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xcaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    146f <main+0x32f>
lea    0xcb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    145c <main+0x31c>
lea    0xc9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    155f <main+0x41f>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1543 <main+0x403>
movslq -0x18(%rbp),%rcx
lea    -0x4d0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xc17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1502 <main+0x3c2>
lea    0xc24(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    14ef <main+0x3af>
lea    0xc08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x4d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4d8,%rsp
lea    0x340(%rsp),%r14
mov    $0x190,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
lea    0xe71(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xea7(%rip),%rdi
call   1040 <puts@plt>
lea    0xe58(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xebc(%rip),%rdi
call   1040 <puts@plt>
lea    0xe78(%rip),%rbx
lea    0x4(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <scanf@plt>
lea    0xeb1(%rip),%rdi
call   1040 <puts@plt>
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    0x10(%rsp),%eax
jne    165c <main+0x4fc>
lea    0xe9f(%rip),%rdi
call   1040 <puts@plt>
mov    0x4(%rsp),%ecx
test   %ecx,%ecx
jle    1275 <main+0x115>
lea    0x20(%rsp),%r12
mov    0xc(%rsp),%eax
lea    0xe14(%rip),%r15
xor    %r13d,%r13d
jmp    1240 <main+0xe0>
xchg   %ax,%ax
add    $0x1,%r13
movslq %ecx,%rdx
add    $0x28,%r12
cmp    %rdx,%r13
jge    1275 <main+0x115>
test   %eax,%eax
jle    1230 <main+0xd0>
mov    %r12,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
add    $0x1,%rbp
movslq 0xc(%rsp),%rax
add    $0x4,%rbx
cmp    %rax,%rbp
jl     1250 <main+0xf0>
mov    0x4(%rsp),%ecx
jmp    1230 <main+0xd0>
lea    0xe62(%rip),%rdi
call   1040 <puts@plt>
mov    0x8(%rsp),%esi
test   %esi,%esi
jle    12f5 <main+0x195>
lea    0x1b0(%rsp),%r12
mov    0x10(%rsp),%eax
lea    0xda1(%rip),%r15
xor    %r13d,%r13d
jmp    12c0 <main+0x160>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r13
movslq %esi,%rcx
add    $0x4,%r12
cmp    %rcx,%r13
jge    12f5 <main+0x195>
test   %eax,%eax
jle    12b0 <main+0x150>
mov    %r12,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
add    $0x1,%rbp
movslq 0x10(%rsp),%rax
add    $0x28,%rbx
cmp    %rax,%rbp
jl     12d0 <main+0x170>
mov    0x8(%rsp),%esi
jmp    12b0 <main+0x150>
mov    0x4(%rsp),%eax
mov    %rax,0x18(%rsp)
test   %eax,%eax
jle    14cb <main+0x36b>
mov    0xc(%rsp),%edx
mov    %esi,%r15d
mov    %edx,%r10d
and    $0xfffffff8,%r10d
lea    0x30(%rsp),%rbx
lea    0x0(,%rdx,4),%rcx
and    $0xffffffffffffffe0,%rcx
lea    0x20(%rsp),%rax
xor    %r12d,%r12d
mov    %esi,0x14(%rsp)
jmp    135b <main+0x1fb>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r12
add    $0x28,%rbx
add    $0x28,%rax
cmp    0x18(%rsp),%r12
mov    0x14(%rsp),%esi
je     14cb <main+0x36b>
test   %esi,%esi
jle    1340 <main+0x1e0>
lea    0x1b0(%rsp),%r11
xor    %r9d,%r9d
jmp    138a <main+0x22a>
nopl   0x0(%rax)
lea    0x0(,%r9,4),%rdi
add    %r13,%rdi
mov    %esi,(%rdi)
add    $0x1,%r9
add    $0x4,%r11
cmp    %r15,%r9
je     1340 <main+0x1e0>
test   %edx,%edx
jle    137d <main+0x21d>
lea    (%r12,%r12,4),%rsi
lea    (%rsp,%rsi,8),%r13
add    $0x340,%r13
mov    0x0(%r13,%r9,4),%esi
cmp    $0x8,%edx
jae    13b0 <main+0x250>
xor    %ebp,%ebp
jmp    1498 <main+0x338>
xchg   %ax,%ax
movd   %esi,%xmm1
pxor   %xmm0,%xmm0
xor    %ebp,%ebp
mov    %r11,%rsi
nopl   (%rax)
movdqu -0x10(%rbx,%rbp,1),%xmm3
movdqu (%rbx,%rbp,1),%xmm2
movd   0x78(%rsi),%xmm4
movd   0x50(%rsi),%xmm5
punpckldq %xmm4,%xmm5
movd   0x28(%rsi),%xmm4
movd   (%rsi),%xmm6
punpckldq %xmm4,%xmm6
punpcklqdq %xmm5,%xmm6
movd   0x118(%rsi),%xmm4
movd   0xf0(%rsi),%xmm5
punpckldq %xmm4,%xmm5
movd   0xc8(%rsi),%xmm4
movd   0xa0(%rsi),%xmm7
punpckldq %xmm4,%xmm7
punpcklqdq %xmm5,%xmm7
pshufd $0xf5,%xmm6,%xmm4
pmuludq %xmm3,%xmm6
pshufd $0xe8,%xmm6,%xmm5
pshufd $0xf5,%xmm3,%xmm3
pmuludq %xmm4,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm3,%xmm5
paddd  %xmm5,%xmm1
pshufd $0xf5,%xmm7,%xmm3
pmuludq %xmm2,%xmm7
pshufd $0xe8,%xmm7,%xmm4
pshufd $0xf5,%xmm2,%xmm2
pmuludq %xmm3,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm4
paddd  %xmm4,%xmm0
add    $0x140,%rsi
add    $0x20,%rbp
cmp    %rbp,%rcx
jne    13c0 <main+0x260>
paddd  %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%esi
mov    %r10,%rbp
cmp    %rdx,%r10
je     1370 <main+0x210>
lea    0x0(,%rbp,4),%rdi
add    %rbp,%rdi
lea    (%r11,%rdi,8),%r8
nopw   0x0(%rax,%rax,1)
mov    (%r8),%edi
imul   (%rax,%rbp,4),%edi
add    %edi,%esi
add    $0x1,%rbp
add    $0x28,%r8
cmp    %rbp,%rdx
jne    14b0 <main+0x350>
jmp    1370 <main+0x210>
lea    0xc42(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0x4(%rsp)
jle    153e <main+0x3de>
lea    0x20(%rsp),%rbp
lea    0xb56(%rip),%r12
xor    %r15d,%r15d
jmp    150c <main+0x3ac>
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
movslq 0x4(%rsp),%rax
add    $0x28,%rbp
cmp    %rax,%r15
jge    153e <main+0x3de>
cmpl   $0x0,0xc(%rsp)
jle    14f0 <main+0x390>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x0(%rbp,%rbx,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
cmp    %rax,%rbx
jl     1520 <main+0x3c0>
jmp    14f0 <main+0x390>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xbcf(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0x10(%rsp)
jle    15be <main+0x45e>
lea    0x1b0(%rsp),%rbp
lea    0xad6(%rip),%r12
xor    %r15d,%r15d
jmp    158c <main+0x42c>
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
movslq 0x10(%rsp),%rax
add    $0x28,%rbp
cmp    %rax,%r15
jge    15be <main+0x45e>
cmpl   $0x0,0x8(%rsp)
jle    1570 <main+0x410>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x0(%rbp,%rbx,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
movslq 0x8(%rsp),%rax
cmp    %rax,%rbx
jl     15a0 <main+0x440>
jmp    1570 <main+0x410>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xb59(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0x4(%rsp)
jle    163e <main+0x4de>
lea    0xa5e(%rip),%rbx
xor    %r15d,%r15d
jmp    160c <main+0x4ac>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
movslq 0x4(%rsp),%rax
add    $0x28,%r14
cmp    %rax,%r15
jge    163e <main+0x4de>
cmpl   $0x0,0x8(%rsp)
jle    15f0 <main+0x490>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbp,4),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
movslq 0x8(%rsp),%rax
cmp    %rax,%rbp
jl     1620 <main+0x4c0>
jmp    15f0 <main+0x490>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x4d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xae0(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <exit@plt>

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

LLVM IR (-O2):
@.str = [59 x i8] c"\0A*********************************************************\00"
@.str.2 = [58 x i8] c"*********************************************************\00"
@.str.4 = [5 x i8] c"%d%d\00"
@.str.8 = [3 x i8] c"%d\00"
@.str.11 = [4 x i8] c"%d\09\00"
@str = [47 x i8] c"\0A*\09PROGRAM TO IMPLEMENT MATRIX MULIPLICATION\09*\00"
@str.15 = [28 x i8] c"\0AEnter the order of Matrix1\00"
@str.16 = [28 x i8] c"\0AEnter the order of Matrix2\00"
@str.17 = [51 x i8] c"\0AEnter the elements of Matrix 1 in row major order\00"
@str.18 = [54 x i8] c"\0AEnter the elements of Matrix 2 in column major order\00"
@str.19 = [10 x i8] c"\0AMatrix 1\00"
@str.20 = [10 x i8] c"\0AMatrix 2\00"
@str.21 = [27 x i8] c"\0AThe Product matrix is is \00"
@str.22 = [36 x i8] c"\0AMatrix Multiplication not possible\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [10 x [10 x i32]]
%6 = alloca [10 x [10 x i32]]
%7 = alloca [10 x [10 x i32]]
%8 = bitcast i32* %1 to i8*
%9 = bitcast i32* %2 to i8*
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = bitcast [10 x [10 x i32]]* %5 to i8*
%13 = bitcast [10 x [10 x i32]]* %6 to i8*
%14 = bitcast [10 x [10 x i32]]* %7 to i8*
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.2, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.15, i64 0, i64 0))
%19 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32* %1, i32* %2)
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.16, i64 0, i64 0))
%21 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32* %3, i32* %4)
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = icmp eq i32 %22, %23
br i1 %24, label %28, label %25
25: ; preds = %0
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.22, i64 0, i64 0))
%27 = call i32 @exit(i32 0)
unreachable
28: ; preds = %0
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.17, i64 0, i64 0))
%30 = load i32, i32* %1
%31 = icmp sgt i32 %30, 0
br i1 %31, label %32, label %55
32: ; preds = %28
%33 = load i32, i32* %2
br label %34
34: ; preds = %32, %49
%35 = phi i32 [ %30, %32 ], [ %50, %49 ]
%36 = phi i32 [ %33, %32 ], [ %51, %49 ]
%37 = phi i64 [ 0, %32 ], [ %52, %49 ]
%38 = icmp sgt i32 %36, 0
br i1 %38, label %39, label %49
39: ; preds = %34, %39
%40 = phi i64 [ %43, %39 ], [ 0, %34 ]
%41 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %5, i64 0, i64 %37, i64 %40
%42 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, 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 %47
47: ; preds = %39
%48 = load i32, i32* %1
br label %49
49: ; preds = %47, %34
%50 = phi i32 [ %48, %47 ], [ %35, %34 ]
%51 = phi i32 [ %44, %47 ], [ %36, %34 ]
%52 = add nuw nsw i64 %37, 1
%53 = sext i32 %50 to i64
%54 = icmp slt i64 %52, %53
br i1 %54, label %34, label %55
55: ; preds = %49, %28
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.18, i64 0, i64 0))
%57 = load i32, i32* %4
%58 = icmp sgt i32 %57, 0
br i1 %58, label %59, label %66
59: ; preds = %55
%60 = load i32, i32* %3
br label %61
61: ; preds = %59, %90
%62 = phi i32 [ %57, %59 ], [ %91, %90 ]
%63 = phi i32 [ %60, %59 ], [ %92, %90 ]
%64 = phi i64 [ 0, %59 ], [ %93, %90 ]
%65 = icmp sgt i32 %63, 0
br i1 %65, label %80, label %90
66: ; preds = %90, %55
%67 = phi i32 [ %57, %55 ], [ %91, %90 ]
%68 = load i32, i32* %1
%69 = icmp sgt i32 %68, 0
br i1 %69, label %70, label %177
70: ; preds = %66
%71 = icmp sgt i32 %67, 0
%72 = load i32, i32* %2
%73 = icmp sgt i32 %72, 0
%74 = zext i32 %68 to i64
%75 = zext i32 %67 to i64
%76 = zext i32 %72 to i64
%77 = icmp ult i32 %72, 8
%78 = and i64 %76, 4294967288
%79 = icmp eq i64 %78, %76
br label %96
80: ; preds = %61, %80
%81 = phi i64 [ %84, %80 ], [ 0, %61 ]
%82 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %6, i64 0, i64 %81, i64 %64
%83 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %82)
%84 = add nuw nsw i64 %81, 1
%85 = load i32, i32* %3
%86 = sext i32 %85 to i64
%87 = icmp slt i64 %84, %86
br i1 %87, label %80, label %88
88: ; preds = %80
%89 = load i32, i32* %4
br label %90
90: ; preds = %88, %61
%91 = phi i32 [ %89, %88 ], [ %62, %61 ]
%92 = phi i32 [ %85, %88 ], [ %63, %61 ]
%93 = add nuw nsw i64 %64, 1
%94 = sext i32 %91 to i64
%95 = icmp slt i64 %93, %94
br i1 %95, label %61, label %66
96: ; preds = %70, %174
%97 = phi i64 [ 0, %70 ], [ %175, %174 ]
br i1 %71, label %98, label %174
98: ; preds = %96, %171
%99 = phi i64 [ %172, %171 ], [ 0, %96 ]
br i1 %73, label %100, label %171
100: ; preds = %98
%101 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %7, i64 0, i64 %97, i64 %99
%102 = load i32, i32* %101
br i1 %77, label %155, label %103
103: ; preds = %100
%104 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %102, i64 0
br label %105
105: ; preds = %105, %103
%106 = phi i64 [ 0, %103 ], [ %150, %105 ]
%107 = phi <4 x i32> [ %104, %103 ], [ %148, %105 ]
%108 = phi <4 x i32> [ zeroinitializer, %103 ], [ %149, %105 ]
%109 = or i64 %106, 1
%110 = or i64 %106, 2
%111 = or i64 %106, 3
%112 = or i64 %106, 4
%113 = or i64 %106, 5
%114 = or i64 %106, 6
%115 = or i64 %106, 7
%116 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %5, i64 0, i64 %97, i64 %106
%117 = bitcast i32* %116 to <4 x i32>*
%118 = load <4 x i32>, <4 x i32>* %117
%119 = getelementptr inbounds i32, i32* %116, i64 4
%120 = bitcast i32* %119 to <4 x i32>*
%121 = load <4 x i32>, <4 x i32>* %120
%122 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %6, i64 0, i64 %106, i64 %99
%123 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %6, i64 0, i64 %109, i64 %99
%124 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %6, i64 0, i64 %110, i64 %99
%125 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %6, i64 0, i64 %111, i64 %99
%126 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %6, i64 0, i64 %112, i64 %99
%127 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %6, i64 0, i64 %113, i64 %99
%128 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %6, i64 0, i64 %114, i64 %99
%129 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %6, i64 0, i64 %115, i64 %99
%130 = load i32, i32* %122
%131 = load i32, i32* %123
%132 = load i32, i32* %124
%133 = load i32, i32* %125
%134 = insertelement <4 x i32> poison, i32 %130, i64 0
%135 = insertelement <4 x i32> %134, i32 %131, i64 1
%136 = insertelement <4 x i32> %135, i32 %132, i64 2
%137 = insertelement <4 x i32> %136, i32 %133, i64 3
%138 = load i32, i32* %126
%139 = load i32, i32* %127
%140 = load i32, i32* %128
%141 = load i32, i32* %129
%142 = insertelement <4 x i32> poison, i32 %138, i64 0
%143 = insertelement <4 x i32> %142, i32 %139, i64 1
%144 = insertelement <4 x i32> %143, i32 %140, i64 2
%145 = insertelement <4 x i32> %144, i32 %141, i64 3
%146 = mul nsw <4 x i32> %137, %118
%147 = mul nsw <4 x i32> %145, %121
%148 = add <4 x i32> %107, %146
%149 = add <4 x i32> %108, %147
%150 = add nuw i64 %106, 8
%151 = icmp eq i64 %150, %78
br i1 %151, label %152, label %105
152: ; preds = %105
%153 = add <4 x i32> %149, %148
%154 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %153)
br i1 %79, label %169, label %155
155: ; preds = %100, %152
%156 = phi i64 [ 0, %100 ], [ %78, %152 ]
%157 = phi i32 [ %102, %100 ], [ %154, %152 ]
br label %158
158: ; preds = %155, %158
%159 = phi i64 [ %167, %158 ], [ %156, %155 ]
%160 = phi i32 [ %166, %158 ], [ %157, %155 ]
%161 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %5, i64 0, i64 %97, i64 %159
%162 = load i32, i32* %161
%163 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %6, i64 0, i64 %159, i64 %99
%164 = load i32, i32* %163
%165 = mul nsw i32 %164, %162
%166 = add nsw i32 %160, %165
%167 = add nuw nsw i64 %159, 1
%168 = icmp eq i64 %167, %76
br i1 %168, label %169, label %158
169: ; preds = %158, %152
%170 = phi i32 [ %154, %152 ], [ %166, %158 ]
store i32 %170, i32* %101
br label %171
171: ; preds = %169, %98
%172 = add nuw nsw i64 %99, 1
%173 = icmp eq i64 %172, %75
br i1 %173, label %174, label %98
174: ; preds = %171, %96
%175 = add nuw nsw i64 %97, 1
%176 = icmp eq i64 %175, %74
br i1 %176, label %177, label %96
177: ; preds = %174, %66
%178 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.19, i64 0, i64 0))
%179 = load i32, i32* %1
%180 = icmp sgt i32 %179, 0
br i1 %180, label %181, label %200
181: ; preds = %177, %194
%182 = phi i64 [ %196, %194 ], [ 0, %177 ]
%183 = load i32, i32* %2
%184 = icmp sgt i32 %183, 0
br i1 %184, label %185, label %194
185: ; preds = %181, %185
%186 = phi i64 [ %190, %185 ], [ 0, %181 ]
%187 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %5, i64 0, i64 %182, i64 %186
%188 = load i32, i32* %187
%189 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 %188)
%190 = add nuw nsw i64 %186, 1
%191 = load i32, i32* %2
%192 = sext i32 %191 to i64
%193 = icmp slt i64 %190, %192
br i1 %193, label %185, label %194
194: ; preds = %185, %181
%195 = call i32 @putchar(i32 10)
%196 = add nuw nsw i64 %182, 1
%197 = load i32, i32* %1
%198 = sext i32 %197 to i64
%199 = icmp slt i64 %196, %198
br i1 %199, label %181, label %200
200: ; preds = %194, %177
%201 = call i32 @putchar(i32 10)
%202 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.20, i64 0, i64 0))
%203 = load i32, i32* %3
%204 = icmp sgt i32 %203, 0
br i1 %204, label %205, label %224
205: ; preds = %200, %218
%206 = phi i64 [ %220, %218 ], [ 0, %200 ]
%207 = load i32, i32* %4
%208 = icmp sgt i32 %207, 0
br i1 %208, label %209, label %218
209: ; preds = %205, %209
%210 = phi i64 [ %214, %209 ], [ 0, %205 ]
%211 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %6, i64 0, i64 %206, i64 %210
%212 = load i32, i32* %211
%213 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 %212)
%214 = add nuw nsw i64 %210, 1
%215 = load i32, i32* %4
%216 = sext i32 %215 to i64
%217 = icmp slt i64 %214, %216
br i1 %217, label %209, label %218
218: ; preds = %209, %205
%219 = call i32 @putchar(i32 10)
%220 = add nuw nsw i64 %206, 1
%221 = load i32, i32* %3
%222 = sext i32 %221 to i64
%223 = icmp slt i64 %220, %222
br i1 %223, label %205, label %224
224: ; preds = %218, %200
%225 = call i32 @putchar(i32 10)
%226 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.21, i64 0, i64 0))
%227 = load i32, i32* %1
%228 = icmp sgt i32 %227, 0
br i1 %228, label %229, label %248
229: ; preds = %224, %242
%230 = phi i64 [ %244, %242 ], [ 0, %224 ]
%231 = load i32, i32* %4
%232 = icmp sgt i32 %231, 0
br i1 %232, label %233, label %242
233: ; preds = %229, %233
%234 = phi i64 [ %238, %233 ], [ 0, %229 ]
%235 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %7, i64 0, i64 %230, i64 %234
%236 = load i32, i32* %235
%237 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 %236)
%238 = add nuw nsw i64 %234, 1
%239 = load i32, i32* %4
%240 = sext i32 %239 to i64
%241 = icmp slt i64 %238, %240
br i1 %241, label %233, label %242
242: ; preds = %233, %229
%243 = call i32 @putchar(i32 10)
%244 = add nuw nsw i64 %230, 1
%245 = load i32, i32* %1
%246 = sext i32 %245 to i64
%247 = icmp slt i64 %244, %246
br i1 %247, label %229, label %248
248: ; preds = %242, %224
%249 = call i32 @putchar(i32 10)
ret i32 0
}