#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 */
int /*<<< orphan*/ ReadBlockHDMITX_CAT(int, int, unsigned char *);
int /*<<< orphan*/ WriteBlockHDMITX_CAT(int, int, unsigned char *);
void CAT_Enable_Interrupt_Masks(unsigned char *data) {
  unsigned char temp[3];
  ReadBlockHDMITX_CAT(0x09, 3, temp);
  temp[0] &= ~data[0];
  temp[1] &= ~data[1];
  temp[2] &= ~data[2];
  WriteBlockHDMITX_CAT(0x09, 3, temp);
}


x86 assembly (clang, -O0):
<CAT_Enable_Interrupt_Masks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xb(%rbp),%rdx
mov    $0x9,%edi
mov    $0x3,%esi
call   1030 <ReadBlockHDMITX_CAT@plt>
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
xor    $0xffffffff,%ecx
movzbl -0xb(%rbp),%eax
and    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
xor    $0xffffffff,%ecx
movzbl -0xa(%rbp),%eax
and    %ecx,%eax
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%ecx
xor    $0xffffffff,%ecx
movzbl -0x9(%rbp),%eax
and    %ecx,%eax
mov    %al,-0x9(%rbp)
lea    -0xb(%rbp),%rdx
mov    $0x9,%edi
mov    $0x3,%esi
call   1040 <WriteBlockHDMITX_CAT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CAT_Enable_Interrupt_Masks>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x5(%rsp),%r14
mov    $0x9,%edi
mov    $0x3,%esi
mov    %r14,%rdx
call   1030 <ReadBlockHDMITX_CAT@plt>
mov    (%rbx),%al
not    %al
and    %al,0x5(%rsp)
mov    0x1(%rbx),%al
not    %al
and    %al,0x6(%rsp)
mov    0x2(%rbx),%al
not    %al
and    %al,0x7(%rsp)
mov    $0x9,%edi
mov    $0x3,%esi
mov    %r14,%rdx
call   1040 <WriteBlockHDMITX_CAT@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @CAT_Enable_Interrupt_Masks(i8* %0) {
%2 = alloca i8*
%3 = alloca [3 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%5 = call i32 @ReadBlockHDMITX_CAT(i32 9, i32 3, i8* %4)
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = xor i32 %9, -1
%11 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = and i32 %13, %10
%15 = trunc i32 %14 to i8
store i8 %15, i8* %11
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = xor i32 %19, -1
%21 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 1
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = and i32 %23, %20
%25 = trunc i32 %24 to i8
store i8 %25, i8* %21
%26 = load i8*, i8** %2
%27 = getelementptr inbounds i8, i8* %26, i64 2
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 2
%32 = load i8, i8* %31
%33 = zext i8 %32 to i32
%34 = and i32 %33, %30
%35 = trunc i32 %34 to i8
store i8 %35, i8* %31
%36 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%37 = call i32 @WriteBlockHDMITX_CAT(i32 9, i32 3, i8* %36)
ret void
}

LLVM IR (-O2):
define void @CAT_Enable_Interrupt_Masks(i8* nocapture %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = call i32 @ReadBlockHDMITX_CAT(i32 9, i32 3, i8* %3)
%5 = load i8, i8* %0
%6 = xor i8 %5, -1
%7 = load i8, i8* %3
%8 = and i8 %7, %6
store i8 %8, i8* %3
%9 = getelementptr inbounds i8, i8* %0, i64 1
%10 = load i8, i8* %9
%11 = xor i8 %10, -1
%12 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 1
%13 = load i8, i8* %12
%14 = and i8 %13, %11
store i8 %14, i8* %12
%15 = getelementptr inbounds i8, i8* %0, i64 2
%16 = load i8, i8* %15
%17 = xor i8 %16, -1
%18 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 2
%19 = load i8, i8* %18
%20 = and i8 %19, %17
store i8 %20, i8* %18
%21 = call i32 @WriteBlockHDMITX_CAT(i32 9, i32 3, i8* %3)
ret void
}