xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ target;
};
struct TYPE_4__ {
  TYPE_1__ xselection;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xselection_target(void *_p) {
  return (unsigned long)((XEvent *)_p)->xselection.target;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xselection_target(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xselection_target(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Type definitions */
struct ship {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Write(int, struct ship *, long, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
void send_hull(struct ship *ship, long a) { Write(12, ship, a, 0, 0, 0); }


x86 assembly (clang, -O0):
<send_hull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0xc,%edi
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <Write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_hull>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xc,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <Write@plt>

LLVM IR (-O0):
%struct.ship = type { i32 }
define void @send_hull(%struct.ship* %0, i64 %1) {
%3 = alloca %struct.ship*
%4 = alloca i64
store %struct.ship* %0, %struct.ship** %3
store i64 %1, i64* %4
%5 = load %struct.ship*, %struct.ship** %3
%6 = load i64, i64* %4
%7 = call i32 @Write(i32 12, %struct.ship* %5, i64 %6, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.ship = type { i32 }
define void @send_hull(%struct.ship* %0, i64 %1) {
%3 = tail call i32 @Write(i32 12, %struct.ship* %0, i64 %1, i32 0, i32 0, i32 0)
ret void
}
void gtk_tree_view_column_get_sort_order() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_get_sort_order() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f6(float, float);
void f7(float f, float g) { f6(f, g); }


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <f6@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7>:
jmp    1030 <f6@plt>

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

LLVM IR (-O2):
define void @f7(float %0, float %1) {
%3 = tail call i32 @f6(float %0, float %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void *func1(void *arg) {
  printf("Eu sou a thread ID1 imprimindo %d\n", *((int *)arg));
  return 0;
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [35 x i8] c"Eu sou a thread ID1 imprimindo %d\0A\00"
define i8* @func1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i8* null
}

LLVM IR (-O2):
@.str = [35 x i8] c"Eu sou a thread ID1 imprimindo %d\0A\00"
define noalias i8* @func1(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* null
}
int default_charge_level(struct battery *b) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.battery = type opaque
define i32 @default_charge_level(%struct.battery* nocapture readnone %0) {
ret i32 0
}
int is_paren_close(char c) { return (c == ')') ? 1 : 0; }


x86 assembly (clang, -O0):
<is_paren_close>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x29,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_paren_close>:
xor    %eax,%eax
cmp    $0x29,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_paren_close(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 41
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_paren_close(i8 signext %0) {
%2 = icmp eq i8 %0, 41
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mb();
void plat_extra_sync_for_device(struct device *dev) { mb(); }


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

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

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

LLVM IR (-O2):
%struct.device = type { i32 }
define void @plat_extra_sync_for_device(%struct.device* nocapture readnone %0) {
%2 = tail call i32 (...) @mb()
ret void
}
/* Variables and functions */
int hammingWeight(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  printf("%d\n", hammingWeight(11));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @hammingWeight(i32 11)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
struct timespec {
  int tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ get_time(struct timespec *);
unsigned current_time_sec(void) {
  struct timespec ts;
  get_time(&ts);
  return ts.tv_sec;
}


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

x86 assembly (clang, -O2):
<current_time_sec>:
push   %rax
mov    %rsp,%rdi
call   1030 <get_time@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @current_time_sec() {
%1 = alloca %struct.timespec
%2 = call i32 @get_time(%struct.timespec* %1)
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @current_time_sec() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = call i32 @get_time(%struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}
void X509_NAME_ENTRY_create_by_txt(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ vt_write_str(char *);
int /*<<< orphan*/ vt_write_uint16(int /*<<< orphan*/);
void tellsize(uint32_t rows, uint32_t columns) {
  vt_write_uint16(columns);
  vt_write_str("x");
  vt_write_uint16(rows);
  vt_write_str("\n");
}


x86 assembly (clang, -O0):
<tellsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <vt_write_uint16@plt>
lea    0xec3(%rip),%rdi
call   1040 <vt_write_str@plt>
mov    -0x4(%rbp),%edi
call   1030 <vt_write_uint16@plt>
lea    0xeb1(%rip),%rdi
call   1040 <vt_write_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tellsize>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <vt_write_uint16@plt>
lea    0xecf(%rip),%rdi
call   1040 <vt_write_str@plt>
mov    %ebx,%edi
call   1030 <vt_write_uint16@plt>
lea    0xebe(%rip),%rdi
pop    %rbx
jmp    1040 <vt_write_str@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"x\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @tellsize(i32 %0, i32 %1) {
%3 = tail call i32 @vt_write_uint16(i32 %1)
%4 = tail call i32 @vt_write_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @vt_write_uint16(i32 %0)
%6 = tail call i32 @vt_write_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
__attribute__((always_)) const float rintfk(float x) {
  return x < 0 ? (int)(x - 0.5f) : (int)(x + 0.5f);
}


x86 assembly (clang, -O0):
<rintfk>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1133 <rintfk+0x33>
movss  -0x4(%rbp),%xmm0
movss  0xedd(%rip),%xmm1
subss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
jmp    1147 <rintfk+0x47>
movss  0xec5(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rintfk>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
seta   %al
lea    0xeee(%rip),%rcx
addss  (%rcx,%rax,4),%xmm0
cvttps2dq %xmm0,%xmm0
cvtdq2ps %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @rintfk(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load float, float* %2
%7 = fsub float %6, 5.000000e-01
%8 = fptosi float %7 to i32
br label %13
9: ; preds = %1
%10 = load float, float* %2
%11 = fadd float %10, 5.000000e-01
%12 = fptosi float %11 to i32
br label %13
13: ; preds = %9, %5
%14 = phi i32 [ %8, %5 ], [ %12, %9 ]
%15 = sitofp i32 %14 to float
ret float %15
}

LLVM IR (-O2):
define float @rintfk(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = select i1 %2, float -5.000000e-01, float 5.000000e-01
%4 = fadd float %3, %0
%5 = fptosi float %4 to i32
%6 = sitofp i32 %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rightrot(int, int);
main() {
  int a = rightrot(255, 32);
  printf("%d\n", a);
  int b = rightrot(1, 30);
  printf("%d\n", b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xff,%edi
mov    $0x20,%esi
call   1040 <rightrot@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
mov    $0x1e,%esi
call   1040 <rightrot@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xff,%edi
mov    $0x20,%esi
call   1040 <rightrot@plt>
lea    0xec9(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
mov    $0x1e,%esi
call   1040 <rightrot@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @rightrot(i32 255, i32 32)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @rightrot(i32 1, i32 30)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
struct intset {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int intset_find(struct intset const *, int /*<<< orphan*/, size_t *);
int intset_contains(const struct intset *s, int64_t val) {
  size_t index;
  return intset_find(s, val, &index);
}


x86 assembly (clang, -O0):
<intset_contains>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x18(%rbp),%rdx
call   1030 <intset_find@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intset_contains>:
push   %rax
mov    %rsp,%rdx
call   1030 <intset_find@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.intset = type { i32 }
define i32 @intset_contains(%struct.intset* %0, i32 %1) {
%3 = alloca %struct.intset*
%4 = alloca i32
%5 = alloca i64
store %struct.intset* %0, %struct.intset** %3
store i32 %1, i32* %4
%6 = load %struct.intset*, %struct.intset** %3
%7 = load i32, i32* %4
%8 = call i32 @intset_find(%struct.intset* %6, i32 %7, i64* %5)
ret i32 %8
}

LLVM IR (-O2):
%struct.intset = type { i32 }
define i32 @intset_contains(%struct.intset* %0, i32 %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = call i32 @intset_find(%struct.intset* %0, i32 %1, i64* %3)
ret i32 %5
}
/* Variables and functions */
unsigned char getI2C1(int);
int /*<<< orphan*/ putI2C1(int);
int /*<<< orphan*/ restartI2C1();
int /*<<< orphan*/ startI2C1();
int /*<<< orphan*/ stopI2C1();
unsigned int readTempDS1631(void) {
  unsigned char temp_hi = 0;
  unsigned char temp_lo = 0;
  startI2C1();
  putI2C1(0x90);
  putI2C1(0xAA);
  restartI2C1();
  putI2C1(0x91);
  temp_hi = getI2C1(0);
  temp_lo = getI2C1(1);
  stopI2C1();
  return (((temp_hi << 8) | temp_lo) / 256);
}


x86 assembly (clang, -O0):
<readTempDS1631>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
mov    $0x0,%al
call   1030 <startI2C1@plt>
mov    $0x90,%edi
call   1070 <putI2C1@plt>
mov    $0xaa,%edi
call   1070 <putI2C1@plt>
mov    $0x0,%al
call   1060 <restartI2C1@plt>
mov    $0x91,%edi
call   1070 <putI2C1@plt>
xor    %edi,%edi
call   1050 <getI2C1@plt>
mov    %al,-0x1(%rbp)
mov    $0x1,%edi
call   1050 <getI2C1@plt>
mov    %al,-0x2(%rbp)
mov    $0x0,%al
call   1040 <stopI2C1@plt>
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readTempDS1631>:
push   %rbx
xor    %eax,%eax
call   1030 <startI2C1@plt>
mov    $0x90,%edi
call   1070 <putI2C1@plt>
mov    $0xaa,%edi
call   1070 <putI2C1@plt>
xor    %eax,%eax
call   1060 <restartI2C1@plt>
mov    $0x91,%edi
call   1070 <putI2C1@plt>
xor    %edi,%edi
call   1050 <getI2C1@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1050 <getI2C1@plt>
xor    %eax,%eax
call   1040 <stopI2C1@plt>
movzbl %bl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @readTempDS1631() {
%1 = alloca i8
%2 = alloca i8
store i8 0, i8* %1
store i8 0, i8* %2
%3 = call i32 (...) @startI2C1()
%4 = call i32 @putI2C1(i32 144)
%5 = call i32 @putI2C1(i32 170)
%6 = call i32 (...) @restartI2C1()
%7 = call i32 @putI2C1(i32 145)
%8 = call zeroext i8 @getI2C1(i32 0)
store i8 %8, i8* %1
%9 = call zeroext i8 @getI2C1(i32 1)
store i8 %9, i8* %2
%10 = call i32 (...) @stopI2C1()
%11 = load i8, i8* %1
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %2
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
%17 = sdiv i32 %16, 256
ret i32 %17
}

LLVM IR (-O2):
define i32 @readTempDS1631() {
%1 = tail call i32 (...) @startI2C1()
%2 = tail call i32 @putI2C1(i32 144)
%3 = tail call i32 @putI2C1(i32 170)
%4 = tail call i32 (...) @restartI2C1()
%5 = tail call i32 @putI2C1(i32 145)
%6 = tail call zeroext i8 @getI2C1(i32 0)
%7 = tail call zeroext i8 @getI2C1(i32 1)
%8 = tail call i32 (...) @stopI2C1()
%9 = zext i8 %6 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int setBits(int);
int main() {
  int n;
  scanf("%d", &n);
  printf("The total set bits are %d", setBits(n));
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [26 x i8] c"The total set bits are %d\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
%4 = call i32 @setBits(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [26 x i8] c"The total set bits are %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @setBits(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gpu_send_control_gp0(int);
void gpu_draw_offset(int x, int y) {
  gpu_send_control_gp0(0xE5000000 | (x & 0x7FF) | ((y & 0x7FF) << 11));
}


x86 assembly (clang, -O0):
<gpu_draw_offset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
and    $0x7ff,%edi
or     $0xe5000000,%edi
mov    -0x8(%rbp),%eax
and    $0x7ff,%eax
shl    $0xb,%eax
or     %eax,%edi
call   1030 <gpu_send_control_gp0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpu_draw_offset>:
and    $0x7ff,%edi
shl    $0xb,%esi
and    $0x3ff800,%esi
add    %esi,%edi
add    $0xe5000000,%edi
jmp    1030 <gpu_send_control_gp0@plt>

LLVM IR (-O0):
define void @gpu_draw_offset(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 = and i32 %5, 2047
%7 = or i32 -452984832, %6
%8 = load i32, i32* %4
%9 = and i32 %8, 2047
%10 = shl i32 %9, 11
%11 = or i32 %7, %10
%12 = call i32 @gpu_send_control_gp0(i32 %11)
ret void
}

LLVM IR (-O2):
define void @gpu_draw_offset(i32 %0, i32 %1) {
%3 = and i32 %0, 2047
%4 = shl i32 %1, 11
%5 = and i32 %4, 4192256
%6 = or i32 %3, %5
%7 = or i32 %6, -452984832
%8 = tail call i32 @gpu_send_control_gp0(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LBA_REG_WRITE(void *, int, int);
int gemini_util_init(void *phys_addr) {
  LBA_REG_WRITE(phys_addr, 0x0500, 0);
  LBA_REG_WRITE(phys_addr, 0x0508, 0x1);
  LBA_REG_WRITE(phys_addr, 0x0528, 0x797900ff001f043cULL);
  return 0;
}


x86 assembly (clang, -O0):
<gemini_util_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x500,%esi
xor    %edx,%edx
call   1030 <LBA_REG_WRITE@plt>
mov    -0x8(%rbp),%rdi
mov    $0x508,%esi
mov    $0x1,%edx
call   1030 <LBA_REG_WRITE@plt>
mov    -0x8(%rbp),%rdi
mov    $0x528,%esi
mov    $0x1f043c,%edx
call   1030 <LBA_REG_WRITE@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gemini_util_init>:
push   %rbx
mov    %rdi,%rbx
mov    $0x500,%esi
xor    %edx,%edx
call   1030 <LBA_REG_WRITE@plt>
mov    %rbx,%rdi
mov    $0x508,%esi
mov    $0x1,%edx
call   1030 <LBA_REG_WRITE@plt>
mov    %rbx,%rdi
mov    $0x528,%esi
mov    $0x1f043c,%edx
call   1030 <LBA_REG_WRITE@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @gemini_util_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @LBA_REG_WRITE(i8* %3, i32 1280, i32 0)
%5 = load i8*, i8** %2
%6 = call i32 @LBA_REG_WRITE(i8* %5, i32 1288, i32 1)
%7 = load i8*, i8** %2
%8 = call i32 @LBA_REG_WRITE(i8* %7, i32 1320, i32 2032700)
ret i32 0
}

LLVM IR (-O2):
define i32 @gemini_util_init(i8* %0) {
%2 = tail call i32 @LBA_REG_WRITE(i8* %0, i32 1280, i32 0)
%3 = tail call i32 @LBA_REG_WRITE(i8* %0, i32 1288, i32 1)
%4 = tail call i32 @LBA_REG_WRITE(i8* %0, i32 1320, i32 2032700)
ret i32 0
}
/* Variables and functions */
scalar_t__ LDBL_MAX;
int /*<<< orphan*/ printf(char *, long double);
int main(void) {
  printf("%.0Lf\n", (long double)LDBL_MAX);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
fstpt  (%rsp)
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%.0Lf\0A\00"
@LDBL_MAX = global i64 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i64, i64* @LDBL_MAX
%3 = sitofp i64 %2 to x86_fp80
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), x86_fp80 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%.0Lf\0A\00"
@LDBL_MAX = global i64 0
define i32 @main() {
%1 = load i64, i64* @LDBL_MAX
%2 = sitofp i64 %1 to x86_fp80
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), x86_fp80 %2)
ret i32 0
}
void USB_OTG_BSP_TimerIRQ(void) {}


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

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

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

LLVM IR (-O2):
define void @USB_OTG_BSP_TimerIRQ() {
ret void
}
int ret4() { return 0x42; }


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

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

LLVM IR (-O0):
define i32 @ret4() {
ret i32 66
}

LLVM IR (-O2):
define i32 @ret4() {
ret i32 66
}
/* Variables and functions */
int /*<<< orphan*/ ab_thread_fini();
int /*<<< orphan*/ ab_thread_init();
int /*<<< orphan*/ abevent_fini();
scalar_t__ abevent_init();
int /*<<< orphan*/ abevent_loop();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ test_main();
int main() {
  if (abevent_init())
    exit(1);
  ab_thread_init();
  test_main();
  abevent_loop();
  ab_thread_fini();
  abevent_fini();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1080 <abevent_init@plt>
cmp    $0x0,%rax
je     119a <main+0x2a>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x0,%al
call   1030 <ab_thread_init@plt>
mov    $0x0,%al
call   1060 <test_main@plt>
mov    $0x0,%al
call   1040 <abevent_loop@plt>
mov    $0x0,%al
call   1070 <ab_thread_fini@plt>
mov    $0x0,%al
call   1050 <abevent_fini@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1080 <abevent_init@plt>
test   %rax,%rax
jne    11a4 <main+0x34>
xor    %eax,%eax
call   1030 <ab_thread_init@plt>
xor    %eax,%eax
call   1060 <test_main@plt>
xor    %eax,%eax
call   1040 <abevent_loop@plt>
xor    %eax,%eax
call   1070 <ab_thread_fini@plt>
xor    %eax,%eax
call   1050 <abevent_fini@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @abevent_init()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @exit(i32 1)
unreachable
6: ; preds = %0
%7 = call i32 (...) @ab_thread_init()
%8 = call i32 (...) @test_main()
%9 = call i32 (...) @abevent_loop()
%10 = call i32 (...) @ab_thread_fini()
%11 = call i32 (...) @abevent_fini()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @abevent_init()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @exit(i32 1)
unreachable
5: ; preds = %0
%6 = tail call i32 (...) @ab_thread_init()
%7 = tail call i32 (...) @test_main()
%8 = tail call i32 (...) @abevent_loop()
%9 = tail call i32 (...) @ab_thread_fini()
%10 = tail call i32 (...) @abevent_fini()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
int16_t twos_to_ones_complement2(int16_t num) {
  return num < 0 ? num - 1 : num;
}


x86 assembly (clang, -O0):
<twos_to_ones_complement2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1124 <twos_to_ones_complement2+0x24>
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    112c <twos_to_ones_complement2+0x2c>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<twos_to_ones_complement2>:
mov    %rdi,%rax
sar    $0x3f,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @twos_to_ones_complement2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 %6, 1
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @twos_to_ones_complement2(i64 %0) {
%2 = ashr i64 %0, 63
%3 = add nsw i64 %2, %0
ret i64 %3
}
void foo660() {}


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

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

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

LLVM IR (-O2):
define void @foo660() {
ret void
}
/* Variables and functions */
int CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *, size_t),
                             void (*f)(void *)) {
  return 0;
}


x86 assembly (clang, -O0):
<CRYPTO_set_mem_functions>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @CRYPTO_set_mem_functions(i8* (i64)* %0, i8* (i8*, i64)* %1, void (i8*)* %2) {
%4 = alloca i8* (i64)*
%5 = alloca i8* (i8*, i64)*
%6 = alloca void (i8*)*
store i8* (i64)* %0, i8* (i64)** %4
store i8* (i8*, i64)* %1, i8* (i8*, i64)** %5
store void (i8*)* %2, void (i8*)** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @CRYPTO_set_mem_functions(i8* (i64)* nocapture readnone %0, i8* (i8*, i64)* nocapture readnone %1, void (i8*)* nocapture readnone %2) {
ret i32 0
}
void UYVYToUV422Row_C() {}


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

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

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

LLVM IR (-O2):
define void @UYVYToUV422Row_C() {
ret void
}
void f(void) {
  int a, b;
  a < b;
  a <= b;
  a >= b;
  a == b;
  a != b;
}


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

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = icmp slt i32 %3, %4
%6 = zext i1 %5 to i32
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = icmp sle i32 %7, %8
%10 = zext i1 %9 to i32
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = icmp sge i32 %11, %12
%14 = zext i1 %13 to i32
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = icmp eq i32 %15, %16
%18 = zext i1 %17 to i32
%19 = load i32, i32* %1
%20 = load i32, i32* %2
%21 = icmp ne i32 %19, %20
%22 = zext i1 %21 to i32
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void fatal_error(const char *details, const char *f) {
  fprintf(stderr, "%s in %s() - %s\n", details, f, strerror(errno));
  exit(-1);
}


x86 assembly (clang, -O0):
<fatal_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    %rax,%r8
lea    0xe81(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal_error>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2e9f(%rip),%rax
mov    (%rax),%ebp
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xea8(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %rax,%r8
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"%s in %s() - %s\0A\00"
@errno = global i32 0
define void @fatal_error(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = load i32, i32* @errno
%5 = tail call i8* @strerror(i32 %4)
%6 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %5)
%7 = tail call i32 @exit(i32 -1)
unreachable
}
void symbol22_i386(void) {}


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

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

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

LLVM IR (-O2):
define void @symbol22_i386() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned long);
void wait(unsigned long duration) { usleep(duration * 1000); }


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

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

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

LLVM IR (-O2):
define void @wait(i64 %0) {
%2 = mul i64 %0, 1000
%3 = tail call i32 @usleep(i64 %2)
ret void
}
int compare_ptrs(const void *k1, const void *k2) { return !(k1 - k2); }


x86 assembly (clang, -O0):
<compare_ptrs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_ptrs>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @compare_ptrs(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 = load i8*, i8** %4
%7 = ptrtoint i8* %5 to i64
%8 = ptrtoint i8* %6 to i64
%9 = sub i64 %7, %8
%10 = icmp ne i64 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @compare_ptrs(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
float quadraticEaseOutf(float p) { return -(p * (p - 2)); }


x86 assembly (clang, -O0):
<quadraticEaseOutf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movss  0xee5(%rip),%xmm2
subss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadraticEaseOutf>:
movss  0xef8(%rip),%xmm1
addss  %xmm0,%xmm1
xorps  0xefd(%rip),%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @quadraticEaseOutf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fsub float %4, 2.000000e+00
%6 = fmul float %3, %5
%7 = fneg float %6
ret float %7
}

LLVM IR (-O2):
define float @quadraticEaseOutf(float %0) {
%2 = fadd float %0, -2.000000e+00
%3 = fneg float %2
%4 = fmul float %3, %0
ret float %4
}
_Bool Char__GT_(char a, char b) { return a > b; }


x86 assembly (clang, -O0):
<Char__GT_>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Char__GT_>:
cmp    %sil,%dil
setg   %al
ret

LLVM IR (-O0):
define zeroext i1 @Char__GT_(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = icmp sgt i32 %6, %8
ret i1 %9
}

LLVM IR (-O2):
define zeroext i1 @Char__GT_(i8 signext %0, i8 signext %1) {
%3 = icmp sgt i8 %0, %1
ret i1 %3
}
/* Variables and functions */
int /*<<< orphan*/ eprint(char *, unsigned int);
void *malloc(unsigned int);
void *emalloc(unsigned int size) {
  void *res = malloc(size);
  if (!res)
    eprint("fatal: could not malloc() %u bytes\n", size);
  return res;
}


x86 assembly (clang, -O0):
<emalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1151 <emalloc+0x31>
mov    -0x4(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1040 <eprint@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emalloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1140 <emalloc+0x20>
lea    0xec7(%rip),%rdi
mov    %ebp,%esi
call   1040 <eprint@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [36 x i8] c"fatal: could not malloc() %u bytes\0A\00"
define i8* @emalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 @eprint(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [36 x i8] c"fatal: could not malloc() %u bytes\0A\00"
define noalias i8* @emalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @eprint(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void Com_FrameCallback() {}


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

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

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

LLVM IR (-O2):
define void @Com_FrameCallback() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int x;
};
struct TYPE_4__ {
  TYPE_1__ xexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xexpose_x(void *_p, int _v) {
  ((XEvent *)_p)->xexpose.x = (int)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xexpose_x>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XEvent_xexpose_x>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xexpose_x(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xexpose_x(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t isect(uint8_t x, uint8_t lower, uint8_t upper) {
  return ((x >= lower) && (x <= upper));
}


x86 assembly (clang, -O0):
<isect>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmp    -0x10(%rbp),%rcx
mov    %al,-0x19(%rbp)
jl     1131 <isect+0x31>
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
setle  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<isect>:
cmp    %rsi,%rdi
setge  %al
cmp    %rdx,%rdi
setle  %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i64 @isect(i64 %0, i64 %1, i64 %2) {
%4 = icmp sge i64 %0, %1
%5 = icmp sle i64 %0, %2
%6 = and i1 %4, %5
%7 = zext i1 %6 to i64
ret i64 %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ root;
};
typedef TYPE_1__ XButtonEvent;

/* Variables and functions */
unsigned long get_XButtonEvent_root(void *_p) {
  return (unsigned long)((XButtonEvent *)_p)->root;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XButtonEvent_root(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XButtonEvent_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ LCDcmd(unsigned char);
void LCDposition(unsigned char ucPos) { LCDcmd(ucPos | 0x80); }


x86 assembly (clang, -O0):
<LCDposition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
or     $0x80,%eax
movzbl %al,%edi
call   1030 <LCDcmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDposition>:
or     $0x80,%dil
movzbl %dil,%edi
jmp    1030 <LCDcmd@plt>

LLVM IR (-O0):
define void @LCDposition(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = or i32 %4, 128
%6 = trunc i32 %5 to i8
%7 = call i32 @LCDcmd(i8 zeroext %6)
ret void
}

LLVM IR (-O2):
define void @LCDposition(i8 zeroext %0) {
%2 = or i8 %0, -128
%3 = tail call i32 @LCDcmd(i8 zeroext %2)
ret void
}
void COMP_E0_IRQHandler(void) {
  while (1) {
  }
}


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

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

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

LLVM IR (-O2):
define void @COMP_E0_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ endOfProcess();
int /*<<< orphan*/ send(char *);
void sender() {
  char *msg = "Message";
  send(msg);
  endOfProcess();
}


x86 assembly (clang, -O0):
<sender>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <send@plt>
mov    $0x0,%al
call   1030 <endOfProcess@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"Message\00"
define void @sender() {
%1 = alloca i8*
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @send(i8* %2)
%4 = call i32 (...) @endOfProcess()
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Message\00"
define void @sender() {
%1 = tail call i32 @send(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @endOfProcess()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strcasecmp(char *, char *);
void strcasecmp_2() {
  char *x = "abc";
  char *y = "Bcd";
  clang_analyzer_eval(strcasecmp(x, y) < 0);
}


x86 assembly (clang, -O0):
<strcasecmp_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcasecmp_2>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
@.str.1 = [4 x i8] c"Bcd\00"
define void @strcasecmp_2() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strcasecmp(i8* %3, i8* %4)
%6 = icmp slt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
@.str.1 = [4 x i8] c"Bcd\00"
define void @strcasecmp_2() {
%1 = tail call i64 @strcasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = lshr i64 %1, 63
%3 = trunc i64 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void showWrongInput() {
  printf("Wrong input. Use -h or -help command to get more information\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [62 x i8] c"Wrong input. Use -h or -help command to get more information\0A\00"
define void @showWrongInput() {
%1 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [61 x i8] c"Wrong input. Use -h or -help command to get more information\00"
define void @showWrongInput() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
ret void
}