#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 */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ relocate_flush();
int /*<<< orphan*/ stuffbit(int);
int /*<<< orphan*/ stuffend();
int /*<<< orphan*/ stuffhex(int);
int /*<<< orphan*/ stuffword(int /*<<< orphan*/);
void relocate_end(uint16_t addr) {
  relocate_flush();
  stuffbit(1);
  stuffbit(0);
  stuffbit(0);
  stuffhex(14);
  stuffbit(0);
  stuffbit(0);
  stuffword(0);
  stuffend();
  stuffbit(1);
  stuffbit(0);
  stuffbit(0);
  stuffhex(15);
}


x86 assembly (clang, -O0):
<relocate_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <relocate_flush@plt>
mov    $0x1,%edi
call   1050 <stuffbit@plt>
xor    %edi,%edi
call   1050 <stuffbit@plt>
xor    %edi,%edi
call   1050 <stuffbit@plt>
mov    $0xe,%edi
call   1070 <stuffhex@plt>
xor    %edi,%edi
call   1050 <stuffbit@plt>
xor    %edi,%edi
call   1050 <stuffbit@plt>
xor    %edi,%edi
call   1060 <stuffword@plt>
mov    $0x0,%al
call   1030 <stuffend@plt>
mov    $0x1,%edi
call   1050 <stuffbit@plt>
xor    %edi,%edi
call   1050 <stuffbit@plt>
xor    %edi,%edi
call   1050 <stuffbit@plt>
mov    $0xf,%edi
call   1070 <stuffhex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<relocate_end>:
push   %rax
xor    %eax,%eax
call   1040 <relocate_flush@plt>
mov    $0x1,%edi
call   1050 <stuffbit@plt>
xor    %edi,%edi
call   1050 <stuffbit@plt>
xor    %edi,%edi
call   1050 <stuffbit@plt>
mov    $0xe,%edi
call   1070 <stuffhex@plt>
xor    %edi,%edi
call   1050 <stuffbit@plt>
xor    %edi,%edi
call   1050 <stuffbit@plt>
xor    %edi,%edi
call   1060 <stuffword@plt>
xor    %eax,%eax
call   1030 <stuffend@plt>
mov    $0x1,%edi
call   1050 <stuffbit@plt>
xor    %edi,%edi
call   1050 <stuffbit@plt>
xor    %edi,%edi
call   1050 <stuffbit@plt>
mov    $0xf,%edi
pop    %rax
jmp    1070 <stuffhex@plt>

LLVM IR (-O0):
define void @relocate_end(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @relocate_flush()
%4 = call i32 @stuffbit(i32 1)
%5 = call i32 @stuffbit(i32 0)
%6 = call i32 @stuffbit(i32 0)
%7 = call i32 @stuffhex(i32 14)
%8 = call i32 @stuffbit(i32 0)
%9 = call i32 @stuffbit(i32 0)
%10 = call i32 @stuffword(i32 0)
%11 = call i32 (...) @stuffend()
%12 = call i32 @stuffbit(i32 1)
%13 = call i32 @stuffbit(i32 0)
%14 = call i32 @stuffbit(i32 0)
%15 = call i32 @stuffhex(i32 15)
ret void
}

LLVM IR (-O2):
define void @relocate_end(i32 %0) {
%2 = tail call i32 (...) @relocate_flush()
%3 = tail call i32 @stuffbit(i32 1)
%4 = tail call i32 @stuffbit(i32 0)
%5 = tail call i32 @stuffbit(i32 0)
%6 = tail call i32 @stuffhex(i32 14)
%7 = tail call i32 @stuffbit(i32 0)
%8 = tail call i32 @stuffbit(i32 0)
%9 = tail call i32 @stuffword(i32 0)
%10 = tail call i32 (...) @stuffend()
%11 = tail call i32 @stuffbit(i32 1)
%12 = tail call i32 @stuffbit(i32 0)
%13 = tail call i32 @stuffbit(i32 0)
%14 = tail call i32 @stuffhex(i32 15)
ret void
}