xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ PrintRandoms(int, int, int);
int main() {
  int lower = 1, upper = 81, count = 81;
  PrintRandoms(lower, upper, count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x51,-0xc(%rbp)
movl   $0x51,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <PrintRandoms@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x51,%esi
mov    $0x51,%edx
call   1030 <PrintRandoms@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 81, i32* %3
store i32 81, i32* %4
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @PrintRandoms(i32 %5, i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @PrintRandoms(i32 1, i32 81, i32 81)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ xsi_vlogvar_assign_value(char *, char *, int /*<<< orphan*/,
                                            int /*<<< orphan*/, int);
void Initial_39_1(char *t0) {
  char *t1;
  char *t2;
LAB0:
  t1 = (t0 + 472);
  t2 = *((char **)t1);
  t1 = (t0 + 2384);
  xsi_vlogvar_assign_value(t1, t2, 0, 0, 1);
LAB1:
  return;
}


x86 assembly (clang, -O0):
<Initial_39_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1d8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x950,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    %ecx,%edx
call   1030 <xsi_vlogvar_assign_value@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Initial_39_1>:
mov    0x1d8(%rdi),%rsi
add    $0x950,%rdi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <xsi_vlogvar_assign_value@plt>

LLVM IR (-O0):
define void @Initial_39_1(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
br label %5
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 472
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
store i8* %10, i8** %4
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 2384
store i8* %12, i8** %3
%13 = load i8*, i8** %3
%14 = load i8*, i8** %4
%15 = call i32 @xsi_vlogvar_assign_value(i8* %13, i8* %14, i32 0, i32 0, i32 1)
br label %16
16: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @Initial_39_1(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 472
%3 = bitcast i8* %2 to i8**
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %0, i64 2384
%6 = tail call i32 @xsi_vlogvar_assign_value(i8* %5, i8* %4, i32 0, i32 0, i32 1)
ret void
}
/* Variables and functions */
long g_load_library(char *);
long sync_load(long param1, long param2) {
  long rv;
  char *libname;
  libname = (char *)param1;
  rv = g_load_library(libname);
  return rv;
}


x86 assembly (clang, -O0):
<sync_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <g_load_library@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync_load>:
jmp    1030 <g_load_library@plt>

LLVM IR (-O0):
define i64 @sync_load(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %6
%9 = load i8*, i8** %6
%10 = call i64 @g_load_library(i8* %9)
store i64 %10, i64* %5
%11 = load i64, i64* %5
ret i64 %11
}

LLVM IR (-O2):
define i64 @sync_load(i64 %0, i64 %1) {
%3 = inttoptr i64 %0 to i8*
%4 = tail call i64 @g_load_library(i8* %3)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void TGM_MergeLibHelp(void) {
  printf("Usage: tangram_merge -dir <input_dir>\n\n");
  printf("Mandatory arguments: -dir  STRING the path to the dir contains all "
         "the fragment length distribution files\n");
  printf("                     -help        print this help message\n");
  exit(0);
}


x86 assembly (clang, -O0):
<TGM_MergeLibHelp>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
call   1030 <printf@plt>
lea    0xf50(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<TGM_MergeLibHelp>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xf51(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Usage: tangram_merge -dir <input_dir>\0A\0A\00"
@.str.1 = [107 x i8] c"Mandatory arguments: -dir STRING the path to the dir contains all the fragment length distribution files\0A\00"
@.str.2 = [59 x i8] c" -help print this help message\0A\00"
define void @TGM_MergeLibHelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [39 x i8] c"Usage: tangram_merge -dir <input_dir>\0A\00"
@str.3 = [106 x i8] c"Mandatory arguments: -dir STRING the path to the dir contains all the fragment length distribution files\00"
@str.4 = [58 x i8] c" -help print this help message\00"
define void @TGM_MergeLibHelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
void db5500_prcmu_modem_reset(void) {}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
ret

LLVM IR (-O0):
define void @db5500_prcmu_modem_reset() {
ret void
}

LLVM IR (-O2):
define void @db5500_prcmu_modem_reset() {
ret void
}
void copy_tlatch_to_do32(void *ao, void *ai) {
  unsigned *dox = (unsigned *)ao;
  unsigned *tlx = (unsigned *)ai;
  dox[(16)] = tlx[(16 * sizeof(short) / sizeof(unsigned))];
}


x86 assembly (clang, -O0):
<copy_tlatch_to_do32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x20(%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x40(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_tlatch_to_do32>:
mov    0x20(%rsi),%eax
mov    %eax,0x40(%rdi)
ret

LLVM IR (-O0):
define void @copy_tlatch_to_do32(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %6
%12 = getelementptr inbounds i32, i32* %11, i64 8
%13 = load i32, i32* %12
%14 = load i32*, i32** %5
%15 = getelementptr inbounds i32, i32* %14, i64 16
store i32 %13, i32* %15
ret void
}

LLVM IR (-O2):
define void @copy_tlatch_to_do32(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 32
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = getelementptr inbounds i8, i8* %0, i64 64
%7 = bitcast i8* %6 to i32*
store i32 %5, i32* %7
ret void
}
const char *_Locale_d_fmt(struct _Locale_time *ltime
                          __attribute__((__unused__))) {
  return "%m/%d/%y";
}


x86 assembly (clang, -O0):
<_Locale_d_fmt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Locale_d_fmt>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
%struct._Locale_time = type opaque
@.str = [9 x i8] c"%m/%d/%y\00"
define i8* @_Locale_d_fmt(%struct._Locale_time* %0) {
%2 = alloca %struct._Locale_time*
store %struct._Locale_time* %0, %struct._Locale_time** %2
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct._Locale_time = type opaque
@.str = [9 x i8] c"%m/%d/%y\00"
define i8* @_Locale_d_fmt(%struct._Locale_time* nocapture readnone %0) {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int _mm_comilt_sd(int /*<<< orphan*/, int /*<<< orphan*/);
int test_mm_comilt_sd(__m128d A, __m128d B) { return _mm_comilt_sd(A, B); }


x86 assembly (clang, -O0):
<test_mm_comilt_sd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_comilt_sd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_comilt_sd>:
jmp    1030 <_mm_comilt_sd@plt>

LLVM IR (-O0):
define i32 @test_mm_comilt_sd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @_mm_comilt_sd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_comilt_sd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_comilt_sd(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ leds_write(int);
void LedHardware_Enable(int32_t ledNumber) {
  int value = 0;
  switch (ledNumber) {
  case 1:
    value = 0x1;
    break;
  case 2:
    value = 0x2;
    break;
  case 3:
    value = 0x4;
    break;
  case 4:
    value = 0x8;
    break;
  }
  leds_write(value);
}


x86 assembly (clang, -O0):
<LedHardware_Enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3,%eax
ja     1176 <LedHardware_Enable+0x66>
mov    -0x10(%rbp),%rax
lea    0xebe(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x8(%rbp)
jmp    1176 <LedHardware_Enable+0x66>
movl   $0x2,-0x8(%rbp)
jmp    1176 <LedHardware_Enable+0x66>
movl   $0x4,-0x8(%rbp)
jmp    1176 <LedHardware_Enable+0x66>
movl   $0x8,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <leds_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LedHardware_Enable>:
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0x3,%edi
ja     1127 <LedHardware_Enable+0x17>
movslq %edi,%rax
lea    0xedc(%rip),%rcx
mov    (%rcx,%rax,4),%eax
mov    %eax,%edi
jmp    1030 <leds_write@plt>

LLVM IR (-O0):
define void @LedHardware_Enable(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %9 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
i32 4, label %8
]
5: ; preds = %1
store i32 1, i32* %3
br label %9
6: ; preds = %1
store i32 2, i32* %3
br label %9
7: ; preds = %1
store i32 4, i32* %3
br label %9
8: ; preds = %1
store i32 8, i32* %3
br label %9
9: ; preds = %1, %8, %7, %6, %5
%10 = load i32, i32* %3
%11 = call i32 @leds_write(i32 %10)
ret void
}

LLVM IR (-O2):
@switch.table.LedHardware_Enable = [4 x i32] [i32 1, i32 2, i32 4, i32 8]
define void @LedHardware_Enable(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 4
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.LedHardware_Enable, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
%10 = tail call i32 @leds_write(i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ compilerAssert();
void chpl_decRefCountsForDomainsInArrayEltTypes4(void) {
  compilerAssert();
  return;
}


x86 assembly (clang, -O0):
<chpl_decRefCountsForDomainsInArrayEltTypes4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <compilerAssert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chpl_decRefCountsForDomainsInArrayEltTypes4>:
xor    %eax,%eax
jmp    1030 <compilerAssert@plt>

LLVM IR (-O0):
define void @chpl_decRefCountsForDomainsInArrayEltTypes4() {
%1 = call i32 (...) @compilerAssert()
ret void
}

LLVM IR (-O2):
define void @chpl_decRefCountsForDomainsInArrayEltTypes4() {
%1 = tail call i32 (...) @compilerAssert()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ thread_t1_stop(void *);
void *thread_t1(void *arg) {
  thread_t1_stop(arg);
  return NULL;
}


x86 assembly (clang, -O0):
<thread_t1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <thread_t1_stop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_t1>:
push   %rax
call   1030 <thread_t1_stop@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @thread_t1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @thread_t1_stop(i8* %3)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @thread_t1(i8* %0) {
%2 = tail call i32 @thread_t1_stop(i8* %0)
ret i8* null
}
/* Variables and functions */
int crc32(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ strlen(char *);
int main() {
  char buf[1024];
  printf("Enter message: ");
  scanf("%1024s", buf);
  printf("crc: %0x\n", crc32(buf, strlen(buf)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x410(%rbp),%rsi
lea    0xea2(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x410(%rbp),%rax
mov    %rax,-0x418(%rbp)
lea    -0x410(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x418(%rbp),%rdi
mov    %eax,%esi
call   1030 <crc32@plt>
mov    %eax,%esi
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
lea    0xeb1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <crc32@plt>
lea    0xe96(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Enter message: \00"
@.str.1 = [7 x i8] c"%1024s\00"
@.str.2 = [10 x i8] c"crc: %0x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @crc32(i8* %6, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Enter message: \00"
@.str.1 = [7 x i8] c"%1024s\00"
@.str.2 = [10 x i8] c"crc: %0x\0A\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 @strlen(i8* %2)
%6 = call i32 @crc32(i8* %2, i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
int get_rtc_day(void) {
  (*(volatile unsigned int *)(0x7E005040)) |= (1 << 3);
  (*(volatile unsigned int *)(0x7E005040)) = 1;
  char value = (*(volatile unsigned int *)(0x7E005080));
  int day = value & 0x7;
  (*(volatile unsigned int *)(0x7E005040)) = 0;
  return day;
}


x86 assembly (clang, -O0):
<get_rtc_day>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7e005040,%eax
mov    (%rax),%ecx
or     $0x8,%ecx
mov    $0x7e005040,%eax
mov    %ecx,(%rax)
mov    $0x7e005040,%eax
movl   $0x1,(%rax)
mov    $0x7e005080,%eax
mov    (%rax),%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x7,%eax
mov    %eax,-0x8(%rbp)
mov    $0x7e005040,%eax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rtc_day>:
orl    $0x8,0x7e005040
08
movl   $0x1,0x7e005040
mov    0x7e005080,%eax
and    $0x7,%eax
movl   $0x0,0x7e005040
ret

LLVM IR (-O0):
define i32 @get_rtc_day() {
%1 = alloca i8
%2 = alloca i32
%3 = load volatile i32, i32* inttoptr (i64 2113949760 to i32*)
%4 = or i32 %3, 8
store volatile i32 %4, i32* inttoptr (i64 2113949760 to i32*)
store volatile i32 1, i32* inttoptr (i64 2113949760 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 2113949824 to i32*)
%6 = trunc i32 %5 to i8
store i8 %6, i8* %1
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
%9 = and i32 %8, 7
store i32 %9, i32* %2
store volatile i32 0, i32* inttoptr (i64 2113949760 to i32*)
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @get_rtc_day() {
%1 = load volatile i32, i32* inttoptr (i64 2113949760 to i32*)
%2 = or i32 %1, 8
store volatile i32 %2, i32* inttoptr (i64 2113949760 to i32*)
store volatile i32 1, i32* inttoptr (i64 2113949760 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 2113949824 to i32*)
%4 = and i32 %3, 7
store volatile i32 0, i32* inttoptr (i64 2113949760 to i32*)
ret i32 %4
}
void hdmi_test_switch_buffer(void) {}


x86 assembly (clang, -O0):
<hdmi_test_switch_buffer>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdmi_test_switch_buffer>:
ret

LLVM IR (-O0):
define void @hdmi_test_switch_buffer() {
ret void
}

LLVM IR (-O2):
define void @hdmi_test_switch_buffer() {
ret void
}
double rho_tukey_without_sqrt_derivative(const double x2, const double c) {
  double c2 = c * c;
  if (x2 > c2)
    return 0;
  else {
    double t = 1. - x2 / c2;
    return t * t / 2.;
  }
}


x86 assembly (clang, -O0):
<rho_tukey_without_sqrt_derivative>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    113a <rho_tukey_without_sqrt_derivative+0x3a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1170 <rho_tukey_without_sqrt_derivative+0x70>
movsd  -0x10(%rbp),%xmm1
divsd  -0x20(%rbp),%xmm1
movsd  0xebc(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  0xe99(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rho_tukey_without_sqrt_derivative>:
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm2
ja     112e <rho_tukey_without_sqrt_derivative+0x2e>
divsd  %xmm1,%xmm2
movsd  0xee2(%rip),%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm0
mulsd  0xeda(%rip),%xmm0
ret

LLVM IR (-O0):
define double @rho_tukey_without_sqrt_derivative(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
%8 = load double, double* %5
%9 = load double, double* %5
%10 = fmul double %8, %9
store double %10, double* %6
%11 = load double, double* %4
%12 = load double, double* %6
%13 = fcmp ogt double %11, %12
br i1 %13, label %14, label %15
14: ; preds = %2
store double 0.000000e+00, double* %3
br label %24
15: ; preds = %2
%16 = load double, double* %4
%17 = load double, double* %6
%18 = fdiv double %16, %17
%19 = fsub double 1.000000e+00, %18
store double %19, double* %7
%20 = load double, double* %7
%21 = load double, double* %7
%22 = fmul double %20, %21
%23 = fdiv double %22, 2.000000e+00
store double %23, double* %3
br label %24
24: ; preds = %15, %14
%25 = load double, double* %3
ret double %25
}

LLVM IR (-O2):
define double @rho_tukey_without_sqrt_derivative(double %0, double %1) {
%3 = fmul double %1, %1
%4 = fcmp olt double %3, %0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = fdiv double %0, %3
%7 = fsub double 1.000000e+00, %6
%8 = fmul double %7, %7
%9 = fmul double %8, 5.000000e-01
br label %10
10: ; preds = %2, %5
%11 = phi double [ %9, %5 ], [ 0.000000e+00, %2 ]
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sig_alrm(int signo) { printf("catch %d\n", signo); }


x86 assembly (clang, -O0):
<sig_alrm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_alrm>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"catch %d\0A\00"
define void @sig_alrm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"catch %d\0A\00"
define void @sig_alrm(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int err(char *msg) {
  puts(msg);
  return 1;
}


x86 assembly (clang, -O0):
<err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err>:
push   %rax
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @err(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @puts(i8* %3)
ret i32 1
}

LLVM IR (-O2):
define i32 @err(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int x = -4, y;
  y = x >> 1;
  x >>= 1;
  assert(x == -2);
  assert(y == -2);
  assert(((-2) >> 1u) == -1);
  x = -1;
  x = x >> 1;
  assert(x == -1);
  x = -10;
  x = x >> 10;
  assert(x == -1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xfffffffc,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0xfffffffe,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0xfffffff6,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xa,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 -4, i32* %1
%3 = load i32, i32* %1
%4 = ashr i32 %3, 1
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = ashr i32 %5, 1
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, -2
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, -2
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = call i32 @assert(i32 1)
store i32 -1, i32* %1
%16 = load i32, i32* %1
%17 = ashr i32 %16, 1
store i32 %17, i32* %1
%18 = load i32, i32* %1
%19 = icmp eq i32 %18, -1
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
store i32 -10, i32* %1
%22 = load i32, i32* %1
%23 = ashr i32 %22, 10
store i32 %23, i32* %1
%24 = load i32, i32* %1
%25 = icmp eq i32 %24, -1
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
%5 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t myle16toh(void *le) {
  uint8_t *p = (uint8_t *)le;
  return ((uint16_t)p[1] << 8) | (uint16_t)p[0];
}


x86 assembly (clang, -O0):
<myle16toh>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myle16toh>:
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @myle16toh(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = load i64*, i64** %3
%7 = getelementptr inbounds i64, i64* %6, i64 1
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %9, 8
%11 = load i64*, i64** %3
%12 = getelementptr inbounds i64, i64* %11, i64 0
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = or i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @myle16toh(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = getelementptr inbounds i8, i8* %0, i64 8
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = load i64, i64* %2
%9 = trunc i64 %8 to i32
%10 = or i32 %7, %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void f2(void(f)(char *), char *str2) {
  printf("==================================\n");
  printf("in f2 getted pointer:          %p;\n", str2);
  f(str2);
  printf("==================================\n");
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xef2(%rip),%r15
mov    %r15,%rdi
call   1030 <puts@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   *%r14
mov    %r15,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"==================================\0A\00"
@.str.1 = [36 x i8] c"in f2 getted pointer: %p;\0A\00"
define void @f2(void (i8*)* %0, i8* %1) {
%3 = alloca void (i8*)*
%4 = alloca i8*
store void (i8*)* %0, void (i8*)** %3
store i8* %1, i8** %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load void (i8*)*, void (i8*)** %3
%9 = load i8*, i8** %4
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [36 x i8] c"in f2 getted pointer: %p;\0A\00"
@str.2 = [35 x i8] c"==================================\00"
define void @f2(void (i8*)* nocapture %0, i8* %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %1)
tail call void %0(i8* %1)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
main() {
  int a = 1;
  foo();
  a += 2;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <foo@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = call i32 (...) @foo()
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 2
store i32 %5, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
ret i32 0
}
/* Type definitions */
struct dpl_eventq {
  int dummy;
};
struct dpl_event {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dpl_event_run(struct dpl_event *);
struct dpl_event *dpl_eventq_get(struct dpl_eventq *);
void dpl_eventq_run(struct dpl_eventq *evq) {
  struct dpl_event *ev = dpl_eventq_get(evq);
  dpl_event_run(ev);
}


x86 assembly (clang, -O0):
<dpl_eventq_run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <dpl_eventq_get@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <dpl_event_run@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dpl_eventq_run>:
push   %rax
call   1030 <dpl_eventq_get@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <dpl_event_run@plt>

LLVM IR (-O0):
%struct.dpl_eventq = type { i32 }
%struct.dpl_event = type { i32 }
define void @dpl_eventq_run(%struct.dpl_eventq* %0) {
%2 = alloca %struct.dpl_eventq*
%3 = alloca %struct.dpl_event*
store %struct.dpl_eventq* %0, %struct.dpl_eventq** %2
%4 = load %struct.dpl_eventq*, %struct.dpl_eventq** %2
%5 = call %struct.dpl_event* @dpl_eventq_get(%struct.dpl_eventq* %4)
store %struct.dpl_event* %5, %struct.dpl_event** %3
%6 = load %struct.dpl_event*, %struct.dpl_event** %3
%7 = call i32 @dpl_event_run(%struct.dpl_event* %6)
ret void
}

LLVM IR (-O2):
%struct.dpl_eventq = type { i32 }
%struct.dpl_event = type { i32 }
define void @dpl_eventq_run(%struct.dpl_eventq* %0) {
%2 = tail call %struct.dpl_event* @dpl_eventq_get(%struct.dpl_eventq* %0)
%3 = tail call i32 @dpl_event_run(%struct.dpl_event* %2)
ret void
}
/* Type definitions */
typedef scalar_t__ uLong;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
void printHash(uLong hash) { printf("    %lu\n", (unsigned long)hash); }


x86 assembly (clang, -O0):
<printHash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHash>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c" %lu\0A\00"
define void @printHash(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %3)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c" %lu\0A\00"
define void @printHash(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ convert_base_4_to_base_4_strange(int /*<<< orphan*/, char *);
int /*<<< orphan*/ convert_dec_to_another_base(int, int);
void convert_dec_to_base_4_strange(int num, char *result) {
  convert_base_4_to_base_4_strange(convert_dec_to_another_base(num, 4), result);
}


x86 assembly (clang, -O0):
<convert_dec_to_base_4_strange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
call   1040 <convert_dec_to_another_base@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1030 <convert_base_4_to_base_4_strange@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_dec_to_base_4_strange>:
push   %rbx
mov    %rsi,%rbx
mov    $0x4,%esi
call   1040 <convert_dec_to_another_base@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <convert_base_4_to_base_4_strange@plt>

LLVM IR (-O0):
define void @convert_dec_to_base_4_strange(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = call i32 @convert_dec_to_another_base(i32 %5, i32 4)
%7 = load i8*, i8** %4
%8 = call i32 @convert_base_4_to_base_4_strange(i32 %6, i8* %7)
ret void
}

LLVM IR (-O2):
define void @convert_dec_to_base_4_strange(i32 %0, i8* %1) {
%3 = tail call i32 @convert_dec_to_another_base(i32 %0, i32 4)
%4 = tail call i32 @convert_base_4_to_base_4_strange(i32 %3, i8* %1)
ret void
}
int main() {
  unsigned int a = 1 + (1 << 8) + (1 << 17) + (1 << 24);
  unsigned short *b = *((unsigned short *)(&a) + 1);
  printf("%u\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1020101,-0x8(%rbp)
movzwl -0x6(%rbp),%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x102,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i16*
store i32 0, i32* %1
store i32 16908545, i32* %2
%4 = bitcast i32* %2 to i16*
%5 = getelementptr inbounds i16, i16* %4, i64 1
%6 = load i16, i16* %5
%7 = zext i16 %6 to i64
%8 = inttoptr i64 %7 to i16*
store i16* %8, i16** %3
%9 = load i16*, i16** %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* inttoptr (i64 258 to i16*))
ret i32 0
}
/* Variables and functions */
scalar_t__ SCHED_OTHER;
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ printf(char *);
scalar_t__ sched_getscheduler(int /*<<< orphan*/);
int main(void) {
  if (sched_getscheduler(getpid()) != SCHED_OTHER)
    abort();
  printf("pass\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getpid@plt>
mov    %eax,%edi
call   1030 <sched_getscheduler@plt>
mov    0x2e6c(%rip),%rcx
cmp    (%rcx),%rax
je     1184 <main+0x34>
mov    $0x0,%al
call   1040 <abort@plt>
lea    0xe75(%rip),%rdi
call   1060 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <getpid@plt>
mov    %eax,%edi
call   1030 <sched_getscheduler@plt>
mov    0x2e7a(%rip),%rcx
cmp    (%rcx),%rax
jne    117e <main+0x2e>
lea    0xe8e(%rip),%rdi
call   1050 <puts@plt>
xor    %edi,%edi
call   1070 <exit@plt>
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
@SCHED_OTHER = global i64 0
@.str = [6 x i8] c"pass\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpid()
%3 = call i64 @sched_getscheduler(i32 %2)
%4 = load i64, i64* @SCHED_OTHER
%5 = icmp ne i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@SCHED_OTHER = global i64 0
@str = [5 x i8] c"pass\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i64 @sched_getscheduler(i32 %1)
%3 = load i64, i64* @SCHED_OTHER
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %0
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ ENOENT;
int /*<<< orphan*/ errno;
int rename(const char *oldname, const char *newname) {
  errno = ENOENT;
  return -1;
}


x86 assembly (clang, -O0):
<rename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rename>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOENT = global i32 0
@errno = global i32 0
define i32 @rename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @ENOENT
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOENT = global i32 0
@errno = global i32 0
define i32 @rename(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @ENOENT
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int allocate_and_init();
int /*<<< orphan*/ do_stuff();
int f7() {
  int rc = allocate_and_init();
  if (rc != 0)
    do_stuff();
  return rc;
}


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <allocate_and_init@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1143 <f7+0x23>
mov    $0x0,%al
call   1040 <do_stuff@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7>:
push   %rbx
xor    %eax,%eax
call   1030 <allocate_and_init@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1135 <f7+0x15>
xor    %eax,%eax
call   1040 <do_stuff@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f7() {
%1 = alloca i32
%2 = call i32 (...) @allocate_and_init()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @do_stuff()
br label %7
7: ; preds = %5, %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @f7() {
%1 = tail call i32 (...) @allocate_and_init()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @do_stuff()
br label %5
5: ; preds = %3, %0
ret i32 %1
}
void gtk_vseparator_new() {}


x86 assembly (clang, -O0):
<gtk_vseparator_new>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_vseparator_new>:
ret

LLVM IR (-O0):
define void @gtk_vseparator_new() {
ret void
}

LLVM IR (-O2):
define void @gtk_vseparator_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *errstr) {
  assert(errstr);
  fprintf(stderr, "error: %s\n", errstr);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeb7(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"error: %s\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @assert(i8* %3)
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"error: %s\0A\00"
define void @error(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ds_kvpair_destroy(void *);
void ds_kvpair_destructor(void *pair) { ds_kvpair_destroy(pair); }


x86 assembly (clang, -O0):
<ds_kvpair_destructor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ds_kvpair_destroy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ds_kvpair_destructor>:
jmp    1030 <ds_kvpair_destroy@plt>

LLVM IR (-O0):
define void @ds_kvpair_destructor(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ds_kvpair_destroy(i8* %3)
ret void
}

LLVM IR (-O2):
define void @ds_kvpair_destructor(i8* %0) {
%2 = tail call i32 @ds_kvpair_destroy(i8* %0)
ret void
}
/* Type definitions */
struct btf_type {
  int dummy;
};
struct btf_enum {
  int dummy;
};

/* Variables and functions */
struct btf_enum *btf_enum(const struct btf_type *t) {
  return (struct btf_enum *)(t + 1);
}


x86 assembly (clang, -O0):
<btf_enum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<btf_enum>:
lea    0x4(%rdi),%rax
ret

LLVM IR (-O0):
%struct.btf_enum = type { i32 }
%struct.btf_type = type { i32 }
define %struct.btf_enum* @btf_enum(%struct.btf_type* %0) {
%2 = alloca %struct.btf_type*
store %struct.btf_type* %0, %struct.btf_type** %2
%3 = load %struct.btf_type*, %struct.btf_type** %2
%4 = getelementptr inbounds %struct.btf_type, %struct.btf_type* %3, i64 1
%5 = bitcast %struct.btf_type* %4 to %struct.btf_enum*
ret %struct.btf_enum* %5
}

LLVM IR (-O2):
%struct.btf_enum = type { i32 }
%struct.btf_type = type { i32 }
define %struct.btf_enum* @btf_enum(%struct.btf_type* readnone %0) {
%2 = getelementptr inbounds %struct.btf_type, %struct.btf_type* %0, i64 1
%3 = bitcast %struct.btf_type* %2 to %struct.btf_enum*
ret %struct.btf_enum* %3
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int help(char *name) {
  fprintf(stderr, "Usage: %s program [arguments]\n", name);
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Usage: %s program [arguments]\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
ret i32 %6
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Usage: %s program [arguments]\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @help(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
ret i32 %4
}
void class_device_rename(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<class_device_rename>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<class_device_rename>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.class_device_rename = [20 x i8] c"class_device_rename\00"
define void @class_device_rename() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.class_device_rename, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.class_device_rename = [20 x i8] c"class_device_rename\00"
define void @class_device_rename() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.class_device_rename, i64 0, i64 0))
ret void
}
int SetSrcRGB8Palette(int nColors, unsigned int *lpRGBVals, int *lpIndices) {
  return -1;
}


x86 assembly (clang, -O0):
<SetSrcRGB8Palette>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetSrcRGB8Palette>:
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @SetSrcRGB8Palette(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
ret i32 -1
}

LLVM IR (-O2):
define i32 @SetSrcRGB8Palette(i32 %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ check(void *);
char *strdup(char *);
char *strdup_check(char *str) {
  str = strdup(str);
  check((void *)str);
  return str;
}


x86 assembly (clang, -O0):
<strdup_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <check@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup_check>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <check@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @strdup_check(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strdup(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @check(i8* %5)
%7 = load i8*, i8** %2
ret i8* %7
}

LLVM IR (-O2):
define i8* @strdup_check(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = tail call i32 @check(i8* %2)
ret i8* %2
}