#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 */
unsigned int gnulliver();
unsigned long long gnulliver128(unsigned long long input) {
  static unsigned endian, init = 1;
  unsigned char tmpch;
  union {
    unsigned long long u;
    char ch[16];
  } bytes;
  if (init) {
    endian = gnulliver();
    init = 0;
  }
  bytes.u = input;
  if (endian != 0) {
    if (endian == (1 | 2 | 4 | 8)) {
      tmpch = bytes.ch[0];
      bytes.ch[0] = bytes.ch[15];
      bytes.ch[15] = tmpch;
      tmpch = bytes.ch[1];
      bytes.ch[1] = bytes.ch[14];
      bytes.ch[14] = tmpch;
      tmpch = bytes.ch[2];
      bytes.ch[2] = bytes.ch[13];
      bytes.ch[13] = tmpch;
      tmpch = bytes.ch[3];
      bytes.ch[3] = bytes.ch[12];
      bytes.ch[12] = tmpch;
      tmpch = bytes.ch[4];
      bytes.ch[4] = bytes.ch[11];
      bytes.ch[11] = tmpch;
      tmpch = bytes.ch[5];
      bytes.ch[5] = bytes.ch[10];
      bytes.ch[10] = tmpch;
      tmpch = bytes.ch[6];
      bytes.ch[6] = bytes.ch[9];
      bytes.ch[9] = tmpch;
      tmpch = bytes.ch[7];
      bytes.ch[7] = bytes.ch[8];
      bytes.ch[8] = tmpch;
    } else {
      tmpch = bytes.ch[0];
      bytes.ch[0] = bytes.ch[14];
      bytes.ch[14] = tmpch;
      tmpch = bytes.ch[1];
      bytes.ch[1] = bytes.ch[15];
      bytes.ch[15] = tmpch;
      tmpch = bytes.ch[2];
      bytes.ch[2] = bytes.ch[12];
      bytes.ch[12] = tmpch;
      tmpch = bytes.ch[3];
      bytes.ch[3] = bytes.ch[13];
      bytes.ch[13] = tmpch;
      tmpch = bytes.ch[4];
      bytes.ch[4] = bytes.ch[10];
      bytes.ch[10] = tmpch;
      tmpch = bytes.ch[5];
      bytes.ch[5] = bytes.ch[11];
      bytes.ch[11] = tmpch;
      tmpch = bytes.ch[6];
      bytes.ch[6] = bytes.ch[8];
      bytes.ch[8] = tmpch;
      tmpch = bytes.ch[7];
      bytes.ch[7] = bytes.ch[9];
      bytes.ch[9] = tmpch;
    }
  }
  return (bytes.u);
}


x86 assembly (clang, -O0):
<gnulliver128>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpl   $0x0,0x2f05(%rip)
je     1140 <gnulliver128+0x30>
mov    $0x0,%al
call   1030 <gnulliver@plt>
mov    %eax,0x2efa(%rip)
movl   $0x0,0x2ee8(%rip)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x0,0x2ee1(%rip)
je     128c <gnulliver128+0x17c>
cmpl   $0xf,0x2ed4(%rip)
jne    11f7 <gnulliver128+0xe7>
mov    -0x20(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x11(%rbp),%al
mov    %al,-0x20(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x1f(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x1f(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x12(%rbp)
mov    -0x1e(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x13(%rbp),%al
mov    %al,-0x1e(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x13(%rbp)
mov    -0x1d(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x14(%rbp),%al
mov    %al,-0x1d(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x14(%rbp)
mov    -0x1c(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x15(%rbp),%al
mov    %al,-0x1c(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x15(%rbp)
mov    -0x1b(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x16(%rbp),%al
mov    %al,-0x1b(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x16(%rbp)
mov    -0x1a(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x17(%rbp),%al
mov    %al,-0x1a(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x17(%rbp)
mov    -0x19(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x18(%rbp),%al
mov    %al,-0x19(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x18(%rbp)
jmp    1287 <gnulliver128+0x177>
mov    -0x20(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x20(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x12(%rbp)
mov    -0x1f(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x11(%rbp),%al
mov    %al,-0x1f(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x1e(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x14(%rbp),%al
mov    %al,-0x1e(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x14(%rbp)
mov    -0x1d(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x13(%rbp),%al
mov    %al,-0x1d(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x13(%rbp)
mov    -0x1c(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x16(%rbp),%al
mov    %al,-0x1c(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x16(%rbp)
mov    -0x1b(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x15(%rbp),%al
mov    %al,-0x1b(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x15(%rbp)
mov    -0x1a(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x18(%rbp),%al
mov    %al,-0x1a(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x18(%rbp)
mov    -0x19(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x17(%rbp),%al
mov    %al,-0x19(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x17(%rbp)
jmp    128c <gnulliver128+0x17c>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gnulliver128>:
push   %rbx
mov    %rdi,%rbx
cmpb   $0x0,0x2f11(%rip)
jne    112b <gnulliver128+0x1b>
xor    %eax,%eax
call   1030 <gnulliver@plt>
movb   $0x1,0x2f01(%rip)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%union.anon = type { i64, [8 x i8] }
@gnulliver128.endian = internal global i32 0
@gnulliver128.init = internal global i32 1
define i64 @gnulliver128(i64 %0) {
%2 = alloca i64
%3 = alloca i8
%4 = alloca %union.anon
store i64 %0, i64* %2
%5 = load i32, i32* @gnulliver128.init
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @gnulliver()
store i32 %8, i32* @gnulliver128.endian
store i32 0, i32* @gnulliver128.init
br label %9
9: ; preds = %7, %1
%10 = load i64, i64* %2
%11 = bitcast %union.anon* %4 to i64*
store i64 %10, i64* %11
%12 = load i32, i32* @gnulliver128.endian
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %196
14: ; preds = %9
%15 = load i32, i32* @gnulliver128.endian
%16 = icmp eq i32 %15, 15
br i1 %16, label %17, label %106
17: ; preds = %14
%18 = bitcast %union.anon* %4 to [16 x i8]*
%19 = getelementptr inbounds [16 x i8], [16 x i8]* %18, i64 0, i64 0
%20 = load i8, i8* %19
store i8 %20, i8* %3
%21 = bitcast %union.anon* %4 to [16 x i8]*
%22 = getelementptr inbounds [16 x i8], [16 x i8]* %21, i64 0, i64 15
%23 = load i8, i8* %22
%24 = bitcast %union.anon* %4 to [16 x i8]*
%25 = getelementptr inbounds [16 x i8], [16 x i8]* %24, i64 0, i64 0
store i8 %23, i8* %25
%26 = load i8, i8* %3
%27 = bitcast %union.anon* %4 to [16 x i8]*
%28 = getelementptr inbounds [16 x i8], [16 x i8]* %27, i64 0, i64 15
store i8 %26, i8* %28
%29 = bitcast %union.anon* %4 to [16 x i8]*
%30 = getelementptr inbounds [16 x i8], [16 x i8]* %29, i64 0, i64 1
%31 = load i8, i8* %30
store i8 %31, i8* %3
%32 = bitcast %union.anon* %4 to [16 x i8]*
%33 = getelementptr inbounds [16 x i8], [16 x i8]* %32, i64 0, i64 14
%34 = load i8, i8* %33
%35 = bitcast %union.anon* %4 to [16 x i8]*
%36 = getelementptr inbounds [16 x i8], [16 x i8]* %35, i64 0, i64 1
store i8 %34, i8* %36
%37 = load i8, i8* %3
%38 = bitcast %union.anon* %4 to [16 x i8]*
%39 = getelementptr inbounds [16 x i8], [16 x i8]* %38, i64 0, i64 14
store i8 %37, i8* %39
%40 = bitcast %union.anon* %4 to [16 x i8]*
%41 = getelementptr inbounds [16 x i8], [16 x i8]* %40, i64 0, i64 2
%42 = load i8, i8* %41
store i8 %42, i8* %3
%43 = bitcast %union.anon* %4 to [16 x i8]*
%44 = getelementptr inbounds [16 x i8], [16 x i8]* %43, i64 0, i64 13
%45 = load i8, i8* %44
%46 = bitcast %union.anon* %4 to [16 x i8]*
%47 = getelementptr inbounds [16 x i8], [16 x i8]* %46, i64 0, i64 2
store i8 %45, i8* %47
%48 = load i8, i8* %3
%49 = bitcast %union.anon* %4 to [16 x i8]*
%50 = getelementptr inbounds [16 x i8], [16 x i8]* %49, i64 0, i64 13
store i8 %48, i8* %50
%51 = bitcast %union.anon* %4 to [16 x i8]*
%52 = getelementptr inbounds [16 x i8], [16 x i8]* %51, i64 0, i64 3
%53 = load i8, i8* %52
store i8 %53, i8* %3
%54 = bitcast %union.anon* %4 to [16 x i8]*
%55 = getelementptr inbounds [16 x i8], [16 x i8]* %54, i64 0, i64 12
%56 = load i8, i8* %55
%57 = bitcast %union.anon* %4 to [16 x i8]*
%58 = getelementptr inbounds [16 x i8], [16 x i8]* %57, i64 0, i64 3
store i8 %56, i8* %58
%59 = load i8, i8* %3
%60 = bitcast %union.anon* %4 to [16 x i8]*
%61 = getelementptr inbounds [16 x i8], [16 x i8]* %60, i64 0, i64 12
store i8 %59, i8* %61
%62 = bitcast %union.anon* %4 to [16 x i8]*
%63 = getelementptr inbounds [16 x i8], [16 x i8]* %62, i64 0, i64 4
%64 = load i8, i8* %63
store i8 %64, i8* %3
%65 = bitcast %union.anon* %4 to [16 x i8]*
%66 = getelementptr inbounds [16 x i8], [16 x i8]* %65, i64 0, i64 11
%67 = load i8, i8* %66
%68 = bitcast %union.anon* %4 to [16 x i8]*
%69 = getelementptr inbounds [16 x i8], [16 x i8]* %68, i64 0, i64 4
store i8 %67, i8* %69
%70 = load i8, i8* %3
%71 = bitcast %union.anon* %4 to [16 x i8]*
%72 = getelementptr inbounds [16 x i8], [16 x i8]* %71, i64 0, i64 11
store i8 %70, i8* %72
%73 = bitcast %union.anon* %4 to [16 x i8]*
%74 = getelementptr inbounds [16 x i8], [16 x i8]* %73, i64 0, i64 5
%75 = load i8, i8* %74
store i8 %75, i8* %3
%76 = bitcast %union.anon* %4 to [16 x i8]*
%77 = getelementptr inbounds [16 x i8], [16 x i8]* %76, i64 0, i64 10
%78 = load i8, i8* %77
%79 = bitcast %union.anon* %4 to [16 x i8]*
%80 = getelementptr inbounds [16 x i8], [16 x i8]* %79, i64 0, i64 5
store i8 %78, i8* %80
%81 = load i8, i8* %3
%82 = bitcast %union.anon* %4 to [16 x i8]*
%83 = getelementptr inbounds [16 x i8], [16 x i8]* %82, i64 0, i64 10
store i8 %81, i8* %83
%84 = bitcast %union.anon* %4 to [16 x i8]*
%85 = getelementptr inbounds [16 x i8], [16 x i8]* %84, i64 0, i64 6
%86 = load i8, i8* %85
store i8 %86, i8* %3
%87 = bitcast %union.anon* %4 to [16 x i8]*
%88 = getelementptr inbounds [16 x i8], [16 x i8]* %87, i64 0, i64 9
%89 = load i8, i8* %88
%90 = bitcast %union.anon* %4 to [16 x i8]*
%91 = getelementptr inbounds [16 x i8], [16 x i8]* %90, i64 0, i64 6
store i8 %89, i8* %91
%92 = load i8, i8* %3
%93 = bitcast %union.anon* %4 to [16 x i8]*
%94 = getelementptr inbounds [16 x i8], [16 x i8]* %93, i64 0, i64 9
store i8 %92, i8* %94
%95 = bitcast %union.anon* %4 to [16 x i8]*
%96 = getelementptr inbounds [16 x i8], [16 x i8]* %95, i64 0, i64 7
%97 = load i8, i8* %96
store i8 %97, i8* %3
%98 = bitcast %union.anon* %4 to [16 x i8]*
%99 = getelementptr inbounds [16 x i8], [16 x i8]* %98, i64 0, i64 8
%100 = load i8, i8* %99
%101 = bitcast %union.anon* %4 to [16 x i8]*
%102 = getelementptr inbounds [16 x i8], [16 x i8]* %101, i64 0, i64 7
store i8 %100, i8* %102
%103 = load i8, i8* %3
%104 = bitcast %union.anon* %4 to [16 x i8]*
%105 = getelementptr inbounds [16 x i8], [16 x i8]* %104, i64 0, i64 8
store i8 %103, i8* %105
br label %195
106: ; preds = %14
%107 = bitcast %union.anon* %4 to [16 x i8]*
%108 = getelementptr inbounds [16 x i8], [16 x i8]* %107, i64 0, i64 0
%109 = load i8, i8* %108
store i8 %109, i8* %3
%110 = bitcast %union.anon* %4 to [16 x i8]*
%111 = getelementptr inbounds [16 x i8], [16 x i8]* %110, i64 0, i64 14
%112 = load i8, i8* %111
%113 = bitcast %union.anon* %4 to [16 x i8]*
%114 = getelementptr inbounds [16 x i8], [16 x i8]* %113, i64 0, i64 0
store i8 %112, i8* %114
%115 = load i8, i8* %3
%116 = bitcast %union.anon* %4 to [16 x i8]*
%117 = getelementptr inbounds [16 x i8], [16 x i8]* %116, i64 0, i64 14
store i8 %115, i8* %117
%118 = bitcast %union.anon* %4 to [16 x i8]*
%119 = getelementptr inbounds [16 x i8], [16 x i8]* %118, i64 0, i64 1
%120 = load i8, i8* %119
store i8 %120, i8* %3
%121 = bitcast %union.anon* %4 to [16 x i8]*
%122 = getelementptr inbounds [16 x i8], [16 x i8]* %121, i64 0, i64 15
%123 = load i8, i8* %122
%124 = bitcast %union.anon* %4 to [16 x i8]*
%125 = getelementptr inbounds [16 x i8], [16 x i8]* %124, i64 0, i64 1
store i8 %123, i8* %125
%126 = load i8, i8* %3
%127 = bitcast %union.anon* %4 to [16 x i8]*
%128 = getelementptr inbounds [16 x i8], [16 x i8]* %127, i64 0, i64 15
store i8 %126, i8* %128
%129 = bitcast %union.anon* %4 to [16 x i8]*
%130 = getelementptr inbounds [16 x i8], [16 x i8]* %129, i64 0, i64 2
%131 = load i8, i8* %130
store i8 %131, i8* %3
%132 = bitcast %union.anon* %4 to [16 x i8]*
%133 = getelementptr inbounds [16 x i8], [16 x i8]* %132, i64 0, i64 12
%134 = load i8, i8* %133
%135 = bitcast %union.anon* %4 to [16 x i8]*
%136 = getelementptr inbounds [16 x i8], [16 x i8]* %135, i64 0, i64 2
store i8 %134, i8* %136
%137 = load i8, i8* %3
%138 = bitcast %union.anon* %4 to [16 x i8]*
%139 = getelementptr inbounds [16 x i8], [16 x i8]* %138, i64 0, i64 12
store i8 %137, i8* %139
%140 = bitcast %union.anon* %4 to [16 x i8]*
%141 = getelementptr inbounds [16 x i8], [16 x i8]* %140, i64 0, i64 3
%142 = load i8, i8* %141
store i8 %142, i8* %3
%143 = bitcast %union.anon* %4 to [16 x i8]*
%144 = getelementptr inbounds [16 x i8], [16 x i8]* %143, i64 0, i64 13
%145 = load i8, i8* %144
%146 = bitcast %union.anon* %4 to [16 x i8]*
%147 = getelementptr inbounds [16 x i8], [16 x i8]* %146, i64 0, i64 3
store i8 %145, i8* %147
%148 = load i8, i8* %3
%149 = bitcast %union.anon* %4 to [16 x i8]*
%150 = getelementptr inbounds [16 x i8], [16 x i8]* %149, i64 0, i64 13
store i8 %148, i8* %150
%151 = bitcast %union.anon* %4 to [16 x i8]*
%152 = getelementptr inbounds [16 x i8], [16 x i8]* %151, i64 0, i64 4
%153 = load i8, i8* %152
store i8 %153, i8* %3
%154 = bitcast %union.anon* %4 to [16 x i8]*
%155 = getelementptr inbounds [16 x i8], [16 x i8]* %154, i64 0, i64 10
%156 = load i8, i8* %155
%157 = bitcast %union.anon* %4 to [16 x i8]*
%158 = getelementptr inbounds [16 x i8], [16 x i8]* %157, i64 0, i64 4
store i8 %156, i8* %158
%159 = load i8, i8* %3
%160 = bitcast %union.anon* %4 to [16 x i8]*
%161 = getelementptr inbounds [16 x i8], [16 x i8]* %160, i64 0, i64 10
store i8 %159, i8* %161
%162 = bitcast %union.anon* %4 to [16 x i8]*
%163 = getelementptr inbounds [16 x i8], [16 x i8]* %162, i64 0, i64 5
%164 = load i8, i8* %163
store i8 %164, i8* %3
%165 = bitcast %union.anon* %4 to [16 x i8]*
%166 = getelementptr inbounds [16 x i8], [16 x i8]* %165, i64 0, i64 11
%167 = load i8, i8* %166
%168 = bitcast %union.anon* %4 to [16 x i8]*
%169 = getelementptr inbounds [16 x i8], [16 x i8]* %168, i64 0, i64 5
store i8 %167, i8* %169
%170 = load i8, i8* %3
%171 = bitcast %union.anon* %4 to [16 x i8]*
%172 = getelementptr inbounds [16 x i8], [16 x i8]* %171, i64 0, i64 11
store i8 %170, i8* %172
%173 = bitcast %union.anon* %4 to [16 x i8]*
%174 = getelementptr inbounds [16 x i8], [16 x i8]* %173, i64 0, i64 6
%175 = load i8, i8* %174
store i8 %175, i8* %3
%176 = bitcast %union.anon* %4 to [16 x i8]*
%177 = getelementptr inbounds [16 x i8], [16 x i8]* %176, i64 0, i64 8
%178 = load i8, i8* %177
%179 = bitcast %union.anon* %4 to [16 x i8]*
%180 = getelementptr inbounds [16 x i8], [16 x i8]* %179, i64 0, i64 6
store i8 %178, i8* %180
%181 = load i8, i8* %3
%182 = bitcast %union.anon* %4 to [16 x i8]*
%183 = getelementptr inbounds [16 x i8], [16 x i8]* %182, i64 0, i64 8
store i8 %181, i8* %183
%184 = bitcast %union.anon* %4 to [16 x i8]*
%185 = getelementptr inbounds [16 x i8], [16 x i8]* %184, i64 0, i64 7
%186 = load i8, i8* %185
store i8 %186, i8* %3
%187 = bitcast %union.anon* %4 to [16 x i8]*
%188 = getelementptr inbounds [16 x i8], [16 x i8]* %187, i64 0, i64 9
%189 = load i8, i8* %188
%190 = bitcast %union.anon* %4 to [16 x i8]*
%191 = getelementptr inbounds [16 x i8], [16 x i8]* %190, i64 0, i64 7
store i8 %189, i8* %191
%192 = load i8, i8* %3
%193 = bitcast %union.anon* %4 to [16 x i8]*
%194 = getelementptr inbounds [16 x i8], [16 x i8]* %193, i64 0, i64 9
store i8 %192, i8* %194
br label %195
195: ; preds = %106, %17
br label %196
196: ; preds = %195, %9
%197 = bitcast %union.anon* %4 to i64*
%198 = load i64, i64* %197
ret i64 %198
}

LLVM IR (-O2):
@gnulliver128.init = internal unnamed_addr global i1 false
define i64 @gnulliver128(i64 returned %0) {
%2 = load i1, i1* @gnulliver128.init
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @gnulliver()
store i1 true, i1* @gnulliver128.init
br label %5
5: ; preds = %3, %1
ret i64 %0
}