xunge/DecIR huggingface dataset:
/* Variables and functions */
int strcmp(char const *, char const *);
int cstring_compare(const char *s1, const char *s2) {
  if (s1 != 0 && s2 != 0) {
    return strcmp(s1, s2);
  }
  return (s2 == 0) - (s1 == 0);
}


x86 assembly (clang, -O0):
<cstring_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114b <cstring_compare+0x3b>
cmpq   $0x0,-0x18(%rbp)
je     114b <cstring_compare+0x3b>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
jmp    116b <cstring_compare+0x5b>
cmpq   $0x0,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
cmpq   $0x0,-0x10(%rbp)
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cstring_compare>:
test   %rdi,%rdi
je     111f <cstring_compare+0xf>
test   %rsi,%rsi
je     111f <cstring_compare+0xf>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
test   %rsi,%rsi
sete   %al
cmp    $0x1,%rdi
sbb    $0x0,%eax
ret

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

LLVM IR (-O2):
define i32 @cstring_compare(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @strcmp(i8* %0, i8* %1)
br label %14
8: ; preds = %2
%9 = icmp eq i8* %1, null
%10 = zext i1 %9 to i32
%11 = icmp eq i8* %0, null
%12 = sext i1 %11 to i32
%13 = add nsw i32 %10, %12
br label %14
14: ; preds = %8, %6
%15 = phi i32 [ %7, %6 ], [ %13, %8 ]
ret i32 %15
}
int choose_pivot(int *A, int low, int high) {
  int pivot_index;
  pivot_index = (low + high) / 2;
  return pivot_index;
}


x86 assembly (clang, -O0):
<choose_pivot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<choose_pivot>:
lea    (%rsi,%rdx,1),%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @choose_pivot(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = add nsw i32 %8, %9
%11 = sdiv i32 %10, 2
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
define i32 @choose_pivot(i32* nocapture readnone %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, %1
%5 = sdiv i32 %4, 2
ret i32 %5
}
int test13() {
  static int i;
  return i;
}


x86 assembly (clang, -O0):
<test13>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@test13.i = internal global i32 0
define i32 @test13() {
%1 = load i32, i32* @test13.i
ret i32 %1
}

LLVM IR (-O2):
define i32 @test13() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void flash_set_bit(uint32_t *addr, uint32_t bit) { (*addr) &= ~bit; }


x86 assembly (clang, -O0):
<flash_set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<flash_set_bit>:
not    %esi
and    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @flash_set_bit(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = xor i32 %5, -1
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = and i32 %8, %6
store i32 %9, i32* %7
ret void
}

LLVM IR (-O2):
define void @flash_set_bit(i32* nocapture %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = load i32, i32* %0
%5 = and i32 %4, %3
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
scalar_t__ strncmp(char const *, char const *, int /*<<< orphan*/);
bool starts_with(const char *haystack, const char *needle) {
  return strncmp(haystack, needle, strlen(needle)) == 0;
}


x86 assembly (clang, -O0):
<starts_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<starts_with>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @starts_with(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 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @starts_with(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ emptyBlock(int);
int /*<<< orphan*/ writeToDisk(int, int);
int deleteINITFromDisk() {
  emptyBlock(21);
  int i;
  for (i = 0; i < 3; i++)
    writeToDisk(21, 21 + i);
  return 0;
}


x86 assembly (clang, -O0):
<deleteINITFromDisk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x15,%edi
call   1030 <emptyBlock@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    1161 <deleteINITFromDisk+0x41>
mov    -0x4(%rbp),%esi
add    $0x15,%esi
mov    $0x15,%edi
call   1040 <writeToDisk@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1139 <deleteINITFromDisk+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deleteINITFromDisk>:
push   %rax
mov    $0x15,%edi
call   1030 <emptyBlock@plt>
mov    $0x15,%edi
mov    $0x15,%esi
call   1040 <writeToDisk@plt>
mov    $0x15,%edi
mov    $0x16,%esi
call   1040 <writeToDisk@plt>
mov    $0x15,%edi
mov    $0x17,%esi
call   1040 <writeToDisk@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @deleteINITFromDisk() {
%1 = tail call i32 @emptyBlock(i32 21)
%2 = tail call i32 @writeToDisk(i32 21, i32 21)
%3 = tail call i32 @writeToDisk(i32 21, i32 22)
%4 = tail call i32 @writeToDisk(i32 21, i32 23)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ report(char *);
int main(int argc, char *argv[]) { report(argv[0]); }


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = call i32 @report(i8* %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @report(i8* %3)
ret i32 0
}
int twist_b_on_cornerperm(cperm)
int cperm;
{
  int temp_arr[8];
  cornerperm_unpack(cperm, temp_arr);
  four_cycle(temp_arr, 7, 6, 2, 1);
  return cornerperm_pack(temp_arr);
}


x86 assembly (clang, -O0):
<twist_b_on_cornerperm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1040 <cornerperm_unpack@plt>
lea    -0x30(%rbp),%rdi
mov    $0x7,%esi
mov    $0x6,%edx
mov    $0x2,%ecx
mov    $0x1,%r8d
mov    $0x0,%al
call   1030 <four_cycle@plt>
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1050 <cornerperm_pack@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twist_b_on_cornerperm>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <cornerperm_unpack@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0x6,%edx
mov    $0x2,%ecx
mov    $0x1,%r8d
xor    %eax,%eax
call   1030 <four_cycle@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <cornerperm_pack@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @twist_b_on_cornerperm(i32 %0) {
%2 = alloca i32
%3 = alloca [8 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%6 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @cornerperm_unpack to i32 (i32, i32*, ...)*)(i32 %4, i32* %5)
%7 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%8 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %7, i32 7, i32 6, i32 2, i32 1)
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%10 = call i32 (i32*, ...) bitcast (i32 (...)* @cornerperm_pack to i32 (i32*, ...)*)(i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @twist_b_on_cornerperm(i32 %0) {
%2 = alloca [8 x i32]
%3 = bitcast [8 x i32]* %2 to i8*
%4 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%5 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @cornerperm_unpack to i32 (i32, i32*, ...)*)(i32 %0, i32* %4)
%6 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %4, i32 7, i32 6, i32 2, i32 1)
%7 = call i32 (i32*, ...) bitcast (i32 (...)* @cornerperm_pack to i32 (i32*, ...)*)(i32* %4)
ret i32 %7
}
/* Variables and functions */
int try_parse_int_imp(char *, void *, int, int);
bool try_parse_long_long(char *str, long long *value_ptr) {
  return try_parse_int_imp(str, (void *)value_ptr, sizeof(long long), true);
}


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

x86 assembly (clang, -O2):
<try_parse_long_long>:
mov    $0x8,%edx
mov    $0x1,%ecx
jmp    1030 <try_parse_int_imp@plt>

LLVM IR (-O0):
define i32 @try_parse_long_long(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
store i8* %0, i8** %3
store i64* %1, i64** %4
%5 = load i8*, i8** %3
%6 = load i64*, i64** %4
%7 = bitcast i64* %6 to i8*
%8 = call i32 @try_parse_int_imp(i8* %5, i8* %7, i32 8, i32 1)
ret i32 %8
}

LLVM IR (-O2):
define i32 @try_parse_long_long(i8* %0, i64* %1) {
%3 = bitcast i64* %1 to i8*
%4 = tail call i32 @try_parse_int_imp(i8* %0, i8* %3, i32 8, i32 1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
char *string_teste(int i, char *teste) {
  int j = 0;
  for (j = 0; j < i; j++) {
    strcat(teste, "a");
  }
  return teste;
}


x86 assembly (clang, -O0):
<string_teste>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1157 <string_teste+0x47>
mov    -0x10(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1030 <strcat@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <string_teste+0x1d>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_teste>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
test   %edi,%edi
jle    1140 <string_teste+0x30>
mov    %edi,%ebp
lea    0xedc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcat@plt>
add    $0xffffffff,%ebp
jne    1130 <string_teste+0x20>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
define i8* @string_teste(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 0, i32* %5
store i32 0, i32* %5
br label %6
6: ; preds = %13, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i8*, i8** %4
%12 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %10
%14 = load i32, i32* %5
%15 = add nsw i32 %14, 1
store i32 %15, i32* %5
br label %6
16: ; preds = %6
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
define i8* @string_teste(i32 %0, i8* returned %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @strcat(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret i8* %1
}
int is_space(int ch) {
  return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n';
}


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <is_space+0x3e>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <is_space+0x3e>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <is_space+0x3e>
cmpl   $0xa,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
cmp    $0x20,%edi
ja     111d <is_space+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100002200,%rdx
bt     %rcx,%rdx
jae    111d <is_space+0x1d>
ret
xor    %eax,%eax
cmp    $0xa,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_space(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 10
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
int SquareSum(int _a, int b) {
  const int unuse = 0;
  int temp;
  temp = -_a * -1;
  temp = +_a * 0;
  temp = _a * unuse;
  temp = _a * _a;
  temp = -(-_a * _a) + (b * b);
  return (temp);
}


x86 assembly (clang, -O0):
<SquareSum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
imul   $0xffffffff,%eax,%eax
mov    %eax,-0x10(%rbp)
imul   $0x0,-0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
imul   $0x0,-0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
xor    %ecx,%ecx
sub    -0x4(%rbp),%ecx
imul   -0x4(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SquareSum>:
imul   %edi,%edi
imul   %esi,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @SquareSum(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
store i32 0, i32* %5
%7 = load i32, i32* %3
%8 = sub nsw i32 0, %7
%9 = mul nsw i32 %8, -1
store i32 %9, i32* %6
%10 = load i32, i32* %3
%11 = mul nsw i32 %10, 0
store i32 %11, i32* %6
%12 = load i32, i32* %3
%13 = mul nsw i32 %12, 0
store i32 %13, i32* %6
%14 = load i32, i32* %3
%15 = load i32, i32* %3
%16 = mul nsw i32 %14, %15
store i32 %16, i32* %6
%17 = load i32, i32* %3
%18 = sub nsw i32 0, %17
%19 = load i32, i32* %3
%20 = mul nsw i32 %18, %19
%21 = sub nsw i32 0, %20
%22 = load i32, i32* %4
%23 = load i32, i32* %4
%24 = mul nsw i32 %22, %23
%25 = add nsw i32 %21, %24
store i32 %25, i32* %6
%26 = load i32, i32* %6
ret i32 %26
}

LLVM IR (-O2):
define i32 @SquareSum(i32 %0, i32 %1) {
%3 = mul i32 %0, %0
%4 = mul nsw i32 %1, %1
%5 = add nsw i32 %4, %3
ret i32 %5
}
/* Variables and functions */
int parse(char *_dst, char *_src, size_t len) {
  int ret = 0;
  char *src = _src;
  char *dst = _dst;
  unsigned int ch;
  while (*src) {
    *dst++ = *src++;
    ret++;
  }
  return ret;
}


x86 assembly (clang, -O0):
<parse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
cmpb   $0x0,(%rax)
je     1164 <parse+0x64>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
mov    (%rax),%cl
mov    -0x30(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x30(%rbp)
mov    %cl,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1127 <parse+0x27>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse>:
mov    (%rsi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1120 <parse+0x20>
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rdi,%rax,1)
movzbl 0x1(%rsi,%rax,1),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <parse+0x10>
ret

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

LLVM IR (-O2):
define i32 @parse(i8* nocapture writeonly %0, i8* nocapture %1, i64 %2) {
%4 = load i8, i8* %1
%5 = icmp eq i8 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %14, %6 ], [ %4, %3 ]
%8 = phi i32 [ %13, %6 ], [ 0, %3 ]
%9 = phi i8* [ %12, %6 ], [ %0, %3 ]
%10 = phi i8* [ %11, %6 ], [ %1, %3 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = getelementptr inbounds i8, i8* %9, i64 1
store i8 %7, i8* %9
%13 = add nuw nsw i32 %8, 1
%14 = load i8, i8* %11
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %6
16: ; preds = %6, %3
%17 = phi i32 [ 0, %3 ], [ %13, %6 ]
ret i32 %17
}
void SignalGenerator_RestoreConfig(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ abs(scalar_t__);
int /*<<< orphan*/ assert(int);
size_t floor(int /*<<< orphan*/);
scalar_t__ get_pid_max();
int /*<<< orphan*/ log10(int /*<<< orphan*/);
size_t max_pid_length_base_10() {
  pid_t max_pid = get_pid_max();
  assert(max_pid > 0);
  return floor(log10(abs(max_pid))) + 1;
}


x86 assembly (clang, -O0):
<max_pid_length_base_10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <get_pid_max@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <abs@plt>
mov    %eax,%edi
call   1060 <log10@plt>
mov    %eax,%edi
call   1070 <floor@plt>
add    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_pid_length_base_10>:
push   %rbx
xor    %eax,%eax
call   1050 <get_pid_max@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setg   %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1030 <abs@plt>
mov    %eax,%edi
call   1060 <log10@plt>
mov    %eax,%edi
call   1070 <floor@plt>
add    $0x1,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @max_pid_length_base_10() {
%1 = alloca i64
%2 = call i64 (...) @get_pid_max()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = icmp sgt i64 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i64, i64* %1
%8 = call i32 @abs(i64 %7)
%9 = call i32 @log10(i32 %8)
%10 = call i64 @floor(i32 %9)
%11 = add i64 %10, 1
ret i64 %11
}

LLVM IR (-O2):
define i64 @max_pid_length_base_10() {
%1 = tail call i64 (...) @get_pid_max()
%2 = icmp sgt i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @abs(i64 %1)
%6 = tail call i32 @log10(i32 %5)
%7 = tail call i64 @floor(i32 %6)
%8 = add i64 %7, 1
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ set_key_wait_vtime(int /*<<< orphan*/);
void clr_key_wait_dos(void) { set_key_wait_vtime(0); }


x86 assembly (clang, -O0):
<clr_key_wait_dos>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <set_key_wait_vtime@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clr_key_wait_dos>:
xor    %edi,%edi
jmp    1030 <set_key_wait_vtime@plt>

LLVM IR (-O0):
define void @clr_key_wait_dos() {
%1 = call i32 @set_key_wait_vtime(i32 0)
ret void
}

LLVM IR (-O2):
define void @clr_key_wait_dos() {
%1 = tail call i32 @set_key_wait_vtime(i32 0)
ret void
}
void show_version(void) { return; }


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

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

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

LLVM IR (-O2):
define void @show_version() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sendBlink(int, int, int, int);
int /*<<< orphan*/ sendConf(int, int);
void setRedBlueBlink(int sockfd, int timeOn, int period) {
  sendConf(sockfd, (1 << 7) | (1 << 3) | (3 << 1));
  sendBlink(sockfd, 0x11, timeOn, period);
}


x86 assembly (clang, -O0):
<setRedBlueBlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8e,%esi
call   1040 <sendConf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x11,%esi
call   1030 <sendBlink@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setRedBlueBlink>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x8e,%esi
call   1040 <sendConf@plt>
mov    %ebx,%edi
mov    $0x11,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <sendBlink@plt>

LLVM IR (-O0):
define void @setRedBlueBlink(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = call i32 @sendConf(i32 %7, i32 142)
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 @sendBlink(i32 %9, i32 17, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @setRedBlueBlink(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @sendConf(i32 %0, i32 142)
%5 = tail call i32 @sendBlink(i32 %0, i32 17, i32 %1, i32 %2)
ret void
}
void main(void) {
  int x;
  int y;
  if (x == 5)
    y = 7;
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x5,-0x4(%rbp)
jne    1115 <main+0x15>
movl   $0x7,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TimeControlProc();
void DoTimeControl(int n) { TimeControlProc(); }


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

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

LLVM IR (-O0):
define void @DoTimeControl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @TimeControlProc()
ret void
}

LLVM IR (-O2):
define void @DoTimeControl(i32 %0) {
%2 = tail call i32 (...) @TimeControlProc()
ret void
}
int is_email(char *word) {}


x86 assembly (clang, -O0):
<is_email>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @is_email(i8* nocapture readnone %0) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void AV_WL32(uint8_t *dst, unsigned val) {
  *dst++ = val;
  *dst++ = val >> 8;
  *dst++ = val >> 16;
  *dst++ = val >> 24;
}


x86 assembly (clang, -O0):
<AV_WL32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
shr    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
shr    $0x10,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
shr    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AV_WL32>:
mov    %esi,(%rdi)
mov    %esi,%eax
shr    $0x8,%eax
mov    %eax,0x4(%rdi)
mov    %esi,%eax
shr    $0x10,%eax
mov    %eax,0x8(%rdi)
shr    $0x18,%esi
mov    %esi,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @AV_WL32(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %1, i32* %0
%4 = lshr i32 %1, 8
%5 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %4, i32* %3
%6 = lshr i32 %1, 16
%7 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %6, i32* %5
%8 = lshr i32 %1, 24
store i32 %8, i32* %7
ret void
}
int imin(int a, int b) { return (a < b ? a : b); }


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

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

LLVM IR (-O0):
define i32 @imin(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @imin(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
unsigned char tcp_steg_channel_close() {}


x86 assembly (clang, -O0):
<tcp_steg_channel_close>:
push   %rbp
mov    %rsp,%rbp
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @tcp_steg_channel_close() {
%1 = alloca i8
%2 = load i8, i8* %1
ret i8 %2
}

LLVM IR (-O2):
define zeroext i8 @tcp_steg_channel_close() {
ret i8 undef
}
/* Variables and functions */
scalar_t__ __builtin_labs(long);
int /*<<< orphan*/ link_failure_builtin_labs();
void test_builtin_labs(long x) {
  if (__builtin_labs(x) != __builtin_labs(x))
    link_failure_builtin_labs();
}


x86 assembly (clang, -O0):
<test_builtin_labs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
sub    %rax,%rcx
cmp    $0x0,%rax
cmovl  %rcx,%rax
mov    -0x8(%rbp),%rcx
xor    %edx,%edx
sub    %rcx,%rdx
cmp    $0x0,%rcx
cmovl  %rdx,%rcx
cmp    %rcx,%rax
je     114e <test_builtin_labs+0x3e>
mov    $0x0,%al
call   1030 <link_failure_builtin_labs@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_builtin_labs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 0, %3
%5 = icmp slt i64 %3, 0
%6 = select i1 %5, i64 %4, i64 %3
%7 = load i64, i64* %2
%8 = sub nsw i64 0, %7
%9 = icmp slt i64 %7, 0
%10 = select i1 %9, i64 %8, i64 %7
%11 = icmp ne i64 %6, %10
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = call i32 (...) @link_failure_builtin_labs()
br label %14
14: ; preds = %12, %1
ret void
}

LLVM IR (-O2):
define void @test_builtin_labs(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disp_ctl_fini();
scalar_t__ disp_ctl_init();
scalar_t__ disp_start();
int disp_init(void) {
  if (disp_ctl_init() != 0) {
    return (-1);
  }
  if (disp_start() != 0) {
    disp_ctl_fini();
    return (-1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<disp_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <disp_ctl_init@plt>
cmp    $0x0,%rax
je     1155 <disp_init+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    1180 <disp_init+0x50>
mov    $0x0,%al
call   1040 <disp_start@plt>
cmp    $0x0,%rax
je     1179 <disp_init+0x49>
mov    $0x0,%al
call   1050 <disp_ctl_fini@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1180 <disp_init+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disp_init>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <disp_ctl_init@plt>
test   %rax,%rax
jne    1152 <disp_init+0x22>
xor    %eax,%eax
call   1040 <disp_start@plt>
test   %rax,%rax
je     1157 <disp_init+0x27>
xor    %eax,%eax
call   1050 <disp_ctl_fini@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @disp_init() {
%1 = alloca i32
%2 = call i64 (...) @disp_ctl_init()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 -1, i32* %1
br label %11
5: ; preds = %0
%6 = call i64 (...) @disp_start()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 (...) @disp_ctl_fini()
store i32 -1, i32* %1
br label %11
10: ; preds = %5
store i32 0, i32* %1
br label %11
11: ; preds = %10, %8, %4
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @disp_init() {
%1 = tail call i64 (...) @disp_ctl_init()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i64 (...) @disp_start()
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (...) @disp_ctl_fini()
br label %8
8: ; preds = %3, %0, %6
%9 = phi i32 [ -1, %6 ], [ -1, %0 ], [ 0, %3 ]
ret i32 %9
}
int test_imm_6Buint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x6B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Buint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x6b,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_6Buint64_midword_reg>:
test   $0x6b0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_6Buint64_midword_reg(i64 %0) {
%2 = and i64 %0, 7012352
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int getType(char ch) {
  switch (ch) {
  case 'S':
    return 0;
  case 'D':
    return 1;
  case 'C':
    return 2;
  case 'H':
    return 3;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<getType>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffbd,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x10,%eax
ja     1164 <getType+0x64>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    116b <getType+0x6b>
movl   $0x1,-0x4(%rbp)
jmp    116b <getType+0x6b>
movl   $0x2,-0x4(%rbp)
jmp    116b <getType+0x6b>
movl   $0x3,-0x4(%rbp)
jmp    116b <getType+0x6b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getType>:
add    $0xffffffbd,%edi
cmp    $0x10,%edi
ja     1126 <getType+0x26>
xor    %eax,%eax
lea    0xeef(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x2,%eax
ret
mov    $0x1,%eax
ret
mov    $0xffffffff,%eax
ret
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @getType(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %10 [
i32 83, label %6
i32 68, label %7
i32 67, label %8
i32 72, label %9
]
6: ; preds = %1
store i32 0, i32* %2
br label %11
7: ; preds = %1
store i32 1, i32* %2
br label %11
8: ; preds = %1
store i32 2, i32* %2
br label %11
9: ; preds = %1
store i32 3, i32* %2
br label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %11
11: ; preds = %10, %9, %8, %7, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @getType(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %6 [
i32 83, label %7
i32 68, label %3
i32 67, label %4
i32 72, label %5
]
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %4, %3
%8 = phi i32 [ -1, %6 ], [ 3, %5 ], [ 2, %4 ], [ 1, %3 ], [ 0, %1 ]
ret i32 %8
}
void swap(int *array, int i, int j) {
  int t = array[i];
  array[i] = array[j];
  array[j] = t;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
void OnAPPLICATION_Show() {}


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

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

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

LLVM IR (-O2):
define void @OnAPPLICATION_Show() {
ret void
}
AR0RX1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((p0[10000000]) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AR0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movswl 0x1312d00(%rax),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movswl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     114a <AR0RX1+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <AR0RX1+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0RX1>:
movzwl 0x1312d00(%r8),%edx
01
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,2),%dx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @AR0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture %5) {
%7 = getelementptr inbounds i16, i16* %4, i64 10000000
%8 = load i16, i16* %7
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds i16, i16* %5, i64 %9
%11 = load i16, i16* %10
%12 = icmp sle i16 %8, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fred() { printf("test\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"test\00"
define void @fred() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ *allocate_buffer(int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, void *, int /*<<< orphan*/);
uint8_t *copy_to_buffer(void *data, uint16_t len) {
  uint8_t *buffer = allocate_buffer(len);
  if (buffer) {
    memcpy(buffer, data, len);
  }
  return buffer;
}


x86 assembly (clang, -O0):
<copy_to_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <allocate_buffer@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1156 <copy_to_buffer+0x36>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_to_buffer>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%edi
call   1040 <allocate_buffer@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1145 <copy_to_buffer+0x25>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32* @copy_to_buffer(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i32* @allocate_buffer(i32 %6)
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = icmp ne i32* %8, null
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i32*, i32** %5
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = call i32 @memcpy(i32* %11, i8* %12, i32 %13)
br label %15
15: ; preds = %10, %2
%16 = load i32*, i32** %5
ret i32* %16
}

LLVM IR (-O2):
define i32* @copy_to_buffer(i8* %0, i32 %1) {
%3 = tail call i32* @allocate_buffer(i32 %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @memcpy(i32* %3, i8* %0, i32 %1)
br label %7
7: ; preds = %5, %2
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ addChar(char, unsigned int *);
void addNum(unsigned int n, unsigned int *i) {
  if (n < 10) {
    addChar(((char)((n % 10) + ((unsigned int)('0')))), i);
  } else {
    addNum(n / 10, i);
    addNum(n % 10, i);
  }
}


x86 assembly (clang, -O0):
<addNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0xa,-0x4(%rbp)
jae    115b <addNum+0x3b>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
add    $0x30,%edx
mov    %dl,%al
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1030 <addChar@plt>
jmp    1189 <addNum+0x69>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1040 <addNum@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%edi
mov    -0x10(%rbp),%rsi
call   1040 <addNum@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addNum>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
cmp    $0xa,%edi
jb     114e <addNum+0x2e>
mov    %ebp,%eax
mov    $0xcccccccd,%ebx
imul   %rax,%rbx
shr    $0x23,%rbx
mov    %ebx,%edi
mov    %r14,%rsi
call   1040 <addNum@plt>
add    %ebx,%ebx
lea    (%rbx,%rbx,4),%eax
sub    %eax,%ebp
movzbl %bpl,%eax
imul   $0xcd,%eax,%ecx
shr    $0xa,%ecx
and    $0xfffffffe,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
or     $0x30,%al
movzbl %al,%edi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <addChar@plt>

LLVM IR (-O0):
define void @addNum(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 = icmp ult i32 %5, 10
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i32, i32* %3
%9 = urem i32 %8, 10
%10 = add i32 %9, 48
%11 = trunc i32 %10 to i8
%12 = load i32*, i32** %4
%13 = call i32 @addChar(i8 signext %11, i32* %12)
br label %21
14: ; preds = %2
%15 = load i32, i32* %3
%16 = udiv i32 %15, 10
%17 = load i32*, i32** %4
%18 = load i32, i32* %3
%19 = urem i32 %18, 10
%20 = load i32*, i32** %4
br label %21
21: ; preds = %14, %7
ret void
}

LLVM IR (-O2):
define void @addNum(i32 %0, i32* %1) {
%3 = icmp ult i32 %0, 10
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = udiv i32 %0, 10
tail call void @addNum(i32 %5, i32* %1)
%6 = urem i32 %0, 10
br label %7
7: ; preds = %4, %2
%8 = phi i32 [ %0, %2 ], [ %6, %4 ]
%9 = trunc i32 %8 to i8
%10 = urem i8 %9, 10
%11 = or i8 %10, 48
%12 = tail call i32 @addChar(i8 signext %11, i32* %1)
ret void
}
void dummy(void) { dummy(); }


x86 assembly (clang, -O0):
<dummy>:
push   %rbp
mov    %rsp,%rbp
call   1030 <dummy@plt>
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @x11_block() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void robPrintAscii(void) {
  printf("    i_i    \n"
         "   [^_^]   \n"
         "   [D_D]   \n"
         "  /|___|\\  \n"
         "   d   b   \n"
         "     i_i    \n"
         "             [^_^]   \n"
         "             [D_D]   \n"
         "            /|___|\\  \n"
         "             d   b   \n"
         "                       i_i    \n"
         "                      [^_^]   \n"
         "                      [D_D]   \n"
         "                     /|___|\\  \n"
         "                      d   b   \n");
}


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

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

LLVM IR (-O0):
@.str = [317 x i8] c" i_i \0A [^_^] \0A [D_D] \0A /|___|\\ \0A d b \0A i_i \0A [^_^] \0A [D_D] \0A /|___|\\ \0A d b \0A i_i \0A [^_^] \0A [D_D] \0A /|___|\\ \0A d b \0A\00"
define void @robPrintAscii() {
%1 = call i32 @printf(i8* getelementptr inbounds ([317 x i8], [317 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [316 x i8] c" i_i \0A [^_^] \0A [D_D] \0A /|___|\\ \0A d b \0A i_i \0A [^_^] \0A [D_D] \0A /|___|\\ \0A d b \0A i_i \0A [^_^] \0A [D_D] \0A /|___|\\ \0A d b \00"
define void @robPrintAscii() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([316 x i8], [316 x i8]* @str, i64 0, i64 0))
ret void
}