xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ putc(char const, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void prints(const char *s) {
  for (; *s != '\n'; ++s) {
    putc(*s, stdout);
  }
  putc('\n', stdout);
  return;
}


x86 assembly (clang, -O0):
<prints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1154 <prints+0x44>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    0x2ea7(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1030 <putc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <prints+0xc>
mov    0x2e85(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prints>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
cmp    $0xa,%al
je     1146 <prints+0x36>
mov    %rdi,%rbx
add    $0x1,%rbx
mov    0x2eb8(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r14),%esi
movsbl %al,%edi
call   1030 <putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
cmp    $0xa,%al
jne    1130 <prints+0x20>
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putc@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @prints(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %13, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 10
br i1 %7, label %8, label %16
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = load i32, i32* @stdout
%12 = call i32 @putc(i8 signext %10, i32 %11)
br label %13
13: ; preds = %8
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %2
br label %3
16: ; preds = %3
%17 = load i32, i32* @stdout
%18 = call i32 @putc(i8 signext 10, i32 %17)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @prints(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 10
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = load i32, i32* @stdout
%8 = tail call i32 @putc(i8 signext %5, i32 %7)
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 10
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = load i32, i32* @stdout
%14 = tail call i32 @putc(i8 signext 10, i32 %13)
ret void
}
void ath_dynack_node_deinit(struct ath_hw *ah, struct ath_node *an) {}


x86 assembly (clang, -O0):
<ath_dynack_node_deinit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ath_hw = type opaque
%struct.ath_node = type opaque
define void @ath_dynack_node_deinit(%struct.ath_hw* %0, %struct.ath_node* %1) {
%3 = alloca %struct.ath_hw*
%4 = alloca %struct.ath_node*
store %struct.ath_hw* %0, %struct.ath_hw** %3
store %struct.ath_node* %1, %struct.ath_node** %4
ret void
}

LLVM IR (-O2):
%struct.ath_hw = type opaque
%struct.ath_node = type opaque
define void @ath_dynack_node_deinit(%struct.ath_hw* nocapture %0, %struct.ath_node* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float, float, float, float, float,
                          float, float, float);
g(float a, float b, float c, float d, float e, float f, float g, float h,
  float i) {
  printf("%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f\n", a, b, c, d, e, f, g,
         h, i);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  0x10(%rbp),%xmm8
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  %xmm3,-0x14(%rbp)
movss  %xmm4,-0x18(%rbp)
movss  %xmm5,-0x1c(%rbp)
movss  %xmm6,-0x20(%rbp)
movss  %xmm7,-0x24(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movss  -0x14(%rbp),%xmm3
movss  -0x18(%rbp),%xmm4
movss  -0x1c(%rbp),%xmm5
movss  -0x20(%rbp),%xmm6
movss  -0x24(%rbp),%xmm7
movss  0x10(%rbp),%xmm8
lea    0xe85(%rip),%rdi
movss  %xmm8,(%rsp)
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [46 x i8] c"%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f\0A\00"
define i32 @g(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float %8) {
%10 = alloca i32
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca float
store float %0, float* %11
store float %1, float* %12
store float %2, float* %13
store float %3, float* %14
store float %4, float* %15
store float %5, float* %16
store float %6, float* %17
store float %7, float* %18
store float %8, float* %19
%20 = load float, float* %11
%21 = load float, float* %12
%22 = load float, float* %13
%23 = load float, float* %14
%24 = load float, float* %15
%25 = load float, float* %16
%26 = load float, float* %17
%27 = load float, float* %18
%28 = load float, float* %19
%29 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), float %20, float %21, float %22, float %23, float %24, float %25, float %26, float %27, float %28)
%30 = load i32, i32* %10
ret i32 %30
}

LLVM IR (-O2):
@.str = [46 x i8] c"%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f\0A\00"
define i32 @g(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float %8) {
%10 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float %8)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printInt(void *val) {
  printf("Printing Element.\n");
  printf("%d\n", *(int *)val);
}


x86 assembly (clang, -O0):
<printInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printInt>:
push   %rbx
mov    %rdi,%rbx
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%esi
lea    0xec7(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Printing Element.\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define void @printInt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d\0A\00"
@str = [18 x i8] c"Printing Element.\00"
define void @printInt(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void whileTest() {
  int x = 0;
  while (2 == 3)
    x = 4;
  assert(x == 4);
}


x86 assembly (clang, -O0):
<whileTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    112e <whileTest+0x1e>
jmp    113a <whileTest+0x2a>
movl   $0x4,-0x4(%rbp)
jmp    111f <whileTest+0xf>
cmpl   $0x4,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<whileTest>:
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @whileTest() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %3, %0
br i1 false, label %3, label %4
3: ; preds = %2
store i32 4, i32* %1
br label %2
4: ; preds = %2
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 4
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret void
}

LLVM IR (-O2):
define void @whileTest() {
%1 = tail call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x7a() {
  Assert_real((ispunct(122) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              615, ("ispunct should be 0 for z"));
}


x86 assembly (clang, -O0):
<t_ispunct_0x7a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7a,%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x267,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0x7a>:
push   %rax
mov    $0x7a,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x267,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for z\00"
define void @t_ispunct_0x7a() {
%1 = call i64 @ispunct(i32 122)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 615, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for z\00"
define void @t_ispunct_0x7a() {
%1 = tail call i64 @ispunct(i32 122)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 615, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ invalid_phase(char *);
void phase_1(char *input) { invalid_phase("1a"); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"1a\00"
define void @phase_1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @invalid_phase(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"1a\00"
define void @phase_1(i8* nocapture readnone %0) {
%2 = tail call i32 @invalid_phase(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
void pop_ItCtx(void) {}


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

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

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

LLVM IR (-O2):
define void @pop_ItCtx() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime_r(int /*<<< orphan*/ *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
struct tm *get_localtime(struct tm *result) {
  time_t t = time(NULL);
  return localtime_r(&t, result);
}


x86 assembly (clang, -O0):
<get_localtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
call   1030 <localtime_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_localtime>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <localtime_r@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define %struct.tm* @get_localtime(%struct.tm* %0) {
%2 = alloca %struct.tm*
%3 = alloca i32
store %struct.tm* %0, %struct.tm** %2
%4 = call i32 @time(i32* null)
store i32 %4, i32* %3
%5 = load %struct.tm*, %struct.tm** %2
%6 = call %struct.tm* @localtime_r(i32* %3, %struct.tm* %5)
ret %struct.tm* %6
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define %struct.tm* @get_localtime(%struct.tm* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = call %struct.tm* @localtime_r(i32* %2, %struct.tm* %0)
ret %struct.tm* %5
}
unsigned long long getGcm(unsigned long long a, unsigned long long b) {
  unsigned long long c;
  while (b != 0) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}


x86 assembly (clang, -O0):
<getGcm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113c <getGcm+0x3c>
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    110c <getGcm+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getGcm>:
mov    %rdi,%rax
test   %rsi,%rsi
je     1135 <getGcm+0x35>
mov    %rsi,%rdx
jmp    111d <getGcm+0x1d>
nopl   (%rax)
xor    %edx,%edx
div    %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1132 <getGcm+0x32>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1110 <getGcm+0x10>
xor    %edx,%edx
div    %ecx
jmp    1115 <getGcm+0x15>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @getGcm(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
br label %6
6: ; preds = %9, %2
%7 = load i64, i64* %4
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load i64, i64* %3
%11 = load i64, i64* %4
%12 = urem i64 %10, %11
store i64 %12, i64* %5
%13 = load i64, i64* %4
store i64 %13, i64* %3
%14 = load i64, i64* %5
store i64 %14, i64* %4
br label %6
15: ; preds = %6
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
define i64 @getGcm(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %6, %4 ], [ %0, %2 ]
%6 = phi i64 [ %7, %4 ], [ %1, %2 ]
%7 = urem i64 %5, %6
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i64 [ %0, %2 ], [ %6, %4 ]
ret i64 %10
}
/* Variables and functions */
int rom_present(char *);
int oti067_ama932j_available(void) {
  return (rom_present(L"roms/machines/ama932j/oti067.bin"));
}


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

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

LLVM IR (-O0):
@.str = [33 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 109, i32 97, i32 99, i32 104, i32 105, i32 110, i32 101, i32 115, i32 47, i32 97, i32 109, i32 97, i32 57, i32 51, i32 50, i32 106, i32 47, i32 111, i32 116, i32 105, i32 48, i32 54, i32 55, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @oti067_ama932j_available() {
%1 = call i32 @rom_present(i8* bitcast ([33 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [33 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 109, i32 97, i32 99, i32 104, i32 105, i32 110, i32 101, i32 115, i32 47, i32 97, i32 109, i32 97, i32 57, i32 51, i32 50, i32 106, i32 47, i32 111, i32 116, i32 105, i32 48, i32 54, i32 55, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @oti067_ama932j_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([33 x i32]* @.str to i8*))
ret i32 %1
}
unsigned int gf_add(struct gf *f, unsigned int a, unsigned int b) {
  return a ^ b;
}


x86 assembly (clang, -O0):
<gf_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf_add>:
mov    %esi,%eax
xor    %edx,%eax
ret

LLVM IR (-O0):
%struct.gf = type opaque
define i32 @gf_add(%struct.gf* %0, i32 %1, i32 %2) {
%4 = alloca %struct.gf*
%5 = alloca i32
%6 = alloca i32
store %struct.gf* %0, %struct.gf** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = xor i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
%struct.gf = type opaque
define i32 @gf_add(%struct.gf* nocapture readnone %0, i32 %1, i32 %2) {
%4 = xor i32 %2, %1
ret i32 %4
}
int test_imm_0Eint16_mem(short *val) {
  return ((*val) & (0x0E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Eint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xe,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_0Eint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, 14
%7 = icmp ne i32 %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_0Eint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 14
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ io_hlt();
void task_idle(void) {
  for (;;)
    io_hlt();
}


x86 assembly (clang, -O0):
<task_idle>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <task_idle+0x9>
mov    $0x0,%al
call   1030 <io_hlt@plt>
jmp    1119 <task_idle+0x9>

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

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

LLVM IR (-O2):
define void @task_idle() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @io_hlt()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void three(void) { printf("three\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"three\00"
define void @three() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ interproc_callee(int *);
int /*<<< orphan*/ sink12(int);
int interproc_arg_tainter_test() {
  int x;
  interproc_callee(&x);
  sink12(x);
}


x86 assembly (clang, -O0):
<interproc_arg_tainter_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1040 <interproc_callee@plt>
mov    -0x8(%rbp),%edi
call   1030 <sink12@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interproc_arg_tainter_test>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <interproc_callee@plt>
mov    0x4(%rsp),%edi
call   1030 <sink12@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @interproc_arg_tainter_test() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @interproc_callee(i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @sink12(i32 %4)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @interproc_arg_tainter_test() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @interproc_callee(i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @sink12(i32 %4)
ret i32 undef
}
long SIO1_init(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @SIO1_init() {
ret i64 0
}

LLVM IR (-O2):
define i64 @SIO1_init() {
ret i64 0
}
unsigned int getNbLength(long nb) {
  for (unsigned int i = 0, divisor = 1;; i++, divisor *= 10) {
    if (nb / divisor == 0)
      return i;
  }
}


x86 assembly (clang, -O0):
<getNbLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
cqto
idiv   %rcx
cmp    $0x0,%rax
jne    1131 <getNbLength+0x31>
mov    -0xc(%rbp),%eax
pop    %rbp
ret
jmp    1136 <getNbLength+0x36>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
imul   $0xa,-0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <getNbLength+0x16>

x86 assembly (clang, -O2):
<getNbLength>:
xor    %ecx,%ecx
test   %rdi,%rdi
je     1143 <getNbLength+0x43>
mov    %rdi,%r8
mov    $0x1,%esi
shr    $0x20,%rdi
jmp    1130 <getNbLength+0x30>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r8,%rax
cqto
idiv   %rsi
add    $0x1,%ecx
test   %rax,%rax
je     1143 <getNbLength+0x43>
add    %esi,%esi
lea    (%rsi,%rsi,4),%esi
test   %rdi,%rdi
jne    1120 <getNbLength+0x20>
mov    %r8d,%eax
xor    %edx,%edx
div    %esi
jmp    1128 <getNbLength+0x28>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @getNbLength(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %3
store i32 1, i32* %4
br label %5
5: ; preds = %14, %1
%6 = load i64, i64* %2
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = sdiv i64 %6, %8
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %5
%12 = load i32, i32* %3
ret i32 %12
13: ; preds = %5
br label %14
14: ; preds = %13
%15 = load i32, i32* %3
%16 = add i32 %15, 1
store i32 %16, i32* %3
%17 = load i32, i32* %4
%18 = mul i32 %17, 10
store i32 %18, i32* %4
br label %5
}

LLVM IR (-O2):
define i32 @getNbLength(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %5, %1
%4 = phi i32 [ 0, %1 ], [ %8, %5 ]
ret i32 %4
5: ; preds = %1, %5
%6 = phi i32 [ %9, %5 ], [ 1, %1 ]
%7 = phi i32 [ %8, %5 ], [ 0, %1 ]
%8 = add i32 %7, 1
%9 = mul i32 %6, 10
%10 = zext i32 %9 to i64
%11 = sdiv i64 %0, %10
%12 = icmp eq i64 %11, 0
br i1 %12, label %3, label %5
}
/* Variables and functions */
int atoi(char *);
int is_numeric_response(char *code) {
  int num_code = atoi(code);
  return num_code >= 200 && num_code <= 399;
}


x86 assembly (clang, -O0):
<is_numeric_response>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0xc8,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jl     1147 <is_numeric_response+0x37>
cmpl   $0x18f,-0xc(%rbp)
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_numeric_response>:
push   %rax
call   1030 <atoi@plt>
add    $0xffffff38,%eax
xor    %ecx,%ecx
cmp    $0xc8,%eax
setb   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_numeric_response(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @atoi(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sge i32 %6, 200
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp sle i32 %9, 399
br label %11
11: ; preds = %8, %1
%12 = phi i1 [ false, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @is_numeric_response(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
%3 = add i32 %2, -200
%4 = icmp ult i32 %3, 200
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("usbdump Copyright (C) 2011 Bert Vermeulen <bert@biot.com>\n");
  printf("usage: usbdump -d <vid:pid> [-u <num lines>]\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf16(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"usbdump Copyright (C) 2011 Bert Vermeulen <bert@biot.com>\0A\00"
@.str.1 = [46 x i8] c"usage: usbdump -d <vid:pid> [-u <num lines>]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [58 x i8] c"usbdump Copyright (C) 2011 Bert Vermeulen <bert@biot.com>\00"
@str.2 = [45 x i8] c"usage: usbdump -d <vid:pid> [-u <num lines>]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.2, i64 0, i64 0))
ret void
}
float f_cos_xx_8(float xx) {
  return 1 + xx * (-0.3084251375340424 +
                   xx * (0.01585433742711407 +
                         xx * (-0.0003259583464414167 +
                               xx * (3.539800057252972e-06))));
}


x86 assembly (clang, -O0):
<f_cos_xx_8>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x4(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x4(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movsd  0xee3(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xedf(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xebf(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xea7(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8f(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_cos_xx_8>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef0(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeec(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee4(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @f_cos_xx_8(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = call double @llvm.fmuladd.f64(double %10, double 0x3ECDB1A9A9567BFF, double 0xBF355CAC70153DE0)
%12 = call double @llvm.fmuladd.f64(double %8, double %11, double 0x3F903C1E92FF2F42)
%13 = call double @llvm.fmuladd.f64(double %6, double %12, double 0xBFD3BD3CC9BE45DD)
%14 = call double @llvm.fmuladd.f64(double %4, double %13, double 1.000000e+00)
%15 = fptrunc double %14 to float
ret float %15
}

LLVM IR (-O2):
define float @f_cos_xx_8(float %0) {
%2 = fpext float %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 0x3ECDB1A9A9567BFF, double 0xBF355CAC70153DE0)
%4 = tail call double @llvm.fmuladd.f64(double %2, double %3, double 0x3F903C1E92FF2F42)
%5 = tail call double @llvm.fmuladd.f64(double %2, double %4, double 0xBFD3BD3CC9BE45DD)
%6 = tail call double @llvm.fmuladd.f64(double %2, double %5, double 1.000000e+00)
%7 = fptrunc double %6 to float
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ LBA_REG_WRITE(void *, int, int);
int mercury_util_stop(void *phys_addr) {
  LBA_REG_WRITE(phys_addr, 0x0500, 0x0);
  return 0;
}


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

x86 assembly (clang, -O2):
<mercury_util_stop>:
push   %rax
mov    $0x500,%esi
xor    %edx,%edx
call   1030 <LBA_REG_WRITE@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @mercury_util_stop(i8* %0) {
%2 = tail call i32 @LBA_REG_WRITE(i8* %0, i32 1280, i32 0)
ret i32 0
}
/* Type definitions */
struct t_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ delete_at(struct t_list *, int);
int get_length(struct t_list *);
void destroy(struct t_list *plist) {
  int len = get_length(plist);
  while (len--) {
    delete_at(plist, 1);
  }
}


x86 assembly (clang, -O0):
<destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_length@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     115f <destroy+0x3f>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <delete_at@plt>
jmp    1138 <destroy+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <get_length@plt>
test   %eax,%eax
je     1152 <destroy+0x32>
mov    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <delete_at@plt>
add    $0xffffffff,%ebp
jne    1140 <destroy+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.t_list = type { i32 }
define void @destroy(%struct.t_list* %0) {
%2 = alloca %struct.t_list*
%3 = alloca i32
store %struct.t_list* %0, %struct.t_list** %2
%4 = load %struct.t_list*, %struct.t_list** %2
%5 = call i32 @get_length(%struct.t_list* %4)
store i32 %5, i32* %3
br label %6
6: ; preds = %10, %1
%7 = load i32, i32* %3
%8 = add nsw i32 %7, -1
store i32 %8, i32* %3
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load %struct.t_list*, %struct.t_list** %2
%12 = call i32 @delete_at(%struct.t_list* %11, i32 1)
br label %6
13: ; preds = %6
ret void
}

LLVM IR (-O2):
%struct.t_list = type { i32 }
define void @destroy(%struct.t_list* %0) {
%2 = tail call i32 @get_length(%struct.t_list* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %6, %4 ], [ %2, %1 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @delete_at(%struct.t_list* %0, i32 1)
%8 = icmp eq i32 %6, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ usleep(int);
void *func(void *p) {
  int i;
  for (i = 0; i < 5; i++) {
    printf("T\n");
    usleep(200000);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1161 <func+0x41>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x30d40,%edi
call   1040 <usleep@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <func+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x30d40,%edi
call   1040 <usleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x30d40,%edi
call   1040 <usleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x30d40,%edi
call   1040 <usleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x30d40,%edi
call   1040 <usleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x30d40,%edi
call   1040 <usleep@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@str = [2 x i8] c"T\00"
define noalias i8* @func(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @usleep(i32 200000)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @usleep(i32 200000)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @usleep(i32 200000)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @usleep(i32 200000)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%11 = tail call i32 @usleep(i32 200000)
ret i8* null
}
int iopl(int level) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @iopl(i32 %0) {
ret i32 0
}
/* Variables and functions */
int partition(int *, int, int);
void quick_sort(int A[], int low, int high) {
  if (low >= high)
    return;
  int i = partition(A, low, high);
  quick_sort(A, low, i - 1);
  quick_sort(A, i + 1, high);
}


x86 assembly (clang, -O0):
<quick_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1143 <quick_sort+0x23>
jmp    1179 <quick_sort+0x59>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quick_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quick_sort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick_sort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quick_sort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quick_sort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quick_sort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @quick_sort(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %3
br label %25
12: ; preds = %3
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @partition(i32* %13, i32 %14, i32 %15)
store i32 %16, i32* %7
%17 = load i32*, i32** %4
%18 = load i32, i32* %5
%19 = load i32, i32* %7
%20 = sub nsw i32 %19, 1
%21 = load i32*, i32** %4
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
%24 = load i32, i32* %6
br label %25
25: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @quick_sort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quick_sort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int PsCreateSystemThread(int ThreadHandle, int DesiredAccess,
                         int ObjectAttributes, int ProcessHandle, int ClientId,
                         int StartRoutine, int StartContext) {
  {
    int tmp_ndt_14;
    tmp_ndt_14 = __VERIFIER_nondet_int();
    if (tmp_ndt_14 == 0) {
      goto switch_11_0;
    } else {
      goto switch_11_default;
      if (0) {
      switch_11_0:
        return (0);
      switch_11_default:;
        return (-1073741823);
      } else {
      }
    }
  }
}


x86 assembly (clang, -O0):
<PsCreateSystemThread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    1148 <PsCreateSystemThread+0x38>
jmp    114d <PsCreateSystemThread+0x3d>
jmp    1159 <PsCreateSystemThread+0x49>
movl   $0x0,-0x4(%rbp)
jmp    1160 <PsCreateSystemThread+0x50>
movl   $0xc0000001,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PsCreateSystemThread>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
mov    $0xc0000001,%ecx
cmovne %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @PsCreateSystemThread(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
%17 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %17, i32* %16
%18 = load i32, i32* %16
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %7
br label %24
21: ; preds = %7
br label %25
22: ; No predecessors!
br i1 false, label %23, label %26
23: ; preds = %22
br label %24
24: ; preds = %23, %20
store i32 0, i32* %8
br label %28
25: ; preds = %21
store i32 -1073741823, i32* %8
br label %28
26: ; preds = %22
br label %27
27: ; preds = %26
br label %28
28: ; preds = %24, %25, %27
%29 = load i32, i32* %8
ret i32 %29
}

LLVM IR (-O2):
define i32 @PsCreateSystemThread(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 (...) @__VERIFIER_nondet_int()
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 0, i32 -1073741823
ret i32 %10
}
/* Type definitions */
struct raw_event {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dsp_dispatch(struct raw_event *);
struct raw_event *lst_parse(char *);
int strlen(char *);
void lst_handle(char *msg) {
  struct raw_event *raw;
  msg[strlen(msg) - 2] = '\0';
  raw = lst_parse(msg);
  dsp_dispatch(raw);
}


x86 assembly (clang, -O0):
<lst_handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x2,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
call   1040 <lst_parse@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <dsp_dispatch@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lst_handle>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x2(%rax,%rbx,1)
mov    %rbx,%rdi
call   1040 <lst_parse@plt>
mov    %rax,%rdi
pop    %rbx
jmp    1050 <dsp_dispatch@plt>

LLVM IR (-O0):
%struct.raw_event = type { i32 }
define void @lst_handle(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.raw_event*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = sub nsw i32 %6, 2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %4, i64 %8
store i8 0, i8* %9
%10 = load i8*, i8** %2
%11 = call %struct.raw_event* @lst_parse(i8* %10)
store %struct.raw_event* %11, %struct.raw_event** %3
%12 = load %struct.raw_event*, %struct.raw_event** %3
%13 = call i32 @dsp_dispatch(%struct.raw_event* %12)
ret void
}

LLVM IR (-O2):
%struct.raw_event = type { i32 }
define void @lst_handle(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 0, i8* %5
%6 = tail call %struct.raw_event* @lst_parse(i8* %0)
%7 = tail call i32 @dsp_dispatch(%struct.raw_event* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ callee3(char *);
callee2(int intarg, char *strarg) { callee3(strarg); }


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

x86 assembly (clang, -O2):
<callee2>:
mov    %rsi,%rdi
jmp    1030 <callee3@plt>

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

LLVM IR (-O2):
define i32 @callee2(i32 %0, i8* %1) {
%3 = tail call i32 @callee3(i8* %1)
ret i32 undef
}
/* Variables and functions */
float __nv_nextafterf(float, float);
float nextafterf(float __a, float __b) { return __nv_nextafterf(__a, __b); }


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

x86 assembly (clang, -O2):
<nextafterf>:
jmp    1030 <__nv_nextafterf@plt>

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

LLVM IR (-O2):
define float @nextafterf(float %0, float %1) {
%3 = tail call float @__nv_nextafterf(float %0, float %1)
ret float %3
}
void f(void) {
  int va0;
#pragma acc declare link(va0)
  extern int ve0;
#pragma acc declare copy(ve0)
  extern int ve1;
#pragma acc declare copyout(ve1)
  extern int ve2;
#pragma acc declare present(ve2)
  extern int ve3;
#pragma acc declare present_or_copy(ve3)
  extern int ve4;
#pragma acc declare present_or_copyin(ve4)
  extern int ve5;
#pragma acc declare present_or_copyout(ve5)
  extern int ve6;
#pragma acc declare present_or_create(ve6)
#pragma acc declare present(v9)
}


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

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ wa_sa(int, int, int, int);
int main(void) {
  int a = 5, b = 3, p = 1, m = 1;
  wa_sa(a, b, p, m);
  printf("p = %d  m = %d\n", p, m);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1040 <wa_sa@plt>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x3,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1040 <wa_sa@plt>
lea    0xebf(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"p = %d m = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 3, i32* %3
store i32 1, i32* %4
store i32 1, i32* %5
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = call i32 @wa_sa(i32 %6, i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"p = %d m = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @wa_sa(i32 5, i32 3, i32 1, i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 1, i32 1)
ret i32 0
}
/* Variables and functions */
scalar_t__ strlen(char const *);
int strncmp(char const *, char const *, scalar_t__);
int je_matched_64(const char *ptr, const char *str) {
  int ret = strncmp(ptr, str, strlen(str) - 1);
  return !ret;
}


x86 assembly (clang, -O0):
<je_matched_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %rax,%rdx
sub    $0x1,%rdx
call   1030 <strncmp@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<je_matched_64>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
lea    -0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @je_matched_64(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = sub nsw i64 %9, 1
%11 = call i32 @strncmp(i8* %6, i8* %7, i64 %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @je_matched_64(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, -1
%5 = tail call i32 @strncmp(i8* %0, i8* %1, i64 %4)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}