#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*/ Draco9210ClearCS();
int /*<<< orphan*/ Draco9210ClearDataOut();
int /*<<< orphan*/ Draco9210SetCS();
int /*<<< orphan*/ Draco9210SetDataOut();
int /*<<< orphan*/ Draco9210ToggleClock();
int /*<<< orphan*/ DracoWriteData(unsigned char);
void Draco9210WriteReg(unsigned char index, unsigned char data) {
  Draco9210SetCS();
  Draco9210ToggleClock();
  Draco9210SetDataOut();
  Draco9210ToggleClock();
  Draco9210ClearDataOut();
  Draco9210ToggleClock();
  Draco9210ClearDataOut();
  Draco9210ToggleClock();
  Draco9210SetDataOut();
  Draco9210ToggleClock();
  DracoWriteData(index);
  DracoWriteData(data);
  Draco9210ClearDataOut();
  Draco9210ToggleClock();
  Draco9210ClearCS();
  Draco9210ToggleClock();
  Draco9210ToggleClock();
}


x86 assembly (clang, -O0):
<Draco9210WriteReg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    $0x0,%al
call   1050 <Draco9210SetCS@plt>
mov    $0x0,%al
call   1060 <Draco9210ToggleClock@plt>
mov    $0x0,%al
call   1040 <Draco9210SetDataOut@plt>
mov    $0x0,%al
call   1060 <Draco9210ToggleClock@plt>
mov    $0x0,%al
call   1070 <Draco9210ClearDataOut@plt>
mov    $0x0,%al
call   1060 <Draco9210ToggleClock@plt>
mov    $0x0,%al
call   1070 <Draco9210ClearDataOut@plt>
mov    $0x0,%al
call   1060 <Draco9210ToggleClock@plt>
mov    $0x0,%al
call   1040 <Draco9210SetDataOut@plt>
mov    $0x0,%al
call   1060 <Draco9210ToggleClock@plt>
movzbl -0x1(%rbp),%edi
call   1080 <DracoWriteData@plt>
movzbl -0x2(%rbp),%edi
call   1080 <DracoWriteData@plt>
mov    $0x0,%al
call   1070 <Draco9210ClearDataOut@plt>
mov    $0x0,%al
call   1060 <Draco9210ToggleClock@plt>
mov    $0x0,%al
call   1030 <Draco9210ClearCS@plt>
mov    $0x0,%al
call   1060 <Draco9210ToggleClock@plt>
mov    $0x0,%al
call   1060 <Draco9210ToggleClock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Draco9210WriteReg>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <Draco9210SetCS@plt>
xor    %eax,%eax
call   1060 <Draco9210ToggleClock@plt>
xor    %eax,%eax
call   1040 <Draco9210SetDataOut@plt>
xor    %eax,%eax
call   1060 <Draco9210ToggleClock@plt>
xor    %eax,%eax
call   1070 <Draco9210ClearDataOut@plt>
xor    %eax,%eax
call   1060 <Draco9210ToggleClock@plt>
xor    %eax,%eax
call   1070 <Draco9210ClearDataOut@plt>
xor    %eax,%eax
call   1060 <Draco9210ToggleClock@plt>
xor    %eax,%eax
call   1040 <Draco9210SetDataOut@plt>
xor    %eax,%eax
call   1060 <Draco9210ToggleClock@plt>
mov    %ebp,%edi
call   1080 <DracoWriteData@plt>
mov    %ebx,%edi
call   1080 <DracoWriteData@plt>
xor    %eax,%eax
call   1070 <Draco9210ClearDataOut@plt>
xor    %eax,%eax
call   1060 <Draco9210ToggleClock@plt>
xor    %eax,%eax
call   1030 <Draco9210ClearCS@plt>
xor    %eax,%eax
call   1060 <Draco9210ToggleClock@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <Draco9210ToggleClock@plt>

LLVM IR (-O0):
define void @Draco9210WriteReg(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call i32 (...) @Draco9210SetCS()
%6 = call i32 (...) @Draco9210ToggleClock()
%7 = call i32 (...) @Draco9210SetDataOut()
%8 = call i32 (...) @Draco9210ToggleClock()
%9 = call i32 (...) @Draco9210ClearDataOut()
%10 = call i32 (...) @Draco9210ToggleClock()
%11 = call i32 (...) @Draco9210ClearDataOut()
%12 = call i32 (...) @Draco9210ToggleClock()
%13 = call i32 (...) @Draco9210SetDataOut()
%14 = call i32 (...) @Draco9210ToggleClock()
%15 = load i8, i8* %3
%16 = call i32 @DracoWriteData(i8 zeroext %15)
%17 = load i8, i8* %4
%18 = call i32 @DracoWriteData(i8 zeroext %17)
%19 = call i32 (...) @Draco9210ClearDataOut()
%20 = call i32 (...) @Draco9210ToggleClock()
%21 = call i32 (...) @Draco9210ClearCS()
%22 = call i32 (...) @Draco9210ToggleClock()
%23 = call i32 (...) @Draco9210ToggleClock()
ret void
}

LLVM IR (-O2):
define void @Draco9210WriteReg(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i32 (...) @Draco9210SetCS()
%4 = tail call i32 (...) @Draco9210ToggleClock()
%5 = tail call i32 (...) @Draco9210SetDataOut()
%6 = tail call i32 (...) @Draco9210ToggleClock()
%7 = tail call i32 (...) @Draco9210ClearDataOut()
%8 = tail call i32 (...) @Draco9210ToggleClock()
%9 = tail call i32 (...) @Draco9210ClearDataOut()
%10 = tail call i32 (...) @Draco9210ToggleClock()
%11 = tail call i32 (...) @Draco9210SetDataOut()
%12 = tail call i32 (...) @Draco9210ToggleClock()
%13 = tail call i32 @DracoWriteData(i8 zeroext %0)
%14 = tail call i32 @DracoWriteData(i8 zeroext %1)
%15 = tail call i32 (...) @Draco9210ClearDataOut()
%16 = tail call i32 (...) @Draco9210ToggleClock()
%17 = tail call i32 (...) @Draco9210ClearCS()
%18 = tail call i32 (...) @Draco9210ToggleClock()
%19 = tail call i32 (...) @Draco9210ToggleClock()
ret void
}