#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 hashtableitem {
  int dummy;
};
struct hashtable {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
char *hashtable_strerror(int);
int hashtable_unset_item(struct hashtable *, struct hashtableitem *);
int /*<<< orphan*/ stderr;
void hashtable_unset_item_f(struct hashtable *ht, struct hashtableitem *item) {
  int r;
  r = hashtable_unset_item(ht, item);
  if (r != 0) {
    fprintf(stderr, "Error while unsetting an item in a hashtable: %s\n",
            hashtable_strerror(r));
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<hashtable_unset_item_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <hashtable_unset_item@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     119e <hashtable_unset_item_f+0x5e>
mov    0x2e6f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <hashtable_strerror@plt>
mov    -0x18(%rbp),%edi
mov    %rax,%rdx
lea    0xe75(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashtable_unset_item_f>:
push   %rbx
call   1030 <hashtable_unset_item@plt>
test   %eax,%eax
jne    114c <hashtable_unset_item_f+0xc>
pop    %rbx
ret
mov    0x2e8d(%rip),%rcx
mov    (%rcx),%ebx
mov    %eax,%edi
call   1040 <hashtable_strerror@plt>
lea    0xe9d(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1050 <fprintf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
%struct.hashtable = type { i32 }
%struct.hashtableitem = type { i32 }
@stderr = global i32 0
@.str = [50 x i8] c"Error while unsetting an item in a hashtable: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @hashtable_unset_item_f(%struct.hashtable* %0, %struct.hashtableitem* %1) {
%3 = alloca %struct.hashtable*
%4 = alloca %struct.hashtableitem*
%5 = alloca i32
store %struct.hashtable* %0, %struct.hashtable** %3
store %struct.hashtableitem* %1, %struct.hashtableitem** %4
%6 = load %struct.hashtable*, %struct.hashtable** %3
%7 = load %struct.hashtableitem*, %struct.hashtableitem** %4
%8 = call i32 @hashtable_unset_item(%struct.hashtable* %6, %struct.hashtableitem* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i32, i32* %5
%14 = call i8* @hashtable_strerror(i32 %13)
%15 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* @EXIT_FAILURE
%17 = call i32 @exit(i32 %16)
unreachable
18: ; preds = %2
ret void
}

LLVM IR (-O2):
%struct.hashtable = type { i32 }
%struct.hashtableitem = type { i32 }
@stderr = global i32 0
@.str = [50 x i8] c"Error while unsetting an item in a hashtable: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @hashtable_unset_item_f(%struct.hashtable* %0, %struct.hashtableitem* %1) {
%3 = tail call i32 @hashtable_unset_item(%struct.hashtable* %0, %struct.hashtableitem* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i8* @hashtable_strerror(i32 %3)
%8 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %2
ret void
}