#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*/ print_matrix(int **, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ set_zeros(int **, int, int);
void test(void (*func4test)(int **, int, int), int **matrix, int m, int n) {
  printf("The original matrix is :\n");
  print_matrix(matrix, m, n);
  set_zeros(matrix, m, n);
  printf("The converted matrix is :\n");
  print_matrix(matrix, m, n);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1050 <print_matrix@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1040 <set_zeros@plt>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1050 <print_matrix@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %rsi,%rbx
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1050 <print_matrix@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <set_zeros@plt>
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <print_matrix@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"The original matrix is :\0A\00"
@.str.1 = [27 x i8] c"The converted matrix is :\0A\00"
define void @test(void (i32**, i32, i32)* %0, i32** %1, i32 %2, i32 %3) {
%5 = alloca void (i32**, i32, i32)*
%6 = alloca i32**
%7 = alloca i32
%8 = alloca i32
store void (i32**, i32, i32)* %0, void (i32**, i32, i32)** %5
store i32** %1, i32*** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%10 = load i32**, i32*** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @print_matrix(i32** %10, i32 %11, i32 %12)
%14 = load i32**, i32*** %6
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = call i32 @set_zeros(i32** %14, i32 %15, i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%19 = load i32**, i32*** %6
%20 = load i32, i32* %7
%21 = load i32, i32* %8
%22 = call i32 @print_matrix(i32** %19, i32 %20, i32 %21)
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"The original matrix is :\00"
@str.2 = [26 x i8] c"The converted matrix is :\00"
define void @test(void (i32**, i32, i32)* nocapture readnone %0, i32** %1, i32 %2, i32 %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @print_matrix(i32** %1, i32 %2, i32 %3)
%7 = tail call i32 @set_zeros(i32** %1, i32 %2, i32 %3)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.2, i64 0, i64 0))
%9 = tail call i32 @print_matrix(i32** %1, i32 %2, i32 %3)
ret void
}