xunge/DecIR huggingface dataset:
/* Variables and functions */
int close(int);
int errno;
int k_close(int fd) {
  int rc = close(fd);
  if (rc)
    return errno;
  return 0;
}


x86 assembly (clang, -O0):
<k_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1141 <k_close+0x31>
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <k_close+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<k_close>:
push   %rax
call   1030 <close@plt>
test   %eax,%eax
je     1123 <k_close+0x13>
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @k_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, 0
%4 = load i32, i32* @errno
%5 = select i1 %3, i32 0, i32 %4
ret i32 %5
}
void emit_apply(struct processor_explicatory_state *process_state,
                struct modern_stream *stream, void *stream_state,
                struct modern_vfile *vfile, void *vfile_state) {}


x86 assembly (clang, -O0):
<emit_apply>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_apply(%struct.processor_explicatory_state* %0, %struct.modern_stream* %1, i8* %2, %struct.modern_vfile* %3, i8* %4) {
%6 = alloca %struct.processor_explicatory_state*
%7 = alloca %struct.modern_stream*
%8 = alloca i8*
%9 = alloca %struct.modern_vfile*
%10 = alloca i8*
store %struct.processor_explicatory_state* %0, %struct.processor_explicatory_state** %6
store %struct.modern_stream* %1, %struct.modern_stream** %7
store i8* %2, i8** %8
store %struct.modern_vfile* %3, %struct.modern_vfile** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_apply(%struct.processor_explicatory_state* nocapture %0, %struct.modern_stream* nocapture %1, i8* nocapture %2, %struct.modern_vfile* nocapture %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xed() {
  Assert_real((isprint(237) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              1190, ("isprint should be 0 for 0xed"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xed>:
push   %rax
mov    $0xed,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4a6,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xed\00"
define void @t_isprint_0xed() {
%1 = tail call i64 @isprint(i32 237)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1190, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void Tcl_Free(ptr) char *ptr;
{ TclpFree(ptr); }


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

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

LLVM IR (-O0):
define void @Tcl_Free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @TclpFree to i32 (i8*, ...)*)(i8* %3)
ret void
}

LLVM IR (-O2):
define void @Tcl_Free(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @TclpFree to i32 (i8*, ...)*)(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GPUupdateLace();
void ZN_GPUupdateLace(void) { GPUupdateLace(); }


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

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

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

LLVM IR (-O2):
define void @ZN_GPUupdateLace() {
%1 = tail call i32 (...) @GPUupdateLace()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ say(int, char *);
void disconnect_client(int socket, char *msg) {
  say(socket, msg);
  close(socket);
  exit(0);
}


x86 assembly (clang, -O0):
<disconnect_client>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <say@plt>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<disconnect_client>:
push   %rbx
mov    %edi,%ebx
call   1050 <say@plt>
mov    %ebx,%edi
call   1030 <close@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @disconnect_client(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @say(i32 %5, i8* %6)
%8 = load i32, i32* %3
%9 = call i32 @close(i32 %8)
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @disconnect_client(i32 %0, i8* %1) {
%3 = tail call i32 @say(i32 %0, i8* %1)
%4 = tail call i32 @close(i32 %0)
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
bool is_i(uint32_t c) { return c == ((uint32_t)0x0049); }


x86 assembly (clang, -O0):
<is_i>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x49,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_i>:
xor    %eax,%eax
cmp    $0x49,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_i(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 73
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @is_i(i64 %0) {
%2 = icmp eq i64 %0, 73
%3 = zext i1 %2 to i32
ret i32 %3
}
void handle_34(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_34(i32 %0) {
ret void
}
/* Type definitions */
struct timespec {
  int member_1;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int nanosleep(struct timespec *, struct timespec *);
int main(void) {
  struct timespec req = {0, 42};
  struct timespec rem;
  int status;
  status = nanosleep(&req, &rem);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x2a00000000,%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <nanosleep@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@__const.main.req = %struct.timespec { i32 0, i32 42 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timespec
%3 = alloca %struct.timespec
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast %struct.timespec* %2 to i8*
%6 = call i32 @nanosleep(%struct.timespec* %2, %struct.timespec* %3)
store i32 %6, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to %struct.timespec*
%3 = alloca %struct.timespec
%4 = bitcast i64* %1 to i8*
store i64 180388626432, i64* %1
%5 = bitcast %struct.timespec* %3 to i8*
%6 = call i32 @nanosleep(%struct.timespec* %2, %struct.timespec* %3)
ret i32 0
}
unsigned long f10(unsigned long x, int y) { return x & ((1L << y) - 1); }


x86 assembly (clang, -O0):
<f10>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f10>:
mov    %esi,%ecx
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
not    %rax
and    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @f10(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = zext i32 %6 to i64
%8 = shl i64 1, %7
%9 = sub nsw i64 %8, 1
%10 = and i64 %5, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @f10(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = shl nsw i64 -1, %3
%5 = xor i64 %4, -1
%6 = and i64 %5, %0
ret i64 %6
}
/* Variables and functions */
scalar_t__ fmin(double, double);
int /*<<< orphan*/ link_failure_fmin();
void test_fmin(double d1, double d2) {
  if (fmin(d1, d2) != fmin(d1, d2))
    link_failure_fmin();
}


x86 assembly (clang, -O0):
<test_fmin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <fmin@plt>
mov    %rax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <fmin@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     116b <test_fmin+0x4b>
mov    $0x0,%al
call   1030 <link_failure_fmin@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fmin>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
call   1040 <fmin@plt>
mov    %rax,%rbx
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <fmin@plt>
cmp    %rax,%rbx
jne    1153 <test_fmin+0x33>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_fmin@plt>

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

LLVM IR (-O2):
define void @test_fmin(double %0, double %1) {
%3 = tail call i64 @fmin(double %0, double %1)
%4 = tail call i64 @fmin(double %0, double %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_fmin()
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
void bar(int n) {
  for (int i = 0; i < n; i++)
    foo(i);
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1144 <bar+0x34>
mov    -0x8(%rbp),%edi
call   1030 <foo@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <bar+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    112e <bar+0x1e>
mov    %edi,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <foo@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1120 <bar+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @bar(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @foo(i32 %5)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
}
void gtk_entry_text_index_to_layout_index() {}


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

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

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

LLVM IR (-O2):
define void @gtk_entry_text_index_to_layout_index() {
ret void
}
short nextChar(char const *str) { return *(str + 1); }


x86 assembly (clang, -O0):
<nextChar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextChar>:
movsbl 0x1(%rdi),%eax
ret

LLVM IR (-O0):
define signext i16 @nextChar(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i16
ret i16 %6
}

LLVM IR (-O2):
define signext i16 @nextChar(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = sext i8 %3 to i16
ret i16 %4
}
/* Variables and functions */
int getdtablesize();
int _rpc_dtablesize() {
  static int size;
  if (size == 0) {
    size = getdtablesize();
  }
  return (size);
}


x86 assembly (clang, -O0):
<_rpc_dtablesize>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
jne    112e <_rpc_dtablesize+0x1e>
mov    $0x0,%al
call   1030 <getdtablesize@plt>
mov    %eax,0x2efe(%rip)
mov    0x2ef8(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_rpc_dtablesize>:
push   %rax
mov    0x2f15(%rip),%eax
test   %eax,%eax
je     111d <_rpc_dtablesize+0xd>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <getdtablesize@plt>
mov    %eax,0x2f02(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@_rpc_dtablesize.size = internal global i32 0
define i32 @_rpc_dtablesize() {
%1 = load i32, i32* @_rpc_dtablesize.size
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @getdtablesize()
store i32 %4, i32* @_rpc_dtablesize.size
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @_rpc_dtablesize.size
ret i32 %6
}

LLVM IR (-O2):
@_rpc_dtablesize.size = internal unnamed_addr global i32 0
define i32 @_rpc_dtablesize() {
%1 = load i32, i32* @_rpc_dtablesize.size
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @getdtablesize()
store i32 %4, i32* @_rpc_dtablesize.size
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(int, unsigned char *);
unsigned char CheckId_SIV100B(void) {
  unsigned char temp1;
  unsigned char temp2;
  VIM_SIF_I2cReadByte(0x01, &temp1);
  VIM_SIF_I2cReadByte(0x02, &temp2);
  if ((temp1 == 0x0C) && (temp2 == 0x11))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    -0x2(%rbp),%rsi
call   1030 <VIM_SIF_I2cReadByte@plt>
mov    $0x2,%edi
lea    -0x3(%rbp),%rsi
call   1030 <VIM_SIF_I2cReadByte@plt>
movzbl -0x2(%rbp),%eax
cmp    $0xc,%eax
jne    1157 <CheckId_SIV100B+0x47>
movzbl -0x3(%rbp),%eax
cmp    $0x11,%eax
jne    1157 <CheckId_SIV100B+0x47>
movb   $0x1,-0x1(%rbp)
jmp    115b <CheckId_SIV100B+0x4b>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
lea    0x6(%rsp),%rsi
mov    $0x2,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
mov    0x7(%rsp),%al
xor    $0xc,%al
mov    0x6(%rsp),%cl
xor    $0x11,%cl
or     %al,%cl
sete   %al
pop    %rcx
ret

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

LLVM IR (-O2):
define zeroext i8 @CheckId_SIV100B() {
%1 = alloca i8
%2 = alloca i8
%3 = call i32 @VIM_SIF_I2cReadByte(i32 1, i8* %1)
%4 = call i32 @VIM_SIF_I2cReadByte(i32 2, i8* %2)
%5 = load i8, i8* %1
%6 = icmp eq i8 %5, 12
%7 = load i8, i8* %2
%8 = icmp eq i8 %7, 17
%9 = select i1 %6, i1 %8, i1 false
%10 = zext i1 %9 to i8
ret i8 %10
}
void b_init() {}


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

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

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

LLVM IR (-O2):
define void @b_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_nfa_engine();
void test_scil(void) { test_nfa_engine(); }


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

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

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

LLVM IR (-O2):
define void @test_scil() {
%1 = tail call i32 (...) @test_nfa_engine()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int i, j, k;
  while (i < 1) {
    printf("1\n");
  next:
    while (k < 25) {
      if (i == 1) {
        printf("2\n");
        goto next;
      } else {
        printf("3\n");
      }
      k++;
    }
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1187 <main+0x77>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
jmp    113a <main+0x2a>
cmpl   $0x19,-0x10(%rbp)
jge    1179 <main+0x69>
cmpl   $0x1,-0x8(%rbp)
jne    115f <main+0x4f>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    1135 <main+0x25>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113a <main+0x2a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"1\0A\00"
@.str.1 = [3 x i8] c"2\0A\00"
@.str.2 = [3 x i8] c"3\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
br label %5
5: ; preds = %24, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 1
br i1 %7, label %8, label %27
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %17, %8
br label %11
11: ; preds = %21, %10
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 25
br i1 %13, label %14, label %24
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %10
19: ; preds = %14
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %21
21: ; preds = %19
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %11
24: ; preds = %11
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %5
27: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void h6(char *str) { printf("<H6>%s</H6>\n", str); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"<H6>%s</H6>\0A\00"
define void @h6(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"<H6>%s</H6>\0A\00"
define void @h6(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct plainstring {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ plainstring_add_plainstring(struct plainstring *,
                                               struct plainstring const *);
void plainstring_sum_of_2(struct plainstring *this_string,
                          const struct plainstring *s1,
                          const struct plainstring *s2) {
  plainstring_add_plainstring(this_string, s1);
  plainstring_add_plainstring(this_string, s2);
}


x86 assembly (clang, -O0):
<plainstring_sum_of_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <plainstring_add_plainstring@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <plainstring_add_plainstring@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plainstring_sum_of_2>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <plainstring_add_plainstring@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <plainstring_add_plainstring@plt>

LLVM IR (-O0):
%struct.plainstring = type { i32 }
define void @plainstring_sum_of_2(%struct.plainstring* %0, %struct.plainstring* %1, %struct.plainstring* %2) {
%4 = alloca %struct.plainstring*
%5 = alloca %struct.plainstring*
%6 = alloca %struct.plainstring*
store %struct.plainstring* %0, %struct.plainstring** %4
store %struct.plainstring* %1, %struct.plainstring** %5
store %struct.plainstring* %2, %struct.plainstring** %6
%7 = load %struct.plainstring*, %struct.plainstring** %4
%8 = load %struct.plainstring*, %struct.plainstring** %5
%9 = call i32 @plainstring_add_plainstring(%struct.plainstring* %7, %struct.plainstring* %8)
%10 = load %struct.plainstring*, %struct.plainstring** %4
%11 = load %struct.plainstring*, %struct.plainstring** %6
%12 = call i32 @plainstring_add_plainstring(%struct.plainstring* %10, %struct.plainstring* %11)
ret void
}

LLVM IR (-O2):
%struct.plainstring = type { i32 }
define void @plainstring_sum_of_2(%struct.plainstring* %0, %struct.plainstring* %1, %struct.plainstring* %2) {
%4 = tail call i32 @plainstring_add_plainstring(%struct.plainstring* %0, %struct.plainstring* %1)
%5 = tail call i32 @plainstring_add_plainstring(%struct.plainstring* %0, %struct.plainstring* %2)
ret void
}
/* Variables and functions */
double fabs(double);
double f(double *x, double *y) { return fabs(*x + *y); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
movaps 0xedd(%rip),%xmm1
pand   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movsd  (%rdi),%xmm0
addsd  (%rsi),%xmm0
andpd  0xef0(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @f(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fadd double %3, %4
%6 = tail call double @llvm.fabs.f64(double %5)
ret double %6
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double tanhl(long double x) { return __infer_nondet_long_double(); }


x86 assembly (clang, -O0):
<tanhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @tanhl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @tanhl(x86_fp80 %0) {
%2 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %2
}
int F3() { return 1; }


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

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

LLVM IR (-O0):
define i32 @F3() {
ret i32 1
}

LLVM IR (-O2):
define i32 @F3() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ createFullPathFromFileName(char *, char *);
scalar_t__ remove(char *);
bool FileSystem_deleteFile(char *filename) {
  char fullPath[sizeof("./vmd-filestore/") + 255];
  createFullPathFromFileName(fullPath, filename);
  if (remove(fullPath) == 0)
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<FileSystem_deleteFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <createFullPathFromFileName@plt>
lea    -0x120(%rbp),%rdi
call   1030 <remove@plt>
cmp    $0x0,%rax
jne    1161 <FileSystem_deleteFile+0x41>
movl   $0x1,-0x4(%rbp)
jmp    1168 <FileSystem_deleteFile+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileSystem_deleteFile>:
push   %rbx
sub    $0x110,%rsp
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <createFullPathFromFileName@plt>
mov    %rbx,%rdi
call   1030 <remove@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x110,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @FileSystem_deleteFile(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [272 x i8]
store i8* %0, i8** %3
%5 = getelementptr inbounds [272 x i8], [272 x i8]* %4, i64 0, i64 0
%6 = load i8*, i8** %3
%7 = call i32 @createFullPathFromFileName(i8* %5, i8* %6)
%8 = getelementptr inbounds [272 x i8], [272 x i8]* %4, i64 0, i64 0
%9 = call i64 @remove(i8* %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @FileSystem_deleteFile(i8* %0) {
%2 = alloca [272 x i8]
%3 = getelementptr inbounds [272 x i8], [272 x i8]* %2, i64 0, i64 0
%4 = call i32 @createFullPathFromFileName(i8* %3, i8* %0)
%5 = call i64 @remove(i8* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
void pathconN_nm10_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @pathconN_nm10_incref() {
ret void
}
int bics_si_test2(int a, int b, int c) {
  if ((a | b) == b)
    return b;
  else
    return c;
}


x86 assembly (clang, -O0):
<bics_si_test2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1127 <bics_si_test2+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112d <bics_si_test2+0x2d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bics_si_test2>:
mov    %edx,%eax
mov    %esi,%ecx
not    %ecx
test   %edi,%ecx
cmove  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @bics_si_test2(i32 %0, i32 %1, i32 %2) {
%4 = or i32 %1, %0
%5 = icmp eq i32 %4, %1
%6 = select i1 %5, i32 %1, i32 %2
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ veripac9_writeMemory(int, int);
void veripac9_reset() {
  veripac9_writeMemory(0xCA, 3);
  veripac9_writeMemory(0xCA, 0);
}


x86 assembly (clang, -O0):
<veripac9_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0xca,%edi
mov    $0x3,%esi
call   1030 <veripac9_writeMemory@plt>
mov    $0xca,%edi
xor    %esi,%esi
call   1030 <veripac9_writeMemory@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<veripac9_reset>:
push   %rax
mov    $0xca,%edi
mov    $0x3,%esi
call   1030 <veripac9_writeMemory@plt>
mov    $0xca,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <veripac9_writeMemory@plt>

LLVM IR (-O0):
define void @veripac9_reset() {
%1 = call i32 @veripac9_writeMemory(i32 202, i32 3)
%2 = call i32 @veripac9_writeMemory(i32 202, i32 0)
ret void
}

LLVM IR (-O2):
define void @veripac9_reset() {
%1 = tail call i32 @veripac9_writeMemory(i32 202, i32 3)
%2 = tail call i32 @veripac9_writeMemory(i32 202, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ffclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void ps_close(FILE *ps) {
  fprintf(ps, "%%showpage\n");
  fprintf(ps, "%%%%EOF\n");
  ffclose(ps);
}


x86 assembly (clang, -O0):
<ps_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ffclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ps_close>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xed5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <fprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <ffclose@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%%showpage\0A\00"
@.str.1 = [9 x i8] c"%%%%EOF\0A\00"
define void @ps_close(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 @ffclose(i32* %7)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%%showpage\0A\00"
@.str.1 = [9 x i8] c"%%%%EOF\0A\00"
define void @ps_close(i32* %0) {
%2 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @ffclose(i32* %0)
ret void
}
/* Variables and functions */
int ccx_main(int, char const **);
int main(int ac, char *av[]) { return ccx_main(ac, (const char **)av); }


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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <ccx_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <ccx_main@plt>

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @ccx_main(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @ccx_main(i32 %0, i8** %1)
ret i32 %3
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void main() {
  int32_t a;
  int32_t b;
  b = 1;
  for (a = 0; a < 10; a = a + 1) {
    if (a % 2 == 0) {
      b = b + 1;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    114c <main+0x4c>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1139 <main+0x39>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113e <main+0x3e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <main+0x12>
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @suspend_block_sleep() {
ret void
}
/* Variables and functions */
int count_bsts(int);
int /*<<< orphan*/ printf(char *, int);
void main() { printf("Number of bsts are %d ", count_bsts(4)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
call   1040 <count_bsts@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1040 <count_bsts@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Number of bsts are %d \00"
define void @main() {
%1 = call i32 @count_bsts(i32 4)
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Number of bsts are %d \00"
define void @main() {
%1 = tail call i32 @count_bsts(i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int, int, int);
void foo(int left, int rite, int element) {
  while (left <= rite) {
    rite -= element;
    bar(left, rite, element);
    left += element;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1154 <foo+0x44>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <bar@plt>
mov    -0xc(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1121 <foo+0x11>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %esi,%edi
jg     114b <foo+0x3b>
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%ebx
sub    %edx,%r15d
mov    %r15d,%ebp
nopl   0x0(%rax)
mov    %ebx,%edi
mov    %r15d,%esi
mov    %r14d,%edx
call   1030 <bar@plt>
add    %r14d,%ebx
sub    %r14d,%ebp
cmp    %r15d,%ebx
mov    %ebp,%r15d
jle    1130 <foo+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @foo(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
br i1 %4, label %12, label %5
5: ; preds = %3, %5
%6 = phi i32 [ %10, %5 ], [ %0, %3 ]
%7 = phi i32 [ %8, %5 ], [ %1, %3 ]
%8 = sub nsw i32 %7, %2
%9 = tail call i32 @bar(i32 %6, i32 %8, i32 %2)
%10 = add nsw i32 %6, %2
%11 = icmp sgt i32 %10, %8
br i1 %11, label %12, label %5
12: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;

/* Variables and functions */
void glcAppendFont(GLint font) {}


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

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

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

LLVM IR (-O2):
define void @glcAppendFont(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
char *strcat(char *s, const char *t) {
  char *r = s;
  for (s += strlen(s); (*s = *t); s++, t++)
    ;
  return r;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     1177 <strcat+0x67>
jmp    115a <strcat+0x4a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1141 <strcat+0x31>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
cltq
mov    (%rbx),%cl
mov    %cl,(%r14,%rax,1)
test   %cl,%cl
je     114f <strcat+0x3f>
add    %r14,%rax
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rbx,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1140 <strcat+0x30>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strcat(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
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = load i8*, i8** %3
%10 = sext i32 %8 to i64
%11 = getelementptr inbounds i8, i8* %9, i64 %10
store i8* %11, i8** %3
br label %12
12: ; preds = %18, %2
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = load i8*, i8** %3
store i8 %14, i8* %15
%16 = icmp ne i8 %14, 0
br i1 %16, label %17, label %23
17: ; preds = %12
br label %18
18: ; preds = %17
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %4
br label %12
23: ; preds = %12
%24 = load i8*, i8** %5
ret i8* %24
}

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* nocapture %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %1
store i8 %6, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %15, label %8
8: ; preds = %2, %8
%9 = phi i8* [ %11, %8 ], [ %5, %2 ]
%10 = phi i8* [ %12, %8 ], [ %1, %2 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = getelementptr inbounds i8, i8* %10, i64 1
%13 = load i8, i8* %12
store i8 %13, i8* %11
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %8
15: ; preds = %8, %2
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned long);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t size) {
  void *ptr = malloc(size);
  if (!ptr) {
    fprintf(stderr,
            "Out of memory, malloc failed tried to allocate %lu bytes\n",
            (unsigned long)size);
    exit(1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1177 <xmalloc+0x47>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe98(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <xmalloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [58 x i8] c"Out of memory, malloc failed tried to allocate %lu bytes\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i64, i64* %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i64 %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [58 x i8] c"Out of memory, malloc failed tried to allocate %lu bytes\0A\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i64 %0)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
float fraction(float val) { return val - (int)val; }


x86 assembly (clang, -O0):
<fraction>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvttss2si -0x4(%rbp),%eax
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fraction>:
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
subss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fraction(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fptosi float %4 to i32
%6 = sitofp i32 %5 to float
%7 = fsub float %3, %6
ret float %7
}

LLVM IR (-O2):
define float @fraction(float %0) {
%2 = fptosi float %0 to i32
%3 = sitofp i32 %2 to float
%4 = fsub float %0, %3
ret float %4
}
void hal_debug_init_gpio(void) {}


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

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

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

LLVM IR (-O2):
define void @hal_debug_init_gpio() {
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ cutItem(char *, char *, char, int);
int cutItemToInt(char *in, char sep, int num) {
  char tmp[512];
  cutItem(in, tmp, sep, num);
  return atoi(tmp);
}


x86 assembly (clang, -O0):
<cutItemToInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x210(%rbp),%rsi
mov    -0x9(%rbp),%al
mov    -0x10(%rbp),%ecx
movsbl %al,%edx
call   1030 <cutItem@plt>
lea    -0x210(%rbp),%rdi
call   1040 <atoi@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutItemToInt>:
push   %rbx
sub    $0x200,%rsp
mov    %edx,%ecx
mov    %esi,%edx
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <cutItem@plt>
mov    %rbx,%rdi
call   1040 <atoi@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cutItemToInt(i8* %0, i8 signext %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i32
%7 = alloca [512 x i8]
store i8* %0, i8** %4
store i8 %1, i8* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%10 = load i8, i8* %5
%11 = load i32, i32* %6
%12 = call i32 @cutItem(i8* %8, i8* %9, i8 signext %10, i32 %11)
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%14 = call i32 @atoi(i8* %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @cutItemToInt(i8* %0, i8 signext %1, i32 %2) {
%4 = alloca [512 x i8]
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%6 = call i32 @cutItem(i8* %0, i8* %5, i8 signext %1, i32 %2)
%7 = call i32 @atoi(i8* %5)
ret i32 %7
}