xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_audit_type();
main(int argc, char **argv) { test_audit_type(); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_audit_type@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @test_audit_type()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_audit_type()
ret i32 0
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_creds_get_cmdline(void *c, char ***cmdline) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_creds_get_cmdline>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_creds_get_cmdline(i8* nocapture readnone %0, i8*** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
void PIOC_IRQHandler(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @PIOC_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
float tdb_clampf(float min, float val, float max) {
  if (val <= min)
    return min;
  if (val >= max)
    return max;
  return val;
}


x86 assembly (clang, -O0):
<tdb_clampf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1135 <tdb_clampf+0x35>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <tdb_clampf+0x5d>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     1153 <tdb_clampf+0x53>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <tdb_clampf+0x5d>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<tdb_clampf>:
movaps %xmm2,%xmm3
cmpless %xmm1,%xmm3
andps  %xmm3,%xmm2
andnps %xmm1,%xmm3
orps   %xmm2,%xmm3
cmpnless %xmm0,%xmm1
andps  %xmm1,%xmm3
andnps %xmm0,%xmm1
orps   %xmm1,%xmm3
movaps %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @tdb_clampf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %6
%9 = load float, float* %5
%10 = fcmp ole float %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %5
store float %12, float* %4
br label %21
13: ; preds = %3
%14 = load float, float* %6
%15 = load float, float* %7
%16 = fcmp oge float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load float, float* %7
store float %18, float* %4
br label %21
19: ; preds = %13
%20 = load float, float* %6
store float %20, float* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
define float @tdb_clampf(float %0, float %1, float %2) {
%4 = fcmp ugt float %1, %0
%5 = fcmp oge float %1, %2
%6 = select i1 %5, float %2, float %1
%7 = select i1 %4, float %6, float %0
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x13() {
  Assert_real((isalnum(19) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              100, ("isalnum should be 0 for 0x13"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x13>:
push   %rax
mov    $0x13,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x64,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x13\00"
define void @t_isalnum_0x13() {
%1 = call i64 @isalnum(i32 19)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x13\00"
define void @t_isalnum_0x13() {
%1 = tail call i64 @isalnum(i32 19)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  unsigned int x = 1;
  unsigned int y = 0;
  while (y < 1024) {
    x = 0;
    y++;
  }
  __VERIFIER_assert(x == 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x400,-0xc(%rbp)
jae    114f <main+0x3f>
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %3
%6 = icmp ult i32 %5, 1024
br i1 %6, label %7, label %10
7: ; preds = %4
store i32 0, i32* %2
%8 = load i32, i32* %3
%9 = add i32 %8, 1
store i32 %9, i32* %3
br label %4
10: ; preds = %4
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 1
%13 = zext i1 %12 to i32
%14 = call i32 @__VERIFIER_assert(i32 %13)
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void stream_readline(FILE *stream) {}


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

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

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

LLVM IR (-O2):
define void @stream_readline(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sig_init(int signo) { printf("interrupt:%d\n%%", signo); }


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"interrupt:%d\0A%%\00"
define void @sig_init(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ llz_psychomodel1_rom_init();
void llz_musicpitch_rom_init() { llz_psychomodel1_rom_init(); }


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

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

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

LLVM IR (-O2):
define void @llz_musicpitch_rom_init() {
%1 = tail call i32 (...) @llz_psychomodel1_rom_init()
ret void
}
void validate_pat_support(struct cpuinfo_x86 *c) {}


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

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

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

LLVM IR (-O2):
%struct.cpuinfo_x86 = type opaque
define void @validate_pat_support(%struct.cpuinfo_x86* nocapture %0) {
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int bwt_compare(const void *a, const void *b) {
  char *str_a = *(char **)a;
  char *str_b = *(char **)b;
  return strcmp(str_a, str_b);
}


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

x86 assembly (clang, -O2):
<bwt_compare>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @bwt_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
int do_poll_poll_shutdown() { return -1; }


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

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

LLVM IR (-O0):
define i32 @do_poll_poll_shutdown() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @do_poll_poll_shutdown() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ is_quark(void *);
void qfree(void *mem) {
  if (mem && !is_quark(mem))
    free(mem);
}


x86 assembly (clang, -O0):
<qfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1152 <qfree+0x32>
mov    -0x8(%rbp),%rdi
call   1040 <is_quark@plt>
cmp    $0x0,%eax
jne    1152 <qfree+0x32>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qfree>:
push   %rbx
test   %rdi,%rdi
je     1132 <qfree+0x12>
mov    %rdi,%rbx
call   1040 <is_quark@plt>
test   %eax,%eax
je     1134 <qfree+0x14>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @qfree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @is_quark(i8* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %5
%10 = load i8*, i8** %2
%11 = call i32 @free(i8* %10)
br label %12
12: ; preds = %9, %5, %1
ret void
}

LLVM IR (-O2):
define void @qfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 @is_quark(i8* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @free(i8* %0)
br label %8
8: ; preds = %6, %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(int rc) {
  printf("usage: tikitank [-h][-p PORT]\n");
  exit(rc);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"usage: tikitank [-h][-p PORT]\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@str = [30 x i8] c"usage: tikitank [-h][-p PORT]\00"
define void @usage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 %0)
unreachable
}
void gtk_radio_button_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_radio_button_get_type() {
ret void
}
void foo(int i, int A[i]) {}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo(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 = zext i32 %5 to i64
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0, i32* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isalnum(int);
scalar_t__ isascii(int);
int /*<<< orphan*/ iscntrl(int);
int /*<<< orphan*/ isspace(int);
int ispunct(int c) {
  return isascii(c) && !iscntrl(c) && !isalnum(c) && !isspace(c);
}


x86 assembly (clang, -O0):
<ispunct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <isascii@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     11a8 <ispunct+0x68>
mov    -0x4(%rbp),%edi
call   1030 <iscntrl@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
jne    11a8 <ispunct+0x68>
mov    -0x4(%rbp),%edi
call   1040 <isalnum@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
jne    11a8 <ispunct+0x68>
mov    -0x4(%rbp),%edi
call   1050 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispunct>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1060 <isascii@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1175 <ispunct+0x35>
mov    %ebp,%edi
call   1030 <iscntrl@plt>
test   %eax,%eax
jne    1175 <ispunct+0x35>
mov    %ebp,%edi
call   1040 <isalnum@plt>
test   %eax,%eax
jne    1175 <ispunct+0x35>
mov    %ebp,%edi
call   1050 <isspace@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ispunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isascii(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %19
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @iscntrl(i32 %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %19, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @isalnum(i32 %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %19, label %14
14: ; preds = %10
%15 = load i32, i32* %2
%16 = call i32 @isspace(i32 %15)
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
br label %19
19: ; preds = %14, %10, %6, %1
%20 = phi i1 [ false, %10 ], [ false, %6 ], [ false, %1 ], [ %18, %14 ]
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @ispunct(i32 %0) {
%2 = tail call i64 @isascii(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = tail call i32 @iscntrl(i32 %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = tail call i32 @isalnum(i32 %0)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = tail call i32 @isspace(i32 %0)
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %10, %7, %4, %1
%15 = phi i32 [ 0, %7 ], [ 0, %4 ], [ 0, %1 ], [ %13, %10 ]
ret i32 %15
}
/* Variables and functions */
size_t __strcspn(char const *, char const *);
size_t strcspn(const char *s1, const char *s2) { return __strcspn(s1, s2); }


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

x86 assembly (clang, -O2):
<strcspn>:
jmp    1030 <__strcspn@plt>

LLVM IR (-O0):
define i64 @strcspn(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 = call i64 @__strcspn(i8* %5, i8* %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @strcspn(i8* %0, i8* %1) {
%3 = tail call i64 @__strcspn(i8* %0, i8* %1)
ret i64 %3
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRBE_set(void) { return U_WMRCORENONE_set("U_WMRBE"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRBE\00"
define i8* @U_WMRBE_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRBE\00"
define i8* @U_WMRBE_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void initialize(uint32_t *s) {
  s[0] = 0x67452301ul;
  s[1] = 0xEFCDAB89ul;
  s[2] = 0x98BADCFEul;
  s[3] = 0x10325476ul;
  s[4] = 0xC3D2E1F0ul;
}


x86 assembly (clang, -O0):
<initialize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x67452301,(%rax)
mov    -0x8(%rbp),%rax
movl   $0xefcdab89,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x98badcfe,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x10325476,0xc(%rax)
mov    -0x8(%rbp),%rax
movl   $0xc3d2e1f0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movl   $0xc3d2e1f0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @initialize(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 1732584193, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 -271733879, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 2
store i32 -1732584194, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 3
store i32 271733878, i32* %10
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 4
store i32 -1009589776, i32* %12
ret void
}

LLVM IR (-O2):
define void @initialize(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 1732584193, i32 -271733879, i32 -1732584194, i32 271733878>, <4 x i32>* %2
%3 = getelementptr inbounds i32, i32* %0, i64 4
store i32 -1009589776, i32* %3
ret void
}
void FIQ_Routine() {}


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

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

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

LLVM IR (-O2):
define void @FIQ_Routine() {
ret void
}
void create_iface_stat(in_dev) {}


x86 assembly (clang, -O0):
<create_iface_stat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @create_iface_stat(i32 %0) {
ret void
}
extern double TakeADoubleArrayAndAddElements(double *arr) {
  return arr[0] + arr[1];
}


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

x86 assembly (clang, -O2):
<TakeADoubleArrayAndAddElements>:
movsd  (%rdi),%xmm0
addsd  0x8(%rdi),%xmm0
ret

LLVM IR (-O0):
define double @TakeADoubleArrayAndAddElements(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 1
%8 = load double, double* %7
%9 = fadd double %5, %8
ret double %9
}

LLVM IR (-O2):
define double @TakeADoubleArrayAndAddElements(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fadd double %2, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int *);
scalar_t__ calloc(size_t const, int);
int *ivector(const size_t n) {
  int *v = (int *)calloc(n, sizeof(int));
  assert(v);
  return v;
}


x86 assembly (clang, -O0):
<ivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivector>:
push   %rbx
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @ivector(i64 %0) {
%2 = alloca i64
%3 = alloca i32*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @calloc(i64 %4, i32 4)
%6 = inttoptr i64 %5 to i32*
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = call i32 @assert(i32* %7)
%9 = load i32*, i32** %3
ret i32* %9
}

LLVM IR (-O2):
define i32* @ivector(i64 %0) {
%2 = tail call i64 @calloc(i64 %0, i32 4)
%3 = inttoptr i64 %2 to i32*
%4 = tail call i32 @assert(i32* %3)
ret i32* %3
}
double glmRadd(double d) { return d * 0.017453292519943295769236907684886; }


x86 assembly (clang, -O0):
<glmRadd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmRadd>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @glmRadd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x3F91DF46A2529D39
ret double %4
}

LLVM IR (-O2):
define double @glmRadd(double %0) {
%2 = fmul double %0, 0x3F91DF46A2529D39
ret double %2
}
/* Type definitions */
struct sockaddr_storage {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ ss;
typedef int socklen_t;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int BUFSIZ;
int /*<<< orphan*/ recvfrom(int, char *, int, int /*<<< orphan*/,
                            struct sockaddr *, int *);
void sock_sink(int fd) {
  char buf[BUFSIZ];
  struct sockaddr_storage ss;
  socklen_t size = sizeof(ss);
  (void)recvfrom(fd, buf, sizeof(buf), 0, (struct sockaddr *)&ss, &size);
}


x86 assembly (clang, -O0):
<sock_sink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x4,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    %eax,%edx
lea    -0x20(%rbp),%r8
xor    %ecx,%ecx
lea    -0x24(%rbp),%r9
call   1030 <recvfrom@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sock_sink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rsi
mov    %rdx,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rsi
mov    %rsi,%rsp
movl   $0x4,-0x4(%rbp)
lea    -0x8(%rbp),%r8
lea    -0x4(%rbp),%r9
xor    %ecx,%ecx
call   1030 <recvfrom@plt>
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
%struct.sockaddr_storage = type { i32 }
%struct.sockaddr = type { i32 }
@BUFSIZ = global i32 0
define void @sock_sink(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca %struct.sockaddr_storage
%6 = alloca i32
store i32 %0, i32* %2
%7 = load i32, i32* @BUFSIZ
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %3
%10 = alloca i8, i64 %8
store i64 %8, i64* %4
store i32 4, i32* %6
%11 = load i32, i32* %2
%12 = trunc i64 %8 to i32
%13 = bitcast %struct.sockaddr_storage* %5 to %struct.sockaddr*
%14 = call i32 @recvfrom(i32 %11, i8* %10, i32 %12, i32 0, %struct.sockaddr* %13, i32* %6)
%15 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
%struct.sockaddr_storage = type { i32 }
%struct.sockaddr = type { i32 }
@BUFSIZ = global i32 0
define void @sock_sink(i32 %0) {
%2 = alloca %struct.sockaddr_storage
%3 = alloca i32
%4 = load i32, i32* @BUFSIZ
%5 = zext i32 %4 to i64
%6 = alloca i8, i64 %5
%7 = bitcast %struct.sockaddr_storage* %2 to i8*
%8 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%9 = bitcast %struct.sockaddr_storage* %2 to %struct.sockaddr*
%10 = call i32 @recvfrom(i32 %0, i8* %6, i32 %4, i32 0, %struct.sockaddr* %9, i32* %3)
ret void
}
int test_imm_7Cint8_reg(signed char val) {
  return ((val) & (0x7C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_7Cint8_reg(i8 signext %0) {
%2 = and i8 %0, 124
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("this is the first raw data add"); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"this is the first raw data add\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"this is the first raw data add\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int fun178() { return 178; }


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

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

LLVM IR (-O0):
define i32 @fun178() {
ret i32 178
}

LLVM IR (-O2):
define i32 @fun178() {
ret i32 178
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int lre_get_flags(const uint8_t *bc_buf) { return bc_buf[0]; }


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

x86 assembly (clang, -O2):
<lre_get_flags>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @lre_get_flags(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @lre_get_flags(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
char *gendumb(char *dumb) {
  dumb[0] = 't';
  dumb[1] = 'e';
  dumb[2] = 'm';
  dumb[3] = 'p';
  dumb[4] = ' ';
  dumb[5] = 'f';
  dumb[6] = 'i';
  dumb[7] = 'l';
  dumb[8] = 'e';
  dumb[9] = '\0';
}


x86 assembly (clang, -O0):
<gendumb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x74,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x65,0x1(%rax)
mov    -0x10(%rbp),%rax
movb   $0x6d,0x2(%rax)
mov    -0x10(%rbp),%rax
movb   $0x70,0x3(%rax)
mov    -0x10(%rbp),%rax
movb   $0x20,0x4(%rax)
mov    -0x10(%rbp),%rax
movb   $0x66,0x5(%rax)
mov    -0x10(%rbp),%rax
movb   $0x69,0x6(%rax)
mov    -0x10(%rbp),%rax
movb   $0x6c,0x7(%rax)
mov    -0x10(%rbp),%rax
movb   $0x65,0x8(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x9(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gendumb>:
movabs $0x6c696620706d6574,%rax
66 69 6c
mov    %rax,(%rdi)
movw   $0x65,0x8(%rdi)
ret

LLVM IR (-O0):
define i8* @gendumb(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
store i8 116, i8* %5
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 1
store i8 101, i8* %7
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 2
store i8 109, i8* %9
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 3
store i8 112, i8* %11
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 4
store i8 32, i8* %13
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 5
store i8 102, i8* %15
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 6
store i8 105, i8* %17
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 7
store i8 108, i8* %19
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 8
store i8 101, i8* %21
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 9
store i8 0, i8* %23
%24 = load i8*, i8** %2
ret i8* %24
}

LLVM IR (-O2):
define noalias i8* @gendumb(i8* nocapture writeonly %0) {
store i8 116, i8* %0
%2 = getelementptr inbounds i8, i8* %0, i64 1
store i8 101, i8* %2
%3 = getelementptr inbounds i8, i8* %0, i64 2
store i8 109, i8* %3
%4 = getelementptr inbounds i8, i8* %0, i64 3
store i8 112, i8* %4
%5 = getelementptr inbounds i8, i8* %0, i64 4
store i8 32, i8* %5
%6 = getelementptr inbounds i8, i8* %0, i64 5
store i8 102, i8* %6
%7 = getelementptr inbounds i8, i8* %0, i64 6
store i8 105, i8* %7
%8 = getelementptr inbounds i8, i8* %0, i64 7
store i8 108, i8* %8
%9 = getelementptr inbounds i8, i8* %0, i64 8
store i8 101, i8* %9
%10 = getelementptr inbounds i8, i8* %0, i64 9
store i8 0, i8* %10
ret i8* undef
}
void ca7_cpu_resume(void) {}


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

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

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

LLVM IR (-O2):
define void @ca7_cpu_resume() {
ret void
}
int abs(int n) {
  if (n < 0)
    return -n;
  else
    return n;
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <abs+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int crc32_partial(void const *, int, int);
unsigned compute_crc32(const void *data, int len) {
  return crc32_partial(data, len, -1) ^ -1;
}


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

x86 assembly (clang, -O2):
<compute_crc32>:
push   %rax
mov    $0xffffffff,%edx
call   1030 <crc32_partial@plt>
not    %eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @compute_crc32(i8* %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 @crc32_partial(i8* %5, i32 %6, i32 -1)
%8 = xor i32 %7, -1
ret i32 %8
}

LLVM IR (-O2):
define i32 @compute_crc32(i8* %0, i32 %1) {
%3 = tail call i32 @crc32_partial(i8* %0, i32 %1, i32 -1)
%4 = xor i32 %3, -1
ret i32 %4
}
void rop3_14_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D | S;
  stk2 = ~stk2;
  stk1 = T | stk2;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_14_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_14_0_1>:
mov    (%rdi),%al
mov    %eax,%ecx
or     %sil,%cl
not    %sil
and    %dl,%sil
not    %dl
and    %cl,%dl
and    %al,%sil
or     %dl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_14_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8, i8* %6
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = or i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = xor i32 %27, -1
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = zext i8 %30 to i32
%32 = load i8, i8* %5
%33 = zext i8 %32 to i32
%34 = and i32 %31, %33
%35 = load i8, i8* %7
%36 = zext i8 %35 to i32
%37 = load i8, i8* %6
%38 = zext i8 %37 to i32
%39 = xor i32 %38, -1
%40 = and i32 %36, %39
%41 = or i32 %34, %40
%42 = load i8, i8* %6
%43 = zext i8 %42 to i32
%44 = load i8, i8* %5
%45 = zext i8 %44 to i32
%46 = xor i32 %45, -1
%47 = and i32 %43, %46
%48 = load i8*, i8** %4
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = and i32 %47, %50
%52 = or i32 %41, %51
%53 = trunc i32 %52 to i8
%54 = load i8*, i8** %4
store i8 %53, i8* %54
ret void
}

LLVM IR (-O2):
define void @rop3_14_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %1
%6 = xor i8 %2, -1
%7 = and i8 %5, %6
%8 = xor i8 %1, -1
%9 = and i8 %8, %2
%10 = and i8 %9, %4
%11 = or i8 %7, %10
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ show_usage();
int strace(char **);
int main(int argc, char **argv) {
  int exit_code;
  if (argc < 2) {
    show_usage();
    return (EXIT_FAILURE);
  } else {
    exit_code = strace(argv + 1);
    return (exit_code);
  }
}


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)
cmpl   $0x2,-0x8(%rbp)
jge    1158 <main+0x38>
mov    $0x0,%al
call   1040 <show_usage@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    116e <main+0x4e>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1030 <strace@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x1,%edi
jg     1138 <main+0x18>
push   %rax
xor    %eax,%eax
call   1040 <show_usage@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
add    $0x8,%rsi
mov    %rsi,%rdi
jmp    1030 <strace@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 (...) @show_usage()
%11 = load i32, i32* @EXIT_FAILURE
store i32 %11, i32* %3
br label %17
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = call i32 @strace(i8** %14)
store i32 %15, i32* %6
%16 = load i32, i32* %6
store i32 %16, i32* %3
br label %17
17: ; preds = %12, %9
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 (...) @show_usage()
%6 = load i32, i32* @EXIT_FAILURE
br label %10
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = tail call i32 @strace(i8** %8)
br label %10
10: ; preds = %7, %4
%11 = phi i32 [ %6, %4 ], [ %9, %7 ]
ret i32 %11
}
/* Type definitions */
struct timex {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SYS_adjtimex;
int syscall(int /*<<< orphan*/, struct timex *);
int adjtimex_direct(struct timex *txc) { return syscall(SYS_adjtimex, txc); }


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

x86 assembly (clang, -O2):
<adjtimex_direct>:
mov    %rdi,%rsi
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.timex = type { i32 }
@SYS_adjtimex = global i32 0
define i32 @adjtimex_direct(%struct.timex* %0) {
%2 = alloca %struct.timex*
store %struct.timex* %0, %struct.timex** %2
%3 = load i32, i32* @SYS_adjtimex
%4 = load %struct.timex*, %struct.timex** %2
%5 = call i32 @syscall(i32 %3, %struct.timex* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.timex = type { i32 }
@SYS_adjtimex = global i32 0
define i32 @adjtimex_direct(%struct.timex* %0) {
%2 = load i32, i32* @SYS_adjtimex
%3 = tail call i32 @syscall(i32 %2, %struct.timex* %0)
ret i32 %3
}
int f(int i) {
  switch (i)
  case -1 << 0:
    break;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0xffffffff,%eax
jne    111d <f+0x1d>
jmp    1118 <f+0x18>
jmp    111d <f+0x1d>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *_clipboard_open(char *);
FILE *clipboard_open(char *mode) { return _clipboard_open(mode); }


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

x86 assembly (clang, -O2):
<clipboard_open>:
jmp    1030 <_clipboard_open@plt>

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

LLVM IR (-O2):
define i32* @clipboard_open(i8* %0) {
%2 = tail call i32* @_clipboard_open(i8* %0)
ret i32* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ beepd;

/* Variables and functions */
int biscDefineSong(int /*<<< orphan*/, unsigned char *, unsigned char *, int);
int biscPlaySong(int /*<<< orphan*/);
int biscBeep(void) {
  unsigned char beep[] = {70};
  unsigned char beepd[] = {10};
  if (biscDefineSong(0, beep, beepd, sizeof(beepd)) == -1)
    return -1;
  return biscPlaySong(0);
}


x86 assembly (clang, -O0):
<biscBeep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%al
mov    %al,-0x5(%rbp)
mov    0xeca(%rip),%al
mov    %al,-0x6(%rbp)
lea    -0x5(%rbp),%rsi
lea    -0x6(%rbp),%rdx
xor    %edi,%edi
mov    $0x1,%ecx
call   1030 <biscDefineSong@plt>
cmp    $0xffffffff,%eax
jne    1163 <biscBeep+0x43>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <biscBeep+0x4d>
xor    %edi,%edi
call   1040 <biscPlaySong@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<biscBeep>:
push   %rax
movb   $0x46,0x7(%rsp)
movb   $0xa,0x6(%rsp)
lea    0x7(%rsp),%rsi
lea    0x6(%rsp),%rdx
xor    %edi,%edi
mov    $0x1,%ecx
call   1030 <biscDefineSong@plt>
cmp    $0xffffffff,%eax
je     114f <biscBeep+0x2f>
xor    %edi,%edi
call   1040 <biscPlaySong@plt>
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.biscBeep.beep = [1 x i8] c"F"
@__const.biscBeep.beepd = [1 x i8] c"\0A"
define i32 @biscBeep() {
%1 = alloca i32
%2 = alloca [1 x i8]
%3 = alloca [1 x i8]
%4 = bitcast [1 x i8]* %2 to i8*
%5 = bitcast [1 x i8]* %3 to i8*
%6 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%8 = call i32 @biscDefineSong(i32 0, i8* %6, i8* %7, i32 1)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %11
10: ; preds = %0
store i32 -1, i32* %1
br label %13
11: ; preds = %0
%12 = call i32 @biscPlaySong(i32 0)
store i32 %12, i32* %1
br label %13
13: ; preds = %11, %10
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
define i32 @biscBeep() {
%1 = alloca [1 x i8]
%2 = alloca [1 x i8]
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
store i8 70, i8* %3
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
store i8 10, i8* %4
%5 = call i32 @biscDefineSong(i32 0, i8* %3, i8* %4, i32 1)
%6 = icmp eq i32 %5, -1
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 @biscPlaySong(i32 0)
br label %9
9: ; preds = %0, %7
%10 = phi i32 [ %8, %7 ], [ -1, %0 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ tgi_clear();
void screen_clear(void) { tgi_clear(); }


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

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

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

LLVM IR (-O2):
define void @screen_clear() {
%1 = tail call i32 (...) @tgi_clear()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct unaligned_u16 {
  int dummy;
};

/* Variables and functions */
struct unaligned_u16 *unaligned_u16(const uint16_t *p) {
  return (struct unaligned_u16 *)p;
}


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

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

LLVM IR (-O0):
%struct.unaligned_u16 = type { i32 }
define %struct.unaligned_u16* @unaligned_u16(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = bitcast i32* %3 to %struct.unaligned_u16*
ret %struct.unaligned_u16* %4
}

LLVM IR (-O2):
%struct.unaligned_u16 = type { i32 }
define %struct.unaligned_u16* @unaligned_u16(i32* readnone %0) {
%2 = bitcast i32* %0 to %struct.unaligned_u16*
ret %struct.unaligned_u16* %2
}
void gtk_about_dialog_get_name() {}


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

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

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

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