xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_assume(_Bool);
void __DSVERIFIER_assume(_Bool expression) { __ESBMC_assume(expression); }


x86 assembly (clang, -O0):
<__DSVERIFIER_assume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__ESBMC_assume@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__DSVERIFIER_assume>:
jmp    1030 <__ESBMC_assume@plt>

LLVM IR (-O0):
define void @__DSVERIFIER_assume(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = trunc i8 %4 to i1
%6 = call i32 @__ESBMC_assume(i1 zeroext %5)
ret void
}

LLVM IR (-O2):
define void @__DSVERIFIER_assume(i1 zeroext %0) {
%2 = tail call i32 @__ESBMC_assume(i1 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chan_new(char *);
void handle_join_me(char *chan_name) { chan_new(chan_name); }


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

x86 assembly (clang, -O2):
<handle_join_me>:
jmp    1030 <chan_new@plt>

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

LLVM IR (-O2):
define void @handle_join_me(i8* %0) {
%2 = tail call i32 @chan_new(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ read_word(char *);
int /*<<< orphan*/ see_word(char *);
int /*<<< orphan*/ upcase(char *);
void see() {
  char word[47 + 1];
  if (!read_word(word))
    return;
  upcase(word);
  see_word(word);
}


x86 assembly (clang, -O0):
<see>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
call   1040 <read_word@plt>
cmp    $0x0,%eax
jne    114f <see+0x1f>
jmp    1161 <see+0x31>
lea    -0x30(%rbp),%rdi
call   1030 <upcase@plt>
lea    -0x30(%rbp),%rdi
call   1050 <see_word@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<see>:
push   %rbx
sub    $0x30,%rsp
mov    %rsp,%rdi
call   1040 <read_word@plt>
test   %eax,%eax
je     1154 <see+0x24>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <upcase@plt>
mov    %rbx,%rdi
call   1050 <see_word@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @see() {
%1 = alloca [48 x i8]
%2 = getelementptr inbounds [48 x i8], [48 x i8]* %1, i64 0, i64 0
%3 = call i32 @read_word(i8* %2)
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %0
br label %11
6: ; preds = %0
%7 = getelementptr inbounds [48 x i8], [48 x i8]* %1, i64 0, i64 0
%8 = call i32 @upcase(i8* %7)
%9 = getelementptr inbounds [48 x i8], [48 x i8]* %1, i64 0, i64 0
%10 = call i32 @see_word(i8* %9)
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @see() {
%1 = alloca [48 x i8]
%2 = getelementptr inbounds [48 x i8], [48 x i8]* %1, i64 0, i64 0
%3 = call i32 @read_word(i8* %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = call i32 @upcase(i8* %2)
%7 = call i32 @see_word(i8* %2)
br label %8
8: ; preds = %0, %5
ret void
}
int int_equals(const void *key1, const void *key2) {
  return (int)key1 == (int)key2;
}


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

x86 assembly (clang, -O2):
<int_equals>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @int_equals(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint i8* %1 to i64
%6 = trunc i64 %5 to i32
%7 = icmp eq i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int foo();
int bla(void) {
  int i, n = foo(), j;
  j = 0;
  for (i = 1; i <= n; i++)
    j += n;
  return j;
}


x86 assembly (clang, -O0):
<bla>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <foo@plt>
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1153 <bla+0x43>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1130 <bla+0x20>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bla>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <foo@plt>
mov    %eax,%ecx
imul   %eax,%ecx
test   %eax,%eax
cmovle %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @bla() {
%1 = tail call i32 (...) @foo()
%2 = mul i32 %1, %1
%3 = icmp sgt i32 %1, 0
%4 = select i1 %3, i32 %2, i32 0
ret i32 %4
}
int stringnoc(const char *src, int c) {
  const char *ps = src;
  int count = 0;
  while (*ps != '\0')
    if (*ps++ == c)
      count++;
  return count;
}


x86 assembly (clang, -O0):
<stringnoc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1153 <stringnoc+0x53>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    114e <stringnoc+0x4e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111a <stringnoc+0x1a>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringnoc>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <stringnoc+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
xor    %edx,%edx
cmp    %esi,%ecx
sete   %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <stringnoc+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @stringnoc(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %14, %5 ], [ %3, %2 ]
%7 = phi i32 [ %13, %5 ], [ 0, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
%9 = sext i8 %6 to i32
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = icmp eq i32 %9, %1
%12 = zext i1 %11 to i32
%13 = add nuw nsw i32 %7, %12
%14 = load i8, i8* %10
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %2
%17 = phi i32 [ 0, %2 ], [ %13, %5 ]
ret i32 %17
}
int cmpint(const void *p1, const void *p2) { return *(int *)p2 - *(int *)p1; }


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

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

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

LLVM IR (-O2):
define i32 @cmpint(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
char *sha224hex(bitstr, bitcnt)
unsigned char *bitstr;
unsigned long bitcnt;
{ return ((char *)shacomp(224, 2, bitstr, bitcnt)); }


x86 assembly (clang, -O0):
<sha224hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0xe0,%edi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <shacomp@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha224hex>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    $0xe0,%edi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <shacomp@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @sha224hex(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 = call i32 (i32, i32, i8*, i64, ...) bitcast (i32 (...)* @shacomp to i32 (i32, i32, i8*, i64, ...)*)(i32 224, i32 2, i8* %5, i64 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @sha224hex(i8* %0, i64 %1) {
%3 = tail call i32 (i32, i32, i8*, i64, ...) bitcast (i32 (...)* @shacomp to i32 (i32, i32, i8*, i64, ...)*)(i32 224, i32 2, i8* %0, i64 %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
char *strcpy(char *dest, const char *src) {
  char *ptr = dest;
  while (*dest++ = *src++)
    ;
  *dest = 0;
  return ptr;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1143 <strcpy+0x43>
jmp    1114 <strcpy+0x14>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
movb   $0x0,(%rax,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
store i8 0, i8* %8
ret i8* %0
}
char *strcpy(char *buf, const char *src) {
  char *p;
  for (p = buf; *src; src++, p++) {
    *p = *src;
  }
  *p = 0;
  return buf;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <strcpy+0x4a>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %rdi,%rdx
test   %cl,%cl
je     1131 <strcpy+0x31>
add    $0x1,%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %cl,(%rdx)
add    $0x1,%rdx
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <strcpy+0x20>
movb   $0x0,(%rdx)
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
store i8 %6, i8* %7
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %0
}
INSTR(CLRT) {
  STORE_T_IMM_I32(0);
  NEXT_INSTR();
}


x86 assembly (clang, -O0):
<INSTR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1030 <STORE_T_IMM_I32@plt>
mov    $0x0,%al
call   1040 <NEXT_INSTR@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<INSTR>:
push   %rax
xor    %edi,%edi
xor    %eax,%eax
call   1030 <STORE_T_IMM_I32@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <NEXT_INSTR@plt>

LLVM IR (-O0):
define i32 @INSTR(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i32, ...) bitcast (i32 (...)* @STORE_T_IMM_I32 to i32 (i32, ...)*)(i32 0)
%5 = call i32 (...) @NEXT_INSTR()
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @INSTR(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @STORE_T_IMM_I32 to i32 (i32, ...)*)(i32 0)
%3 = tail call i32 (...) @NEXT_INSTR()
ret i32 undef
}
unsigned long long max(unsigned long long a, unsigned long long b) {
  if (a > b) {
    return a;
  } else {
    return b;
  }
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1127 <max+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <max+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmova  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @max(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int sum(int, int);
int main(void) {
  int total;
  total = sum(2, 3);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sum(i32 2, i32 3)
ret i32 0
}
/* Variables and functions */
size_t strlen(char *str) {
  size_t i = 0;
  while (str[i] != 0)
    i++;
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1136 <strlen+0x36>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
/* Variables and functions */
double floor(double);
double fix(double x) { return (x >= 0.0) ? floor(0.5 + x) : -floor(0.5 - x); }


x86 assembly (clang, -O0):
<fix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     114b <fix+0x3b>
movsd  0xec9(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    1179 <fix+0x69>
movsd  0xead(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fix>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    113a <fix+0x2a>
movsd  0xedd(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <floor@plt>
xorpd  0xed8(%rip),%xmm0
pop    %rax
ret
addsd  0xebe(%rip),%xmm0
pop    %rax
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @fix(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load double, double* %2
%7 = fadd double 5.000000e-01, %6
%8 = call double @llvm.floor.f64(double %7)
br label %14
9: ; preds = %1
%10 = load double, double* %2
%11 = fsub double 5.000000e-01, %10
%12 = call double @llvm.floor.f64(double %11)
%13 = fneg double %12
br label %14
14: ; preds = %9, %5
%15 = phi double [ %8, %5 ], [ %13, %9 ]
ret double %15
}

LLVM IR (-O2):
define double @fix(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = fadd double %0, 5.000000e-01
%5 = tail call double @llvm.floor.f64(double %4)
br label %10
6: ; preds = %1
%7 = fsub double 5.000000e-01, %0
%8 = tail call double @llvm.floor.f64(double %7)
%9 = fneg double %8
br label %10
10: ; preds = %6, %3
%11 = phi double [ %5, %3 ], [ %9, %6 ]
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
scalar_t__ scanf(char *, char *);
int main() {
  char z;
  while (scanf("%c", &z))
    printf("%c", z);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x0,%rax
je     115e <main+0x3e>
lea    0xeb0(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
jmp    112f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
test   %rax,%rax
je     116d <main+0x4d>
lea    0xebf(%rip),%rbx
lea    0x7(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
movsbl 0x7(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
test   %rax,%rax
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %6, %0
%4 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i8, i8* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %7)
br label %3
9: ; preds = %3
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i8
%2 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %0, %4
%5 = load i8, i8* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %5)
%7 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
scalar_t__ GLeeInit();
int /*<<< orphan*/ pglFlushRasterSGIX();
void _Lazy_glFlushRasterSGIX(void) {
  if (GLeeInit())
    pglFlushRasterSGIX();
}


x86 assembly (clang, -O0):
<_Lazy_glFlushRasterSGIX>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GLeeInit@plt>
cmp    $0x0,%rax
je     113c <_Lazy_glFlushRasterSGIX+0x1c>
mov    $0x0,%al
call   1040 <pglFlushRasterSGIX@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Lazy_glFlushRasterSGIX>:
push   %rax
xor    %eax,%eax
call   1030 <GLeeInit@plt>
test   %rax,%rax
je     1135 <_Lazy_glFlushRasterSGIX+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1040 <pglFlushRasterSGIX@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @_Lazy_glFlushRasterSGIX() {
%1 = call i64 (...) @GLeeInit()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @pglFlushRasterSGIX()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @_Lazy_glFlushRasterSGIX() {
%1 = tail call i64 (...) @GLeeInit()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @pglFlushRasterSGIX()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *);
int /*<<< orphan*/ kill_this_task();
void disarm(void) {
  debug("bomb disarmed.");
  kill_this_task();
}


x86 assembly (clang, -O0):
<disarm>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <debug@plt>
mov    $0x0,%al
call   1030 <kill_this_task@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<disarm>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <debug@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <kill_this_task@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"bomb disarmed.\00"
define void @disarm() {
%1 = call i32 @debug(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @kill_this_task()
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"bomb disarmed.\00"
define void @disarm() {
%1 = tail call i32 @debug(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @kill_this_task()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void home_curs() { printf("\033[1G"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[1G\00"
define void @home_curs() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void hello(void *arg) {
  printf("hi.hello:%s\n", arg == NULL ? "" : (char *)arg);
}


x86 assembly (clang, -O0):
<hello>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1137 <hello+0x27>
lea    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    113f <hello+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hello>:
test   %rdi,%rdi
lea    0xef2(%rip),%rsi
cmovne %rdi,%rsi
lea    0xedb(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"hi.hello:%s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @hello(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %8
6: ; preds = %1
%7 = load i8*, i8** %2
br label %8
8: ; preds = %6, %5
%9 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %5 ], [ %7, %6 ]
%10 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"hi.hello:%s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @hello(i8* %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void bot_vector_print_3d(const double a[3]) {
  int i;
  for (i = 0; i < 3; i++)
    printf("%15f\n", a[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<bot_vector_print_3d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1156 <bot_vector_print_3d+0x46>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xebf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <bot_vector_print_3d+0x13>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bot_vector_print_3d>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
lea    0xece(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x8(%rbx),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x10(%rbx),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%15f\0A\00"
define void @bot_vector_print_3d(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %2)
%4 = getelementptr inbounds double, double* %0, i64 1
%5 = load double, double* %4
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %5)
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %8)
%10 = tail call i32 @putchar(i32 10)
ret void
}
int setup_faces_x3(struct Grid *theGrid, struct Face **theFaces, int *nf) {
  *nf = 0;
  return 0;
}


x86 assembly (clang, -O0):
<setup_faces_x3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_faces_x3>:
movl   $0x0,(%rdx)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.Grid = type opaque
%struct.Face = type opaque
define i32 @setup_faces_x3(%struct.Grid* %0, %struct.Face** %1, i32* %2) {
%4 = alloca %struct.Grid*
%5 = alloca %struct.Face**
%6 = alloca i32*
store %struct.Grid* %0, %struct.Grid** %4
store %struct.Face** %1, %struct.Face*** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %6
store i32 0, i32* %7
ret i32 0
}

LLVM IR (-O2):
%struct.Grid = type opaque
%struct.Face = type opaque
define i32 @setup_faces_x3(%struct.Grid* nocapture readnone %0, %struct.Face** nocapture readnone %1, i32* nocapture writeonly %2) {
store i32 0, i32* %2
ret i32 0
}
/* Variables and functions */
int fn_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_67_ch_111_ch_109_ch_112_ch_108_ch_101_ch_109_ch_101_ch_110_ch_116_ch_79_ch_102(
    char const *);
int fn_al_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_67_ch_111_ch_109_ch_112_ch_108_ch_101_ch_109_ch_101_ch_110_ch_116_ch_79_ch_102(
    const char *text) {
  int pos = 0;
  pos =
      fn_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_67_ch_111_ch_109_ch_112_ch_108_ch_101_ch_109_ch_101_ch_110_ch_116_ch_79_ch_102(
          text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_al_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_67_ch_111_ch_109_ch_112_ch_108_ch_101_ch_109_ch_101_ch_110_ch_116_ch_79_ch_102>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_67_ch_111_ch_109_ch_112_ch_108_ch_101_ch_109_ch_101_ch_110_ch_116_ch_79_ch_102@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_67_ch_111_ch_109_ch_112_ch_108_ch_101_ch_109_ch_101_ch_110_ch_116_ch_79_ch_102+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_67_ch_111_ch_109_ch_112_ch_108_ch_101_ch_109_ch_101_ch_110_ch_116_ch_79_ch_102+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_al_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_67_ch_111_ch_109_ch_112_ch_108_ch_101_ch_109_ch_101_ch_110_ch_116_ch_79_ch_102>:
jmp    1030 <fn_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_67_ch_111_ch_109_ch_112_ch_108_ch_101_ch_109_ch_101_ch_110_ch_116_ch_79_ch_102@plt>

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

LLVM IR (-O2):
define i32 @fn_al_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_67_ch_111_ch_109_ch_112_ch_108_ch_101_ch_109_ch_101_ch_110_ch_116_ch_79_ch_102(i8* %0) {
%2 = tail call i32 @fn_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_67_ch_111_ch_109_ch_112_ch_108_ch_101_ch_109_ch_101_ch_110_ch_116_ch_79_ch_102(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ nothing();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("If you do not get back to your research now, we will have to "
         "implement corrective solutions.\n");
  nothing();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <nothing@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [94 x i8] c"If you do not get back to your research now, we will have to implement corrective solutions.\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @nothing()
ret i32 0
}

LLVM IR (-O2):
@str = [93 x i8] c"If you do not get back to your research now, we will have to implement corrective solutions.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @nothing()
ret i32 0
}
int _handle_open_error(char *file_path, int err_no) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @_handle_open_error(i8* nocapture readnone %0, i32 %1) {
ret i32 -1
}
char *cpApgAuthor() { return "Lowell D. Thomas"; }


x86 assembly (clang, -O0):
<cpApgAuthor>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpApgAuthor>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Lowell D. Thomas\00"
define i8* @cpApgAuthor() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [17 x i8] c"Lowell D. Thomas\00"
define i8* @cpApgAuthor() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ neug_get(int);
void random_get_salt(uint8_t *p) {
  uint32_t rnd;
  rnd = neug_get(1);
  memcpy(p, &rnd, sizeof(uint32_t));
  rnd = neug_get(1);
  memcpy(p + sizeof(uint32_t), &rnd, sizeof(uint32_t));
}


x86 assembly (clang, -O0):
<random_get_salt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <neug_get@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    $0x1,%edi
call   1030 <neug_get@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_get_salt>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x1,%edi
call   1030 <neug_get@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    $0x1,%edi
call   1030 <neug_get@plt>
mov    %eax,0x4(%rsp)
add    $0x10,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @random_get_salt(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = call i32 @neug_get(i32 1)
store i32 %4, i32* %3
%5 = load i32*, i32** %2
%6 = call i32 @memcpy(i32* %5, i32* %3, i32 4)
%7 = call i32 @neug_get(i32 1)
store i32 %7, i32* %3
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 4
%10 = call i32 @memcpy(i32* %9, i32* %3, i32 4)
ret void
}

LLVM IR (-O2):
define void @random_get_salt(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @neug_get(i32 1)
store i32 %4, i32* %2
%5 = call i32 @memcpy(i32* %0, i32* %2, i32 4)
%6 = call i32 @neug_get(i32 1)
store i32 %6, i32* %2
%7 = getelementptr inbounds i32, i32* %0, i64 4
%8 = call i32 @memcpy(i32* %7, i32* %2, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(unsigned char, unsigned char);
int foo(int x) {
  unsigned char a = x, b = x + 1;
  bar(a, b);
  a ^= b;
  b ^= a;
  a ^= b;
  bar(a, b);
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x6(%rbp)
mov    -0x5(%rbp),%al
movzbl %al,%edi
movzbl -0x6(%rbp),%esi
call   1030 <bar@plt>
movzbl -0x6(%rbp),%ecx
movzbl -0x5(%rbp),%eax
xor    %ecx,%eax
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%ecx
movzbl -0x6(%rbp),%eax
xor    %ecx,%eax
mov    %al,-0x6(%rbp)
movzbl -0x6(%rbp),%ecx
movzbl -0x5(%rbp),%eax
xor    %ecx,%eax
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
movzbl %al,%edi
movzbl -0x6(%rbp),%esi
call   1030 <bar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
push   %rax
movzbl %dil,%ebx
add    $0x1,%dil
movzbl %dil,%ebp
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <bar@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <bar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = trunc i32 %5 to i8
store i8 %6, i8* %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
%9 = trunc i32 %8 to i8
store i8 %9, i8* %4
%10 = load i8, i8* %3
%11 = load i8, i8* %4
%12 = call i32 @bar(i8 zeroext %10, i8 zeroext %11)
%13 = load i8, i8* %4
%14 = zext i8 %13 to i32
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = xor i32 %16, %14
%18 = trunc i32 %17 to i8
store i8 %18, i8* %3
%19 = load i8, i8* %3
%20 = zext i8 %19 to i32
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = xor i32 %22, %20
%24 = trunc i32 %23 to i8
store i8 %24, i8* %4
%25 = load i8, i8* %4
%26 = zext i8 %25 to i32
%27 = load i8, i8* %3
%28 = zext i8 %27 to i32
%29 = xor i32 %28, %26
%30 = trunc i32 %29 to i8
store i8 %30, i8* %3
%31 = load i8, i8* %3
%32 = load i8, i8* %4
%33 = call i32 @bar(i8 zeroext %31, i8 zeroext %32)
ret i32 0
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = add i8 %2, 1
%4 = tail call i32 @bar(i8 zeroext %2, i8 zeroext %3)
%5 = tail call i32 @bar(i8 zeroext %3, i8 zeroext %2)
ret i32 0
}
int c041(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @c041() {
ret i32 0
}

LLVM IR (-O2):
define i32 @c041() {
ret i32 0
}
int intcomp(int a, int b) {
  if (a == b)
    return 0;
  if (a > b)
    return 1;
  else
    return -1;
}


x86 assembly (clang, -O0):
<intcomp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1122 <intcomp+0x22>
movl   $0x0,-0x4(%rbp)
jmp    1141 <intcomp+0x41>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    113a <intcomp+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1141 <intcomp+0x41>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intcomp>:
xor    %ecx,%ecx
xor    %eax,%eax
cmp    %esi,%edi
setg   %al
lea    -0x1(%rax,%rax,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @intcomp(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 1, i32 -1
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void allocation_error() {
  extern char *__progname;
  fprintf(stderr, "Memory allocation failed in program %s.  Exiting.\n",
          __progname);
  exit(1);
}


x86 assembly (clang, -O0):
<allocation_error>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%rdx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<allocation_error>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdx
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [51 x i8] c"Memory allocation failed in program %s. Exiting.\0A\00"
@__progname = external global i8*
define void @allocation_error() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [51 x i8] c"Memory allocation failed in program %s. Exiting.\0A\00"
@__progname = external global i8*
define void @allocation_error() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("PASS\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"PASS\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [5 x i8] c"PASS\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  puts("Hello, world!");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ res_hl(int /*<<< orphan*/);
void opcb_86() { res_hl(0); }


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

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

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

LLVM IR (-O2):
define void @opcb_86() {
%1 = tail call i32 @res_hl(i32 0)
ret void
}
void lws_latency(struct libwebsocket_context *context, struct libwebsocket *wsi,
                 const char *action, int ret, int completion) {
  while (0)
    ;
}


x86 assembly (clang, -O0):
<lws_latency>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    1126 <lws_latency+0x26>
jmp    112b <lws_latency+0x2b>
jmp    1117 <lws_latency+0x17>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.libwebsocket_context = type opaque
%struct.libwebsocket = type opaque
define void @lws_latency(%struct.libwebsocket_context* %0, %struct.libwebsocket* %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca %struct.libwebsocket_context*
%7 = alloca %struct.libwebsocket*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store %struct.libwebsocket_context* %0, %struct.libwebsocket_context** %6
store %struct.libwebsocket* %1, %struct.libwebsocket** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
br label %11
11: ; preds = %12, %5
br i1 false, label %12, label %13
12: ; preds = %11
br label %11
13: ; preds = %11
ret void
}

LLVM IR (-O2):
%struct.libwebsocket_context = type opaque
%struct.libwebsocket = type opaque
define void @lws_latency(%struct.libwebsocket_context* nocapture %0, %struct.libwebsocket* nocapture %1, i8* nocapture %2, i32 %3, i32 %4) {
ret void
}