#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 uint8_t;

/* Variables and functions */
size_t init_text_seg(uint8_t *dst) {
  dst[0] = 0x66;
  dst[1] = 0x6a;
  dst[3] = 0x89;
  dst[4] = 0xe1;
  dst[5] = 0xb2;
  dst[6] = 0x01;
  dst[7] = 0x66;
  dst[8] = 0xb8;
  dst[9] = 0xff;
  dst[10] = 0x7f;
  dst[11] = 0x66;
  dst[12] = 0x6a;
  dst[14] = 0x66;
  dst[15] = 0x48;
  dst[16] = 0x75;
  dst[17] = 0xf9;
  return 18;
}


x86 assembly (clang, -O0):
<init_text_seg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x66,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x6a,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x89,0xc(%rax)
mov    -0x8(%rbp),%rax
movl   $0xe1,0x10(%rax)
mov    -0x8(%rbp),%rax
movl   $0xb2,0x14(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x18(%rax)
mov    -0x8(%rbp),%rax
movl   $0x66,0x1c(%rax)
mov    -0x8(%rbp),%rax
movl   $0xb8,0x20(%rax)
mov    -0x8(%rbp),%rax
movl   $0xff,0x24(%rax)
mov    -0x8(%rbp),%rax
movl   $0x7f,0x28(%rax)
mov    -0x8(%rbp),%rax
movl   $0x66,0x2c(%rax)
mov    -0x8(%rbp),%rax
movl   $0x6a,0x30(%rax)
mov    -0x8(%rbp),%rax
movl   $0x66,0x38(%rax)
mov    -0x8(%rbp),%rax
movl   $0x48,0x3c(%rax)
mov    -0x8(%rbp),%rax
movl   $0x75,0x40(%rax)
mov    -0x8(%rbp),%rax
movl   $0xf9,0x44(%rax)
mov    $0x12,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_text_seg>:
movabs $0x6a00000066,%rax
mov    %rax,(%rdi)
movaps 0xeec(%rip),%xmm0
movups %xmm0,0xc(%rdi)
movaps 0xef1(%rip),%xmm0
movups %xmm0,0x1c(%rdi)
mov    %rax,0x2c(%rdi)
movaps 0xef2(%rip),%xmm0
movups %xmm0,0x38(%rdi)
mov    $0x12,%eax
ret

LLVM IR (-O0):
define i64 @init_text_seg(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 102, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 106, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 3
store i32 137, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 4
store i32 225, i32* %10
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 5
store i32 178, i32* %12
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 6
store i32 1, i32* %14
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 7
store i32 102, i32* %16
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 8
store i32 184, i32* %18
%19 = load i32*, i32** %2
%20 = getelementptr inbounds i32, i32* %19, i64 9
store i32 255, i32* %20
%21 = load i32*, i32** %2
%22 = getelementptr inbounds i32, i32* %21, i64 10
store i32 127, i32* %22
%23 = load i32*, i32** %2
%24 = getelementptr inbounds i32, i32* %23, i64 11
store i32 102, i32* %24
%25 = load i32*, i32** %2
%26 = getelementptr inbounds i32, i32* %25, i64 12
store i32 106, i32* %26
%27 = load i32*, i32** %2
%28 = getelementptr inbounds i32, i32* %27, i64 14
store i32 102, i32* %28
%29 = load i32*, i32** %2
%30 = getelementptr inbounds i32, i32* %29, i64 15
store i32 72, i32* %30
%31 = load i32*, i32** %2
%32 = getelementptr inbounds i32, i32* %31, i64 16
store i32 117, i32* %32
%33 = load i32*, i32** %2
%34 = getelementptr inbounds i32, i32* %33, i64 17
store i32 249, i32* %34
ret i64 18
}

LLVM IR (-O2):
define i64 @init_text_seg(i32* nocapture writeonly %0) {
store i32 102, i32* %0
%2 = getelementptr inbounds i32, i32* %0, i64 1
store i32 106, i32* %2
%3 = getelementptr inbounds i32, i32* %0, i64 3
%4 = bitcast i32* %3 to <4 x i32>*
store <4 x i32> <i32 137, i32 225, i32 178, i32 1>, <4 x i32>* %4
%5 = getelementptr inbounds i32, i32* %0, i64 7
%6 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 102, i32 184, i32 255, i32 127>, <4 x i32>* %6
%7 = getelementptr inbounds i32, i32* %0, i64 11
store i32 102, i32* %7
%8 = getelementptr inbounds i32, i32* %0, i64 12
store i32 106, i32* %8
%9 = getelementptr inbounds i32, i32* %0, i64 14
%10 = bitcast i32* %9 to <4 x i32>*
store <4 x i32> <i32 102, i32 72, i32 117, i32 249>, <4 x i32>* %10
ret i64 18
}