#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int key_click_percent;
  int bell_percent;
  int bell_pitch;
  int bell_duration;
  int led;
  int led_mode;
  int key;
  int auto_repeat_mode;
};
typedef TYPE_1__ XKeyboardControl;

/* Variables and functions */
unsigned long KBAutoRepeatMode;
unsigned long KBBellDuration;
unsigned long KBBellPercent;
unsigned long KBBellPitch;
unsigned long KBKey;
unsigned long KBKeyClickPercent;
unsigned long KBLed;
unsigned long KBLedMode;
int /*<<< orphan*/ printf(char *, int);
void pkc(XKeyboardControl *kc, unsigned long vm) {
  if (vm & KBKeyClickPercent)
    printf("   key_click_percent  = %d\n", kc->key_click_percent);
  if (vm & KBBellPercent)
    printf("   bell_percent       = %d\n", kc->bell_percent);
  if (vm & KBBellPitch)
    printf("   bell_pitch         = %d\n", kc->bell_pitch);
  if (vm & KBBellDuration)
    printf("   bell_duration      = %d\n", kc->bell_duration);
  if (vm & KBLed)
    printf("   led                = 0x%x\n", kc->led);
  if (vm & KBLedMode)
    printf("   led_mode           = %d\n", kc->led_mode);
  if (vm & KBKey)
    printf("   key                = %d\n", kc->key);
  if (vm & KBAutoRepeatMode)
    printf("   auto_repeat_mode   = %d\n", kc->auto_repeat_mode);
}


x86 assembly (clang, -O0):
<pkc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2ead(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     114a <pkc+0x3a>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x2e63(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     1175 <pkc+0x65>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x2e40(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     11a0 <pkc+0x90>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x2e35(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     11cb <pkc+0xbb>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%esi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x2e22(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     11f6 <pkc+0xe6>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%esi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x2dc7(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     1221 <pkc+0x111>
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%esi
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x2d7c(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     124c <pkc+0x13c>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%esi
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x2d59(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     1277 <pkc+0x167>
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%esi
lea    0xe54(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pkc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    0x2eb7(%rip),%rax
test   %rsi,(%rax)
je     1135 <pkc+0x25>
mov    (%r14),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7c(%rip),%rax
test   %rbx,(%rax)
je     1151 <pkc+0x41>
mov    0x4(%r14),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e68(%rip),%rax
test   %rbx,(%rax)
je     116d <pkc+0x5d>
mov    0x8(%r14),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e6c(%rip),%rax
test   %rbx,(%rax)
je     1189 <pkc+0x79>
mov    0xc(%r14),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e68(%rip),%rax
test   %rbx,(%rax)
je     11a5 <pkc+0x95>
mov    0x10(%r14),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e1c(%rip),%rax
test   %rbx,(%rax)
je     11c1 <pkc+0xb1>
mov    0x14(%r14),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2de0(%rip),%rax
test   %rbx,(%rax)
je     11dd <pkc+0xcd>
mov    0x18(%r14),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2dcc(%rip),%rax
test   %rbx,(%rax)
je     1200 <pkc+0xf0>
mov    0x1c(%r14),%esi
lea    0xed2(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32, i32, i32, i32, i32, i32, i32 }
@KBKeyClickPercent = global i64 0
@.str = [28 x i8] c" key_click_percent = %d\0A\00"
@KBBellPercent = global i64 0
@.str.1 = [28 x i8] c" bell_percent = %d\0A\00"
@KBBellPitch = global i64 0
@.str.2 = [28 x i8] c" bell_pitch = %d\0A\00"
@KBBellDuration = global i64 0
@.str.3 = [28 x i8] c" bell_duration = %d\0A\00"
@KBLed = global i64 0
@.str.4 = [30 x i8] c" led = 0x%x\0A\00"
@KBLedMode = global i64 0
@.str.5 = [28 x i8] c" led_mode = %d\0A\00"
@KBKey = global i64 0
@.str.6 = [28 x i8] c" key = %d\0A\00"
@KBAutoRepeatMode = global i64 0
@.str.7 = [28 x i8] c" auto_repeat_mode = %d\0A\00"
define void @pkc(%struct.TYPE_3__* %0, i64 %1) {
%3 = alloca %struct.TYPE_3__*
%4 = alloca i64
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* @KBKeyClickPercent
%7 = and i64 %5, %6
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%11 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %10, i32 0, i32 0
%12 = load i32, i32* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %9, %2
%15 = load i64, i64* %4
%16 = load i64, i64* @KBBellPercent
%17 = and i64 %15, %16
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %14
%20 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%21 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %20, i32 0, i32 1
%22 = load i32, i32* %21
%23 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %19, %14
%25 = load i64, i64* %4
%26 = load i64, i64* @KBBellPitch
%27 = and i64 %25, %26
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %34
29: ; preds = %24
%30 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%31 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %30, i32 0, i32 2
%32 = load i32, i32* %31
%33 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %29, %24
%35 = load i64, i64* %4
%36 = load i64, i64* @KBBellDuration
%37 = and i64 %35, %36
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %44
39: ; preds = %34
%40 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%41 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %40, i32 0, i32 3
%42 = load i32, i32* %41
%43 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %42)
br label %44
44: ; preds = %39, %34
%45 = load i64, i64* %4
%46 = load i64, i64* @KBLed
%47 = and i64 %45, %46
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %54
49: ; preds = %44
%50 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%51 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %50, i32 0, i32 4
%52 = load i32, i32* %51
%53 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %52)
br label %54
54: ; preds = %49, %44
%55 = load i64, i64* %4
%56 = load i64, i64* @KBLedMode
%57 = and i64 %55, %56
%58 = icmp ne i64 %57, 0
br i1 %58, label %59, label %64
59: ; preds = %54
%60 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%61 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %60, i32 0, i32 5
%62 = load i32, i32* %61
%63 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 %62)
br label %64
64: ; preds = %59, %54
%65 = load i64, i64* %4
%66 = load i64, i64* @KBKey
%67 = and i64 %65, %66
%68 = icmp ne i64 %67, 0
br i1 %68, label %69, label %74
69: ; preds = %64
%70 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%71 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %70, i32 0, i32 6
%72 = load i32, i32* %71
%73 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 %72)
br label %74
74: ; preds = %69, %64
%75 = load i64, i64* %4
%76 = load i64, i64* @KBAutoRepeatMode
%77 = and i64 %75, %76
%78 = icmp ne i64 %77, 0
br i1 %78, label %79, label %84
79: ; preds = %74
%80 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%81 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %80, i32 0, i32 7
%82 = load i32, i32* %81
%83 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 %82)
br label %84
84: ; preds = %79, %74
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32, i32, i32, i32, i32, i32, i32 }
@KBKeyClickPercent = global i64 0
@.str = [28 x i8] c" key_click_percent = %d\0A\00"
@KBBellPercent = global i64 0
@.str.1 = [28 x i8] c" bell_percent = %d\0A\00"
@KBBellPitch = global i64 0
@.str.2 = [28 x i8] c" bell_pitch = %d\0A\00"
@KBBellDuration = global i64 0
@.str.3 = [28 x i8] c" bell_duration = %d\0A\00"
@KBLed = global i64 0
@.str.4 = [30 x i8] c" led = 0x%x\0A\00"
@KBLedMode = global i64 0
@.str.5 = [28 x i8] c" led_mode = %d\0A\00"
@KBKey = global i64 0
@.str.6 = [28 x i8] c" key = %d\0A\00"
@KBAutoRepeatMode = global i64 0
@.str.7 = [28 x i8] c" auto_repeat_mode = %d\0A\00"
define void @pkc(%struct.TYPE_3__* nocapture %0, i64 %1) {
%3 = load i64, i64* @KBKeyClickPercent
%4 = and i64 %3, %1
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %6, %2
%11 = load i64, i64* @KBBellPercent
%12 = and i64 %11, %1
%13 = icmp eq i64 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 1
%16 = load i32, i32* %15
%17 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %14, %10
%19 = load i64, i64* @KBBellPitch
%20 = and i64 %19, %1
%21 = icmp eq i64 %20, 0
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 2
%24 = load i32, i32* %23
%25 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %24)
br label %26
26: ; preds = %22, %18
%27 = load i64, i64* @KBBellDuration
%28 = and i64 %27, %1
%29 = icmp eq i64 %28, 0
br i1 %29, label %34, label %30
30: ; preds = %26
%31 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 3
%32 = load i32, i32* %31
%33 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %30, %26
%35 = load i64, i64* @KBLed
%36 = and i64 %35, %1
%37 = icmp eq i64 %36, 0
br i1 %37, label %42, label %38
38: ; preds = %34
%39 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 4
%40 = load i32, i32* %39
%41 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %40)
br label %42
42: ; preds = %38, %34
%43 = load i64, i64* @KBLedMode
%44 = and i64 %43, %1
%45 = icmp eq i64 %44, 0
br i1 %45, label %50, label %46
46: ; preds = %42
%47 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 5
%48 = load i32, i32* %47
%49 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 %48)
br label %50
50: ; preds = %46, %42
%51 = load i64, i64* @KBKey
%52 = and i64 %51, %1
%53 = icmp eq i64 %52, 0
br i1 %53, label %58, label %54
54: ; preds = %50
%55 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 6
%56 = load i32, i32* %55
%57 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 %56)
br label %58
58: ; preds = %54, %50
%59 = load i64, i64* @KBAutoRepeatMode
%60 = and i64 %59, %1
%61 = icmp eq i64 %60, 0
br i1 %61, label %66, label %62
62: ; preds = %58
%63 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 7
%64 = load i32, i32* %63
%65 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %62, %58
ret void
}