#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*/ printf(char *);
int *materialFunction(int p_id) {
  int *m_id;
  if (p_id == 0) {
    m_id[0] = 0;
    m_id[1] = 0;
    return m_id;
  }
  if (p_id == 1) {
    m_id[0] = 0;
    m_id[1] = 1;
    return m_id;
  }
  if (p_id == 2) {
    m_id[0] = 0;
    m_id[1] = 2;
    return m_id;
  }
  if (p_id == 3) {
    m_id[0] = 1;
    m_id[1] = 1;
    return m_id;
  }
  if (p_id == 4) {
    m_id[0] = 1;
    m_id[1] = 2;
    return m_id;
  }
  if (p_id == 5) {
    m_id[0] = 2;
    m_id[1] = 2;
    return m_id;
  } else {
    printf("ERROR: materialFunction()\n");
    return 0;
  }
}


x86 assembly (clang, -O0):
<materialFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1147 <materialFunction+0x37>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x0,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1237 <materialFunction+0x127>
cmpl   $0x1,-0xc(%rbp)
jne    1173 <materialFunction+0x63>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x1,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1237 <materialFunction+0x127>
cmpl   $0x2,-0xc(%rbp)
jne    119f <materialFunction+0x8f>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x2,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1237 <materialFunction+0x127>
cmpl   $0x3,-0xc(%rbp)
jne    11cb <materialFunction+0xbb>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x1,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1237 <materialFunction+0x127>
cmpl   $0x4,-0xc(%rbp)
jne    11f7 <materialFunction+0xe7>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x2,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1237 <materialFunction+0x127>
cmpl   $0x5,-0xc(%rbp)
jne    1223 <materialFunction+0x113>
mov    -0x18(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x2,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1237 <materialFunction+0x127>
lea    0xdd6(%rip),%rdi
call   1030 <printf@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<materialFunction>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"ERROR: materialFunction()\0A\00"
define i32* @materialFunction(i32 %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 0, i32* %9
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 1
store i32 0, i32* %11
%12 = load i32*, i32** %4
store i32* %12, i32** %2
br label %60
13: ; preds = %1
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %22
16: ; preds = %13
%17 = load i32*, i32** %4
%18 = getelementptr inbounds i32, i32* %17, i64 0
store i32 0, i32* %18
%19 = load i32*, i32** %4
%20 = getelementptr inbounds i32, i32* %19, i64 1
store i32 1, i32* %20
%21 = load i32*, i32** %4
store i32* %21, i32** %2
br label %60
22: ; preds = %13
%23 = load i32, i32* %3
%24 = icmp eq i32 %23, 2
br i1 %24, label %25, label %31
25: ; preds = %22
%26 = load i32*, i32** %4
%27 = getelementptr inbounds i32, i32* %26, i64 0
store i32 0, i32* %27
%28 = load i32*, i32** %4
%29 = getelementptr inbounds i32, i32* %28, i64 1
store i32 2, i32* %29
%30 = load i32*, i32** %4
store i32* %30, i32** %2
br label %60
31: ; preds = %22
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 3
br i1 %33, label %34, label %40
34: ; preds = %31
%35 = load i32*, i32** %4
%36 = getelementptr inbounds i32, i32* %35, i64 0
store i32 1, i32* %36
%37 = load i32*, i32** %4
%38 = getelementptr inbounds i32, i32* %37, i64 1
store i32 1, i32* %38
%39 = load i32*, i32** %4
store i32* %39, i32** %2
br label %60
40: ; preds = %31
%41 = load i32, i32* %3
%42 = icmp eq i32 %41, 4
br i1 %42, label %43, label %49
43: ; preds = %40
%44 = load i32*, i32** %4
%45 = getelementptr inbounds i32, i32* %44, i64 0
store i32 1, i32* %45
%46 = load i32*, i32** %4
%47 = getelementptr inbounds i32, i32* %46, i64 1
store i32 2, i32* %47
%48 = load i32*, i32** %4
store i32* %48, i32** %2
br label %60
49: ; preds = %40
%50 = load i32, i32* %3
%51 = icmp eq i32 %50, 5
br i1 %51, label %52, label %58
52: ; preds = %49
%53 = load i32*, i32** %4
%54 = getelementptr inbounds i32, i32* %53, i64 0
store i32 2, i32* %54
%55 = load i32*, i32** %4
%56 = getelementptr inbounds i32, i32* %55, i64 1
store i32 2, i32* %56
%57 = load i32*, i32** %4
store i32* %57, i32** %2
br label %60
58: ; preds = %49
%59 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
store i32* null, i32** %2
br label %60
60: ; preds = %58, %52, %43, %34, %25, %16, %7
%61 = load i32*, i32** %2
ret i32* %61
}

LLVM IR (-O2):
@str = [26 x i8] c"ERROR: materialFunction()\00"
define noalias i32* @materialFunction(i32 %0) {
%2 = icmp ne i32 %0, 0
tail call void @llvm.assume(i1 %2)
%3 = icmp ne i32 %0, 1
tail call void @llvm.assume(i1 %3)
%4 = icmp ne i32 %0, 2
tail call void @llvm.assume(i1 %4)
%5 = icmp ne i32 %0, 3
tail call void @llvm.assume(i1 %5)
%6 = icmp ne i32 %0, 4
tail call void @llvm.assume(i1 %6)
%7 = icmp ne i32 %0, 5
tail call void @llvm.assume(i1 %7)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret i32* null
}