xunge/DecIR huggingface dataset:
/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ gettmode();
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_return(int /*<<< orphan*/);
void cmd_gettmode(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_return(gettmode());
}


x86 assembly (clang, -O0):
<cmd_gettmode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1167 <cmd_gettmode+0x27>
jmp    117f <cmd_gettmode+0x3f>
mov    $0x1,%edi
call   1050 <report_count@plt>
mov    $0x0,%al
call   1060 <gettmode@plt>
mov    %eax,%edi
call   1030 <report_return@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_gettmode>:
push   %rax
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    114f <cmd_gettmode+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1050 <report_count@plt>
xor    %eax,%eax
call   1060 <gettmode@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <report_return@plt>

LLVM IR (-O0):
define void @cmd_gettmode(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 = call i32 @check_arg_count(i32 %5, i32 0)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %13
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 (...) @gettmode()
%12 = call i32 @report_return(i32 %11)
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @cmd_gettmode(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @gettmode()
%8 = tail call i32 @report_return(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
/* Variables and functions */
int posix_openpt(int /*<<< orphan*/);
int main(void) {
  int ret;
  ret = posix_openpt(0);
  (void)ret;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @posix_openpt(i32 0)
ret i32 0
}
int Strdelete(char *s1, int pos) {
  char *s;
  for (s = s1 + pos; *s; s++)
    *s = *(s + 1);
  return 1;
}


x86 assembly (clang, -O0):
<Strdelete>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <Strdelete+0x45>
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111a <Strdelete+0x1a>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Strdelete>:
movslq %esi,%rax
cmpb   $0x0,(%rdi,%rax,1)
je     111e <Strdelete+0x1e>
add    %rdi,%rax
add    $0x1,%rax
movzbl (%rax),%ecx
mov    %cl,-0x1(%rax)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <Strdelete+0x10>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @Strdelete(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %2, %7
%8 = phi i8* [ %9, %7 ], [ %4, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
store i8 %10, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %2
ret i32 1
}
int compareInts(int *a, int *b) {
  if (*a > *b)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<compareInts>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    112a <compareInts+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <compareInts+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareInts>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setg   %al
ret

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

LLVM IR (-O2):
define i32 @compareInts(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp sgt i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int is_checking(int opcode) { return (opcode & 0x10000); }


x86 assembly (clang, -O0):
<is_checking>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x10000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_checking>:
mov    %edi,%eax
and    $0x10000,%eax
ret

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

LLVM IR (-O2):
define i32 @is_checking(i32 %0) {
%2 = and i32 %0, 65536
ret i32 %2
}
void rop3_111_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ S;
  stk2 = ~stk2;
  stk1 = T & stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_111_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_111_1_0>:
mov    (%rdi),%al
mov    %eax,%ecx
xor    %sil,%cl
not    %dl
or     %cl,%dl
xor    %dl,%al
and    %sil,%al
xor    %dl,%al
mov    %al,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_111_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = xor i8 %2, -1
%7 = or i8 %5, %6
%8 = xor i8 %1, -1
%9 = and i8 %7, %8
%10 = and i8 %4, %1
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
int match(char const *, char *);
int esSalto(const char *linea) { return match(linea, "^[_a-z][0-9a-z_]+:"); }


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

x86 assembly (clang, -O2):
<esSalto>:
lea    0xee9(%rip),%rsi
jmp    1030 <match@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"^[_a-z][0-9a-z_]+:\00"
define i32 @esSalto(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @match(i8* %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [19 x i8] c"^[_a-z][0-9a-z_]+:\00"
define i32 @esSalto(i8* %0) {
%2 = tail call i32 @match(i8* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
int test_53_4(int *mem) { return __atomic_or_fetch(mem + 4, 1, 4); }


x86 assembly (clang, -O0):
<test_53_4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x10,%rcx
mov    %rcx,-0x20(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
mov    0x10(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%esi
mov    %eax,%edx
or     %esi,%edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x24(%rbp)
test   $0x1,%cl
mov    %eax,-0x14(%rbp)
jne    1153 <test_53_4+0x53>
jmp    112a <test_53_4+0x2a>
mov    -0x18(%rbp),%ecx
mov    -0x24(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_53_4>:
mov    0x10(%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
or     $0x1,%ecx
lock cmpxchg %ecx,0x10(%rdi)
jne    1110 <test_53_4+0x10>
or     $0x1,%eax
ret

LLVM IR (-O0):
define i32 @test_53_4(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 4
store i32 1, i32* %3
%7 = load i32, i32* %3
%8 = atomicrmw or i32* %6, i32 %7 acq_rel
%9 = or i32 %8, %7
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @test_53_4(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = atomicrmw or i32* %2, i32 1 acq_rel
%4 = or i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int check_string(char *, char *);
int table_exclude(char *table, char *regexp) {
  if (!regexp)
    return 0;
  return check_string(table, regexp);
}


x86 assembly (clang, -O0):
<table_exclude>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1137 <table_exclude+0x27>
movl   $0x0,-0x4(%rbp)
jmp    1147 <table_exclude+0x37>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <check_string@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<table_exclude>:
test   %rsi,%rsi
je     111a <table_exclude+0xa>
jmp    1030 <check_string@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @table_exclude(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @check_string(i8* %0, i8* %1)
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ 0, %2 ]
ret i32 %7
}
int sound_check_wait_objs(void) { return 0; }


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

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

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

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

/* Variables and functions */
scalar_t__ crypt(char const *, char const *);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *pw_encrypt(const char *clear, const char *salt) {
  static char cipher[128];
  char *cp;
  cp = (char *)crypt(clear, salt);
  strncpy(cipher, cp, sizeof(cipher));
  return cipher;
}


x86 assembly (clang, -O0):
<pw_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <crypt@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0x2ef4(%rip),%rdi
mov    $0x80,%edx
call   1030 <strncpy@plt>
lea    0x2ee3(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pw_encrypt>:
push   %rbx
call   1040 <crypt@plt>
lea    0x2f13(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0x80,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@pw_encrypt.cipher = internal global [128 x i8] zeroinitializer
define i8* @pw_encrypt(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
%7 = load i8*, i8** %4
%8 = call i64 @crypt(i8* %6, i8* %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = call i32 @strncpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @pw_encrypt.cipher, i64 0, i64 0), i8* %10, i32 128)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @pw_encrypt.cipher, i64 0, i64 0)
}

LLVM IR (-O2):
@pw_encrypt.cipher = internal global [128 x i8] zeroinitializer
define i8* @pw_encrypt(i8* %0, i8* %1) {
%3 = tail call i64 @crypt(i8* %0, i8* %1)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @strncpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @pw_encrypt.cipher, i64 0, i64 0), i8* %4, i32 128)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @pw_encrypt.cipher, i64 0, i64 0)
}
void prune_alias_and_Ok(int x) {
  int a[1];
  if (x == x && x != x) {
    a[1] = 0;
  }
}


x86 assembly (clang, -O0):
<prune_alias_and_Ok>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jne    1126 <prune_alias_and_Ok+0x26>
mov    -0x4(%rbp),%eax
cmp    -0x4(%rbp),%eax
je     1126 <prune_alias_and_Ok+0x26>
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @prune_alias_and_Ok(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EVP_sha256();
int /*<<< orphan*/ HMAC(int /*<<< orphan*/, void const *, int,
                        unsigned char const *, size_t, unsigned char *,
                        unsigned int *);
void hmac_sha256(const void *key, int keylen, const unsigned char *data,
                 size_t datalen, unsigned char *result,
                 unsigned int result_size) {
  HMAC(EVP_sha256(), key, keylen, data, datalen, result, &result_size);
}


x86 assembly (clang, -O0):
<hmac_sha256>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    $0x0,%al
call   1040 <EVP_sha256@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
lea    -0x2c(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <HMAC@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hmac_sha256>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %r9d,0xc(%rsp)
xor    %eax,%eax
call   1040 <EVP_sha256@plt>
lea    0xc(%rsp),%rcx
mov    %rcx,(%rsp)
mov    %eax,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
mov    %r12,%rcx
mov    %r15,%r8
mov    %r14,%r9
call   1030 <HMAC@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @hmac_sha256(i8* %0, i32 %1, i8* %2, i64 %3, i8* %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i32
store i8* %0, i8** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%13 = call i32 (...) @EVP_sha256()
%14 = load i8*, i8** %7
%15 = load i32, i32* %8
%16 = load i8*, i8** %9
%17 = load i64, i64* %10
%18 = load i8*, i8** %11
%19 = call i32 @HMAC(i32 %13, i8* %14, i32 %15, i8* %16, i64 %17, i8* %18, i32* %12)
ret void
}

LLVM IR (-O2):
define void @hmac_sha256(i8* %0, i32 %1, i8* %2, i64 %3, i8* %4, i32 %5) {
%7 = alloca i32
store i32 %5, i32* %7
%8 = tail call i32 (...) @EVP_sha256()
%9 = call i32 @HMAC(i32 %8, i8* %0, i32 %1, i8* %2, i64 %3, i8* %4, i32* %7)
ret void
}
long double test_modfl(long double x, long double *y) {
  return __builtin_modfl(x, y);
}


x86 assembly (clang, -O0):
<test_modfl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rdi
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <modfl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_modfl>:
jmp    1030 <modfl@plt>

LLVM IR (-O0):
define x86_fp80 @test_modfl(x86_fp80 %0, x86_fp80* %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80*
store x86_fp80 %0, x86_fp80* %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80*, x86_fp80** %4
%7 = call x86_fp80 @modfl(x86_fp80 %5, x86_fp80* %6)
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @test_modfl(x86_fp80 %0, x86_fp80* nocapture %1) {
%3 = tail call x86_fp80 @modfl(x86_fp80 %0, x86_fp80* %1)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
int PECIDomainValid(unsigned long);
void PECIDomainEnable(unsigned long ulBase, unsigned long ulDomain) {
  DEBUG_ASSERT(ulBase == 0x400B0000);
  DEBUG_ASSERT(PECIDomainValid(ulDomain));
  (*((volatile unsigned long *)(ulBase + 0x00000000))) |= (1 << ulDomain);
}


x86 assembly (clang, -O0):
<PECIDomainEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x400b0000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rdi
call   1040 <PECIDomainValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rdx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
or     %rdx,%rcx
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PECIDomainEnable>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %edi,%edi
cmp    $0x400b0000,%r14
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %rbx,%rdi
call   1040 <PECIDomainValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    $0x1,%eax
mov    %ebx,%ecx
shl    %cl,%eax
cltq
or     %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @PECIDomainEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 1074462720
%7 = zext i1 %6 to i32
%8 = call i32 @DEBUG_ASSERT(i32 %7)
%9 = load i64, i64* %4
%10 = call i32 @PECIDomainValid(i64 %9)
%11 = call i32 @DEBUG_ASSERT(i32 %10)
%12 = load i64, i64* %4
%13 = trunc i64 %12 to i32
%14 = shl i32 1, %13
%15 = sext i32 %14 to i64
%16 = load i64, i64* %3
%17 = add i64 %16, 0
%18 = inttoptr i64 %17 to i64*
%19 = load volatile i64, i64* %18
%20 = or i64 %19, %15
store volatile i64 %20, i64* %18
ret void
}

LLVM IR (-O2):
define void @PECIDomainEnable(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 1074462720
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = tail call i32 @PECIDomainValid(i64 %1)
%7 = tail call i32 @DEBUG_ASSERT(i32 %6)
%8 = trunc i64 %1 to i32
%9 = shl nuw i32 1, %8
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %0 to i64*
%12 = load volatile i64, i64* %11
%13 = or i64 %12, %10
store volatile i64 %13, i64* %11
ret void
}
/* Variables and functions */
int MP_lichtschranke(int /*<<< orphan*/);
int /*<<< orphan*/ MP_motor(int, int);
void MP_p3wait3(void) {
  MP_motor(2, 2);
  while (MP_lichtschranke(0) == 1)
    ;
  MP_motor(2, 0);
}


x86 assembly (clang, -O0):
<MP_p3wait3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%esi
mov    %esi,%edi
call   1040 <MP_motor@plt>
xor    %edi,%edi
call   1030 <MP_lichtschranke@plt>
cmp    $0x1,%eax
jne    1145 <MP_p3wait3+0x25>
jmp    1130 <MP_p3wait3+0x10>
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <MP_motor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MP_p3wait3>:
push   %rax
mov    $0x2,%edi
mov    $0x2,%esi
call   1040 <MP_motor@plt>
xor    %edi,%edi
call   1030 <MP_lichtschranke@plt>
cmp    $0x1,%eax
je     1130 <MP_p3wait3+0x10>
mov    $0x2,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <MP_motor@plt>

LLVM IR (-O0):
define void @MP_p3wait3() {
%1 = call i32 @MP_motor(i32 2, i32 2)
br label %2
2: ; preds = %5, %0
%3 = call i32 @MP_lichtschranke(i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
%7 = call i32 @MP_motor(i32 2, i32 0)
ret void
}

LLVM IR (-O2):
define void @MP_p3wait3() {
%1 = tail call i32 @MP_motor(i32 2, i32 2)
br label %2
2: ; preds = %2, %0
%3 = tail call i32 @MP_lichtschranke(i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %2, label %5
5: ; preds = %2
%6 = tail call i32 @MP_motor(i32 2, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpeq_ss(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 test_mm_cmpeq_ss(__m128 __a, __m128 __b) {
  return _mm_cmpeq_ss(__a, __b);
}


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

x86 assembly (clang, -O2):
<test_mm_cmpeq_ss>:
jmp    1030 <_mm_cmpeq_ss@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmpeq_ss(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpeq_ss(i32 %0, i32 %1)
ret i32 %3
}
int change_syscall(struct tcb *tcp, int new) { return -1; }


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

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

LLVM IR (-O0):
%struct.tcb = type opaque
define i32 @change_syscall(%struct.tcb* %0, i32 %1) {
%3 = alloca %struct.tcb*
%4 = alloca i32
store %struct.tcb* %0, %struct.tcb** %3
store i32 %1, i32* %4
ret i32 -1
}

LLVM IR (-O2):
%struct.tcb = type opaque
define i32 @change_syscall(%struct.tcb* nocapture readnone %0, i32 %1) {
ret i32 -1
}
/* Variables and functions */
size_t align(size_t, size_t);
int /*<<< orphan*/ release(void *, size_t);
void lots_release(void *p, size_t n, size_t unit_sz, size_t log_lot) {
  release(p, align(n, log_lot) * unit_sz);
}


x86 assembly (clang, -O0):
<lots_release>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <align@plt>
mov    -0x28(%rbp),%rdi
mov    %rax,%rsi
imul   -0x18(%rbp),%rsi
call   1040 <release@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lots_release>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1030 <align@plt>
imul   %rax,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <release@plt>

LLVM IR (-O0):
define void @lots_release(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %8
%12 = call i64 @align(i64 %10, i64 %11)
%13 = load i64, i64* %7
%14 = mul i64 %12, %13
%15 = call i32 @release(i8* %9, i64 %14)
ret void
}

LLVM IR (-O2):
define void @lots_release(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i64 @align(i64 %1, i64 %3)
%6 = mul i64 %5, %2
%7 = tail call i32 @release(i8* %0, i64 %6)
ret void
}
void __stack_chk_fail(void) { return; }


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

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

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

LLVM IR (-O2):
define void @__stack_chk_fail() {
ret void
}
unsigned long int cast_to_ulong(unsigned int i) { return i; }


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

x86 assembly (clang, -O2):
<cast_to_ulong>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i64 @cast_to_ulong(i32 %0) {
%2 = zext i32 %0 to i64
ret i64 %2
}
void foo645() {}


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

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

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

LLVM IR (-O2):
define void @foo645() {
ret void
}
/* Variables and functions */
int core13_swap(char *, int);
int U_EMRTRANSPARENTBLT_swap(char *record, int torev) {
  return (core13_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRTRANSPARENTBLT_swap>:
jmp    1030 <core13_swap@plt>

LLVM IR (-O0):
define i32 @U_EMRTRANSPARENTBLT_swap(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 @core13_swap(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @U_EMRTRANSPARENTBLT_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core13_swap(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Lab2XYZ(int, int, int, int *, int *, int *);
int /*<<< orphan*/ XYZ2RGB(int, int, int, int *, int *, int *);
void Lab2RGB(int L, int a, int b, int *B, int *G, int *R) {
  int X, Y, Z;
  Lab2XYZ(L, a, b, &X, &Y, &Z);
  XYZ2RGB(X, Y, Z, B, G, R);
}


x86 assembly (clang, -O0):
<Lab2RGB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    -0x2c(%rbp),%rcx
lea    -0x30(%rbp),%r8
lea    -0x34(%rbp),%r9
call   1040 <Lab2XYZ@plt>
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
call   1030 <XYZ2RGB@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lab2RGB>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%rbx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
lea    0x4(%rsp),%r9
call   1040 <Lab2XYZ@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    0x4(%rsp),%edx
mov    %rbx,%rcx
mov    %r15,%r8
mov    %r14,%r9
call   1030 <XYZ2RGB@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @Lab2RGB(i32 %0, i32 %1, i32 %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%16 = load i32, i32* %7
%17 = load i32, i32* %8
%18 = load i32, i32* %9
%19 = call i32 @Lab2XYZ(i32 %16, i32 %17, i32 %18, i32* %13, i32* %14, i32* %15)
%20 = load i32, i32* %13
%21 = load i32, i32* %14
%22 = load i32, i32* %15
%23 = load i32*, i32** %10
%24 = load i32*, i32** %11
%25 = load i32*, i32** %12
%26 = call i32 @XYZ2RGB(i32 %20, i32 %21, i32 %22, i32* %23, i32* %24, i32* %25)
ret void
}

LLVM IR (-O2):
define void @Lab2RGB(i32 %0, i32 %1, i32 %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = bitcast i32* %7 to i8*
%11 = bitcast i32* %8 to i8*
%12 = bitcast i32* %9 to i8*
%13 = call i32 @Lab2XYZ(i32 %0, i32 %1, i32 %2, i32* %7, i32* %8, i32* %9)
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = call i32 @XYZ2RGB(i32 %14, i32 %15, i32 %16, i32* %3, i32* %4, i32* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ out_cstring(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void out_string(const char *str) { out_cstring(str, strlen(str)); }


x86 assembly (clang, -O0):
<out_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <out_cstring@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out_string>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <out_cstring@plt>

LLVM IR (-O0):
define void @out_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @out_cstring(i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @out_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @out_cstring(i8* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_SET_PW1_PIN() { set_io_bit(0x40, 1); }


x86 assembly (clang, -O0):
<TOSH_SET_PW1_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40,%edi
mov    $0x1,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_SET_PW1_PIN>:
mov    $0x40,%edi
mov    $0x1,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_SET_PW1_PIN() {
%1 = call i32 @set_io_bit(i32 64, i32 1)
ret void
}

LLVM IR (-O2):
define void @TOSH_SET_PW1_PIN() {
%1 = tail call i32 @set_io_bit(i32 64, i32 1)
ret void
}
/* Type definitions */
struct cdb {
  int dummy;
};

/* Variables and functions */
int cdb_findnext(struct cdb *, char *, unsigned int);
int /*<<< orphan*/ cdb_findstart(struct cdb *);
int cdb_find(struct cdb *c, char *key, unsigned int len) {
  cdb_findstart(c);
  return cdb_findnext(c, key, len);
}


x86 assembly (clang, -O0):
<cdb_find>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cdb_findstart@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <cdb_findnext@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdb_find>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1030 <cdb_findstart@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <cdb_findnext@plt>

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

LLVM IR (-O2):
%struct.cdb = type { i32 }
define i32 @cdb_find(%struct.cdb* %0, i8* %1, i32 %2) {
%4 = tail call i32 @cdb_findstart(%struct.cdb* %0)
%5 = tail call i32 @cdb_findnext(%struct.cdb* %0, i8* %1, i32 %2)
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
uint32_t HibernateRTCSSMatchGet(uint32_t ui32Match) {
  ASSERT(ui32Match == 0);
  return ((*((volatile uint32_t *)(0x400FC028))) >> 16);
}


x86 assembly (clang, -O0):
<HibernateRTCSSMatchGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    $0x400fc028,%eax
mov    (%rax),%rax
sar    $0x10,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateRTCSSMatchGet>:
push   %rax
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
mov    %eax,%edi
call   1030 <ASSERT@plt>
mov    0x400fc028,%rax
40
sar    $0x10,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @HibernateRTCSSMatchGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load volatile i64, i64* inttoptr (i64 1074774056 to i64*)
%8 = ashr i64 %7, 16
ret i64 %8
}

LLVM IR (-O2):
define i64 @HibernateRTCSSMatchGet(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = load volatile i64, i64* inttoptr (i64 1074774056 to i64*)
%6 = ashr i64 %5, 16
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ clar_sandbox();
int /*<<< orphan*/ clar_unsandbox();
void cl_fs_cleanup(void) {
  clar_unsandbox();
  clar_sandbox();
}


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

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

LLVM IR (-O0):
define void @cl_fs_cleanup() {
%1 = call i32 (...) @clar_unsandbox()
%2 = call i32 (...) @clar_sandbox()
ret void
}

LLVM IR (-O2):
define void @cl_fs_cleanup() {
%1 = tail call i32 (...) @clar_unsandbox()
%2 = tail call i32 (...) @clar_sandbox()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void reportDir(char *path, char *name) {
  printf("<file filepath=\"%s\" filename=\"%s\" attr=\"D\" />\n", path, name);
}


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"<file filepath=\22%s\22 filename=\22%s\22 attr=\22D\22 />\0A\00"
define void @reportDir(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"<file filepath=\22%s\22 filename=\22%s\22 attr=\22D\22 />\0A\00"
define void @reportDir(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int strcmpnull(const char *str1, const char *str2) {
  if ((str1 == NULL) && (str2 == NULL))
    return 0;
  if (str1 == NULL)
    return -1;
  if (str2 == NULL)
    return 1;
  return strcmp(str1, str2);
}


x86 assembly (clang, -O0):
<strcmpnull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1142 <strcmpnull+0x32>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <strcmpnull+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1180 <strcmpnull+0x70>
cmpq   $0x0,-0x10(%rbp)
jne    1159 <strcmpnull+0x49>
movl   $0xffffffff,-0x4(%rbp)
jmp    1180 <strcmpnull+0x70>
cmpq   $0x0,-0x18(%rbp)
jne    1170 <strcmpnull+0x60>
movl   $0x1,-0x4(%rbp)
jmp    1180 <strcmpnull+0x70>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmpnull>:
xor    %ecx,%ecx
mov    %rdi,%rax
or     %rsi,%rax
setne  %cl
neg    %ecx
mov    $0x1,%eax
test   %rdi,%rdi
cmove  %ecx,%eax
je     1134 <strcmpnull+0x24>
test   %rsi,%rsi
je     1134 <strcmpnull+0x24>
jmp    1030 <strcmp@plt>
ret

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

LLVM IR (-O2):
define i32 @strcmpnull(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = and i1 %3, %4
%6 = xor i1 %5, true
%7 = sext i1 %6 to i32
%8 = or i1 %3, %4
%9 = select i1 %3, i32 %7, i32 1
br i1 %8, label %12, label %10
10: ; preds = %2
%11 = tail call i32 @strcmp(i8* %0, i8* %1)
br label %12
12: ; preds = %2, %10
%13 = phi i32 [ %11, %10 ], [ %9, %2 ]
ret i32 %13
}
int fnExtractTen(int iVal) {
  int iT;
  iT = (iVal % 100) / 10;
  return iT;
}


x86 assembly (clang, -O0):
<fnExtractTen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnExtractTen>:
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
movsbl %al,%eax
imul   $0x67,%eax,%eax
movzwl %ax,%eax
movswl %ax,%ecx
shr    $0xf,%eax
shr    $0xa,%ecx
add    %al,%cl
movsbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @fnExtractTen(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = srem i32 %4, 100
%6 = sdiv i32 %5, 10
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @fnExtractTen(i32 %0) {
%2 = srem i32 %0, 100
%3 = trunc i32 %2 to i8
%4 = sdiv i8 %3, 10
%5 = sext i8 %4 to i32
ret i32 %5
}
/* Variables and functions */
bool nrf52_errata_83(void) { return false; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ GetNoEnterCursor(int /*<<< orphan*/);
int /*<<< orphan*/ XDefineCursor(int /*<<< orphan*/, int /*<<< orphan*/,
                                 int /*<<< orphan*/);
int /*<<< orphan*/ XFlush(int /*<<< orphan*/);
int /*<<< orphan*/ XtDisplay(int /*<<< orphan*/);
int /*<<< orphan*/ XtWindow(int /*<<< orphan*/);
void _DtHelpTurnOnNoEnter(Widget w) {
  Cursor cursor;
  cursor = GetNoEnterCursor(XtDisplay(w));
  XDefineCursor(XtDisplay(w), XtWindow(w), cursor);
  XFlush(XtDisplay(w));
}


x86 assembly (clang, -O0):
<_DtHelpTurnOnNoEnter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <XtDisplay@plt>
mov    %eax,%edi
call   1040 <GetNoEnterCursor@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <XtDisplay@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <XtWindow@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
mov    -0x8(%rbp),%edx
call   1060 <XDefineCursor@plt>
mov    -0x4(%rbp),%edi
call   1050 <XtDisplay@plt>
mov    %eax,%edi
call   1070 <XFlush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_DtHelpTurnOnNoEnter>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
call   1050 <XtDisplay@plt>
mov    %eax,%edi
call   1040 <GetNoEnterCursor@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1050 <XtDisplay@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <XtWindow@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %r14d,%edx
call   1060 <XDefineCursor@plt>
mov    %ebx,%edi
call   1050 <XtDisplay@plt>
mov    %eax,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1070 <XFlush@plt>

LLVM IR (-O0):
define void @_DtHelpTurnOnNoEnter(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @XtDisplay(i32 %4)
%6 = call i32 @GetNoEnterCursor(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = call i32 @XtDisplay(i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @XtWindow(i32 %9)
%11 = load i32, i32* %3
%12 = call i32 @XDefineCursor(i32 %8, i32 %10, i32 %11)
%13 = load i32, i32* %2
%14 = call i32 @XtDisplay(i32 %13)
%15 = call i32 @XFlush(i32 %14)
ret void
}

LLVM IR (-O2):
define void @_DtHelpTurnOnNoEnter(i32 %0) {
%2 = tail call i32 @XtDisplay(i32 %0)
%3 = tail call i32 @GetNoEnterCursor(i32 %2)
%4 = tail call i32 @XtDisplay(i32 %0)
%5 = tail call i32 @XtWindow(i32 %0)
%6 = tail call i32 @XDefineCursor(i32 %4, i32 %5, i32 %3)
%7 = tail call i32 @XtDisplay(i32 %0)
%8 = tail call i32 @XFlush(i32 %7)
ret void
}
/* Variables and functions */
float vec3f_dot(float const *, float const *);
float vec3f_normSq(const float A[3]) { return vec3f_dot(A, A); }


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

x86 assembly (clang, -O2):
<vec3f_normSq>:
mov    %rdi,%rsi
jmp    1030 <vec3f_dot@plt>

LLVM IR (-O0):
define float @vec3f_normSq(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float*, float** %2
%5 = call float @vec3f_dot(float* %3, float* %4)
ret float %5
}

LLVM IR (-O2):
define float @vec3f_normSq(float* %0) {
%2 = tail call float @vec3f_dot(float* %0, float* %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ setByteArray(void **, void *, scalar_t__, int);
scalar_t__ strlen(char *);
void _TIFFsetString(char **cpp, char *cp) {
  setByteArray((void **)cpp, (void *)cp, strlen(cp) + 1, 1);
}


x86 assembly (clang, -O0):
<_TIFFsetString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
mov    $0x1,%ecx
call   1040 <setByteArray@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_TIFFsetString>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x1,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <setByteArray@plt>

LLVM IR (-O0):
define void @_TIFFsetString(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i32 @setByteArray(i8** %5, i8* %6, i64 %9, i32 1)
ret void
}

LLVM IR (-O2):
define void @_TIFFsetString(i8** %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @setByteArray(i8** %0, i8* %1, i64 %4, i32 1)
ret void
}