#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*/ sleep(int);
void power_board() {
  (*(volatile unsigned char *)(0xffffb3)) |= (1 << 4);
  (*(volatile unsigned char *)(0xffffb7)) |= (1 << 0) | (1 << 4) | (1 << 3);
  (*(volatile unsigned char *)(0xffffc1)) |= (1 << 5);
  sleep(2);
  (*(volatile unsigned char *)(0xffffc1)) &= ~(1 << 5);
  sleep(2);
  (*(volatile unsigned char *)(0xffffc1)) |= (1 << 5);
}


x86 assembly (clang, -O0):
<power_board>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffb3,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x10,%eax
mov    %al,%cl
mov    $0xffffb3,%eax
mov    %cl,(%rax)
mov    $0xffffb7,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x19,%eax
mov    %al,%cl
mov    $0xffffb7,%eax
mov    %cl,(%rax)
mov    $0xffffc1,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x20,%eax
mov    %al,%cl
mov    $0xffffc1,%eax
mov    %cl,(%rax)
mov    $0x2,%edi
call   1030 <sleep@plt>
mov    $0xffffc1,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0xffffffdf,%eax
mov    %al,%cl
mov    $0xffffc1,%eax
mov    %cl,(%rax)
mov    $0x2,%edi
call   1030 <sleep@plt>
mov    $0xffffc1,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x20,%eax
mov    %al,%cl
mov    $0xffffc1,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<power_board>:
push   %rax
orb    $0x10,0xffffb3
10
orb    $0x19,0xffffb7
19
orb    $0x20,0xffffc1
20
mov    $0x2,%edi
call   1030 <sleep@plt>
andb   $0xdf,0xffffc1
df
mov    $0x2,%edi
call   1030 <sleep@plt>
orb    $0x20,0xffffc1
20
pop    %rax
ret

LLVM IR (-O0):
define void @power_board() {
%1 = load volatile i8, i8* inttoptr (i64 16777139 to i8*)
%2 = zext i8 %1 to i32
%3 = or i32 %2, 16
%4 = trunc i32 %3 to i8
store volatile i8 %4, i8* inttoptr (i64 16777139 to i8*)
%5 = load volatile i8, i8* inttoptr (i64 16777143 to i8*)
%6 = zext i8 %5 to i32
%7 = or i32 %6, 25
%8 = trunc i32 %7 to i8
store volatile i8 %8, i8* inttoptr (i64 16777143 to i8*)
%9 = load volatile i8, i8* inttoptr (i64 16777153 to i8*)
%10 = zext i8 %9 to i32
%11 = or i32 %10, 32
%12 = trunc i32 %11 to i8
store volatile i8 %12, i8* inttoptr (i64 16777153 to i8*)
%13 = call i32 @sleep(i32 2)
%14 = load volatile i8, i8* inttoptr (i64 16777153 to i8*)
%15 = zext i8 %14 to i32
%16 = and i32 %15, -33
%17 = trunc i32 %16 to i8
store volatile i8 %17, i8* inttoptr (i64 16777153 to i8*)
%18 = call i32 @sleep(i32 2)
%19 = load volatile i8, i8* inttoptr (i64 16777153 to i8*)
%20 = zext i8 %19 to i32
%21 = or i32 %20, 32
%22 = trunc i32 %21 to i8
store volatile i8 %22, i8* inttoptr (i64 16777153 to i8*)
ret void
}

LLVM IR (-O2):
define void @power_board() {
%1 = load volatile i8, i8* inttoptr (i64 16777139 to i8*)
%2 = or i8 %1, 16
store volatile i8 %2, i8* inttoptr (i64 16777139 to i8*)
%3 = load volatile i8, i8* inttoptr (i64 16777143 to i8*)
%4 = or i8 %3, 25
store volatile i8 %4, i8* inttoptr (i64 16777143 to i8*)
%5 = load volatile i8, i8* inttoptr (i64 16777153 to i8*)
%6 = or i8 %5, 32
store volatile i8 %6, i8* inttoptr (i64 16777153 to i8*)
%7 = tail call i32 @sleep(i32 2)
%8 = load volatile i8, i8* inttoptr (i64 16777153 to i8*)
%9 = and i8 %8, -33
store volatile i8 %9, i8* inttoptr (i64 16777153 to i8*)
%10 = tail call i32 @sleep(i32 2)
%11 = load volatile i8, i8* inttoptr (i64 16777153 to i8*)
%12 = or i8 %11, 32
store volatile i8 %12, i8* inttoptr (i64 16777153 to i8*)
ret void
}