xunge/DecIR huggingface dataset:
int equalsInt(const void *e1, const void *e2) {
  int e1_int = *(int *)e1;
  int e2_int = *(int *)e2;
  return e1_int == e2_int;
}


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

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

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

LLVM IR (-O2):
define i32 @equalsInt(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
unsigned avcodec_version(void) { return 0x000409; }


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

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

LLVM IR (-O0):
define i32 @avcodec_version() {
ret i32 1033
}

LLVM IR (-O2):
define i32 @avcodec_version() {
ret i32 1033
}
int test_imm_88uint16_mem(unsigned short *val) {
  return ((*val) & (0x88 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_88uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0x88,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_88uint16_mem>:
testb  $0x88,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_88uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 136
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void info_message(const char *file_name, const char *function_name,
                  const int line_number) {
  printf("Information:\tFile Name             	:[ %s ]\n", file_name);
  printf("Information:\tFunction Name         	:[ %s ]\n", function_name);
  printf("Information:\tLine Number of Function 	:[ %d ]\n", line_number);
}


x86 assembly (clang, -O0):
<info_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xf09(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<info_message>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xede(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf19(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"Information:\09File Name \09:[ %s ]\0A\00"
@.str.1 = [45 x i8] c"Information:\09Function Name \09:[ %s ]\0A\00"
@.str.2 = [47 x i8] c"Information:\09Line Number of Function \09:[ %d ]\0A\00"
define void @info_message(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %5
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = load i32, i32* %6
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"Information:\09File Name \09:[ %s ]\0A\00"
@.str.1 = [45 x i8] c"Information:\09Function Name \09:[ %s ]\0A\00"
@.str.2 = [47 x i8] c"Information:\09Line Number of Function \09:[ %d ]\0A\00"
define void @info_message(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
void *memcpy_forward(void *, void const *, unsigned int);
void *memcpy(void *dst, const void *src, unsigned size) {
  return memcpy_forward(dst, src, size);
}


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

x86 assembly (clang, -O2):
<memcpy>:
jmp    1030 <memcpy_forward@plt>

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

LLVM IR (-O2):
define i8* @memcpy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i8* @memcpy_forward(i8* %0, i8* %1, i32 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ free2(void *);
void free1(void *ptr) { free2(ptr); }


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

x86 assembly (clang, -O2):
<free1>:
jmp    1030 <free2@plt>

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

LLVM IR (-O2):
define void @free1(i8* %0) {
%2 = tail call i32 @free2(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) {
  printf("Usage: muse [OPTION]\n"
         "    --stop      Stop muse.\n"
         "    --restart   Restart muse and reload config.json.\n"
         "    --help      Print usage.\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 = [131 x i8] c"Usage: muse [OPTION]\0A --stop Stop muse.\0A --restart Restart muse and reload config.json.\0A --help Print usage.\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [130 x i8] c"Usage: muse [OPTION]\0A --stop Stop muse.\0A --restart Restart muse and reload config.json.\0A --help Print usage.\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([130 x i8], [130 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long long mstime(void) {
  struct timeval tv;
  long long mst;
  gettimeofday(&tv, NULL);
  mst = tv.tv_sec * 1000;
  mst += tv.tv_usec / 1000;
  return mst;
}


x86 assembly (clang, -O0):
<mstime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
cltq
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mstime>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq (%rsp),%rax
imul   $0x3e8,%rax,%rcx
movslq 0x4(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
cltq
add    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i64 @mstime() {
%1 = alloca %struct.timeval
%2 = alloca i64
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = sext i32 %6 to i64
store i64 %7, i64* %2
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000
%11 = sext i32 %10 to i64
%12 = load i64, i64* %2
%13 = add nsw i64 %12, %11
store i64 %13, i64* %2
%14 = load i64, i64* %2
ret i64 %14
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i64 @mstime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000
%11 = sext i32 %10 to i64
%12 = add nsw i64 %11, %7
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ intrflush(void *, int /*<<< orphan*/);
int /*<<< orphan*/ keypad(void *, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ nonl();
void *stdscr;
void *curses_open(int argc, char **argv) {
  initscr();
  cbreak();
  noecho();
  nonl();
  intrflush(stdscr, FALSE);
  keypad(stdscr, TRUE);
  return stdscr;
}


x86 assembly (clang, -O0):
<curses_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    $0x0,%al
call   1080 <noecho@plt>
mov    $0x0,%al
call   1070 <nonl@plt>
mov    0x2e56(%rip),%rax
mov    (%rax),%rdi
mov    0x2e34(%rip),%rax
mov    (%rax),%esi
call   1060 <intrflush@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%rdi
mov    0x2e2c(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
mov    0x2e26(%rip),%rax
mov    (%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curses_open>:
push   %rbx
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
xor    %eax,%eax
call   1080 <noecho@plt>
xor    %eax,%eax
call   1070 <nonl@plt>
mov    0x2e64(%rip),%rbx
mov    (%rbx),%rdi
mov    0x2e42(%rip),%rax
mov    (%rax),%esi
call   1060 <intrflush@plt>
mov    (%rbx),%rdi
mov    0x2e41(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
mov    (%rbx),%rax
pop    %rbx
ret

LLVM IR (-O0):
@stdscr = global i8* null
@FALSE = global i32 0
@TRUE = global i32 0
define i8* @curses_open(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @initscr()
%6 = call i32 (...) @cbreak()
%7 = call i32 (...) @noecho()
%8 = call i32 (...) @nonl()
%9 = load i8*, i8** @stdscr
%10 = load i32, i32* @FALSE
%11 = call i32 @intrflush(i8* %9, i32 %10)
%12 = load i8*, i8** @stdscr
%13 = load i32, i32* @TRUE
%14 = call i32 @keypad(i8* %12, i32 %13)
%15 = load i8*, i8** @stdscr
ret i8* %15
}

LLVM IR (-O2):
@stdscr = global i8* null
@FALSE = global i32 0
@TRUE = global i32 0
define i8* @curses_open(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @initscr()
%4 = tail call i32 (...) @cbreak()
%5 = tail call i32 (...) @noecho()
%6 = tail call i32 (...) @nonl()
%7 = load i8*, i8** @stdscr
%8 = load i32, i32* @FALSE
%9 = tail call i32 @intrflush(i8* %7, i32 %8)
%10 = load i8*, i8** @stdscr
%11 = load i32, i32* @TRUE
%12 = tail call i32 @keypad(i8* %10, i32 %11)
%13 = load i8*, i8** @stdscr
ret i8* %13
}
/* Variables and functions */
char ASCII_TO_LOWER(char);
void WSTRING_TO_LOWER(char *s) {
  while ((*s++ = ASCII_TO_LOWER(*s)))
    ;
}


x86 assembly (clang, -O0):
<WSTRING_TO_LOWER>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <ASCII_TO_LOWER@plt>
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1146 <WSTRING_TO_LOWER+0x36>
jmp    111c <WSTRING_TO_LOWER+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WSTRING_TO_LOWER>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
call   1030 <ASCII_TO_LOWER@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
test   %al,%al
jne    1120 <WSTRING_TO_LOWER+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @WSTRING_TO_LOWER(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = tail call signext i8 @ASCII_TO_LOWER(i8 signext %4)
%6 = getelementptr inbounds i8, i8* %3, i64 1
store i8 %5, i8* %3
%7 = icmp eq i8 %5, 0
br i1 %7, label %8, label %2
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ EVP_cleanup();
int /*<<< orphan*/ OpenSSL_add_all_ciphers();
int /*<<< orphan*/ OpenSSL_add_all_digests();
int RunTests();
int /*<<< orphan*/ SSL_library_init();
int main(void) {
  int tests_failed;
  SSL_library_init();
  OpenSSL_add_all_ciphers();
  OpenSSL_add_all_digests();
  tests_failed = RunTests();
  ERR_free_strings();
  EVP_cleanup();
  CRYPTO_cleanup_all_ex_data();
  return tests_failed;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <SSL_library_init@plt>
mov    $0x0,%al
call   1090 <OpenSSL_add_all_ciphers@plt>
mov    $0x0,%al
call   1050 <OpenSSL_add_all_digests@plt>
mov    $0x0,%al
call   1080 <RunTests@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1070 <ERR_free_strings@plt>
mov    $0x0,%al
call   1060 <EVP_cleanup@plt>
mov    $0x0,%al
call   1030 <CRYPTO_cleanup_all_ex_data@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <SSL_library_init@plt>
xor    %eax,%eax
call   1090 <OpenSSL_add_all_ciphers@plt>
xor    %eax,%eax
call   1050 <OpenSSL_add_all_digests@plt>
xor    %eax,%eax
call   1080 <RunTests@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <ERR_free_strings@plt>
xor    %eax,%eax
call   1060 <EVP_cleanup@plt>
xor    %eax,%eax
call   1030 <CRYPTO_cleanup_all_ex_data@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @SSL_library_init()
%4 = call i32 (...) @OpenSSL_add_all_ciphers()
%5 = call i32 (...) @OpenSSL_add_all_digests()
%6 = call i32 (...) @RunTests()
store i32 %6, i32* %2
%7 = call i32 (...) @ERR_free_strings()
%8 = call i32 (...) @EVP_cleanup()
%9 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @SSL_library_init()
%2 = tail call i32 (...) @OpenSSL_add_all_ciphers()
%3 = tail call i32 (...) @OpenSSL_add_all_digests()
%4 = tail call i32 (...) @RunTests()
%5 = tail call i32 (...) @ERR_free_strings()
%6 = tail call i32 (...) @EVP_cleanup()
%7 = tail call i32 (...) @CRYPTO_cleanup_all_ex_data()
ret i32 %4
}
/* Type definitions */
struct global_win1 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __display_all(struct global_win1 *, int /*<<< orphan*/);
void _display_all(struct global_win1 *gwin) { __display_all(gwin, 0); }


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

x86 assembly (clang, -O2):
<_display_all>:
xor    %esi,%esi
jmp    1030 <__display_all@plt>

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

LLVM IR (-O2):
%struct.global_win1 = type { i32 }
define void @_display_all(%struct.global_win1* %0) {
%2 = tail call i32 @__display_all(%struct.global_win1* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, int *, int);
int my_putchar(int i) {
  write(1, &i, sizeof(int));
  return (0);
}


x86 assembly (clang, -O0):
<my_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putchar>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @my_putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @write(i32 1, i32* %2, i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void EXTI1_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @EXTI1_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @EXTI1_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
put_string(char *a_string) { printf("C-plugin put string %s\n", a_string); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"C-plugin put string %s\0A\00"
define i32 @put_string(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@.str = [24 x i8] c"C-plugin put string %s\0A\00"
define i32 @put_string(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
/* Type definitions */
struct vrrp_vr {
  int dummy;
};

/* Variables and functions */
int vrrp_multicast_set_socket(struct vrrp_vr *);
int vrrp_network_open_socket(struct vrrp_vr *);
char vrrp_multicast_open_socket(struct vrrp_vr *vr) {
  if (vrrp_network_open_socket(vr) == -1)
    return -1;
  if (vrrp_multicast_set_socket(vr) == -1)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<vrrp_multicast_open_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <vrrp_network_open_socket@plt>
cmp    $0xffffffff,%eax
jne    1147 <vrrp_multicast_open_socket+0x27>
movb   $0xff,-0x1(%rbp)
jmp    1166 <vrrp_multicast_open_socket+0x46>
mov    -0x10(%rbp),%rdi
call   1040 <vrrp_multicast_set_socket@plt>
cmp    $0xffffffff,%eax
jne    1162 <vrrp_multicast_open_socket+0x42>
movb   $0xff,-0x1(%rbp)
jmp    1166 <vrrp_multicast_open_socket+0x46>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vrrp_multicast_open_socket>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vrrp_network_open_socket@plt>
cmp    $0xffffffff,%eax
je     1140 <vrrp_multicast_open_socket+0x20>
mov    %rbx,%rdi
call   1040 <vrrp_multicast_set_socket@plt>
cmp    $0xffffffff,%eax
sete   %al
neg    %al
pop    %rbx
ret
mov    $0xff,%al
pop    %rbx
ret

LLVM IR (-O0):
%struct.vrrp_vr = type { i32 }
define signext i8 @vrrp_multicast_open_socket(%struct.vrrp_vr* %0) {
%2 = alloca i8
%3 = alloca %struct.vrrp_vr*
store %struct.vrrp_vr* %0, %struct.vrrp_vr** %3
%4 = load %struct.vrrp_vr*, %struct.vrrp_vr** %3
%5 = call i32 @vrrp_network_open_socket(%struct.vrrp_vr* %4)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 -1, i8* %2
br label %14
8: ; preds = %1
%9 = load %struct.vrrp_vr*, %struct.vrrp_vr** %3
%10 = call i32 @vrrp_multicast_set_socket(%struct.vrrp_vr* %9)
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 -1, i8* %2
br label %14
13: ; preds = %8
store i8 0, i8* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
%struct.vrrp_vr = type { i32 }
define signext i8 @vrrp_multicast_open_socket(%struct.vrrp_vr* %0) {
%2 = tail call i32 @vrrp_network_open_socket(%struct.vrrp_vr* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @vrrp_multicast_set_socket(%struct.vrrp_vr* %0)
%6 = icmp eq i32 %5, -1
%7 = sext i1 %6 to i8
br label %8
8: ; preds = %4, %1
%9 = phi i8 [ -1, %1 ], [ %7, %4 ]
ret i8 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ GLshort;

/* Variables and functions */
int /*<<< orphan*/ glVertex4sv(int /*<<< orphan*/ *);
void Vertex4sv(GLshort v[4]) { glVertex4sv(v); }


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

x86 assembly (clang, -O2):
<Vertex4sv>:
jmp    1030 <glVertex4sv@plt>

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

LLVM IR (-O2):
define void @Vertex4sv(i32* %0) {
%2 = tail call i32 @glVertex4sv(i32* %0)
ret void
}
int parens_faulty(const char *in) {
  int paren_lvl = 0;
  while (*in) {
    if ((*in) == '(')
      paren_lvl++;
    else if ((*in) == ')')
      paren_lvl--;
    in++;
  }
  return paren_lvl;
}


x86 assembly (clang, -O0):
<parens_faulty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1169 <parens_faulty+0x69>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
jne    113a <parens_faulty+0x3a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1158 <parens_faulty+0x58>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x29,%eax
jne    1153 <parens_faulty+0x53>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1158 <parens_faulty+0x58>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <parens_faulty+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parens_faulty>:
xor    %eax,%eax
jmp    1117 <parens_faulty+0x17>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0xffffffff,%eax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x28,%cl
je     1130 <parens_faulty+0x30>
cmp    $0x29,%cl
je     1110 <parens_faulty+0x10>
test   %cl,%cl
jne    1113 <parens_faulty+0x13>
jmp    1139 <parens_faulty+0x39>
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
add    $0x1,%rdi
jmp    1117 <parens_faulty+0x17>
ret

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

LLVM IR (-O2):
define i32 @parens_faulty(i8* nocapture %0) {
br label %2
2: ; preds = %10, %1
%3 = phi i8* [ %0, %1 ], [ %12, %10 ]
%4 = phi i32 [ 0, %1 ], [ %11, %10 ]
%5 = load i8, i8* %3
switch i8 %5, label %10 [
i8 0, label %13
i8 40, label %6
i8 41, label %8
]
6: ; preds = %2
%7 = add nsw i32 %4, 1
br label %10
8: ; preds = %2
%9 = add nsw i32 %4, -1
br label %10
10: ; preds = %2, %8, %6
%11 = phi i32 [ %7, %6 ], [ %9, %8 ], [ %4, %2 ]
%12 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
13: ; preds = %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main(void) {
  foo(7);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 7)
ret i32 0
}
void print_inst_ST_RS_IM13_RD(char *mnemonic, int rd, int rs1, int im13) { ; }


x86 assembly (clang, -O0):
<print_inst_ST_RS_IM13_RD>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @print_inst_ST_RS_IM13_RD(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @print_inst_ST_RS_IM13_RD(i8* nocapture %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void *fun2(void *arg) {
  while (1) {
    printf("in fun2\n");
    sleep(5);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<fun2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
jmp    112c <fun2+0xc>

x86 assembly (clang, -O2):
<fun2>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
jmp    1130 <fun2+0x10>

LLVM IR (-O0):
@.str = [9 x i8] c"in fun2\0A\00"
define i8* @fun2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @sleep(i32 5)
br label %3
}

LLVM IR (-O2):
@str = [8 x i8] c"in fun2\00"
define noalias i8* @fun2(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 5)
br label %2
}
float calculate_slope(const float *input_range, const float *output_range) {
  return (output_range[1] - output_range[0]) /
         (input_range[1] - input_range[0]);
}


x86 assembly (clang, -O0):
<calculate_slope>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x8(%rbp),%rax
subss  (%rax),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_slope>:
movss  0x4(%rsi),%xmm0
subss  (%rsi),%xmm0
movss  0x4(%rdi),%xmm1
subss  (%rdi),%xmm1
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @calculate_slope(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 1
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = fsub float %7, %10
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
%15 = load float*, float** %3
%16 = getelementptr inbounds float, float* %15, i64 0
%17 = load float, float* %16
%18 = fsub float %14, %17
%19 = fdiv float %11, %18
ret float %19
}

LLVM IR (-O2):
define float @calculate_slope(float* nocapture %0, float* nocapture %1) {
%3 = getelementptr inbounds float, float* %1, i64 1
%4 = load float, float* %3
%5 = load float, float* %1
%6 = fsub float %4, %5
%7 = getelementptr inbounds float, float* %0, i64 1
%8 = load float, float* %7
%9 = load float, float* %0
%10 = fsub float %8, %9
%11 = fdiv float %6, %10
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ die(int);
int dup2(int, int);
void xdup2(int oldfd, int newfd) {
  if (dup2(oldfd, newfd) != newfd)
    die(14);
}


x86 assembly (clang, -O0):
<xdup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <dup2@plt>
cmp    -0x8(%rbp),%eax
je     114c <xdup2+0x2c>
mov    $0xe,%edi
call   1040 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdup2>:
push   %rbx
mov    %esi,%ebx
call   1030 <dup2@plt>
cmp    %ebx,%eax
jne    112e <xdup2+0xe>
pop    %rbx
ret
mov    $0xe,%edi
pop    %rbx
jmp    1040 <die@plt>

LLVM IR (-O0):
define void @xdup2(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 @dup2(i32 %5, i32 %6)
%8 = load i32, i32* %4
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @die(i32 14)
br label %12
12: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
define void @xdup2(i32 %0, i32 %1) {
%3 = tail call i32 @dup2(i32 %0, i32 %1)
%4 = icmp eq i32 %3, %1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @die(i32 14)
br label %7
7: ; preds = %5, %2
ret void
}
int count_key_line(int sudoku[9][9], int v, int k) {
  int counter;
  int h;
  h = 9;
  counter = 0;
  while (h--) {
    if (sudoku[v][h] == k)
      counter++;
  }
  return counter;
}


x86 assembly (clang, -O0):
<count_key_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x9,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
je     115d <count_key_line+0x5d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x10(%rbp),%eax
jne    1158 <count_key_line+0x58>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111c <count_key_line+0x1c>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_key_line>:
movslq %esi,%rax
lea    (%rax,%rax,8),%rax
movdqu 0x4(%rdi,%rax,4),%xmm0
movdqu 0x14(%rdi,%rax,4),%xmm1
movd   %edx,%xmm2
pshufd $0x0,%xmm2,%xmm2
xor    %ecx,%ecx
cmp    %edx,(%rdi,%rax,4)
sete   %cl
pcmpeqd %xmm2,%xmm1
pcmpeqd %xmm2,%xmm0
packssdw %xmm1,%xmm0
packsswb %xmm0,%xmm0
pmovmskb %xmm0,%eax
mov    %eax,%edx
shr    %dl
and    $0x55,%dl
sub    %dl,%al
mov    %eax,%edx
and    $0x33,%dl
shr    $0x2,%al
and    $0x33,%al
add    %dl,%al
mov    %eax,%edx
shr    $0x4,%dl
add    %al,%dl
and    $0xf,%dl
movzbl %dl,%eax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @count_key_line([9 x i32]* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds [9 x i32], [9 x i32]* %0, i64 %4, i64 1
%6 = bitcast i32* %5 to <8 x i32>*
%7 = load <8 x i32>, <8 x i32>* %6
%8 = insertelement <8 x i32> poison, i32 %2, i64 0
%9 = shufflevector <8 x i32> %8, <8 x i32> poison, <8 x i32> zeroinitializer
%10 = icmp eq <8 x i32> %7, %9
%11 = getelementptr inbounds [9 x i32], [9 x i32]* %0, i64 %4, i64 0
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %2
%14 = zext i1 %13 to i32
%15 = bitcast <8 x i1> %10 to i8
%16 = call i8 @llvm.ctpop.i8(i8 %15)
%17 = zext i8 %16 to i32
%18 = add nuw nsw i32 %17, %14
ret i32 %18
}
int nextIndex(int size, int current) {
  int step;
  if (!(size % 2)) {
  }
  step = (size + 1) / 2;
  current = (current + step) % size;
  return current;
}


x86 assembly (clang, -O0):
<nextIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1123 <nextIndex+0x23>
jmp    1123 <nextIndex+0x23>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextIndex>:
lea    0x1(%rdi),%eax
shr    $0x1f,%eax
add    %edi,%eax
add    $0x1,%eax
sar    %eax
add    %esi,%eax
cltd
idiv   %edi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @nextIndex(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 1
%4 = sdiv i32 %3, 2
%5 = add nsw i32 %4, %1
%6 = srem i32 %5, %0
ret i32 %6
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __NR_futex;
int syscall(int /*<<< orphan*/, unsigned int *, int, unsigned int,
            struct timespec const *, int *, unsigned int);
int sys_futex(unsigned int *uaddr, int op, unsigned int val,
              const struct timespec *timeout, int *uaddr2, unsigned int val3) {
  return syscall(__NR_futex, uaddr, op, val, timeout, uaddr2, val3);
}


x86 assembly (clang, -O0):
<sys_futex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x24(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_futex>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rdi
mov    (%rdi),%edi
mov    %r9d,(%rsp)
mov    %rax,%r9
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@__NR_futex = global i32 0
define i32 @sys_futex(i32* %0, i32 %1, i32 %2, %struct.timespec* %3, i32* %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.timespec*
%11 = alloca i32*
%12 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store %struct.timespec* %3, %struct.timespec** %10
store i32* %4, i32** %11
store i32 %5, i32* %12
%13 = load i32, i32* @__NR_futex
%14 = load i32*, i32** %7
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load %struct.timespec*, %struct.timespec** %10
%18 = load i32*, i32** %11
%19 = load i32, i32* %12
%20 = call i32 @syscall(i32 %13, i32* %14, i32 %15, i32 %16, %struct.timespec* %17, i32* %18, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@__NR_futex = global i32 0
define i32 @sys_futex(i32* %0, i32 %1, i32 %2, %struct.timespec* %3, i32* %4, i32 %5) {
%7 = load i32, i32* @__NR_futex
%8 = tail call i32 @syscall(i32 %7, i32* %0, i32 %1, i32 %2, %struct.timespec* %3, i32* %4, i32 %5)
ret i32 %8
}
extern int _lseek(int file, int ptr, int dir) { return 0; }


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

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

LLVM IR (-O0):
define i32 @_lseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @_lseek(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *time_rfc1123(int /*<<< orphan*/);
char *cur_time_rfc1123() {
  time_t t;
  time(&t);
  return time_rfc1123(t);
}


x86 assembly (clang, -O0):
<cur_time_rfc1123>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1030 <time@plt>
mov    -0x4(%rbp),%edi
call   1040 <time_rfc1123@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cur_time_rfc1123>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <time@plt>
mov    0x4(%rsp),%edi
call   1040 <time_rfc1123@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @cur_time_rfc1123() {
%1 = alloca i32
%2 = call i32 @time(i32* %1)
%3 = load i32, i32* %1
%4 = call i8* @time_rfc1123(i32 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @cur_time_rfc1123() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = load i32, i32* %1
%5 = call i8* @time_rfc1123(i32 %4)
ret i8* %5
}
float RaiseTo5(float x) {
  float x2 = x * x;
  return x2 * x2 * x;
}


x86 assembly (clang, -O0):
<RaiseTo5>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<RaiseTo5>:
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @RaiseTo5(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = load float, float* %2
%6 = fmul float %4, %5
store float %6, float* %3
%7 = load float, float* %3
%8 = load float, float* %3
%9 = fmul float %7, %8
%10 = load float, float* %2
%11 = fmul float %9, %10
ret float %11
}

LLVM IR (-O2):
define float @RaiseTo5(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %2
%4 = fmul float %3, %0
ret float %4
}
/* Type definitions */
typedef unsigned long uint64_t;
struct timespec {
  unsigned long tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
uint64_t time_ns() {
  struct timespec ts;
  uint64_t r;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  r = ts.tv_sec;
  r *= 1000UL * 1000UL * 1000UL;
  r += ts.tv_nsec;
  return r;
}


x86 assembly (clang, -O0):
<time_ns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
imul   $0x3b9aca00,-0x18(%rbp),%rax
3b
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_ns>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,0x8(%rsp),%rax
9a 3b
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @time_ns() {
%1 = alloca %struct.timespec
%2 = alloca i64
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%6 = load i64, i64* %5
store i64 %6, i64* %2
%7 = load i64, i64* %2
%8 = mul i64 %7, 1000000000
store i64 %8, i64* %2
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%10 = load i64, i64* %9
%11 = load i64, i64* %2
%12 = add i64 %11, %10
store i64 %12, i64* %2
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @time_ns() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = mul i64 %6, 1000000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add i64 %7, %9
ret i64 %10
}
void g_relation_new() {}


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

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

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

LLVM IR (-O2):
define void @g_relation_new() {
ret void
}
int sm2tc(int x) {
  int m = x >> 31;
  return (~m & x) | (((x & 0x80000000) - x) & m);
}


x86 assembly (clang, -O0):
<sm2tc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
and    $0x80000000,%ecx
sub    -0x4(%rbp),%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sm2tc>:
xor    %ecx,%ecx
test   %edi,%edi
cmovns %edi,%ecx
mov    %edi,%eax
and    $0x7fffffff,%eax
neg    %eax
sar    $0x1f,%edi
and    %edi,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @sm2tc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 31
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = xor i32 %6, -1
%8 = load i32, i32* %2
%9 = and i32 %7, %8
%10 = load i32, i32* %2
%11 = and i32 %10, -2147483648
%12 = load i32, i32* %2
%13 = sub i32 %11, %12
%14 = load i32, i32* %3
%15 = and i32 %13, %14
%16 = or i32 %9, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @sm2tc(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = select i1 %2, i32 %0, i32 0
%4 = and i32 %0, 2147483647
%5 = sub nsw i32 0, %4
%6 = icmp slt i32 %0, 0
%7 = select i1 %6, i32 %5, i32 0
%8 = or i32 %3, %7
ret i32 %8
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ backing_planes;
};
typedef TYPE_1__ XSetWindowAttributes;

/* Variables and functions */
unsigned long get_XSetWindowAttributes_backing_planes(void *_p) {
  return (unsigned long)((XSetWindowAttributes *)_p)->backing_planes;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XSetWindowAttributes_backing_planes(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XSetWindowAttributes_backing_planes(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void osalSysLock(void) {}


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

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

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

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