#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 */
typedef scalar_t__ KeySym;

/* Variables and functions */
scalar_t__ NoSymbol;
scalar_t__ XK_BackSpace;
scalar_t__ XK_Begin;
scalar_t__ XK_Delete;
scalar_t__ XK_End;
scalar_t__ XK_Home;
scalar_t__ XK_Left;
scalar_t__ XK_Right;
KeySym module_keypress(KeySym key) {
  if (key == XK_Begin || key == XK_Home || key == XK_End || key == XK_Left ||
      key == XK_Right)
    return NoSymbol;
  if (key == XK_Delete)
    return XK_BackSpace;
  return key;
}


x86 assembly (clang, -O0):
<module_keypress>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2e95(%rip),%rcx
cmp    (%rcx),%rax
je     116c <module_keypress+0x6c>
mov    -0x10(%rbp),%rax
mov    0x2ea9(%rip),%rcx
cmp    (%rcx),%rax
je     116c <module_keypress+0x6c>
mov    -0x10(%rbp),%rax
mov    0x2ead(%rip),%rcx
cmp    (%rcx),%rax
je     116c <module_keypress+0x6c>
mov    -0x10(%rbp),%rax
mov    0x2e91(%rip),%rcx
cmp    (%rcx),%rax
je     116c <module_keypress+0x6c>
mov    -0x10(%rbp),%rax
mov    0x2e8d(%rip),%rcx
cmp    (%rcx),%rax
jne    117f <module_keypress+0x7f>
mov    0x2e55(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    11ae <module_keypress+0xae>
mov    -0x10(%rbp),%rax
mov    0x2e26(%rip),%rcx
cmp    (%rcx),%rax
jne    11a6 <module_keypress+0xa6>
mov    0x2e1e(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    11ae <module_keypress+0xae>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_keypress>:
mov    0x2ea1(%rip),%rcx
cmp    %rdi,(%rcx)
je     1154 <module_keypress+0x54>
mov    %rdi,%rax
mov    0x2eba(%rip),%rcx
cmp    %rdi,(%rcx)
je     1154 <module_keypress+0x54>
mov    0x2ec6(%rip),%rcx
cmp    %rax,(%rcx)
je     1154 <module_keypress+0x54>
mov    0x2eb2(%rip),%rcx
cmp    %rax,(%rcx)
je     1154 <module_keypress+0x54>
mov    0x2eb6(%rip),%rcx
cmp    %rax,(%rcx)
je     1154 <module_keypress+0x54>
mov    0x2e6a(%rip),%rcx
cmp    %rax,(%rcx)
jne    115e <module_keypress+0x5e>
mov    0x2e66(%rip),%rax
jmp    115b <module_keypress+0x5b>
mov    0x2e6d(%rip),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
@XK_Begin = global i64 0
@XK_Home = global i64 0
@XK_End = global i64 0
@XK_Left = global i64 0
@XK_Right = global i64 0
@NoSymbol = global i64 0
@XK_Delete = global i64 0
@XK_BackSpace = global i64 0
define i64 @module_keypress(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = load i64, i64* @XK_Begin
%6 = icmp eq i64 %4, %5
br i1 %6, label %23, label %7
7: ; preds = %1
%8 = load i64, i64* %3
%9 = load i64, i64* @XK_Home
%10 = icmp eq i64 %8, %9
br i1 %10, label %23, label %11
11: ; preds = %7
%12 = load i64, i64* %3
%13 = load i64, i64* @XK_End
%14 = icmp eq i64 %12, %13
br i1 %14, label %23, label %15
15: ; preds = %11
%16 = load i64, i64* %3
%17 = load i64, i64* @XK_Left
%18 = icmp eq i64 %16, %17
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i64, i64* %3
%21 = load i64, i64* @XK_Right
%22 = icmp eq i64 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %19, %15, %11, %7, %1
%24 = load i64, i64* @NoSymbol
store i64 %24, i64* %2
br label %33
25: ; preds = %19
%26 = load i64, i64* %3
%27 = load i64, i64* @XK_Delete
%28 = icmp eq i64 %26, %27
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = load i64, i64* @XK_BackSpace
store i64 %30, i64* %2
br label %33
31: ; preds = %25
%32 = load i64, i64* %3
store i64 %32, i64* %2
br label %33
33: ; preds = %31, %29, %23
%34 = load i64, i64* %2
ret i64 %34
}

LLVM IR (-O2):
@XK_Begin = global i64 0
@XK_Home = global i64 0
@XK_End = global i64 0
@XK_Left = global i64 0
@XK_Right = global i64 0
@NoSymbol = global i64 0
@XK_Delete = global i64 0
@XK_BackSpace = global i64 0
define i64 @module_keypress(i64 %0) {
%2 = load i64, i64* @XK_Begin
%3 = icmp eq i64 %2, %0
%4 = load i64, i64* @XK_Home
%5 = icmp eq i64 %4, %0
%6 = select i1 %3, i1 true, i1 %5
%7 = load i64, i64* @XK_End
%8 = icmp eq i64 %7, %0
%9 = select i1 %6, i1 true, i1 %8
%10 = load i64, i64* @XK_Left
%11 = icmp eq i64 %10, %0
%12 = select i1 %9, i1 true, i1 %11
%13 = load i64, i64* @XK_Right
%14 = icmp eq i64 %13, %0
%15 = select i1 %12, i1 true, i1 %14
br i1 %15, label %16, label %18
16: ; preds = %1
%17 = load i64, i64* @NoSymbol
br label %23
18: ; preds = %1
%19 = load i64, i64* @XK_Delete
%20 = icmp eq i64 %19, %0
%21 = load i64, i64* @XK_BackSpace
%22 = select i1 %20, i64 %21, i64 %0
br label %23
23: ; preds = %18, %16
%24 = phi i64 [ %17, %16 ], [ %22, %18 ]
ret i64 %24
}