#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 *);
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 *argv[]) {
  if (argc != 3) {
    printf("Enter the number of rows and columns of the matrix. (Only)\n");
    return 1;
  }
  int n = atoi(argv[1]);
  int m = atoi(argv[2]);
  int **arr = maker(n, m);
  writer(arr, n, m, "b.dat");
  printDelete(arr, n, m);
  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     1188 <main+0x38>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    11e3 <main+0x93>
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    0xe74(%rip),%rcx
call   1050 <writer@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1070 <printDelete@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x3,%edi
jne    11a5 <main+0x55>
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    0xe79(%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   1070 <printDelete@plt>
xor    %eax,%eax
jmp    11b6 <main+0x66>
lea    0xe5a(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [60 x i8] c"Enter the number of rows and columns of the matrix. (Only)\0A\00"
@.str.1 = [6 x i8] c"b.dat\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 %13
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %33
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @atoi(i8* %16)
store i32 %17, i32* %6
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 2
%20 = load i8*, i8** %19
%21 = call i32 @atoi(i8* %20)
store i32 %21, i32* %7
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = call i32** @maker(i32 %22, i32 %23)
store i32** %24, i32*** %8
%25 = load i32**, i32*** %8
%26 = load i32, i32* %6
%27 = load i32, i32* %7
%28 = call i32 @writer(i32** %25, i32 %26, i32 %27, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%29 = load i32**, i32*** %8
%30 = load i32, i32* %6
%31 = load i32, i32* %7
%32 = call i32 @printDelete(i32** %29, i32 %30, i32 %31)
store i32 0, i32* %3
br label %33
33: ; preds = %13, %11
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"b.dat\00"
@str = [59 x i8] c"Enter the number of rows and columns of the matrix. (Only)\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
br label %16
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @atoi(i8* %8)
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
%13 = tail call i32** @maker(i32 %9, i32 %12)
%14 = tail call i32 @writer(i32** %13, i32 %9, i32 %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%15 = tail call i32 @printDelete(i32** %13, i32 %9, i32 %12)
br label %16
16: ; preds = %6, %4
%17 = phi i32 [ 1, %4 ], [ 0, %6 ]
ret i32 %17
}