xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef void *uint32_t;
typedef void *int32_t;

/* Variables and functions */
void *htonl(void *);
uint64_t fbi_swap_uint64_t(uint64_t u64) {
  union {
    uint64_t u64;
    struct {
      uint32_t high;
      uint32_t low;
    } u32;
  } swapper;
  int32_t swap;
  swapper.u64 = u64;
  swap = swapper.u32.high;
  swapper.u32.high = htonl(swapper.u32.low);
  swapper.u32.low = htonl(swap);
  return swapper.u64;
}


x86 assembly (clang, -O0):
<fbi_swap_uint64_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <htonl@plt>
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <htonl@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fbi_swap_uint64_t>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
call   1030 <htonl@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <htonl@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%union.anon = type { %struct.anon }
%struct.anon = type { i8*, i8* }
define i32 @fbi_swap_uint64_t(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
%4 = alloca i8*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = bitcast %union.anon* %3 to i32*
store i32 %5, i32* %6
%7 = bitcast %union.anon* %3 to %struct.anon*
%8 = getelementptr inbounds %struct.anon, %struct.anon* %7, i32 0, i32 0
%9 = load i8*, i8** %8
store i8* %9, i8** %4
%10 = bitcast %union.anon* %3 to %struct.anon*
%11 = getelementptr inbounds %struct.anon, %struct.anon* %10, i32 0, i32 1
%12 = load i8*, i8** %11
%13 = call i8* @htonl(i8* %12)
%14 = bitcast %union.anon* %3 to %struct.anon*
%15 = getelementptr inbounds %struct.anon, %struct.anon* %14, i32 0, i32 0
store i8* %13, i8** %15
%16 = load i8*, i8** %4
%17 = call i8* @htonl(i8* %16)
%18 = bitcast %union.anon* %3 to %struct.anon*
%19 = getelementptr inbounds %struct.anon, %struct.anon* %18, i32 0, i32 1
store i8* %17, i8** %19
%20 = bitcast %union.anon* %3 to i32*
%21 = load i32, i32* %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @fbi_swap_uint64_t(i32 %0) {
%2 = zext i32 %0 to i64
%3 = inttoptr i64 %2 to i8*
%4 = tail call i8* @htonl(i8* undef)
%5 = tail call i8* @htonl(i8* %3)
%6 = ptrtoint i8* %4 to i64
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int PAPI_get_multiplex(int);
void papif_get_multiplex_(int *EventSet, int *check) {
  *check = PAPI_get_multiplex(*EventSet);
}


x86 assembly (clang, -O0):
<papif_get_multiplex_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <PAPI_get_multiplex@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_get_multiplex_>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_get_multiplex@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @papif_get_multiplex_(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* %5
%7 = call i32 @PAPI_get_multiplex(i32 %6)
%8 = load i32*, i32** %4
store i32 %7, i32* %8
ret void
}

LLVM IR (-O2):
define void @papif_get_multiplex_(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @PAPI_get_multiplex(i32 %3)
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
int sprintf(char *, char *, int, int);
int write(int, char *, int);
int transbridgeon(int fp) {
  char LocalBuff[200];
  int LocalLength, Lcount;
  LocalLength = sprintf(LocalBuff, "%c%c\n", 0x04, 0x80);
  Lcount = write(fp, LocalBuff, LocalLength);
  return 0;
}


x86 assembly (clang, -O0):
<transbridgeon>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %edi,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
lea    0xec4(%rip),%rsi
mov    $0x4,%edx
mov    $0x80,%ecx
call   1040 <sprintf@plt>
mov    %eax,-0xd4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xd0(%rbp),%rsi
mov    -0xd4(%rbp),%edx
call   1030 <write@plt>
mov    %eax,-0xd8(%rbp)
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transbridgeon>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
mov    %edi,%ebx
lea    0xecd(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x4,%edx
mov    $0x80,%ecx
call   1040 <sprintf@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%c%c\0A\00"
define i32 @transbridgeon(i32 %0) {
%2 = alloca i32
%3 = alloca [200 x i8]
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 4, i32 128)
store i32 %7, i32* %4
%8 = load i32, i32* %2
%9 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%10 = load i32, i32* %4
%11 = call i32 @write(i32 %8, i8* %9, i32 %10)
store i32 %11, i32* %5
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%c%c\0A\00"
define i32 @transbridgeon(i32 %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 4, i32 128)
%5 = call i32 @write(i32 %0, i8* %3, i32 %4)
ret i32 0
}
int test_imm_FBint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xFB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FBint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0xfb,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FBint64_midword_mem>:
testb  $0xfb,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_FBint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 251
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_FBint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 16449536
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ OS_TaskRegister();
void task_5(void) {
  OS_TaskRegister();
  while (1)
    ;
  return;
}


x86 assembly (clang, -O0):
<task_5>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <OS_TaskRegister@plt>
jmp    111b <task_5+0xb>

x86 assembly (clang, -O2):
<task_5>:
push   %rax
xor    %eax,%eax
call   1030 <OS_TaskRegister@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <task_5+0x10>

LLVM IR (-O0):
define void @task_5() {
%1 = call i32 (...) @OS_TaskRegister()
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
define void @task_5() {
%1 = tail call i32 (...) @OS_TaskRegister()
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void writelines(char *lineptr[], int nl) {
  while (nl-- > 0) {
    printf("%s\n", *lineptr++);
  }
}


x86 assembly (clang, -O0):
<writelines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    1158 <writelines+0x48>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%rax
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
jmp    111f <writelines+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writelines>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    1146 <writelines+0x36>
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%ebp
lea    0xed9(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    (%rbx),%esi
add    $0x8,%rbx
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1130 <writelines+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @writelines(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %4
%7 = add nsw i32 %6, -1
store i32 %7, i32* %4
%8 = icmp sgt i32 %6, 0
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i8**, i8*** %3
%11 = getelementptr inbounds i8*, i8** %10, i32 1
store i8** %11, i8*** %3
%12 = load i8*, i8** %10
%13 = ptrtoint i8* %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %5
15: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @writelines(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i8** [ %8, %4 ], [ %0, %2 ]
%7 = add nsw i32 %5, -1
%8 = getelementptr inbounds i8*, i8** %6, i64 1
%9 = load i8*, i8** %6
%10 = ptrtoint i8* %9 to i64
%11 = trunc i64 %10 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = icmp ugt i32 %5, 1
br i1 %13, label %4, label %14
14: ; preds = %4, %2
ret void
}
/* Variables and functions */
int pvrgmain(int, char **);
int main(int argc, char *argv[]) { return pvrgmain(argc, argv); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <pvrgmain@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <pvrgmain@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @pvrgmain(i32 %0, i8** %1)
ret i32 %3
}
int R(int H) { return 256 / 2; }


x86 assembly (clang, -O0):
<R>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x80,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @R(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 128
}

LLVM IR (-O2):
define i32 @R(i32 %0) {
ret i32 128
}
/* Type definitions */
struct profile {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ profile_destroy(struct profile *);
int /*<<< orphan*/ profile_func(struct profile *);
int /*<<< orphan*/ profile_init(struct profile *);
int /*<<< orphan*/ profile_save(struct profile *);
int /*<<< orphan*/ profile_stats(struct profile *);
void profile_combo(struct profile *prof) {
  profile_init(prof);
  profile_func(prof);
  profile_stats(prof);
  profile_save(prof);
  profile_destroy(prof);
}


x86 assembly (clang, -O0):
<profile_combo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <profile_init@plt>
mov    -0x8(%rbp),%rdi
call   1070 <profile_func@plt>
mov    -0x8(%rbp),%rdi
call   1050 <profile_stats@plt>
mov    -0x8(%rbp),%rdi
call   1060 <profile_save@plt>
mov    -0x8(%rbp),%rdi
call   1040 <profile_destroy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<profile_combo>:
push   %rbx
mov    %rdi,%rbx
call   1030 <profile_init@plt>
mov    %rbx,%rdi
call   1070 <profile_func@plt>
mov    %rbx,%rdi
call   1050 <profile_stats@plt>
mov    %rbx,%rdi
call   1060 <profile_save@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <profile_destroy@plt>

LLVM IR (-O0):
%struct.profile = type { i32 }
define void @profile_combo(%struct.profile* %0) {
%2 = alloca %struct.profile*
store %struct.profile* %0, %struct.profile** %2
%3 = load %struct.profile*, %struct.profile** %2
%4 = call i32 @profile_init(%struct.profile* %3)
%5 = load %struct.profile*, %struct.profile** %2
%6 = call i32 @profile_func(%struct.profile* %5)
%7 = load %struct.profile*, %struct.profile** %2
%8 = call i32 @profile_stats(%struct.profile* %7)
%9 = load %struct.profile*, %struct.profile** %2
%10 = call i32 @profile_save(%struct.profile* %9)
%11 = load %struct.profile*, %struct.profile** %2
%12 = call i32 @profile_destroy(%struct.profile* %11)
ret void
}

LLVM IR (-O2):
%struct.profile = type { i32 }
define void @profile_combo(%struct.profile* %0) {
%2 = tail call i32 @profile_init(%struct.profile* %0)
%3 = tail call i32 @profile_func(%struct.profile* %0)
%4 = tail call i32 @profile_stats(%struct.profile* %0)
%5 = tail call i32 @profile_save(%struct.profile* %0)
%6 = tail call i32 @profile_destroy(%struct.profile* %0)
ret void
}
XChangeKeyboardControl() {}


x86 assembly (clang, -O0):
<XChangeKeyboardControl>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @XChangeKeyboardControl() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XChangeKeyboardControl() {
ret i32 undef
}
int mkdir2(char *pathname) { return -1; }


x86 assembly (clang, -O0):
<mkdir2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mkdir2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 -1
}

LLVM IR (-O2):
define i32 @mkdir2(i8* nocapture readnone %0) {
ret i32 -1
}
void time_add(unsigned int time, int ret) {}


x86 assembly (clang, -O0):
<time_add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @time_add(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @time_add(i32 %0, i32 %1) {
ret void
}
void test_dquoted_escaping_escapes_special_chars(void) {
  char *const escaped = escape_for_dquotes("-\aa\bb\fc\nd\re\tf\vg", 0);
  do {
    seatest_assert_string_equal("-\\aa\\bb\\fc\\nd\\re\\tf\\vg", escaped,
                                __FUNCTION__, 19);
  } while (0);
  free(escaped);
}


x86 assembly (clang, -O0):
<test_dquoted_escaping_escapes_special_chars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <escape_for_dquotes@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb7(%rip),%rdi
lea    0xec7(%rip),%rdx
mov    $0x13,%ecx
mov    $0x0,%al
call   1050 <seatest_assert_string_equal@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_dquoted_escaping_escapes_special_chars>:
push   %rbx
lea    0xec8(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <escape_for_dquotes@plt>
movslq %eax,%rbx
lea    0xec5(%rip),%rdi
lea    0xed5(%rip),%rdx
mov    %rbx,%rsi
mov    $0x13,%ecx
xor    %eax,%eax
call   1050 <seatest_assert_string_equal@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"-\07a\08b\0Cc\0Ad\0De\09f\0Bg\00"
@.str.1 = [23 x i8] c"-\\aa\\bb\\fc\\nd\\re\\tf\\vg\00"
@__FUNCTION__.test_dquoted_escaping_escapes_special_chars = [44 x i8] c"test_dquoted_escaping_escapes_special_chars\00"
define void @test_dquoted_escaping_escapes_special_chars() {
%1 = alloca i8*
%2 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @escape_for_dquotes to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %1
br label %5
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__FUNCTION__.test_dquoted_escaping_escapes_special_chars, i64 0, i64 0), i32 19)
br label %8
8: ; preds = %5
%9 = load i8*, i8** %1
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"-\07a\08b\0Cc\0Ad\0De\09f\0Bg\00"
@.str.1 = [23 x i8] c"-\\aa\\bb\\fc\\nd\\re\\tf\\vg\00"
@__FUNCTION__.test_dquoted_escaping_escapes_special_chars = [44 x i8] c"test_dquoted_escaping_escapes_special_chars\00"
define void @test_dquoted_escaping_escapes_special_chars() {
%1 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @escape_for_dquotes to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = sext i32 %1 to i64
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__FUNCTION__.test_dquoted_escaping_escapes_special_chars, i64 0, i64 0), i32 19)
tail call void @free(i8* %3)
ret void
}
/* Variables and functions */
unsigned char *chacha8_encrypt(unsigned char *, size_t *, unsigned char const *,
                               size_t, unsigned char const *,
                               unsigned char const *);
unsigned char *crypt_encrypt_chacha8(unsigned char *out, size_t *out_len,
                                     const unsigned char *in, size_t in_len,
                                     const unsigned char *nonce,
                                     const unsigned char *key) {
  return chacha8_encrypt(out, out_len, in, in_len, nonce, key);
}


x86 assembly (clang, -O0):
<crypt_encrypt_chacha8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <chacha8_encrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypt_encrypt_chacha8>:
jmp    1030 <chacha8_encrypt@plt>

LLVM IR (-O0):
define i8* @crypt_encrypt_chacha8(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i64*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i8*
store i8* %0, i8** %7
store i64* %1, i64** %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i8*, i8** %7
%14 = load i64*, i64** %8
%15 = load i8*, i8** %9
%16 = load i64, i64* %10
%17 = load i8*, i8** %11
%18 = load i8*, i8** %12
%19 = call i8* @chacha8_encrypt(i8* %13, i64* %14, i8* %15, i64 %16, i8* %17, i8* %18)
ret i8* %19
}

LLVM IR (-O2):
define i8* @crypt_encrypt_chacha8(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = tail call i8* @chacha8_encrypt(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5)
ret i8* %7
}
void I_SetCPUHighPerformance(const int mode) {}


x86 assembly (clang, -O0):
<I_SetCPUHighPerformance>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @I_SetCPUHighPerformance(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @I_SetCPUHighPerformance(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ term_clear();
int /*<<< orphan*/ term_redisplay();
void term_full_redisplay(void) {
  term_clear();
  term_redisplay();
}


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

x86 assembly (clang, -O2):
<term_full_redisplay>:
push   %rax
xor    %eax,%eax
call   1040 <term_clear@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <term_redisplay@plt>

LLVM IR (-O0):
define void @term_full_redisplay() {
%1 = call i32 (...) @term_clear()
%2 = call i32 (...) @term_redisplay()
ret void
}

LLVM IR (-O2):
define void @term_full_redisplay() {
%1 = tail call i32 (...) @term_clear()
%2 = tail call i32 (...) @term_redisplay()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pal_stop_cpu(int);
void cpu_halt(void) { pal_stop_cpu(true); }


x86 assembly (clang, -O0):
<cpu_halt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <pal_stop_cpu@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_halt>:
mov    $0x1,%edi
jmp    1030 <pal_stop_cpu@plt>

LLVM IR (-O0):
define void @cpu_halt() {
%1 = call i32 @pal_stop_cpu(i32 1)
ret void
}

LLVM IR (-O2):
define void @cpu_halt() {
%1 = tail call i32 @pal_stop_cpu(i32 1)
ret void
}
void localvars_after_alloca(char c, short s, int i, long l) {
  char *z = __builtin_alloca(s + 50);
  c = 'a';
  s = 5;
  i = 6;
  l = 7;
}


x86 assembly (clang, -O0):
<localvars_after_alloca>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    %rcx,-0x10(%rbp)
movswq -0x4(%rbp),%rcx
add    $0x41,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rax
sub    %rcx,%rax
mov    %rax,%rsp
mov    %rax,-0x18(%rbp)
movb   $0x61,-0x1(%rbp)
movw   $0x5,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
movq   $0x7,-0x10(%rbp)
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @localvars_after_alloca(i8 signext %0, i16 signext %1, i32 %2, i64 %3) {
%5 = alloca i8
%6 = alloca i16
%7 = alloca i32
%8 = alloca i64
%9 = alloca i8*
store i8 %0, i8* %5
store i16 %1, i16* %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%10 = load i16, i16* %6
%11 = sext i16 %10 to i32
%12 = add nsw i32 %11, 50
%13 = sext i32 %12 to i64
%14 = alloca i8, i64 %13
store i8* %14, i8** %9
store i8 97, i8* %5
store i16 5, i16* %6
store i32 6, i32* %7
store i64 7, i64* %8
ret void
}

LLVM IR (-O2):
define void @localvars_after_alloca(i8 signext %0, i16 signext %1, i32 %2, i64 %3) {
ret void
}
/* Type definitions */
struct node_cmdline_parser_params {
  int dummy;
};
struct node_args_info {
  int dummy;
};

/* Variables and functions */
int node_cmdline_parser_internal(int, char **, struct node_args_info *,
                                 struct node_cmdline_parser_params *,
                                 int /*<<< orphan*/);
int node_cmdline_parser_ext(int argc, char **argv,
                            struct node_args_info *args_info,
                            struct node_cmdline_parser_params *params) {
  int result;
  result = node_cmdline_parser_internal(argc, argv, args_info, params, 0);
  return result;
}


x86 assembly (clang, -O0):
<node_cmdline_parser_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <node_cmdline_parser_internal@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<node_cmdline_parser_ext>:
xor    %r8d,%r8d
jmp    1030 <node_cmdline_parser_internal@plt>

LLVM IR (-O0):
%struct.node_args_info = type { i32 }
%struct.node_cmdline_parser_params = type { i32 }
define i32 @node_cmdline_parser_ext(i32 %0, i8** %1, %struct.node_args_info* %2, %struct.node_cmdline_parser_params* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca %struct.node_args_info*
%8 = alloca %struct.node_cmdline_parser_params*
%9 = alloca i32
store i32 %0, i32* %5
store i8** %1, i8*** %6
store %struct.node_args_info* %2, %struct.node_args_info** %7
store %struct.node_cmdline_parser_params* %3, %struct.node_cmdline_parser_params** %8
%10 = load i32, i32* %5
%11 = load i8**, i8*** %6
%12 = load %struct.node_args_info*, %struct.node_args_info** %7
%13 = load %struct.node_cmdline_parser_params*, %struct.node_cmdline_parser_params** %8
%14 = call i32 @node_cmdline_parser_internal(i32 %10, i8** %11, %struct.node_args_info* %12, %struct.node_cmdline_parser_params* %13, i32 0)
store i32 %14, i32* %9
%15 = load i32, i32* %9
ret i32 %15
}

LLVM IR (-O2):
%struct.node_args_info = type { i32 }
%struct.node_cmdline_parser_params = type { i32 }
define i32 @node_cmdline_parser_ext(i32 %0, i8** %1, %struct.node_args_info* %2, %struct.node_cmdline_parser_params* %3) {
%5 = tail call i32 @node_cmdline_parser_internal(i32 %0, i8** %1, %struct.node_args_info* %2, %struct.node_cmdline_parser_params* %3, i32 0)
ret i32 %5
}
/* Variables and functions */
scalar_t__ _gettemp(char *, int *, int /*<<< orphan*/, int /*<<< orphan*/, int);
int mkostemp(char *path, int oflags) {
  int fd;
  return (_gettemp(path, &fd, 0, 0, oflags) ? fd : -1);
}


x86 assembly (clang, -O0):
<mkostemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%r8d
lea    -0x10(%rbp),%rsi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <_gettemp@plt>
cmp    $0x0,%rax
je     1149 <mkostemp+0x39>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1156 <mkostemp+0x46>
mov    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1156 <mkostemp+0x46>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkostemp>:
push   %rax
mov    %esi,%r8d
lea    0x4(%rsp),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <_gettemp@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mkostemp(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i64 @_gettemp(i8* %6, i32* %5, i32 0, i32 0, i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* %5
br label %13
12: ; preds = %2
br label %13
13: ; preds = %12, %10
%14 = phi i32 [ %11, %10 ], [ -1, %12 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @mkostemp(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i64 @_gettemp(i8* %0, i32* %3, i32 0, i32 0, i32 %1)
%6 = icmp eq i64 %5, 0
%7 = load i32, i32* %3
%8 = select i1 %6, i32 -1, i32 %7
ret i32 %8
}
int f(int a, int b, int c) {
  a += (short)b * (short)c;
  return a;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cwtl
mov    -0xc(%rbp),%ecx
movswl %cx,%ecx
imul   %ecx,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movswl %si,%ecx
movswl %dx,%eax
imul   %ecx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f(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
%7 = load i32, i32* %5
%8 = trunc i32 %7 to i16
%9 = sext i16 %8 to i32
%10 = load i32, i32* %6
%11 = trunc i32 %10 to i16
%12 = sext i16 %11 to i32
%13 = mul nsw i32 %9, %12
%14 = load i32, i32* %4
%15 = add nsw i32 %14, %13
store i32 %15, i32* %4
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 16
%5 = ashr exact i32 %4, 16
%6 = shl i32 %2, 16
%7 = ashr exact i32 %6, 16
%8 = mul nsw i32 %7, %5
%9 = add nsw i32 %8, %0
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void go_to_xy(int x, int y) { printf("%c[%d;%df", 0x1B, y + 2, x + 2); }


x86 assembly (clang, -O0):
<go_to_xy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
add    $0x2,%edx
mov    -0x4(%rbp),%ecx
add    $0x2,%ecx
lea    0xecf(%rip),%rdi
mov    $0x1b,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<go_to_xy>:
lea    0x2(%rsi),%edx
lea    0x2(%rdi),%ecx
lea    0xee3(%rip),%rdi
mov    $0x1b,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%c[%d;%df\00"
define void @go_to_xy(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 2
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 2
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 27, i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%c[%d;%df\00"
define void @go_to_xy(i32 %0, i32 %1) {
%3 = add nsw i32 %1, 2
%4 = add nsw i32 %0, 2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 27, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
double __ocml_copysign_f64(double, double);
double copysign(double x, double y) { return __ocml_copysign_f64(x, y); }


x86 assembly (clang, -O0):
<copysign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <__ocml_copysign_f64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copysign>:
jmp    1030 <__ocml_copysign_f64@plt>

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

LLVM IR (-O2):
define double @copysign(double %0, double %1) {
%3 = tail call double @__ocml_copysign_f64(double %0, double %1)
ret double %3
}
/* Type definitions */
struct _rwlock {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ trie_readlock(struct _rwlock *);
void trie_readlock_upgrd(struct _rwlock *rw) { trie_readlock(rw); }


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

x86 assembly (clang, -O2):
<trie_readlock_upgrd>:
jmp    1030 <trie_readlock@plt>

LLVM IR (-O0):
%struct._rwlock = type { i32 }
define void @trie_readlock_upgrd(%struct._rwlock* %0) {
%2 = alloca %struct._rwlock*
store %struct._rwlock* %0, %struct._rwlock** %2
%3 = load %struct._rwlock*, %struct._rwlock** %2
%4 = call i32 @trie_readlock(%struct._rwlock* %3)
ret void
}

LLVM IR (-O2):
%struct._rwlock = type { i32 }
define void @trie_readlock_upgrd(%struct._rwlock* %0) {
%2 = tail call i32 @trie_readlock(%struct._rwlock* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ getchar();
char *malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ syscall(int);
int main(void) {
  char *p;
  syscall(223);
  getchar();
  printf("IGNORE ");
  p = malloc((1024 * 1024 * 1024));
  memset(p, 0, (1024 * 1024 * 1024));
  free(p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xdf,%edi
call   1070 <syscall@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
mov    $0x40000000,%edi
call   1080 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x40000000,%edx
call   1050 <memset@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xdf,%edi
call   1070 <syscall@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
mov    $0x40000000,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x40000000,%edx
call   1050 <memset@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"IGNORE \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i32 @syscall(i32 223)
%4 = call i32 (...) @getchar()
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = call i8* @malloc(i32 1073741824)
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @memset(i8* %7, i32 0, i32 1073741824)
%9 = load i8*, i8** %2
%10 = call i32 @free(i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"IGNORE \00"
define i32 @main() {
%1 = tail call i32 @syscall(i32 223)
%2 = tail call i32 (...) @getchar()
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = tail call dereferenceable_or_null(1073741824) i8* @malloc(i32 1073741824)
%5 = tail call i32 @memset(i8* %4, i32 0, i32 1073741824)
%6 = tail call i32 @free(i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void libtest2_ctor(void) { printf("libtest2: constructor!\n"); }


x86 assembly (clang, -O0):
<libtest2_ctor>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<libtest2_ctor>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"libtest2: constructor!\0A\00"
define void @libtest2_ctor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"libtest2: constructor!\00"
define void @libtest2_ctor() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
void RSA_setup_blinding(void) {}


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

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

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

LLVM IR (-O2):
define void @RSA_setup_blinding() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ tmpl(char *);
void main() {
  int n, m;
  int i = 1;
  tmpl("(le(i,j,k,n),le(i,j,k,n))");
  while (i < n) {
    if (m > 0) {
      i = 2 * i;
    } else {
      i = 3 * i;
    }
  }
  assert(i > 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0xc(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <tmpl@plt>
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    116b <main+0x4b>
cmpl   $0x0,-0x8(%rbp)
jle    115f <main+0x3f>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1166 <main+0x46>
imul   $0x3,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    113b <main+0x1b>
cmpl   $0x0,-0xc(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <tmpl@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"(le(i,j,k,n),le(i,j,k,n))\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %3
%4 = call i32 @tmpl(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %18, %0
%6 = load i32, i32* %3
%7 = load i32, i32* %1
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %19
9: ; preds = %5
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %3
%14 = mul nsw i32 2, %13
store i32 %14, i32* %3
br label %18
15: ; preds = %9
%16 = load i32, i32* %3
%17 = mul nsw i32 3, %16
store i32 %17, i32* %3
br label %18
18: ; preds = %15, %12
br label %5
19: ; preds = %5
%20 = load i32, i32* %3
%21 = icmp sgt i32 %20, 0
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"(le(i,j,k,n),le(i,j,k,n))\00"
define void @main() {
%1 = tail call i32 @tmpl(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @assert(i32 1)
ret void
}
/* Variables and functions */
int syscall(int, char const *, int, void *, size_t, size_t *);
int query_module(const char *name, int which, void *buf, size_t bufsize,
                 size_t *ret) {
  return syscall(167, name, which, buf, bufsize, ret);
}


x86 assembly (clang, -O0):
<query_module>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    $0xa7,%edi
call   1030 <syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<query_module>:
mov    %r8,%r9
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0xa7,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @query_module(i8* %0, i32 %1, i8* %2, i64 %3, i64* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i64*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i64* %4, i64** %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load i64, i64* %9
%15 = load i64*, i64** %10
%16 = call i32 @syscall(i32 167, i8* %11, i32 %12, i8* %13, i64 %14, i64* %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @query_module(i8* %0, i32 %1, i8* %2, i64 %3, i64* %4) {
%6 = tail call i32 @syscall(i32 167, i8* %0, i32 %1, i8* %2, i64 %3, i64* %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int /*<<< orphan*/ perror(char *);
int shmctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int des_shm(int shmid) {
  int ret;
  ret = shmctl(shmid, IPC_RMID, NULL) == -1;
  if (ret == -1)
    perror("shmctl()");
  return ret;
}


x86 assembly (clang, -O0):
<des_shm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <shmctl@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1164 <des_shm+0x44>
lea    0xea1(%rip),%rdi
call   1040 <perror@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<des_shm>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <shmctl@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@IPC_RMID = global i32 0
@.str = [9 x i8] c"shmctl()\00"
define i32 @des_shm(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @IPC_RMID
%6 = call i32 @shmctl(i32 %4, i32 %5, i32* null)
%7 = icmp eq i32 %6, -1
%8 = zext i1 %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %1
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@IPC_RMID = global i32 0
define i32 @des_shm(i32 %0) {
%2 = load i32, i32* @IPC_RMID
%3 = tail call i32 @shmctl(i32 %0, i32 %2, i32* null)
%4 = icmp eq i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ X509V3_EXT_METHOD;

/* Variables and functions */
int ext_cmp(int /*<<< orphan*/ const *const *,
            int /*<<< orphan*/ const *const *);
int ext_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) {
  const X509V3_EXT_METHOD *const *a = a_;
  const X509V3_EXT_METHOD *const *b = b_;
  return ext_cmp(a, b);
}


x86 assembly (clang, -O0):
<ext_cmp_BSEARCH_CMP_FN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
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    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <ext_cmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext_cmp_BSEARCH_CMP_FN>:
jmp    1030 <ext_cmp@plt>

LLVM IR (-O0):
define i32 @ext_cmp_BSEARCH_CMP_FN(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*** %5
%12 = load i32**, i32*** %6
%13 = call i32 @ext_cmp(i32** %11, i32** %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @ext_cmp_BSEARCH_CMP_FN(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i32**
%4 = bitcast i8* %1 to i32**
%5 = tail call i32 @ext_cmp(i32** %3, i32** %4)
ret i32 %5
}
int null_PCAP_MAJOR_VERSION(void *p) {
  p = (p);
  return 0;
}


x86 assembly (clang, -O0):
<null_PCAP_MAJOR_VERSION>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_PCAP_MAJOR_VERSION>:
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @null_PCAP_MAJOR_VERSION(i8* nocapture readnone %0) {
ret i32 0
}
int isBootFromNorFlash(void) {
  volatile int *p = (volatile int *)0;
  int val;
  val = *p;
  *p = 0x12345678;
  if (*p == 0x12345678) {
    *p = val;
    return 0;
  } else
    return 1;
}


x86 assembly (clang, -O0):
<isBootFromNorFlash>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x12345678,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    $0x12345678,%eax
jne    1145 <isBootFromNorFlash+0x45>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    114c <isBootFromNorFlash+0x4c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isBootFromNorFlash>:
mov    0x0,%ecx
movl   $0x12345678,0x0
78 56 34 12
mov    0x0,%edx
mov    $0x1,%eax
cmp    $0x12345678,%edx
jne    112f <isBootFromNorFlash+0x2f>
mov    %ecx,0x0
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isBootFromNorFlash() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32* null, i32** %2
%4 = load i32*, i32** %2
%5 = load volatile i32, i32* %4
store i32 %5, i32* %3
%6 = load i32*, i32** %2
store volatile i32 305419896, i32* %6
%7 = load i32*, i32** %2
%8 = load volatile i32, i32* %7
%9 = icmp eq i32 %8, 305419896
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = load i32, i32* %3
%12 = load i32*, i32** %2
store volatile i32 %11, i32* %12
store i32 0, i32* %1
br label %14
13: ; preds = %0
store i32 1, i32* %1
br label %14
14: ; preds = %13, %10
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @isBootFromNorFlash() {
%1 = load volatile i32, i32* null
store volatile i32 305419896, i32* null
%2 = load volatile i32, i32* null
%3 = icmp eq i32 %2, 305419896
br i1 %3, label %4, label %5
4: ; preds = %0
store volatile i32 %1, i32* null
br label %5
5: ; preds = %0, %4
%6 = phi i32 [ 0, %4 ], [ 1, %0 ]
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *fgets(char *, int, int /*<<< orphan*/ *);
char *pc_readsrc(void *handle, unsigned char *target, int maxchars) {
  return fgets((char *)target, maxchars, (FILE *)handle);
}


x86 assembly (clang, -O0):
<pc_readsrc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%rdx
call   1030 <fgets@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pc_readsrc>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <fgets@plt>

LLVM IR (-O0):
define i8* @pc_readsrc(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = call i8* @fgets(i8* %7, i32 %8, i32* %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @pc_readsrc(i8* nocapture %0, i8* %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = tail call i8* @fgets(i8* %1, i32 %2, i32* %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int id(int);
void main() {
  int input = 10;
  int result = id(input);
  if (result != 10) {
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <id@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
je     114b <main+0x2b>
mov    $0x0,%al
call   1030 <__VERIFIER_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1040 <id@plt>
cmp    $0xa,%eax
jne    1132 <main+0x12>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <__VERIFIER_error@plt>

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @id(i32 10)
%2 = icmp eq i32 %1, 10
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @__VERIFIER_error()
br label %5
5: ; preds = %3, %0
ret void
}
const char *pathcon_nm9_name_in(int i) {
  switch (i) {
  case 0:
    return "i0";
  case 1:
    return "i1";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<pathcon_nm9_name_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <pathcon_nm9_name_in+0x2b>
jmp    111a <pathcon_nm9_name_in+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <pathcon_nm9_name_in+0x3b>
jmp    114b <pathcon_nm9_name_in+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <pathcon_nm9_name_in+0x53>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <pathcon_nm9_name_in+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm9_name_in>:
xor    %ecx,%ecx
cmp    $0x1,%edi
lea    0xef7(%rip),%rax
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee7(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
define i8* @pathcon_nm9_name_in(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* null, i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
define i8* @pathcon_nm9_name_in(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
long long bit46() { return 0x0000400000000000LL; }


x86 assembly (clang, -O0):
<bit46>:
push   %rbp
mov    %rsp,%rbp
movabs $0x400000000000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit46>:
movabs $0x400000000000,%rax
ret

LLVM IR (-O0):
define i64 @bit46() {
ret i64 70368744177664
}

LLVM IR (-O2):
define i64 @bit46() {
ret i64 70368744177664
}