xunge/DecIR huggingface dataset:
long long llretval(long long a) { return -a; }


x86 assembly (clang, -O0):
<llretval>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<llretval>:
mov    %rdi,%rax
neg    %rax
ret

LLVM IR (-O0):
define i64 @llretval(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 0, %3
ret i64 %4
}

LLVM IR (-O2):
define i64 @llretval(i64 %0) {
%2 = sub nsw i64 0, %0
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ twinprime(int);
int main() {
  int range;
  printf("Enter Range : ");
  scanf("%d", &range);
  twinprime(range);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <twinprime@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"Enter Range : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @twinprime(i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void end_two() { printf("end func : [two]\n"); }


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"end func : [two]\00"
define void @end_two() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
int security_task_create(unsigned long clone_flags) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @security_task_create(i64 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ tx;
struct timex {
  int constant;
  int /*<<< orphan*/ modes;
};

/* Variables and functions */
int /*<<< orphan*/ ADJ_TAI;
int adjtimex(struct timex *);
int /*<<< orphan*/ memset(struct timex *, int /*<<< orphan*/, int);
int set_tai(int offset) {
  struct timex tx;
  memset(&tx, 0, sizeof(tx));
  tx.modes = ADJ_TAI;
  tx.constant = offset;
  return adjtimex(&tx);
}


x86 assembly (clang, -O0):
<set_tai>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1040 <adjtimex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_tai>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
mov    %ebx,(%rsp)
mov    %r14,%rdi
call   1040 <adjtimex@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.timex = type { i32, i32 }
@ADJ_TAI = global i32 0
define i32 @set_tai(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timex
store i32 %0, i32* %2
%4 = call i32 @memset(%struct.timex* %3, i32 0, i32 8)
%5 = load i32, i32* @ADJ_TAI
%6 = getelementptr inbounds %struct.timex, %struct.timex* %3, i32 0, i32 1
store i32 %5, i32* %6
%7 = load i32, i32* %2
%8 = getelementptr inbounds %struct.timex, %struct.timex* %3, i32 0, i32 0
store i32 %7, i32* %8
%9 = call i32 @adjtimex(%struct.timex* %3)
ret i32 %9
}

LLVM IR (-O2):
%struct.timex = type { i32, i32 }
@ADJ_TAI = global i32 0
define i32 @set_tai(i32 %0) {
%2 = alloca %struct.timex
%3 = bitcast %struct.timex* %2 to i8*
%4 = call i32 @memset(%struct.timex* %2, i32 0, i32 8)
%5 = load i32, i32* @ADJ_TAI
%6 = getelementptr inbounds %struct.timex, %struct.timex* %2, i64 0, i32 1
store i32 %5, i32* %6
%7 = getelementptr inbounds %struct.timex, %struct.timex* %2, i64 0, i32 0
store i32 %0, i32* %7
%8 = call i32 @adjtimex(%struct.timex* %2)
ret i32 %8
}
int ti_adosc_start(double const *options) { return (int)(options[1]) - 1; }


x86 assembly (clang, -O0):
<ti_adosc_start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvttsd2si 0x8(%rax),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ti_adosc_start>:
cvttsd2si 0x8(%rdi),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ti_adosc_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 1
%5 = load double, double* %4
%6 = fptosi double %5 to i32
%7 = sub nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @ti_adosc_start(double* nocapture %0) {
%2 = getelementptr inbounds double, double* %0, i64 1
%3 = load double, double* %2
%4 = fptosi double %3 to i32
%5 = add nsw i32 %4, -1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ lentoks(char *);
int main() {
  char *test = "  The quick brown fox   ";
  lentoks(test);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c" The quick brown fox \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @lentoks(i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c" The quick brown fox \00"
define i32 @main() {
%1 = tail call i32 @lentoks(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
void baz_2(int a, int b, int c) {
  if (a && b)
    foo();
  if (b || c)
    bar();
}


x86 assembly (clang, -O0):
<baz_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114c <baz_2+0x2c>
cmpl   $0x0,-0x8(%rbp)
je     114c <baz_2+0x2c>
mov    $0x0,%al
call   1040 <foo@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1160 <baz_2+0x40>
cmpl   $0x0,-0xc(%rbp)
je     1167 <baz_2+0x47>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz_2>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
test   %edi,%edi
je     1136 <baz_2+0x16>
test   %ebp,%ebp
je     1136 <baz_2+0x16>
xor    %eax,%eax
call   1040 <foo@plt>
or     %ebp,%ebx
je     1147 <baz_2+0x27>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <bar@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @baz_2(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 = icmp ne i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = load i32, i32* %5
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 (...) @foo()
br label %14
14: ; preds = %12, %9, %3
%15 = load i32, i32* %5
%16 = icmp ne i32 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %6
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %17, %14
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %17
ret void
}

LLVM IR (-O2):
define void @baz_2(i32 %0, i32 %1, i32 %2) {
%4 = icmp ne i32 %0, 0
%5 = icmp ne i32 %1, 0
%6 = and i1 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 (...) @foo()
br label %9
9: ; preds = %7, %3
%10 = or i32 %2, %1
%11 = icmp eq i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %9
%13 = tail call i32 (...) @bar()
br label %14
14: ; preds = %9, %12
ret void
}
/* Variables and functions */
scalar_t__ test_get_first_losing_move();
scalar_t__ test_get_first_losing_move_4();
scalar_t__ test_get_first_winning_move_3();
short runTests() {
  short failed_test_count = 0;
  failed_test_count += test_get_first_losing_move();
  failed_test_count += test_get_first_winning_move_3();
  failed_test_count += test_get_first_losing_move_4();
  return failed_test_count;
}


x86 assembly (clang, -O0):
<runTests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movw   $0x0,-0x2(%rbp)
mov    $0x0,%al
call   1030 <test_get_first_losing_move@plt>
mov    %rax,%rcx
movswq -0x2(%rbp),%rax
add    %rcx,%rax
mov    %ax,-0x2(%rbp)
mov    $0x0,%al
call   1040 <test_get_first_winning_move_3@plt>
mov    %rax,%rcx
movswq -0x2(%rbp),%rax
add    %rcx,%rax
mov    %ax,-0x2(%rbp)
mov    $0x0,%al
call   1050 <test_get_first_losing_move_4@plt>
mov    %rax,%rcx
movswq -0x2(%rbp),%rax
add    %rcx,%rax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runTests>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <test_get_first_losing_move@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1040 <test_get_first_winning_move_3@plt>
mov    %rax,%rbx
add    %r14d,%ebx
xor    %eax,%eax
call   1050 <test_get_first_losing_move_4@plt>
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define signext i16 @runTests() {
%1 = alloca i16
store i16 0, i16* %1
%2 = call i64 (...) @test_get_first_losing_move()
%3 = load i16, i16* %1
%4 = sext i16 %3 to i64
%5 = add nsw i64 %4, %2
%6 = trunc i64 %5 to i16
store i16 %6, i16* %1
%7 = call i64 (...) @test_get_first_winning_move_3()
%8 = load i16, i16* %1
%9 = sext i16 %8 to i64
%10 = add nsw i64 %9, %7
%11 = trunc i64 %10 to i16
store i16 %11, i16* %1
%12 = call i64 (...) @test_get_first_losing_move_4()
%13 = load i16, i16* %1
%14 = sext i16 %13 to i64
%15 = add nsw i64 %14, %12
%16 = trunc i64 %15 to i16
store i16 %16, i16* %1
%17 = load i16, i16* %1
ret i16 %17
}

LLVM IR (-O2):
define signext i16 @runTests() {
%1 = tail call i64 (...) @test_get_first_losing_move()
%2 = tail call i64 (...) @test_get_first_winning_move_3()
%3 = add i64 %2, %1
%4 = tail call i64 (...) @test_get_first_losing_move_4()
%5 = add i64 %3, %4
%6 = trunc i64 %5 to i16
ret i16 %6
}
int test_imm_A5int64_lowword_mem(long long *val) {
  return ((*val) & (0xA5 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A5int64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 165
%6 = icmp ne i64 %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_A5int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 165
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct _class {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mayer_term();
void fftclass_cleanup(struct _class *c) { mayer_term(); }


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

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

LLVM IR (-O0):
%struct._class = type { i32 }
define void @fftclass_cleanup(%struct._class* %0) {
%2 = alloca %struct._class*
store %struct._class* %0, %struct._class** %2
%3 = call i32 (...) @mayer_term()
ret void
}

LLVM IR (-O2):
%struct._class = type { i32 }
define void @fftclass_cleanup(%struct._class* nocapture readnone %0) {
%2 = tail call i32 (...) @mayer_term()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ yyparse();
main(void) {
  yyparse();
  printf("\nTerminé");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <yyparse@plt>
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"\0ATermin\C3\A9\00"
define i32 @main() {
%1 = call i32 (...) @yyparse()
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"\0ATermin\C3\A9\00"
define i32 @main() {
%1 = tail call i32 (...) @yyparse()
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int ld_bun_rr1(long double a1, long double a2) {
  return (__builtin_isunordered(a1, a2));
}


x86 assembly (clang, -O0):
<ld_bun_rr1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setp   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_bun_rr1>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setp   %al
ret

LLVM IR (-O0):
define i32 @ld_bun_rr1(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fcmp uno x86_fp80 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ld_bun_rr1(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp uno x86_fp80 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_standard_multi_homogenization(int n, int m, int *idz, int lintype) {
  int fail;
  int pars[3];
  double *c;
  pars[0] = n;
  pars[1] = m;
  pars[2] = lintype;
  fail = _ada_use_c2phc4c(904, pars, idz, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_standard_multi_homogenization>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x24(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    $0x388,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_standard_multi_homogenization>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %ecx,0x14(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x388,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @syscon_standard_multi_homogenization(i32 %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca [3 x i32]
%11 = alloca double*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%12 = load i32, i32* %5
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
store i32 %12, i32* %13
%14 = load i32, i32* %6
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 1
store i32 %14, i32* %15
%16 = load i32, i32* %8
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 2
store i32 %16, i32* %17
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
%19 = load i32*, i32** %7
%20 = load double*, double** %11
%21 = call i32 @_ada_use_c2phc4c(i32 904, i32* %18, i32* %19, double* %20, i32 0)
store i32 %21, i32* %9
%22 = load i32, i32* %9
ret i32 %22
}

LLVM IR (-O2):
define i32 @syscon_standard_multi_homogenization(i32 %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca [3 x i32]
%6 = bitcast [3 x i32]* %5 to i8*
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
store i32 %0, i32* %7
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
store i32 %1, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
store i32 %3, i32* %9
%10 = call i32 @_ada_use_c2phc4c(i32 904, i32* %7, i32* %2, double* undef, i32 0)
ret i32 %10
}
int getnext(int arr[], int pos) {
  int i = pos;
  while (arr[i] == 0 && i < 30)
    ++i;
  return i;
}


x86 assembly (clang, -O0):
<getnext>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
xor    %eax,%eax
cmpl   $0x0,(%rcx,%rdx,4)
mov    %al,-0x11(%rbp)
jne    1132 <getnext+0x32>
cmpl   $0x1e,-0x10(%rbp)
setl   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1142 <getnext+0x42>
jmp    1150 <getnext+0x50>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1111 <getnext+0x11>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getnext>:
movslq %esi,%rcx
lea    -0x1(%rcx),%eax
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%eax
cmpl   $0x0,(%rdi,%rcx,4)
jne    1126 <getnext+0x26>
lea    0x1(%rcx),%rdx
cmp    $0x1e,%rcx
mov    %rdx,%rcx
jl     1110 <getnext+0x10>
ret

LLVM IR (-O0):
define i32 @getnext(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
store i32 %6, i32* %5
br label %7
7: ; preds = %19, %2
%8 = load i32*, i32** %3
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %7
%15 = load i32, i32* %5
%16 = icmp slt i32 %15, 30
br label %17
17: ; preds = %14, %7
%18 = phi i1 [ false, %7 ], [ %16, %14 ]
br i1 %18, label %19, label %22
19: ; preds = %17
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %7
22: ; preds = %17
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
define i32 @getnext(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %4, %2
%5 = phi i64 [ %11, %4 ], [ %3, %2 ]
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 0
%9 = icmp slt i64 %5, 30
%10 = select i1 %8, i1 %9, i1 false
%11 = add nsw i64 %5, 1
br i1 %10, label %4, label %12
12: ; preds = %4
%13 = trunc i64 %5 to i32
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p224_square(uintptr_t, uintptr_t);
void fiat_p224_square(uint64_t out1[4], const uint64_t arg1[4]) {
  internal_fiat_p224_square((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p224_square>:
jmp    1030 <internal_fiat_p224_square@plt>

LLVM IR (-O0):
define void @fiat_p224_square(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p224_square(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p224_square(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p224_square(i64 %3, i64 %4)
ret void
}
void trim_end(char *str) {
  while (0 != *str) {
    if (*str == ' ' || *str == '\n' || *str == '\t' || *str == '\r') {
      *str = 0;
      return;
    }
    str++;
  }
}


x86 assembly (clang, -O0):
<trim_end>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     1176 <trim_end+0x76>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1159 <trim_end+0x59>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1159 <trim_end+0x59>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     1159 <trim_end+0x59>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
jne    1165 <trim_end+0x65>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    1176 <trim_end+0x76>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <trim_end+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim_end>:
movabs $0x100002600,%rax
jmp    1114 <trim_end+0x14>
nopl   0x0(%rax)
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x20,%rcx
ja     1110 <trim_end+0x10>
bt     %rcx,%rax
jb     1129 <trim_end+0x29>
test   %rcx,%rcx
jne    1110 <trim_end+0x10>
ret
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @trim_end(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %30, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 0, %6
br i1 %7, label %8, label %33
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 32
br i1 %12, label %28, label %13
13: ; preds = %8
%14 = load i8*, i8** %2
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 10
br i1 %17, label %28, label %18
18: ; preds = %13
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 9
br i1 %22, label %28, label %23
23: ; preds = %18
%24 = load i8*, i8** %2
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 13
br i1 %27, label %28, label %30
28: ; preds = %23, %18, %13, %8
%29 = load i8*, i8** %2
store i8 0, i8* %29
br label %33
30: ; preds = %23
%31 = load i8*, i8** %2
%32 = getelementptr inbounds i8, i8* %31, i32 1
store i8* %32, i8** %2
br label %3
33: ; preds = %28, %3
ret void
}

LLVM IR (-O2):
define void @trim_end(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 32, label %5
i8 10, label %5
i8 9, label %5
i8 13, label %5
]
5: ; preds = %2, %2, %2, %2
store i8 0, i8* %3
br label %8
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2, %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ atomic_flag;

/* Variables and functions */
int /*<<< orphan*/ ATOMIC_FLAG_INIT;
int /*<<< orphan*/ atomic_flag_clear(int /*<<< orphan*/ *);
int /*<<< orphan*/ atomic_flag_test_and_set(int /*<<< orphan*/ *);
int main() {
  atomic_flag af = ATOMIC_FLAG_INIT;
  if (!atomic_flag_test_and_set(&af))
    atomic_flag_clear(&af);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <atomic_flag_test_and_set@plt>
cmp    $0x0,%eax
jne    1156 <main+0x36>
lea    -0x8(%rbp),%rdi
call   1030 <atomic_flag_clear@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1040 <atomic_flag_test_and_set@plt>
test   %eax,%eax
jne    1146 <main+0x26>
lea    0x4(%rsp),%rdi
call   1030 <atomic_flag_clear@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ATOMIC_FLAG_INIT = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @ATOMIC_FLAG_INIT
store i32 %3, i32* %2
%4 = call i32 @atomic_flag_test_and_set(i32* %2)
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 @atomic_flag_clear(i32* %2)
br label %8
8: ; preds = %6, %0
ret i32 0
}

LLVM IR (-O2):
@ATOMIC_FLAG_INIT = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @ATOMIC_FLAG_INIT
store i32 %3, i32* %1
%4 = call i32 @atomic_flag_test_and_set(i32* %1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @atomic_flag_clear(i32* %1)
br label %8
8: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
char *strrchr(char const *, char);
char *cstring_basename(const char *path) {
  char *s = strrchr(path, '/');
  return (s != 0) ? (s + 1) : (char *)path;
}


x86 assembly (clang, -O0):
<cstring_basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <cstring_basename+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <cstring_basename+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cstring_basename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @cstring_basename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
void EXTI1_IRQHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @EXTI1_IRQHandler() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, unsigned int);
const char *enc_name_id(unsigned id) {
  static char buf[16];
  snprintf(buf, sizeof(buf), "_ID%d", id);
  return buf;
}


x86 assembly (clang, -O0):
<enc_name_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0x2f1b(%rip),%rdi
mov    $0x10,%esi
lea    0xecf(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2f03(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enc_name_id>:
push   %rbx
mov    %edi,%ecx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rdx
mov    %rbx,%rdi
mov    $0x10,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@enc_name_id.buf = internal global [16 x i8] zeroinitializer
@.str = [6 x i8] c"_ID%d\00"
define i8* @enc_name_id(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @snprintf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @enc_name_id.buf, i64 0, i64 0), i32 16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @enc_name_id.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@enc_name_id.buf = internal global [16 x i8] zeroinitializer
@.str = [6 x i8] c"_ID%d\00"
define i8* @enc_name_id(i32 %0) {
%2 = tail call i32 @snprintf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @enc_name_id.buf, i64 0, i64 0), i32 16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @enc_name_id.buf, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ aaa(char *);
char *malloc(int);
int /*<<< orphan*/ ok_to_suppress_double_free_from_this_fun(char *);
int main(int argc, char *argv[]) {
  char *x = malloc(10);
  char *y = malloc(10);
  if (argc > 1)
    ok_to_suppress_double_free_from_this_fun(y);
  aaa(x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1175 <main+0x45>
mov    -0x20(%rbp),%rdi
call   1030 <ok_to_suppress_double_free_from_this_fun@plt>
mov    -0x18(%rbp),%rdi
call   1050 <aaa@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0xa,%edi
call   1040 <malloc@plt>
cmp    $0x2,%ebp
jl     1159 <main+0x29>
mov    %rax,%rdi
call   1030 <ok_to_suppress_double_free_from_this_fun@plt>
mov    %rbx,%rdi
call   1050 <aaa@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i8* @malloc(i32 10)
store i8* %8, i8** %6
%9 = call i8* @malloc(i32 10)
store i8* %9, i8** %7
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i8*, i8** %7
%14 = call i32 @ok_to_suppress_double_free_from_this_fun(i8* %13)
br label %15
15: ; preds = %12, %2
%16 = load i8*, i8** %6
%17 = call i32 @aaa(i8* %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(10) i8* @malloc(i32 10)
%4 = tail call dereferenceable_or_null(10) i8* @malloc(i32 10)
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @ok_to_suppress_double_free_from_this_fun(i8* %4)
br label %8
8: ; preds = %6, %2
%9 = tail call i32 @aaa(i8* %3)
ret i32 0
}
/* Variables and functions */
int sr_compare_u32(char *, char *);
__attribute__((hot)) int
sr_cmpu32_raw_reverse(char *a, int asz __attribute__((unused)), char *b,
                      int bsz __attribute__((unused)),
                      void *arg __attribute__((unused))) {
  return -sr_compare_u32(a, b);
}


x86 assembly (clang, -O0):
<sr_cmpu32_raw_reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <sr_compare_u32@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sr_cmpu32_raw_reverse>:
push   %rax
mov    %rdx,%rsi
call   1030 <sr_compare_u32@plt>
neg    %eax
pop    %rcx
ret
nopl   (%rax)

LLVM IR (-O0):
define i32 @sr_cmpu32_raw_reverse(i8* %0, i32 %1, i8* %2, i32 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %8
%13 = call i32 @sr_compare_u32(i8* %11, i8* %12)
%14 = sub nsw i32 0, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @sr_cmpu32_raw_reverse(i8* %0, i32 %1, i8* %2, i32 %3, i8* nocapture readnone %4) {
%6 = tail call i32 @sr_compare_u32(i8* %0, i8* %2)
%7 = sub nsw i32 0, %6
ret i32 %7
}
/* Variables and functions */
bool isleap(int year) {
  return ((year % 4 == 0) && (year % 100) != 0) || (year % 400 == 0);
}


x86 assembly (clang, -O0):
<isleap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1134 <isleap+0x34>
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    $0x1,%al
cmp    $0x0,%edx
mov    %al,-0x5(%rbp)
jne    1148 <isleap+0x48>
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isleap>:
test   $0x3,%dil
jne    112c <isleap+0x2c>
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%ecx
mov    %edi,%edx
mov    $0x1,%eax
sub    %ecx,%edx
je     112c <isleap+0x2c>
ret
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
ror    $0x4,%ecx
xor    %eax,%eax
cmp    $0xa3d70b,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @isleap(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 4
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = srem i32 %7, 100
%9 = icmp ne i32 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6, %1
%11 = load i32, i32* %2
%12 = srem i32 %11, 400
%13 = icmp eq i32 %12, 0
br label %14
14: ; preds = %10, %6
%15 = phi i1 [ true, %6 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isleap(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp ne i32 %2, 0
%4 = srem i32 %0, 100
%5 = icmp eq i32 %4, 0
%6 = or i1 %3, %5
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = srem i32 %0, 400
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %1, %7
%12 = phi i32 [ %10, %7 ], [ 1, %1 ]
ret i32 %12
}
void uart_send(unsigned int c) {
  do {
    asm volatile("nop");
  } while (!(*((volatile unsigned int *)(0x3F000000 + 0x00215054)) & 0x20));
  *((volatile unsigned int *)(0x3F000000 + 0x00215040)) = c;
}


x86 assembly (clang, -O0):
<uart_send>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
nop
mov    $0x3f215054,%eax
mov    (%rax),%eax
and    $0x20,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1107 <uart_send+0x7>
mov    -0x4(%rbp),%ecx
mov    $0x3f215040,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_send>:
nop
testl  $0x20,0x3f215054
je     1100 <uart_send>
mov    %edi,0x3f215040
ret

LLVM IR (-O0):
define void @uart_send(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %4, %1
br label %4
4: ; preds = %3
%5 = load volatile i32, i32* inttoptr (i64 1059147860 to i32*)
%6 = and i32 %5, 32
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %3, label %9
9: ; preds = %4
%10 = load i32, i32* %2
store volatile i32 %10, i32* inttoptr (i64 1059147840 to i32*)
ret void
}

LLVM IR (-O2):
define void @uart_send(i32 %0) {
br label %2
2: ; preds = %2, %1
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
%3 = load volatile i32, i32* inttoptr (i64 1059147860 to i32*)
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
store volatile i32 %0, i32* inttoptr (i64 1059147840 to i32*)
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_IFCHR;
int _fstat(int file __attribute__((unused)), struct stat *st) {
  st->st_mode = S_IFCHR;
  return 0;
}


x86 assembly (clang, -O0):
<_fstat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ece(%rip),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fstat>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@S_IFCHR = global i32 0
define i32 @_fstat(i32 %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca %struct.stat*
store i32 %0, i32* %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* @S_IFCHR
%6 = load %struct.stat*, %struct.stat** %4
%7 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
store i32 %5, i32* %7
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_IFCHR = global i32 0
define i32 @_fstat(i32 %0, %struct.stat* nocapture writeonly %1) {
%3 = load i32, i32* @S_IFCHR
%4 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
store i32 %3, i32* %4
ret i32 0
}
void g_DUMMY_popup_set_buttonlabel(int cont_id, char *label, int whichbutton) {
  cont_id = cont_id;
  label = label;
  whichbutton = whichbutton;
}


x86 assembly (clang, -O0):
<g_DUMMY_popup_set_buttonlabel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @g_DUMMY_popup_set_buttonlabel(i32 %0, i8* nocapture %1, i32 %2) {
ret void
}
void protocol_basic_free_client_data(struct client *c) {}


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

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

LLVM IR (-O0):
%struct.client = type opaque
define void @protocol_basic_free_client_data(%struct.client* %0) {
%2 = alloca %struct.client*
store %struct.client* %0, %struct.client** %2
ret void
}

LLVM IR (-O2):
%struct.client = type opaque
define void @protocol_basic_free_client_data(%struct.client* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ getchar();
int *malloc(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  int *img = malloc(5 * 1024 * 1024);
  if (img == NULL) {
    printf("Falha\n");
  } else {
    printf("Sucesso\n");
  }
  getchar();
  free(img);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x500000,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1180 <main+0x40>
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
jmp    118c <main+0x4c>
lea    0xe80(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x500000,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
lea    0xeb0(%rip),%rax
lea    0xea1(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Falha\0A\00"
@.str.1 = [9 x i8] c"Sucesso\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32* @malloc(i32 5242880)
store i32* %7, i32** %6
%8 = load i32*, i32** %6
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %14
12: ; preds = %2
%13 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
%15 = call i32 (...) @getchar()
%16 = load i32*, i32** %6
%17 = call i32 @free(i32* %16)
ret i32 0
}

LLVM IR (-O2):
@str = [8 x i8] c"Sucesso\00"
@str.2 = [6 x i8] c"Falha\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32* @malloc(i32 5242880)
%4 = icmp eq i32* %3, null
%5 = select i1 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
%7 = tail call i32 (...) @getchar()
%8 = tail call i32 @free(i32* %3)
ret i32 0
}
_Complex short pass_complex_short(_Complex short arg) { return arg; }


x86 assembly (clang, -O0):
<pass_complex_short>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x10(%rbp)
mov    -0x10(%rbp),%cx
mov    -0xe(%rbp),%ax
mov    %cx,-0x8(%rbp)
mov    %ax,-0x6(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pass_complex_short>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @pass_complex_short(i32 %0) {
%2 = alloca { i16, i16 }
%3 = alloca { i16, i16 }
%4 = bitcast { i16, i16 }* %3 to i32*
store i32 %0, i32* %4
%5 = getelementptr inbounds { i16, i16 }, { i16, i16 }* %3, i32 0, i32 0
%6 = load i16, i16* %5
%7 = getelementptr inbounds { i16, i16 }, { i16, i16 }* %3, i32 0, i32 1
%8 = load i16, i16* %7
%9 = getelementptr inbounds { i16, i16 }, { i16, i16 }* %2, i32 0, i32 0
%10 = getelementptr inbounds { i16, i16 }, { i16, i16 }* %2, i32 0, i32 1
store i16 %6, i16* %9
store i16 %8, i16* %10
%11 = bitcast { i16, i16 }* %2 to i32*
%12 = load i32, i32* %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @pass_complex_short(i32 returned %0) {
ret i32 %0
}
void foo381() {}


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

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

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

LLVM IR (-O2):
define void @foo381() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ run_dialog(int);
void save_as_dialog() { run_dialog(1); }


x86 assembly (clang, -O0):
<save_as_dialog>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <run_dialog@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_as_dialog>:
mov    $0x1,%edi
jmp    1030 <run_dialog@plt>

LLVM IR (-O0):
define void @save_as_dialog() {
%1 = call i32 @run_dialog(i32 1)
ret void
}

LLVM IR (-O2):
define void @save_as_dialog() {
%1 = tail call i32 @run_dialog(i32 1)
ret void
}
int main() {
  int a;
  a = 0;
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void panic(char *x) { return; }


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

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

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

LLVM IR (-O2):
define void @panic(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int integers_cmp(int, int);
int line_no_cmp(const void *first, const void *second) {
  return integers_cmp(*(int *)first, *(int *)second);
}


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

x86 assembly (clang, -O2):
<line_no_cmp>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <integers_cmp@plt>

LLVM IR (-O0):
define i32 @line_no_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = call i32 @integers_cmp(i32 %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @line_no_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = tail call i32 @integers_cmp(i32 %4, i32 %6)
ret i32 %7
}
int test(int a) {
  int b = 0;
  switch (a) {
  case 1:
    b = 2;
    break;
  case 2:
    b = 3;
  case 3:
    b = 0;
  default:
    b = 6;
    break;
  }
  return b;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     1144 <test+0x44>
jmp    1122 <test+0x22>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1150 <test+0x50>
jmp    1133 <test+0x33>
mov    -0xc(%rbp),%eax
sub    $0x3,%eax
je     1157 <test+0x57>
jmp    115e <test+0x5e>
movl   $0x2,-0x8(%rbp)
jmp    1165 <test+0x65>
movl   $0x3,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x6,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
xor    %eax,%eax
cmp    $0x1,%edi
setne  %al
lea    0x2(,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @test(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %8 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
]
5: ; preds = %1
store i32 2, i32* %3
br label %9
6: ; preds = %1
store i32 3, i32* %3
br label %7
7: ; preds = %1, %6
store i32 0, i32* %3
br label %8
8: ; preds = %1, %7
store i32 6, i32* %3
br label %9
9: ; preds = %8, %5
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @test(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i32 2, i32 6
ret i32 %3
}
int test_imm_5Euint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x5E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Euint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x5e,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_5Euint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 94
%6 = icmp ne i64 %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_5Euint64_midword_reg(i64 %0) {
%2 = and i64 %0, 6160384
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}