#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 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(struct hashtable *, char *, size_t);
int /*<<< orphan*/ stderr;
void hashtable_unset_f(struct hashtable *ht, char *key, size_t keylen) {
  int r;
  r = hashtable_unset(ht, key, keylen);
  if (r != 0) {
    fprintf(stderr, "Error while unsetting a key in a hashtable: %s\n",
            hashtable_strerror(r));
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<hashtable_unset_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <hashtable_unset@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     11a6 <hashtable_unset_f+0x66>
mov    0x2e67(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <hashtable_strerror@plt>
mov    -0x20(%rbp),%edi
mov    %rax,%rdx
lea    0xe6d(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashtable_unset_f>:
push   %rbx
call   1030 <hashtable_unset@plt>
test   %eax,%eax
jne    114c <hashtable_unset_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 }
@stderr = global i32 0
@.str = [48 x i8] c"Error while unsetting a key in a hashtable: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @hashtable_unset_f(%struct.hashtable* %0, i8* %1, i64 %2) {
%4 = alloca %struct.hashtable*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store %struct.hashtable* %0, %struct.hashtable** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load %struct.hashtable*, %struct.hashtable** %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @hashtable_unset(%struct.hashtable* %8, i8* %9, i64 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %21
14: ; preds = %3
%15 = load i32, i32* @stderr
%16 = load i32, i32* %7
%17 = call i8* @hashtable_strerror(i32 %16)
%18 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %17)
%19 = load i32, i32* @EXIT_FAILURE
%20 = call i32 @exit(i32 %19)
unreachable
21: ; preds = %3
ret void
}

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