#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*/ delay(int);
void send_instruction(long instruction) {
  delay(100);
  (*((volatile unsigned long *)0xE002801C)) = 0x01000000;
  delay(100);
  (*((volatile unsigned long *)0xE0028014)) = 0x02000000;
  delay(100);
  (*((volatile unsigned long *)0xE002801C)) = 0x00FF0000;
  delay(100);
  (*((volatile unsigned long *)0xE0028014)) = instruction << 16;
  delay(100);
  (*((volatile unsigned long *)0xE002801C)) = 0x02000000;
}


x86 assembly (clang, -O0):
<send_instruction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0xe002801c,%eax
movq   $0x1000000,(%rax)
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0xe0028014,%eax
movq   $0x2000000,(%rax)
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0xe002801c,%eax
movq   $0xff0000,(%rax)
mov    $0x64,%edi
call   1030 <delay@plt>
mov    -0x8(%rbp),%rcx
shl    $0x10,%rcx
mov    $0xe0028014,%eax
mov    %rcx,(%rax)
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0xe002801c,%eax
movq   $0x2000000,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_instruction>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0xe002801c,%r14d
movq   $0x1000000,(%r14)
mov    $0x64,%edi
call   1030 <delay@plt>
movq   $0x2000000,-0x8(%r14)
02
mov    $0x64,%edi
call   1030 <delay@plt>
movq   $0xff0000,(%r14)
mov    $0x64,%edi
call   1030 <delay@plt>
shl    $0x10,%rbx
mov    %rbx,-0x8(%r14)
mov    $0x64,%edi
call   1030 <delay@plt>
movq   $0x2000000,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @send_instruction(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @delay(i32 100)
store volatile i64 16777216, i64* inttoptr (i64 3758260252 to i64*)
%4 = call i32 @delay(i32 100)
store volatile i64 33554432, i64* inttoptr (i64 3758260244 to i64*)
%5 = call i32 @delay(i32 100)
store volatile i64 16711680, i64* inttoptr (i64 3758260252 to i64*)
%6 = call i32 @delay(i32 100)
%7 = load i64, i64* %2
%8 = shl i64 %7, 16
store volatile i64 %8, i64* inttoptr (i64 3758260244 to i64*)
%9 = call i32 @delay(i32 100)
store volatile i64 33554432, i64* inttoptr (i64 3758260252 to i64*)
ret void
}

LLVM IR (-O2):
define void @send_instruction(i64 %0) {
%2 = tail call i32 @delay(i32 100)
store volatile i64 16777216, i64* inttoptr (i64 3758260252 to i64*)
%3 = tail call i32 @delay(i32 100)
store volatile i64 33554432, i64* inttoptr (i64 3758260244 to i64*)
%4 = tail call i32 @delay(i32 100)
store volatile i64 16711680, i64* inttoptr (i64 3758260252 to i64*)
%5 = tail call i32 @delay(i32 100)
%6 = shl i64 %0, 16
store volatile i64 %6, i64* inttoptr (i64 3758260244 to i64*)
%7 = tail call i32 @delay(i32 100)
store volatile i64 33554432, i64* inttoptr (i64 3758260252 to i64*)
ret void
}