#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 */
const char *command_ShowNegval(unsigned val) {
  switch (val & 3) {
  case 1:
    return "disabled & accepted";
  case 2:
    return "enabled & denied";
  case 3:
    return "enabled & accepted";
  }
  return "disabled & denied";
}


x86 assembly (clang, -O0):
<command_ShowNegval>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x3,%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     1140 <command_ShowNegval+0x40>
jmp    111e <command_ShowNegval+0x1e>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     1150 <command_ShowNegval+0x50>
jmp    112f <command_ShowNegval+0x2f>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
je     1160 <command_ShowNegval+0x60>
jmp    1170 <command_ShowNegval+0x70>
lea    0xeb9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117b <command_ShowNegval+0x7b>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117b <command_ShowNegval+0x7b>
lea    0xebe(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117b <command_ShowNegval+0x7b>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<command_ShowNegval>:
and    $0x3,%edi
add    $0xffffffff,%edi
cmp    $0x2,%edi
ja     111d <command_ShowNegval+0x1d>
movslq %edi,%rax
lea    0xf37(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xf14(%rip),%rax
ret

LLVM IR (-O0):
@.str = [20 x i8] c"disabled & accepted\00"
@.str.1 = [17 x i8] c"enabled & denied\00"
@.str.2 = [19 x i8] c"enabled & accepted\00"
@.str.3 = [18 x i8] c"disabled & denied\00"
define i8* @command_ShowNegval(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 3
switch i32 %5, label %9 [
i32 1, label %6
i32 2, label %7
i32 3, label %8
]
6: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
8: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %10
9: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %9, %8, %7, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [20 x i8] c"disabled & accepted\00"
@.str.1 = [17 x i8] c"enabled & denied\00"
@.str.2 = [19 x i8] c"enabled & accepted\00"
@.str.3 = [18 x i8] c"disabled & denied\00"
@reltable.command_ShowNegval = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.command_ShowNegval to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.command_ShowNegval to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.command_ShowNegval to i64)) to i32)]
define i8* @command_ShowNegval(i32 %0) {
%2 = and i32 %0, 3
%3 = add nsw i32 %2, -1
%4 = icmp ult i32 %3, 3
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = shl i64 %6, 2
%8 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.command_ShowNegval to i8*), i64 %7)
br label %9
9: ; preds = %1, %5
%10 = phi i8* [ %8, %5 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), %1 ]
ret i8* %10
}