#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_BOOST_ENABLE_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_FLASH_CLK_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_FLASH_OUT_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_FLASH_SELECT_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_GREEN_LED_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_ONE_WIRE_INPUT();
int /*<<< orphan*/ TOSH_MAKE_POT_POWER_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_POT_SELECT_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_PW0_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_PW1_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_PW2_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_PW3_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_PW4_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_PW5_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_PW6_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_PW7_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_RED_LED_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_RFM_CTL0_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_RFM_CTL1_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_RFM_TXD_OUTPUT();
int /*<<< orphan*/ TOSH_MAKE_YELLOW_LED_OUTPUT();
int /*<<< orphan*/ TOSH_SET_BOOST_ENABLE_PIN();
int /*<<< orphan*/ TOSH_SET_FLASH_SELECT_PIN();
int /*<<< orphan*/ TOSH_SET_GREEN_LED_PIN();
int /*<<< orphan*/ TOSH_SET_ONE_WIRE_PIN();
int /*<<< orphan*/ TOSH_SET_POT_POWER_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_POT_SELECT_OUTPUT();
  TOSH_MAKE_POT_POWER_OUTPUT();
  TOSH_MAKE_PW7_OUTPUT();
  TOSH_MAKE_PW6_OUTPUT();
  TOSH_MAKE_PW5_OUTPUT();
  TOSH_MAKE_PW4_OUTPUT();
  TOSH_MAKE_PW3_OUTPUT();
  TOSH_MAKE_PW2_OUTPUT();
  TOSH_MAKE_PW1_OUTPUT();
  TOSH_MAKE_PW0_OUTPUT();
  TOSH_MAKE_RFM_CTL0_OUTPUT();
  TOSH_MAKE_RFM_CTL1_OUTPUT();
  TOSH_MAKE_RFM_TXD_OUTPUT();
  TOSH_SET_POT_POWER_PIN();
  TOSH_MAKE_FLASH_SELECT_OUTPUT();
  TOSH_MAKE_FLASH_OUT_OUTPUT();
  TOSH_MAKE_FLASH_CLK_OUTPUT();
  TOSH_SET_FLASH_SELECT_PIN();
  TOSH_SET_RED_LED_PIN();
  TOSH_SET_YELLOW_LED_PIN();
  TOSH_SET_GREEN_LED_PIN();
  TOSH_MAKE_BOOST_ENABLE_OUTPUT();
  TOSH_SET_BOOST_ENABLE_PIN();
  TOSH_MAKE_ONE_WIRE_INPUT();
  TOSH_SET_ONE_WIRE_PIN();
}


x86 assembly (clang, -O0):
<TOSH_SET_PIN_DIRECTIONS>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x36,%esi
call   1060 <outp_emulate@plt>
xor    %edi,%edi
mov    $0x39,%esi
call   1060 <outp_emulate@plt>
xor    %edi,%edi
mov    $0x45,%esi
call   1060 <outp_emulate@plt>
mov    $0x2,%edi
mov    $0x72,%esi
call   1060 <outp_emulate@plt>
mov    $0x2,%edi
mov    $0x70,%esi
call   1060 <outp_emulate@plt>
mov    $0x0,%al
call   1070 <TOSH_MAKE_RED_LED_OUTPUT@plt>
mov    $0x0,%al
call   11e0 <TOSH_MAKE_YELLOW_LED_OUTPUT@plt>
mov    $0x0,%al
call   11b0 <TOSH_MAKE_GREEN_LED_OUTPUT@plt>
mov    $0x0,%al
call   11c0 <TOSH_MAKE_POT_SELECT_OUTPUT@plt>
mov    $0x0,%al
call   1110 <TOSH_MAKE_POT_POWER_OUTPUT@plt>
mov    $0x0,%al
call   1130 <TOSH_MAKE_PW7_OUTPUT@plt>
mov    $0x0,%al
call   1080 <TOSH_MAKE_PW6_OUTPUT@plt>
mov    $0x0,%al
call   1150 <TOSH_MAKE_PW5_OUTPUT@plt>
mov    $0x0,%al
call   1100 <TOSH_MAKE_PW4_OUTPUT@plt>
mov    $0x0,%al
call   1040 <TOSH_MAKE_PW3_OUTPUT@plt>
mov    $0x0,%al
call   10b0 <TOSH_MAKE_PW2_OUTPUT@plt>
mov    $0x0,%al
call   10c0 <TOSH_MAKE_PW1_OUTPUT@plt>
mov    $0x0,%al
call   11f0 <TOSH_MAKE_PW0_OUTPUT@plt>
mov    $0x0,%al
call   10a0 <TOSH_MAKE_RFM_CTL0_OUTPUT@plt>
mov    $0x0,%al
call   1170 <TOSH_MAKE_RFM_CTL1_OUTPUT@plt>
mov    $0x0,%al
call   10f0 <TOSH_MAKE_RFM_TXD_OUTPUT@plt>
mov    $0x0,%al
call   1140 <TOSH_SET_POT_POWER_PIN@plt>
mov    $0x0,%al
call   10e0 <TOSH_MAKE_FLASH_SELECT_OUTPUT@plt>
mov    $0x0,%al
call   1120 <TOSH_MAKE_FLASH_OUT_OUTPUT@plt>
mov    $0x0,%al
call   1030 <TOSH_MAKE_FLASH_CLK_OUTPUT@plt>
mov    $0x0,%al
call   1180 <TOSH_SET_FLASH_SELECT_PIN@plt>
mov    $0x0,%al
call   1090 <TOSH_SET_RED_LED_PIN@plt>
mov    $0x0,%al
call   11a0 <TOSH_SET_YELLOW_LED_PIN@plt>
mov    $0x0,%al
call   1190 <TOSH_SET_GREEN_LED_PIN@plt>
mov    $0x0,%al
call   11d0 <TOSH_MAKE_BOOST_ENABLE_OUTPUT@plt>
mov    $0x0,%al
call   10d0 <TOSH_SET_BOOST_ENABLE_PIN@plt>
mov    $0x0,%al
call   1160 <TOSH_MAKE_ONE_WIRE_INPUT@plt>
mov    $0x0,%al
call   1050 <TOSH_SET_ONE_WIRE_PIN@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_SET_PIN_DIRECTIONS>:
push   %rax
xor    %edi,%edi
mov    $0x36,%esi
call   1060 <outp_emulate@plt>
xor    %edi,%edi
mov    $0x39,%esi
call   1060 <outp_emulate@plt>
xor    %edi,%edi
mov    $0x45,%esi
call   1060 <outp_emulate@plt>
mov    $0x2,%edi
mov    $0x72,%esi
call   1060 <outp_emulate@plt>
mov    $0x2,%edi
mov    $0x70,%esi
call   1060 <outp_emulate@plt>
xor    %eax,%eax
call   1070 <TOSH_MAKE_RED_LED_OUTPUT@plt>
xor    %eax,%eax
call   11e0 <TOSH_MAKE_YELLOW_LED_OUTPUT@plt>
xor    %eax,%eax
call   11b0 <TOSH_MAKE_GREEN_LED_OUTPUT@plt>
xor    %eax,%eax
call   11c0 <TOSH_MAKE_POT_SELECT_OUTPUT@plt>
xor    %eax,%eax
call   1110 <TOSH_MAKE_POT_POWER_OUTPUT@plt>
xor    %eax,%eax
call   1130 <TOSH_MAKE_PW7_OUTPUT@plt>
xor    %eax,%eax
call   1080 <TOSH_MAKE_PW6_OUTPUT@plt>
xor    %eax,%eax
call   1150 <TOSH_MAKE_PW5_OUTPUT@plt>
xor    %eax,%eax
call   1100 <TOSH_MAKE_PW4_OUTPUT@plt>
xor    %eax,%eax
call   1040 <TOSH_MAKE_PW3_OUTPUT@plt>
xor    %eax,%eax
call   10b0 <TOSH_MAKE_PW2_OUTPUT@plt>
xor    %eax,%eax
call   10c0 <TOSH_MAKE_PW1_OUTPUT@plt>
xor    %eax,%eax
call   11f0 <TOSH_MAKE_PW0_OUTPUT@plt>
xor    %eax,%eax
call   10a0 <TOSH_MAKE_RFM_CTL0_OUTPUT@plt>
xor    %eax,%eax
call   1170 <TOSH_MAKE_RFM_CTL1_OUTPUT@plt>
xor    %eax,%eax
call   10f0 <TOSH_MAKE_RFM_TXD_OUTPUT@plt>
xor    %eax,%eax
call   1140 <TOSH_SET_POT_POWER_PIN@plt>
xor    %eax,%eax
call   10e0 <TOSH_MAKE_FLASH_SELECT_OUTPUT@plt>
xor    %eax,%eax
call   1120 <TOSH_MAKE_FLASH_OUT_OUTPUT@plt>
xor    %eax,%eax
call   1030 <TOSH_MAKE_FLASH_CLK_OUTPUT@plt>
xor    %eax,%eax
call   1180 <TOSH_SET_FLASH_SELECT_PIN@plt>
xor    %eax,%eax
call   1090 <TOSH_SET_RED_LED_PIN@plt>
xor    %eax,%eax
call   11a0 <TOSH_SET_YELLOW_LED_PIN@plt>
xor    %eax,%eax
call   1190 <TOSH_SET_GREEN_LED_PIN@plt>
xor    %eax,%eax
call   11d0 <TOSH_MAKE_BOOST_ENABLE_OUTPUT@plt>
xor    %eax,%eax
call   10d0 <TOSH_SET_BOOST_ENABLE_PIN@plt>
xor    %eax,%eax
call   1160 <TOSH_MAKE_ONE_WIRE_INPUT@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <TOSH_SET_ONE_WIRE_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_POT_SELECT_OUTPUT()
%10 = call i32 (...) @TOSH_MAKE_POT_POWER_OUTPUT()
%11 = call i32 (...) @TOSH_MAKE_PW7_OUTPUT()
%12 = call i32 (...) @TOSH_MAKE_PW6_OUTPUT()
%13 = call i32 (...) @TOSH_MAKE_PW5_OUTPUT()
%14 = call i32 (...) @TOSH_MAKE_PW4_OUTPUT()
%15 = call i32 (...) @TOSH_MAKE_PW3_OUTPUT()
%16 = call i32 (...) @TOSH_MAKE_PW2_OUTPUT()
%17 = call i32 (...) @TOSH_MAKE_PW1_OUTPUT()
%18 = call i32 (...) @TOSH_MAKE_PW0_OUTPUT()
%19 = call i32 (...) @TOSH_MAKE_RFM_CTL0_OUTPUT()
%20 = call i32 (...) @TOSH_MAKE_RFM_CTL1_OUTPUT()
%21 = call i32 (...) @TOSH_MAKE_RFM_TXD_OUTPUT()
%22 = call i32 (...) @TOSH_SET_POT_POWER_PIN()
%23 = call i32 (...) @TOSH_MAKE_FLASH_SELECT_OUTPUT()
%24 = call i32 (...) @TOSH_MAKE_FLASH_OUT_OUTPUT()
%25 = call i32 (...) @TOSH_MAKE_FLASH_CLK_OUTPUT()
%26 = call i32 (...) @TOSH_SET_FLASH_SELECT_PIN()
%27 = call i32 (...) @TOSH_SET_RED_LED_PIN()
%28 = call i32 (...) @TOSH_SET_YELLOW_LED_PIN()
%29 = call i32 (...) @TOSH_SET_GREEN_LED_PIN()
%30 = call i32 (...) @TOSH_MAKE_BOOST_ENABLE_OUTPUT()
%31 = call i32 (...) @TOSH_SET_BOOST_ENABLE_PIN()
%32 = call i32 (...) @TOSH_MAKE_ONE_WIRE_INPUT()
%33 = call i32 (...) @TOSH_SET_ONE_WIRE_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_POT_SELECT_OUTPUT()
%10 = tail call i32 (...) @TOSH_MAKE_POT_POWER_OUTPUT()
%11 = tail call i32 (...) @TOSH_MAKE_PW7_OUTPUT()
%12 = tail call i32 (...) @TOSH_MAKE_PW6_OUTPUT()
%13 = tail call i32 (...) @TOSH_MAKE_PW5_OUTPUT()
%14 = tail call i32 (...) @TOSH_MAKE_PW4_OUTPUT()
%15 = tail call i32 (...) @TOSH_MAKE_PW3_OUTPUT()
%16 = tail call i32 (...) @TOSH_MAKE_PW2_OUTPUT()
%17 = tail call i32 (...) @TOSH_MAKE_PW1_OUTPUT()
%18 = tail call i32 (...) @TOSH_MAKE_PW0_OUTPUT()
%19 = tail call i32 (...) @TOSH_MAKE_RFM_CTL0_OUTPUT()
%20 = tail call i32 (...) @TOSH_MAKE_RFM_CTL1_OUTPUT()
%21 = tail call i32 (...) @TOSH_MAKE_RFM_TXD_OUTPUT()
%22 = tail call i32 (...) @TOSH_SET_POT_POWER_PIN()
%23 = tail call i32 (...) @TOSH_MAKE_FLASH_SELECT_OUTPUT()
%24 = tail call i32 (...) @TOSH_MAKE_FLASH_OUT_OUTPUT()
%25 = tail call i32 (...) @TOSH_MAKE_FLASH_CLK_OUTPUT()
%26 = tail call i32 (...) @TOSH_SET_FLASH_SELECT_PIN()
%27 = tail call i32 (...) @TOSH_SET_RED_LED_PIN()
%28 = tail call i32 (...) @TOSH_SET_YELLOW_LED_PIN()
%29 = tail call i32 (...) @TOSH_SET_GREEN_LED_PIN()
%30 = tail call i32 (...) @TOSH_MAKE_BOOST_ENABLE_OUTPUT()
%31 = tail call i32 (...) @TOSH_SET_BOOST_ENABLE_PIN()
%32 = tail call i32 (...) @TOSH_MAKE_ONE_WIRE_INPUT()
%33 = tail call i32 (...) @TOSH_SET_ONE_WIRE_PIN()
ret void
}