#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 int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *, char *);
void ilk_debug_pp_control(char *result, int len, int reg, uint32_t val,
                          uint32_t devid) {
  snprintf(result, len, "blacklight %s, %spower down on reset, panel %s",
           (val & (1 << 2)) ? "enabled" : "disabled",
           (val & (1 << 1)) ? "" : "do not ", (val & (1 << 0)) ? "on" : "off");
}


x86 assembly (clang, -O0):
<ilk_debug_pp_control>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
and    $0x4,%edx
lea    0xefa(%rip),%rcx
lea    0xeeb(%rip),%rax
cmp    $0x0,%edx
cmovne %rax,%rcx
mov    -0x14(%rbp),%edx
and    $0x2,%edx
lea    0xee8(%rip),%r8
lea    0xee8(%rip),%rax
cmp    $0x0,%edx
cmovne %rax,%r8
mov    -0x14(%rbp),%edx
and    $0x1,%edx
lea    0xed8(%rip),%r9
lea    0xece(%rip),%rax
cmp    $0x0,%edx
cmovne %rax,%r9
lea    0xe78(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilk_debug_pp_control>:
test   $0x4,%cl
lea    0xf1d(%rip),%rdx
lea    0xf0e(%rip),%rax
cmove  %rdx,%rax
test   $0x2,%cl
lea    0xf11(%rip),%rdx
lea    0xf11(%rip),%r8
cmove  %rdx,%r8
test   $0x1,%cl
lea    0xf07(%rip),%rcx
lea    0xefd(%rip),%r9
cmove  %rcx,%r9
lea    0xeaa(%rip),%rdx
mov    %rax,%rcx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"blacklight %s, %spower down on reset, panel %s\00"
@.str.1 = [8 x i8] c"enabled\00"
@.str.2 = [9 x i8] c"disabled\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [8 x i8] c"do not \00"
@.str.5 = [3 x i8] c"on\00"
@.str.6 = [4 x i8] c"off\00"
define void @ilk_debug_pp_control(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %9
%14 = and i32 %13, 4
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)
%18 = load i32, i32* %9
%19 = and i32 %18, 2
%20 = icmp ne i32 %19, 0
%21 = zext i1 %20 to i64
%22 = select i1 %20, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0)
%23 = load i32, i32* %9
%24 = and i32 %23, 1
%25 = icmp ne i32 %24, 0
%26 = zext i1 %25 to i64
%27 = select i1 %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0)
%28 = call i32 @snprintf(i8* %11, i32 %12, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %17, i8* %22, i8* %27)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"blacklight %s, %spower down on reset, panel %s\00"
@.str.1 = [8 x i8] c"enabled\00"
@.str.2 = [9 x i8] c"disabled\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [8 x i8] c"do not \00"
@.str.5 = [3 x i8] c"on\00"
@.str.6 = [4 x i8] c"off\00"
define void @ilk_debug_pp_control(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = and i32 %3, 4
%7 = icmp eq i32 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
%9 = and i32 %3, 2
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%12 = and i32 %3, 1
%13 = icmp eq i32 %12, 0
%14 = select i1 %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%15 = tail call i32 @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %11, i8* %14)
ret void
}