#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 Cmd_Argc();
int /*<<< orphan*/ Cmd_Argv(int);
int /*<<< orphan*/ Com_Printf(int /*<<< orphan*/, ...);
int /*<<< orphan*/ Key_SetBinding(int, char *);
int Key_StringToKeynum(int /*<<< orphan*/);
int /*<<< orphan*/ Sys_Gettext(char *);
void Key_Unbind_f(void) {
  int b;
  if (Cmd_Argc() != 2) {
    Com_Printf(Sys_Gettext("unbind <key> : remove commands from a key\n"));
    return;
  }
  b = Key_StringToKeynum(Cmd_Argv(1));
  if (b == -1) {
    Com_Printf(Sys_Gettext("\"%s\" isn't a valid key\n"), Cmd_Argv(1));
    return;
  }
  Key_SetBinding(b, "");
}


x86 assembly (clang, -O0):
<Key_Unbind_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <Cmd_Argc@plt>
cmp    $0x2,%eax
je     1192 <Key_Unbind_f+0x32>
lea    0xe81(%rip),%rdi
call   1080 <Sys_Gettext@plt>
mov    %eax,%edi
mov    $0x0,%al
call   1060 <Com_Printf@plt>
jmp    11e9 <Key_Unbind_f+0x89>
mov    $0x1,%edi
call   1070 <Cmd_Argv@plt>
mov    %eax,%edi
call   1040 <Key_StringToKeynum@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    11da <Key_Unbind_f+0x7a>
lea    0xe74(%rip),%rdi
call   1080 <Sys_Gettext@plt>
mov    %eax,-0x8(%rbp)
mov    $0x1,%edi
call   1070 <Cmd_Argv@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
mov    $0x0,%al
call   1060 <Com_Printf@plt>
jmp    11e9 <Key_Unbind_f+0x89>
mov    -0x4(%rbp),%edi
lea    0xe46(%rip),%rsi
call   1050 <Key_SetBinding@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Key_Unbind_f>:
push   %rbx
xor    %eax,%eax
call   1030 <Cmd_Argc@plt>
cmp    $0x2,%eax
jne    1192 <Key_Unbind_f+0x32>
mov    $0x1,%edi
call   1070 <Cmd_Argv@plt>
mov    %eax,%edi
call   1040 <Key_StringToKeynum@plt>
cmp    $0xffffffff,%eax
je     11a8 <Key_Unbind_f+0x48>
lea    0xea0(%rip),%rsi
mov    %eax,%edi
pop    %rbx
jmp    1050 <Key_SetBinding@plt>
lea    0xe67(%rip),%rdi
call   1080 <Sys_Gettext@plt>
mov    %eax,%edi
xor    %eax,%eax
pop    %rbx
jmp    1060 <Com_Printf@plt>
lea    0xe7c(%rip),%rdi
call   1080 <Sys_Gettext@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1070 <Cmd_Argv@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %eax,%eax
pop    %rbx
jmp    1060 <Com_Printf@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"unbind <key> : remove commands from a key\0A\00"
@.str.1 = [24 x i8] c"\22%s\22 isn't a valid key\0A\00"
@.str.2 = [1 x i8] zeroinitializer
define void @Key_Unbind_f() {
%1 = alloca i32
%2 = call i32 (...) @Cmd_Argc()
%3 = icmp ne i32 %2, 2
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i32 @Sys_Gettext(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i32, ...) @Com_Printf(i32 %5)
br label %19
7: ; preds = %0
%8 = call i32 @Cmd_Argv(i32 1)
%9 = call i32 @Key_StringToKeynum(i32 %8)
store i32 %9, i32* %1
%10 = load i32, i32* %1
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %16
12: ; preds = %7
%13 = call i32 @Sys_Gettext(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @Cmd_Argv(i32 1)
%15 = call i32 (i32, ...) @Com_Printf(i32 %13, i32 %14)
br label %19
16: ; preds = %7
%17 = load i32, i32* %1
%18 = call i32 @Key_SetBinding(i32 %17, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
br label %19
19: ; preds = %16, %12, %4
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"unbind <key> : remove commands from a key\0A\00"
@.str.1 = [24 x i8] c"\22%s\22 isn't a valid key\0A\00"
@.str.2 = [1 x i8] zeroinitializer
define void @Key_Unbind_f() {
%1 = tail call i32 (...) @Cmd_Argc()
%2 = icmp eq i32 %1, 2
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 @Sys_Gettext(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (i32, ...) @Com_Printf(i32 %4)
br label %16
6: ; preds = %0
%7 = tail call i32 @Cmd_Argv(i32 1)
%8 = tail call i32 @Key_StringToKeynum(i32 %7)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = tail call i32 @Sys_Gettext(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32 @Cmd_Argv(i32 1)
%13 = tail call i32 (i32, ...) @Com_Printf(i32 %11, i32 %12)
br label %16
14: ; preds = %6
%15 = tail call i32 @Key_SetBinding(i32 %8, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %14, %10, %3
ret void
}