#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 **initMatrice(int /*<<< orphan*/, int, int);
int **creationFiltre(void) {
  int **filtre;
  filtre = initMatrice(0, 3, 3);
  filtre[0][0] = 1;
  filtre[0][1] = 1;
  filtre[0][2] = 1;
  filtre[1][0] = 0;
  filtre[1][1] = 0;
  filtre[1][2] = 0;
  filtre[2][0] = -1;
  filtre[2][1] = -1;
  filtre[2][2] = -1;
  return (filtre);
}


x86 assembly (clang, -O0):
<creationFiltre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
mov    $0x3,%edx
mov    %edx,%esi
call   1030 <initMatrice@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movl   $0x1,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movl   $0x1,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movl   $0x1,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movl   $0x0,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movl   $0x0,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
movl   $0xffffffff,(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
movl   $0xffffffff,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
movl   $0xffffffff,0x8(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creationFiltre>:
push   %rax
xor    %edi,%edi
mov    $0x3,%esi
mov    $0x3,%edx
call   1030 <initMatrice@plt>
mov    (%rax),%rcx
movabs $0x100000001,%rdx
mov    %rdx,(%rcx)
movl   $0x1,0x8(%rcx)
mov    0x8(%rax),%rcx
movq   $0x0,(%rcx)
movl   $0x0,0x8(%rcx)
mov    0x10(%rax),%rcx
movq   $0xffffffffffffffff,(%rcx)
movl   $0xffffffff,0x8(%rcx)
pop    %rcx
ret

LLVM IR (-O0):
define i32** @creationFiltre() {
%1 = alloca i32**
%2 = call i32** @initMatrice(i32 0, i32 3, i32 3)
store i32** %2, i32*** %1
%3 = load i32**, i32*** %1
%4 = getelementptr inbounds i32*, i32** %3, i64 0
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
store i32 1, i32* %6
%7 = load i32**, i32*** %1
%8 = getelementptr inbounds i32*, i32** %7, i64 0
%9 = load i32*, i32** %8
%10 = getelementptr inbounds i32, i32* %9, i64 1
store i32 1, i32* %10
%11 = load i32**, i32*** %1
%12 = getelementptr inbounds i32*, i32** %11, i64 0
%13 = load i32*, i32** %12
%14 = getelementptr inbounds i32, i32* %13, i64 2
store i32 1, i32* %14
%15 = load i32**, i32*** %1
%16 = getelementptr inbounds i32*, i32** %15, i64 1
%17 = load i32*, i32** %16
%18 = getelementptr inbounds i32, i32* %17, i64 0
store i32 0, i32* %18
%19 = load i32**, i32*** %1
%20 = getelementptr inbounds i32*, i32** %19, i64 1
%21 = load i32*, i32** %20
%22 = getelementptr inbounds i32, i32* %21, i64 1
store i32 0, i32* %22
%23 = load i32**, i32*** %1
%24 = getelementptr inbounds i32*, i32** %23, i64 1
%25 = load i32*, i32** %24
%26 = getelementptr inbounds i32, i32* %25, i64 2
store i32 0, i32* %26
%27 = load i32**, i32*** %1
%28 = getelementptr inbounds i32*, i32** %27, i64 2
%29 = load i32*, i32** %28
%30 = getelementptr inbounds i32, i32* %29, i64 0
store i32 -1, i32* %30
%31 = load i32**, i32*** %1
%32 = getelementptr inbounds i32*, i32** %31, i64 2
%33 = load i32*, i32** %32
%34 = getelementptr inbounds i32, i32* %33, i64 1
store i32 -1, i32* %34
%35 = load i32**, i32*** %1
%36 = getelementptr inbounds i32*, i32** %35, i64 2
%37 = load i32*, i32** %36
%38 = getelementptr inbounds i32, i32* %37, i64 2
store i32 -1, i32* %38
%39 = load i32**, i32*** %1
ret i32** %39
}

LLVM IR (-O2):
define i32** @creationFiltre() {
%1 = tail call i32** @initMatrice(i32 0, i32 3, i32 3)
%2 = load i32*, i32** %1
store i32 1, i32* %2
%3 = getelementptr inbounds i32, i32* %2, i64 1
store i32 1, i32* %3
%4 = getelementptr inbounds i32, i32* %2, i64 2
store i32 1, i32* %4
%5 = getelementptr inbounds i32*, i32** %1, i64 1
%6 = load i32*, i32** %5
store i32 0, i32* %6
%7 = getelementptr inbounds i32, i32* %6, i64 1
store i32 0, i32* %7
%8 = getelementptr inbounds i32, i32* %6, i64 2
store i32 0, i32* %8
%9 = getelementptr inbounds i32*, i32** %1, i64 2
%10 = load i32*, i32** %9
store i32 -1, i32* %10
%11 = getelementptr inbounds i32, i32* %10, i64 1
store i32 -1, i32* %11
%12 = getelementptr inbounds i32, i32* %10, i64 2
store i32 -1, i32* %12
ret i32** %1
}