#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(void) {
  static int array1[4][4];
  int i, j, m, n, a, b, c, p, q, r;
  printf("Please enter the first two numbers, seperated by a space, specified "
         "in the pdf: ");
  scanf("%d %d", &m, &n);
  for (i = 0; i < m; ++i) {
    for (j = 0; j < n; ++j) {
      printf("Please enter one number from the input: ");
      scanf("%d,", &array1[i][j]);
    }
  }
  printf("\nBefore:\n");
  for (i = 0; i < m; i++) {
    for (j = 0; j < n; j++) {
      printf("%d ", array1[i][j]);
    }
    printf("\n");
  }
  printf("Please enter two numbers, seperated by a space, specified in the "
         "pdf, these ");
  printf("should be the numbers immediately after where you left of before: ");
  scanf("%d %d", &a, &b);
  printf("\nAfter:\n");
  for (i = 0; i < m; ++i) {
    c = array1[a - 1][i];
    array1[a - 1][i] = array1[b - 1][i];
    array1[b - 1][i] = c;
  }
  for (i = 0; i < m; i++) {
    for (j = 0; j < n; j++) {
      printf("%d ", array1[i][j]);
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0d(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11d3 <main+0xb3>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11c0 <main+0xa0>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x8(%rbp),%rax
lea    0x2eae(%rip),%rsi
shl    $0x4,%rax
add    %rax,%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116d <main+0x4d>
jmp    11c5 <main+0xa5>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115a <main+0x3a>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1258 <main+0x138>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    123c <main+0x11c>
movslq -0x8(%rbp),%rcx
lea    0x2e2e(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11fb <main+0xdb>
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11e8 <main+0xc8>
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdd6(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1337 <main+0x217>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2d85(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2d64(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2d46(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%edx
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2d25(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    129f <main+0x17f>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    13ae <main+0x28e>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1392 <main+0x272>
movslq -0x8(%rbp),%rcx
lea    0x2cd8(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1351 <main+0x231>
lea    0xcf3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    133e <main+0x21e>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeee(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0xc(%rsp),%ecx
test   %ecx,%ecx
jle    11ef <main+0xaf>
lea    0x2ecd(%rip),%r12
mov    0x8(%rsp),%eax
lea    0xec9(%rip),%r14
lea    0xeeb(%rip),%r15
xor    %r13d,%r13d
jmp    11b0 <main+0x70>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r13
movslq %ecx,%rdx
add    $0x10,%r12
cmp    %rdx,%r13
jge    11ef <main+0xaf>
test   %eax,%eax
jle    11a0 <main+0x60>
mov    %r12,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
add    $0x1,%rbp
movslq 0x8(%rsp),%rax
add    $0x4,%rbx
cmp    %rax,%rbp
jl     11c0 <main+0x80>
mov    0xc(%rsp),%ecx
jmp    11a0 <main+0x60>
lea    0xf22(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0xc(%rsp)
jle    126d <main+0x12d>
lea    0x2e47(%rip),%rbx
lea    0xe74(%rip),%r14
xor    %r15d,%r15d
jmp    123c <main+0xfc>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
movslq 0xc(%rsp),%rax
add    $0x10,%rbx
cmp    %rax,%r15
jge    126d <main+0x12d>
cmpl   $0x0,0x8(%rsp)
jle    1220 <main+0xe0>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rbx,%rbp,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
movslq 0x8(%rsp),%rax
cmp    %rax,%rbp
jl     1250 <main+0x110>
jmp    1220 <main+0xe0>
lea    0xe14(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe53(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdc1(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe79(%rip),%rdi
call   1040 <puts@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    14cd <main+0x38d>
movslq 0x14(%rsp),%r11
add    $0xffffffffffffffff,%r11
movslq 0x10(%rsp),%r14
add    $0xffffffffffffffff,%r14
cmp    $0x8,%eax
jb     1307 <main+0x1c7>
mov    %r11,%rcx
shl    $0x4,%rcx
lea    0x2d72(%rip),%rdx
lea    (%rdx,%rcx,1),%r8
mov    %r14,%rbx
shl    $0x4,%rbx
lea    (%rdx,%rbx,1),%r9
lea    (%r9,%rax,4),%rsi
cmp    %rsi,%r8
jae    139a <main+0x25a>
lea    (%r8,%rax,4),%rsi
cmp    %rsi,%r9
jae    139a <main+0x25a>
xor    %esi,%esi
mov    %rsi,%rcx
not    %rcx
test   $0x1,%al
je     133e <main+0x1fe>
mov    %r11,%rdx
shl    $0x4,%rdx
lea    0x2d2f(%rip),%rdi
add    %rdi,%rdx
mov    (%rdx,%rsi,4),%ebp
mov    %r14,%rbx
shl    $0x4,%rbx
add    %rdi,%rbx
mov    (%rbx,%rsi,4),%edi
mov    %edi,(%rdx,%rsi,4)
mov    %ebp,(%rbx,%rsi,4)
or     $0x1,%rsi
add    %rax,%rcx
je     1461 <main+0x321>
shl    $0x4,%r11
lea    0x2cfe(%rip),%rdx
lea    (%r11,%rdx,1),%rcx
add    $0x4,%rcx
shl    $0x4,%r14
add    %r14,%rdx
add    $0x4,%rdx
cs nopw 0x0(%rax,%rax,1)
nop
mov    -0x4(%rcx,%rsi,4),%edi
mov    -0x4(%rdx,%rsi,4),%ebp
mov    %ebp,-0x4(%rcx,%rsi,4)
mov    %edi,-0x4(%rdx,%rsi,4)
mov    (%rcx,%rsi,4),%edi
mov    (%rdx,%rsi,4),%ebp
mov    %ebp,(%rcx,%rsi,4)
mov    %edi,(%rdx,%rsi,4)
add    $0x2,%rsi
cmp    %rsi,%rax
jne    1370 <main+0x230>
jmp    1461 <main+0x321>
mov    %eax,%esi
and    $0xfffffff8,%esi
lea    -0x8(%rsi),%rdi
mov    %rdi,%r10
shr    $0x3,%r10
add    $0x1,%r10
test   %rdi,%rdi
je     14de <main+0x39e>
mov    %r10,%rdi
and    $0xfffffffffffffffe,%rdi
add    %rdx,%rcx
add    $0x30,%rcx
add    %rbx,%rdx
add    $0x30,%rdx
xor    %ebx,%ebx
xchg   %ax,%ax
movaps -0x30(%rcx,%rbx,4),%xmm0
movaps -0x20(%rcx,%rbx,4),%xmm1
movaps -0x30(%rdx,%rbx,4),%xmm2
movaps -0x20(%rdx,%rbx,4),%xmm3
movaps %xmm2,-0x30(%rcx,%rbx,4)
movaps %xmm3,-0x20(%rcx,%rbx,4)
movaps %xmm0,-0x30(%rdx,%rbx,4)
movaps %xmm1,-0x20(%rdx,%rbx,4)
movaps -0x10(%rcx,%rbx,4),%xmm0
movaps (%rcx,%rbx,4),%xmm1
movaps -0x10(%rdx,%rbx,4),%xmm2
movaps (%rdx,%rbx,4),%xmm3
movaps %xmm2,-0x10(%rcx,%rbx,4)
movaps %xmm3,(%rcx,%rbx,4)
movaps %xmm0,-0x10(%rdx,%rbx,4)
movaps %xmm1,(%rdx,%rbx,4)
add    $0x10,%rbx
add    $0xfffffffffffffffe,%rdi
jne    13d0 <main+0x290>
test   $0x1,%r10b
je     1458 <main+0x318>
movaps (%r8,%rbx,4),%xmm0
movaps 0x10(%r8,%rbx,4),%xmm1
movaps (%r9,%rbx,4),%xmm2
movaps 0x10(%r9,%rbx,4),%xmm3
movaps %xmm2,(%r8,%rbx,4)
movaps %xmm3,0x10(%r8,%rbx,4)
movaps %xmm0,(%r9,%rbx,4)
movaps %xmm1,0x10(%r9,%rbx,4)
cmp    %rax,%rsi
jne    1309 <main+0x1c9>
test   %eax,%eax
jle    14cd <main+0x38d>
lea    0x2be4(%rip),%rbx
lea    0xc11(%rip),%r14
xor    %r15d,%r15d
jmp    149c <main+0x35c>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
movslq 0xc(%rsp),%rax
add    $0x10,%rbx
cmp    %rax,%r15
jge    14cd <main+0x38d>
cmpl   $0x0,0x8(%rsp)
jle    1480 <main+0x340>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rbx,%rbp,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
movslq 0x8(%rsp),%rax
cmp    %rax,%rbp
jl     14b0 <main+0x370>
jmp    1480 <main+0x340>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebx,%ebx
test   $0x1,%r10b
jne    142c <main+0x2ec>
jmp    1458 <main+0x318>

LLVM IR (-O0):
@main.array1 = internal global [4 x [4 x i32]] zeroinitializer
@.str = [81 x i8] c"Please enter the first two numbers, seperated by a space, specified in the pdf: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [41 x i8] c"Please enter one number from the input: \00"
@.str.3 = [4 x i8] c"%d,\00"
@.str.4 = [10 x i8] c"\0ABefore:\0A\00"
@.str.5 = [4 x i8] c"%d \00"
@.str.6 = [2 x i8] c"\0A\00"
@.str.7 = [77 x i8] c"Please enter two numbers, seperated by a space, specified in the pdf, these \00"
@.str.8 = [67 x i8] c"should be the numbers immediately after where you left of before: \00"
@.str.9 = [9 x i8] c"\0AAfter:\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 i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %4, i32* %5)
store i32 0, i32* %2
br label %14
14: ; preds = %36, %0
%15 = load i32, i32* %2
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %39
18: ; preds = %14
store i32 0, i32* %3
br label %19
19: ; preds = %32, %18
%20 = load i32, i32* %3
%21 = load i32, i32* %5
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %35
23: ; preds = %19
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%25 = load i32, i32* %2
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* @main.array1, i64 0, i64 %26
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [4 x i32], [4 x i32]* %27, i64 0, i64 %29
%31 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %30)
br label %32
32: ; preds = %23
%33 = load i32, i32* %3
%34 = add nsw i32 %33, 1
store i32 %34, i32* %3
br label %19
35: ; preds = %19
br label %36
36: ; preds = %35
%37 = load i32, i32* %2
%38 = add nsw i32 %37, 1
store i32 %38, i32* %2
br label %14
39: ; preds = %14
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %2
br label %41
41: ; preds = %64, %39
%42 = load i32, i32* %2
%43 = load i32, i32* %4
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %67
45: ; preds = %41
store i32 0, i32* %3
br label %46
46: ; preds = %59, %45
%47 = load i32, i32* %3
%48 = load i32, i32* %5
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %62
50: ; preds = %46
%51 = load i32, i32* %2
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* @main.array1, i64 0, i64 %52
%54 = load i32, i32* %3
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [4 x i32], [4 x i32]* %53, i64 0, i64 %55
%57 = load i32, i32* %56
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %57)
br label %59
59: ; preds = %50
%60 = load i32, i32* %3
%61 = add nsw i32 %60, 1
store i32 %61, i32* %3
br label %46
62: ; preds = %46
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %64
64: ; preds = %62
%65 = load i32, i32* %2
%66 = add nsw i32 %65, 1
store i32 %66, i32* %2
br label %41
67: ; preds = %41
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.7, i64 0, i64 0))
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.8, i64 0, i64 0))
%70 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %6, i32* %7)
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %2
br label %72
72: ; preds = %108, %67
%73 = load i32, i32* %2
%74 = load i32, i32* %4
%75 = icmp slt i32 %73, %74
br i1 %75, label %76, label %111
76: ; preds = %72
%77 = load i32, i32* %6
%78 = sub nsw i32 %77, 1
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* @main.array1, i64 0, i64 %79
%81 = load i32, i32* %2
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [4 x i32], [4 x i32]* %80, i64 0, i64 %82
%84 = load i32, i32* %83
store i32 %84, i32* %8
%85 = load i32, i32* %7
%86 = sub nsw i32 %85, 1
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* @main.array1, i64 0, i64 %87
%89 = load i32, i32* %2
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [4 x i32], [4 x i32]* %88, i64 0, i64 %90
%92 = load i32, i32* %91
%93 = load i32, i32* %6
%94 = sub nsw i32 %93, 1
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* @main.array1, i64 0, i64 %95
%97 = load i32, i32* %2
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [4 x i32], [4 x i32]* %96, i64 0, i64 %98
store i32 %92, i32* %99
%100 = load i32, i32* %8
%101 = load i32, i32* %7
%102 = sub nsw i32 %101, 1
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* @main.array1, i64 0, i64 %103
%105 = load i32, i32* %2
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [4 x i32], [4 x i32]* %104, i64 0, i64 %106
store i32 %100, i32* %107
br label %108
108: ; preds = %76
%109 = load i32, i32* %2
%110 = add nsw i32 %109, 1
store i32 %110, i32* %2
br label %72
111: ; preds = %72
store i32 0, i32* %2
br label %112
112: ; preds = %135, %111
%113 = load i32, i32* %2
%114 = load i32, i32* %4
%115 = icmp slt i32 %113, %114
br i1 %115, label %116, label %138
116: ; preds = %112
store i32 0, i32* %3
br label %117
117: ; preds = %130, %116
%118 = load i32, i32* %3
%119 = load i32, i32* %5
%120 = icmp slt i32 %118, %119
br i1 %120, label %121, label %133
121: ; preds = %117
%122 = load i32, i32* %2
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* @main.array1, i64 0, i64 %123
%125 = load i32, i32* %3
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [4 x i32], [4 x i32]* %124, i64 0, i64 %126
%128 = load i32, i32* %127
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %128)
br label %130
130: ; preds = %121
%131 = load i32, i32* %3
%132 = add nsw i32 %131, 1
store i32 %132, i32* %3
br label %117
133: ; preds = %117
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %135
135: ; preds = %133
%136 = load i32, i32* %2
%137 = add nsw i32 %136, 1
store i32 %137, i32* %2
br label %112
138: ; preds = %112
ret i32 0
}

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