xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int a[] = {2, 2, 2};
  int b[2];
  assert(a[0] == 2);
  assert(a[1] == 2);
  assert(a[2] == 2);
  b[0] = 3;
  assert(b[1] == 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x2,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x2,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x3,-0x18(%rbp)
cmpl   $0x3,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.a = [3 x i32] [i32 2, i32 2, i32 2]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca [2 x i32]
store i32 0, i32* %1
%4 = bitcast [3 x i32]* %2 to i8*
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 2
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 2
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%16 = load i32, i32* %15
%17 = icmp eq i32 %16, 2
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 3, i32* %20
%21 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%22 = load i32, i32* %21
%23 = icmp eq i32 %22, 3
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ wFileClose(int);
scalar_t__ wStackPopNumber();
void wBuiltinFClose() { wFileClose((int)wStackPopNumber()); }


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

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

LLVM IR (-O0):
define void @wBuiltinFClose() {
%1 = call i64 (...) @wStackPopNumber()
%2 = trunc i64 %1 to i32
%3 = call i32 @wFileClose(i32 %2)
ret void
}

LLVM IR (-O2):
define void @wBuiltinFClose() {
%1 = tail call i64 (...) @wStackPopNumber()
%2 = trunc i64 %1 to i32
%3 = tail call i32 @wFileClose(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ modf(double, double *);
double ip(double x) {
  double tmp;
  modf(x, &tmp);
  return (tmp);
}


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

x86 assembly (clang, -O2):
<ip>:
push   %rax
mov    %rsp,%rdi
call   1030 <modf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @ip(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i32 @modf(double %0, double* %2)
%5 = load double, double* %2
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int vscanf(char const *, int /*<<< orphan*/);
int __isoc99_vscanf(const char *restrict format, va_list args) {
  return vscanf(format, args);
}


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

x86 assembly (clang, -O2):
<__isoc99_vscanf>:
jmp    1030 <vscanf@plt>

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

LLVM IR (-O2):
define i32 @__isoc99_vscanf(i8* noalias %0, i32 %1) {
%3 = tail call i32 @vscanf(i8* %0, i32 %1)
ret i32 %3
}
void VecSelfScalarDiv3fv(float v[3], float s) {
  v[0] /= s;
  v[1] /= s;
  v[2] /= s;
}


x86 assembly (clang, -O0):
<VecSelfScalarDiv3fv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,(%rax)
movss  -0xc(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,0x4(%rax)
movss  -0xc(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<VecSelfScalarDiv3fv>:
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm2
divss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
divss  %xmm0,%xmm2
movss  %xmm2,0x4(%rdi)
movss  0x8(%rdi),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,0x8(%rdi)
ret

LLVM IR (-O0):
define void @VecSelfScalarDiv3fv(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
store float* %0, float** %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float*, float** %3
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = fdiv float %8, %5
store float %9, float* %7
%10 = load float, float* %4
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = fdiv float %13, %10
store float %14, float* %12
%15 = load float, float* %4
%16 = load float*, float** %3
%17 = getelementptr inbounds float, float* %16, i64 2
%18 = load float, float* %17
%19 = fdiv float %18, %15
store float %19, float* %17
ret void
}

LLVM IR (-O2):
define void @VecSelfScalarDiv3fv(float* nocapture %0, float %1) {
%3 = load float, float* %0
%4 = fdiv float %3, %1
store float %4, float* %0
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = fdiv float %6, %1
store float %7, float* %5
%8 = getelementptr inbounds float, float* %0, i64 2
%9 = load float, float* %8
%10 = fdiv float %9, %1
store float %10, float* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
extern void message_(const char *string) { printf("%s\r", string); }


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

x86 assembly (clang, -O2):
<message_>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0D\00"
define void @message_(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef char *uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint8_t inb(uint16_t port) {
  uint8_t result;
  __asm__("in %%dx, %%al" : "=a"(result) : "d"(port));
  return result;
}


x86 assembly (clang, -O0):
<inb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
in     (%dx),%al
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inb>:
mov    %edi,%edx
in     (%dx),%al
ret

LLVM IR (-O0):
define i8* @inb(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* asm "in %dx, %al", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define i8* @inb(i32 %0) {
%2 = tail call i8* asm "in %dx, %al", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret i8* %2
}
const char *dump_inputdev_type(unsigned type) {
  switch (type) {
  case 0:
    return "VCR";
  case 1:
    return "TV";
  default:
    return "UNK";
  }
}


x86 assembly (clang, -O0):
<dump_inputdev_type>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <dump_inputdev_type+0x2b>
jmp    111a <dump_inputdev_type+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <dump_inputdev_type+0x3b>
jmp    114b <dump_inputdev_type+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1156 <dump_inputdev_type+0x56>
lea    0xec2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1156 <dump_inputdev_type+0x56>
lea    0xeb5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_inputdev_type>:
cmp    $0x1,%edi
lea    0xefa(%rip),%rax
lea    0xef6(%rip),%rcx
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee2(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"VCR\00"
@.str.1 = [3 x i8] c"TV\00"
@.str.2 = [4 x i8] c"UNK\00"
define i8* @dump_inputdev_type(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [4 x i8] c"VCR\00"
@.str.1 = [3 x i8] c"TV\00"
@.str.2 = [4 x i8] c"UNK\00"
define i8* @dump_inputdev_type(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Type definitions */
struct bstree_node {
  int dummy;
};

/* Variables and functions */
struct bstree_node *__bstree_iterate(struct bstree_node const *, int);
struct bstree_node *bstree_next(const struct bstree_node *node) {
  return __bstree_iterate(node, 1);
}


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

x86 assembly (clang, -O2):
<bstree_next>:
mov    $0x1,%esi
jmp    1030 <__bstree_iterate@plt>

LLVM IR (-O0):
%struct.bstree_node = type { i32 }
define %struct.bstree_node* @bstree_next(%struct.bstree_node* %0) {
%2 = alloca %struct.bstree_node*
store %struct.bstree_node* %0, %struct.bstree_node** %2
%3 = load %struct.bstree_node*, %struct.bstree_node** %2
%4 = call %struct.bstree_node* @__bstree_iterate(%struct.bstree_node* %3, i32 1)
ret %struct.bstree_node* %4
}

LLVM IR (-O2):
%struct.bstree_node = type { i32 }
define %struct.bstree_node* @bstree_next(%struct.bstree_node* %0) {
%2 = tail call %struct.bstree_node* @__bstree_iterate(%struct.bstree_node* %0, i32 1)
ret %struct.bstree_node* %2
}
void ff_hevc_put_hevc_bi_pel_pixels6_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_pel_pixels6_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ adddep(char *);
void adddep2(char *file, signed char *line) {
  line = line;
  adddep(file);
}


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

x86 assembly (clang, -O2):
<adddep2>:
jmp    1030 <adddep@plt>

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

LLVM IR (-O2):
define void @adddep2(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @adddep(i8* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int movmask_unsafe(int const);
uint32_t movmask(const uint32_t input) {
  return movmask_unsafe(input & 0x80808080);
}


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

x86 assembly (clang, -O2):
<movmask>:
and    $0x80808080,%edi
jmp    1030 <movmask_unsafe@plt>

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

LLVM IR (-O2):
define i32 @movmask(i32 %0) {
%2 = and i32 %0, -2139062144
%3 = tail call i32 @movmask_unsafe(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_threaded_mainloop_accept() {
  printf("NOT IMPLEMENTED:"
         "pa_threaded_mainloop_accept"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"NOT IMPLEMENTED:pa_threaded_mainloop_accept\0A\00"
define i32 @pa_threaded_mainloop_accept() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [44 x i8] c"NOT IMPLEMENTED:pa_threaded_mainloop_accept\00"
define i32 @pa_threaded_mainloop_accept() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ loop();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("CFG Test #1\n");
  loop();
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"CFG Test\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @loop()
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"CFG Test\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @loop()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pulse(int);
void footer() { pulse(12); }


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

x86 assembly (clang, -O2):
<footer>:
mov    $0xc,%edi
jmp    1030 <pulse@plt>

LLVM IR (-O0):
define void @footer() {
%1 = call i32 @pulse(i32 12)
ret void
}

LLVM IR (-O2):
define void @footer() {
%1 = tail call i32 @pulse(i32 12)
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_message_append_basic(void *m, char type, const void *p) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_message_append_basic>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
mov    0x2ec5(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_message_append_basic>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_message_append_basic(i8* %0, i8 signext %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8*
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_message_append_basic(i8* nocapture readnone %0, i8 signext %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int a, i;
  scanf("%d%d", &a, &i);
  a ^= 1 << i;
  printf("%d", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%al
mov    (%rsp),%esi
btc    %eax,%esi
mov    %esi,(%rsp)
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %2
%7 = shl nuw i32 1, %6
%8 = load i32, i32* %1
%9 = xor i32 %8, %7
store i32 %9, i32* %1
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ DefDriverProcedure(int);
int32_t DefCanInitDriver(char *options) {
  DefDriverProcedure(1);
  return (0);
}


x86 assembly (clang, -O0):
<DefCanInitDriver>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <DefDriverProcedure@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DefCanInitDriver>:
push   %rax
mov    $0x1,%edi
call   1030 <DefDriverProcedure@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @DefCanInitDriver(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @DefDriverProcedure(i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @DefCanInitDriver(i8* nocapture readnone %0) {
%2 = tail call i32 @DefDriverProcedure(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  assert((2 | 3) == 3);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
char *PHYSFS_getLastError();
int /*<<< orphan*/ printf(char *, char *);
int cmd_getlasterror(char *args) {
  printf("last error is [%s].\n", PHYSFS_getLastError());
  return (1);
}


x86 assembly (clang, -O0):
<cmd_getlasterror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <PHYSFS_getLastError@plt>
mov    %rax,%rsi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_getlasterror>:
push   %rax
xor    %eax,%eax
call   1040 <PHYSFS_getLastError@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"last error is [%s].\0A\00"
define i32 @cmd_getlasterror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i8* (...) @PHYSFS_getLastError()
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 1
}

LLVM IR (-O2):
@.str = [21 x i8] c"last error is [%s].\0A\00"
define i32 @cmd_getlasterror(i8* nocapture readnone %0) {
%2 = tail call i8* (...) @PHYSFS_getLastError()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 1
}
/* Variables and functions */
int mfs_fsync_int(int /*<<< orphan*/);
int /*<<< orphan*/ mfs_get_fi(int);
int mfs_fsync(int fildes) { return mfs_fsync_int(mfs_get_fi(fildes)); }


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

x86 assembly (clang, -O2):
<mfs_fsync>:
push   %rax
call   1040 <mfs_get_fi@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <mfs_fsync_int@plt>

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

LLVM IR (-O2):
define i32 @mfs_fsync(i32 %0) {
%2 = tail call i32 @mfs_get_fi(i32 %0)
%3 = tail call i32 @mfs_fsync_int(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ foo();
bar(void) { foo(); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <foo@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bar() {
%1 = alloca i32
%2 = call i32 (...) @foo()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @bar() {
%1 = tail call i32 (...) @foo()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ free_alloc();
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void safe_exit(int code) {
  free_alloc();
  fflush(stdout);
  fflush(stderr);
  exit(code);
}


x86 assembly (clang, -O0):
<safe_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <free_alloc@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    -0x4(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<safe_exit>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <free_alloc@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    %ebx,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@stderr = global i32 0
define void @safe_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @free_alloc()
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
%6 = load i32, i32* @stderr
%7 = call i32 @fflush(i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@stderr = global i32 0
define void @safe_exit(i32 %0) {
%2 = tail call i32 (...) @free_alloc()
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fflush(i32 %5)
%7 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int test(int, char **, int);
int main(int argc, char **argv) {
  int i, r = 0;
  for (i = 0; i < 4; i++) {
    r = test(argc, argv, i);
    if (r) {
      break;
    }
  }
  return r;
}


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)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1172 <main+0x62>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <test@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     115f <main+0x4f>
jmp    1172 <main+0x62>
jmp    1164 <main+0x54>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1134 <main+0x24>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edx,%edx
call   1030 <test@plt>
test   %eax,%eax
jne    1149 <main+0x39>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <test@plt>
test   %eax,%eax
jne    1149 <main+0x39>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x2,%edx
call   1030 <test@plt>
test   %eax,%eax
je     1150 <main+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x3,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <test@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @test(i32 %0, i8** %1, i32 0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = tail call i32 @test(i32 %0, i8** %1, i32 1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = tail call i32 @test(i32 %0, i8** %1, i32 2)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = tail call i32 @test(i32 %0, i8** %1, i32 3)
br label %13
13: ; preds = %11, %8, %5, %2
%14 = phi i32 [ %3, %2 ], [ %6, %5 ], [ %9, %8 ], [ %12, %11 ]
ret i32 %14
}
void gtk_side_type_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_side_type_get_type() {
ret void
}
void __attribute__((section(".after_vectors"), weak)) HardFault_Handler(void) {
  while (1) {
  }
}


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

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

LLVM IR (-O0):
define weak void @HardFault_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define weak void @HardFault_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello, Jupiter!\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"Hello, Jupiter!\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 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"Hello, Jupiter!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clear_screen() {
  int i;
  for (i = 0; i < 100; i++) {
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<clear_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1143 <clear_screen+0x33>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <clear_screen+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_screen>:
push   %rbx
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <clear_screen+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @clear_screen() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @putchar(i32 10)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 100
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
void go_call_c() {}


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

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

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

LLVM IR (-O2):
define void @go_call_c() {
ret void
}
/* Variables and functions */
void __lwpval64(unsigned long long, unsigned int, int);
void ___lwpval64(unsigned long long A, unsigned int B, int const I) {
  return __lwpval64(A, B, 1);
}


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

x86 assembly (clang, -O2):
<___lwpval64>:
mov    $0x1,%edx
jmp    1030 <__lwpval64@plt>

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

LLVM IR (-O2):
define void @___lwpval64(i64 %0, i32 %1, i32 %2) {
tail call void @__lwpval64(i64 %0, i32 %1, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ setNotInUse(int /*<<< orphan*/ *);
void __cxa_guard_abort(uint64_t *guard_object) { setNotInUse(guard_object); }


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

x86 assembly (clang, -O2):
<__cxa_guard_abort>:
jmp    1030 <setNotInUse@plt>

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

LLVM IR (-O2):
define void @__cxa_guard_abort(i32* %0) {
%2 = tail call i32 @setNotInUse(i32* %0)
ret void
}
int mangle_switch_at(char arr[64], int arr_len, int upos, int upos2) {
  {
    char c = (arr)[(upos2)];
    (arr)[(upos2)] = (arr)[(upos)];
    (arr)[(upos)] = c;
  };
  return (arr_len);
}


x86 assembly (clang, -O0):
<mangle_switch_at>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x15(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x15(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mangle_switch_at>:
mov    %esi,%eax
movslq %ecx,%rsi
mov    (%rdi,%rsi,1),%r8b
movslq %edx,%rdx
mov    (%rdi,%rdx,1),%cl
mov    %cl,(%rdi,%rsi,1)
mov    %r8b,(%rdi,%rdx,1)
ret

LLVM IR (-O0):
define i32 @mangle_switch_at(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i8*, i8** %5
%11 = load i32, i32* %8
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
store i8 %14, i8* %9
%15 = load i8*, i8** %5
%16 = load i32, i32* %7
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = load i8*, i8** %5
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
store i8 %19, i8* %23
%24 = load i8, i8* %9
%25 = load i8*, i8** %5
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %25, i64 %27
store i8 %24, i8* %28
%29 = load i32, i32* %6
ret i32 %29
}

LLVM IR (-O2):
define i32 @mangle_switch_at(i8* nocapture %0, i32 returned %1, i32 %2, i32 %3) {
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
store i8 %10, i8* %6
store i8 %7, i8* %9
ret i32 %1
}
__attribute__((no, noclone)) int f8(signed char x, signed char y) {
  int a = x;
  int b = y;
  int c = a + b;
  return c & 0xf8;
}


x86 assembly (clang, -O0):
<f8>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
movsbl -0x2(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0xf8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f8>:
lea    (%rdi,%rsi,1),%eax
and    $0xf8,%eax
ret

LLVM IR (-O0):
define i32 @f8(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
store i32 %9, i32* %5
%10 = load i8, i8* %4
%11 = sext i8 %10 to i32
store i32 %11, i32* %6
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = add nsw i32 %12, %13
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = and i32 %15, 248
ret i32 %16
}

LLVM IR (-O2):
define i32 @f8(i8 signext %0, i8 signext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = add nuw nsw i32 %4, %3
%6 = and i32 %5, 248
ret i32 %6
}
/* Type definitions */
struct Node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ delete (struct Node **, int /*<<< orphan*/ *);
int /*<<< orphan*/ printList(struct Node *);
int main() {
  struct Node *head = NULL;
  delete (&head, NULL);
  printList(head);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <delete@plt>
mov    (%rsp),%rdi
call   1040 <printList@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.Node = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.Node*
store i32 0, i32* %1
store %struct.Node* null, %struct.Node** %2
%3 = call i32 @delete(%struct.Node** %2, i32* null)
%4 = load %struct.Node*, %struct.Node** %2
%5 = call i32 @printList(%struct.Node* %4)
ret i32 0
}

LLVM IR (-O2):
%struct.Node = type { i32 }
define i32 @main() {
%1 = alloca %struct.Node*
%2 = bitcast %struct.Node** %1 to i8*
store %struct.Node* null, %struct.Node** %1
%3 = call i32 @delete(%struct.Node** %1, i32* null)
%4 = load %struct.Node*, %struct.Node** %1
%5 = call i32 @printList(%struct.Node* %4)
ret i32 0
}
/* Variables and functions */
scalar_t__ islower(unsigned char);
int no_lower(const char *s, size_t len) {
  while (len--)
    if (islower((unsigned char)*s))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<no_lower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     1160 <no_lower+0x50>
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     115b <no_lower+0x4b>
movl   $0x0,-0x4(%rbp)
jmp    1167 <no_lower+0x57>
jmp    1120 <no_lower+0x10>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<no_lower>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x1,%rbx
xchg   %ax,%ax
add    $0xffffffffffffffff,%rbx
je     1138 <no_lower+0x28>
movzbl (%r14),%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1120 <no_lower+0x10>
xor    %eax,%eax
jmp    113d <no_lower+0x2d>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @no_lower(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
br label %6
6: ; preds = %16, %2
%7 = load i64, i64* %5
%8 = add i64 %7, -1
store i64 %8, i64* %5
%9 = icmp ne i64 %7, 0
br i1 %9, label %10, label %17
10: ; preds = %6
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = call i64 @islower(i8 zeroext %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 0, i32* %3
br label %18
16: ; preds = %10
br label %6
17: ; preds = %6
store i32 1, i32* %3
br label %18
18: ; preds = %17, %15
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @no_lower(i8* nocapture %0, i64 %1) {
br label %3
3: ; preds = %6, %2
%4 = phi i64 [ %1, %2 ], [ %7, %6 ]
%5 = icmp eq i64 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = add i64 %4, -1
%8 = load i8, i8* %0
%9 = tail call i64 @islower(i8 zeroext %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %3, label %11
11: ; preds = %3, %6
%12 = phi i32 [ 0, %6 ], [ 1, %3 ]
ret i32 %12
}
/* Variables and functions */
float RAND_MAX;
scalar_t__ rand();
float frand(float min, float max) {
  return min + ((float)rand() / RAND_MAX) * (max - min);
}


x86 assembly (clang, -O0):
<frand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movss  -0xc(%rbp),%xmm1
cvtsi2ss %rax,%xmm0
mov    0x2ea4(%rip),%rax
divss  (%rax),%xmm0
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frand>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2ss %rax,%xmm1
mov    0x2eb6(%rip),%rax
divss  (%rax),%xmm1
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm2
subss  %xmm2,%xmm0
mulss  %xmm1,%xmm0
addss  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global float 0.000000e+00
define float @frand(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 = call i64 (...) @rand()
%7 = sitofp i64 %6 to float
%8 = load float, float* @RAND_MAX
%9 = fdiv float %7, %8
%10 = load float, float* %4
%11 = load float, float* %3
%12 = fsub float %10, %11
%13 = call float @llvm.fmuladd.f32(float %9, float %12, float %5)
ret float %13
}

LLVM IR (-O2):
@RAND_MAX = global float 0.000000e+00
define float @frand(float %0, float %1) {
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to float
%5 = load float, float* @RAND_MAX
%6 = fdiv float %4, %5
%7 = fsub float %1, %0
%8 = tail call float @llvm.fmuladd.f32(float %6, float %7, float %0)
ret float %8
}
int *match_order(int *us, int *them, int n) {}


x86 assembly (clang, -O0):
<match_order>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i32* @match_order(i32* nocapture readnone %0, i32* nocapture readnone %1, i32 %2) {
ret i32* undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ printheader();
int /*<<< orphan*/ system(char *);
void printpatmenu() {
  system("clear");
  printheader();
  printf("\n\t\t###########\n"
         "\x1b[36m"
         "\t\t| PATIENT |:\n"
         "\x1b[0m"
         "\t\t###########\n\n\n"
         "\x1b[34m"
         "\t\t\t1] Enroll a new patient\n\n"
         "\t\t\t2] Edit existing entry\n\n"
         "\t\t\t3] Display record of particular patient\n\n"
         "\t\t\t4] List of all registered patients\n\n"
         "\t\t\t5] Close the enrollment of patient\n\n"
         "\t\t\t6] Return to main menu\n\n"
         "\x1b[0m");
}


x86 assembly (clang, -O0):
<printpatmenu>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <system@plt>
mov    $0x0,%al
call   1050 <printheader@plt>
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printpatmenu>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
call   1050 <printheader@plt>
lea    0xebb(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [269 x i8] c"\0A\09\09###########\0A\1B[36m\09\09| PATIENT |:\0A\1B[0m\09\09###########\0A\0A\0A\1B[34m\09\09\091] Enroll a new patient\0A\0A\09\09\092] Edit existing entry\0A\0A\09\09\093] Display record of particular patient\0A\0A\09\09\094] List of all registered patients\0A\0A\09\09\095] Close the enrollment of patient\0A\0A\09\09\096] Return to main menu\0A\0A\1B[0m\00"
define void @printpatmenu() {
%1 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @printheader()
%3 = call i32 @printf(i8* getelementptr inbounds ([269 x i8], [269 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [269 x i8] c"\0A\09\09###########\0A\1B[36m\09\09| PATIENT |:\0A\1B[0m\09\09###########\0A\0A\0A\1B[34m\09\09\091] Enroll a new patient\0A\0A\09\09\092] Edit existing entry\0A\0A\09\09\093] Display record of particular patient\0A\0A\09\09\094] List of all registered patients\0A\0A\09\09\095] Close the enrollment of patient\0A\0A\09\09\096] Return to main menu\0A\0A\1B[0m\00"
define void @printpatmenu() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @printheader()
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([269 x i8], [269 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y_root;
};
typedef TYPE_1__ XMotionEvent;

/* Variables and functions */
int get_XMotionEvent_y_root(void *_p) {
  return (int)((XMotionEvent *)_p)->y_root;
}


x86 assembly (clang, -O0):
<get_XMotionEvent_y_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_XMotionEvent_y_root>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XMotionEvent_y_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
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XMotionEvent_y_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ PrintFrame(int /*<<< orphan*/, char const *, char const *,
                              int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int HandleError(const char *func, const char *file, int line, const char *msg) {
  fprintf(stderr, "ERROR: %s\n", msg);
  PrintFrame(0, func, file, line);
  return 1;
}


x86 assembly (clang, -O0):
<HandleError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
lea    0xeb5(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
xor    %edi,%edi
call   1030 <PrintFrame@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HandleError>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
mov    %rcx,%rdx
call   1040 <fprintf@plt>
xor    %edi,%edi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
call   1030 <PrintFrame@plt>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define i32 @HandleError(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %8
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8*, i8** %5
%13 = load i8*, i8** %6
%14 = load i32, i32* %7
%15 = call i32 @PrintFrame(i32 0, i8* %12, i8* %13, i32 %14)
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define i32 @HandleError(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%7 = tail call i32 @PrintFrame(i32 0, i8* %0, i8* %1, i32 %2)
ret i32 1
}