xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
float *malloc(int);
unsigned int read_floats(char const *, float *, int);
int read_vn(const char *str, float **vn) {
  *vn = malloc(3 * sizeof(**vn));
  unsigned int size = read_floats(str, *vn, 3);
  assert(size >= 3);
  return 0;
}


x86 assembly (clang, -O0):
<read_vn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xc,%edi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    $0x3,%edx
call   1030 <read_floats@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_vn>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    $0xc,%edi
call   1050 <malloc@plt>
mov    %rax,(%rbx)
mov    %r14,%rdi
mov    %rax,%rsi
mov    $0x3,%edx
call   1030 <read_floats@plt>
xor    %edi,%edi
cmp    $0x3,%eax
setae  %dil
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @read_vn(i8* %0, float** %1) {
%3 = alloca i8*
%4 = alloca float**
%5 = alloca i32
store i8* %0, i8** %3
store float** %1, float*** %4
%6 = call float* @malloc(i32 12)
%7 = load float**, float*** %4
store float* %6, float** %7
%8 = load i8*, i8** %3
%9 = load float**, float*** %4
%10 = load float*, float** %9
%11 = call i32 @read_floats(i8* %8, float* %10, i32 3)
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = icmp uge i32 %12, 3
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @read_vn(i8* %0, float** nocapture writeonly %1) {
%3 = tail call float* @malloc(i32 12)
store float* %3, float** %1
%4 = tail call i32 @read_floats(i8* %0, float* %3, i32 3)
%5 = icmp ugt i32 %4, 2
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
ret i32 0
}
void _TFC4Blog5Assetg3urlSS() {}


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

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

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

LLVM IR (-O2):
define void @_TFC4Blog5Assetg3urlSS() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void plat_sleep(int ms) { usleep(ms * 1000); }


x86 assembly (clang, -O0):
<plat_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x3e8,-0x4(%rbp),%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plat_sleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @plat_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @plat_sleep(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
char *opf_msdu(char *buf) { return buf + 8; }


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

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

LLVM IR (-O0):
define i8* @opf_msdu(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 8
ret i8* %4
}

LLVM IR (-O2):
define i8* @opf_msdu(i8* readnone %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 8
ret i8* %2
}
/* Variables and functions */
int __builtin_mips_shll_s_w(int, int);
short int silk_SAT16(int a) {
  int c;
  c = __builtin_mips_shll_s_w(a, 16);
  c = c >> 16;
  return c;
}


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

x86 assembly (clang, -O2):
<silk_SAT16>:
push   %rax
mov    $0x10,%esi
call   1030 <__builtin_mips_shll_s_w@plt>
shr    $0x10,%eax
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @silk_SAT16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @__builtin_mips_shll_s_w(i32 %4, i32 16)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = ashr i32 %6, 16
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = trunc i32 %8 to i16
ret i16 %9
}

LLVM IR (-O2):
define signext i16 @silk_SAT16(i32 %0) {
%2 = tail call i32 @__builtin_mips_shll_s_w(i32 %0, i32 16)
%3 = lshr i32 %2, 16
%4 = trunc i32 %3 to i16
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void plus_minus_test() {
  int a = +7;
  int b = -9;
  printf("a = %d, b = %d\n", a, b);
}


x86 assembly (clang, -O0):
<plus_minus_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x7,-0x4(%rbp)
movl   $0xfffffff7,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plus_minus_test>:
lea    0xee9(%rip),%rdi
mov    $0x7,%esi
mov    $0xfffffff7,%edx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"a = %d, b = %d\0A\00"
define void @plus_minus_test() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 7, i32 -9)
ret void
}
double fastabs(double x) { return (x > 0.) ? x : -x; }


x86 assembly (clang, -O0):
<fastabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    112a <fastabs+0x2a>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    114b <fastabs+0x4b>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastabs>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @fastabs(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load double, double* %2
br label %10
7: ; preds = %1
%8 = load double, double* %2
%9 = fneg double %8
br label %10
10: ; preds = %7, %5
%11 = phi double [ %6, %5 ], [ %9, %7 ]
ret double %11
}

LLVM IR (-O2):
define double @fastabs(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %0, double %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ run_server();
int main(void) {
  run_server();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @run_server()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @run_server()
ret i32 0
}
int test_imm_16int32_reg(int val) { return ((val) & (0x16 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_16int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x16,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_16int32_reg>:
test   $0x16,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_16int32_reg(i32 %0) {
%2 = and i32 %0, 22
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ yyerror(char *, int, int, int);
void range_check(int val, int min, int max) {
  if ((val < min) || (val > max))
    yyerror("value %d out of range [%d, %d]", val, min, max);
}


x86 assembly (clang, -O0):
<range_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1139 <range_check+0x29>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    114e <range_check+0x3e>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xeb7(%rip),%rdi
call   1030 <yyerror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<range_check>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
cmp    %edx,%edi
jl     111f <range_check+0xf>
cmp    %ecx,%esi
jg     111f <range_check+0xf>
ret
lea    0xeda(%rip),%rdi
jmp    1030 <yyerror@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"value %d out of range [%d, %d]\00"
define void @range_check(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* %4
%8 = load i32, i32* %5
%9 = icmp slt i32 %7, %8
br i1 %9, label %14, label %10
10: ; preds = %3
%11 = load i32, i32* %4
%12 = load i32, i32* %6
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %19
14: ; preds = %10, %3
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = call i32 @yyerror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16, i32 %17)
br label %19
19: ; preds = %14, %10
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"value %d out of range [%d, %d]\00"
define void @range_check(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = or i1 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @yyerror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
br label %9
9: ; preds = %3, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_printf(int, char *, ...);
void printSpaltenNamen(int breite) {
  char c = 'A';
  while (breite) {
    log_printf(1, "    %c", c);
    c++;
    breite--;
  }
  log_printf(1, "\n");
}


x86 assembly (clang, -O0):
<printSpaltenNamen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1156 <printSpaltenNamen+0x46>
movsbl -0x5(%rbp),%edx
mov    $0x1,%edi
lea    0xec7(%rip),%rsi
mov    $0x0,%al
call   1030 <log_printf@plt>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <printSpaltenNamen+0xf>
mov    $0x1,%edi
lea    0xea5(%rip),%rsi
mov    $0x0,%al
call   1030 <log_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printSpaltenNamen>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
je     114c <printSpaltenNamen+0x3c>
mov    %edi,%ebp
lea    0xedf(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x41(%rbx),%eax
movsbl %al,%edx
mov    $0x1,%edi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <log_printf@plt>
add    $0x1,%ebx
cmp    %ebx,%ebp
jne    1130 <printSpaltenNamen+0x20>
lea    0xeb4(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <log_printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c" %c\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printSpaltenNamen(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i8 [ %8, %3 ], [ 65, %1 ]
%5 = phi i32 [ %9, %3 ], [ %0, %1 ]
%6 = sext i8 %4 to i32
%7 = tail call i32 (i32, i8*, ...) @log_printf(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = add i8 %4, 1
%9 = add nsw i32 %5, -1
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = tail call i32 (i32, i8*, ...) @log_printf(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ led();
int main(void) {
  led();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @led()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @led()
ret i32 0
}
/* Variables and functions */
int INT_MIN;
int test12(int x) {
  int y = 0x1234;
  int z = INT_MIN;
  return (x ^ y) - z;
}


x86 assembly (clang, -O0):
<test12>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1234,-0x8(%rbp)
mov    0x2ed3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test12>:
mov    %edi,%eax
mov    0x2edf(%rip),%rcx
xor    $0x1234,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
define i32 @test12(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 4660, i32* %3
%5 = load i32, i32* @INT_MIN
store i32 %5, i32* %4
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = xor i32 %6, %7
%9 = load i32, i32* %4
%10 = sub nsw i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define i32 @test12(i32 %0) {
%2 = load i32, i32* @INT_MIN
%3 = xor i32 %0, 4660
%4 = sub nsw i32 %3, %2
ret i32 %4
}
/* Variables and functions */
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int process_parameter_list_element_name_boolean(char *element_name) {
  int str_len = strlen(element_name);
  return (strncmp(element_name + str_len - 3, "_yn", 3) == 0);
}


x86 assembly (clang, -O0):
<process_parameter_list_element_name_boolean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
add    %rax,%rdi
add    $0xfffffffffffffffd,%rdi
lea    0xeb2(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_parameter_list_element_name_boolean>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
cltq
lea    (%rbx,%rax,1),%rdi
add    $0xfffffffffffffffd,%rdi
lea    0xec6(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"_yn\00"
define i32 @process_parameter_list_element_name_boolean(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %3
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = getelementptr inbounds i8, i8* %9, i64 -3
%11 = call i64 @strncmp(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"_yn\00"
define i32 @process_parameter_list_element_name_boolean(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = getelementptr inbounds i8, i8* %4, i64 -3
%6 = tail call i64 @strncmp(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  while (1) {
    printf("\a");
  }
  return 0;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x7,%edi
call   1030 <putchar@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [2 x i8] c"\07\00"
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
br label %6
6: ; preds = %2, %6
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = tail call i32 @putchar(i32 7)
br label %3
}
void foo(void) {
  int i, x, y, z;
  x = 0;
  y = 1;
  i = 0;
  while (i < 2)
    i++;
  x = i;
  y = 2 * x;
  z = x + y;
  y = x + z;
  x = 9;
  y = 10;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    1131 <foo+0x31>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1119 <foo+0x19>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x9,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %2
store i32 1, i32* %3
store i32 0, i32* %1
br label %5
5: ; preds = %8, %0
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %5
11: ; preds = %5
%12 = load i32, i32* %1
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = mul nsw i32 2, %13
store i32 %14, i32* %3
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = add nsw i32 %15, %16
store i32 %17, i32* %4
%18 = load i32, i32* %2
%19 = load i32, i32* %4
%20 = add nsw i32 %18, %19
store i32 %20, i32* %3
store i32 9, i32* %2
store i32 10, i32* %3
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putn(int, int);
void put4(int t) { putn(4, t); }


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

x86 assembly (clang, -O2):
<put4>:
mov    %edi,%esi
mov    $0x4,%edi
jmp    1030 <putn@plt>

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

LLVM IR (-O2):
define void @put4(i32 %0) {
%2 = tail call i32 @putn(i32 4, i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ isPrime(unsigned long);
int rand();
unsigned long int randomPrime() {
  unsigned long int r;
  while (1) {
    r = rand() % 10000;
    if (isPrime(r))
      return r;
  }
}


x86 assembly (clang, -O0):
<randomPrime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x2710,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <isPrime@plt>
cmp    $0x0,%rax
je     115b <randomPrime+0x3b>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
jmp    1128 <randomPrime+0x8>

x86 assembly (clang, -O2):
<randomPrime>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x68db8bad,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2c,%rcx
add    %edx,%ecx
imul   $0x2710,%ecx,%ecx
sub    %ecx,%eax
movslq %eax,%rbx
mov    %rbx,%rdi
call   1030 <isPrime@plt>
test   %rax,%rax
je     1130 <randomPrime+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @randomPrime() {
%1 = alloca i64
br label %2
2: ; preds = %0, %11
%3 = call i32 (...) @rand()
%4 = srem i32 %3, 10000
%5 = sext i32 %4 to i64
store i64 %5, i64* %1
%6 = load i64, i64* %1
%7 = call i64 @isPrime(i64 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i64, i64* %1
ret i64 %10
11: ; preds = %2
br label %2
}

LLVM IR (-O2):
define i64 @randomPrime() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, 10000
%4 = sext i32 %3 to i64
%5 = tail call i64 @isPrime(i64 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %1, label %7
7: ; preds = %1
ret i64 %4
}
void g_date_get_monday_weeks_in_year() {}


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

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

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

LLVM IR (-O2):
define void @g_date_get_monday_weeks_in_year() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void die(const char *message) {
  fprintf(stderr, "%s\n", message);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ cpc_AssignKey(int, int);
void asignarTeclas() {
  cpc_AssignKey(11, (int)0x4801);
  cpc_AssignKey(12, (int)0x4802);
  cpc_AssignKey(13, (int)0x4702);
  cpc_AssignKey(14, (int)0x4701);
  cpc_AssignKey(15, (int)0x4602);
}


x86 assembly (clang, -O0):
<asignarTeclas>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb,%edi
mov    $0x4801,%esi
call   1030 <cpc_AssignKey@plt>
mov    $0xc,%edi
mov    $0x4802,%esi
call   1030 <cpc_AssignKey@plt>
mov    $0xd,%edi
mov    $0x4702,%esi
call   1030 <cpc_AssignKey@plt>
mov    $0xe,%edi
mov    $0x4701,%esi
call   1030 <cpc_AssignKey@plt>
mov    $0xf,%edi
mov    $0x4602,%esi
call   1030 <cpc_AssignKey@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<asignarTeclas>:
push   %rax
mov    $0xb,%edi
mov    $0x4801,%esi
call   1030 <cpc_AssignKey@plt>
mov    $0xc,%edi
mov    $0x4802,%esi
call   1030 <cpc_AssignKey@plt>
mov    $0xd,%edi
mov    $0x4702,%esi
call   1030 <cpc_AssignKey@plt>
mov    $0xe,%edi
mov    $0x4701,%esi
call   1030 <cpc_AssignKey@plt>
mov    $0xf,%edi
mov    $0x4602,%esi
pop    %rax
jmp    1030 <cpc_AssignKey@plt>

LLVM IR (-O0):
define void @asignarTeclas() {
%1 = call i32 @cpc_AssignKey(i32 11, i32 18433)
%2 = call i32 @cpc_AssignKey(i32 12, i32 18434)
%3 = call i32 @cpc_AssignKey(i32 13, i32 18178)
%4 = call i32 @cpc_AssignKey(i32 14, i32 18177)
%5 = call i32 @cpc_AssignKey(i32 15, i32 17922)
ret void
}

LLVM IR (-O2):
define void @asignarTeclas() {
%1 = tail call i32 @cpc_AssignKey(i32 11, i32 18433)
%2 = tail call i32 @cpc_AssignKey(i32 12, i32 18434)
%3 = tail call i32 @cpc_AssignKey(i32 13, i32 18178)
%4 = tail call i32 @cpc_AssignKey(i32 14, i32 18177)
%5 = tail call i32 @cpc_AssignKey(i32 15, i32 17922)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dis_free(void *);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void memclean(void *ptr, size_t size) {
  memset(ptr, 0, size);
  dis_free(ptr);
}


x86 assembly (clang, -O0):
<memclean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
call   1040 <dis_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memclean>:
push   %rbx
mov    %rsi,%rdx
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <dis_free@plt>

LLVM IR (-O0):
define void @memclean(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @memset(i8* %5, i32 0, i64 %6)
%8 = load i8*, i8** %3
%9 = call i32 @dis_free(i8* %8)
ret void
}

LLVM IR (-O2):
define void @memclean(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i64 %1)
%4 = tail call i32 @dis_free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Msp430TimerCapComP__4__Control__enableEvents();
void GpioCaptureC__0__Msp430TimerControl__enableEvents(void) {
  Msp430TimerCapComP__4__Control__enableEvents();
}


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

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

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

LLVM IR (-O2):
define void @GpioCaptureC__0__Msp430TimerControl__enableEvents() {
%1 = tail call i32 (...) @Msp430TimerCapComP__4__Control__enableEvents()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int, int);
int geteuid();
int getuid();
int /*<<< orphan*/ stderr;
void debug_uid(const char *hint) {
  fprintf(stderr, "%s: ruid=%d, euid=%d\n", hint, getuid(), geteuid());
}


x86 assembly (clang, -O0):
<debug_uid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <geteuid@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    %eax,%r8d
lea    0xe8b(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_uid>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    0x2ea2(%rip),%rax
mov    (%rax),%ebp
xor    %eax,%eax
call   1030 <getuid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <geteuid@plt>
lea    0xea9(%rip),%rsi
mov    %ebp,%edi
mov    %r14,%rdx
mov    %ebx,%ecx
mov    %eax,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"%s: ruid=%d, euid=%d\0A\00"
define void @debug_uid(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (...) @getuid()
%4 = tail call i32 (...) @geteuid()
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
char *getenv(char const *);
const char *optenv(const char *name) {
  const char *value = getenv(name);
  return value ? value : "";
}


x86 assembly (clang, -O0):
<optenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1141 <optenv+0x31>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1151 <optenv+0x41>
lea    0xeb8(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1151 <optenv+0x41>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<optenv>:
push   %rax
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xee0(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @optenv(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @getenv(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %8
%12 = phi i8* [ %9, %8 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %10 ]
ret i8* %12
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @optenv(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
%3 = icmp eq i8* %2, null
%4 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %2
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int genrand_int32();
int32_t genrand_int31(void) { return (int32_t)(genrand_int32() >> 1); }


x86 assembly (clang, -O0):
<genrand_int31>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <genrand_int32@plt>
sar    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @genrand_int31() {
%1 = call i32 (...) @genrand_int32()
%2 = ashr i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @genrand_int31() {
%1 = tail call i32 (...) @genrand_int32()
%2 = ashr i32 %1, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ FTM1_DriverIRQHandler();
__attribute__((weak)) void FTM1_IRQHandler(void) { FTM1_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @FTM1_IRQHandler() {
%1 = call i32 (...) @FTM1_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @FTM1_IRQHandler() {
%1 = tail call i32 (...) @FTM1_DriverIRQHandler()
ret void
}
/* Variables and functions */
long __infer_nondet_long_int();
long int lrintl(long double x) { return __infer_nondet_long_int(); }


x86 assembly (clang, -O0):
<lrintl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_long_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @lrintl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call i64 (...) @__infer_nondet_long_int()
ret i64 %3
}

LLVM IR (-O2):
define i64 @lrintl(x86_fp80 %0) {
%2 = tail call i64 (...) @__infer_nondet_long_int()
ret i64 %2
}
/* Variables and functions */
void Default_PWM3_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Default_PWM3_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Default_PWM3_IRQHandler+0x9>
jmp    1109 <Default_PWM3_IRQHandler+0x9>

x86 assembly (clang, -O2):
<Default_PWM3_IRQHandler>:
jmp    1100 <Default_PWM3_IRQHandler>

LLVM IR (-O0):
define void @Default_PWM3_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Default_PWM3_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL= "
         "REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Fri Nov  8 "
         "14:26:34 SGT 2013 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 "
         "USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 "
         "KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [427 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Fri Nov 8 14:26:34 SGT 2013 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([427 x i8], [427 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [427 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Fri Nov 8 14:26:34 SGT 2013 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([427 x i8], [427 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i;
  i = __VERIFIER_nondet_int();
  while (i < 255) {
    if (__VERIFIER_nondet_int() != 0) {
      i = i + 1;
    } else {
      i = i + 2;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jge    1162 <main+0x52>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%eax
je     1154 <main+0x44>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115d <main+0x4d>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0xfe,%eax
jg     1148 <main+0x38>
mov    %eax,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x1,%eax
adc    $0x0,%ebx
add    $0x1,%ebx
cmp    $0xff,%ebx
jl     1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %2
br label %4
4: ; preds = %16, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 255
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = call i32 (...) @__VERIFIER_nondet_int()
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %16
13: ; preds = %7
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 2
store i32 %15, i32* %2
br label %16
16: ; preds = %13, %10
br label %4
17: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp slt i32 %1, 255
br i1 %2, label %3, label %10
3: ; preds = %0, %3
%4 = phi i32 [ %8, %3 ], [ %1, %0 ]
%5 = tail call i32 (...) @__VERIFIER_nondet_int()
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 2, i32 1
%8 = add nsw i32 %7, %4
%9 = icmp slt i32 %8, 255
br i1 %9, label %3, label %10
10: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() { fprintf(stderr, "usage: murmur [-hV] [options]\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"usage: murmur [-hV] [options]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"usage: murmur [-hV] [options]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XCreateWindowEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XCreateWindowEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XCreateWindowEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XCreateWindowEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XCreateWindowEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XCreateWindowEvent>:
test   %rdi,%rdi
je     112a <free_XCreateWindowEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XCreateWindowEvent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XCreateWindowEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
size_t pread(int, void *, size_t, int /*<<< orphan*/);
int SeekReadFile(int fd, void *address, size_t length, off_t position) {
  assert(fd != -1);
  if (pread(fd, address, length, position) != length)
    return (-1);
  return (0);
}


x86 assembly (clang, -O0):
<SeekReadFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1040 <pread@plt>
cmp    -0x18(%rbp),%rax
je     1170 <SeekReadFile+0x50>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <SeekReadFile+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SeekReadFile>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0xffffffff,%ebp
setne  %dil
call   1030 <assert@plt>
mov    %ebp,%edi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
call   1040 <pread@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
setne  %cl
neg    %ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @SeekReadFile(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i32 %3, i32* %9
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, -1
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %6
%15 = load i8*, i8** %7
%16 = load i64, i64* %8
%17 = load i32, i32* %9
%18 = call i64 @pread(i32 %14, i8* %15, i64 %16, i32 %17)
%19 = load i64, i64* %8
%20 = icmp ne i64 %18, %19
br i1 %20, label %21, label %22
21: ; preds = %4
store i32 -1, i32* %5
br label %23
22: ; preds = %4
store i32 0, i32* %5
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %5
ret i32 %24
}

LLVM IR (-O2):
define i32 @SeekReadFile(i32 %0, i8* nocapture %1, i64 %2, i32 %3) {
%5 = icmp ne i32 %0, -1
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i64 @pread(i32 %0, i8* %1, i64 %2, i32 %3)
%9 = icmp ne i64 %8, %2
%10 = sext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ MM_Epoll_Init();
int /*<<< orphan*/ MM_Epoll_Wait();
int /*<<< orphan*/ MM_MSG_Init();
int main(int argc, char *argv[]) {
  MM_Epoll_Init();
  MM_MSG_Init();
  MM_Epoll_Wait();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <MM_Epoll_Init@plt>
mov    $0x0,%al
call   1030 <MM_MSG_Init@plt>
mov    $0x0,%al
call   1050 <MM_Epoll_Wait@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @MM_Epoll_Init()
%4 = tail call i32 (...) @MM_MSG_Init()
%5 = tail call i32 (...) @MM_Epoll_Wait()
ret i32 0
}
/* Type definitions */
struct vec3 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec3_project(float *, float *, float *);
__attribute__((always_)) struct vec3 *
psvec3_project(struct vec3 *result, struct vec3 *a, struct vec3 *b) {
  vec3_project((float *)result, (float *)a, (float *)b);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec3_project>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3_project@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_project(%struct.vec3* %0, %struct.vec3* %1, %struct.vec3* %2) {
%4 = alloca %struct.vec3*
%5 = alloca %struct.vec3*
%6 = alloca %struct.vec3*
store %struct.vec3* %0, %struct.vec3** %4
store %struct.vec3* %1, %struct.vec3** %5
store %struct.vec3* %2, %struct.vec3** %6
%7 = load %struct.vec3*, %struct.vec3** %4
%8 = bitcast %struct.vec3* %7 to float*
%9 = load %struct.vec3*, %struct.vec3** %5
%10 = bitcast %struct.vec3* %9 to float*
%11 = load %struct.vec3*, %struct.vec3** %6
%12 = bitcast %struct.vec3* %11 to float*
%13 = call i32 @vec3_project(float* %8, float* %10, float* %12)
%14 = load %struct.vec3*, %struct.vec3** %4
ret %struct.vec3* %14
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_project(%struct.vec3* returned %0, %struct.vec3* %1, %struct.vec3* %2) {
%4 = bitcast %struct.vec3* %0 to float*
%5 = bitcast %struct.vec3* %1 to float*
%6 = bitcast %struct.vec3* %2 to float*
%7 = tail call i32 @vec3_project(float* %4, float* %5, float* %6)
ret %struct.vec3* %0
}
void __DELETE_java_net_Inet6Address(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_net_Inet6Address(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ReceiverActivityHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void ReceiverActivityLogging() { UAVObjLogging(ReceiverActivityHandle()); }


x86 assembly (clang, -O0):
<ReceiverActivityLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <ReceiverActivityHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReceiverActivityLogging>:
push   %rax
xor    %eax,%eax
call   1040 <ReceiverActivityHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @ReceiverActivityLogging() {
%1 = call i32 (...) @ReceiverActivityHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @ReceiverActivityLogging() {
%1 = tail call i32 (...) @ReceiverActivityHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}