#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 atoi(char const *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int **maker(int, int);
int /*<<< orphan*/ printDelete(int **, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ writer(int **, int, int, char *);
int main(int argc, char const *argv[]) {
  if (argc != 3) {
    printf("Usage requires two commandline parameters:\n1. no of rows\n2. no "
           "of columns\n");
    exit(0);
  }
  int m, n;
  m = atoi(argv[1]);
  n = atoi(argv[2]);
  int **matrix = maker(m, n);
  writer(matrix, m, n, "matrix.txt");
  printDelete(matrix, m, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     1193 <main+0x33>
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <maker@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe78(%rip),%rcx
call   1050 <writer@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1080 <printDelete@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x3,%edi
jne    11b8 <main+0x58>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1060 <atoi@plt>
mov    %eax,%r14d
mov    0x10(%rbx),%rdi
call   1060 <atoi@plt>
mov    %eax,%ebx
mov    %r14d,%edi
mov    %eax,%esi
call   1040 <maker@plt>
mov    %rax,%rbp
lea    0xe69(%rip),%rcx
mov    %rax,%rdi
mov    %r14d,%esi
mov    %ebx,%edx
call   1050 <writer@plt>
mov    %rbp,%rdi
mov    %r14d,%esi
mov    %ebx,%edx
call   1080 <printDelete@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xe4c(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [75 x i8] c"Usage requires two commandline parameters:\0A1. no of rows\0A2. no of columns\0A\00"
@.str.1 = [11 x i8] c"matrix.txt\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 3
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 0)
unreachable
14: ; preds = %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @atoi(i8* %17)
store i32 %18, i32* %6
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 2
%21 = load i8*, i8** %20
%22 = call i32 @atoi(i8* %21)
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = call i32** @maker(i32 %23, i32 %24)
store i32** %25, i32*** %8
%26 = load i32**, i32*** %8
%27 = load i32, i32* %6
%28 = load i32, i32* %7
%29 = call i32 @writer(i32** %26, i32 %27, i32 %28, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%30 = load i32**, i32*** %8
%31 = load i32, i32* %6
%32 = load i32, i32* %7
%33 = call i32 @printDelete(i32** %30, i32 %31, i32 %32)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"matrix.txt\00"
@str = [74 x i8] c"Usage requires two commandline parameters:\0A1. no of rows\0A2. no of columns\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = tail call i32 @atoi(i8* %12)
%14 = tail call i32** @maker(i32 %10, i32 %13)
%15 = tail call i32 @writer(i32** %14, i32 %10, i32 %13, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%16 = tail call i32 @printDelete(i32** %14, i32 %10, i32 %13)
ret i32 0
}