xunge/DecIR huggingface dataset:
int NumBits(int pc) {
  int i = 1, bit = 1;
  while (pc >= i) {
    i = i * 2;
    bit++;
  }
  return (bit);
}


x86 assembly (clang, -O0):
<NumBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1138 <NumBits+0x38>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <NumBits+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<NumBits>:
mov    $0x1,%eax
test   %edi,%edi
jle    1119 <NumBits+0x19>
mov    $0x1,%ecx
xchg   %ax,%ax
add    %ecx,%ecx
add    $0x1,%eax
cmp    %edi,%ecx
jle    1110 <NumBits+0x10>
ret

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

LLVM IR (-O2):
define i32 @NumBits(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 1, %1 ]
%5 = phi i32 [ %6, %3 ], [ 1, %1 ]
%6 = shl nsw i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp sgt i32 %6, %0
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %7, %3 ]
ret i32 %10
}
void nseel_asm_stack_pop_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_stack_pop_end() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *stdin;
int is_not_seekable(FILE *f) { return (f == stdin); }


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

x86 assembly (clang, -O2):
<is_not_seekable>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
cmp    %rdi,(%rcx)
sete   %al
ret

LLVM IR (-O0):
@stdin = global i32* null
define i32 @is_not_seekable(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32*, i32** @stdin
%5 = icmp eq i32* %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@stdin = global i32* null
define i32 @is_not_seekable(i32* nocapture readnone %0) {
%2 = load i32*, i32** @stdin
%3 = icmp eq i32* %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *calloc(int, int /*<<< orphan*/);
void test_calloc2(void) {
  char *foo = calloc(42, 0);
  for (unsigned i = 0; i < 100; i++) {
    foo[i] = 0;
  }
}


x86 assembly (clang, -O0):
<test_calloc2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2a,%edi
xor    %esi,%esi
call   1030 <calloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jae    1152 <test_calloc2+0x42>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112f <test_calloc2+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_calloc2() {
ret void
}
int test_imm_90uint8_mem(unsigned char *val) {
  return ((*val) & (0x90 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_90uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -112
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ strs_split_tst();
int main() {
  strs_split_tst();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @strs_split_tst()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ETHERNET_MACLP_DriverIRQHandler();
__attribute__((weak)) void ETHERNET_MACLP_IRQHandler(void) {
  ETHERNET_MACLP_DriverIRQHandler();
}


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

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

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

LLVM IR (-O2):
define weak void @ETHERNET_MACLP_IRQHandler() {
%1 = tail call i32 (...) @ETHERNET_MACLP_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void terror(char *s) {
  printf("ERR**** %s ****\n", s);
  exit(-1);
}


x86 assembly (clang, -O0):
<terror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<terror>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"ERR**** %s ****\0A\00"
define void @terror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [17 x i8] c"ERR**** %s ****\0A\00"
define void @terror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
void init_screens(void) {}


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

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

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

LLVM IR (-O2):
define void @init_screens() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ while_upto20(unsigned int);
void call_while_upto20_unsigned(unsigned x) { while_upto20(x); }


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

x86 assembly (clang, -O2):
<call_while_upto20_unsigned>:
jmp    1030 <while_upto20@plt>

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

LLVM IR (-O2):
define void @call_while_upto20_unsigned(i32 %0) {
%2 = tail call i32 @while_upto20(i32 %0)
ret void
}
/* Variables and functions */
void *CommonAlloc(size_t);
void *HoloStor_QuickAlloc(size_t size) { return CommonAlloc(size); }


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

x86 assembly (clang, -O2):
<HoloStor_QuickAlloc>:
jmp    1030 <CommonAlloc@plt>

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

LLVM IR (-O2):
define i8* @HoloStor_QuickAlloc(i64 %0) {
%2 = tail call i8* @CommonAlloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ errorCloseSock(char *, int);
int listen(int, int);
int listenForClient(int lSock) {
  int get = listen(lSock, 5);
  if (get < 0)
    errorCloseSock("listen error", lSock);
  return get;
}


x86 assembly (clang, -O0):
<listenForClient>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x5,%esi
call   1030 <listen@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1154 <listenForClient+0x34>
mov    -0x4(%rbp),%esi
lea    0xeb1(%rip),%rdi
call   1040 <errorCloseSock@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<listenForClient>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x5,%esi
call   1030 <listen@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    1143 <listenForClient+0x23>
lea    0xec4(%rip),%rdi
mov    %ebx,%esi
call   1040 <errorCloseSock@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"listen error\00"
define i32 @listenForClient(i32 %0) {
%2 = tail call i32 @listen(i32 %0, i32 5)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @errorCloseSock(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %4, %1
ret i32 %2
}
int __parse_digit(const int current_value, const char c) {
  return (c - '0') + current_value * 10;
}


x86 assembly (clang, -O0):
<__parse_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
imul   $0xa,-0x4(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__parse_digit>:
lea    (%rdi,%rdi,4),%eax
lea    (%rsi,%rax,2),%eax
add    $0xffffffd0,%eax
ret

LLVM IR (-O0):
define i32 @__parse_digit(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 48
%8 = load i32, i32* %3
%9 = mul nsw i32 %8, 10
%10 = add nsw i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @__parse_digit(i32 %0, i8 signext %1) {
%3 = sext i8 %1 to i32
%4 = mul nsw i32 %0, 10
%5 = add i32 %4, -48
%6 = add i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int syscall(int, char const *, int);
int access(const char *filename, int amode) {
  return syscall(33, filename, amode);
}


x86 assembly (clang, -O0):
<access>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x21,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<access>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x21,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @access(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @syscall(i32 33, i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @access(i8* %0, i32 %1) {
%3 = tail call i32 @syscall(i32 33, i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ setCursorAtHome_24064();
void setCursorAtHome(void) { setCursorAtHome_24064(); }


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

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

LLVM IR (-O0):
define void @setCursorAtHome() {
%1 = call i32 (...) @setCursorAtHome_24064()
ret void
}

LLVM IR (-O2):
define void @setCursorAtHome() {
%1 = tail call i32 (...) @setCursorAtHome_24064()
ret void
}
int findStartCode3(unsigned char *Buf) {
  if (Buf[0] != 0 || Buf[1] != 0 || Buf[2] != 0 || Buf[3] != 1)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<findStartCode3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
jne    114b <findStartCode3+0x4b>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    114b <findStartCode3+0x4b>
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%eax
cmp    $0x0,%eax
jne    114b <findStartCode3+0x4b>
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
cmp    $0x1,%eax
je     1157 <findStartCode3+0x57>
movl   $0x0,-0x4(%rbp)
jmp    115e <findStartCode3+0x5e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findStartCode3>:
xor    %eax,%eax
cmpb   $0x0,(%rdi)
je     1108 <findStartCode3+0x8>
ret
cmpb   $0x0,0x1(%rdi)
jne    1107 <findStartCode3+0x7>
cmpb   $0x0,0x2(%rdi)
jne    1107 <findStartCode3+0x7>
xor    %eax,%eax
cmpb   $0x1,0x3(%rdi)
sete   %al
ret

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

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


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

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

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

LLVM IR (-O2):
define void @task_led_entry(i8* nocapture %0) {
ret void
}
int XMaxCmapsOfScreen() {}


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

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

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

LLVM IR (-O2):
define i32 @XMaxCmapsOfScreen() {
ret i32 undef
}
unsigned xrop3_95_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = D & T;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_95_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_95_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
not    %eax
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_95_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
store i32 %14, i32* %6
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 8
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
store i32 %20, i32* %7
%21 = load i32, i32* %5
%22 = load i32, i32* %7
%23 = and i32 %21, %22
store i32 %23, i32* %8
%24 = load i32, i32* %8
%25 = xor i32 %24, -1
store i32 %25, i32* %8
%26 = load i32, i32* %8
%27 = load i32, i32* %6
%28 = xor i32 %27, -1
%29 = and i32 %26, %28
%30 = load i32, i32* %7
%31 = xor i32 %30, -1
%32 = and i32 %29, %31
%33 = load i32, i32* %5
%34 = load i32, i32* %6
%35 = and i32 %33, %34
%36 = or i32 %32, %35
%37 = load i32, i32* %5
%38 = load i32, i32* %7
%39 = and i32 %37, %38
%40 = or i32 %36, %39
ret i32 %40
}

LLVM IR (-O2):
define i32 @xrop3_95_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
ret i32 %11
}
void sidt(void *ptr) { __asm__ __volatile__("sidt (%0)" : : "r"(ptr)); }


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

x86 assembly (clang, -O2):
<sidt>:
sidt   (%rdi)
ret

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

LLVM IR (-O2):
define void @sidt(i8* %0) {
tail call void asm sideeffect "sidt ($0)", "r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ strtoul(char *, int /*<<< orphan*/, int);
int atoi(const char *str) {
  char *s = (char *)str;
  return ((int)strtoul(s, 0, 10));
}


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

x86 assembly (clang, -O2):
<atoi>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtoul@plt>

LLVM IR (-O0):
define i32 @atoi(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 = call i64 @strtoul(i8* %5, i32 0, i32 10)
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @atoi(i8* %0) {
%2 = tail call i64 @strtoul(i8* %0, i32 0, i32 10)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ isspace(char);
int strlen(char *);
int value_has_spaces(char *v) {
  if (isspace(*v) || isspace(v[strlen(v) - 1]))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<value_has_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
jne    1172 <value_has_spaces+0x52>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     117e <value_has_spaces+0x5e>
movl   $0x1,-0x4(%rbp)
jmp    1185 <value_has_spaces+0x65>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<value_has_spaces>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1040 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     113b <value_has_spaces+0x1b>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movsbl -0x1(%rax,%rbx,1),%edi
call   1040 <isspace@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @value_has_spaces(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @isspace(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = tail call i32 @strlen(i8* %0)
%7 = add nsw i32 %6, -1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = tail call i64 @isspace(i8 signext %10)
%12 = icmp ne i64 %11, 0
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %5, %1
%15 = phi i32 [ 1, %1 ], [ %13, %5 ]
ret i32 %15
}
double __fma(double x, double y, double z) { return (x * y) + z; }


x86 assembly (clang, -O0):
<__fma>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fma>:
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @__fma(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call double @llvm.fmuladd.f64(double %7, double %8, double %9)
ret double %10
}

LLVM IR (-O2):
define double @__fma(double %0, double %1, double %2) {
%4 = tail call double @llvm.fmuladd.f64(double %0, double %1, double %2)
ret double %4
}
void initStackBottom(void) {
  void *volatile locals;
  locals = 0;
  locals = ((void *)(&locals));
  setStackBottom(locals);
}


x86 assembly (clang, -O0):
<initStackBottom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <setStackBottom@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initStackBottom>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rax
mov    %rax,(%rsp)
mov    (%rsp),%rdi
xor    %eax,%eax
call   1030 <setStackBottom@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @initStackBottom() {
%1 = alloca i8*
store volatile i8* null, i8** %1
%2 = bitcast i8** %1 to i8*
store volatile i8* %2, i8** %1
%3 = load volatile i8*, i8** %1
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @setStackBottom to i32 (i8*, ...)*)(i8* %3)
ret void
}

LLVM IR (-O2):
define void @initStackBottom() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
store volatile i8* null, i8** %1
store volatile i8* %2, i8** %1
%3 = load volatile i8*, i8** %1
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @setStackBottom to i32 (i8*, ...)*)(i8* %3)
ret void
}
/* Type definitions */
struct Wall {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct Wall *);
void wall_delete(struct Wall *wall) { free(wall); }


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

x86 assembly (clang, -O2):
<wall_delete>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.Wall = type { i32 }
define void @wall_delete(%struct.Wall* nocapture %0) {
%2 = tail call i32 @free(%struct.Wall* %0)
ret void
}
char mapdn(char c) {
  if (c >= 'A' && c <= 'Z')
    return ((char)(c + 040));
  return (c);
}


x86 assembly (clang, -O0):
<mapdn>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1133 <mapdn+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1133 <mapdn+0x33>
movsbl -0x2(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1139 <mapdn+0x39>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapdn>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @mapdn(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 32
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %18
16: ; preds = %7, %1
%17 = load i8, i8* %3
store i8 %17, i8* %2
br label %18
18: ; preds = %16, %11
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @mapdn(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
char valueToXDigit(int v) {
  do {
  } while (0);
  if (v >= 0xA)
    return 'A' + (v - 0xA);
  else
    return '0' + v;
}


x86 assembly (clang, -O0):
<valueToXDigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
jmp    110c <valueToXDigit+0xc>
cmpl   $0xa,-0x8(%rbp)
jl     1127 <valueToXDigit+0x27>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
mov    %al,-0x1(%rbp)
jmp    1130 <valueToXDigit+0x30>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valueToXDigit>:
cmp    $0xa,%edi
mov    $0x37,%ecx
mov    $0x30,%eax
cmovge %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @valueToXDigit(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
br label %4
4: ; preds = %1
br label %5
5: ; preds = %4
%6 = load i32, i32* %3
%7 = icmp sge i32 %6, 10
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 10
%11 = add nsw i32 65, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %2
br label %17
13: ; preds = %5
%14 = load i32, i32* %3
%15 = add nsw i32 48, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %17
17: ; preds = %13, %8
%18 = load i8, i8* %2
ret i8 %18
}

LLVM IR (-O2):
define signext i8 @valueToXDigit(i32 %0) {
%2 = icmp sgt i32 %0, 9
%3 = trunc i32 %0 to i8
%4 = select i1 %2, i8 55, i8 48
%5 = add i8 %4, %3
ret i8 %5
}
void f18_d() {
  int x = 0;
  do
    x = 10;
  while (1);
}


x86 assembly (clang, -O0):
<f18_d>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x4(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    110b <f18_d+0xb>
jmp    1121 <f18_d+0x21>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f18_d() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %3, %0
store i32 10, i32* %1
br label %3
3: ; preds = %2
br i1 true, label %2, label %4
4: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @f18_d() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int read32(void *);
int /*<<< orphan*/ write32(int, void *);
void setbits32(uint32_t bits, void *addr) {
  write32(read32(addr) | bits, addr);
}


x86 assembly (clang, -O0):
<setbits32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <read32@plt>
mov    %eax,%edi
or     -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <write32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbits32>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <read32@plt>
or     %eax,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write32@plt>

LLVM IR (-O0):
define void @setbits32(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @read32(i8* %5)
%7 = load i32, i32* %3
%8 = or i32 %6, %7
%9 = load i8*, i8** %4
%10 = call i32 @write32(i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
define void @setbits32(i32 %0, i8* %1) {
%3 = tail call i32 @read32(i8* %1)
%4 = or i32 %3, %0
%5 = tail call i32 @write32(i32 %4, i8* %1)
ret void
}
/* Variables and functions */
scalar_t__ mik_isalpha(int);
scalar_t__ mik_isdigit(int);
int mik_isalnum(int c) { return (mik_isalpha(c) || mik_isdigit(c)); }


x86 assembly (clang, -O0):
<mik_isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <mik_isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <mik_isalnum+0x37>
mov    -0x4(%rbp),%edi
call   1030 <mik_isdigit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mik_isalnum>:
push   %rbx
mov    %edi,%ebx
call   1040 <mik_isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <mik_isalnum+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <mik_isdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mik_isalnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @mik_isalpha(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @mik_isdigit(i32 %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @mik_isalnum(i32 %0) {
%2 = tail call i64 @mik_isalpha(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @mik_isdigit(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ die(char *, char const *);
scalar_t__ errno;
int /*<<< orphan*/ *fopen(char const *, char const *);
FILE *efopen(const char *filename, const char *mode) {
  FILE *file;
  errno = 0;
  if (NULL == (file = fopen(filename, mode)) || errno != 0)
    die("failed to open file: %s", filename);
  return file;
}


x86 assembly (clang, -O0):
<efopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fopen@plt>
mov    %rax,%rcx
mov    %rcx,-0x18(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
je     116e <efopen+0x4e>
mov    0x2e7c(%rip),%rax
cmpq   $0x0,(%rax)
je     117e <efopen+0x5e>
mov    -0x8(%rbp),%rsi
lea    0xe87(%rip),%rdi
call   1040 <die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<efopen>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
mov    0x2eb1(%rip),%r15
movq   $0x0,(%r15)
call   1030 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1149 <efopen+0x29>
cmpq   $0x0,(%r15)
je     1158 <efopen+0x38>
lea    0xeb0(%rip),%rdi
mov    %r14,%rsi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@errno = global i64 0
@.str = [24 x i8] c"failed to open file: %s\00"
define i32* @efopen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i64 0, i64* @errno
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = icmp eq i32* null, %8
br i1 %9, label %13, label %10
10: ; preds = %2
%11 = load i64, i64* @errno
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10, %2
%14 = load i8*, i8** %3
%15 = call i32 @die(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %14)
br label %16
16: ; preds = %13, %10
%17 = load i32*, i32** %5
ret i32* %17
}

LLVM IR (-O2):
@errno = global i64 0
@.str = [24 x i8] c"failed to open file: %s\00"
define noalias i32* @efopen(i8* %0, i8* nocapture %1) {
store i64 0, i64* @errno
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
%5 = load i64, i64* @errno
%6 = icmp ne i64 %5, 0
%7 = select i1 %4, i1 true, i1 %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @die(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %10
10: ; preds = %2, %8
ret i32* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int8_t;

/* Variables and functions */
int /*<<< orphan*/ epixel_blend8_1(int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
u_int8_t reference_blend(u_int8_t a, u_int8_t s, u_int8_t d) {
  return epixel_blend8_1(a, s, d);
}


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

x86 assembly (clang, -O2):
<reference_blend>:
jmp    1030 <epixel_blend8_1@plt>

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

LLVM IR (-O2):
define i32 @reference_blend(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @epixel_blend8_1(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
int execute_msync() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_msync() {
ret i32 0
}
void addEdge(int **g, int i, int j) { g[i][j] = 1; }


x86 assembly (clang, -O0):
<addEdge>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<addEdge>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rax
movslq %edx,%rcx
movl   $0x1,(%rax,%rcx,4)
ret

LLVM IR (-O0):
define void @addEdge(i32** %0, i32 %1, i32 %2) {
%4 = alloca i32**
%5 = alloca i32
%6 = alloca i32
store i32** %0, i32*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32**, i32*** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32*, i32** %7, i64 %9
%11 = load i32*, i32** %10
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
store i32 1, i32* %14
ret void
}

LLVM IR (-O2):
define void @addEdge(i32** nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32*, i32** %0, i64 %4
%6 = load i32*, i32** %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %6, i64 %7
store i32 1, i32* %8
ret void
}
/* Variables and functions */
scalar_t__ INT_MAX;
int random();
double gen_pause_uniform(int min, int max) {
  int p = random();
  double f = p / (double)INT_MAX;
  return min + (max - min) * f;
}


x86 assembly (clang, -O0):
<gen_pause_uniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
mov    0x2eb4(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_pause_uniform>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <random@plt>
cvtsi2sd %eax,%xmm1
mov    0x2ebf(%rip),%rax
cvtsi2sdq (%rax),%xmm0
divsd  %xmm0,%xmm1
cvtsi2sd %ebp,%xmm2
sub    %ebp,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@INT_MAX = global i64 0
define double @gen_pause_uniform(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = call i32 (...) @random()
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = sitofp i32 %8 to double
%10 = load i64, i64* @INT_MAX
%11 = sitofp i64 %10 to double
%12 = fdiv double %9, %11
store double %12, double* %6
%13 = load i32, i32* %3
%14 = sitofp i32 %13 to double
%15 = load i32, i32* %4
%16 = load i32, i32* %3
%17 = sub nsw i32 %15, %16
%18 = sitofp i32 %17 to double
%19 = load double, double* %6
%20 = call double @llvm.fmuladd.f64(double %18, double %19, double %14)
ret double %20
}

LLVM IR (-O2):
@INT_MAX = global i64 0
define double @gen_pause_uniform(i32 %0, i32 %1) {
%3 = tail call i32 (...) @random()
%4 = sitofp i32 %3 to double
%5 = load i64, i64* @INT_MAX
%6 = sitofp i64 %5 to double
%7 = fdiv double %4, %6
%8 = sitofp i32 %0 to double
%9 = sub nsw i32 %1, %0
%10 = sitofp i32 %9 to double
%11 = tail call double @llvm.fmuladd.f64(double %10, double %7, double %8)
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ BTESH2_GfxCon_PrintChar(int /*<<< orphan*/);
int BTESH2_GfxCon_PrintString(char *str) {
  char *s;
  s = str;
  while (*s) {
    BTESH2_GfxCon_PrintChar(*s++);
  }
  return (0);
}


x86 assembly (clang, -O0):
<BTESH2_GfxCon_PrintString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114d <BTESH2_GfxCon_PrintString+0x3d>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1030 <BTESH2_GfxCon_PrintChar@plt>
jmp    1124 <BTESH2_GfxCon_PrintString+0x14>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BTESH2_GfxCon_PrintString>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <BTESH2_GfxCon_PrintString+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <BTESH2_GfxCon_PrintChar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <BTESH2_GfxCon_PrintString+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @BTESH2_GfxCon_PrintString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @BTESH2_GfxCon_PrintChar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cputs(char *);
int cmd_help(int argc, char **argv) {
  cputs("This is help.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"This is help.\0A\00"
define i32 @cmd_help(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @cputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"This is help.\0A\00"
define i32 @cmd_help(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @cputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct clad_sb {
  int dummy;
};

/* Variables and functions */
struct clad_sb *clad_sb_center_cstr(struct clad_sb *me, int length,
                                    const char *padding) {
  return NULL;
}


x86 assembly (clang, -O0):
<clad_sb_center_cstr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.clad_sb = type { i32 }
define %struct.clad_sb* @clad_sb_center_cstr(%struct.clad_sb* %0, i32 %1, i8* %2) {
%4 = alloca %struct.clad_sb*
%5 = alloca i32
%6 = alloca i8*
store %struct.clad_sb* %0, %struct.clad_sb** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
ret %struct.clad_sb* null
}

LLVM IR (-O2):
%struct.clad_sb = type { i32 }
define noalias %struct.clad_sb* @clad_sb_center_cstr(%struct.clad_sb* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
ret %struct.clad_sb* null
}
int Fibonacci(int n) {
  if (n == 0) {
    return 0;
  } else if (n == 1) {
    return 1;
  } else {
    return Fibonacci(n - 1) + Fibonacci(n - 2);
  }
}


x86 assembly (clang, -O0):
<Fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <Fibonacci+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116a <Fibonacci+0x5a>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <Fibonacci+0x37>
movl   $0x1,-0x4(%rbp)
jmp    116a <Fibonacci+0x5a>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <Fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <Fibonacci@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):
<Fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%ebx
jb     1132 <Fibonacci+0x22>
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <Fibonacci@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x2,%ebx
jae    1120 <Fibonacci+0x10>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Fibonacci(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 %19
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 1, i32* %2
br label %19
11: ; preds = %7
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
%14 = call i32 @Fibonacci(i32 %13)
%15 = load i32, i32* %3
%16 = sub nsw i32 %15, 2
%17 = call i32 @Fibonacci(i32 %16)
%18 = add nsw i32 %14, %17
store i32 %18, i32* %2
br label %19
19: ; preds = %11, %10, %6
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @Fibonacci(i32 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i32 [ 0, %1 ], [ %10, %6 ]
%4 = phi i32 [ %0, %1 ], [ %9, %6 ]
%5 = icmp ult i32 %4, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = add nsw i32 %4, -1
%8 = tail call i32 @Fibonacci(i32 %7)
%9 = add nsw i32 %4, -2
%10 = add nsw i32 %8, %3
br label %2
11: ; preds = %2
%12 = add nsw i32 %4, %3
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ clear_screen();
int /*<<< orphan*/ print(char *);
int main() {
  clear_screen();
  print("Hello, World!\nGood day, Earthlings!");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"Hello, World!\0AGood day, Earthlings!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @clear_screen()
%3 = call i32 @print(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"Hello, World!\0AGood day, Earthlings!\00"
define i32 @main() {
%1 = tail call i32 (...) @clear_screen()
%2 = tail call i32 @print(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret i32 0
}