#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*/ TOSH_MAKE_EXTRA_LED_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_GREEN_LED_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_RED_LED_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_YELLOW_LED_OUTPUT();
int /*<<< orphan*/ TOSH_SET_EXTRA_LED_PIN();
int /*<<< orphan*/ TOSH_SET_GREEN_LED_PIN();
int /*<<< orphan*/ TOSH_SET_RED_LED_PIN();
int /*<<< orphan*/ TOSH_SET_YELLOW_LED_PIN();
int /*<<< orphan*/ outp_emulate(int, int);
void TOSH_SET_PIN_DIRECTIONS(void) {
  outp_emulate(0x00, 0x36);
  outp_emulate(0x00, 0x39);
  outp_emulate(0x00, 0x45);
  outp_emulate(0x02, 0x72);
  outp_emulate(0x02, 0x70);
  TOSH_MAKE_RED_LED_OUTPUT();
  TOSH_MAKE_YELLOW_LED_OUTPUT();
  TOSH_MAKE_GREEN_LED_OUTPUT();
  TOSH_MAKE_EXTRA_LED_OUTPUT();
  TOSH_SET_RED_LED_PIN();
  TOSH_SET_YELLOW_LED_PIN();
  TOSH_SET_GREEN_LED_PIN();
  TOSH_SET_EXTRA_LED_PIN();
}


x86 assembly (clang, -O0):
<TOSH_SET_PIN_DIRECTIONS>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x36,%esi
call   1030 <outp_emulate@plt>
xor    %edi,%edi
mov    $0x39,%esi
call   1030 <outp_emulate@plt>
xor    %edi,%edi
mov    $0x45,%esi
call   1030 <outp_emulate@plt>
mov    $0x2,%edi
mov    $0x72,%esi
call   1030 <outp_emulate@plt>
mov    $0x2,%edi
mov    $0x70,%esi
call   1030 <outp_emulate@plt>
mov    $0x0,%al
call   1040 <TOSH_MAKE_RED_LED_OUTPUT@plt>
mov    $0x0,%al
call   10b0 <TOSH_MAKE_YELLOW_LED_OUTPUT@plt>
mov    $0x0,%al
call   1090 <TOSH_MAKE_GREEN_LED_OUTPUT@plt>
mov    $0x0,%al
call   1060 <TOSH_MAKE_EXTRA_LED_OUTPUT@plt>
mov    $0x0,%al
call   1050 <TOSH_SET_RED_LED_PIN@plt>
mov    $0x0,%al
call   1080 <TOSH_SET_YELLOW_LED_PIN@plt>
mov    $0x0,%al
call   1070 <TOSH_SET_GREEN_LED_PIN@plt>
mov    $0x0,%al
call   10a0 <TOSH_SET_EXTRA_LED_PIN@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_SET_PIN_DIRECTIONS>:
push   %rax
xor    %edi,%edi
mov    $0x36,%esi
call   1030 <outp_emulate@plt>
xor    %edi,%edi
mov    $0x39,%esi
call   1030 <outp_emulate@plt>
xor    %edi,%edi
mov    $0x45,%esi
call   1030 <outp_emulate@plt>
mov    $0x2,%edi
mov    $0x72,%esi
call   1030 <outp_emulate@plt>
mov    $0x2,%edi
mov    $0x70,%esi
call   1030 <outp_emulate@plt>
xor    %eax,%eax
call   1040 <TOSH_MAKE_RED_LED_OUTPUT@plt>
xor    %eax,%eax
call   10b0 <TOSH_MAKE_YELLOW_LED_OUTPUT@plt>
xor    %eax,%eax
call   1090 <TOSH_MAKE_GREEN_LED_OUTPUT@plt>
xor    %eax,%eax
call   1060 <TOSH_MAKE_EXTRA_LED_OUTPUT@plt>
xor    %eax,%eax
call   1050 <TOSH_SET_RED_LED_PIN@plt>
xor    %eax,%eax
call   1080 <TOSH_SET_YELLOW_LED_PIN@plt>
xor    %eax,%eax
call   1070 <TOSH_SET_GREEN_LED_PIN@plt>
xor    %eax,%eax
pop    %rcx
jmp    10a0 <TOSH_SET_EXTRA_LED_PIN@plt>

LLVM IR (-O0):
define void @TOSH_SET_PIN_DIRECTIONS() {
%1 = call i32 @outp_emulate(i32 0, i32 54)
%2 = call i32 @outp_emulate(i32 0, i32 57)
%3 = call i32 @outp_emulate(i32 0, i32 69)
%4 = call i32 @outp_emulate(i32 2, i32 114)
%5 = call i32 @outp_emulate(i32 2, i32 112)
%6 = call i32 (...) @TOSH_MAKE_RED_LED_OUTPUT()
%7 = call i32 (...) @TOSH_MAKE_YELLOW_LED_OUTPUT()
%8 = call i32 (...) @TOSH_MAKE_GREEN_LED_OUTPUT()
%9 = call i32 (...) @TOSH_MAKE_EXTRA_LED_OUTPUT()
%10 = call i32 (...) @TOSH_SET_RED_LED_PIN()
%11 = call i32 (...) @TOSH_SET_YELLOW_LED_PIN()
%12 = call i32 (...) @TOSH_SET_GREEN_LED_PIN()
%13 = call i32 (...) @TOSH_SET_EXTRA_LED_PIN()
ret void
}

LLVM IR (-O2):
define void @TOSH_SET_PIN_DIRECTIONS() {
%1 = tail call i32 @outp_emulate(i32 0, i32 54)
%2 = tail call i32 @outp_emulate(i32 0, i32 57)
%3 = tail call i32 @outp_emulate(i32 0, i32 69)
%4 = tail call i32 @outp_emulate(i32 2, i32 114)
%5 = tail call i32 @outp_emulate(i32 2, i32 112)
%6 = tail call i32 (...) @TOSH_MAKE_RED_LED_OUTPUT()
%7 = tail call i32 (...) @TOSH_MAKE_YELLOW_LED_OUTPUT()
%8 = tail call i32 (...) @TOSH_MAKE_GREEN_LED_OUTPUT()
%9 = tail call i32 (...) @TOSH_MAKE_EXTRA_LED_OUTPUT()
%10 = tail call i32 (...) @TOSH_SET_RED_LED_PIN()
%11 = tail call i32 (...) @TOSH_SET_YELLOW_LED_PIN()
%12 = tail call i32 (...) @TOSH_SET_GREEN_LED_PIN()
%13 = tail call i32 (...) @TOSH_SET_EXTRA_LED_PIN()
ret void
}