xunge/DecIR huggingface dataset:
long double _Complex add_long_double_rc(long double a, long double _Complex b) {
  return a + b;
}


x86 assembly (clang, -O0):
<add_long_double_rc>:
push   %rbp
mov    %rsp,%rbp
lea    0x20(%rbp),%rax
fldt   0x10(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
fldt   (%rax)
fldt   0x10(%rax)
fxch   %st(2)
faddp  %st,%st(1)
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_long_double_rc>:
fldt   0x8(%rsp)
fldt   0x18(%rsp)
faddp  %st,%st(1)
fldt   0x28(%rsp)
fxch   %st(1)
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @add_long_double_rc(x86_fp80 %0, { x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %1) {
%3 = alloca { x86_fp80, x86_fp80 }
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %4
%6 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %1, i32 0, i32 0
%7 = load x86_fp80, x86_fp80* %6
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %1, i32 0, i32 1
%9 = load x86_fp80, x86_fp80* %8
%10 = fadd x86_fp80 %5, %7
%11 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%12 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %10, x86_fp80* %11
store x86_fp80 %9, x86_fp80* %12
%13 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3
ret { x86_fp80, x86_fp80 } %13
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @add_long_double_rc(x86_fp80 %0, { x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %1) {
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %1, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %1, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = fadd x86_fp80 %4, %0
%8 = insertvalue { x86_fp80, x86_fp80 } poison, x86_fp80 %7, 0
%9 = insertvalue { x86_fp80, x86_fp80 } %8, x86_fp80 %6, 1
ret { x86_fp80, x86_fp80 } %9
}
/* Variables and functions */
int strcmp(char *, char *);
int qsort_strcmp_(const void *s1, const void *s2) {
  return strcmp(*((char **)s1), *((char **)s2));
}


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

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

LLVM IR (-O0):
define i32 @qsort_strcmp_(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @qsort_strcmp_(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void cr() { fprintf(stderr, "%s", "\n"); }


x86 assembly (clang, -O0):
<cr>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
lea    0xed8(%rip),%rdx
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cr>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
lea    0xedc(%rip),%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @cr() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @cr() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ retrieve_device(char *);
int main(int argc, char **argv) {
  printf("Starting...\n");
  retrieve_device("NVIDIA");
  return EXIT_SUCCESS;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1040 <retrieve_device@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.1 = [7 x i8] c"NVIDIA\00"
@EXIT_SUCCESS = global i32 0
@str = [12 x i8] c"Starting...\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @retrieve_device(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
scalar_t__ __VERIFIER_nondet_int();
int /*<<< orphan*/ insert_top(struct list_head *);
void create_top(struct list_head *top) {
  do
    insert_top(top);
  while (__VERIFIER_nondet_int());
}


x86 assembly (clang, -O0):
<create_top>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <insert_top@plt>
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
jne    112c <create_top+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_top>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <insert_top@plt>
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %rax,%rax
jne    1130 <create_top+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @create_top(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %2
br label %3
3: ; preds = %6, %1
%4 = load %struct.list_head*, %struct.list_head** %2
%5 = call i32 @insert_top(%struct.list_head* %4)
br label %6
6: ; preds = %3
%7 = call i64 (...) @__VERIFIER_nondet_int()
%8 = icmp ne i64 %7, 0
br i1 %8, label %3, label %9
9: ; preds = %6
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @create_top(%struct.list_head* %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @insert_top(%struct.list_head* %0)
%4 = tail call i64 (...) @__VERIFIER_nondet_int()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
ret void
}
char *strupr(char *string) {
  char *cp;
  for (cp = string; *cp; ++cp) {
    if ('a' <= *cp && *cp <= 'z')
      *cp += 'A' - 'a';
  }
  return (string);
}


x86 assembly (clang, -O0):
<strupr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1163 <strupr+0x63>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jg     114d <strupr+0x4d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jg     114d <strupr+0x4d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
add    $0xffffffe0,%ecx
mov    %cl,(%rax)
jmp    1152 <strupr+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strupr+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strupr>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     112c <strupr+0x2c>
lea    0x1(%rax),%rdx
jmp    111b <strupr+0x1b>
nop
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
je     112c <strupr+0x2c>
lea    -0x61(%rcx),%esi
cmp    $0x19,%sil
ja     1110 <strupr+0x10>
add    $0xe0,%cl
mov    %cl,-0x1(%rdx)
jmp    1110 <strupr+0x10>
ret

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

LLVM IR (-O2):
define i8* @strupr(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -97
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nsw i8 %5, -32
store i8 %10, i8* %6
br label %11
11: ; preds = %4, %9
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret i8* %0
}
char *installedProblemName(int index) { return ((char *)"Rosenbrock"); }


x86 assembly (clang, -O0):
<installedProblemName>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"Rosenbrock\00"
define i8* @installedProblemName(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [11 x i8] c"Rosenbrock\00"
define i8* @installedProblemName(i32 %0) {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ time;
};
struct TYPE_4__ {
  TYPE_1__ xselectionclear;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xselectionclear_time(void *_p) {
  return (unsigned long)((XEvent *)_p)->xselectionclear.time;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xselectionclear_time>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xselectionclear_time(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xselectionclear_time(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
int safety(card)
short card;
{
  switch (card) {
  case 5:
  case 10:
  case 15:
    return 15;
  case 6:
  case 11:
  case 16:
    return 16;
  case 7:
  case 12:
  case 17:
    return 17;
  case 13:
  case 8:
  case 18:
  case 9:
  case 14:
    return 18;
  }
  return 0;
}


x86 assembly (clang, -O0):
<safety>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x6(%rbp)
movswl -0x6(%rbp),%eax
add    $0xfffffffb,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xd,%eax
ja     1165 <safety+0x65>
mov    -0x10(%rbp),%rax
lea    0xed4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xf,-0x4(%rbp)
jmp    116c <safety+0x6c>
movl   $0x10,-0x4(%rbp)
jmp    116c <safety+0x6c>
movl   $0x11,-0x4(%rbp)
jmp    116c <safety+0x6c>
movl   $0x12,-0x4(%rbp)
jmp    116c <safety+0x6c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<safety>:
movswl %di,%ecx
add    $0xfffffffb,%ecx
xor    %eax,%eax
cmp    $0xd,%ecx
ja     111a <safety+0x1a>
movslq %ecx,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @safety(i32 %0) {
%2 = alloca i32
%3 = alloca i16
%4 = trunc i32 %0 to i16
store i16 %4, i16* %3
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
switch i32 %6, label %11 [
i32 5, label %7
i32 10, label %7
i32 15, label %7
i32 6, label %8
i32 11, label %8
i32 16, label %8
i32 7, label %9
i32 12, label %9
i32 17, label %9
i32 13, label %10
i32 8, label %10
i32 18, label %10
i32 9, label %10
i32 14, label %10
]
7: ; preds = %1, %1, %1
store i32 15, i32* %2
br label %12
8: ; preds = %1, %1, %1
store i32 16, i32* %2
br label %12
9: ; preds = %1, %1, %1
store i32 17, i32* %2
br label %12
10: ; preds = %1, %1, %1, %1, %1
store i32 18, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10, %9, %8, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@switch.table.safety = [14 x i32] [i32 15, i32 16, i32 17, i32 18, i32 18, i32 15, i32 16, i32 17, i32 18, i32 18, i32 15, i32 16, i32 17, i32 18]
define i32 @safety(i32 %0) {
%2 = shl i32 %0, 16
%3 = ashr exact i32 %2, 16
%4 = add nsw i32 %3, -5
%5 = icmp ult i32 %4, 14
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds [14 x i32], [14 x i32]* @switch.table.safety, i64 0, i64 %7
%9 = load i32, i32* %8
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 0, %1 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_UNBLOCK;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int _sigrelse(int sig) {
  sigset_t unblock_mask;
  sigemptyset(&unblock_mask);
  sigaddset(&unblock_mask, sig);
  return sigprocmask(SIG_UNBLOCK, &unblock_mask, NULL);
}


x86 assembly (clang, -O0):
<_sigrelse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    -0x4(%rbp),%esi
lea    -0x8(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sigrelse>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <sigemptyset@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1050 <sigaddset@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
mov    %r14,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SIG_UNBLOCK = global i32 0
define i32 @_sigrelse(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @sigemptyset(i32* %3)
%5 = load i32, i32* %2
%6 = call i32 @sigaddset(i32* %3, i32 %5)
%7 = load i32, i32* @SIG_UNBLOCK
%8 = call i32 @sigprocmask(i32 %7, i32* %3, i32* null)
ret i32 %8
}

LLVM IR (-O2):
@SIG_UNBLOCK = global i32 0
define i32 @_sigrelse(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sigemptyset(i32* %2)
%5 = call i32 @sigaddset(i32* %2, i32 %0)
%6 = load i32, i32* @SIG_UNBLOCK
%7 = call i32 @sigprocmask(i32 %6, i32* %2, i32* null)
ret i32 %7
}
int InterruptActive(int InterruptSource) {
  return (((volatile unsigned long *)(0xE000E000 +
                                      (0x300)))[(InterruptSource >> 5)] &
          (1 << (InterruptSource & 31))) != 0;
}


x86 assembly (clang, -O0):
<InterruptActive>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x5,%eax
movslq %eax,%rcx
mov    $0xe000e300,%eax
mov    (%rax,%rcx,8),%rax
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
movslq %ecx,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<InterruptActive>:
mov    %edi,%ecx
mov    %edi,%eax
mov    $0x1,%edx
shl    %cl,%edx
sar    $0x5,%eax
movslq %eax,%rcx
movslq %edx,%rdx
mov    $0xe000e300,%esi
xor    %eax,%eax
and    (%rsi,%rcx,8),%rdx
setne  %al
ret

LLVM IR (-O0):
define i32 @InterruptActive(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 5
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i64, i64* inttoptr (i64 3758154496 to i64*), i64 %5
%7 = load volatile i64, i64* %6
%8 = load i32, i32* %2
%9 = and i32 %8, 31
%10 = shl i32 1, %9
%11 = sext i32 %10 to i64
%12 = and i64 %7, %11
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @InterruptActive(i32 %0) {
%2 = ashr i32 %0, 5
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i64, i64* inttoptr (i64 3758154496 to i64*), i64 %3
%5 = load volatile i64, i64* %4
%6 = and i32 %0, 31
%7 = shl nuw i32 1, %6
%8 = sext i32 %7 to i64
%9 = and i64 %5, %8
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
void PR8694(int *e) {}


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

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

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

LLVM IR (-O2):
define void @PR8694(i32* nocapture %0) {
ret void
}
int cos_sched_lock_release() {}


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

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

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

LLVM IR (-O2):
define i32 @cos_sched_lock_release() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ term_send(char);
void term_set_scroll_mode_all() {
  term_send(27);
  term_send('[');
  term_send('r');
}


x86 assembly (clang, -O0):
<term_set_scroll_mode_all>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b,%edi
call   1030 <term_send@plt>
mov    $0x5b,%edi
call   1030 <term_send@plt>
mov    $0x72,%edi
call   1030 <term_send@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_set_scroll_mode_all>:
push   %rax
mov    $0x1b,%edi
call   1030 <term_send@plt>
mov    $0x5b,%edi
call   1030 <term_send@plt>
mov    $0x72,%edi
pop    %rax
jmp    1030 <term_send@plt>

LLVM IR (-O0):
define void @term_set_scroll_mode_all() {
%1 = call i32 @term_send(i8 signext 27)
%2 = call i32 @term_send(i8 signext 91)
%3 = call i32 @term_send(i8 signext 114)
ret void
}

LLVM IR (-O2):
define void @term_set_scroll_mode_all() {
%1 = tail call i32 @term_send(i8 signext 27)
%2 = tail call i32 @term_send(i8 signext 91)
%3 = tail call i32 @term_send(i8 signext 114)
ret void
}
int mova2i_(unsigned char *a) { return (int)(*a); }


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

x86 assembly (clang, -O2):
<mova2i_>:
movzbl (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @mova2i_(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int d = -4 / 3;
  int r = -4 % 3;
  printf("%d %d", d, r);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -1, i32 -1)
ret i32 0
}
void notify_container_device(struct acpi_device *adev) {}


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

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

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

LLVM IR (-O2):
%struct.acpi_device = type opaque
define void @notify_container_device(%struct.acpi_device* nocapture %0) {
ret void
}
void bar(double *d) {
  double p = *d * 4.8 + 0.1;
  __asm__ volatile("movsd %0, %%xmm15\n"
                   "movsd %%xmm15, %%xmm8\n"
                   "movsd %%xmm8, (%1)\n"
                   :
                   : "m"(p), "r"(d)
                   : "memory", "%xmm8", "%xmm15");
  assert(p == *d);
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xed4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed0(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  -0x10(%rbp),%xmm15
movsd  %xmm15,%xmm8
movsd  %xmm8,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
ucomisd (%rax),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
movsd  (%rdi),%xmm0
mulsd  0xee3(%rip),%xmm0
addsd  0xee3(%rip),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rsp),%xmm15
movsd  %xmm15,%xmm8
movsd  %xmm8,(%rdi)
movsd  (%rdi),%xmm0
cmpeqsd (%rsp),%xmm0
movq   %xmm0,%rdi
and    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @bar(double* %0) {
%2 = alloca double*
%3 = alloca double
store double* %0, double** %2
%4 = load double*, double** %2
%5 = load double, double* %4
%6 = call double @llvm.fmuladd.f64(double %5, double 4.800000e+00, double 1.000000e-01)
store double %6, double* %3
%7 = load double*, double** %2
%8 = load double, double* %3
%9 = load double*, double** %2
%10 = load double, double* %9
%11 = fcmp oeq double %8, %10
%12 = zext i1 %11 to i32
%13 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %12)
ret void
}

LLVM IR (-O2):
define void @bar(double* %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = load double, double* %0
%5 = tail call double @llvm.fmuladd.f64(double %4, double 4.800000e+00, double 1.000000e-01)
store double %5, double* %2
%6 = load double, double* %2
%7 = load double, double* %0
%8 = fcmp oeq double %6, %7
%9 = zext i1 %8 to i32
%10 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %9)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fseeko(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int fseek(FILE *stream, long offset, int whence) {
  return fseeko(stream, (off_t)offset, whence);
}


x86 assembly (clang, -O0):
<fseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %eax,%esi
mov    -0x14(%rbp),%edx
call   1030 <fseeko@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fseek>:
jmp    1030 <fseeko@plt>

LLVM IR (-O0):
define i32 @fseek(i32* %0, i64 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32
store i32* %0, i32** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i64, i64* %5
%9 = trunc i64 %8 to i32
%10 = load i32, i32* %6
%11 = call i32 @fseeko(i32* %7, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @fseek(i32* nocapture %0, i64 %1, i32 %2) {
%4 = trunc i64 %1 to i32
%5 = tail call i32 @fseeko(i32* %0, i32 %4, i32 %2)
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ ssize_t;
typedef int /*<<< orphan*/ c;

/* Variables and functions */
scalar_t__ recv(int, char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ warn(char *);
void datagram_server(int serverfd) {
  ssize_t len;
  char c;
  while (1) {
    len = recv(serverfd, &c, sizeof(c), 0);
    if (len < 0)
      warn("datagram_server: recv");
  }
}


x86 assembly (clang, -O0):
<datagram_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x11(%rbp),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1159 <datagram_server+0x39>
lea    0xeac(%rip),%rdi
call   1040 <warn@plt>
jmp    112b <datagram_server+0xb>

x86 assembly (clang, -O2):
<datagram_server>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xf(%rsp),%r14
lea    0xec9(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
test   %rax,%rax
jns    1140 <datagram_server+0x20>
mov    %r15,%rdi
call   1040 <warn@plt>
jmp    1140 <datagram_server+0x20>

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

LLVM IR (-O2):
@.str = [22 x i8] c"datagram_server: recv\00"
define void @datagram_server(i32 %0) {
%2 = alloca i8
br label %3
3: ; preds = %8, %1
%4 = call i64 @recv(i32 %0, i8* %2, i32 1, i32 0)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = call i32 @warn(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
br label %3
}
/* Type definitions */
struct timespec {
  int /*<<< orphan*/ tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
void array_random_init_global() {
  struct timespec now;
  clock_gettime(CLOCK_MONOTONIC, &now);
  srand(now.tv_nsec);
}


x86 assembly (clang, -O0):
<array_random_init_global>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x8(%rbp),%edi
call   1040 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_random_init_global>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
mov    (%rsp),%edi
call   1040 <srand@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC = global i32 0
define void @array_random_init_global() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @srand(i32 %5)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC = global i32 0
define void @array_random_init_global() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @srand(i32 %6)
ret void
}
/* Variables and functions */
int foo();
int main() { return foo() + foo(); }


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <foo@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <foo@plt>
add    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @foo()
%3 = add nsw i32 %2, %1
ret i32 %3
}
void __attribute__((always_, format(printf, 2, 3)))
ezcfg_log_null(struct ezcfg *ezcfg, const char *format, ...) {}


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

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

LLVM IR (-O0):
%struct.ezcfg = type opaque
define void @ezcfg_log_null(%struct.ezcfg* %0, i8* %1, ...) {
%3 = alloca %struct.ezcfg*
%4 = alloca i8*
store %struct.ezcfg* %0, %struct.ezcfg** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.ezcfg = type opaque
define void @ezcfg_log_null(%struct.ezcfg* nocapture %0, i8* nocapture %1, ...) {
ret void
}
/* Variables and functions */
int anka(int);
int kalle(int i) {
  if (i <= 0)
    return 0;
  else
    return anka(i - 1);
}


x86 assembly (clang, -O0):
<kalle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1131 <kalle+0x21>
movl   $0x0,-0x4(%rbp)
jmp    113f <kalle+0x2f>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <anka@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kalle>:
test   %edi,%edi
jle    111c <kalle+0xc>
add    $0xffffffff,%edi
jmp    1030 <anka@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @kalle(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @anka(i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 0, %1 ]
ret i32 %7
}
/* Type definitions */
struct block_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ HsFreeBdev(struct block_device *);
void bdput(struct block_device *x) {
  HsFreeBdev(x);
  return;
}


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

x86 assembly (clang, -O2):
<bdput>:
jmp    1030 <HsFreeBdev@plt>

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

LLVM IR (-O2):
%struct.block_device = type { i32 }
define void @bdput(%struct.block_device* %0) {
%2 = tail call i32 @HsFreeBdev(%struct.block_device* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, char *);
void getfilename(char *line, char *word) {
  sscanf(line, "%*s %*s %s", word);
  return;
}


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

x86 assembly (clang, -O2):
<getfilename>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <sscanf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%*s %*s %s\00"
define void @getfilename(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 @sscanf(i8* %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%*s %*s %s\00"
define void @getfilename(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void print_header(FILE *f, const char *name) {
  fprintf(f,
          "F3 %s "
          "7.1"
          "\n"
          "Copyright (C) 2010 Digirati Internet LTDA.\n"
          "This is free software; see the source for copying conditions.\n"
          "\n",
          name);
}


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

x86 assembly (clang, -O2):
<print_header>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [117 x i8] c"F3 %s 7.1\0ACopyright (C) 2010 Digirati Internet LTDA.\0AThis is free software; see the source for copying conditions.\0A\0A\00"
define void @print_header(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 @fprintf(i32* %5, i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [117 x i8] c"F3 %s 7.1\0ACopyright (C) 2010 Digirati Internet LTDA.\0AThis is free software; see the source for copying conditions.\0A\0A\00"
define void @print_header(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
char *j0g_safe(int, char *, unsigned short const *);
int j0g_val(char const *, char *, unsigned short const *);
char *j0g_str(const char *key, char *json, const unsigned short *index) {
  int val = j0g_val(key, json, index);
  if (!val)
    return NULL;
  return j0g_safe(val, json, index);
}


x86 assembly (clang, -O0):
<j0g_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <j0g_val@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    115f <j0g_str+0x3f>
movq   $0x0,-0x8(%rbp)
jmp    1173 <j0g_str+0x53>
mov    -0x24(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <j0g_safe@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j0g_str>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1030 <j0g_val@plt>
test   %eax,%eax
je     1147 <j0g_str+0x27>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <j0g_safe@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @j0g_str(i8* %0, i8* %1, i16* %2) {
%4 = tail call i32 @j0g_val(i8* %0, i8* %1, i16* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i8* @j0g_safe(i32 %4, i8* %1, i16* %2)
br label %8
8: ; preds = %3, %6
%9 = phi i8* [ %7, %6 ], [ null, %3 ]
ret i8* %9
}
int testBit_fun_int(int x, unsigned i) { return (x & 1 << i) != 0; }


x86 assembly (clang, -O0):
<testBit_fun_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testBit_fun_int>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @testBit_fun_int(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 = shl i32 1, %6
%8 = and i32 %5, %7
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @testBit_fun_int(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
scalar_t__ strncmp(char *, char *, int);
void strncmp_0() {
  char *x = "123";
  char *y = "123";
  if (strncmp(x, y, 3) != 0)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strncmp_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xed6(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     114a <strncmp_0+0x3a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_0>:
lea    0xee9(%rip),%rdi
mov    %rdi,%rsi
mov    $0x3,%edx
jmp    1030 <strncmp@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
define void @strncmp_0() {
%1 = tail call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *Btime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *Now() {
  time_t now;
  time(&now);
  return Btime(&now);
}


x86 assembly (clang, -O0):
<Now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1030 <time@plt>
lea    -0x4(%rbp),%rdi
call   1040 <Btime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Now>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <time@plt>
mov    %rbx,%rdi
call   1040 <Btime@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @Now() {
%1 = alloca i32
%2 = call i32 @time(i32* %1)
%3 = call i8* @Btime(i32* %1)
ret i8* %3
}

LLVM IR (-O2):
define i8* @Now() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call i8* @Btime(i32* %1)
ret i8* %4
}
void rop3_112_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & S;
  stk2 = ~stk2;
  stk1 = T & stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_112_1_1>:
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
and    %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
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%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    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%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_112_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_112_1_1(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 = and 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 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8, i8* %6
%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 = load i8*, i8** %4
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = load i8, i8* %6
%47 = zext i8 %46 to i32
%48 = and i32 %45, %47
%49 = or i32 %42, %48
%50 = trunc i32 %49 to i8
%51 = load i8*, i8** %4
store i8 %50, i8* %51
ret void
}

LLVM IR (-O2):
define void @rop3_112_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
long double acosh(double);
__attribute__((weak)) long double acoshl(long double x) {
  return acosh((double)x);
}


x86 assembly (clang, -O0):
<acoshl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <acosh@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acoshl>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
jmp    1030 <acosh@plt>

LLVM IR (-O0):
define weak x86_fp80 @acoshl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call x86_fp80 @acosh(double %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define weak x86_fp80 @acoshl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call x86_fp80 @acosh(double %2)
ret x86_fp80 %3
}
float nvgDegToRad(float deg) {
  return deg / 180.0f * 3.14159265358979323846264338327f;
}


x86 assembly (clang, -O0):
<nvgDegToRad>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeee(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xede(%rip),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvgDegToRad>:
divss  0xef8(%rip),%xmm0
mulss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @nvgDegToRad(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fdiv float %3, 1.800000e+02
%5 = fmul float %4, 0x400921FB60000000
ret float %5
}

LLVM IR (-O2):
define float @nvgDegToRad(float %0) {
%2 = fdiv float %0, 1.800000e+02
%3 = fmul float %2, 0x400921FB60000000
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ run_time2sec_lace_tool_pipem_callback(int, int);
void run_time2sec(int in_fd, int out_fd, void *voidarg) {
  (void)voidarg;
  run_time2sec_lace_tool_pipem_callback(in_fd, out_fd);
}


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

x86 assembly (clang, -O2):
<run_time2sec>:
jmp    1030 <run_time2sec_lace_tool_pipem_callback@plt>

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

LLVM IR (-O2):
define void @run_time2sec(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @run_time2sec_lace_tool_pipem_callback(i32 %0, i32 %1)
ret void
}