xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ XNoExposeEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XNoExposeEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XNoExposeEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XNoExposeEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XNoExposeEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XNoExposeEvent>:
test   %rdi,%rdi
je     112a <free_XNoExposeEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XNoExposeEvent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XNoExposeEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void print_usage() {
  printf("Usage: adler32 [file]...\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Usage: adler32 [file]...\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [25 x i8] c"Usage: adler32 [file]...\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int function_3(int code) {
  if (code >= 0 && code <= 9)
    return code + '0';
  else if (code >= 10 && code <= 15)
    return (code + 'a') - 10;
  return 0;
}


x86 assembly (clang, -O0):
<function_3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1129 <function_3+0x29>
cmpl   $0x9,-0x8(%rbp)
jg     1129 <function_3+0x29>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    115a <function_3+0x5a>
cmpl   $0xa,-0x8(%rbp)
jl     114e <function_3+0x4e>
cmpl   $0xf,-0x8(%rbp)
jg     114e <function_3+0x4e>
mov    -0x8(%rbp),%eax
add    $0x61,%eax
sub    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    115a <function_3+0x5a>
jmp    1153 <function_3+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_3>:
mov    %edi,%eax
cmp    $0x9,%edi
ja     110b <function_3+0xb>
add    $0x30,%eax
ret
lea    -0xa(%rax),%ecx
add    $0x57,%eax
xor    %edx,%edx
cmp    $0x6,%ecx
cmovb  %eax,%edx
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @function_3(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = add nuw nsw i32 %0, 48
br label %10
5: ; preds = %1
%6 = add i32 %0, -10
%7 = icmp ult i32 %6, 6
%8 = add nsw i32 %0, 87
%9 = select i1 %7, i32 %8, i32 0
br label %10
10: ; preds = %5, %3
%11 = phi i32 [ %4, %3 ], [ %9, %5 ]
ret i32 %11
}
char *b16ton(char *data, unsigned short val) {
  data[0] = val >> 8;
  data[1] = val & 0xff;
  return data + 2;
}


x86 assembly (clang, -O0):
<b16ton>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
movzwl -0xa(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b16ton>:
rol    $0x8,%si
mov    %si,(%rdi)
lea    0x2(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @b16ton(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = ashr i32 %6, 8
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i16, i16* %4
%12 = zext i16 %11 to i32
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 2
ret i8* %18
}

LLVM IR (-O2):
define i8* @b16ton(i8* writeonly %0, i16 zeroext %1) {
%3 = lshr i16 %1, 8
%4 = trunc i16 %3 to i8
store i8 %4, i8* %0
%5 = trunc i16 %1 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = getelementptr inbounds i8, i8* %0, i64 2
ret i8* %7
}
void gtk_drawing_area_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_drawing_area_get_type() {
ret void
}
void proc_call_7(int p0, int p1, int p2, int p3, int p4, int p5, int p6) {}


x86 assembly (clang, -O0):
<proc_call_7>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @proc_call_7(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
ret void
}

LLVM IR (-O2):
define void @proc_call_7(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
ret void
}
/* Type definitions */
struct target_ops {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tcomplain();
void tdefault_disconnect(struct target_ops *self, char *arg1, int arg2) {
  tcomplain();
}


x86 assembly (clang, -O0):
<tdefault_disconnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <tcomplain@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.target_ops = type { i32 }
define void @tdefault_disconnect(%struct.target_ops* %0, i8* %1, i32 %2) {
%4 = alloca %struct.target_ops*
%5 = alloca i8*
%6 = alloca i32
store %struct.target_ops* %0, %struct.target_ops** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = call i32 (...) @tcomplain()
ret void
}

LLVM IR (-O2):
%struct.target_ops = type { i32 }
define void @tdefault_disconnect(%struct.target_ops* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 (...) @tcomplain()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atan(int /*<<< orphan*/);
int /*<<< orphan*/ wStackPopNumber();
int /*<<< orphan*/ wStackPushNumber(int /*<<< orphan*/);
void wBuiltinATan() { wStackPushNumber(atan(wStackPopNumber())); }


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

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

LLVM IR (-O0):
define void @wBuiltinATan() {
%1 = call i32 (...) @wStackPopNumber()
%2 = call i32 @atan(i32 %1)
%3 = call i32 @wStackPushNumber(i32 %2)
ret void
}

LLVM IR (-O2):
define void @wBuiltinATan() {
%1 = tail call i32 (...) @wStackPopNumber()
%2 = tail call i32 @atan(i32 %1)
%3 = tail call i32 @wStackPushNumber(i32 %2)
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ buf;
struct TYPE_3__ {
  int /*<<< orphan*/ error_code;
};
typedef TYPE_1__ XErrorEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ XGetErrorText(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                 char *, int);
int /*<<< orphan*/ err(int, char *, char *);
int xerr(Display *disp, XErrorEvent *ev) {
  char buf[1024];
  XGetErrorText(disp, ev->error_code, buf, sizeof(buf));
  err(1, "%s", buf);
  return 0;
}


x86 assembly (clang, -O0):
<xerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    -0x410(%rbp),%rdx
mov    $0x400,%ecx
call   1040 <XGetErrorText@plt>
lea    -0x410(%rbp),%rdx
mov    $0x1,%edi
lea    0xe9f(%rip),%rsi
call   1030 <err@plt>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xerr>:
push   %rbx
sub    $0x400,%rsp
mov    (%rsi),%esi
mov    %rsp,%rbx
mov    %rbx,%rdx
mov    $0x400,%ecx
call   1040 <XGetErrorText@plt>
lea    0xebf(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
call   1030 <err@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
@.str = [3 x i8] c"%s\00"
define i32 @xerr(i32* %0, %struct.TYPE_3__* %1) {
%3 = alloca i32*
%4 = alloca %struct.TYPE_3__*
%5 = alloca [1024 x i8]
store i32* %0, i32** %3
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %4
%6 = load i32*, i32** %3
%7 = load %struct.TYPE_3__*, %struct.TYPE_3__** %4
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%11 = call i32 @XGetErrorText(i32* %6, i32 %9, i8* %10, i32 1024)
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%13 = call i32 @err(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
ret i32 0
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
@.str = [3 x i8] c"%s\00"
define i32 @xerr(i32* %0, %struct.TYPE_3__* nocapture %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @XGetErrorText(i32* %0, i32 %6, i8* %4, i32 1024)
%8 = call i32 @err(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
void test_ar_1_UCHAR(void *d, unsigned char n) {
  if (n == (0x7f * 2 + 1) - 1)
    n = (0x7f * 2 + 1) - 2;
  __builtin_memset(d, 0, n);
}


x86 assembly (clang, -O0):
<test_ar_1_UCHAR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
cmp    $0xfe,%eax
jne    1135 <test_ar_1_UCHAR+0x25>
movb   $0xfd,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%eax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ar_1_UCHAR>:
cmp    $0xfe,%sil
mov    $0xfd,%edx
cmovne %esi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @test_ar_1_UCHAR(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp eq i32 %6, 254
br i1 %7, label %8, label %9
8: ; preds = %2
store i8 -3, i8* %4
br label %9
9: ; preds = %8, %2
%10 = load i8*, i8** %3
%11 = load i8, i8* %4
%12 = zext i8 %11 to i64
ret void
}

LLVM IR (-O2):
define void @test_ar_1_UCHAR(i8* nocapture writeonly %0, i8 zeroext %1) {
%3 = icmp eq i8 %1, -2
%4 = select i1 %3, i8 -3, i8 %1
%5 = zext i8 %4 to i64
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 %5, i1 false)
ret void
}
/* Variables and functions */
int gethighscore(int);
int /*<<< orphan*/ karakter();
int /*<<< orphan*/ kiir(char *);
int highscore() {
  int score = gethighscore(1);
  if (score == -1)
    kiir("Meg nincsenek pontszamok.\nVagy nem lehet megnyitni a fajlt.\n");
  karakter();
  return score;
}


x86 assembly (clang, -O0):
<highscore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1050 <gethighscore@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    115b <highscore+0x2b>
lea    0xeaa(%rip),%rdi
call   1030 <kiir@plt>
mov    $0x0,%al
call   1040 <karakter@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<highscore>:
push   %rbx
mov    $0x1,%edi
call   1050 <gethighscore@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    114e <highscore+0x1e>
lea    0xeb7(%rip),%rdi
call   1030 <kiir@plt>
xor    %eax,%eax
call   1040 <karakter@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [61 x i8] c"Meg nincsenek pontszamok.\0AVagy nem lehet megnyitni a fajlt.\0A\00"
define i32 @highscore() {
%1 = alloca i32
%2 = call i32 @gethighscore(i32 1)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @kiir(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = call i32 (...) @karakter()
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [61 x i8] c"Meg nincsenek pontszamok.\0AVagy nem lehet megnyitni a fajlt.\0A\00"
define i32 @highscore() {
%1 = tail call i32 @gethighscore(i32 1)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @kiir(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 (...) @karakter()
ret i32 %1
}
/* Variables and functions */
double song_enable_cmd(double, double, double, int, int);
double modipulategml_song_enable_effect(double songid, double ch, double cmd) {
  return song_enable_cmd(songid, ch, cmd, 1, 1);
}


x86 assembly (clang, -O0):
<modipulategml_song_enable_effect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <song_enable_cmd@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @modipulategml_song_enable_effect(double %0, double %1, double %2) {
%4 = tail call double @song_enable_cmd(double %0, double %1, double %2, i32 1, i32 1)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
scalar_t__ getpid();
int /*<<< orphan*/ stderr;
void *thread_function(void *arg) {
  fprintf(stderr, "child thread pid is %d\n", (int)getpid());
  while (1)
    ;
  return NULL;
}


x86 assembly (clang, -O0):
<thread_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%edx
lea    0xeb5(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1150 <thread_function+0x30>

x86 assembly (clang, -O2):
<thread_function>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xec8(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
call   1040 <fprintf@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
jmp    1150 <thread_function+0x30>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"child thread pid is %d\0A\00"
define i8* @thread_function(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i64 (...) @getpid()
%5 = trunc i64 %4 to i32
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %1, %7
br label %7
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"child thread pid is %d\0A\00"
define noalias i8* @thread_function(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i64 (...) @getpid()
%4 = trunc i64 %3 to i32
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %6
6: ; preds = %1, %6
br label %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void main() {
  char *a = "I love China!";
  char str[] = "I'm Chinese!";
  printf("%s\n", a);
  a = a + 7;
  printf("%s\n", a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xee4(%rip),%rax
mov    %rax,-0x15(%rbp)
mov    0xee2(%rip),%eax
mov    %eax,-0xd(%rbp)
mov    0xedd(%rip),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef6(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"I love China!\00"
@__const.main.str = [13 x i8] c"I'm Chinese!\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @main() {
%1 = alloca i8*
%2 = alloca [13 x i8]
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = bitcast [13 x i8]* %2 to i8*
%4 = load i8*, i8** %1
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %1
%7 = getelementptr inbounds i8, i8* %6, i64 7
store i8* %7, i8** %1
%8 = load i8*, i8** %1
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"I love China!\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 7))
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t __synctory_byteswap_16(uint16_t value) {
  return (value << 8 | value >> 8);
}


x86 assembly (clang, -O0):
<__synctory_byteswap_16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__synctory_byteswap_16>:
mov    %edi,%eax
shl    $0x8,%eax
sar    $0x8,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @__synctory_byteswap_16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = load i32, i32* %2
%6 = ashr i32 %5, 8
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @__synctory_byteswap_16(i32 %0) {
%2 = shl i32 %0, 8
%3 = ashr i32 %0, 8
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int IO_get_byte();
unsigned int IO_get_le16(void) {
  unsigned int result = IO_get_byte();
  return result | (IO_get_byte() << 8);
}


x86 assembly (clang, -O0):
<IO_get_le16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <IO_get_byte@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <IO_get_byte@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
shl    $0x8,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IO_get_le16>:
push   %rbx
xor    %eax,%eax
call   1030 <IO_get_byte@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <IO_get_byte@plt>
shl    $0x8,%eax
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @IO_get_le16() {
%1 = alloca i32
%2 = call i32 (...) @IO_get_byte()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 (...) @IO_get_byte()
%5 = shl i32 %4, 8
%6 = or i32 %3, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @IO_get_le16() {
%1 = tail call i32 (...) @IO_get_byte()
%2 = tail call i32 (...) @IO_get_byte()
%3 = shl i32 %2, 8
%4 = or i32 %3, %1
ret i32 %4
}
void testfunc2(int foo6) {
  int foo7;
foo1:
foo2:
foo3:
foo4:
foo5:
foo6:
foo7:
testfunc2:
a:
i:
j:;
}


x86 assembly (clang, -O0):
<testfunc2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    110c <testfunc2+0xc>
jmp    1111 <testfunc2+0x11>
jmp    1116 <testfunc2+0x16>
jmp    111b <testfunc2+0x1b>
jmp    1120 <testfunc2+0x20>
jmp    1125 <testfunc2+0x25>
jmp    112a <testfunc2+0x2a>
jmp    112f <testfunc2+0x2f>
jmp    1134 <testfunc2+0x34>
jmp    1139 <testfunc2+0x39>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testfunc2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %1
br label %5
5: ; preds = %4
br label %6
6: ; preds = %5
br label %7
7: ; preds = %6
br label %8
8: ; preds = %7
br label %9
9: ; preds = %8
br label %10
10: ; preds = %9
br label %11
11: ; preds = %10
br label %12
12: ; preds = %11
br label %13
13: ; preds = %12
br label %14
14: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @testfunc2(i32 %0) {
ret void
}
short littlebinary2s(char *binary) {
  short result = 0;
  int len = sizeof(result);
  short exp = 1;
  int i;
  for (i = 0; i < len; ++i) {
    result += binary[i] * exp;
    exp <<= 8;
  }
  return result;
}


x86 assembly (clang, -O0):
<littlebinary2s>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
movl   $0x2,-0x10(%rbp)
movw   $0x1,-0x12(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1164 <littlebinary2s+0x64>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
movswl -0x12(%rbp),%eax
imul   %eax,%ecx
movswl -0xa(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0xa(%rbp)
movswl -0x12(%rbp),%eax
shl    $0x8,%eax
mov    %ax,-0x12(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1122 <littlebinary2s+0x22>
movswl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<littlebinary2s>:
movsbl (%rdi),%ecx
movzbl 0x1(%rdi),%eax
shl    $0x8,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define signext i16 @littlebinary2s(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
%4 = alloca i32
%5 = alloca i16
%6 = alloca i32
store i8* %0, i8** %2
store i16 0, i16* %3
store i32 2, i32* %4
store i16 1, i16* %5
store i32 0, i32* %6
br label %7
7: ; preds = %29, %1
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %32
11: ; preds = %7
%12 = load i8*, i8** %2
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = load i16, i16* %5
%19 = sext i16 %18 to i32
%20 = mul nsw i32 %17, %19
%21 = load i16, i16* %3
%22 = sext i16 %21 to i32
%23 = add nsw i32 %22, %20
%24 = trunc i32 %23 to i16
store i16 %24, i16* %3
%25 = load i16, i16* %5
%26 = sext i16 %25 to i32
%27 = shl i32 %26, 8
%28 = trunc i32 %27 to i16
store i16 %28, i16* %5
br label %29
29: ; preds = %11
%30 = load i32, i32* %6
%31 = add nsw i32 %30, 1
store i32 %31, i32* %6
br label %7
32: ; preds = %7
%33 = load i16, i16* %3
ret i16 %33
}

LLVM IR (-O2):
define signext i16 @littlebinary2s(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i16
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i16
%7 = shl nuw i16 %6, 8
%8 = add i16 %7, %3
ret i16 %8
}
unsigned short hashStr(char *str) {
  unsigned short hash = 0;
  int i;
  for (i = 0; str[i] != 0x00; i++) {
    hash += str[i];
    hash *= 37;
  }
  return hash;
}


x86 assembly (clang, -O0):
<hashStr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1159 <hashStr+0x59>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
movzwl -0xa(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
imul   $0x25,%eax,%eax
mov    %ax,-0xa(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <hashStr+0x15>
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashStr>:
mov    (%rdi),%cl
test   %cl,%cl
je     1127 <hashStr+0x27>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
add    %ecx,%eax
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,4),%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hashStr+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define zeroext i16 @hashStr(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
%4 = alloca i32
store i8* %0, i8** %2
store i16 0, i16* %3
store i32 0, i32* %4
br label %5
5: ; preds = %28, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %31
13: ; preds = %5
%14 = load i8*, i8** %2
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = load i16, i16* %3
%21 = zext i16 %20 to i32
%22 = add nsw i32 %21, %19
%23 = trunc i32 %22 to i16
store i16 %23, i16* %3
%24 = load i16, i16* %3
%25 = zext i16 %24 to i32
%26 = mul nsw i32 %25, 37
%27 = trunc i32 %26 to i16
store i16 %27, i16* %3
br label %28
28: ; preds = %13
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %5
31: ; preds = %5
%32 = load i16, i16* %3
ret i16 %32
}

LLVM IR (-O2):
define zeroext i16 @hashStr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %11, %4 ], [ 0, %1 ]
%6 = phi i8 [ %13, %4 ], [ %2, %1 ]
%7 = phi i16 [ %10, %4 ], [ 0, %1 ]
%8 = sext i8 %6 to i16
%9 = add i16 %7, %8
%10 = mul i16 %9, 37
%11 = add nuw nsw i64 %5, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i16 [ 0, %1 ], [ %10, %4 ]
ret i16 %16
}
/* Type definitions */
struct stack_st_OPENSSL_BLOCK {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
scalar_t__ OPENSSL_sk_dup(int /*<<< orphan*/ const *);
struct stack_st_OPENSSL_BLOCK *
sk_OPENSSL_BLOCK_dup(const struct stack_st_OPENSSL_BLOCK *sk) {
  return (struct stack_st_OPENSSL_BLOCK *)OPENSSL_sk_dup(
      (const OPENSSL_STACK *)sk);
}


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

x86 assembly (clang, -O2):
<sk_OPENSSL_BLOCK_dup>:
jmp    1030 <OPENSSL_sk_dup@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define %struct.stack_st_OPENSSL_BLOCK* @sk_OPENSSL_BLOCK_dup(%struct.stack_st_OPENSSL_BLOCK* %0) {
%2 = alloca %struct.stack_st_OPENSSL_BLOCK*
store %struct.stack_st_OPENSSL_BLOCK* %0, %struct.stack_st_OPENSSL_BLOCK** %2
%3 = load %struct.stack_st_OPENSSL_BLOCK*, %struct.stack_st_OPENSSL_BLOCK** %2
%4 = bitcast %struct.stack_st_OPENSSL_BLOCK* %3 to i32*
%5 = call i64 @OPENSSL_sk_dup(i32* %4)
%6 = inttoptr i64 %5 to %struct.stack_st_OPENSSL_BLOCK*
ret %struct.stack_st_OPENSSL_BLOCK* %6
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define %struct.stack_st_OPENSSL_BLOCK* @sk_OPENSSL_BLOCK_dup(%struct.stack_st_OPENSSL_BLOCK* %0) {
%2 = getelementptr %struct.stack_st_OPENSSL_BLOCK, %struct.stack_st_OPENSSL_BLOCK* %0, i64 0, i32 0
%3 = tail call i64 @OPENSSL_sk_dup(i32* %2)
%4 = inttoptr i64 %3 to %struct.stack_st_OPENSSL_BLOCK*
ret %struct.stack_st_OPENSSL_BLOCK* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void mapdelete(char *key, void *val) { printf("%s: %s\n", key, (char *)val); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"%s: %s\0A\00"
define void @mapdelete(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 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
define void @mapdelete(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
int min(int a, int b) {
  if (a < b)
    return (a);
  else
    return (b);
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1121 <min+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <min+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int nibble(const char c) {
  static char tab[] = {0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  -1, -1,
                       -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15};
  if (c < '0' || c > 'F')
    return -1;
  else
    return tab[c - '0'];
}


x86 assembly (clang, -O0):
<nibble>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1124 <nibble+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jle    1130 <nibble+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1148 <nibble+0x48>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
movslq %eax,%rcx
lea    0x2eef(%rip),%rax
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nibble>:
lea    -0x47(%rdi),%ecx
mov    $0xffffffff,%eax
cmp    $0xe9,%cl
jb     111f <nibble+0x1f>
movzbl %dil,%eax
add    $0xffffffd0,%eax
lea    0xee5(%rip),%rcx
movsbl (%rax,%rcx,1),%eax
ret

LLVM IR (-O0):
@nibble.tab = internal global [23 x i8] c"\00\01\02\03\04\05\06\07\08\09\FF\FF\FF\FF\FF\FF\FF\0A\0B\0C\0D\0E\0F"
define i32 @nibble(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 slt i32 %5, 48
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sgt i32 %9, 70
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 -1, i32* %2
br label %20
12: ; preds = %7
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %14, 48
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [23 x i8], [23 x i8]* @nibble.tab, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
store i32 %19, i32* %2
br label %20
20: ; preds = %12, %11
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
@nibble.tab = internal unnamed_addr constant [23 x i8] c"\00\01\02\03\04\05\06\07\08\09\FF\FF\FF\FF\FF\FF\FF\0A\0B\0C\0D\0E\0F"
define i32 @nibble(i8 signext %0) {
%2 = add i8 %0, -71
%3 = icmp ult i8 %2, -23
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = zext i8 %0 to i64
%6 = add nuw nsw i64 %5, 4294967248
%7 = and i64 %6, 4294967295
%8 = getelementptr inbounds [23 x i8], [23 x i8]* @nibble.tab, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
br label %11
11: ; preds = %1, %4
%12 = phi i32 [ %10, %4 ], [ -1, %1 ]
ret i32 %12
}
int main(int argc, char **argv) {
  for (int i = 0; i < 999999999; i++)
    test((int[]){1, 2, 3, 4, 9, 8, 7, 6}, 8);
  sleep(8);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3b9ac9ff,-0x14(%rbp)
jge    1194 <main+0x74>
mov    0x2edf(%rip),%rax
mov    %rax,-0x34(%rbp)
mov    0x2edc(%rip),%rax
mov    %rax,-0x2c(%rbp)
mov    0x2ed9(%rip),%rax
mov    %rax,-0x24(%rbp)
mov    0x2ed6(%rip),%rax
mov    %rax,-0x1c(%rbp)
lea    -0x34(%rbp),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1040 <test@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
mov    $0x8,%edi
mov    $0x0,%al
call   1030 <sleep@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
mov    $0x3b9ac9ff,%ebp
mov    %rsp,%rbx
xchg   %ax,%ax
movups 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movups 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <test@plt>
add    $0xffffffff,%ebp
jne    1130 <main+0x10>
mov    $0x8,%edi
xor    %eax,%eax
call   1030 <sleep@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@constinit = private global [8 x i32] [i32 1, i32 2, i32 3, i32 4, i32 9, i32 8, i32 7, i32 6]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [8 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %8
8: ; preds = %16, %2
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 999999999
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = getelementptr inbounds [8 x i32], [8 x i32]* %7, i64 0, i64 0
%13 = bitcast [8 x i32]* %7 to i8*
%14 = getelementptr inbounds [8 x i32], [8 x i32]* %7, i64 0, i64 0
%15 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @test to i32 (i32*, i32, ...)*)(i32* %14, i32 8)
br label %16
16: ; preds = %11
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
br label %8
19: ; preds = %8
%20 = call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 8)
ret i32 0
}

LLVM IR (-O2):
@constinit = [8 x i32] [i32 1, i32 2, i32 3, i32 4, i32 9, i32 8, i32 7, i32 6]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [8 x i32]
%4 = bitcast [8 x i32]* %3 to i8*
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
br label %8
6: ; preds = %8
%7 = call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 8)
ret i32 0
8: ; preds = %2, %8
%9 = phi i32 [ 0, %2 ], [ %11, %8 ]
%10 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @test to i32 (i32*, i32, ...)*)(i32* %5, i32 8)
%11 = add nuw nsw i32 %9, 1
%12 = icmp eq i32 %11, 999999999
br i1 %12, label %6, label %8
}
int Palindromes_aba(int l) {
  int p = l;
  for (l /= 10; l; l /= 10)
    p = p * 10 + l % 10;
  return p;
}


x86 assembly (clang, -O0):
<Palindromes_aba>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1152 <Palindromes_aba+0x52>
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    111b <Palindromes_aba+0x1b>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Palindromes_aba>:
lea    0x9(%rdi),%eax
cmp    $0x13,%eax
jae    110b <Palindromes_aba+0xb>
mov    %edi,%eax
ret
mov    %edi,%eax
nopl   (%rax)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rcx
mov    %rcx,%r9
shr    $0x3f,%r9
sar    $0x22,%rcx
lea    (%rcx,%r9,1),%edi
lea    (%rax,%rax,4),%r8d
movslq %edi,%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rax
add    %edx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
lea    (%rsi,%r8,2),%eax
add    %r9d,%ecx
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <Palindromes_aba+0x10>
ret

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

LLVM IR (-O2):
define i32 @Palindromes_aba(i32 %0) {
%2 = add i32 %0, 9
%3 = icmp ult i32 %2, 19
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %0, %1 ]
%6 = phi i32 [ %10, %4 ], [ %0, %1 ]
%7 = sdiv i32 %5, 10
%8 = mul nsw i32 %6, 10
%9 = srem i32 %7, 10
%10 = add nsw i32 %8, %9
%11 = add nsw i32 %7, 9
%12 = icmp ult i32 %11, 19
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i32 [ %0, %1 ], [ %10, %4 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ GPIOPadConfigSet(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                    int);
void GPIOPinTypePECIRx(uint32_t ui32Port, uint8_t ui8Pins) {
  ;
  GPIODirModeSet(ui32Port, ui8Pins, 0x00000000);
  GPIOPadConfigSet(ui32Port, ui8Pins, 0x00000001, 0x00000000);
}


x86 assembly (clang, -O0):
<GPIOPinTypePECIRx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1040 <GPIODirModeSet@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypePECIRx>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edx,%edx
call   1040 <GPIODirModeSet@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

LLVM IR (-O0):
define void @GPIOPinTypePECIRx(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 = call i32 @GPIODirModeSet(i32 %5, i32 %6, i32 0)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @GPIOPadConfigSet(i32 %8, i32 %9, i32 1, i32 0)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypePECIRx(i32 %0, i32 %1) {
%3 = tail call i32 @GPIODirModeSet(i32 %0, i32 %1, i32 0)
%4 = tail call i32 @GPIOPadConfigSet(i32 %0, i32 %1, i32 1, i32 0)
ret void
}
int _not_null_failed_test_case(int option, int reset) {
  static int count = 0;
  if (reset)
    count = option;
  else
    count += option;
  return count;
}


x86 assembly (clang, -O0):
<_not_null_failed_test_case>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1122 <_not_null_failed_test_case+0x22>
mov    -0x4(%rbp),%eax
mov    %eax,0x2f07(%rip)
jmp    1131 <_not_null_failed_test_case+0x31>
mov    -0x4(%rbp),%eax
add    0x2ef9(%rip),%eax
mov    %eax,0x2ef3(%rip)
mov    0x2eed(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_not_null_failed_test_case>:
xor    %eax,%eax
test   %esi,%esi
jne    110c <_not_null_failed_test_case+0xc>
mov    0x2f18(%rip),%eax
add    %edi,%eax
mov    %eax,0x2f10(%rip)
ret

LLVM IR (-O0):
@_not_null_failed_test_case.count = internal global i32 0
define i32 @_not_null_failed_test_case(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32, i32* %3
store i32 %8, i32* @_not_null_failed_test_case.count
br label %13
9: ; preds = %2
%10 = load i32, i32* %3
%11 = load i32, i32* @_not_null_failed_test_case.count
%12 = add nsw i32 %11, %10
store i32 %12, i32* @_not_null_failed_test_case.count
br label %13
13: ; preds = %9, %7
%14 = load i32, i32* @_not_null_failed_test_case.count
ret i32 %14
}

LLVM IR (-O2):
@_not_null_failed_test_case.count = internal unnamed_addr global i32 0
define i32 @_not_null_failed_test_case(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = load i32, i32* @_not_null_failed_test_case.count
%5 = select i1 %3, i32 %4, i32 0
%6 = add nsw i32 %5, %0
store i32 %6, i32* @_not_null_failed_test_case.count
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ ffi_type;

/* Variables and functions */
int /*<<< orphan*/ ffi_type_double;
int /*<<< orphan*/ ffi_type_float;
int /*<<< orphan*/ ffi_type_sint64;
int /*<<< orphan*/ ffi_type_uint;
ffi_type *j2ffi(char type) {
  ffi_type *ftype;
  switch (type) {
  case 'J':
    ftype = &ffi_type_sint64;
    break;
  case 'D':
    ftype = &ffi_type_double;
    break;
  case 'F':
    ftype = &ffi_type_float;
    break;
  default:
    ftype = &ffi_type_uint;
  }
  return ftype;
}


x86 assembly (clang, -O0):
<j2ffi>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x44,%eax
je     1151 <j2ffi+0x51>
jmp    111f <j2ffi+0x1f>
mov    -0x14(%rbp),%eax
sub    $0x46,%eax
je     1161 <j2ffi+0x61>
jmp    1130 <j2ffi+0x30>
mov    -0x14(%rbp),%eax
sub    $0x4a,%eax
jne    1171 <j2ffi+0x71>
jmp    1141 <j2ffi+0x41>
mov    0x2e98(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    117c <j2ffi+0x7c>
mov    0x2e68(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    117c <j2ffi+0x7c>
mov    0x2e70(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    117c <j2ffi+0x7c>
mov    0x2e58(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<j2ffi>:
add    $0xffffffbc,%edi
cmp    $0x6,%edi
ja     1117 <j2ffi+0x17>
movslq %edi,%rax
lea    0x2cfe(%rip),%rcx
mov    (%rcx,%rax,8),%rax
ret
mov    0x2ec2(%rip),%rax
ret

LLVM IR (-O0):
@ffi_type_sint64 = global i32 0
@ffi_type_double = global i32 0
@ffi_type_float = global i32 0
@ffi_type_uint = global i32 0
define i32* @j2ffi(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32*
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %9 [
i32 74, label %6
i32 68, label %7
i32 70, label %8
]
6: ; preds = %1
store i32* @ffi_type_sint64, i32** %3
br label %10
7: ; preds = %1
store i32* @ffi_type_double, i32** %3
br label %10
8: ; preds = %1
store i32* @ffi_type_float, i32** %3
br label %10
9: ; preds = %1
store i32* @ffi_type_uint, i32** %3
br label %10
10: ; preds = %9, %8, %7, %6
%11 = load i32*, i32** %3
ret i32* %11
}

LLVM IR (-O2):
@ffi_type_sint64 = global i32 0
@ffi_type_double = global i32 0
@ffi_type_float = global i32 0
@ffi_type_uint = global i32 0
@switch.table.j2ffi = [7 x i32*] [i32* @ffi_type_double, i32* @ffi_type_uint, i32* @ffi_type_float, i32* @ffi_type_uint, i32* @ffi_type_uint, i32* @ffi_type_uint, i32* @ffi_type_sint64]
define i32* @j2ffi(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -68
%4 = icmp ult i32 %3, 7
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [7 x i32*], [7 x i32*]* @switch.table.j2ffi, i64 0, i64 %6
%8 = load i32*, i32** %7
br label %9
9: ; preds = %1, %5
%10 = phi i32* [ %8, %5 ], [ @ffi_type_uint, %1 ]
ret i32* %10
}
/* Variables and functions */
scalar_t__ COND_HI();
int /*<<< orphan*/ EA_AL_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_shi_8_al(void) { m68ki_write_8(EA_AL_8(), COND_HI() ? 0xff : 0); }


x86 assembly (clang, -O0):
<m68k_op_shi_8_al>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_AL_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_HI@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_shi_8_al>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_AL_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_HI@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_shi_8_al() {
%1 = call i32 (...) @EA_AL_8()
%2 = call i64 (...) @COND_HI()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_shi_8_al() {
%1 = tail call i32 (...) @EA_AL_8()
%2 = tail call i64 (...) @COND_HI()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
int cmp(const void *x, const void *y) { return *(long *)x - *(long *)y; }


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

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

LLVM IR (-O0):
define i32 @cmp(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 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = sub nsw i64 %7, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = sub nsw i64 %4, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}