xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ localtime_r(int /*<<< orphan*/ *, struct tm *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
const char *get_current_time(char *buf, int max_buf_size) {
  time_t t;
  struct tm tm;
  time(&t);
  localtime_r(&t, &tm);
  strftime(buf, max_buf_size, "%F %T", &tm);
  return buf;
}


x86 assembly (clang, -O0):
<get_current_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
call   1040 <time@plt>
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <localtime_r@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe9d(%rip),%rdx
lea    -0x18(%rbp),%rcx
call   1050 <strftime@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_time>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <time@plt>
mov    %rsp,%r15
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <localtime_r@plt>
lea    0xea2(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r15,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [6 x i8] c"%F %T\00"
define i8* @get_current_time(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.tm
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = call i32 @time(i32* %5)
%8 = call i32 @localtime_r(i32* %5, %struct.tm* %6)
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 @strftime(i8* %9, i32 %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [6 x i8] c"%F %T\00"
define i8* @get_current_time(i8* returned %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.tm
%5 = bitcast i32* %3 to i8*
%6 = bitcast %struct.tm* %4 to i8*
%7 = call i32 @time(i32* %3)
%8 = call i32 @localtime_r(i32* %3, %struct.tm* %4)
%9 = call i32 @strftime(i8* %0, i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ serial_putc(short, int /*<<< orphan*/);
void serial_puts(short combase, char *s) {
  while (*s)
    serial_putc(combase, *(s++));
}


x86 assembly (clang, -O0):
<serial_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1153 <serial_puts+0x43>
mov    -0x2(%rbp),%ax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%esi
movswl %ax,%edi
call   1030 <serial_putc@plt>
jmp    1123 <serial_puts+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_puts>:
push   %rbp
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1145 <serial_puts+0x35>
mov    %rsi,%rbx
add    $0x1,%rbx
movswl %di,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%esi
mov    %ebp,%edi
call   1030 <serial_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <serial_puts+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @serial_puts(i16 signext %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %8, %5 ], [ %1, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %6 to i32
%10 = tail call i32 @serial_putc(i16 signext %0, i32 %9)
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x7b() {
  Assert_real((isalpha(123) == 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_isalpha.c",
              620, ("isalpha should be 0 for {"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x7b>:
push   %rax
mov    $0x7b,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x26c,%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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for {\00"
define void @t_isalpha_0x7b() {
%1 = call i64 @isalpha(i32 123)
%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 620, 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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for {\00"
define void @t_isalpha_0x7b() {
%1 = tail call i64 @isalpha(i32 123)
%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 620, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int main() {
  long n = 600851475143L, i;
  for (i = 1; i < n; i++) {
    if (n % i == 0)
      n = n / i;
  }
  printf("%d", n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movabs $0x8be589eac7,%rax
mov    %rax,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    117b <main+0x6b>
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x0,%rdx
jne    1165 <main+0x55>
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rax,-0x10(%rbp)
jmp    116a <main+0x5a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1135 <main+0x25>
mov    -0x10(%rbp),%rsi
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movabs $0x8be589eac7,%rsi
mov    $0x1,%ecx
jmp    1148 <main+0x38>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rsi,%rax
cqto
idiv   %rcx
test   %rdx,%rdx
cmove  %rax,%rsi
add    $0x1,%rcx
cmp    %rsi,%rcx
jge    115c <main+0x4c>
mov    %rsi,%rax
or     %rcx,%rax
shr    $0x20,%rax
jne    1130 <main+0x20>
mov    %esi,%eax
xor    %edx,%edx
div    %ecx
jmp    1138 <main+0x28>
push   %rax
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
store i64 600851475143, i64* %2
store i64 1, i64* %3
br label %4
4: ; preds = %18, %0
%5 = load i64, i64* %3
%6 = load i64, i64* %2
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %21
8: ; preds = %4
%9 = load i64, i64* %2
%10 = load i64, i64* %3
%11 = srem i64 %9, %10
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %8
%14 = load i64, i64* %2
%15 = load i64, i64* %3
%16 = sdiv i64 %14, %15
store i64 %16, i64* %2
br label %17
17: ; preds = %13, %8
br label %18
18: ; preds = %17
%19 = load i64, i64* %3
%20 = add nsw i64 %19, 1
store i64 %20, i64* %3
br label %4
21: ; preds = %4
%22 = load i64, i64* %2
%23 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 %22)
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 1, %0 ], [ %8, %1 ]
%3 = phi i64 [ 600851475143, %0 ], [ %7, %1 ]
%4 = srem i64 %3, %2
%5 = sdiv i64 %3, %2
%6 = icmp eq i64 %4, 0
%7 = select i1 %6, i64 %5, i64 %3
%8 = add nuw nsw i64 %2, 1
%9 = icmp slt i64 %8, %7
br i1 %9, label %1, label %10
10: ; preds = %1
%11 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 %7)
ret i32 0
}
/* Variables and functions */
float min(float, float);
float GeometryCookTorrance(float NdotH, float NdotV, float VdotH, float NdotL) {
  float first_term = 2.0f * NdotH * NdotV / VdotH;
  float second_term = 2.0f * NdotH * NdotL / VdotH;
  return min(1.0f, min(first_term, second_term));
}


x86 assembly (clang, -O0):
<GeometryCookTorrance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  0xed0(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xeb4(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
call   1030 <min@plt>
movaps %xmm0,%xmm1
movss  0xe82(%rip),%xmm0
call   1030 <min@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GeometryCookTorrance>:
push   %rax
movaps %xmm0,%xmm4
addss  %xmm0,%xmm4
mulss  %xmm4,%xmm1
divss  %xmm2,%xmm1
mulss  %xmm3,%xmm4
divss  %xmm2,%xmm4
movaps %xmm1,%xmm0
movaps %xmm4,%xmm1
call   1030 <min@plt>
movaps %xmm0,%xmm1
movss  0xec2(%rip),%xmm0
pop    %rax
jmp    1030 <min@plt>

LLVM IR (-O0):
define float @GeometryCookTorrance(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%11 = load float, float* %5
%12 = fmul float 2.000000e+00, %11
%13 = load float, float* %6
%14 = fmul float %12, %13
%15 = load float, float* %7
%16 = fdiv float %14, %15
store float %16, float* %9
%17 = load float, float* %5
%18 = fmul float 2.000000e+00, %17
%19 = load float, float* %8
%20 = fmul float %18, %19
%21 = load float, float* %7
%22 = fdiv float %20, %21
store float %22, float* %10
%23 = load float, float* %9
%24 = load float, float* %10
%25 = call float @min(float %23, float %24)
%26 = call float @min(float 1.000000e+00, float %25)
ret float %26
}

LLVM IR (-O2):
define float @GeometryCookTorrance(float %0, float %1, float %2, float %3) {
%5 = fmul float %0, 2.000000e+00
%6 = fmul float %5, %1
%7 = fdiv float %6, %2
%8 = fmul float %5, %3
%9 = fdiv float %8, %2
%10 = tail call float @min(float %7, float %9)
%11 = tail call float @min(float 1.000000e+00, float %10)
ret float %11
}
void abc(int *a) { printf("*a -> %d a-> %d", *a, a); }


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

x86 assembly (clang, -O2):
<abc>:
mov    %rdi,%rdx
mov    (%rdi),%esi
lea    0xee4(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"*a -> %d a-> %d\00"
define void @abc(i32* %0) {
%2 = load i32, i32* %0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %2, i32* %0)
ret void
}
/* Variables and functions */
int lace_builtin_cmp_main(unsigned int, char **, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *);
int lace_main_cmp(unsigned argc, char **argv) {
  return lace_builtin_cmp_main(argc, argv, NULL, NULL);
}


x86 assembly (clang, -O0):
<lace_main_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <lace_builtin_cmp_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lace_main_cmp>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <lace_builtin_cmp_main@plt>

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

LLVM IR (-O2):
define i32 @lace_main_cmp(i32 %0, i8** %1) {
%3 = tail call i32 @lace_builtin_cmp_main(i32 %0, i8** %1, i32* null, i32* null)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ state;

/* Variables and functions */
long gb2312_to_unicode(unsigned long, int /*<<< orphan*/);
long int euc_cn_to_ucs(unsigned long state) {
  switch (state >> 28) {
  case 1:
    return gb2312_to_unicode(((state >> 8) & 0xFF) - 0xA1,
                             ((state)&0xFF) - 0xA1);
  default:
    return 0xFFFFL;
  }
}


x86 assembly (clang, -O0):
<euc_cn_to_ucs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x1c,%rax
sub    $0x1,%rax
jne    1169 <euc_cn_to_ucs+0x59>
jmp    1133 <euc_cn_to_ucs+0x23>
mov    -0x10(%rbp),%rdi
shr    $0x8,%rdi
and    $0xff,%rdi
sub    $0xa1,%rdi
mov    -0x10(%rbp),%rax
and    $0xff,%rax
sub    $0xa1,%rax
mov    %eax,%esi
call   1030 <gb2312_to_unicode@plt>
mov    %rax,-0x8(%rbp)
jmp    1171 <euc_cn_to_ucs+0x61>
movq   $0xffff,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<euc_cn_to_ucs>:
mov    %rdi,%rcx
and    $0xfffffffff0000000,%rcx
cmp    $0x10000000,%rcx
jne    113e <euc_cn_to_ucs+0x2e>
mov    %rdi,%rax
movzbl %ah,%edi
add    $0xffffffffffffff5f,%rdi
movzbl %al,%esi
add    $0xffffff5f,%esi
jmp    1030 <gb2312_to_unicode@plt>
mov    $0xffff,%eax
ret

LLVM IR (-O0):
define i64 @euc_cn_to_ucs(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = lshr i64 %4, 28
switch i64 %5, label %16 [
i64 1, label %6
]
6: ; preds = %1
%7 = load i64, i64* %3
%8 = lshr i64 %7, 8
%9 = and i64 %8, 255
%10 = sub i64 %9, 161
%11 = load i64, i64* %3
%12 = and i64 %11, 255
%13 = sub i64 %12, 161
%14 = trunc i64 %13 to i32
%15 = call i64 @gb2312_to_unicode(i64 %10, i32 %14)
store i64 %15, i64* %2
br label %17
16: ; preds = %1
store i64 65535, i64* %2
br label %17
17: ; preds = %16, %6
%18 = load i64, i64* %2
ret i64 %18
}

LLVM IR (-O2):
define i64 @euc_cn_to_ucs(i64 %0) {
%2 = and i64 %0, -268435456
%3 = icmp eq i64 %2, 268435456
br i1 %3, label %4, label %12
4: ; preds = %1
%5 = lshr i64 %0, 8
%6 = and i64 %5, 255
%7 = add nsw i64 %6, -161
%8 = trunc i64 %0 to i32
%9 = and i32 %8, 255
%10 = add nsw i32 %9, -161
%11 = tail call i64 @gb2312_to_unicode(i64 %7, i32 %10)
br label %12
12: ; preds = %1, %4
%13 = phi i64 [ %11, %4 ], [ 65535, %1 ]
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void f3(unsigned int s) {
  if ((unsigned char)s == 0)
    return;
  if (s == 0)
    link_error();
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movzbl %al,%eax
cmp    $0x0,%eax
jne    112f <f3+0x1f>
jmp    1140 <f3+0x30>
cmpl   $0x0,-0x4(%rbp)
jne    1140 <f3+0x30>
mov    $0x0,%al
call   1030 <link_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
%5 = zext i8 %4 to i32
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %13
8: ; preds = %1
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @link_error()
br label %13
13: ; preds = %7, %11, %8
ret void
}

LLVM IR (-O2):
define void @f3(i32 %0) {
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *get_filename_ext(const char *filename) {
  const char *dot = strrchr(filename, '.');
  return (!dot || dot == filename) ? NULL : ++dot;
}


x86 assembly (clang, -O0):
<get_filename_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1147 <get_filename_ext+0x37>
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jne    1152 <get_filename_ext+0x42>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1162 <get_filename_ext+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_filename_ext>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2e,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
xor    %edx,%edx
cmp    %rbx,%rax
cmovne %rcx,%rdx
test   %rax,%rax
cmovne %rdx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @get_filename_ext(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 46)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8*, i8** %2
%11 = icmp eq i8* %9, %10
br i1 %11, label %12, label %13
12: ; preds = %8, %1
br label %16
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %3
br label %16
16: ; preds = %13, %12
%17 = phi i8* [ null, %12 ], [ %15, %13 ]
ret i8* %17
}

LLVM IR (-O2):
define i8* @get_filename_ext(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = icmp eq i8* %2, %0
%5 = or i1 %3, %4
%6 = getelementptr inbounds i8, i8* %2, i64 1
%7 = select i1 %5, i8* null, i8* %6
ret i8* %7
}
DISCRETE_STEP(dss_adsrenv) {
  if (DISCRETE_INPUT(0)) {
    set_output(0, 0);
  } else {
    set_output(0, 0);
  }
}


x86 assembly (clang, -O0):
<DISCRETE_STEP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1030 <DISCRETE_INPUT@plt>
cmp    $0x0,%eax
je     114d <DISCRETE_STEP+0x2d>
xor    %esi,%esi
mov    %esi,%edi
mov    $0x0,%al
call   1040 <set_output@plt>
jmp    1158 <DISCRETE_STEP+0x38>
xor    %esi,%esi
mov    %esi,%edi
mov    $0x0,%al
call   1040 <set_output@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DISCRETE_STEP>:
push   %rax
xor    %edi,%edi
xor    %eax,%eax
call   1030 <DISCRETE_INPUT@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %eax,%eax
pop    %rcx
jmp    1040 <set_output@plt>

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

LLVM IR (-O2):
define i32 @DISCRETE_STEP(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @DISCRETE_INPUT to i32 (i32, ...)*)(i32 0)
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @set_output to i32 (i32, i32, ...)*)(i32 0, i32 0)
ret i32 undef
}
/* Variables and functions */
int tap_finish();
int /*<<< orphan*/ tap_skip_all(char *);
int main(void) {
  tap_skip_all("need to find a way to force readdir to return an error");
  return tap_finish();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <tap_skip_all@plt>
mov    $0x0,%al
call   1040 <tap_finish@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <tap_skip_all@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <tap_finish@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"need to find a way to force readdir to return an error\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @tap_skip_all(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @tap_finish()
ret i32 %3
}

LLVM IR (-O2):
@.str = [55 x i8] c"need to find a way to force readdir to return an error\00"
define i32 @main() {
%1 = tail call i32 @tap_skip_all(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @tap_finish()
ret i32 %2
}
double sgn(double __x) { return __x >= 0.0 ? 1.0 : -1.0; }


x86 assembly (clang, -O0):
<sgn>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xeea(%rip),%xmm3
movsd  0xeea(%rip),%xmm2
xorps  %xmm0,%xmm0
cmplesd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgn>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setae  %al
lea    0xeec(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @sgn(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
%5 = zext i1 %4 to i64
%6 = select i1 %4, double 1.000000e+00, double -1.000000e+00
ret double %6
}

LLVM IR (-O2):
define double @sgn(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = select i1 %2, double 1.000000e+00, double -1.000000e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ error_nomem(char const *, int, char const *);
int /*<<< orphan*/ panic(int /*<<< orphan*/);
void *panic_nomem(const char *file, int line, const char *func) {
  panic(error_nomem(file, line, func));
  return NULL;
}


x86 assembly (clang, -O0):
<panic_nomem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <error_nomem@plt>
mov    %eax,%edi
call   1030 <panic@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<panic_nomem>:
push   %rax
call   1040 <error_nomem@plt>
mov    %eax,%edi
call   1030 <panic@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define noalias i8* @panic_nomem(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @error_nomem(i8* %0, i32 %1, i8* %2)
%5 = tail call i32 @panic(i32 %4)
ret i8* null
}
int nlm_irq_to_irt(int irq) {
  if ((((irq) >= 8) && ((irq) <= (8 + (31)))) == 0) {
    return -1;
  }
  return ((irq)-8);
}


x86 assembly (clang, -O0):
<nlm_irq_to_irt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x8,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1120 <nlm_irq_to_irt+0x20>
cmpl   $0x27,-0x8(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
jne    113d <nlm_irq_to_irt+0x3d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1146 <nlm_irq_to_irt+0x46>
mov    -0x8(%rbp),%eax
sub    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nlm_irq_to_irt>:
lea    -0x28(%rdi),%eax
lea    -0x8(%rdi),%ecx
cmp    $0xffffffe0,%eax
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @nlm_irq_to_irt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 8
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 39
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ false, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 -1, i32* %2
br label %17
14: ; preds = %9
%15 = load i32, i32* %3
%16 = sub nsw i32 %15, 8
store i32 %16, i32* %2
br label %17
17: ; preds = %14, %13
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @nlm_irq_to_irt(i32 %0) {
%2 = add i32 %0, -40
%3 = icmp ult i32 %2, -32
%4 = add nsw i32 %0, -8
%5 = select i1 %3, i32 -1, i32 %4
ret i32 %5
}
unsigned int makeOperand(char digit, unsigned int operand) {
  return (operand * 10) + (digit - '0');
}


x86 assembly (clang, -O0):
<makeOperand>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0xa,-0x8(%rbp),%eax
movsbl -0x1(%rbp),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeOperand>:
lea    (%rsi,%rsi,4),%eax
lea    (%rdi,%rax,2),%eax
add    $0xffffffd0,%eax
ret

LLVM IR (-O0):
define i32 @makeOperand(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = mul i32 %5, 10
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 48
%10 = add i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @makeOperand(i8 signext %0, i32 %1) {
%3 = mul i32 %1, 10
%4 = sext i8 %0 to i32
%5 = add nsw i32 %4, -48
%6 = add i32 %5, %3
ret i32 %6
}
int cairo_code_draw_pwrupLabel_get_height() { return 38; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_pwrupLabel_get_height() {
ret i32 38
}

LLVM IR (-O2):
define i32 @cairo_code_draw_pwrupLabel_get_height() {
ret i32 38
}
void ComputeCumulativeSumRow_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @ComputeCumulativeSumRow_SSE2() {
ret void
}
/* Variables and functions */
int sprintf(char *, char *, double const);
char *double_to_text(const double the_double) {
  static char double_as_text[18 + 1];
  int returnval = 0;
  returnval = sprintf(double_as_text, "%17.01f\t", the_double);
  return (double_as_text);
}


x86 assembly (clang, -O0):
<double_to_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0x2f10(%rip),%rdi
lea    0xec9(%rip),%rsi
call   1030 <sprintf@plt>
mov    %eax,-0xc(%rbp)
lea    0x2efa(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_to_text>:
push   %rbx
lea    0x2f28(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@double_to_text.double_as_text = internal global [19 x i8] zeroinitializer
@.str = [9 x i8] c"%17.01f\09\00"
define i8* @double_to_text(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
store i32 0, i32* %3
%4 = load double, double* %2
%5 = call i32 @sprintf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @double_to_text.double_as_text, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %4)
store i32 %5, i32* %3
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @double_to_text.double_as_text, i64 0, i64 0)
}

LLVM IR (-O2):
@double_to_text.double_as_text = internal global [19 x i8] zeroinitializer
@.str = [9 x i8] c"%17.01f\09\00"
define i8* @double_to_text(double %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @double_to_text.double_as_text, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %0)
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @double_to_text.double_as_text, i64 0, i64 0)
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t solve(uint64_t n) {
  uint64_t sum = 0;
  uint64_t f0 = 1;
  uint64_t f = 1;
  while (f < n) {
    if ((f & 1) == 0)
      sum += f;
    uint64_t f1 = f0 + f;
    f0 = f;
    f = f1;
  }
  return sum;
}


x86 assembly (clang, -O0):
<solve>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115a <solve+0x5a>
mov    -0x10(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1140 <solve+0x40>
mov    -0x10(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    111c <solve+0x1c>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     113a <solve+0x3a>
mov    $0x1,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %edx,%esi
test   $0x1,%sil
mov    $0x0,%edx
cmove  %esi,%edx
add    %edx,%eax
add    %esi,%ecx
mov    %ecx,%edx
cmp    %edi,%ecx
mov    %esi,%ecx
jl     1120 <solve+0x20>
ret

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

LLVM IR (-O2):
define i32 @solve(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %13
3: ; preds = %1, %3
%4 = phi i32 [ %10, %3 ], [ 0, %1 ]
%5 = phi i32 [ %11, %3 ], [ 1, %1 ]
%6 = phi i32 [ %5, %3 ], [ 1, %1 ]
%7 = and i32 %5, 1
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i32 %5, i32 0
%10 = add nsw i32 %9, %4
%11 = add nsw i32 %5, %6
%12 = icmp slt i32 %11, %0
br i1 %12, label %3, label %13
13: ; preds = %3, %1
%14 = phi i32 [ 0, %1 ], [ %10, %3 ]
ret i32 %14
}
int bad_run_times_assignment(unsigned int *run_times, int value) {
  if (value > 0)
    *run_times = value;
  return value <= 0;
}


x86 assembly (clang, -O0):
<bad_run_times_assignment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    111e <bad_run_times_assignment+0x1e>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x0,-0xc(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bad_run_times_assignment>:
test   %esi,%esi
jle    1106 <bad_run_times_assignment+0x6>
mov    %esi,(%rdi)
xor    %eax,%eax
test   %esi,%esi
setle  %al
ret

LLVM IR (-O0):
define i32 @bad_run_times_assignment(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = load i32*, i32** %3
store i32 %8, i32* %9
br label %10
10: ; preds = %7, %2
%11 = load i32, i32* %4
%12 = icmp sle i32 %11, 0
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @bad_run_times_assignment(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %5
4: ; preds = %2
store i32 %1, i32* %0
br label %5
5: ; preds = %4, %2
%6 = icmp slt i32 %1, 1
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ FirmwareIAPObjHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void FirmwareIAPObjLogging() { UAVObjLogging(FirmwareIAPObjHandle()); }


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

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

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

LLVM IR (-O2):
define void @FirmwareIAPObjLogging() {
%1 = tail call i32 (...) @FirmwareIAPObjHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_SIGNED;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_SIGNED_it;
void PKCS7_SIGNED_free(PKCS7_SIGNED *a) {
  ASN1_item_free((ASN1_VALUE *)a, &PKCS7_SIGNED_it);
}


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

x86 assembly (clang, -O2):
<PKCS7_SIGNED_free>:
mov    0x2ec9(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

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

LLVM IR (-O2):
@PKCS7_SIGNED_it = global i32 0
define void @PKCS7_SIGNED_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @PKCS7_SIGNED_it)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_abs();
int /*<<< orphan*/ e_cpx();
void e_cpx_abs() {
  e_abs();
  e_cpx();
}


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

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

LLVM IR (-O0):
define void @e_cpx_abs() {
%1 = call i32 (...) @e_abs()
%2 = call i32 (...) @e_cpx()
ret void
}

LLVM IR (-O2):
define void @e_cpx_abs() {
%1 = tail call i32 (...) @e_abs()
%2 = tail call i32 (...) @e_cpx()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int foo2(int z, int x) {
  if (x == 1) {
    bar();
    return z;
  } else
    return x + z;
}


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    113a <foo2+0x2a>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1143 <foo2+0x33>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo2>:
push   %rbx
mov    %edi,%ebx
cmp    $0x1,%esi
jne    1121 <foo2+0x11>
xor    %eax,%eax
call   1030 <bar@plt>
jmp    1123 <foo2+0x13>
add    %esi,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @foo2(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @bar()
br label %8
6: ; preds = %2
%7 = add nsw i32 %1, %0
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %0, %4 ], [ %7, %6 ]
ret i32 %9
}
/* Variables and functions */
void bzero(void *b, unsigned int length) {
  int i;
  for (i = 0; i < length; i++)
    ((char *)b)[i] = 0;
}


x86 assembly (clang, -O0):
<bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1138 <bzero+0x38>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <bzero+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bzero>:
test   %esi,%esi
je     1122 <bzero+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @bzero(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ __builtin_ia32_storeupd(double *, int /*<<< orphan*/);
void __attribute__((__always___, __nodebug__))
_mm_storeu_pd(double *dp, __m128d a) {
  __builtin_ia32_storeupd(dp, a);
}


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

x86 assembly (clang, -O2):
<_mm_storeu_pd>:
jmp    1030 <__builtin_ia32_storeupd@plt>

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

LLVM IR (-O2):
define void @_mm_storeu_pd(double* %0, i32 %1) {
%3 = tail call i32 @__builtin_ia32_storeupd(double* %0, i32 %1)
ret void
}
int cos_sched_lock_take() {}


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

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

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

LLVM IR (-O2):
define i32 @cos_sched_lock_take() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int);
void move_wrapper(int y, int x) { move(y, x); }


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

x86 assembly (clang, -O2):
<move_wrapper>:
jmp    1030 <move@plt>

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

LLVM IR (-O2):
define void @move_wrapper(i32 %0, i32 %1) {
%3 = tail call i32 @move(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  for (i = 0; i <= 5000; i = i + 2) {
    printf(" %d", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1388,-0x8(%rbp)
jg     1150 <main+0x40>
mov    -0x8(%rbp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xfffffffe,%ebx
lea    0xee0(%rip),%r14
add    $0x2,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    $0x1387,%ebx
jb     1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c" %d\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 2
%5 = icmp ult i32 %2, 4999
br i1 %5, label %1, label %6
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void err_msg(char *msg, char *file) {
  fprintf(stderr, "%s: %s: %s\n", msg, file, strerror(errno));
}


x86 assembly (clang, -O0):
<err_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    %rax,%r8
lea    0xe91(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_msg>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eaf(%rip),%rax
mov    (%rax),%ebp
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xeb8(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %rax,%r8
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"%s: %s: %s\0A\00"
@errno = global i32 0
define void @err_msg(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = load i32, i32* @errno
%9 = call i8* @strerror(i32 %8)
%10 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7, i8* %9)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"%s: %s: %s\0A\00"
@errno = global i32 0
define void @err_msg(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = load i32, i32* @errno
%5 = tail call i8* @strerror(i32 %4)
%6 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ runTest(int, int);
int main() {
  runTest(12, 1);
  runTest(12, 2);
  runTest(123, 45);
  runTest(123, 12345);
  runTest(123, 678910);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xc,%edi
mov    $0x1,%esi
call   1030 <runTest@plt>
mov    $0xc,%edi
mov    $0x2,%esi
call   1030 <runTest@plt>
mov    $0x7b,%edi
mov    $0x2d,%esi
call   1030 <runTest@plt>
mov    $0x7b,%edi
mov    $0x3039,%esi
call   1030 <runTest@plt>
mov    $0x7b,%edi
mov    $0xa5bfe,%esi
call   1030 <runTest@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
mov    $0x1,%esi
call   1030 <runTest@plt>
mov    $0xc,%edi
mov    $0x2,%esi
call   1030 <runTest@plt>
mov    $0x7b,%edi
mov    $0x2d,%esi
call   1030 <runTest@plt>
mov    $0x7b,%edi
mov    $0x3039,%esi
call   1030 <runTest@plt>
mov    $0x7b,%edi
mov    $0xa5bfe,%esi
call   1030 <runTest@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @runTest(i32 12, i32 1)
%3 = call i32 @runTest(i32 12, i32 2)
%4 = call i32 @runTest(i32 123, i32 45)
%5 = call i32 @runTest(i32 123, i32 12345)
%6 = call i32 @runTest(i32 123, i32 678910)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @runTest(i32 12, i32 1)
%2 = tail call i32 @runTest(i32 12, i32 2)
%3 = tail call i32 @runTest(i32 123, i32 45)
%4 = tail call i32 @runTest(i32 123, i32 12345)
%5 = tail call i32 @runTest(i32 123, i32 678910)
ret i32 0
}