xunge/DecIR huggingface dataset:
int ast_strlen_zero(const char *s) { return (*s == '\0'); }


x86 assembly (clang, -O0):
<ast_strlen_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ast_strlen_zero>:
xor    %eax,%eax
cmpb   $0x0,(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @ast_strlen_zero(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ test_general();
int /*<<< orphan*/ test_mpool();
int /*<<< orphan*/ test_split();
int main(int argc, char **argv) {
  test_general();
  test_split();
  test_mpool();
  return 0;
}


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

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

LLVM IR (-O0):
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 (...) @test_general()
%7 = call i32 (...) @test_split()
%8 = call i32 (...) @test_mpool()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_general()
%4 = tail call i32 (...) @test_split()
%5 = tail call i32 (...) @test_mpool()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ extract_grey(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ set_bw(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void naive_dither(uint8_t *grey, uint8_t *bw, int num_pixels) {
  for (int i = 0; i < num_pixels; i++) {
    set_bw(bw, i, extract_grey(grey, i));
  }
}


x86 assembly (clang, -O0):
<naive_dither>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    117c <naive_dither+0x5c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1030 <extract_grey@plt>
mov    -0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
call   1040 <set_bw@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113a <naive_dither+0x1a>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<naive_dither>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
jle    115d <naive_dither+0x3d>
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <extract_grey@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <set_bw@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1140 <naive_dither+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @naive_dither(i32* %0, i32* %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %6, label %5
5: ; preds = %6, %3
ret void
6: ; preds = %3, %6
%7 = phi i32 [ %10, %6 ], [ 0, %3 ]
%8 = tail call i32 @extract_grey(i32* %0, i32 %7)
%9 = tail call i32 @set_bw(i32* %1, i32 %7, i32 %8)
%10 = add nuw nsw i32 %7, 1
%11 = icmp eq i32 %10, %2
br i1 %11, label %5, label %6
}
/* Variables and functions */
int getidx();
int /*<<< orphan*/ test_assert(int);
int main(void) {
  int array[5];
  int idx = getidx();
  array[idx] = 7;
  test_assert(array[2] == 7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getidx@plt>
mov    %eax,-0x24(%rbp)
movslq -0x24(%rbp),%rax
movl   $0x7,-0x20(%rbp,%rax,4)
cmpl   $0x7,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <test_assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1030 <getidx@plt>
cltq
movl   $0x7,(%rsp,%rax,4)
xor    %edi,%edi
cmpl   $0x7,0x8(%rsp)
sete   %dil
call   1040 <test_assert@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @getidx()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %6
store i32 7, i32* %7
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 2
%9 = load i32, i32* %8
%10 = icmp eq i32 %9, 7
%11 = zext i1 %10 to i32
%12 = call i32 @test_assert(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = tail call i32 (...) @getidx()
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 %4
store i32 7, i32* %5
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 2
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 7
%9 = zext i1 %8 to i32
%10 = tail call i32 @test_assert(i32 %9)
ret i32 0
}
/* Variables and functions */
void *Heap_REGMOD(unsigned char *, int /*<<< orphan*/);
void *Reals__init(void) {
  static void *m;
  if (m != 0) {
    return m;
  };
  if (m == 0) {
    m = Heap_REGMOD((unsigned char *)"Reals", 0);
  };
  return m;
}


x86 assembly (clang, -O0):
<Reals__init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpq   $0x0,0x2f10(%rip)
je     1136 <Reals__init+0x26>
mov    0x2f03(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1164 <Reals__init+0x54>
cmpq   $0x0,0x2ef2(%rip)
jne    1159 <Reals__init+0x49>
lea    0xeb5(%rip),%rdi
xor    %esi,%esi
call   1030 <Heap_REGMOD@plt>
mov    %rax,0x2ed7(%rip)
mov    0x2ed0(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Reals__init>:
push   %rax
mov    0x2f18(%rip),%rax
test   %rax,%rax
je     111f <Reals__init+0xf>
pop    %rcx
ret
lea    0xeda(%rip),%rdi
xor    %esi,%esi
call   1030 <Heap_REGMOD@plt>
mov    %rax,0x2efc(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@Reals__init.m = internal global i8* null
@.str = [6 x i8] c"Reals\00"
define i8* @Reals__init() {
%1 = alloca i8*
%2 = load i8*, i8** @Reals__init.m
%3 = icmp ne i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = load i8*, i8** @Reals__init.m
store i8* %5, i8** %1
br label %13
6: ; preds = %0
%7 = load i8*, i8** @Reals__init.m
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i8* @Heap_REGMOD(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0)
store i8* %10, i8** @Reals__init.m
br label %11
11: ; preds = %9, %6
%12 = load i8*, i8** @Reals__init.m
store i8* %12, i8** %1
br label %13
13: ; preds = %11, %4
%14 = load i8*, i8** %1
ret i8* %14
}

LLVM IR (-O2):
@Reals__init.m = internal unnamed_addr global i8* null
@.str = [6 x i8] c"Reals\00"
define i8* @Reals__init() {
%1 = load i8*, i8** @Reals__init.m
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i8* @Heap_REGMOD(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0)
store i8* %4, i8** @Reals__init.m
br label %5
5: ; preds = %0, %3
%6 = phi i8* [ %4, %3 ], [ %1, %0 ]
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ memcheck(void *);
void *realloc(void *, size_t);
void *realloc_chk(void *reallocMe, size_t memsize) {
  void *tmp = realloc(reallocMe, memsize);
  memcheck(tmp);
  return tmp;
}


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

x86 assembly (clang, -O2):
<realloc_chk>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <memcheck@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @realloc_chk(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = tail call i32 @memcheck(i8* %3)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ Testing_Macro_Global_Effectivity();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Start :\n");
  Testing_Macro_Global_Effectivity();
  printf("\n");
  getchar();
  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    0xeb3(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <Testing_Macro_Global_Effectivity@plt>
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1030 <Testing_Macro_Global_Effectivity@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Start :\0A\00"
@.str.1 = [2 x i8] c"\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 ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @Testing_Macro_Global_Effectivity()
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@str = [8 x i8] c"Start :\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @Testing_Macro_Global_Effectivity()
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void sort(char *str, char *smallest, char *largest) {
  if ((strcmp(str, smallest)) < 0) {
    strcpy(smallest, str);
  } else if ((strcmp(str, largest)) > 0) {
    strcpy(largest, str);
  } else {
    return;
  }
}


x86 assembly (clang, -O0):
<sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jge    115d <sort+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    1190 <sort+0x70>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jle    1186 <sort+0x66>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    118b <sort+0x6b>
jmp    1190 <sort+0x70>
jmp    1190 <sort+0x70>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
call   1040 <strcmp@plt>
test   %rax,%rax
js     114b <sort+0x2b>
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
mov    %r14,%rbx
test   %rax,%rax
jle    115b <sort+0x3b>
mov    %rbx,%rdi
mov    %r15,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <strcpy@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @sort(i8* %0, i8* %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 i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i64 @strcmp(i8* %7, i8* %8)
%10 = icmp slt i64 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %3
%12 = load i8*, i8** %5
%13 = load i8*, i8** %4
%14 = call i32 @strcpy(i8* %12, i8* %13)
br label %26
15: ; preds = %3
%16 = load i8*, i8** %4
%17 = load i8*, i8** %6
%18 = call i64 @strcmp(i8* %16, i8* %17)
%19 = icmp sgt i64 %18, 0
br i1 %19, label %20, label %24
20: ; preds = %15
%21 = load i8*, i8** %6
%22 = load i8*, i8** %4
%23 = call i32 @strcpy(i8* %21, i8* %22)
br label %25
24: ; preds = %15
br label %26
25: ; preds = %20
br label %26
26: ; preds = %24, %25, %11
ret void
}

LLVM IR (-O2):
define void @sort(i8* %0, i8* %1, i8* %2) {
%4 = tail call i64 @strcmp(i8* %0, i8* %1)
%5 = icmp slt i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i64 @strcmp(i8* %0, i8* %2)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6, %3
%10 = phi i8* [ %1, %3 ], [ %2, %6 ]
%11 = tail call i32 @strcpy(i8* %10, i8* %0)
br label %12
12: ; preds = %9, %6
ret void
}
/* Type definitions */
struct libgfx_vertex {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __builtin_mips_cache(int, struct libgfx_vertex *);
void libgfx_vertex_init(struct libgfx_vertex *v) {
  __builtin_mips_cache(0xD, v);
}


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

x86 assembly (clang, -O2):
<libgfx_vertex_init>:
mov    %rdi,%rsi
mov    $0xd,%edi
jmp    1030 <__builtin_mips_cache@plt>

LLVM IR (-O0):
%struct.libgfx_vertex = type { i32 }
define void @libgfx_vertex_init(%struct.libgfx_vertex* %0) {
%2 = alloca %struct.libgfx_vertex*
store %struct.libgfx_vertex* %0, %struct.libgfx_vertex** %2
%3 = load %struct.libgfx_vertex*, %struct.libgfx_vertex** %2
%4 = call i32 @__builtin_mips_cache(i32 13, %struct.libgfx_vertex* %3)
ret void
}

LLVM IR (-O2):
%struct.libgfx_vertex = type { i32 }
define void @libgfx_vertex_init(%struct.libgfx_vertex* %0) {
%2 = tail call i32 @__builtin_mips_cache(i32 13, %struct.libgfx_vertex* %0)
ret void
}
int camc_chk(const int c) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @camc_chk(i32 %0) {
ret i32 0
}
adrx0adr1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if ((((signed char *)10000000)[x0]) <= (*((signed char *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrx0adr1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0xc(%rbp),%rcx
mov    $0x989680,%eax
movsbl (%rax,%rcx,1),%eax
mov    $0xa98ac7,%ecx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jg     1147 <adrx0adr1+0x47>
movl   $0x1,-0x4(%rbp)
jmp    114e <adrx0adr1+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0adr1>:
movslq %edx,%rax
mov    0x989680(%rax),%cl
xor    %eax,%eax
cmp    0xa98ac7,%cl
setle  %al
ret

LLVM IR (-O0):
define i32 @adrx0adr1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i32, i32* %10
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* inttoptr (i64 10000000 to i8*), i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = load i8, i8* inttoptr (i64 11111111 to i8*)
%22 = sext i8 %21 to i32
%23 = icmp sle i32 %20, %22
br i1 %23, label %24, label %25
24: ; preds = %6
store i32 1, i32* %7
br label %26
25: ; preds = %6
store i32 0, i32* %7
br label %26
26: ; preds = %25, %24
%27 = load i32, i32* %7
ret i32 %27
}

LLVM IR (-O2):
define i32 @adrx0adr1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* inttoptr (i64 10000000 to i8*), i64 %7
%9 = load i8, i8* %8
%10 = load i8, i8* inttoptr (i64 11111111 to i8*)
%11 = icmp sle i8 %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Type definitions */
struct tree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct tree *);
int /*<<< orphan*/ tree_clear(struct tree *);
void tree_free(struct tree *target) {
  tree_clear(target);
  free(target);
}


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

x86 assembly (clang, -O2):
<tree_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <tree_clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.tree = type { i32 }
define void @tree_free(%struct.tree* %0) {
%2 = alloca %struct.tree*
store %struct.tree* %0, %struct.tree** %2
%3 = load %struct.tree*, %struct.tree** %2
%4 = call i32 @tree_clear(%struct.tree* %3)
%5 = load %struct.tree*, %struct.tree** %2
%6 = call i32 @free(%struct.tree* %5)
ret void
}

LLVM IR (-O2):
%struct.tree = type { i32 }
define void @tree_free(%struct.tree* %0) {
%2 = tail call i32 @tree_clear(%struct.tree* %0)
%3 = tail call i32 @free(%struct.tree* %0)
ret void
}
/* Variables and functions */
int double_to_long_long(double);
int isqNaN(double val) {
  return ((0x7ff8000000000000 & double_to_long_long(val)) ==
          0x7ff8000000000000);
}


x86 assembly (clang, -O0):
<isqNaN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <double_to_long_long@plt>
cltq
movabs $0x7ff8000000000000,%rcx
and    %rcx,%rax
movabs $0x7ff8000000000000,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isqNaN>:
push   %rax
call   1030 <double_to_long_long@plt>
movslq %eax,%rcx
not    %rcx
movabs $0x7ff8000000000000,%rdx
xor    %eax,%eax
test   %rdx,%rcx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isqNaN(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @double_to_long_long(double %3)
%5 = sext i32 %4 to i64
%6 = and i64 9221120237041090560, %5
%7 = icmp eq i64 %6, 9221120237041090560
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @isqNaN(double %0) {
%2 = tail call i32 @double_to_long_long(double %0)
%3 = sext i32 %2 to i64
%4 = and i64 %3, 9221120237041090560
%5 = icmp eq i64 %4, 9221120237041090560
%6 = zext i1 %5 to i32
ret i32 %6
}
void hostapd_ubus_remove_vlan(struct hostapd_data *hapd,
                              struct hostapd_vlan *vlan) {}


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

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

LLVM IR (-O0):
%struct.hostapd_data = type opaque
%struct.hostapd_vlan = type opaque
define void @hostapd_ubus_remove_vlan(%struct.hostapd_data* %0, %struct.hostapd_vlan* %1) {
%3 = alloca %struct.hostapd_data*
%4 = alloca %struct.hostapd_vlan*
store %struct.hostapd_data* %0, %struct.hostapd_data** %3
store %struct.hostapd_vlan* %1, %struct.hostapd_vlan** %4
ret void
}

LLVM IR (-O2):
%struct.hostapd_data = type opaque
%struct.hostapd_vlan = type opaque
define void @hostapd_ubus_remove_vlan(%struct.hostapd_data* nocapture %0, %struct.hostapd_vlan* nocapture %1) {
ret void
}
double a5(double a) { return a + 5; }


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

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

LLVM IR (-O0):
define double @a5(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 5.000000e+00
ret double %4
}

LLVM IR (-O2):
define double @a5(double %0) {
%2 = fadd double %0, 5.000000e+00
ret double %2
}
char *hash_plugin_summary(void) {
  return ("joomla \t\tmd5(password,salt) plugin (joomla)");
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"joomla \09\09md5(password,salt) plugin (joomla)\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [44 x i8] c"joomla \09\09md5(password,salt) plugin (joomla)\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ exifdie(char *);
unsigned int jpg2byte();
unsigned int mkrlen(void) {
  unsigned int l;
  if ((l = jpg2byte()) < 2)
    exifdie("invalid JPEG marker (length mismatch)");
  return (l - 2);
}


x86 assembly (clang, -O0):
<mkrlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <jpg2byte@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x2,%eax
jae    1147 <mkrlen+0x27>
lea    0xebe(%rip),%rdi
call   1040 <exifdie@plt>
mov    -0x4(%rbp),%eax
sub    $0x2,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkrlen>:
push   %rbx
xor    %eax,%eax
call   1030 <jpg2byte@plt>
mov    %eax,%ebx
cmp    $0x1,%eax
ja     113b <mkrlen+0x1b>
lea    0xeca(%rip),%rdi
call   1040 <exifdie@plt>
add    $0xfffffffe,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"invalid JPEG marker (length mismatch)\00"
define i32 @mkrlen() {
%1 = alloca i32
%2 = call i32 (...) @jpg2byte()
store i32 %2, i32* %1
%3 = icmp ult i32 %2, 2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @exifdie(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = load i32, i32* %1
%8 = sub i32 %7, 2
ret i32 %8
}

LLVM IR (-O2):
@.str = [38 x i8] c"invalid JPEG marker (length mismatch)\00"
define i32 @mkrlen() {
%1 = tail call i32 (...) @jpg2byte()
%2 = icmp ult i32 %1, 2
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @exifdie(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = add i32 %1, -2
ret i32 %6
}
void MIDI_send_timing_clock(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @g_error_new_literal() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f();
void tu(int y) {
  int x = 16;
  if (x == y) {
    return;
  } else {
    x++;
    f();
    return;
  }
  y++;
}


x86 assembly (clang, -O0):
<tu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x10,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jne    1133 <tu+0x23>
jmp    1143 <tu+0x33>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tu>:
cmp    $0x10,%edi
jne    1116 <tu+0x6>
ret
xor    %eax,%eax
jmp    1030 <f@plt>

LLVM IR (-O0):
define void @tu(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 16, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* %2
%6 = icmp eq i32 %4, %5
br i1 %6, label %7, label %8
7: ; preds = %1
br label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
%11 = call i32 (...) @f()
br label %12
12: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
define void @tu(i32 %0) {
%2 = icmp eq i32 %0, 16
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @f()
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handleDisplayRequest();
int /*<<< orphan*/ initializeProcess(int, char **);
int main(int argc, char *argv[]) {
  initializeProcess(argc, argv);
  handleDisplayRequest();
  return 0;
}


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

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

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @initializeProcess(i32 %6, i8** %7)
%9 = call i32 (...) @handleDisplayRequest()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @initializeProcess(i32 %0, i8** %1)
%4 = tail call i32 (...) @handleDisplayRequest()
ret i32 0
}
OP(fd, d7) { op_d7(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_d7@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_d7()
ret i32 undef
}
/* Variables and functions */
int write(int, char *, int);
void writer(int fd, char *data, int *count, int *error) {
  int orig = *count;
  int rc;
  rc = write(fd, data, orig);
  if (rc == -1) {
    *error = 1;
    *count = 0;
  } else {
    *error = 0;
    *count = orig - rc;
  }
}


x86 assembly (clang, -O0):
<writer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1030 <write@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0xffffffff,-0x28(%rbp)
jne    1165 <writer+0x55>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
jmp    117b <writer+0x6b>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x24(%rbp),%ecx
sub    -0x28(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writer>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%rbx
mov    (%rdx),%ebp
mov    %ebp,%edx
call   1030 <write@plt>
cmp    $0xffffffff,%eax
je     1133 <writer+0x23>
movl   $0x0,(%r14)
sub    %eax,%ebp
jmp    113c <writer+0x2c>
movl   $0x1,(%r14)
xor    %ebp,%ebp
mov    %ebp,(%rbx)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @writer(i32 %0, i8* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%11 = load i32*, i32** %7
%12 = load i32, i32* %11
store i32 %12, i32* %9
%13 = load i32, i32* %5
%14 = load i8*, i8** %6
%15 = load i32, i32* %9
%16 = call i32 @write(i32 %13, i8* %14, i32 %15)
store i32 %16, i32* %10
%17 = load i32, i32* %10
%18 = icmp eq i32 %17, -1
br i1 %18, label %19, label %22
19: ; preds = %4
%20 = load i32*, i32** %8
store i32 1, i32* %20
%21 = load i32*, i32** %7
store i32 0, i32* %21
br label %28
22: ; preds = %4
%23 = load i32*, i32** %8
store i32 0, i32* %23
%24 = load i32, i32* %9
%25 = load i32, i32* %10
%26 = sub nsw i32 %24, %25
%27 = load i32*, i32** %7
store i32 %26, i32* %27
br label %28
28: ; preds = %22, %19
ret void
}

LLVM IR (-O2):
define void @writer(i32 %0, i8* nocapture %1, i32* nocapture %2, i32* nocapture writeonly %3) {
%5 = load i32, i32* %2
%6 = tail call i32 @write(i32 %0, i8* %1, i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %4
store i32 1, i32* %3
br label %11
9: ; preds = %4
store i32 0, i32* %3
%10 = sub nsw i32 %5, %6
br label %11
11: ; preds = %9, %8
%12 = phi i32 [ %10, %9 ], [ 0, %8 ]
store i32 %12, i32* %2
ret void
}
/* Variables and functions */
int f385(int *);
int f386(int *p) { return f385(p); }


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

x86 assembly (clang, -O2):
<f386>:
jmp    1030 <f385@plt>

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

LLVM IR (-O2):
define i32 @f386(i32* %0) {
%2 = tail call i32 @f385(i32* %0)
ret i32 %2
}
void kuz_init_tables() { ; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _write(int, int *, int);
void led_brightness_set(int fd, uint8_t val) {
  uint8_t buf[] = {0x0a, val, 0xff, 0, 0};
  _write(fd, buf, sizeof(buf));
}


x86 assembly (clang, -O0):
<led_brightness_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xa,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movl   $0xff,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x14,%edx
call   1030 <_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_brightness_set>:
sub    $0x18,%rsp
movl   $0xa,(%rsp)
mov    %esi,0x4(%rsp)
movq   $0xff,0x8(%rsp)
movl   $0x0,0x10(%rsp)
mov    %rsp,%rsi
mov    $0x14,%edx
call   1030 <_write@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @led_brightness_set(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [5 x i32]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
store i32 10, i32* %6
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %4
store i32 %8, i32* %7
%9 = getelementptr inbounds i32, i32* %7, i64 1
store i32 255, i32* %9
%10 = getelementptr inbounds i32, i32* %9, i64 1
store i32 0, i32* %10
%11 = getelementptr inbounds i32, i32* %10, i64 1
store i32 0, i32* %11
%12 = load i32, i32* %3
%13 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%14 = call i32 @_write(i32 %12, i32* %13, i32 20)
ret void
}

LLVM IR (-O2):
define void @led_brightness_set(i32 %0, i32 %1) {
%3 = alloca [5 x i32]
%4 = bitcast [5 x i32]* %3 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
store i32 10, i32* %5
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 1
store i32 %1, i32* %6
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 2
store i32 255, i32* %7
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 3
store i32 0, i32* %8
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 4
store i32 0, i32* %9
%10 = call i32 @_write(i32 %0, i32* %5, i32 20)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_get_sink_info_by_index() {
  printf("NOT IMPLEMENTED:"
         "pa_context_get_sink_info_by_index"
         "\n");
}


x86 assembly (clang, -O0):
<pa_context_get_sink_info_by_index>:
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_context_get_sink_info_by_index>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [50 x i8] c"NOT IMPLEMENTED:pa_context_get_sink_info_by_index\00"
define i32 @pa_context_get_sink_info_by_index() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ftpcmd_send(char const *, char const *);
void ftpcmd_pipeline(const char *a, const char *b) { ftpcmd_send(a, b); }


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

x86 assembly (clang, -O2):
<ftpcmd_pipeline>:
jmp    1030 <ftpcmd_send@plt>

LLVM IR (-O0):
define void @ftpcmd_pipeline(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 i32 @ftpcmd_send(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @ftpcmd_pipeline(i8* %0, i8* %1) {
%3 = tail call i32 @ftpcmd_send(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ region_write(int, int, unsigned int, int);
int /*<<< orphan*/ set2clear(int, int, int);
void timer_clear_pending(unsigned int minor) {
  set2clear((0xE2500000 + 0x44), 0x1, 5 + minor);
  region_write((0xE2500000 + 0x44), 0x1, minor, 0x1);
}


x86 assembly (clang, -O0):
<timer_clear_pending>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
add    $0x5,%edx
mov    $0xe2500044,%edi
mov    $0x1,%esi
call   1030 <set2clear@plt>
mov    -0x4(%rbp),%edx
mov    $0xe2500044,%edi
mov    $0x1,%ecx
mov    %ecx,%esi
call   1040 <region_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_clear_pending>:
push   %rbx
mov    %edi,%ebx
lea    0x5(%rbx),%edx
mov    $0xe2500044,%edi
mov    $0x1,%esi
call   1030 <set2clear@plt>
mov    $0xe2500044,%edi
mov    $0x1,%esi
mov    %ebx,%edx
mov    $0x1,%ecx
pop    %rbx
jmp    1040 <region_write@plt>

LLVM IR (-O0):
define void @timer_clear_pending(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 5, %3
%5 = call i32 @set2clear(i32 -498073532, i32 1, i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @region_write(i32 -498073532, i32 1, i32 %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @timer_clear_pending(i32 %0) {
%2 = add i32 %0, 5
%3 = tail call i32 @set2clear(i32 -498073532, i32 1, i32 %2)
%4 = tail call i32 @region_write(i32 -498073532, i32 1, i32 %0, i32 1)
ret void
}
int operation_div(int a, int b) { return a / b; }


x86 assembly (clang, -O0):
<operation_div>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<operation_div>:
mov    %edi,%eax
cltd
idiv   %esi
ret

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

LLVM IR (-O2):
define i32 @operation_div(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
int I_NoAppServicesOverlayActive(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @I_NoAppServicesOverlayActive() {
ret i32 0
}
void null_handler(int n) {}


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

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

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

LLVM IR (-O2):
define void @null_handler(i32 %0) {
ret void
}
void g(int n, int m, int v[n + 1][m * 2]) {
#pragma omp parallel shared(v) firstprivate(n, m)
  { v[n - 1][m - 1] = 3; }
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,%eax
mov    %eax,%edx
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movl   $0x3,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
lea    (%rsi,%rsi,1),%eax
add    $0xffffffff,%edi
movslq %edi,%rcx
imul   %rax,%rcx
lea    (%rdx,%rcx,4),%rax
movslq %esi,%rcx
movl   $0x3,-0x4(%rax,%rcx,4)
ret

LLVM IR (-O0):
define void @g(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 1
%9 = zext i32 %8 to i64
%10 = load i32, i32* %5
%11 = mul nsw i32 %10, 2
%12 = zext i32 %11 to i64
%13 = load i32*, i32** %6
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 1
%16 = sext i32 %15 to i64
%17 = mul nsw i64 %16, %12
%18 = getelementptr inbounds i32, i32* %13, i64 %17
%19 = load i32, i32* %5
%20 = sub nsw i32 %19, 1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %18, i64 %21
store i32 3, i32* %22
ret void
}

LLVM IR (-O2):
define void @g(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = shl nsw i32 %1, 1
%5 = zext i32 %4 to i64
%6 = add nsw i32 %0, -1
%7 = sext i32 %6 to i64
%8 = mul nsw i64 %5, %7
%9 = getelementptr inbounds i32, i32* %2, i64 %8
%10 = add nsw i32 %1, -1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
store i32 3, i32* %12
ret void
}
/* Type definitions */
struct nlattr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ nla_data(struct nlattr *);
struct nlattr *nla_find(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ nla_len(struct nlattr *);
struct nlattr *nla_find_nested(struct nlattr *nla, int attrtype) {
  return nla_find(nla_data(nla), nla_len(nla), attrtype);
}


x86 assembly (clang, -O0):
<nla_find_nested>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <nla_data@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <nla_len@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
mov    -0xc(%rbp),%edx
call   1050 <nla_find@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nla_find_nested>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
call   1040 <nla_data@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <nla_len@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <nla_find@plt>

LLVM IR (-O0):
%struct.nlattr = type { i32 }
define %struct.nlattr* @nla_find_nested(%struct.nlattr* %0, i32 %1) {
%3 = alloca %struct.nlattr*
%4 = alloca i32
store %struct.nlattr* %0, %struct.nlattr** %3
store i32 %1, i32* %4
%5 = load %struct.nlattr*, %struct.nlattr** %3
%6 = call i32 @nla_data(%struct.nlattr* %5)
%7 = load %struct.nlattr*, %struct.nlattr** %3
%8 = call i32 @nla_len(%struct.nlattr* %7)
%9 = load i32, i32* %4
%10 = call %struct.nlattr* @nla_find(i32 %6, i32 %8, i32 %9)
ret %struct.nlattr* %10
}

LLVM IR (-O2):
%struct.nlattr = type { i32 }
define %struct.nlattr* @nla_find_nested(%struct.nlattr* %0, i32 %1) {
%3 = tail call i32 @nla_data(%struct.nlattr* %0)
%4 = tail call i32 @nla_len(%struct.nlattr* %0)
%5 = tail call %struct.nlattr* @nla_find(i32 %3, i32 %4, i32 %1)
ret %struct.nlattr* %5
}
/* Variables and functions */
int /*<<< orphan*/ FIFO(int *);
int main() {
  int burst_time[] = {3, 7, 9, 3, 24};
  FIFO(burst_time);
  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,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <FIFO@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xef6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <FIFO@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.burst_time = [5 x i32] [i32 3, i32 7, i32 9, i32 3, i32 24]
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
store i32 0, i32* %1
%3 = bitcast [5 x i32]* %2 to i8*
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%5 = call i32 @FIFO(i32* %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.burst_time = [5 x i32] [i32 3, i32 7, i32 9, i32 3, i32 24]
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @FIFO(i32* %3)
ret i32 0
}
void __clear_bit(long nr, volatile unsigned long *addr) {
  asm volatile("btr %1,%0" : "+m"(*(volatile long *)(addr)) : "Ir"(nr));
}


x86 assembly (clang, -O0):
<__clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
btr    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__clear_bit>:
btr    %rdi,(%rsi)
ret

LLVM IR (-O0):
define void @__clear_bit(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64*
store i64 %0, i64* %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = load i64, i64* %3
ret void
}

LLVM IR (-O2):
define void @__clear_bit(i64 %0, i64* %1) {
tail call void asm sideeffect "btr $1,$0", "=*m,Ir,*m,~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %1, i64 %0, i64* elementtype(i64) %1)
ret void
}
int IL_re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop)
struct re_pattern_buffer *bufp;
const char *string1, *string2;
int size1, size2;
int pos;
struct re_registers *regs;
int stop;
{
  int result;
  result = byte_re_match_2_internal(bufp, string1, size1, string2, size2, pos,
                                    regs, stop);
  return result;
}


x86 assembly (clang, -O0):
<IL_re_match_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x28(%rbp),%r9d
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%eax
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <byte_re_match_2_internal@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IL_re_match_2>:
push   %rax
mov    0x18(%rsp),%r10d
xor    %eax,%eax
push   %r10
push   0x18(%rsp)
call   1030 <byte_re_match_2_internal@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.re_pattern_buffer = type opaque
%struct.re_registers = type opaque
define i32 @IL_re_match_2(%struct.re_pattern_buffer* %0, i8* %1, i32 %2, i8* %3, i32 %4, i32 %5, %struct.re_registers* %6, i32 %7) {
%9 = alloca %struct.re_pattern_buffer*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca %struct.re_registers*
%16 = alloca i32
%17 = alloca i32
store %struct.re_pattern_buffer* %0, %struct.re_pattern_buffer** %9
store i8* %1, i8** %10
store i32 %2, i32* %11
store i8* %3, i8** %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store %struct.re_registers* %6, %struct.re_registers** %15
store i32 %7, i32* %16
%18 = load %struct.re_pattern_buffer*, %struct.re_pattern_buffer** %9
%19 = load i8*, i8** %10
%20 = load i32, i32* %11
%21 = load i8*, i8** %12
%22 = load i32, i32* %13
%23 = load i32, i32* %14
%24 = load %struct.re_registers*, %struct.re_registers** %15
%25 = load i32, i32* %16
%26 = call i32 (%struct.re_pattern_buffer*, i8*, i32, i8*, i32, i32, %struct.re_registers*, i32, ...) bitcast (i32 (...)* @byte_re_match_2_internal to i32 (%struct.re_pattern_buffer*, i8*, i32, i8*, i32, i32, %struct.re_registers*, i32, ...)*)(%struct.re_pattern_buffer* %18, i8* %19, i32 %20, i8* %21, i32 %22, i32 %23, %struct.re_registers* %24, i32 %25)
store i32 %26, i32* %17
%27 = load i32, i32* %17
ret i32 %27
}

LLVM IR (-O2):
%struct.re_pattern_buffer = type opaque
%struct.re_registers = type opaque
define i32 @IL_re_match_2(%struct.re_pattern_buffer* %0, i8* %1, i32 %2, i8* %3, i32 %4, i32 %5, %struct.re_registers* %6, i32 %7) {
%9 = tail call i32 (%struct.re_pattern_buffer*, i8*, i32, i8*, i32, i32, %struct.re_registers*, i32, ...) bitcast (i32 (...)* @byte_re_match_2_internal to i32 (%struct.re_pattern_buffer*, i8*, i32, i8*, i32, i32, %struct.re_registers*, i32, ...)*)(%struct.re_pattern_buffer* %0, i8* %1, i32 %2, i8* %3, i32 %4, i32 %5, %struct.re_registers* %6, i32 %7)
ret i32 %9
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ System_Deley(int);
int _M_DRV_MC3630_Delay(uint32_t dwMs) {
  System_Deley(dwMs);
  return dwMs;
}


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

x86 assembly (clang, -O2):
<_M_DRV_MC3630_Delay>:
push   %rbx
mov    %edi,%ebx
call   1030 <System_Deley@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @_M_DRV_MC3630_Delay(i32 returned %0) {
%2 = tail call i32 @System_Deley(i32 %0)
ret i32 %0
}