xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int /*<<< orphan*/, int);
int /*<<< orphan*/ se_occluded_fill(int, int);
void se_occluded_fill_test(void **state) {
  assert_int_equal(se_occluded_fill(0x0001041000000000ul, 0x00FFFFFFFFFFFF00ul),
                   0x0001061C3870E000ul);
}


x86 assembly (clang, -O0):
<se_occluded_fill_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
mov    $0xffffff00,%esi
call   1030 <se_occluded_fill@plt>
mov    %eax,%edi
mov    $0x3870e000,%esi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<se_occluded_fill_test>:
push   %rax
xor    %edi,%edi
mov    $0xffffff00,%esi
call   1030 <se_occluded_fill@plt>
mov    %eax,%edi
mov    $0x3870e000,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @se_occluded_fill_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @se_occluded_fill(i32 0, i32 -256)
%4 = call i32 @assert_int_equal(i32 %3, i32 946921472)
ret void
}

LLVM IR (-O2):
define void @se_occluded_fill_test(i8** nocapture readnone %0) {
%2 = tail call i32 @se_occluded_fill(i32 0, i32 -256)
%3 = tail call i32 @assert_int_equal(i32 %2, i32 946921472)
ret void
}
/* Variables and functions */
int madvise(void *, size_t, int);
int posix_madvise(void *addr, size_t len, int advice) {
  return madvise(addr, len, advice);
}


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

x86 assembly (clang, -O2):
<posix_madvise>:
jmp    1030 <madvise@plt>

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

LLVM IR (-O2):
define i32 @posix_madvise(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @madvise(i8* %0, i64 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int math_pow(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  printf("%d\n", math_pow(n, 2));
  printf("%d\n", math_pow(n, 3));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   1040 <math_pow@plt>
mov    %eax,%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
call   1040 <math_pow@plt>
mov    %eax,%esi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
mov    $0x2,%esi
call   1040 <math_pow@plt>
lea    0xea8(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0xc(%rsp),%edi
mov    $0x3,%esi
call   1040 <math_pow@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @math_pow(i32 %4, i32 2)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = call i32 @math_pow(i32 %7, i32 3)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzUnaryFunc_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKUP(int);
int /*<<< orphan*/ SEND_DATAOFF_DELAYED(int /*<<< orphan*/, int /*<<< orphan*/);
void BrzUnaryFuncPush_ackup(struct comp *comp, int port) {
  struct BrzUnaryFunc_ *c = (struct BrzUnaryFunc_ *)comp;
  SEND_DATAOFF_DELAYED(0, 0);
  SEND_ACKUP(1);
}


x86 assembly (clang, -O0):
<BrzUnaryFuncPush_ackup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1040 <SEND_DATAOFF_DELAYED@plt>
mov    $0x1,%edi
call   1030 <SEND_ACKUP@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzUnaryFuncPush_ackup>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1040 <SEND_DATAOFF_DELAYED@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <SEND_ACKUP@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzUnaryFunc_ = type { i32 }
define void @BrzUnaryFuncPush_ackup(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzUnaryFunc_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzUnaryFunc_*
store %struct.BrzUnaryFunc_* %7, %struct.BrzUnaryFunc_** %5
%8 = call i32 @SEND_DATAOFF_DELAYED(i32 0, i32 0)
%9 = call i32 @SEND_ACKUP(i32 1)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzUnaryFuncPush_ackup(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_DATAOFF_DELAYED(i32 0, i32 0)
%4 = tail call i32 @SEND_ACKUP(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void gotsig(int sig) { printf("Got signal: %d\n", sig); }


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"Got signal: %d\0A\00"
define void @gotsig(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ say(char *, int);
void talk(void) { say("Ah, cool and refreshing.", 1); }


x86 assembly (clang, -O0):
<talk>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <say@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<talk>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <say@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Ah, cool and refreshing.\00"
define void @talk() {
%1 = call i32 @say(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Ah, cool and refreshing.\00"
define void @talk() {
%1 = tail call i32 @say(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
int test_imm_C3uint8_mem(unsigned char *val) {
  return ((*val) & (0xC3 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_C3uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -61
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ sortd(double *, long);
void array_sort(double *a, int n) { sortd(a, (long)n); }


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

x86 assembly (clang, -O2):
<array_sort>:
movslq %esi,%rsi
jmp    1030 <sortd@plt>

LLVM IR (-O0):
define void @array_sort(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 = sext i32 %6 to i64
%8 = call i32 @sortd(double* %5, i64 %7)
ret void
}

LLVM IR (-O2):
define void @array_sort(double* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = tail call i32 @sortd(double* %0, i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __real_free(void *);
int /*<<< orphan*/ printf(char *, void *);
void __wrap_free(void *ptr) {
  printf("free: %p\n", ptr);
  __real_free(ptr);
}


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

x86 assembly (clang, -O2):
<__wrap_free>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <__real_free@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"free: %p\0A\00"
define void @__wrap_free(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @__real_free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void showHelp(void) {
  printf("Usage: %s [OPTION]... [FILE]...\n\n    Print newline, word, and byte "
         "counts for each FILE, and a total line if more than\n    one FILE is "
         "specified.  With no FILE, read standard input.\n\nOptions:\n    -c, "
         "--bytes\t\t  print the byte counts\n    -m, --chars\t\t  print the "
         "character counts\n    -l, --lines\t\t  print the newline counts \n   "
         " -w, --words\t\t  print the word counts \n    -L, --max-line-length "
         "print the length of the longest line\n    -h, --help\t\t  display "
         "this help and exit\n    -V, --version\t  output version information "
         "and exit\n\nReport bugs to <bulliver@gmail.com>\n",
         "wc");
}


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

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

LLVM IR (-O0):
@.str = [568 x i8] c"Usage: %s [OPTION]... [FILE]...\0A\0A Print newline, word, and byte counts for each FILE, and a total line if more than\0A one FILE is specified. With no FILE, read standard input.\0A\0AOptions:\0A -c, --bytes\09\09 print the byte counts\0A -m, --chars\09\09 print the character counts\0A -l, --lines\09\09 print the newline counts \0A -w, --words\09\09 print the word counts \0A -L, --max-line-length print the length of the longest line\0A -h, --help\09\09 display this help and exit\0A -V, --version\09 output version information and exit\0A\0AReport bugs to <bulliver@gmail.com>\0A\00"
@.str.1 = [3 x i8] c"wc\00"
define void @showHelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([568 x i8], [568 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [568 x i8] c"Usage: %s [OPTION]... [FILE]...\0A\0A Print newline, word, and byte counts for each FILE, and a total line if more than\0A one FILE is specified. With no FILE, read standard input.\0A\0AOptions:\0A -c, --bytes\09\09 print the byte counts\0A -m, --chars\09\09 print the character counts\0A -l, --lines\09\09 print the newline counts \0A -w, --words\09\09 print the word counts \0A -L, --max-line-length print the length of the longest line\0A -h, --help\09\09 display this help and exit\0A -V, --version\09 output version information and exit\0A\0AReport bugs to <bulliver@gmail.com>\0A\00"
@.str.1 = [3 x i8] c"wc\00"
define void @showHelp() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([568 x i8], [568 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fabs(float);
scalar_t__ floor(float);
float triangle(float x) {
  x -= floor(x);
  return 1 - 2 * fabs(x - .5);
}


x86 assembly (clang, -O0):
<triangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <floor@plt>
cvtsi2ss %rax,%xmm1
movss  -0x4(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea5(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<triangle>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1040 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
addss  0xeba(%rip),%xmm1
movaps %xmm1,%xmm0
call   1030 <fabs@plt>
add    %eax,%eax
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @triangle(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @floor(float %3)
%5 = sitofp i64 %4 to float
%6 = load float, float* %2
%7 = fsub float %6, %5
store float %7, float* %2
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = fsub double %9, 5.000000e-01
%11 = fptrunc double %10 to float
%12 = call i32 @fabs(float %11)
%13 = mul nsw i32 2, %12
%14 = sub nsw i32 1, %13
%15 = sitofp i32 %14 to float
ret float %15
}

LLVM IR (-O2):
define float @triangle(float %0) {
%2 = tail call i64 @floor(float %0)
%3 = sitofp i64 %2 to float
%4 = fsub float %0, %3
%5 = fadd float %4, -5.000000e-01
%6 = tail call i32 @fabs(float %5)
%7 = mul i32 %6, -2
%8 = or i32 %7, 1
%9 = sitofp i32 %8 to float
ret float %9
}
/* Variables and functions */
scalar_t__ is_prime(long);
long next_prime(long n, long N) {
  for (long i = n + 1; (i < N); i++)
    if (is_prime(i))
      return (i);
  return 0;
}


x86 assembly (clang, -O0):
<next_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1170 <next_prime+0x60>
mov    -0x20(%rbp),%rdi
call   1030 <is_prime@plt>
cmp    $0x0,%rax
je     115a <next_prime+0x4a>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <next_prime+0x68>
jmp    115f <next_prime+0x4f>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <next_prime+0x1c>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_prime>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %r14,%rbx
jge    1138 <next_prime+0x28>
mov    %rbx,%rdi
call   1030 <is_prime@plt>
test   %rax,%rax
je     1120 <next_prime+0x10>
jmp    113a <next_prime+0x2a>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @next_prime(i64 %0, i64 %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i64 [ %0, %2 ], [ %5, %7 ]
%5 = add nsw i64 %4, 1
%6 = icmp slt i64 %5, %1
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = tail call i64 @is_prime(i64 %5)
%9 = icmp eq i64 %8, 0
br i1 %9, label %3, label %10
10: ; preds = %7, %3
%11 = phi i64 [ %5, %7 ], [ 0, %3 ]
ret i64 %11
}
int pluralize() { return 0; }


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

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

LLVM IR (-O0):
define i32 @pluralize() {
ret i32 0
}

LLVM IR (-O2):
define i32 @pluralize() {
ret i32 0
}
unsigned int SDIO_GetResponse(unsigned int SDIO_RESP) {
  return (*(
      volatile unsigned int
          *)(((unsigned int)(((((unsigned int)0x40000000) + 0x10000) + 0x2C00) +
                             0x14)) +
             SDIO_RESP));
}


x86 assembly (clang, -O0):
<SDIO_GetResponse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40012c14,%eax
mov    %eax,%eax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SDIO_GetResponse>:
add    $0x40012c14,%edi
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @SDIO_GetResponse(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 1073818644, %3
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @SDIO_GetResponse(i32 %0) {
%2 = add i32 %0, 1073818644
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
ret i32 %5
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t getTensYear(int year) {
  while (year >= 100) {
    year -= 100;
  }
  return year;
}


x86 assembly (clang, -O0):
<getTensYear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jl     111f <getTensYear+0x1f>
mov    -0x4(%rbp),%eax
sub    $0x64,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <getTensYear+0x7>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTensYear>:
cmp    $0x63,%edi
mov    $0x63,%eax
cmovl  %edi,%eax
neg    %eax
lea    (%rdi,%rax,1),%ecx
add    $0x63,%ecx
imul   $0x51eb851f,%rcx,%rax
shr    $0x25,%rax
imul   $0x64,%eax,%edx
mov    %ecx,%eax
sub    %edx,%eax
sub    %ecx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @getTensYear(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %6, %1
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 100
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 100
store i32 %8, i32* %2
br label %3
9: ; preds = %3
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @getTensYear(i32 %0) {
%2 = add i32 %0, 99
%3 = call i32 @llvm.smin.i32(i32 %0, i32 99)
%4 = sub i32 %2, %3
%5 = urem i32 %4, 100
%6 = sub i32 %5, %4
%7 = add i32 %6, %0
ret i32 %7
}
/* Variables and functions */
char const *dlerror();
const char *lt_dlerror(void) { return dlerror(); }


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

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

LLVM IR (-O0):
define i8* @lt_dlerror() {
%1 = call i8* (...) @dlerror()
ret i8* %1
}

LLVM IR (-O2):
define i8* @lt_dlerror() {
%1 = tail call i8* (...) @dlerror()
ret i8* %1
}
void tm_fs_init(void *data) {}


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

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

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

LLVM IR (-O2):
define void @tm_fs_init(i8* nocapture %0) {
ret void
}
void av_bsf_get_null_filter() {}


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

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

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

LLVM IR (-O2):
define void @av_bsf_get_null_filter() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vecNf_copy(float *, float const *, int);
void vec4f_copy(float result[4], const float a[4]) { vecNf_copy(result, a, 4); }


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

x86 assembly (clang, -O2):
<vec4f_copy>:
mov    $0x4,%edx
jmp    1030 <vecNf_copy@plt>

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

LLVM IR (-O2):
define void @vec4f_copy(float* %0, float* %1) {
%3 = tail call i32 @vecNf_copy(float* %0, float* %1, i32 4)
ret void
}
/* Variables and functions */
size_t PowerSetDivideEtImperaR(int /*<<< orphan*/, int *, int *, size_t,
                               int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(size_t);
size_t PowerSetDivideEtImpera(int *val, size_t k) {
  size_t count;
  int *sol = (int *)malloc(k * sizeof(int));
  count = PowerSetDivideEtImperaR(0, val, sol, k, 0, 0);
  free(sol);
  return (count);
}


x86 assembly (clang, -O0):
<PowerSetDivideEtImpera>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
shl    $0x2,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%r8d
call   1040 <PowerSetDivideEtImperaR@plt>
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PowerSetDivideEtImpera>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0x0(,%rsi,4),%rdi
call   1050 <malloc@plt>
mov    %rax,%r15
xor    %edi,%edi
mov    %r14,%rsi
mov    %rax,%rdx
mov    %rbx,%rcx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <PowerSetDivideEtImperaR@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @PowerSetDivideEtImpera(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32*
store i32* %0, i32** %3
store i64 %1, i64* %4
%7 = load i64, i64* %4
%8 = mul i64 %7, 4
%9 = call i64 @malloc(i64 %8)
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %3
%12 = load i32*, i32** %6
%13 = load i64, i64* %4
%14 = call i64 @PowerSetDivideEtImperaR(i32 0, i32* %11, i32* %12, i64 %13, i32 0, i32 0)
store i64 %14, i64* %5
%15 = load i32*, i32** %6
%16 = call i32 @free(i32* %15)
%17 = load i64, i64* %5
ret i64 %17
}

LLVM IR (-O2):
define i64 @PowerSetDivideEtImpera(i32* %0, i64 %1) {
%3 = shl i64 %1, 2
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i32*
%6 = tail call i64 @PowerSetDivideEtImperaR(i32 0, i32* %0, i32* %5, i64 %1, i32 0, i32 0)
%7 = tail call i32 @free(i32* %5)
ret i64 %6
}
int execute_umount() { return 0; }


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

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

LLVM IR (-O0):
define i32 @execute_umount() {
ret i32 0
}

LLVM IR (-O2):
define i32 @execute_umount() {
ret i32 0
}
/* Variables and functions */
double pow(int, double);
double exp2(double x) { return pow(2., x); }


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

x86 assembly (clang, -O2):
<exp2>:
mov    $0x2,%edi
jmp    1030 <pow@plt>

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

LLVM IR (-O2):
define double @exp2(double %0) {
%2 = tail call double @pow(i32 2, double %0)
ret double %2
}
void local_event_delivery_enable(void) {}


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

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

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

LLVM IR (-O2):
define void @local_event_delivery_enable() {
ret void
}
float filter_bin(const float bin, const float bin_old, const float cutoff_hz) {
  return bin *
             (((1.0 / 11025.0) * 6.283185307179586) /
              (1 + ((1.0 / 11025.0) * 6.283185307179586))) *
             cutoff_hz +
         (1 - cutoff_hz * (((1.0 / 11025.0) * 6.283185307179586) /
                           (1 + ((1.0 / 11025.0) * 6.283185307179586)))) *
             bin_old;
}


x86 assembly (clang, -O0):
<filter_bin>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xedc(%rip),%xmm1
mulsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xea7(%rip),%xmm3
mulsd  %xmm3,%xmm1
movsd  0xea3(%rip),%xmm3
addsd  %xmm3,%xmm1
movss  -0x8(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter_bin>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm3
mulsd  %xmm3,%xmm0
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm3
movsd  0xee8(%rip),%xmm4
subsd  %xmm3,%xmm4
cvtss2sd %xmm1,%xmm1
mulsd  %xmm4,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @filter_bin(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = fmul double %8, 0x3F42A9F936200146
%10 = load float, float* %6
%11 = fpext float %10 to double
%12 = load float, float* %6
%13 = fpext float %12 to double
%14 = fneg double %13
%15 = call double @llvm.fmuladd.f64(double %14, double 0x3F42A9F936200146, double 1.000000e+00)
%16 = load float, float* %5
%17 = fpext float %16 to double
%18 = fmul double %15, %17
%19 = call double @llvm.fmuladd.f64(double %9, double %11, double %18)
%20 = fptrunc double %19 to float
ret float %20
}

LLVM IR (-O2):
define float @filter_bin(float %0, float %1, float %2) {
%4 = fpext float %0 to double
%5 = fmul double %4, 0x3F42A9F936200146
%6 = fpext float %2 to double
%7 = fneg double %6
%8 = tail call double @llvm.fmuladd.f64(double %7, double 0x3F42A9F936200146, double 1.000000e+00)
%9 = fpext float %1 to double
%10 = fmul double %8, %9
%11 = tail call double @llvm.fmuladd.f64(double %5, double %6, double %10)
%12 = fptrunc double %11 to float
ret float %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_be64(int /*<<< orphan*/, void *);
void put_unaligned_be64(uint64_t val, void *p) { __put_unaligned_be64(val, p); }


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

x86 assembly (clang, -O2):
<put_unaligned_be64>:
jmp    1030 <__put_unaligned_be64@plt>

LLVM IR (-O0):
define void @put_unaligned_be64(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 @__put_unaligned_be64(i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @put_unaligned_be64(i32 %0, i8* %1) {
%3 = tail call i32 @__put_unaligned_be64(i32 %0, i8* %1)
ret void
}
void memWrite16(int val, unsigned char *p) {
  *(p + 0) = (val >> 0) & 0xFF;
  *(p + 1) = (val >> 8) & 0xFF;
}


x86 assembly (clang, -O0):
<memWrite16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x0,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<memWrite16>:
mov    %di,(%rsi)
ret

LLVM IR (-O0):
define void @memWrite16(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 = ashr i32 %5, 0
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i32, i32* %3
%12 = ashr i32 %11, 8
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
ret void
}

LLVM IR (-O2):
define void @memWrite16(i32 %0, i8* nocapture writeonly %1) {
%3 = trunc i32 %0 to i8
store i8 %3, i8* %1
%4 = lshr i32 %0, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
ret void
}
int qcs_max_float(float a, float b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<qcs_max_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <qcs_max_float+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <qcs_max_float+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qcs_max_float>:
maxss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @qcs_max_float(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
%14 = fptosi float %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @qcs_max_float(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
%5 = fptosi float %4 to i32
ret i32 %5
}
/* Variables and functions */
char comp_trans(void *el1, void *el2) {
  size_t one = *((size_t *)el1);
  size_t two = *((size_t *)el2);
  if (one < two)
    return (char)-1;
  else if (one > two)
    return (char)1;
  else
    return (char)0;
}


x86 assembly (clang, -O0):
<comp_trans>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1139 <comp_trans+0x39>
movb   $0xff,-0x1(%rbp)
jmp    1154 <comp_trans+0x54>
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jbe    1150 <comp_trans+0x50>
movb   $0x1,-0x1(%rbp)
jmp    1154 <comp_trans+0x54>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_trans>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
seta   %cl
mov    $0xff,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define signext i8 @comp_trans(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp ult i64 %4, %6
%8 = icmp ugt i64 %4, %6
%9 = zext i1 %8 to i8
%10 = select i1 %7, i8 -1, i8 %9
ret i8 %10
}
void INT_Excep_CAN2_RXF2(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_CAN2_RXF2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addch(char);
int /*<<< orphan*/ attrset(unsigned int);
int /*<<< orphan*/ move(int, int);
void blank(int row, int start, int cols, unsigned int attr) {
  (void)attrset(attr);
  move(row, start);
  while (cols-- > 0)
    addch(' ');
}


x86 assembly (clang, -O0):
<blank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1040 <attrset@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <move@plt>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    117a <blank+0x4a>
mov    $0x20,%edi
call   1030 <addch@plt>
jmp    1157 <blank+0x27>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blank>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
mov    %ecx,%edi
call   1040 <attrset@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1050 <move@plt>
test   %ebx,%ebx
jle    1172 <blank+0x42>
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20,%edi
call   1030 <addch@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1160 <blank+0x30>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @blank(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @attrset(i32 %3)
%6 = tail call i32 @move(i32 %0, i32 %1)
%7 = icmp sgt i32 %2, 0
br i1 %7, label %8, label %13
8: ; preds = %4, %8
%9 = phi i32 [ %10, %8 ], [ %2, %4 ]
%10 = add nsw i32 %9, -1
%11 = tail call i32 @addch(i8 signext 32)
%12 = icmp ugt i32 %9, 1
br i1 %12, label %8, label %13
13: ; preds = %8, %4
ret void
}
/* Variables and functions */
scalar_t__ __complete(int);
void *completeP(int slot) { return (void *)(unsigned long)__complete(slot); }


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

x86 assembly (clang, -O2):
<completeP>:
jmp    1030 <__complete@plt>

LLVM IR (-O0):
define i8* @completeP(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @__complete(i32 %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @completeP(i32 %0) {
%2 = tail call i64 @__complete(i32 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ shm_unlink(char *);
int main(void) {
  shm_unlink("/xyz");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"/xyz\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @shm_unlink(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"/xyz\00"
define i32 @main() {
%1 = tail call i32 @shm_unlink(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void last_stats() {}


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

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

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

LLVM IR (-O2):
define void @last_stats() {
ret void
}
void pre_user() {}


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

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

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

LLVM IR (-O2):
define void @pre_user() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f2();
int /*<<< orphan*/ printf(char *, int, int, int);
void f1(int i, int j, int k) {
  printf("IN F1:count = %d, val = %d, sum = %d\n", i, j, k);
  f2();
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <f2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rax
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xed2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <f2@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"IN F1:count = %d, val = %d, sum = %d\0A\00"
define void @f1(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 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
%11 = call i32 (...) @f2()
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"IN F1:count = %d, val = %d, sum = %d\0A\00"
define void @f1(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
%5 = tail call i32 (...) @f2()
ret void
}
extern int TakeADouble(double x) {
  if (-6.9 - x < 0.001)
    return 4;
  return 0;
}


x86 assembly (clang, -O0):
<TakeADouble>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xef7(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  0xee2(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1134 <TakeADouble+0x34>
movl   $0x4,-0x4(%rbp)
jmp    113b <TakeADouble+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TakeADouble>:
movsd  0xef8(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xef4(%rip),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
shl    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @TakeADouble(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fsub double -6.900000e+00, %4
%6 = fcmp olt double %5, 1.000000e-03
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 4, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @TakeADouble(double %0) {
%2 = fsub double -6.900000e+00, %0
%3 = fcmp olt double %2, 1.000000e-03
%4 = select i1 %3, i32 4, i32 0
ret i32 %4
}
/* Variables and functions */
int mysnprintf(char *, size_t, char *, int);
int int2str(int value, char *buf, size_t len) {
  return mysnprintf(buf, len, "%d", value);
}


x86 assembly (clang, -O0):
<int2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x4(%rbp),%ecx
lea    0xecb(%rip),%rdx
call   1030 <mysnprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int2str>:
mov    %edi,%ecx
lea    0xee7(%rip),%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rax,%rdx
jmp    1030 <mysnprintf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @int2str(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @mysnprintf(i8* %1, i64 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %4
}
int security_iopl(unsigned int old, unsigned int level) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @security_iopl(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sched_yield();
void thread_yield(void) { sched_yield(); }


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

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

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

LLVM IR (-O2):
define void @thread_yield() {
%1 = tail call i32 (...) @sched_yield()
ret void
}
/* Variables and functions */
int query_format(unsigned int);
int control(unsigned int request, void *data, ...) {
  switch (request) {
  case 2:
    return query_format(*((unsigned int *)data));
  }
  return -3;
}


x86 assembly (clang, -O0):
<control>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
jne    1143 <control+0x33>
jmp    1130 <control+0x20>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <query_format@plt>
mov    %eax,-0x4(%rbp)
jmp    114a <control+0x3a>
movl   $0xfffffffd,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<control>:
cmp    $0x2,%edi
jne    111c <control+0xc>
mov    (%rsi),%edi
jmp    1030 <query_format@plt>
mov    $0xfffffffd,%eax
ret

LLVM IR (-O0):
define i32 @control(i32 %0, i8* %1, ...) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
switch i32 %6, label %12 [
i32 2, label %7
]
7: ; preds = %2
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = call i32 @query_format(i32 %10)
store i32 %11, i32* %3
br label %13
12: ; preds = %2
store i32 -3, i32* %3
br label %13
13: ; preds = %12, %7
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @control(i32 %0, i8* nocapture %1, ...) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = tail call i32 @query_format(i32 %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ -3, %2 ]
ret i32 %9
}
int calcbucket(char *p) {
  int bucket = 0;
  while (*p)
    bucket += *p++;
  return bucket & (256 - 1);
}


x86 assembly (clang, -O0):
<calcbucket>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1139 <calcbucket+0x39>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <calcbucket+0xf>
mov    -0xc(%rbp),%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcbucket>:
mov    (%rdi),%al
test   %al,%al
je     1124 <calcbucket+0x24>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movzbl %al,%eax
add    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <calcbucket+0x10>
movzbl %cl,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @calcbucket(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = zext i8 %5 to i32
%10 = add i32 %6, %9
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = and i32 %10, 255
br label %15
15: ; preds = %13, %1
%16 = phi i32 [ 0, %1 ], [ %14, %13 ]
ret i32 %16
}