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

/* Variables and functions */
int /*<<< orphan*/ instr_out(size_t *, size_t, int /*<<< orphan*/, char *,
                             char const *, char *, char *, size_t, size_t);
void decode_2d_br00(uint32_t *data, uint32_t count, uint32_t hw_offset,
                    const char *cmd) {
  instr_out(data, hw_offset, 0,
            "%s (rgb %sabled, alpha %sabled, src tile %d, dst tile %d)\n", cmd,
            (data[count] & (1 << 20)) ? "en" : "dis",
            (data[count] & (1 << 21)) ? "en" : "dis", (data[count] >> 15) & 1,
            (data[count] >> 11) & 1);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%r8
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
and    $0x100000,%rcx
lea    0xef0(%rip),%r9
lea    0xee6(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%r9
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
and    $0x200000,%rcx
lea    0xec7(%rip),%r11
lea    0xebd(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%r11
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%r10
shr    $0xf,%r10
and    $0x1,%r10
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
shr    $0xb,%rax
and    $0x1,%rax
xor    %edx,%edx
lea    0xe49(%rip),%rcx
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <instr_out@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
mov    (%rdi,%rsi,8),%rax
test   $0x100000,%eax
lea    0xf1d(%rip),%rsi
lea    0xf13(%rip),%r10
mov    %r10,%r9
cmove  %rsi,%r9
mov    %rcx,%r8
test   $0x200000,%eax
cmove  %rsi,%r10
mov    %eax,%r11d
shr    $0xf,%r11d
and    $0x1,%r11d
shr    $0xb,%eax
and    $0x1,%eax
sub    $0x8,%rsp
lea    0xea9(%rip),%rcx
mov    %rdx,%rsi
xor    %edx,%edx
push   %rax
push   %r11
push   %r10
call   1030 <instr_out@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [59 x i8] c"%s (rgb %sabled, alpha %sabled, src tile %d, dst tile %d)\0A\00"
@.str.1 = [3 x i8] c"en\00"
@.str.2 = [4 x i8] c"dis\00"
define void @decode_2d_br00(i64* %0, i64 %1, i64 %2, i8* %3) {
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8*
store i64* %0, i64** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%9 = load i64*, i64** %5
%10 = load i64, i64* %7
%11 = load i8*, i8** %8
%12 = load i64*, i64** %5
%13 = load i64, i64* %6
%14 = getelementptr inbounds i64, i64* %12, i64 %13
%15 = load i64, i64* %14
%16 = and i64 %15, 1048576
%17 = icmp ne i64 %16, 0
%18 = zext i1 %17 to i64
%19 = select i1 %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%20 = load i64*, i64** %5
%21 = load i64, i64* %6
%22 = getelementptr inbounds i64, i64* %20, i64 %21
%23 = load i64, i64* %22
%24 = and i64 %23, 2097152
%25 = icmp ne i64 %24, 0
%26 = zext i1 %25 to i64
%27 = select i1 %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%28 = load i64*, i64** %5
%29 = load i64, i64* %6
%30 = getelementptr inbounds i64, i64* %28, i64 %29
%31 = load i64, i64* %30
%32 = lshr i64 %31, 15
%33 = and i64 %32, 1
%34 = load i64*, i64** %5
%35 = load i64, i64* %6
%36 = getelementptr inbounds i64, i64* %34, i64 %35
%37 = load i64, i64* %36
%38 = lshr i64 %37, 11
%39 = and i64 %38, 1
%40 = call i32 @instr_out(i64* %9, i64 %10, i32 0, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %19, i8* %27, i64 %33, i64 %39)
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"%s (rgb %sabled, alpha %sabled, src tile %d, dst tile %d)\0A\00"
@.str.1 = [3 x i8] c"en\00"
@.str.2 = [4 x i8] c"dis\00"
define void @decode_2d_br00(i64* %0, i64 %1, i64 %2, i8* %3) {
%5 = getelementptr inbounds i64, i64* %0, i64 %1
%6 = load i64, i64* %5
%7 = and i64 %6, 1048576
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%10 = and i64 %6, 2097152
%11 = icmp eq i64 %10, 0
%12 = select i1 %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%13 = lshr i64 %6, 15
%14 = and i64 %13, 1
%15 = lshr i64 %6, 11
%16 = and i64 %15, 1
%17 = tail call i32 @instr_out(i64* %0, i64 %2, i32 0, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %9, i8* %12, i64 %14, i64 %16)
ret void
}