xunge/DecIR huggingface dataset:
void libbcg729_init() {}


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

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

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

LLVM IR (-O2):
define void @libbcg729_init() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ hash_uint32(scalar_t__);
uint32_t noise1D(uint32_t x, uint32_t seed) { return hash_uint32(x + seed); }


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

x86 assembly (clang, -O2):
<noise1D>:
add    %rsi,%rdi
jmp    1030 <hash_uint32@plt>

LLVM IR (-O0):
define i64 @noise1D(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
%8 = call i64 @hash_uint32(i64 %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @noise1D(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
%4 = tail call i64 @hash_uint32(i64 %3)
ret i64 %4
}
char *tgoto(cm, destcol, destrow)
char *cm;
int destcol;
int destrow;
{
  static char buf[30];
  sprintf(buf, "\033[%d;%dH", destrow + 1, destcol + 1);
  return buf;
}


x86 assembly (clang, -O0):
<tgoto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
add    $0x1,%edx
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
lea    0x2f0b(%rip),%rdi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
lea    0x2ef6(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tgoto>:
push   %rbx
add    $0x1,%edx
lea    0x1(%rsi),%ecx
lea    0x2f22(%rip),%rbx
lea    0xedb(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@tgoto.buf = internal global [30 x i8] zeroinitializer
@.str = [9 x i8] c"\1B[%d;%dH\00"
define i8* @tgoto(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 1
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 1
%11 = call i32 (i8*, i8*, ...) @sprintf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @tgoto.buf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10)
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @tgoto.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@tgoto.buf = internal global [30 x i8] zeroinitializer
@.str = [9 x i8] c"\1B[%d;%dH\00"
define i8* @tgoto(i8* nocapture readnone %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, 1
%5 = add nsw i32 %1, 1
%6 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @tgoto.buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @tgoto.buf, i64 0, i64 0)
}
void REMR3NotifyCodePageChanged(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @g_date_valid_year() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Helo world!\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 = [13 x i8] c"Helo world!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Helo world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int isxdigit(int c) {
  if ((c >= 48 && c <= 57) || (c >= 65 && c <= 70) || (c >= 97 && c <= 102))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     111b <isxdigit+0x1b>
cmpl   $0x39,-0x8(%rbp)
jle    1143 <isxdigit+0x43>
cmpl   $0x41,-0x8(%rbp)
jl     112f <isxdigit+0x2f>
cmpl   $0x46,-0x8(%rbp)
jle    1143 <isxdigit+0x43>
cmpl   $0x61,-0x8(%rbp)
jl     114f <isxdigit+0x4f>
cmpl   $0x66,-0x8(%rbp)
jg     114f <isxdigit+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <isxdigit+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
setb   %al
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
cmp    $0x6,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void Handle(int sig) {
  printf("Got SEGV\n");
  fflush(stdout);
  exit(1);
}


x86 assembly (clang, -O0):
<Handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O0):
@.str = [10 x i8] c"Got SEGV\0A\00"
@stdout = global i32 0
define void @Handle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [9 x i8] c"Got SEGV\00"
define void @Handle(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void printerr(char *errmsg) {
  int i;
  i = 0;
  while (errmsg[i]) {
    write(2, &errmsg[i], 1);
    i++;
  }
}


x86 assembly (clang, -O0):
<printerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     115d <printerr+0x4d>
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
add    %rax,%rsi
mov    $0x2,%edi
mov    $0x1,%edx
call   1030 <write@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <printerr+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printerr>:
push   %rbx
cmpb   $0x0,(%rdi)
je     113c <printerr+0x2c>
mov    %rdi,%rbx
nopl   0x0(%rax)
mov    $0x2,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1120 <printerr+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @printerr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = tail call i32 @write(i32 2, i8* %6, i32 1)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
scalar_t__ isdigit(int);
int isxdigit(int c) {
  if (isdigit(c)) {
    return (1);
  } else if ((c >= 'A') && (c <= 'F')) {
    return (1);
  } else if ((c >= 'a') && (c <= 'f')) {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1139 <isxdigit+0x29>
movl   $0x1,-0x4(%rbp)
jmp    118a <isxdigit+0x7a>
cmpl   $0x41,-0x8(%rbp)
jl     1159 <isxdigit+0x49>
cmpl   $0x46,-0x8(%rbp)
jg     1159 <isxdigit+0x49>
movl   $0x1,-0x4(%rbp)
jmp    118a <isxdigit+0x7a>
cmpl   $0x61,-0x8(%rbp)
jl     1179 <isxdigit+0x69>
cmpl   $0x66,-0x8(%rbp)
jg     1179 <isxdigit+0x69>
movl   $0x1,-0x4(%rbp)
jmp    118a <isxdigit+0x7a>
jmp    117e <isxdigit+0x6e>
jmp    1183 <isxdigit+0x73>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
and    $0xffffffdf,%ebx
add    $0xffffffbf,%ebx
cmp    $0x6,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @isdigit(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %25
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp sge i32 %9, 65
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp sle i32 %12, 70
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 1, i32* %2
br label %25
15: ; preds = %11, %8
%16 = load i32, i32* %3
%17 = icmp sge i32 %16, 97
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i32, i32* %3
%20 = icmp sle i32 %19, 102
br i1 %20, label %21, label %22
21: ; preds = %18
store i32 1, i32* %2
br label %25
22: ; preds = %18, %15
br label %23
23: ; preds = %22
br label %24
24: ; preds = %23
store i32 0, i32* %2
br label %25
25: ; preds = %24, %21, %14, %7
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) { printf("Usage: version [-h]\n"); }


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"Usage: version [-h]\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_tail(void) {
  printf("\n");
  printf("#endif\n");
}


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

x86 assembly (clang, -O2):
<print_tail>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

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

LLVM IR (-O2):
@str = [7 x i8] c"#endif\00"
define void @print_tail() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int injected_token();
int liberty_parser2_lex();
int /*<<< orphan*/ token_q_empty();
int liberty_parser_lex(void) {
  if (!token_q_empty()) {
    return injected_token();
  } else
    return liberty_parser2_lex();
}


x86 assembly (clang, -O0):
<liberty_parser_lex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <token_q_empty@plt>
cmp    $0x0,%eax
jne    1157 <liberty_parser_lex+0x27>
mov    $0x0,%al
call   1050 <injected_token@plt>
mov    %eax,-0x4(%rbp)
jmp    1161 <liberty_parser_lex+0x31>
mov    $0x0,%al
call   1030 <liberty_parser2_lex@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<liberty_parser_lex>:
push   %rax
xor    %eax,%eax
call   1040 <token_q_empty@plt>
test   %eax,%eax
je     1144 <liberty_parser_lex+0x14>
xor    %eax,%eax
pop    %rcx
jmp    1030 <liberty_parser2_lex@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <injected_token@plt>

LLVM IR (-O0):
define i32 @liberty_parser_lex() {
%1 = alloca i32
%2 = call i32 (...) @token_q_empty()
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 (...) @injected_token()
store i32 %5, i32* %1
br label %8
6: ; preds = %0
%7 = call i32 (...) @liberty_parser2_lex()
store i32 %7, i32* %1
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @liberty_parser_lex() {
%1 = tail call i32 (...) @token_q_empty()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @injected_token()
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @liberty_parser2_lex()
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ %6, %5 ], [ %4, %3 ]
ret i32 %8
}
long double expm1l(long double x) {
  if (fabsl(x) < 6.9314718055994530941723E-1L) {
    x *= 1.4426950408889634073599E0L;
    __asm__("f2xm1" : "=t"(x) : "0"(x));
    return x;
  } else
    return expl(x) - 1.0L;
}


x86 assembly (clang, -O0):
<expm1l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fabs
fldt   0xed7(%rip)
fucomip %st(1),%st
fstp   %st(0)
jbe    1159 <expm1l+0x49>
jmp    1138 <expm1l+0x28>
fldt   -0x20(%rbp)
fldt   0xecf(%rip)
fmulp  %st,%st(1)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
f2xm1
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fstpt  -0x10(%rbp)
jmp    116f <expm1l+0x5f>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <expl@plt>
fld1
fchs
faddp  %st,%st(1)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expm1l>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fld    %st(0)
fabs
fldt   0xede(%rip)
fucomip %st(1),%st
fstp   %st(0)
jbe    1137 <expm1l+0x27>
fldt   0xee2(%rip)
fmulp  %st,%st(1)
f2xm1
add    $0x18,%rsp
ret
fstpt  (%rsp)
call   1030 <expl@plt>
fld1
fchs
faddp  %st,%st(1)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @expm1l(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
%4 = load x86_fp80, x86_fp80* %3
%5 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %4)
%6 = fcmp olt x86_fp80 %5, 0xK3FFEB17217F7D1CF79AC
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load x86_fp80, x86_fp80* %3
%9 = fmul x86_fp80 %8, 0xK3FFFB8AA3B295C17F0BC
store x86_fp80 %9, x86_fp80* %3
%10 = load x86_fp80, x86_fp80* %3
%11 = call x86_fp80 asm "f2xm1", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %10)
store x86_fp80 %11, x86_fp80* %3
%12 = load x86_fp80, x86_fp80* %3
store x86_fp80 %12, x86_fp80* %2
br label %17
13: ; preds = %1
%14 = load x86_fp80, x86_fp80* %3
%15 = call x86_fp80 @expl(x86_fp80 %14)
%16 = fsub x86_fp80 %15, 0xK3FFF8000000000000000
store x86_fp80 %16, x86_fp80* %2
br label %17
17: ; preds = %13, %7
%18 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %18
}

LLVM IR (-O2):
define x86_fp80 @expm1l(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.fabs.f80(x86_fp80 %0)
%3 = fcmp olt x86_fp80 %2, 0xK3FFEB17217F7D1CF79AC
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = fmul x86_fp80 %0, 0xK3FFFB8AA3B295C17F0BC
%6 = tail call x86_fp80 asm "f2xm1", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %5)
br label %10
7: ; preds = %1
%8 = tail call x86_fp80 @expl(x86_fp80 %0)
%9 = fadd x86_fp80 %8, 0xKBFFF8000000000000000
br label %10
10: ; preds = %7, %4
%11 = phi x86_fp80 [ %6, %4 ], [ %9, %7 ]
ret x86_fp80 %11
}
void rop3_225_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D | S;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


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

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

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

LLVM IR (-O2):
define void @rop3_225_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %1
%6 = xor i8 %5, %2
%7 = xor i8 %6, -1
%8 = xor i8 %2, -1
%9 = or i8 %8, %1
%10 = and i8 %9, %7
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %4
%14 = or i8 %10, %13
store i8 %14, i8* %0
ret void
}
int obj3func1(int a __attribute__((unused))) { return 44; }


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

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

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

LLVM IR (-O2):
define i32 @obj3func1(i32 %0) {
ret i32 44
}
/* Variables and functions */
int /*<<< orphan*/ outp(unsigned int, unsigned int);
void out_word(unsigned int p, unsigned int d) {
  outp(p, d & 0xff);
  outp(p + 1, (d >> 8) & 0xff);
}


x86 assembly (clang, -O0):
<out_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
and    $0xff,%esi
call   1030 <outp@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
shr    $0x8,%esi
and    $0xff,%esi
call   1030 <outp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out_word>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%eax
mov    %edi,%ebx
movzbl %al,%esi
mov    %eax,%ebp
call   1030 <outp@plt>
add    $0x1,%ebx
mov    %ebp,%eax
movzbl %ah,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <outp@plt>

LLVM IR (-O0):
define void @out_word(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 = and i32 %6, 255
%8 = call i32 @outp(i32 %5, i32 %7)
%9 = load i32, i32* %3
%10 = add i32 %9, 1
%11 = load i32, i32* %4
%12 = lshr i32 %11, 8
%13 = and i32 %12, 255
%14 = call i32 @outp(i32 %10, i32 %13)
ret void
}

LLVM IR (-O2):
define void @out_word(i32 %0, i32 %1) {
%3 = and i32 %1, 255
%4 = tail call i32 @outp(i32 %0, i32 %3)
%5 = add i32 %0, 1
%6 = lshr i32 %1, 8
%7 = and i32 %6, 255
%8 = tail call i32 @outp(i32 %5, i32 %7)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void st103_set_rx_buf_size(uint8_t ep_num, uint16_t size) {
  uint16_t *reg_p = (uint16_t *)((0x40006000UL) + (ep_num * 8 + 6) * 2);
  uint16_t value;
  if (size <= 62)
    value = (size & 0x3e) << 9;
  else
    value = 0x8000 | (((size >> 5) - 1) << 10);
  *reg_p = value;
}


x86 assembly (clang, -O0):
<st103_set_rx_buf_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
add    $0x6,%eax
shl    $0x1,%eax
cltq
add    $0x40006000,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x3e,-0x8(%rbp)
jg     113d <st103_set_rx_buf_size+0x3d>
mov    -0x8(%rbp),%eax
and    $0x3e,%eax
shl    $0x9,%eax
mov    %eax,-0x14(%rbp)
jmp    1151 <st103_set_rx_buf_size+0x51>
mov    -0x8(%rbp),%eax
sar    $0x5,%eax
sub    $0x1,%eax
shl    $0xa,%eax
or     $0x8000,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<st103_set_rx_buf_size>:
cmp    $0x3e,%esi
jg     110d <st103_set_rx_buf_size+0xd>
and    $0x3e,%esi
shl    $0x9,%esi
jmp    1122 <st103_set_rx_buf_size+0x22>
shl    $0x5,%esi
add    $0xfffffc00,%esi
and    $0xffff7c00,%esi
or     $0x8000,%esi
shl    $0x4,%edi
movslq %edi,%rax
mov    %esi,0x4000600c(%rax)
ret

LLVM IR (-O0):
define void @st103_set_rx_buf_size(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = mul nsw i32 %7, 8
%9 = add nsw i32 %8, 6
%10 = mul nsw i32 %9, 2
%11 = sext i32 %10 to i64
%12 = add i64 1073766400, %11
%13 = inttoptr i64 %12 to i32*
store i32* %13, i32** %5
%14 = load i32, i32* %4
%15 = icmp sle i32 %14, 62
br i1 %15, label %16, label %20
16: ; preds = %2
%17 = load i32, i32* %4
%18 = and i32 %17, 62
%19 = shl i32 %18, 9
store i32 %19, i32* %6
br label %26
20: ; preds = %2
%21 = load i32, i32* %4
%22 = ashr i32 %21, 5
%23 = sub nsw i32 %22, 1
%24 = shl i32 %23, 10
%25 = or i32 32768, %24
store i32 %25, i32* %6
br label %26
26: ; preds = %20, %16
%27 = load i32, i32* %6
%28 = load i32*, i32** %5
store i32 %27, i32* %28
ret void
}

LLVM IR (-O2):
define void @st103_set_rx_buf_size(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 63
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = shl i32 %1, 9
%6 = and i32 %5, 31744
br label %12
7: ; preds = %2
%8 = shl i32 %1, 5
%9 = add i32 %8, -1024
%10 = and i32 %9, -33792
%11 = or i32 %10, 32768
br label %12
12: ; preds = %7, %4
%13 = phi i32 [ %6, %4 ], [ %11, %7 ]
%14 = shl i32 %0, 4
%15 = or i32 %14, 12
%16 = sext i32 %15 to i64
%17 = add nsw i64 %16, 1073766400
%18 = inttoptr i64 %17 to i32*
store i32 %13, i32* %18
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cyan(char *);
int /*<<< orphan*/ printColor(int /*<<< orphan*/);
void cmCyan(char *str) { printColor(cyan(str)); }


x86 assembly (clang, -O0):
<cmCyan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <cyan@plt>
mov    %eax,%edi
call   1030 <printColor@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @cmCyan(i8* %0) {
%2 = tail call i32 @cyan(i8* %0)
%3 = tail call i32 @printColor(i32 %2)
ret void
}
/* Variables and functions */
int creat(char *, int);
int creat_(char filnam[], int *mode) { return (creat(filnam, *mode)); }


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

x86 assembly (clang, -O2):
<creat_>:
mov    (%rsi),%esi
jmp    1030 <creat@plt>

LLVM IR (-O0):
define i32 @creat_(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 = load i32, i32* %6
%8 = call i32 @creat(i8* %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @creat_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @creat(i8* %0, i32 %3)
ret i32 %4
}
/* Variables and functions */
char *ltoa_wp(int, char *, int, int /*<<< orphan*/, char);
char *itoa(int val, char *buffer, int base) {
  return ltoa_wp(val, buffer, base, 0, ' ');
}


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

x86 assembly (clang, -O2):
<itoa>:
xor    %ecx,%ecx
mov    $0x20,%r8d
jmp    1030 <ltoa_wp@plt>

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

LLVM IR (-O2):
define i8* @itoa(i32 %0, i8* %1, i32 %2) {
%4 = tail call i8* @ltoa_wp(i32 %0, i8* %1, i32 %2, i32 0, i8 signext 32)
ret i8* %4
}
int getCellIdAbove(int cellId) {
  if (cellId < 8)
    return -1;
  return cellId - 8;
}


x86 assembly (clang, -O0):
<getCellIdAbove>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    111d <getCellIdAbove+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1126 <getCellIdAbove+0x26>
mov    -0x8(%rbp),%eax
sub    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCellIdAbove>:
lea    -0x8(%rdi),%ecx
cmp    $0x8,%edi
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @getCellIdAbove(i32 %0) {
%2 = icmp slt i32 %0, 8
%3 = add nsw i32 %0, -8
%4 = select i1 %2, i32 -1, i32 %3
ret i32 %4
}
unsigned char inportb(unsigned int port) {
  unsigned char ret;
  asm volatile("inb %%dx,%%al" : "=a"(ret) : "d"(port));
  return ret;
}


x86 assembly (clang, -O0):
<inportb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
in     (%dx),%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i8 @inportb(i32 %0) {
%2 = tail call i8 asm sideeffect "inb %dx,%al", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret i8 %2
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_peer_get_machine_name(int fd, char **machine) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_peer_get_machine_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_peer_get_machine_name(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ ptrdiff_t;

/* Variables and functions */
int /*<<< orphan*/ ff_bfin_put_pixels8uc(int /*<<< orphan*/ *,
                                         int /*<<< orphan*/ const *,
                                         int /*<<< orphan*/ const *,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int);
void bfin_put_pixels8_y2(uint8_t *block, const uint8_t *pixels,
                         ptrdiff_t line_size, int h) {
  ff_bfin_put_pixels8uc(block, pixels, pixels + line_size, line_size, line_size,
                        h);
}


x86 assembly (clang, -O0):
<bfin_put_pixels8_y2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    -0x14(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
call   1030 <ff_bfin_put_pixels8uc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfin_put_pixels8_y2>:
mov    %ecx,%r9d
movslq %edx,%rcx
lea    (%rsi,%rcx,4),%rdx
mov    %ecx,%r8d
jmp    1030 <ff_bfin_put_pixels8uc@plt>

LLVM IR (-O0):
define void @bfin_put_pixels8_y2(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %7
%16 = load i32, i32* %7
%17 = load i32, i32* %8
%18 = call i32 @ff_bfin_put_pixels8uc(i32* %9, i32* %10, i32* %14, i32 %15, i32 %16, i32 %17)
ret void
}

LLVM IR (-O2):
define void @bfin_put_pixels8_y2(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i32, i32* %1, i64 %5
%7 = tail call i32 @ff_bfin_put_pixels8uc(i32* %0, i32* %1, i32* %6, i32 %2, i32 %2, i32 %3)
ret void
}
cbuf5(f, n) { return (cbuf(f, n, 5)); }


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

x86 assembly (clang, -O2):
<cbuf5>:
mov    $0x5,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf5(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 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %5, i32 %6, i32 5)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cbuf5(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 5)
ret i32 %3
}
void square_num(void *i) {
  int *value = i;
  (*value) *= (*value);
}


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

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

LLVM IR (-O0):
define void @square_num(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, %7
store i32 %10, i32* %8
ret void
}

LLVM IR (-O2):
define void @square_num(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, %3
store i32 %4, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int foo() {
  printf("in foo\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"in foo\00"
define i32 @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int globus_hashtable_int_keyeq(void *integer1, void *integer2) {
  return (integer1 == integer2);
}


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

x86 assembly (clang, -O2):
<globus_hashtable_int_keyeq>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @globus_hashtable_int_keyeq(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 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @globus_hashtable_int_keyeq(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rotate32(uint32_t x, int r) { return (x >> r) | (x << (32 - r)); }


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

x86 assembly (clang, -O2):
<rotate32>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
neg    %cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotate32(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 = ashr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rotate32(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
void plat_trigger_vibrate(int is_strong) {}


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

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

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

LLVM IR (-O2):
define void @plat_trigger_vibrate(i32 %0) {
ret void
}
int test_10(unsigned char x, int y, int z) { return (x << 3) & -111 ? y : z; }


x86 assembly (clang, -O0):
<test_10>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x3,%eax
and    $0xffffff91,%eax
cmp    $0x0,%eax
je     112e <test_10+0x2e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <test_10+0x34>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_10>:
mov    %esi,%eax
test   $0xf2,%dil
cmove  %edx,%eax
ret

LLVM IR (-O0):
define i32 @test_10(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 3
%10 = and i32 %9, -111
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = load i32, i32* %5
br label %16
14: ; preds = %3
%15 = load i32, i32* %6
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @test_10(i8 zeroext %0, i32 %1, i32 %2) {
%4 = and i8 %0, -14
%5 = icmp eq i8 %4, 0
%6 = select i1 %5, i32 %2, i32 %1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
void main() {
  char c;
  printf("\nTiap Huruf dari Jawaban\n");
  scanf("%c", &c);
  printf("Clue : %c is %d", c, c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x1(%rbp),%esi
movsbl -0x1(%rbp),%edx
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%edx
lea    0xea9(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [26 x i8] c"\0ATiap Huruf dari Jawaban\0A\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [16 x i8] c"Clue : %c is %d\00"
define void @main() {
%1 = alloca i8
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %7)
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [16 x i8] c"Clue : %c is %d\00"
@str = [25 x i8] c"\0ATiap Huruf dari Jawaban\00"
define void @main() {
%1 = alloca i8
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(int /*<<< orphan*/);
int is_digit(const char *str) {
  if (*str == '-') {
    str++;
  }
  while (*str) {
    if (!isdigit(*str++)) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1138 <is_digit+0x28>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    113d <is_digit+0x2d>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     117b <is_digit+0x6b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    1176 <is_digit+0x66>
movl   $0x0,-0x4(%rbp)
jmp    1182 <is_digit+0x72>
jmp    113d <is_digit+0x2d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_digit>:
xor    %eax,%eax
cmpb   $0x2d,(%rdi)
sete   %al
add    %rdi,%rax
nopl   0x0(%rax,%rax,1)
movsbl (%rax),%ecx
test   %ecx,%ecx
je     1126 <is_digit+0x26>
add    $0x1,%rax
add    $0xffffffd0,%ecx
cmp    $0xa,%ecx
jb     1110 <is_digit+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_digit(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 45
%4 = zext i1 %3 to i64
%5 = getelementptr i8, i8* %0, i64 %4
br label %6
6: ; preds = %10, %1
%7 = phi i8* [ %5, %1 ], [ %11, %10 ]
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = sext i8 %8 to i32
%13 = add nsw i32 %12, -48
%14 = icmp ult i32 %13, 10
br i1 %14, label %6, label %15
15: ; preds = %6, %10
%16 = phi i32 [ 0, %10 ], [ 1, %6 ]
ret i32 %16
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint64_t uint32ToUint64(uint32_t x) {
  uint64_t y = x;
  return y;
}


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

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

LLVM IR (-O0):
define i32 @uint32ToUint64(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* %3
ret i32 %5
}

LLVM IR (-O2):
define i32 @uint32ToUint64(i32 returned %0) {
ret i32 %0
}
int fun2(const int a, const int b) { return a + b; }


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

x86 assembly (clang, -O2):
<fun2>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @fun2(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
int Serialize_WriteSync(FILE *Stream, uint32_t Sync) {
  return fwrite(&Sync, 1, sizeof(uint32_t), Stream);
}


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

x86 assembly (clang, -O2):
<Serialize_WriteSync>:
push   %rax
mov    %rdi,%rcx
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x1,%esi
mov    $0x4,%edx
call   1030 <fwrite@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Serialize_WriteSync(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 = call i32 @fwrite(i32* %4, i32 1, i32 4, i32* %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @Serialize_WriteSync(i32* nocapture %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @fwrite(i32* %3, i32 1, i32 4, i32* %0)
ret i32 %4
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void TimerADCEventSet(uint32_t ui32Base, uint32_t ui32ADCEvent) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000070))) = ui32ADCEvent;
}


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

x86 assembly (clang, -O2):
<TimerADCEventSet>:
mov    %rsi,0x70(%rdi)
ret

LLVM IR (-O0):
define void @TimerADCEventSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 112
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @TimerADCEventSet(i64 %0, i64 %1) {
%3 = add i64 %0, 112
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}