xunge/DecIR huggingface dataset:
/* Variables and functions */
long double LDBL_MAX;
long double return_long_double(void) { return LDBL_MAX; }


x86 assembly (clang, -O0):
<return_long_double>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
fldt   (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_long_double>:
mov    0x2ed9(%rip),%rax
fldt   (%rax)
ret

LLVM IR (-O0):
@LDBL_MAX = global x86_fp80 0xK00000000000000000000
define x86_fp80 @return_long_double() {
%1 = load x86_fp80, x86_fp80* @LDBL_MAX
ret x86_fp80 %1
}

LLVM IR (-O2):
@LDBL_MAX = global x86_fp80 0xK00000000000000000000
define x86_fp80 @return_long_double() {
%1 = load x86_fp80, x86_fp80* @LDBL_MAX
ret x86_fp80 %1
}
/* Variables and functions */
int /*<<< orphan*/ permute_without_repeat(char *, int /*<<< orphan*/, int);
int strlen(char *);
void main() {
  char str[] = "ABC";
  int len = strlen(str);
  permute_without_repeat(str, 0, len - 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
mov    -0x8(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1040 <permute_without_repeat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x434241,0xc(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    -0x1(%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <permute_without_repeat@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [4 x i8] c"ABC\00"
define void @main() {
%1 = alloca [4 x i8]
%2 = alloca i32
%3 = bitcast [4 x i8]* %1 to i8*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %2
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 1
%9 = call i32 @permute_without_repeat(i8* %6, i32 0, i32 %8)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 4407873, i32* %1
%3 = call i32 @strlen(i8* %2)
%4 = add nsw i32 %3, -1
%5 = call i32 @permute_without_repeat(i8* %2, i32 0, i32 %4)
ret void
}
int test_imm_09int8_reg(signed char val) {
  return ((val) & (-0x09 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_09int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xfffffff7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_09int8_reg(i8 signext %0) {
%2 = and i8 %0, -9
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _putchar(char);
void print_most_numbers(void) {
  int i;
  i = 0;
  while (i <= 9) {
    if (i != 2 && i != 4)
      _putchar(i + '0');
    i++;
  }
  _putchar('\n');
}


x86 assembly (clang, -O0):
<print_most_numbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x9,-0x4(%rbp)
jg     1159 <print_most_numbers+0x49>
cmpl   $0x2,-0x4(%rbp)
je     114b <print_most_numbers+0x3b>
cmpl   $0x4,-0x4(%rbp)
je     114b <print_most_numbers+0x3b>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
movsbl %al,%edi
call   1030 <_putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <print_most_numbers+0xf>
mov    $0xa,%edi
call   1030 <_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_most_numbers>:
push   %rax
mov    $0x30,%edi
call   1030 <_putchar@plt>
mov    $0x31,%edi
call   1030 <_putchar@plt>
mov    $0x33,%edi
call   1030 <_putchar@plt>
mov    $0x35,%edi
call   1030 <_putchar@plt>
mov    $0x36,%edi
call   1030 <_putchar@plt>
mov    $0x37,%edi
call   1030 <_putchar@plt>
mov    $0x38,%edi
call   1030 <_putchar@plt>
mov    $0x39,%edi
call   1030 <_putchar@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <_putchar@plt>

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

LLVM IR (-O2):
define void @print_most_numbers() {
%1 = tail call i32 @_putchar(i8 signext 48)
%2 = tail call i32 @_putchar(i8 signext 49)
%3 = tail call i32 @_putchar(i8 signext 51)
%4 = tail call i32 @_putchar(i8 signext 53)
%5 = tail call i32 @_putchar(i8 signext 54)
%6 = tail call i32 @_putchar(i8 signext 55)
%7 = tail call i32 @_putchar(i8 signext 56)
%8 = tail call i32 @_putchar(i8 signext 57)
%9 = tail call i32 @_putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void version() {
  printf("maketime 1.0\n"
         "Hitlion King\n");
}


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

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

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

LLVM IR (-O2):
@str = [26 x i8] c"maketime 1.0\0AHitlion King\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x21() {
  Assert_real((isxdigit(33) == 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_isxdigit.c",
              170, ("isxdigit should be 0 for !"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x21>:
push   %rax
mov    $0x21,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xaa,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for !\00"
define void @t_isxdigit_0x21() {
%1 = call i64 @isxdigit(i32 33)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 170, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for !\00"
define void @t_isxdigit_0x21() {
%1 = tail call i64 @isxdigit(i32 33)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 170, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
int /*<<< orphan*/ list_empty(struct list *);
int /*<<< orphan*/ list_pop(struct list *);
void list_purge(struct list *l) {
  while (!list_empty(l)) {
    free(list_pop(l));
  }
}


x86 assembly (clang, -O0):
<list_purge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <list_empty@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    115a <list_purge+0x2a>
jmp    116f <list_purge+0x3f>
mov    -0x8(%rbp),%rdi
call   1040 <list_pop@plt>
mov    %eax,%edi
call   1030 <free@plt>
jmp    113c <list_purge+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_purge>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1050 <list_empty@plt>
test   %eax,%eax
jne    115d <list_purge+0x2d>
mov    %rbx,%rdi
call   1040 <list_pop@plt>
mov    %eax,%edi
call   1030 <free@plt>
mov    %rbx,%rdi
jmp    1140 <list_purge+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.list = type { i32 }
define void @list_purge(%struct.list* %0) {
%2 = alloca %struct.list*
store %struct.list* %0, %struct.list** %2
br label %3
3: ; preds = %8, %1
%4 = load %struct.list*, %struct.list** %2
%5 = call i32 @list_empty(%struct.list* %4)
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %8, label %12
8: ; preds = %3
%9 = load %struct.list*, %struct.list** %2
%10 = call i32 @list_pop(%struct.list* %9)
%11 = call i32 @free(i32 %10)
br label %3
12: ; preds = %3
ret void
}

LLVM IR (-O2):
%struct.list = type { i32 }
define void @list_purge(%struct.list* %0) {
%2 = tail call i32 @list_empty(%struct.list* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = tail call i32 @list_pop(%struct.list* %0)
%6 = tail call i32 @free(i32 %5)
%7 = tail call i32 @list_empty(%struct.list* %0)
%8 = icmp eq i32 %7, 0
br i1 %8, label %4, label %9
9: ; preds = %4, %1
ret void
}
int isGreaterThan90Degrees(double value) { return value > 0.5; }


x86 assembly (clang, -O0):
<isGreaterThan90Degrees>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isGreaterThan90Degrees>:
xor    %eax,%eax
ucomisd 0xef6(%rip),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @isGreaterThan90Degrees(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 5.000000e-01
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @isGreaterThan90Degrees(double %0) {
%2 = fcmp ogt double %0, 5.000000e-01
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("나도 프로그램을 잘할 수 있다.\n꿈은 이루어진다.");
  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 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [66 x i8] c"\EB\82\98\EB\8F\84 \ED\94\84\EB\A1\9C\EA\B7\B8\EB\9E\A8\EC\9D\84 \EC\9E\98\ED\95\A0 \EC\88\98 \EC\9E\88\EB\8B\A4.\0A\EA\BF\88\EC\9D\80 \EC\9D\B4\EB\A3\A8\EC\96\B4\EC\A7\84\EB\8B\A4.\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [66 x i8] c"\EB\82\98\EB\8F\84 \ED\94\84\EB\A1\9C\EA\B7\B8\EB\9E\A8\EC\9D\84 \EC\9E\98\ED\95\A0 \EC\88\98 \EC\9E\88\EB\8B\A4.\0A\EA\BF\88\EC\9D\80 \EC\9D\B4\EB\A3\A8\EC\96\B4\EC\A7\84\EB\8B\A4.\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpnle_pd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_cmpnle_pd(__m128d A, __m128d B) { return _mm_cmpnle_pd(A, B); }


x86 assembly (clang, -O0):
<test_mm_cmpnle_pd>:
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 <_mm_cmpnle_pd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_cmpnle_pd>:
jmp    1030 <_mm_cmpnle_pd@plt>

LLVM IR (-O0):
define i32 @test_mm_cmpnle_pd(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 @_mm_cmpnle_pd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_cmpnle_pd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpnle_pd(i32 %0, i32 %1)
ret i32 %3
}
void xml_readstring(char *unused) {}


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

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

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

LLVM IR (-O2):
define void @xml_readstring(i8* nocapture %0) {
ret void
}
int tegra_cpu_speedo_id(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tegra_cpu_speedo_id() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ le64_to_cpu(int /*<<< orphan*/ const);
uint64_t le64_to_cpup(const uint64_t *p) { return le64_to_cpu(*p); }


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

x86 assembly (clang, -O2):
<le64_to_cpup>:
mov    (%rdi),%edi
jmp    1030 <le64_to_cpu@plt>

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

LLVM IR (-O2):
define i32 @le64_to_cpup(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @le64_to_cpu(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ odd(int);
bool even(int n) { return !odd(n); }


x86 assembly (clang, -O0):
<even>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <odd@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<even>:
push   %rax
call   1030 <odd@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @even(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @odd(i32 %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @even(i32 %0) {
%2 = tail call i32 @odd(i32 %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ invert(unsigned int, int, int);
int /*<<< orphan*/ printf(char *, unsigned int);
int main(void) { printf("%u", (unsigned)invert((unsigned)8, (int)3, (int)3)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
mov    $0x3,%edx
mov    %edx,%esi
call   1030 <invert@plt>
mov    %eax,%esi
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
define i32 @main() {
%1 = call i64 @invert(i32 8, i32 3, i32 3)
%2 = trunc i64 %1 to i32
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define i32 @main() {
%1 = tail call i64 @invert(i32 8, i32 3, i32 3)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int MaxSubSum(int const *, int /*<<< orphan*/, int);
int MaxSubsequenceSum(const int A[], int N) { return MaxSubSum(A, 0, N - 1); }


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

x86 assembly (clang, -O2):
<MaxSubsequenceSum>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <MaxSubSum@plt>

LLVM IR (-O0):
define i32 @MaxSubsequenceSum(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 = sub nsw i32 %6, 1
%8 = call i32 @MaxSubSum(i32* %5, i32 0, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @MaxSubsequenceSum(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @MaxSubSum(i32* %0, i32 0, i32 %3)
ret i32 %4
}
int ld_lt_rc2(long double a1) { return !(((a1) < (100))); }


x86 assembly (clang, -O0):
<ld_lt_rc2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeed(%rip)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_lt_rc2>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setbe  %al
ret

LLVM IR (-O0):
define i32 @ld_lt_rc2(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp olt x86_fp80 %3, 0xK4005C800000000000000
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ld_lt_rc2(x86_fp80 %0) {
%2 = fcmp uge x86_fp80 %0, 0xK4005C800000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
int f(int x) { return ((~x) != 0); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
cmp    $0xffffffff,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp ne i32 %0, -1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ mkd_cleanup(void *);
void mkd_cleanup_wrapper(void *doc) { mkd_cleanup(doc); }


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

x86 assembly (clang, -O2):
<mkd_cleanup_wrapper>:
jmp    1030 <mkd_cleanup@plt>

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

LLVM IR (-O2):
define void @mkd_cleanup_wrapper(i8* %0) {
%2 = tail call i32 @mkd_cleanup(i8* %0)
ret void
}
/* Variables and functions */
void jsonsl_dump_global_metrics(void) {}


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

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

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

LLVM IR (-O2):
define void @jsonsl_dump_global_metrics() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reg_addrange(char, int);
void reg_addranges_W(void) {
  reg_addrange(0, '0' - 1);
  reg_addrange('9' + 1, 'A' - 1);
  reg_addrange('Z' + 1, '_' - 1);
  reg_addrange('_' + 1, 'a' - 1);
  reg_addrange('z' + 1, 0xFFFF);
}


x86 assembly (clang, -O0):
<reg_addranges_W>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x2f,%esi
call   1030 <reg_addrange@plt>
mov    $0x3a,%edi
mov    $0x40,%esi
call   1030 <reg_addrange@plt>
mov    $0x5b,%edi
mov    $0x5e,%esi
call   1030 <reg_addrange@plt>
mov    $0x60,%esi
mov    %esi,%edi
call   1030 <reg_addrange@plt>
mov    $0x7b,%edi
mov    $0xffff,%esi
call   1030 <reg_addrange@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_addranges_W>:
push   %rax
xor    %edi,%edi
mov    $0x2f,%esi
call   1030 <reg_addrange@plt>
mov    $0x3a,%edi
mov    $0x40,%esi
call   1030 <reg_addrange@plt>
mov    $0x5b,%edi
mov    $0x5e,%esi
call   1030 <reg_addrange@plt>
mov    $0x60,%edi
mov    $0x60,%esi
call   1030 <reg_addrange@plt>
mov    $0x7b,%edi
mov    $0xffff,%esi
pop    %rax
jmp    1030 <reg_addrange@plt>

LLVM IR (-O0):
define void @reg_addranges_W() {
%1 = call i32 @reg_addrange(i8 signext 0, i32 47)
%2 = call i32 @reg_addrange(i8 signext 58, i32 64)
%3 = call i32 @reg_addrange(i8 signext 91, i32 94)
%4 = call i32 @reg_addrange(i8 signext 96, i32 96)
%5 = call i32 @reg_addrange(i8 signext 123, i32 65535)
ret void
}

LLVM IR (-O2):
define void @reg_addranges_W() {
%1 = tail call i32 @reg_addrange(i8 signext 0, i32 47)
%2 = tail call i32 @reg_addrange(i8 signext 58, i32 64)
%3 = tail call i32 @reg_addrange(i8 signext 91, i32 94)
%4 = tail call i32 @reg_addrange(i8 signext 96, i32 96)
%5 = tail call i32 @reg_addrange(i8 signext 123, i32 65535)
ret void
}
/* Variables and functions */
void *emalloc(unsigned int);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, unsigned int);
void *emallocz(unsigned int size) {
  void *ret = emalloc(size);
  memset(ret, 0, size);
  return ret;
}


x86 assembly (clang, -O0):
<emallocz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <emalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emallocz>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <emalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @emallocz(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @emalloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* %2
%8 = call i32 @memset(i8* %6, i32 0, i32 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @emallocz(i32 %0) {
%2 = tail call i8* @emalloc(i32 %0)
%3 = tail call i32 @memset(i8* %2, i32 0, i32 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ GpioPinMuxSetup(int, int);
void ehrpwm_1_pinmux_setup(void) {
  GpioPinMuxSetup((0x08c8), (2));
  GpioPinMuxSetup((0x08cc), (2));
}


x86 assembly (clang, -O0):
<ehrpwm_1_pinmux_setup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8c8,%edi
mov    $0x2,%esi
call   1030 <GpioPinMuxSetup@plt>
mov    $0x8cc,%edi
mov    $0x2,%esi
call   1030 <GpioPinMuxSetup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehrpwm_1_pinmux_setup>:
push   %rax
mov    $0x8c8,%edi
mov    $0x2,%esi
call   1030 <GpioPinMuxSetup@plt>
mov    $0x8cc,%edi
mov    $0x2,%esi
pop    %rax
jmp    1030 <GpioPinMuxSetup@plt>

LLVM IR (-O0):
define void @ehrpwm_1_pinmux_setup() {
%1 = call i32 @GpioPinMuxSetup(i32 2248, i32 2)
%2 = call i32 @GpioPinMuxSetup(i32 2252, i32 2)
ret void
}

LLVM IR (-O2):
define void @ehrpwm_1_pinmux_setup() {
%1 = tail call i32 @GpioPinMuxSetup(i32 2248, i32 2)
%2 = tail call i32 @GpioPinMuxSetup(i32 2252, i32 2)
ret void
}
void COMP_E1_IRQHandler(void) {
  while (1) {
  }
}


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

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

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

LLVM IR (-O2):
define void @COMP_E1_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
int test_imm_07int32_reg(int val) { return ((val) & (0x07 << 0)) ? -20 : -40; }


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

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

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

LLVM IR (-O2):
define i32 @test_imm_07int32_reg(i32 %0) {
%2 = and i32 %0, 7
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
printFinalErrorStatement() {
  fprintf(stderr, "\nUne erreur est survenue.\nFin du programme...\n");
}


x86 assembly (clang, -O0):
<printFinalErrorStatement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"\0AUne erreur est survenue.\0AFin du programme...\0A\00"
define i32 @printFinalErrorStatement() {
%1 = alloca i32
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"\0AUne erreur est survenue.\0AFin du programme...\0A\00"
define i32 @printFinalErrorStatement() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ vOneTwo(unsigned char *, unsigned int, unsigned char *);
void vOneTwo0(unsigned char *psIn, unsigned int uiLength,
              unsigned char *pszOut) {
  vOneTwo(psIn, uiLength, pszOut);
  pszOut[2 * uiLength] = 0;
}


x86 assembly (clang, -O0):
<vOneTwo0>:
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   1030 <vOneTwo@plt>
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
mov    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vOneTwo0>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%ebx
call   1030 <vOneTwo@plt>
add    %ebx,%ebx
movb   $0x0,(%r14,%rbx,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @vOneTwo0(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 @vOneTwo(i8* %7, i32 %8, i8* %9)
%11 = load i8*, i8** %6
%12 = load i32, i32* %5
%13 = mul i32 2, %12
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %11, i64 %14
store i8 0, i8* %15
ret void
}

LLVM IR (-O2):
define void @vOneTwo0(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @vOneTwo(i8* %0, i32 %1, i8* %2)
%5 = shl i32 %1, 1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %2, i64 %6
store i8 0, i8* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned long *);
void free_samples_array(long unsigned *samples_array[48]) {
  int i;
  for (i = 0; i < 48; i++)
    free(samples_array[i]);
}


x86 assembly (clang, -O0):
<free_samples_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x30,-0xc(%rbp)
jge    114c <free_samples_array+0x3c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <free_samples_array+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_samples_array>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    $0x30,%rbx
jne    1120 <free_samples_array+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @free_samples_array(i64** nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i64*, i64** %0, i64 %3
%5 = load i64*, i64** %4
%6 = tail call i32 @free(i64* %5)
%7 = add nuw nsw i64 %3, 1
%8 = icmp eq i64 %7, 48
br i1 %8, label %9, label %2
9: ; preds = %2
ret void
}
long pot2(int k) {
  if (k == 0) {
    return 1;
  }
  return 2 * pot2(k - 1);
}


x86 assembly (clang, -O0):
<pot2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1132 <pot2+0x22>
movq   $0x1,-0x8(%rbp)
jmp    1145 <pot2+0x35>
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <pot2@plt>
shl    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pot2>:
test   %edi,%edi
je     1125 <pot2+0x15>
push   %rax
add    $0xffffffff,%edi
call   1030 <pot2@plt>
add    %rax,%rax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i64 @pot2(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 1, i64* %2
br label %12
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = call i64 @pot2(i32 %9)
%11 = mul nsw i64 2, %10
store i64 %11, i64* %2
br label %12
12: ; preds = %7, %6
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
define i64 @pot2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi i64 [ %8, %5 ], [ 1, %1 ]
ret i64 %4
5: ; preds = %1
%6 = add nsw i32 %0, -1
%7 = tail call i64 @pot2(i32 %6)
%8 = shl nsw i64 %7, 1
br label %3
}
void gtk_notebook_popup_enable() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_popup_enable() {
ret void
}
void main() {
  int a;
  a = fibo3(7);
  printf(a);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x7,%edi
mov    $0x0,%al
call   1030 <fibo3@plt>
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7,%edi
xor    %eax,%eax
call   1030 <fibo3@plt>
movslq %eax,%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = call i32 (i32, ...) bitcast (i32 (...)* @fibo3 to i32 (i32, ...)*)(i32 7)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = call i32 (i8*, ...) @printf(i8* %5)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @fibo3 to i32 (i32, ...)*)(i32 7)
%2 = sext i32 %1 to i64
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ PBKDF2PARAM;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ PBKDF2PARAM_it;
PBKDF2PARAM *PBKDF2PARAM_new(void) {
  return (PBKDF2PARAM *)ASN1_item_new(&PBKDF2PARAM_it);
}


x86 assembly (clang, -O0):
<PBKDF2PARAM_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PBKDF2PARAM_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@PBKDF2PARAM_it = global i32 0
define i32* @PBKDF2PARAM_new() {
%1 = call i64 @ASN1_item_new(i32* @PBKDF2PARAM_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@PBKDF2PARAM_it = global i32 0
define i32* @PBKDF2PARAM_new() {
%1 = tail call i64 @ASN1_item_new(i32* @PBKDF2PARAM_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
int test_imm_48int16_reg(short val) {
  return ((val) & (-0x48 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_48int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffffb8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_48int16_reg>:
test   $0xffb8,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_48int16_reg(i16 signext %0) {
%2 = and i16 %0, -72
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned char f40(unsigned char x, unsigned long int y) {
  return (x >> y) | (x << (8 - y));
}


x86 assembly (clang, -O0):
<f40>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x10(%rbp),%rcx
sar    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    $0x8,%ecx
sub    -0x10(%rbp),%rcx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f40>:
mov    %rsi,%rcx
mov    %edi,%eax
ror    %cl,%al
ret

LLVM IR (-O0):
define zeroext i8 @f40(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = ashr i32 %6, %8
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = load i64, i64* %4
%13 = sub i64 8, %12
%14 = trunc i64 %13 to i32
%15 = shl i32 %11, %14
%16 = or i32 %9, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @f40(i8 zeroext %0, i64 %1) {
%3 = trunc i64 %1 to i8
%4 = tail call i8 @llvm.fshr.i8(i8 %0, i8 %0, i8 %3)
ret i8 %4
}
/* Type definitions */
struct xfs_mount {
  int dummy;
};
struct xfs_dir2_data_hdr {
  int dummy;
};
struct xfs_dir2_data_entry {
  int dummy;
};

/* Variables and functions */
int xfs_dir3_data_dot_offset(struct xfs_mount *);
struct xfs_dir2_data_entry *
xfs_dir3_data_dot_entry_p(struct xfs_mount *mp, struct xfs_dir2_data_hdr *hdr) {
  return (struct xfs_dir2_data_entry *)((char *)hdr +
                                        xfs_dir3_data_dot_offset(mp));
}


x86 assembly (clang, -O0):
<xfs_dir3_data_dot_entry_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <xfs_dir3_data_dot_offset@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfs_dir3_data_dot_entry_p>:
push   %rbx
mov    %rsi,%rbx
call   1030 <xfs_dir3_data_dot_offset@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.xfs_dir2_data_entry = type { i32 }
%struct.xfs_mount = type { i32 }
%struct.xfs_dir2_data_hdr = type { i32 }
define %struct.xfs_dir2_data_entry* @xfs_dir3_data_dot_entry_p(%struct.xfs_mount* %0, %struct.xfs_dir2_data_hdr* %1) {
%3 = alloca %struct.xfs_mount*
%4 = alloca %struct.xfs_dir2_data_hdr*
store %struct.xfs_mount* %0, %struct.xfs_mount** %3
store %struct.xfs_dir2_data_hdr* %1, %struct.xfs_dir2_data_hdr** %4
%5 = load %struct.xfs_dir2_data_hdr*, %struct.xfs_dir2_data_hdr** %4
%6 = bitcast %struct.xfs_dir2_data_hdr* %5 to i8*
%7 = load %struct.xfs_mount*, %struct.xfs_mount** %3
%8 = call i32 @xfs_dir3_data_dot_offset(%struct.xfs_mount* %7)
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = bitcast i8* %10 to %struct.xfs_dir2_data_entry*
ret %struct.xfs_dir2_data_entry* %11
}

LLVM IR (-O2):
%struct.xfs_dir2_data_entry = type { i32 }
%struct.xfs_mount = type { i32 }
%struct.xfs_dir2_data_hdr = type { i32 }
define %struct.xfs_dir2_data_entry* @xfs_dir3_data_dot_entry_p(%struct.xfs_mount* %0, %struct.xfs_dir2_data_hdr* readnone %1) {
%3 = bitcast %struct.xfs_dir2_data_hdr* %1 to i8*
%4 = tail call i32 @xfs_dir3_data_dot_offset(%struct.xfs_mount* %0)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %3, i64 %5
%7 = bitcast i8* %6 to %struct.xfs_dir2_data_entry*
ret %struct.xfs_dir2_data_entry* %7
}
int my_strlen(char *str) {
  int count;
  count = 0;
  while (*(str + count)) {
    count++;
  }
  return (count);
}


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     112f <my_strlen+0x2f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <my_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <my_strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @my_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
const char *bmff_get_version(void) { return "0.1.1"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"0.1.1\00"
define i8* @bmff_get_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"0.1.1\00"
define i8* @bmff_get_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t BUFSIZ;
int /*<<< orphan*/ _IOFBF;
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/,
                           size_t);
void mysetbuf(FILE *fp, char *buf) {
  if (fp == NULL) {
    setvbuf(fp, NULL, _IONBF, (size_t)0);
  } else {
    setvbuf(fp, buf, _IOFBF, BUFSIZ);
  }
}


x86 assembly (clang, -O0):
<mysetbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1149 <mysetbuf+0x39>
mov    -0x8(%rbp),%rdi
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rsi
call   1030 <setvbuf@plt>
jmp    1169 <mysetbuf+0x59>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e78(%rip),%rax
mov    (%rax),%edx
mov    0x2e77(%rip),%rax
mov    (%rax),%rcx
call   1030 <setvbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mysetbuf>:
test   %rdi,%rdi
je     112d <mysetbuf+0x1d>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edx
mov    0x2eb3(%rip),%rax
mov    (%rax),%rcx
jmp    1030 <setvbuf@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edx
xor    %edi,%edi
xor    %esi,%esi
xor    %ecx,%ecx
jmp    1030 <setvbuf@plt>

LLVM IR (-O0):
@_IONBF = global i32 0
@_IOFBF = global i32 0
@BUFSIZ = global i64 0
define void @mysetbuf(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 = icmp eq i32* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32*, i32** %3
%9 = load i32, i32* @_IONBF
%10 = call i32 @setvbuf(i32* %8, i8* null, i32 %9, i64 0)
br label %17
11: ; preds = %2
%12 = load i32*, i32** %3
%13 = load i8*, i8** %4
%14 = load i32, i32* @_IOFBF
%15 = load i64, i64* @BUFSIZ
%16 = call i32 @setvbuf(i32* %12, i8* %13, i32 %14, i64 %15)
br label %17
17: ; preds = %11, %7
ret void
}

LLVM IR (-O2):
@_IONBF = global i32 0
@_IOFBF = global i32 0
@BUFSIZ = global i64 0
define void @mysetbuf(i32* %0, i8* %1) {
%3 = icmp eq i32* %0, null
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @_IONBF
%6 = tail call i32 @setvbuf(i32* null, i8* null, i32 %5, i64 0)
br label %11
7: ; preds = %2
%8 = load i32, i32* @_IOFBF
%9 = load i64, i64* @BUFSIZ
%10 = tail call i32 @setvbuf(i32* %0, i8* %1, i32 %8, i64 %9)
br label %11
11: ; preds = %7, %4
ret void
}
/* Variables and functions */
int endswith(char *, char *);
char *test2() {
  int res = endswith("endswith", "ends");
  char *message =
      "test2 failed: endswith(\"endswith\", \"ends\") should return 0";
  do {
    if (!(res == 0))
      return message;
  } while (0);
  return NULL;
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xee1(%rip),%rdi
lea    0xee3(%rip),%rsi
call   1030 <endswith@plt>
mov    %eax,-0xc(%rbp)
lea    0xed9(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1150 <test2+0x40>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115d <test2+0x4d>
jmp    1155 <test2+0x45>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeea(%rip),%rsi
call   1030 <endswith@plt>
xor    %ecx,%ecx
test   %eax,%eax
lea    0xedf(%rip),%rax
cmovne %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"endswith\00"
@.str.1 = [5 x i8] c"ends\00"
@.str.2 = [59 x i8] c"test2 failed: endswith(\22endswith\22, \22ends\22) should return 0\00"
define i8* @test2() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca i8*
%4 = call i32 @endswith(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
store i32 %4, i32* %2
store i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %5
5: ; preds = %0
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = load i8*, i8** %3
store i8* %9, i8** %1
br label %12
10: ; preds = %5
br label %11
11: ; preds = %10
store i8* null, i8** %1
br label %12
12: ; preds = %11, %8
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [9 x i8] c"endswith\00"
@.str.1 = [5 x i8] c"ends\00"
@.str.2 = [59 x i8] c"test2 failed: endswith(\22endswith\22, \22ends\22) should return 0\00"
define i8* @test2() {
%1 = tail call i32 @endswith(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0)
ret i8* %3
}
set_g2X(g2, fc) float *g2, *fc;
{
  float f;
  f = (1.0) / (*fc);
  *g2 = ((2.0) * f - f * f) / (((1.0) - f) * ((1.0) - f));
}


x86 assembly (clang, -O0):
<set_g2X>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee0(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
mulss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xe8c(%rip),%xmm1
subsd  %xmm2,%xmm1
movss  -0x1c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm3
movsd  0xe77(%rip),%xmm2
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_g2X>:
movss  0xef8(%rip),%xmm0
divss  (%rsi),%xmm0
cvtss2sd %xmm0,%xmm1
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee8(%rip),%xmm2
subsd  %xmm1,%xmm2
addsd  %xmm1,%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm2
divsd  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define i32 @set_g2X(float* %0, float* %1) {
%3 = alloca i32
%4 = alloca float*
%5 = alloca float*
%6 = alloca float
store float* %0, float** %4
store float* %1, float** %5
%7 = load float*, float** %5
%8 = load float, float* %7
%9 = fpext float %8 to double
%10 = fdiv double 1.000000e+00, %9
%11 = fptrunc double %10 to float
store float %11, float* %6
%12 = load float, float* %6
%13 = fpext float %12 to double
%14 = load float, float* %6
%15 = load float, float* %6
%16 = fmul float %14, %15
%17 = fpext float %16 to double
%18 = fneg double %17
%19 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %13, double %18)
%20 = load float, float* %6
%21 = fpext float %20 to double
%22 = fsub double 1.000000e+00, %21
%23 = load float, float* %6
%24 = fpext float %23 to double
%25 = fsub double 1.000000e+00, %24
%26 = fmul double %22, %25
%27 = fdiv double %19, %26
%28 = fptrunc double %27 to float
%29 = load float*, float** %4
store float %28, float* %29
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
define i32 @set_g2X(float* nocapture writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = fdiv float 1.000000e+00, %3
%5 = fpext float %4 to double
%6 = fmul float %4, %4
%7 = fpext float %6 to double
%8 = fneg double %7
%9 = tail call double @llvm.fmuladd.f64(double %5, double 2.000000e+00, double %8)
%10 = fsub double 1.000000e+00, %5
%11 = fmul double %10, %10
%12 = fdiv double %9, %11
%13 = fptrunc double %12 to float
store float %13, float* %0
ret i32 undef
}
void XWidthOfScreen() {}


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

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

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

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