#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*/ keyboard_clearBuffer();
unsigned char keyboard_getData();
int /*<<< orphan*/ keyboard_sendCommand(int);
int /*<<< orphan*/ keyboard_sendData(unsigned char);
void keyboard_enableCompaqAux() {
  unsigned char compaq_status;
  keyboard_clearBuffer();
  keyboard_sendCommand(0x20);
  compaq_status = keyboard_getData();
  keyboard_clearBuffer();
  compaq_status |= 0x02;
  compaq_status |= 0x20;
  keyboard_sendCommand(0x60);
  keyboard_sendData(compaq_status);
  keyboard_clearBuffer();
  keyboard_sendCommand(0xA8);
  keyboard_getData();
}


x86 assembly (clang, -O0):
<keyboard_enableCompaqAux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <keyboard_clearBuffer@plt>
mov    $0x20,%edi
call   1050 <keyboard_sendCommand@plt>
mov    $0x0,%al
call   1030 <keyboard_getData@plt>
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1060 <keyboard_clearBuffer@plt>
movzbl -0x1(%rbp),%eax
or     $0x2,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
or     $0x20,%eax
mov    %al,-0x1(%rbp)
mov    $0x60,%edi
call   1050 <keyboard_sendCommand@plt>
movzbl -0x1(%rbp),%edi
call   1040 <keyboard_sendData@plt>
mov    $0x0,%al
call   1060 <keyboard_clearBuffer@plt>
mov    $0xa8,%edi
call   1050 <keyboard_sendCommand@plt>
mov    $0x0,%al
call   1030 <keyboard_getData@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyboard_enableCompaqAux>:
push   %rbx
xor    %eax,%eax
call   1060 <keyboard_clearBuffer@plt>
mov    $0x20,%edi
call   1050 <keyboard_sendCommand@plt>
xor    %eax,%eax
call   1030 <keyboard_getData@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1060 <keyboard_clearBuffer@plt>
or     $0x22,%bl
mov    $0x60,%edi
call   1050 <keyboard_sendCommand@plt>
movzbl %bl,%edi
call   1040 <keyboard_sendData@plt>
xor    %eax,%eax
call   1060 <keyboard_clearBuffer@plt>
mov    $0xa8,%edi
call   1050 <keyboard_sendCommand@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <keyboard_getData@plt>

LLVM IR (-O0):
define void @keyboard_enableCompaqAux() {
%1 = alloca i8
%2 = call i32 (...) @keyboard_clearBuffer()
%3 = call i32 @keyboard_sendCommand(i32 32)
%4 = call zeroext i8 (...) @keyboard_getData()
store i8 %4, i8* %1
%5 = call i32 (...) @keyboard_clearBuffer()
%6 = load i8, i8* %1
%7 = zext i8 %6 to i32
%8 = or i32 %7, 2
%9 = trunc i32 %8 to i8
store i8 %9, i8* %1
%10 = load i8, i8* %1
%11 = zext i8 %10 to i32
%12 = or i32 %11, 32
%13 = trunc i32 %12 to i8
store i8 %13, i8* %1
%14 = call i32 @keyboard_sendCommand(i32 96)
%15 = load i8, i8* %1
%16 = call i32 @keyboard_sendData(i8 zeroext %15)
%17 = call i32 (...) @keyboard_clearBuffer()
%18 = call i32 @keyboard_sendCommand(i32 168)
%19 = call zeroext i8 (...) @keyboard_getData()
ret void
}

LLVM IR (-O2):
define void @keyboard_enableCompaqAux() {
%1 = tail call i32 (...) @keyboard_clearBuffer()
%2 = tail call i32 @keyboard_sendCommand(i32 32)
%3 = tail call zeroext i8 (...) @keyboard_getData()
%4 = tail call i32 (...) @keyboard_clearBuffer()
%5 = or i8 %3, 34
%6 = tail call i32 @keyboard_sendCommand(i32 96)
%7 = tail call i32 @keyboard_sendData(i8 zeroext %5)
%8 = tail call i32 (...) @keyboard_clearBuffer()
%9 = tail call i32 @keyboard_sendCommand(i32 168)
%10 = tail call zeroext i8 (...) @keyboard_getData()
ret void
}