xunge/DecIR huggingface dataset:
unsigned long rho_ruby_create_string(const char *szVal) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @rho_ruby_create_string(i8* nocapture readnone %0) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void msg(void) { printf("Ola, eu sou uma mensagem qualquer\n\n"); }


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"Ola, eu sou uma mensagem qualquer\0A\0A\00"
define void @msg() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [35 x i8] c"Ola, eu sou uma mensagem qualquer\0A\00"
define void @msg() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void space(int n) {
  while (n--)
    putchar(' ');
}


x86 assembly (clang, -O0):
<space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     113e <space+0x2e>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    111b <space+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<space>:
push   %rbx
test   %edi,%edi
je     112f <space+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <space+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @space(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
%6 = icmp ne i32 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 @putchar(i8 signext 32)
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @space(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 @putchar(i8 signext 32)
%7 = icmp eq i32 %5, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
void gtk_window_set_resizable() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_set_resizable() {
ret void
}
/* Variables and functions */
void Default_UsageFault_Handler(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @Default_UsageFault_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ xcb_screen_t;
typedef int /*<<< orphan*/ xcb_connection_t;
struct TYPE_2__ {
  int /*<<< orphan*/ *data;
};

/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
int /*<<< orphan*/ xcb_get_setup(int /*<<< orphan*/ *);
TYPE_1__ xcb_setup_roots_iterator(int /*<<< orphan*/);
void get_screen(xcb_connection_t *con, xcb_screen_t **scr) {
  *scr = xcb_setup_roots_iterator(xcb_get_setup(con)).data;
  if (*scr == NULL)
    errx(1, "unable to retrieve screen informations");
}


x86 assembly (clang, -O0):
<get_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <xcb_get_setup@plt>
mov    %eax,%edi
call   1040 <xcb_setup_roots_iterator@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    117e <get_screen+0x4e>
mov    $0x1,%edi
lea    0xe87(%rip),%rsi
call   1030 <errx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_screen>:
push   %rbx
mov    %rsi,%rbx
call   1050 <xcb_get_setup@plt>
mov    %eax,%edi
call   1040 <xcb_setup_roots_iterator@plt>
mov    %rax,(%rbx)
test   %rax,%rax
je     114a <get_screen+0x1a>
pop    %rbx
ret
lea    0xeaf(%rip),%rsi
mov    $0x1,%edi
pop    %rbx
jmp    1030 <errx@plt>

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32* }
@.str = [39 x i8] c"unable to retrieve screen informations\00"
define void @get_screen(i32* %0, i32** %1) {
%3 = alloca i32*
%4 = alloca i32**
%5 = alloca %struct.TYPE_2__
store i32* %0, i32** %3
store i32** %1, i32*** %4
%6 = load i32*, i32** %3
%7 = call i32 @xcb_get_setup(i32* %6)
%8 = call i32* @xcb_setup_roots_iterator(i32 %7)
%9 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %5, i32 0, i32 0
store i32* %8, i32** %9
%10 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %5, i32 0, i32 0
%11 = load i32*, i32** %10
%12 = load i32**, i32*** %4
store i32* %11, i32** %12
%13 = load i32**, i32*** %4
%14 = load i32*, i32** %13
%15 = icmp eq i32* %14, null
br i1 %15, label %16, label %18
16: ; preds = %2
%17 = call i32 @errx(i32 1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %2
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"unable to retrieve screen informations\00"
define void @get_screen(i32* %0, i32** nocapture writeonly %1) {
%3 = tail call i32 @xcb_get_setup(i32* %0)
%4 = tail call i32* @xcb_setup_roots_iterator(i32 %3)
store i32* %4, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int core1_swap(char *, int);
int U_EMRPOLYBEZIER_swap(char *record, int torev) {
  return (core1_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRPOLYBEZIER_swap>:
jmp    1030 <core1_swap@plt>

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

LLVM IR (-O2):
define i32 @U_EMRPOLYBEZIER_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core1_swap(i8* %0, i32 %1)
ret i32 %3
}
int f(const char *ptr, int bar) {
  return (((const char *)0 - ptr) & (bar - 1)) == 0;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
sub    %rcx,%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
neg    %rdi
add    $0xffffffff,%esi
movslq %esi,%rcx
xor    %eax,%eax
test   %rdi,%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @f(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 = ptrtoint i8* %5 to i64
%7 = sub i64 0, %6
%8 = load i32, i32* %4
%9 = sub nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = and i64 %7, %10
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @f(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = sub i64 0, %3
%5 = add nsw i32 %1, -1
%6 = sext i32 %5 to i64
%7 = and i64 %6, %4
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ qs(long **, int /*<<< orphan*/, long);
void quick_sort(long size, long daten[][2]) { qs(daten, 0, size - 1); }


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

x86 assembly (clang, -O2):
<quick_sort>:
lea    -0x1(%rdi),%rdx
mov    %rsi,%rdi
xor    %esi,%esi
jmp    1030 <qs@plt>

LLVM IR (-O0):
define void @quick_sort(i64 %0, [2 x i64]* %1) {
%3 = alloca i64
%4 = alloca [2 x i64]*
store i64 %0, i64* %3
store [2 x i64]* %1, [2 x i64]** %4
%5 = load [2 x i64]*, [2 x i64]** %4
%6 = bitcast [2 x i64]* %5 to i64**
%7 = load i64, i64* %3
%8 = sub nsw i64 %7, 1
%9 = call i32 @qs(i64** %6, i32 0, i64 %8)
ret void
}

LLVM IR (-O2):
define void @quick_sort(i64 %0, [2 x i64]* %1) {
%3 = bitcast [2 x i64]* %1 to i64**
%4 = add nsw i64 %0, -1
%5 = tail call i32 @qs(i64** %3, i32 0, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void libconfig_yyfree(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<libconfig_yyfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @libconfig_yyfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int mod(int k, int m) { return k % m; }


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

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

LLVM IR (-O0):
define i32 @mod(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 = srem i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @mod(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ chompTail(char *);
char *skipName(char *);
char *skipSpace(char *);
char *getArg(char *src) {
  char *dst;
  if (*(dst = skipName(src))) {
    *dst = 0;
    chompTail(src);
    chompTail(dst = skipSpace(dst + 1));
  }
  return dst;
}


x86 assembly (clang, -O0):
<getArg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <skipName@plt>
mov    %rax,-0x10(%rbp)
cmpb   $0x0,(%rax)
je     117b <getArg+0x4b>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
call   1040 <chompTail@plt>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1050 <skipSpace@plt>
mov    %rax,%rdi
mov    %rdi,-0x10(%rbp)
call   1040 <chompTail@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getArg>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <skipName@plt>
mov    %rax,%rbx
cmpb   $0x0,(%rax)
je     1166 <getArg+0x36>
movb   $0x0,(%rbx)
mov    %r14,%rdi
call   1040 <chompTail@plt>
add    $0x1,%rbx
mov    %rbx,%rdi
call   1050 <skipSpace@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <chompTail@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @getArg(i8* %0) {
%2 = tail call i8* @skipName(i8* %0)
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1
store i8 0, i8* %2
%6 = tail call i32 @chompTail(i8* %0)
%7 = getelementptr inbounds i8, i8* %2, i64 1
%8 = tail call i8* @skipSpace(i8* %7)
%9 = tail call i32 @chompTail(i8* %8)
br label %10
10: ; preds = %5, %1
%11 = phi i8* [ %8, %5 ], [ %2, %1 ]
ret i8* %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

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


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

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

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

LLVM IR (-O2):
define void @clearerr(i32* nocapture %0) {
ret void
}
/* Type definitions */
struct hitlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_hitlist(struct hitlist *);
int /*<<< orphan*/ free(struct hitlist *);
void free_hitlist(struct hitlist *hl) {
  if (hl) {
    clear_hitlist(hl);
    free(hl);
  }
}


x86 assembly (clang, -O0):
<free_hitlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <free_hitlist+0x29>
mov    -0x8(%rbp),%rdi
call   1040 <clear_hitlist@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_hitlist>:
test   %rdi,%rdi
je     1137 <free_hitlist+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <clear_hitlist@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.hitlist = type { i32 }
define void @free_hitlist(%struct.hitlist* %0) {
%2 = alloca %struct.hitlist*
store %struct.hitlist* %0, %struct.hitlist** %2
%3 = load %struct.hitlist*, %struct.hitlist** %2
%4 = icmp ne %struct.hitlist* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load %struct.hitlist*, %struct.hitlist** %2
%7 = call i32 @clear_hitlist(%struct.hitlist* %6)
%8 = load %struct.hitlist*, %struct.hitlist** %2
%9 = call i32 @free(%struct.hitlist* %8)
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.hitlist = type { i32 }
define void @free_hitlist(%struct.hitlist* %0) {
%2 = icmp eq %struct.hitlist* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @clear_hitlist(%struct.hitlist* %0)
%5 = tail call i32 @free(%struct.hitlist* %0)
br label %6
6: ; preds = %3, %1
ret void
}
long long r3(void *x) { return *(long long *)(x + 32765); }


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

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

LLVM IR (-O0):
define i64 @r3(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 32765
%5 = bitcast i8* %4 to i64*
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @r3(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 32765
%3 = bitcast i8* %2 to i64*
%4 = load i64, i64* %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int staticLibFunc();
int main() {
  printf("%d\n", staticLibFunc());
  printf("%d\n", 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <staticLibFunc@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb5(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <staticLibFunc@plt>
lea    0xed1(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ adbuf_free(struct adbuf *);
int adbuf_init(struct adbuf *);
int adbuf_reset(struct adbuf *b) {
  adbuf_free(b);
  return adbuf_init(b);
}


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

x86 assembly (clang, -O2):
<adbuf_reset>:
push   %rbx
mov    %rdi,%rbx
call   1030 <adbuf_free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <adbuf_init@plt>

LLVM IR (-O0):
%struct.adbuf = type { i32 }
define i32 @adbuf_reset(%struct.adbuf* %0) {
%2 = alloca %struct.adbuf*
store %struct.adbuf* %0, %struct.adbuf** %2
%3 = load %struct.adbuf*, %struct.adbuf** %2
%4 = call i32 @adbuf_free(%struct.adbuf* %3)
%5 = load %struct.adbuf*, %struct.adbuf** %2
%6 = call i32 @adbuf_init(%struct.adbuf* %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.adbuf = type { i32 }
define i32 @adbuf_reset(%struct.adbuf* %0) {
%2 = tail call i32 @adbuf_free(%struct.adbuf* %0)
%3 = tail call i32 @adbuf_init(%struct.adbuf* %0)
ret i32 %3
}
int CheckSDLAttributeNameStart(char c) {
  if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'))
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<CheckSDLAttributeNameStart>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jg     1128 <CheckSDLAttributeNameStart+0x28>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jle    1146 <CheckSDLAttributeNameStart+0x46>
movsbl -0x5(%rbp),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     1152 <CheckSDLAttributeNameStart+0x52>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1152 <CheckSDLAttributeNameStart+0x52>
movl   $0x0,-0x4(%rbp)
jmp    1159 <CheckSDLAttributeNameStart+0x59>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckSDLAttributeNameStart>:
and    $0xdf,%dil
add    $0xa5,%dil
cmp    $0xe6,%dil
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @CheckSDLAttributeNameStart(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sle i32 97, %5
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %19, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sle i32 65, %13
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 90
br i1 %18, label %19, label %20
19: ; preds = %15, %7
store i32 0, i32* %2
br label %21
20: ; preds = %15, %11
store i32 -1, i32* %2
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @CheckSDLAttributeNameStart(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -91
%4 = icmp ult i8 %3, -26
%5 = sext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int strlen(char *);
char *append_dotnr_to_path(char *path, int number) {
  int len;
  len = strlen(path);
  path[len - 2] = '.';
  path[len - 1] = '0' + number;
  path[len] = '\0';
  return path;
}


x86 assembly (clang, -O0):
<append_dotnr_to_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movb   $0x2e,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x30,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<append_dotnr_to_path>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
movb   $0x2e,-0x2(%rbx,%rax,1)
add    $0x30,%bpl
mov    %bpl,-0x1(%rbx,%rax,1)
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @append_dotnr_to_path(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i8*, i8** %3
%9 = load i32, i32* %5
%10 = sub nsw i32 %9, 2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
store i8 46, i8* %12
%13 = load i32, i32* %4
%14 = add nsw i32 48, %13
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %3
%17 = load i32, i32* %5
%18 = sub nsw i32 %17, 1
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %16, i64 %19
store i8 %15, i8* %20
%21 = load i8*, i8** %3
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
store i8 0, i8* %24
%25 = load i8*, i8** %3
ret i8* %25
}

LLVM IR (-O2):
define i8* @append_dotnr_to_path(i8* returned %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = add nsw i32 %3, -2
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 46, i8* %6
%7 = trunc i32 %1 to i8
%8 = add i8 %7, 48
%9 = add nsw i32 %3, -1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
store i8 %8, i8* %11
%12 = sext i32 %3 to i64
%13 = getelementptr inbounds i8, i8* %0, i64 %12
store i8 0, i8* %13
ret i8* %0
}
void f(void) {
  int i;
#pragma acc parallel one
  ;
#pragma acc kernels eins
  ;
#pragma acc data two
  ;
#pragma acc parallel
#pragma acc loop deux
  for (i = 0; i < 2; ++i)
    ;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    1128 <f+0x28>
jmp    111a <f+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <f+0xb>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void my_error_function(const char *msg) {
  fprintf(stderr, "library message : \"%s\"\n", msg);
}


x86 assembly (clang, -O0):
<my_error_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_error_function>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"library message : \22%s\22\0A\00"
define void @my_error_function(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"library message : \22%s\22\0A\00"
define void @my_error_function(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
unsigned short *get_ports(int /*<<< orphan*/, int *);
unsigned short *udp_listen_ports(int *size) { return get_ports(0, size); }


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

x86 assembly (clang, -O2):
<udp_listen_ports>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <get_ports@plt>

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

LLVM IR (-O2):
define i16* @udp_listen_ports(i32* %0) {
%2 = tail call i16* @get_ports(i32 0, i32* %0)
ret i16* %2
}
/* Variables and functions */
int factorial(int);
int main(int argc, char **argv) { return factorial(argc); }


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
call   1030 <factorial@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <factorial@plt>

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 = call i32 @factorial(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @factorial(i32 %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("This isn't a mistake, this test tests the tests!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"This isn't a mistake, this test tests the tests!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [49 x i8] c"This isn't a mistake, this test tests the tests!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void asrc_iomux_config() {}


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

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

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

LLVM IR (-O2):
define void @asrc_iomux_config() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int close_file_(int *fd) {
  close(*fd);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @close_file_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @close(i32 %2)
ret i32 0
}
/* Variables and functions */
int glob(char const *, int, int /*<<< orphan*/, void *);
int octave_glob_wrapper(const char *pattern, int flags, void *glob_info) {
  return glob(pattern, flags, 0, glob_info);
}


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

x86 assembly (clang, -O2):
<octave_glob_wrapper>:
mov    %rdx,%rcx
xor    %edx,%edx
jmp    1030 <glob@plt>

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

LLVM IR (-O2):
define i32 @octave_glob_wrapper(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @glob(i8* %0, i32 %1, i32 0, i8* %2)
ret i32 %4
}
int xmlUCSIsMiscellaneousSymbolsandArrows(int code) {
  return (((code >= 0x2B00) && (code <= 0x2BFF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsMiscellaneousSymbolsandArrows>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x2b00,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsMiscellaneousSymbolsandArrows+0x26>
cmpl   $0x2bff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsMiscellaneousSymbolsandArrows>:
and    $0xffffff00,%edi
xor    %eax,%eax
cmp    $0x2b00,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsMiscellaneousSymbolsandArrows(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 11008
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 11263
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsMiscellaneousSymbolsandArrows(i32 %0) {
%2 = and i32 %0, -256
%3 = icmp eq i32 %2, 11008
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetsize(int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
void pad_file(FILE *fp) {
  int mult;
  int size = fgetsize(fp);
  char *pad = 0;
  for (mult = 512; mult < size; mult += 512)
    ;
  ;
  fwrite(pad, 1, mult - size, fp);
}


x86 assembly (clang, -O0):
<pad_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetsize@plt>
mov    %eax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x200,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1168 <pad_file+0x48>
jmp    1158 <pad_file+0x38>
mov    -0xc(%rbp),%eax
add    $0x200,%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <pad_file+0x27>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pad_file>:
push   %rbx
mov    %rdi,%rbx
call   1030 <fgetsize@plt>
cmp    $0x201,%eax
mov    $0x200,%edx
cmovge %eax,%edx
add    $0x1ff,%edx
and    $0xfffffe00,%edx
sub    %eax,%edx
xor    %edi,%edi
mov    $0x1,%esi
mov    %rbx,%rcx
pop    %rbx
jmp    1040 <fwrite@plt>

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

LLVM IR (-O2):
define void @pad_file(i32* %0) {
%2 = tail call i32 @fgetsize(i32* %0)
%3 = call i32 @llvm.smax.i32(i32 %2, i32 512)
%4 = add nuw i32 %3, 511
%5 = and i32 %4, -512
%6 = sub nsw i32 %5, %2
%7 = tail call i32 @fwrite(i8* null, i32 1, i32 %6, i32* %0)
ret void
}
void gtk_label_get_attributes() {}


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

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

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

LLVM IR (-O2):
define void @gtk_label_get_attributes() {
ret void
}
long x86_64_sys_futex0_wait(int *addr, long op, long val) {
  register long r10 __asm__("%r10");
  long res;
  r10 = 0;
  __asm volatile("syscall"
                 : "=a"(res)
                 : "0"(202), "D"(addr), "S"(op), "d"(val), "r"(r10)
                 : "r11", "rcx", "memory");
  return res;
}


x86 assembly (clang, -O0):
<x86_64_sys_futex0_wait>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r10
mov    $0xca,%eax
syscall
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<x86_64_sys_futex0_wait>:
mov    $0xca,%eax
xor    %r10d,%r10d
syscall
ret

LLVM IR (-O0):
define i64 @x86_64_sys_futex0_wait(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
store i64 0, i64* %7
%9 = load i32*, i32** %4
%10 = load i64, i64* %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = call i64 asm sideeffect "syscall", "={ax},0,{di},{si},{dx},{r10},~{r11},~{rcx},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 202, i32* %9, i64 %10, i64 %11, i64 %12)
store i64 %13, i64* %8
%14 = load i64, i64* %8
ret i64 %14
}

LLVM IR (-O2):
define i64 @x86_64_sys_futex0_wait(i32* %0, i64 %1, i64 %2) {
%4 = tail call i64 asm sideeffect "syscall", "={ax},0,{di},{si},{dx},{r10},~{r11},~{rcx},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 202, i32* %0, i64 %1, i64 %2, i64 0)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void setup_pins() { printf("Setup GPIO\n"); }


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"Setup GPIO\00"
define void @setup_pins() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_stringops_2(int);
void test_stringops_with_values_2(int common, int not_common) {
  int i;
  for (i = 0; i < 1000; i++) {
    if (i > 990)
      test_stringops_2(not_common);
    else
      test_stringops_2(common);
  }
}


x86 assembly (clang, -O0):
<test_stringops_with_values_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3e8,-0xc(%rbp)
jge    1167 <test_stringops_with_values_2+0x57>
cmpl   $0x3de,-0xc(%rbp)
jle    114c <test_stringops_with_values_2+0x3c>
mov    -0x8(%rbp),%edi
call   1030 <test_stringops_2@plt>
jmp    1154 <test_stringops_with_values_2+0x44>
mov    -0x4(%rbp),%edi
call   1030 <test_stringops_2@plt>
jmp    1159 <test_stringops_with_values_2+0x49>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <test_stringops_with_values_2+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_stringops_with_values_2>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
cmp    $0x3df,%ebx
mov    %ebp,%edi
cmovae %r14d,%edi
call   1030 <test_stringops_2@plt>
add    $0x1,%ebx
cmp    $0x3e8,%ebx
jne    1120 <test_stringops_with_values_2+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @test_stringops_with_values_2(i32 %0, i32 %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %8, %3 ]
%5 = icmp ugt i32 %4, 990
%6 = select i1 %5, i32 %1, i32 %0
%7 = tail call i32 @test_stringops_2(i32 %6)
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %8, 1000
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ balloc();
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ read_faces(int /*<<< orphan*/ *);
int /*<<< orphan*/ read_header(int /*<<< orphan*/ *);
int /*<<< orphan*/ read_vertices(int /*<<< orphan*/ *);
int /*<<< orphan*/ *safe_fopen(char const *, char *);
void read_file(const char *fn) {
  FILE *fd = safe_fopen(fn, "r");
  read_header(fd);
  balloc();
  read_vertices(fd);
  read_faces(fd);
  fclose(fd);
}


x86 assembly (clang, -O0):
<read_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe89(%rip),%rsi
call   1080 <safe_fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <read_header@plt>
mov    $0x0,%al
call   1040 <balloc@plt>
mov    -0x10(%rbp),%rdi
call   1060 <read_vertices@plt>
mov    -0x10(%rbp),%rdi
call   1030 <read_faces@plt>
mov    -0x10(%rbp),%rdi
call   1050 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_file>:
push   %rbx
lea    0xe98(%rip),%rsi
call   1080 <safe_fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1070 <read_header@plt>
xor    %eax,%eax
call   1040 <balloc@plt>
mov    %rbx,%rdi
call   1060 <read_vertices@plt>
mov    %rbx,%rdi
call   1030 <read_faces@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define void @read_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @safe_fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @read_header(i32* %6)
%8 = call i32 (...) @balloc()
%9 = load i32*, i32** %3
%10 = call i32 @read_vertices(i32* %9)
%11 = load i32*, i32** %3
%12 = call i32 @read_faces(i32* %11)
%13 = load i32*, i32** %3
%14 = call i32 @fclose(i32* %13)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define void @read_file(i8* %0) {
%2 = tail call i32* @safe_fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @read_header(i32* %2)
%4 = tail call i32 (...) @balloc()
%5 = tail call i32 @read_vertices(i32* %2)
%6 = tail call i32 @read_faces(i32* %2)
%7 = tail call i32 @fclose(i32* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int fchmodat(int, char const *, int /*<<< orphan*/, int);
__attribute__((__weak__, __always___)) int
softboundmpx_fchmodat(int dirfd, const char *pathname, mode_t mode, int flags) {
  return fchmodat(dirfd, pathname, mode, flags);
}


x86 assembly (clang, -O0):
<softboundmpx_fchmodat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <fchmodat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_fchmodat>:
jmp    1030 <fchmodat@plt>

LLVM IR (-O0):
define weak i32 @softboundmpx_fchmodat(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @fchmodat(i32 %9, i8* %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define weak i32 @softboundmpx_fchmodat(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @fchmodat(i32 %0, i8* %1, i32 %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ stun_init_request_str(int, unsigned char *, size_t *);
void stun_set_binding_request_str(unsigned char *buf, size_t *len) {
  stun_init_request_str((0x0001), buf, len);
}


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

x86 assembly (clang, -O2):
<stun_set_binding_request_str>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <stun_init_request_str@plt>

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

LLVM IR (-O2):
define void @stun_set_binding_request_str(i8* %0, i64* %1) {
%3 = tail call i32 @stun_init_request_str(i32 1, i8* %0, i64* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *cmd) {
  printf("Usage: %s <address/mask> <bandwith in kbps>\n", cmd);
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"Usage: %s <address/mask> <bandwith in kbps>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"Usage: %s <address/mask> <bandwith in kbps>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
extern void error() {
  printf("sorry something bad append :\\ \n");
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"sorry something bad append :\\ \0A\00"
define void @error() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [31 x i8] c"sorry something bad append :\\ \00"
define void @error() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void runtime_error(char *reason, int fatal) {
  printf("ERROR: %s\n", reason);
  if (fatal) {
    printf("FATAL\n");
    exit(0);
    abort();
  }
}


x86 assembly (clang, -O0):
<runtime_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
je     1160 <runtime_error+0x40>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runtime_error>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xec3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
jne    114a <runtime_error+0x1a>
pop    %rbx
ret
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"ERROR: %s\0A\00"
@.str.1 = [7 x i8] c"FATAL\0A\00"
define void @runtime_error(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 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @exit(i32 0)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"ERROR: %s\0A\00"
@str = [6 x i8] c"FATAL\00"
define void @runtime_error(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = icmp eq i32 %1, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %2
ret void
}
int test_imm_BEuint16_reg(unsigned short val) {
  return ((val) & (0xBE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BEuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xbe,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_BEuint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 190
%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_BEuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 190
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}