#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*/ CE_High();
int /*<<< orphan*/ CE_Low();
unsigned char Get_Byte();
int /*<<< orphan*/ Send_Byte(int);
unsigned char HighSpeed_Read(unsigned long Dst) {
  unsigned char byte = 0;
  CE_Low();
  Send_Byte(0x0B);
  Send_Byte(((Dst & 0xFFFFFF) >> 16));
  Send_Byte(((Dst & 0xFFFF) >> 8));
  Send_Byte(Dst & 0xFF);
  Send_Byte(0xFF);
  byte = Get_Byte();
  CE_High();
  return byte;
}


x86 assembly (clang, -O0):
<HighSpeed_Read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
mov    $0x0,%al
call   1060 <CE_Low@plt>
mov    $0xb,%edi
call   1040 <Send_Byte@plt>
mov    -0x8(%rbp),%rax
and    $0xffffff,%rax
shr    $0x10,%rax
mov    %eax,%edi
call   1040 <Send_Byte@plt>
mov    -0x8(%rbp),%rax
and    $0xffff,%rax
shr    $0x8,%rax
mov    %eax,%edi
call   1040 <Send_Byte@plt>
mov    -0x8(%rbp),%rax
and    $0xff,%rax
mov    %eax,%edi
call   1040 <Send_Byte@plt>
mov    $0xff,%edi
call   1040 <Send_Byte@plt>
mov    $0x0,%al
call   1030 <Get_Byte@plt>
mov    %al,-0x9(%rbp)
mov    $0x0,%al
call   1050 <CE_High@plt>
movzbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HighSpeed_Read>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1060 <CE_Low@plt>
mov    $0xb,%edi
call   1040 <Send_Byte@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
call   1040 <Send_Byte@plt>
movzbl %bh,%edi
call   1040 <Send_Byte@plt>
movzbl %bl,%edi
call   1040 <Send_Byte@plt>
mov    $0xff,%edi
call   1040 <Send_Byte@plt>
xor    %eax,%eax
call   1030 <Get_Byte@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <CE_High@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @HighSpeed_Read(i64 %0) {
%2 = alloca i64
%3 = alloca i8
store i64 %0, i64* %2
store i8 0, i8* %3
%4 = call i32 (...) @CE_Low()
%5 = call i32 @Send_Byte(i32 11)
%6 = load i64, i64* %2
%7 = and i64 %6, 16777215
%8 = lshr i64 %7, 16
%9 = trunc i64 %8 to i32
%10 = call i32 @Send_Byte(i32 %9)
%11 = load i64, i64* %2
%12 = and i64 %11, 65535
%13 = lshr i64 %12, 8
%14 = trunc i64 %13 to i32
%15 = call i32 @Send_Byte(i32 %14)
%16 = load i64, i64* %2
%17 = and i64 %16, 255
%18 = trunc i64 %17 to i32
%19 = call i32 @Send_Byte(i32 %18)
%20 = call i32 @Send_Byte(i32 255)
%21 = call zeroext i8 (...) @Get_Byte()
store i8 %21, i8* %3
%22 = call i32 (...) @CE_High()
%23 = load i8, i8* %3
ret i8 %23
}

LLVM IR (-O2):
define zeroext i8 @HighSpeed_Read(i64 %0) {
%2 = tail call i32 (...) @CE_Low()
%3 = tail call i32 @Send_Byte(i32 11)
%4 = trunc i64 %0 to i32
%5 = lshr i32 %4, 16
%6 = and i32 %5, 255
%7 = tail call i32 @Send_Byte(i32 %6)
%8 = lshr i32 %4, 8
%9 = and i32 %8, 255
%10 = tail call i32 @Send_Byte(i32 %9)
%11 = and i32 %4, 255
%12 = tail call i32 @Send_Byte(i32 %11)
%13 = tail call i32 @Send_Byte(i32 255)
%14 = tail call zeroext i8 (...) @Get_Byte()
%15 = tail call i32 (...) @CE_High()
ret i8 %14
}