xunge/DecIR huggingface dataset:
/* Variables and functions */
void stack_init(void *array[], size_t size) {
  array[0] = (void *)((size_t)array + size);
}


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

x86 assembly (clang, -O2):
<stack_init>:
add    %rdi,%rsi
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @stack_init(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 = ptrtoint i8** %5 to i64
%7 = load i64, i64* %4
%8 = add i64 %6, %7
%9 = inttoptr i64 %8 to i8*
%10 = load i8**, i8*** %3
%11 = getelementptr inbounds i8*, i8** %10, i64 0
store i8* %9, i8** %11
ret void
}

LLVM IR (-O2):
define void @stack_init(i8** %0, i64 %1) {
%3 = ptrtoint i8** %0 to i64
%4 = add i64 %3, %1
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %0
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
char *Skip(const char *const input) {
  char *cursor;
  cursor = (char *const)input;
  if (cursor != NULL) {
    while (isspace(*cursor)) {
      cursor++;
    }
  }
  return cursor;
}


x86 assembly (clang, -O0):
<Skip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1160 <Skip+0x50>
jmp    1134 <Skip+0x24>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     115b <Skip+0x4b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1134 <Skip+0x24>
jmp    1160 <Skip+0x50>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Skip>:
push   %rbx
test   %rdi,%rdi
je     1134 <Skip+0x24>
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   (%rax)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <Skip+0x10>
jmp    1136 <Skip+0x26>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @Skip(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %8, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = tail call i64 @isspace(i8 signext %5)
%7 = icmp eq i64 %6, 0
%8 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %7, label %9, label %3
9: ; preds = %3, %1
%10 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %10
}
unsigned long hash_function(const char *str) {
  unsigned long hash = 0;
  unsigned char c;
  while ((c = *str++)) {
    hash = c + (hash << 6) + (hash << 16) - hash;
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash_function>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
cmp    $0x0,%al
je     1153 <hash_function+0x53>
movzbl -0x11(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    $0x6,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%rcx
shl    $0x10,%rcx
add    %rcx,%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash_function+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_function>:
mov    (%rdi),%cl
test   %cl,%cl
je     1129 <hash_function+0x29>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
imul   $0x1003f,%rax,%rax
add    %rcx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_function+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @hash_function(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = zext i8 %5 to i64
%10 = mul i64 %7, 65599
%11 = add i64 %10, %9
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 0, %1 ], [ %11, %4 ]
ret i64 %15
}
int get_salt_size(void) { return 9; }


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

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

LLVM IR (-O0):
define i32 @get_salt_size() {
ret i32 9
}

LLVM IR (-O2):
define i32 @get_salt_size() {
ret i32 9
}
void soru_0() {}


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

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

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

LLVM IR (-O2):
define void @soru_0() {
ret void
}
int clamp(int color) {
  if (color < 0)
    return 0;
  if (color > 255)
    return 255;
  return color;
}


x86 assembly (clang, -O0):
<clamp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <clamp+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    113c <clamp+0x3c>
cmpl   $0xff,-0x8(%rbp)
jle    1136 <clamp+0x36>
movl   $0xff,-0x4(%rbp)
jmp    113c <clamp+0x3c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp>:
cmp    $0xff,%edi
mov    $0xff,%ecx
cmovl  %edi,%ecx
xor    %eax,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @clamp(i32 %0) {
%2 = icmp slt i32 %0, 255
%3 = select i1 %2, i32 %0, i32 255
%4 = icmp sgt i32 %3, 0
%5 = select i1 %4, i32 %3, i32 0
ret i32 %5
}
void yy_2_Attributes(char *yytext, int yyleng) {
  ;
  ;
}


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

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

LLVM IR (-O0):
define void @yy_2_Attributes(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @yy_2_Attributes(i8* nocapture %0, i32 %1) {
ret void
}
void SPIFIFODisable(unsigned long ulBase, unsigned long ulFlags) {
  (*((volatile unsigned long *)(ulBase + 0x0000012C))) &= ~(ulFlags);
}


x86 assembly (clang, -O0):
<SPIFIFODisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x12c(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x12c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPIFIFODisable>:
not    %rsi
and    %rsi,0x12c(%rdi)
ret

LLVM IR (-O0):
define void @SPIFIFODisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = xor i64 %5, -1
%7 = load i64, i64* %3
%8 = add i64 %7, 300
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @SPIFIFODisable(i64 %0, i64 %1) {
%3 = xor i64 %1, -1
%4 = add i64 %0, 300
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, %3
store volatile i64 %7, i64* %5
ret void
}
/* Variables and functions */
char get_first();
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("Enter your option");
  char ch = get_first();
  printf("You option is %c\n", ch);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1050 <get_first@plt>
mov    %al,-0x5(%rbp)
lea    0xeb6(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <get_first@plt>
movsbl %al,%esi
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Enter your option\00"
@.str.1 = [18 x i8] c"You option is %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call signext i8 (...) @get_first()
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8 signext %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Enter your option\00"
@.str.1 = [18 x i8] c"You option is %c\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @get_first()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8 signext %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned long);
scalar_t__ pthread_self();
int /*<<< orphan*/ stderr;
void deinit_thread(void *d) {
  fprintf(stderr, "Done with thread %lu!\n", (unsigned long)pthread_self());
}


x86 assembly (clang, -O0):
<deinit_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rdx
lea    0xeb4(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deinit_thread>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xec8(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"Done with thread %lu!\0A\00"
define void @deinit_thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i64 (...) @pthread_self()
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i64 %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"Done with thread %lu!\0A\00"
define void @deinit_thread(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i64 (...) @pthread_self()
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i64 %3)
ret void
}
/* Variables and functions */
int invert(int, int, int);
int /*<<< orphan*/ printf(char *, int, int);
int main() { printf("%d\n%d\n", invert(0b101010, 0b10, 0b10), 0b100110); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2a,%edi
mov    $0x2,%edx
mov    %edx,%esi
call   1030 <invert@plt>
mov    %eax,%esi
lea    0xec2(%rip),%rdi
mov    $0x26,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2a,%edi
mov    $0x2,%esi
mov    $0x2,%edx
call   1030 <invert@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
mov    $0x26,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d\0A%d\0A\00"
define i32 @main() {
%1 = tail call i32 @invert(i32 42, i32 2, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1, i32 38)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SCL(int /*<<< orphan*/);
int /*<<< orphan*/ SDA(int /*<<< orphan*/);
void Start(void) {
  SDA(0);
  SCL(0);
}


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

x86 assembly (clang, -O2):
<Start>:
push   %rax
xor    %edi,%edi
call   1040 <SDA@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <SCL@plt>

LLVM IR (-O0):
define void @Start() {
%1 = call i32 @SDA(i32 0)
%2 = call i32 @SCL(i32 0)
ret void
}

LLVM IR (-O2):
define void @Start() {
%1 = tail call i32 @SDA(i32 0)
%2 = tail call i32 @SCL(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void a() { printf("I am A\n"); }


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"I am A\00"
define void @a() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct in6_addr {
  int dummy;
};
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ AF_INET6;
int /*<<< orphan*/ *inet_ntop(int /*<<< orphan*/, struct in6_addr const *,
                              char *, int);
char *safe_strdup(char *);
char *ipv6_mask_to_str(const struct in6_addr *mask) {
  char buf[128];
  if (inet_ntop(AF_INET6, mask, buf, sizeof(buf)) == NULL)
    return NULL;
  return safe_strdup(buf);
}


x86 assembly (clang, -O0):
<ipv6_mask_to_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
lea    -0x90(%rbp),%rdx
mov    $0x80,%ecx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
jne    1164 <ipv6_mask_to_str+0x44>
movq   $0x0,-0x8(%rbp)
jmp    1174 <ipv6_mask_to_str+0x54>
lea    -0x90(%rbp),%rdi
call   1040 <safe_strdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv6_mask_to_str>:
sub    $0x88,%rsp
mov    %rdi,%rsi
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rdx
mov    $0x80,%ecx
call   1030 <inet_ntop@plt>
test   %rax,%rax
je     1155 <ipv6_mask_to_str+0x35>
mov    %rsp,%rdi
call   1040 <safe_strdup@plt>
add    $0x88,%rsp
ret
xor    %eax,%eax
add    $0x88,%rsp
ret

LLVM IR (-O0):
%struct.in6_addr = type { i32 }
@AF_INET6 = global i32 0
define i8* @ipv6_mask_to_str(%struct.in6_addr* %0) {
%2 = alloca i8*
%3 = alloca %struct.in6_addr*
%4 = alloca [128 x i8]
store %struct.in6_addr* %0, %struct.in6_addr** %3
%5 = load i32, i32* @AF_INET6
%6 = load %struct.in6_addr*, %struct.in6_addr** %3
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%8 = call i32* @inet_ntop(i32 %5, %struct.in6_addr* %6, i8* %7, i32 128)
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %11
10: ; preds = %1
store i8* null, i8** %2
br label %14
11: ; preds = %1
%12 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%13 = call i8* @safe_strdup(i8* %12)
store i8* %13, i8** %2
br label %14
14: ; preds = %11, %10
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
%struct.in6_addr = type { i32 }
@AF_INET6 = global i32 0
define i8* @ipv6_mask_to_str(%struct.in6_addr* %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @AF_INET6
%5 = call i32* @inet_ntop(i32 %4, %struct.in6_addr* %0, i8* %3, i32 128)
%6 = icmp eq i32* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i8* @safe_strdup(i8* %3)
br label %9
9: ; preds = %1, %7
%10 = phi i8* [ %8, %7 ], [ null, %1 ]
ret i8* %10
}
unsigned long long combine_minimal(unsigned long long a, unsigned long long b) {
  return (a & 0xfffffffffffffffell) | (b & 0x0000000000000001ll);
}


x86 assembly (clang, -O0):
<combine_minimal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    $0xfffffffffffffffe,%rax
mov    -0x10(%rbp),%rcx
and    $0x1,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<combine_minimal>:
and    $0xfffffffffffffffe,%rdi
and    $0x1,%esi
lea    (%rsi,%rdi,1),%rax
ret

LLVM IR (-O0):
define i64 @combine_minimal(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = and i64 %5, -2
%7 = load i64, i64* %4
%8 = and i64 %7, 1
%9 = or i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @combine_minimal(i64 %0, i64 %1) {
%3 = and i64 %0, -2
%4 = and i64 %1, 1
%5 = or i64 %4, %3
ret i64 %5
}
/* Variables and functions */
float BMP180_I2C_read16(int);
int /*<<< orphan*/ BMP180_I2C_writeCommand(int, int);
int /*<<< orphan*/ usleep(int);
float readRawTemperature() {
  BMP180_I2C_writeCommand(0xF4, 0x2E);
  usleep(5000);
  return BMP180_I2C_read16(0xF6);
}


x86 assembly (clang, -O0):
<readRawTemperature>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf4,%edi
mov    $0x2e,%esi
call   1040 <BMP180_I2C_writeCommand@plt>
mov    $0x1388,%edi
call   1050 <usleep@plt>
mov    $0xf6,%edi
call   1030 <BMP180_I2C_read16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<readRawTemperature>:
push   %rax
mov    $0xf4,%edi
mov    $0x2e,%esi
call   1040 <BMP180_I2C_writeCommand@plt>
mov    $0x1388,%edi
call   1050 <usleep@plt>
mov    $0xf6,%edi
pop    %rax
jmp    1030 <BMP180_I2C_read16@plt>

LLVM IR (-O0):
define float @readRawTemperature() {
%1 = call i32 @BMP180_I2C_writeCommand(i32 244, i32 46)
%2 = call i32 @usleep(i32 5000)
%3 = call float @BMP180_I2C_read16(i32 246)
ret float %3
}

LLVM IR (-O2):
define float @readRawTemperature() {
%1 = tail call i32 @BMP180_I2C_writeCommand(i32 244, i32 46)
%2 = tail call i32 @usleep(i32 5000)
%3 = tail call float @BMP180_I2C_read16(i32 246)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x75() {
  Assert_real((isbdigit(117) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              590, ("isbdigit should be 0 for u"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x75>:
push   %rbp
mov    %rsp,%rbp
mov    $0x75,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x24e,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x75>:
push   %rax
mov    $0x75,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x24e,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for u\00"
define void @t_isbdigit_0x75() {
%1 = call i64 @isbdigit(i32 117)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 590, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for u\00"
define void @t_isbdigit_0x75() {
%1 = tail call i64 @isbdigit(i32 117)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 590, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void sn9cxxx_stop0(struct usb_spca50x *spca50x) {}


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

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

LLVM IR (-O0):
%struct.usb_spca50x = type opaque
define void @sn9cxxx_stop0(%struct.usb_spca50x* %0) {
%2 = alloca %struct.usb_spca50x*
store %struct.usb_spca50x* %0, %struct.usb_spca50x** %2
ret void
}

LLVM IR (-O2):
%struct.usb_spca50x = type opaque
define void @sn9cxxx_stop0(%struct.usb_spca50x* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HibernateWriteComplete();
void HibernateRTCSet(unsigned long ulRTCValue) {
  (*((volatile unsigned long *)(0x400FC00C))) = ulRTCValue;
  HibernateWriteComplete();
}


x86 assembly (clang, -O0):
<HibernateRTCSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x400fc00c,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <HibernateWriteComplete@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateRTCSet>:
mov    %rdi,0x400fc00c
40
xor    %eax,%eax
jmp    1030 <HibernateWriteComplete@plt>

LLVM IR (-O0):
define void @HibernateRTCSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074774028 to i64*)
%4 = call i32 (...) @HibernateWriteComplete()
ret void
}

LLVM IR (-O2):
define void @HibernateRTCSet(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1074774028 to i64*)
%2 = tail call i32 (...) @HibernateWriteComplete()
ret void
}
void getConnection(char *stem) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *, int /*<<< orphan*/);
extern void turkish_UTF_8_close_env(struct SN_env *z) { SN_close_env(z, 0); }


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

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

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

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @turkish_UTF_8_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sysStart();
int main(void) {
  sysStart();
  while (1) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <sysStart@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <sysStart@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @sysStart()
br label %3
3: ; preds = %0, %3
br label %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @sysStart()
br label %2
2: ; preds = %0, %2
br label %2
}
main() {
  unsigned int k, i;
  int u;
  k = 500000;
  for (i = 1; i <= 1000000; i++)
    u = (int)(k % i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x7a120,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0xf4240,-0xc(%rbp)
ja     113f <main+0x3f>
mov    -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <main+0x19>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __core_lprintf(char *, int);
void l_msg(int a, int b) { __core_lprintf("Loader: %s\n", b); }


x86 assembly (clang, -O0):
<l_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed8(%rip),%rdi
call   1030 <__core_lprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"Loader: %s\0A\00"
define void @l_msg(i32 %0, i32 %1) {
%3 = tail call i32 @__core_lprintf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int const uint32_t;

/* Variables and functions */
uint32_t le32dec(const void *buf) {
  const uint8_t *p = (const uint8_t *)buf;
  return ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | p[0]);
}


x86 assembly (clang, -O0):
<le32dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
shl    $0x18,%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
or     (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<le32dec>:
mov    0xc(%rdi),%ecx
shl    $0x18,%ecx
mov    0x4(%rdi),%eax
mov    0x8(%rdi),%edx
shl    $0x10,%edx
or     %ecx,%edx
shl    $0x8,%eax
or     %edx,%eax
or     (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @le32dec(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = getelementptr inbounds i8, i8* %0, i64 12
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = shl i32 %5, 24
%7 = getelementptr inbounds i8, i8* %0, i64 8
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
%10 = shl i32 %9, 16
%11 = or i32 %10, %6
%12 = getelementptr inbounds i8, i8* %0, i64 4
%13 = bitcast i8* %12 to i32*
%14 = load i32, i32* %13
%15 = shl i32 %14, 8
%16 = or i32 %11, %15
%17 = load i32, i32* %2
%18 = or i32 %16, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void TSIL_PrintInfo(void) {
  printf("(* Variable size: ");
  printf("LONG DOUBLE");
  printf(". *)\n");
  return;
}


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

x86 assembly (clang, -O2):
<TSIL_PrintInfo>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xedf(%rip),%rdi
call   1040 <printf@plt>
lea    0xedf(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"(* Variable size: \00"
@.str.1 = [12 x i8] c"LONG DOUBLE\00"
@.str.2 = [6 x i8] c". *)\0A\00"
define void @TSIL_PrintInfo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"(* Variable size: \00"
@.str.1 = [12 x i8] c"LONG DOUBLE\00"
@str = [5 x i8] c". *)\00"
define void @TSIL_PrintInfo() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ example1();
int /*<<< orphan*/ example2();
int main(void) {
  example1();
  example2();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <example1@plt>
xor    %eax,%eax
call   1030 <example2@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @example1()
%2 = tail call i32 (...) @example2()
ret i32 0
}
/* Variables and functions */
_Bool __VERIFIER_nondet_Bool();
_Bool ecrobot_is_ENTER_button_pressed(void) {
  _Bool tmp;
  {
    tmp = __VERIFIER_nondet_Bool();
    return (tmp);
  }
}


x86 assembly (clang, -O0):
<ecrobot_is_ENTER_button_pressed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_Bool@plt>
and    $0x1,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i1 @ecrobot_is_ENTER_button_pressed() {
%1 = alloca i8
%2 = call zeroext i1 (...) @__VERIFIER_nondet_Bool()
%3 = zext i1 %2 to i8
store i8 %3, i8* %1
%4 = load i8, i8* %1
%5 = trunc i8 %4 to i1
ret i1 %5
}

LLVM IR (-O2):
define zeroext i1 @ecrobot_is_ENTER_button_pressed() {
%1 = tail call zeroext i1 (...) @__VERIFIER_nondet_Bool()
ret i1 %1
}
int sq_sum(int n) {
  if (n == 0)
    return 0;
  return n * n + sq_sum(n - 1);
}


x86 assembly (clang, -O0):
<sq_sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <sq_sum+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1150 <sq_sum+0x40>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <sq_sum@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sq_sum>:
test   %edi,%edi
je     1146 <sq_sum+0x46>
mov    %edi,%eax
lea    -0x1(%rax),%r8d
lea    -0x2(%rax),%esi
mov    %esi,%ecx
imul   %edi,%ecx
add    $0x1,%ecx
imul   %r8d,%ecx
mov    $0x3,%edx
sub    %eax,%edx
sub    %eax,%edx
imul   %r8,%rsi
lea    -0x3(%rax),%edi
imul   %rsi,%rdi
shr    %rsi
imul   %edx,%esi
shr    %rdi
imul   $0x55555556,%edi,%edx
imul   %eax,%eax
add    %ecx,%eax
add    %esi,%eax
add    %edx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @sq_sum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %15
7: ; preds = %1
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = mul nsw i32 %8, %9
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 1
%13 = call i32 @sq_sum(i32 %12)
%14 = add nsw i32 %10, %13
store i32 %14, i32* %2
br label %15
15: ; preds = %7, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @sq_sum(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %27, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = add i32 %0, -2
%6 = mul i32 %5, %0
%7 = add i32 %6, 1
%8 = mul i32 %4, %7
%9 = mul i32 %0, -2
%10 = add i32 %9, 3
%11 = zext i32 %4 to i33
%12 = zext i32 %5 to i33
%13 = mul i33 %11, %12
%14 = lshr i33 %13, 1
%15 = trunc i33 %14 to i32
%16 = mul i32 %10, %15
%17 = add i32 %0, -3
%18 = zext i32 %17 to i33
%19 = mul i33 %13, %18
%20 = lshr i33 %19, 1
%21 = trunc i33 %20 to i32
%22 = mul i32 %21, 1431655766
%23 = mul i32 %0, %0
%24 = add i32 %23, %8
%25 = add i32 %24, %16
%26 = add i32 %25, %22
br label %27
27: ; preds = %3, %1
%28 = phi i32 [ 0, %1 ], [ %26, %3 ]
ret i32 %28
}
/* Variables and functions */
int b64_to_value(unsigned char);
int b64_is_valid_char(unsigned char c) {
  if (c == '=')
    return 1;
  if (b64_to_value(c) == -1)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<b64_is_valid_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x3d,%eax
jne    1137 <b64_is_valid_char+0x27>
movl   $0x1,-0x4(%rbp)
jmp    115c <b64_is_valid_char+0x4c>
movzbl -0x5(%rbp),%edi
call   1030 <b64_to_value@plt>
cmp    $0xffffffff,%eax
jne    1155 <b64_is_valid_char+0x45>
movl   $0x0,-0x4(%rbp)
jmp    115c <b64_is_valid_char+0x4c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b64_is_valid_char>:
mov    $0x1,%eax
cmp    $0x3d,%dil
je     1133 <b64_is_valid_char+0x23>
push   %rax
movzbl %dil,%edi
call   1030 <b64_to_value@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
setne  %al
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @b64_is_valid_char(i8 zeroext %0) {
%2 = icmp eq i8 %0, 61
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @b64_to_value(i8 zeroext %0)
%5 = icmp ne i32 %4, -1
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ zpush();
int /*<<< orphan*/ zpushde();
void lpush(void) {
  zpushde();
  zpush();
}


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

x86 assembly (clang, -O2):
<lpush>:
push   %rax
xor    %eax,%eax
call   1040 <zpushde@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <zpush@plt>

LLVM IR (-O0):
define void @lpush() {
%1 = call i32 (...) @zpushde()
%2 = call i32 (...) @zpush()
ret void
}

LLVM IR (-O2):
define void @lpush() {
%1 = tail call i32 (...) @zpushde()
%2 = tail call i32 (...) @zpush()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SaveLineToFile();
int /*<<< orphan*/ SaveSandToFile();
int /*<<< orphan*/ printf(char *);
void PauseRun(int x, int y, int in) {
  printf("\nPaused \n");
  if ((1))
    SaveLineToFile();
  if ((2))
    SaveSandToFile();
  if ((1))
    return;
  printf("\nend Pause\n");
}


x86 assembly (clang, -O0):
<PauseRun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <SaveLineToFile@plt>
mov    $0x0,%al
call   1050 <SaveSandToFile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PauseRun>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <SaveLineToFile@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <SaveSandToFile@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\0APaused \0A\00"
define void @PauseRun(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 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @SaveLineToFile()
%9 = call i32 (...) @SaveSandToFile()
ret void
}

LLVM IR (-O2):
@str = [9 x i8] c"\0APaused \00"
define void @PauseRun(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @SaveLineToFile()
%6 = tail call i32 (...) @SaveSandToFile()
ret void
}
/* Variables and functions */
int stb_size_varlenu(unsigned int v) {
  if (v < 0x00000080)
    return 1;
  if (v < 0x00004000)
    return 2;
  if (v < 0x00200000)
    return 3;
  if (v < 0x10000000)
    return 4;
  return 5;
}


x86 assembly (clang, -O0):
<stb_size_varlenu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jae    1120 <stb_size_varlenu+0x20>
movl   $0x1,-0x4(%rbp)
jmp    1172 <stb_size_varlenu+0x72>
cmpl   $0x4000,-0x8(%rbp)
jae    1139 <stb_size_varlenu+0x39>
movl   $0x2,-0x4(%rbp)
jmp    1172 <stb_size_varlenu+0x72>
cmpl   $0x200000,-0x8(%rbp)
jae    1152 <stb_size_varlenu+0x52>
movl   $0x3,-0x4(%rbp)
jmp    1172 <stb_size_varlenu+0x72>
cmpl   $0x10000000,-0x8(%rbp)
jae    116b <stb_size_varlenu+0x6b>
movl   $0x4,-0x4(%rbp)
jmp    1172 <stb_size_varlenu+0x72>
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_size_varlenu>:
mov    $0x1,%eax
cmp    $0x80,%edi
jb     1135 <stb_size_varlenu+0x35>
mov    $0x2,%eax
cmp    $0x4000,%edi
jb     1135 <stb_size_varlenu+0x35>
mov    $0x3,%eax
cmp    $0x200000,%edi
jb     1135 <stb_size_varlenu+0x35>
cmp    $0x10000000,%edi
mov    $0x5,%eax
sbb    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @stb_size_varlenu(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ult i32 %4, 128
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %20
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp ult i32 %8, 16384
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 2, i32* %2
br label %20
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp ult i32 %12, 2097152
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 3, i32* %2
br label %20
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp ult i32 %16, 268435456
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 4, i32* %2
br label %20
19: ; preds = %15
store i32 5, i32* %2
br label %20
20: ; preds = %19, %18, %14, %10, %6
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @stb_size_varlenu(i32 %0) {
%2 = icmp ult i32 %0, 128
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 16384
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = icmp ult i32 %0, 2097152
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp ult i32 %0, 268435456
%9 = select i1 %8, i32 4, i32 5
br label %10
10: ; preds = %7, %5, %3, %1
%11 = phi i32 [ 1, %1 ], [ 2, %3 ], [ 3, %5 ], [ %9, %7 ]
ret i32 %11
}
char c(c) {
  if (c >= 'A' && c <= 'Z') {
    printf("%c/n");
  } else if (c >= 'a' && c <= 'z') {
    printf("%c/n");
  } else {
    printf("");
  }
  return (0);
}


x86 assembly (clang, -O0):
<c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1142 <c+0x32>
cmpl   $0x5a,-0x4(%rbp)
jg     1142 <c+0x32>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    117c <c+0x6c>
cmpl   $0x61,-0x4(%rbp)
jl     1169 <c+0x59>
cmpl   $0x7a,-0x4(%rbp)
jg     1169 <c+0x59>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1177 <c+0x67>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    117c <c+0x6c>
xor    %eax,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
cmp    $0x19,%edi
ja     112e <c+0x1e>
push   %rax
lea    0xedd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%c/n\00"
@.str.1 = [1 x i8] zeroinitializer
define signext i8 @c(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %21
10: ; preds = %5, %1
%11 = load i32, i32* %2
%12 = icmp sge i32 %11, 97
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load i32, i32* %2
%15 = icmp sle i32 %14, 122
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %20
18: ; preds = %13, %10
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %20
20: ; preds = %18, %16
br label %21
21: ; preds = %20, %8
ret i8 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%c/n\00"
define signext i8 @c(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %1, %5
ret i8 0
}
void test_four(int x, int y) {
#pragma omp distribute collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      ;
}


x86 assembly (clang, -O0):
<test_four>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1156 <test_four+0x56>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1143 <test_four+0x43>
jmp    1135 <test_four+0x35>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <test_four+0x24>
jmp    1148 <test_four+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <test_four+0x11>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_four(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
br label %7
7: ; preds = %21, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %7
store i32 0, i32* %6
br label %12
12: ; preds = %17, %11
%13 = load i32, i32* %6
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %20
16: ; preds = %12
br label %17
17: ; preds = %16
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %12
20: ; preds = %12
br label %21
21: ; preds = %20
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %7
24: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @test_four(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char);
void dumpByte(unsigned char a) { printf("%02x", a); }


x86 assembly (clang, -O0):
<dumpByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
movzbl -0x1(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpByte>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%02x\00"
define void @dumpByte(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 zeroext %3)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%02x\00"
define void @dumpByte(i8 zeroext %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 zeroext %0)
ret void
}