#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 */
struct hash_table {
  int dummy;
};

/* Variables and functions */
int create_table(struct hash_table ***);
int /*<<< orphan*/ printErrorExplanation(int);
int put(struct hash_table ***);
int initialize(struct hash_table ***table) {
  int error = -3007;
  if ((error = create_table(table)) == 0) {
    while ((error = put(table)) == 0)
      ;
    if (error == -3003)
      return 0;
  } else {
    printErrorExplanation(error);
    return error;
  }
  return error;
}


x86 assembly (clang, -O0):
<initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0xfffff441,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <create_table@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    1195 <initialize+0x65>
jmp    115d <initialize+0x2d>
mov    -0x10(%rbp),%rdi
call   1040 <put@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    1177 <initialize+0x47>
jmp    115d <initialize+0x2d>
cmpl   $0xfffff445,-0x14(%rbp)
jne    1190 <initialize+0x60>
movl   $0x0,-0x4(%rbp)
jmp    11ae <initialize+0x7e>
jmp    11a8 <initialize+0x78>
mov    -0x14(%rbp),%edi
call   1050 <printErrorExplanation@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11ae <initialize+0x7e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <create_table@plt>
test   %eax,%eax
je     1150 <initialize+0x20>
mov    %eax,%ebx
mov    %eax,%edi
call   1050 <printErrorExplanation@plt>
jmp    1167 <initialize+0x37>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <put@plt>
test   %eax,%eax
je     1150 <initialize+0x20>
mov    %eax,%ebx
cmp    $0xfffff445,%eax
jne    1167 <initialize+0x37>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.hash_table = type { i32 }
define i32 @initialize(%struct.hash_table*** %0) {
%2 = alloca i32
%3 = alloca %struct.hash_table***
%4 = alloca i32
store %struct.hash_table*** %0, %struct.hash_table**** %3
store i32 -3007, i32* %4
%5 = load %struct.hash_table***, %struct.hash_table**** %3
%6 = call i32 @create_table(%struct.hash_table*** %5)
store i32 %6, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %19
8: ; preds = %1
br label %9
9: ; preds = %13, %8
%10 = load %struct.hash_table***, %struct.hash_table**** %3
%11 = call i32 @put(%struct.hash_table*** %10)
store i32 %11, i32* %4
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
br label %9
14: ; preds = %9
%15 = load i32, i32* %4
%16 = icmp eq i32 %15, -3003
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 0, i32* %2
br label %25
18: ; preds = %14
br label %23
19: ; preds = %1
%20 = load i32, i32* %4
%21 = call i32 @printErrorExplanation(i32 %20)
%22 = load i32, i32* %4
store i32 %22, i32* %2
br label %25
23: ; preds = %18
%24 = load i32, i32* %4
store i32 %24, i32* %2
br label %25
25: ; preds = %23, %19, %17
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
%struct.hash_table = type { i32 }
define i32 @initialize(%struct.hash_table*** %0) {
%2 = tail call i32 @create_table(%struct.hash_table*** %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1, %4
%5 = tail call i32 @put(%struct.hash_table*** %0)
switch i32 %5, label %9 [
i32 0, label %4
i32 -3003, label %8
]
6: ; preds = %1
%7 = tail call i32 @printErrorExplanation(i32 %2)
br label %9
8: ; preds = %4
br label %9
9: ; preds = %4, %8, %6
%10 = phi i32 [ %2, %6 ], [ 0, %8 ], [ %5, %4 ]
ret i32 %10
}