#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*/ gf_fprint_matrix(int /*<<< orphan*/, int *, int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
pic(int *inv, int *copy, int rows, char *s) {
  printf("\n%s\n\n", s);
  gf_fprint_matrix(stdout, inv, rows, rows);
  printf("\n");
  gf_fprint_matrix(stdout, copy, rows, rows);
}


x86 assembly (clang, -O0):
<pic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1040 <gf_fprint_matrix@plt>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1040 <gf_fprint_matrix@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xeb9(%rip),%rdi
mov    %rcx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e88(%rip),%r12
mov    (%r12),%edi
mov    %r15,%rsi
mov    %ebx,%edx
mov    %ebx,%ecx
call   1050 <gf_fprint_matrix@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%r12),%edi
mov    %r14,%rsi
mov    %ebx,%edx
mov    %ebx,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1050 <gf_fprint_matrix@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\0A%s\0A\0A\00"
@stdout = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define i32 @pic(i32* %0, i32* %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i8*
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
%10 = load i8*, i8** %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i32, i32* @stdout
%13 = load i32*, i32** %6
%14 = load i32, i32* %8
%15 = load i32, i32* %8
%16 = call i32 @gf_fprint_matrix(i32 %12, i32* %13, i32 %14, i32 %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%18 = load i32, i32* @stdout
%19 = load i32*, i32** %7
%20 = load i32, i32* %8
%21 = load i32, i32* %8
%22 = call i32 @gf_fprint_matrix(i32 %18, i32* %19, i32 %20, i32 %21)
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
@.str = [6 x i8] c"\0A%s\0A\0A\00"
@stdout = global i32 0
define i32 @pic(i32* %0, i32* %1, i32 %2, i8* %3) {
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = load i32, i32* @stdout
%7 = tail call i32 @gf_fprint_matrix(i32 %6, i32* %0, i32 %2, i32 %2)
%8 = tail call i32 @putchar(i32 10)
%9 = load i32, i32* @stdout
%10 = tail call i32 @gf_fprint_matrix(i32 %9, i32* %1, i32 %2, i32 %2)
ret i32 undef
}