xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int chess_rank(int square) {
  assert(square >= 0 && square <= 63);
  return square >> 3;
}


x86 assembly (clang, -O0):
<chess_rank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1134 <chess_rank+0x24>
cmpl   $0x3f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
sar    $0x3,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chess_rank>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40,%ebx
setb   %dil
call   1030 <assert@plt>
sar    $0x3,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @chess_rank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 63
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* %2
%13 = ashr i32 %12, 3
ret i32 %13
}

LLVM IR (-O2):
define i32 @chess_rank(i32 %0) {
%2 = icmp ult i32 %0, 64
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = ashr i32 %0, 3
ret i32 %5
}
void __attribute__((weak)) exti4_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<exti4_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<exti4_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.exti4_isr = [10 x i8] c"exti4_isr\00"
define weak void @exti4_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.exti4_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.exti4_isr = [10 x i8] c"exti4_isr\00"
define weak void @exti4_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.exti4_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned char *LL_skip_mc30(unsigned char *, unsigned char *, char);
unsigned char *skip_mc30(unsigned char *s, unsigned char *bytes, char flag) {
  return LL_skip_mc30(s, bytes, flag);
}


x86 assembly (clang, -O0):
<skip_mc30>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsbl -0x11(%rbp),%edx
call   1030 <LL_skip_mc30@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_mc30>:
jmp    1030 <LL_skip_mc30@plt>

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

LLVM IR (-O2):
define i8* @skip_mc30(i8* %0, i8* %1, i8 signext %2) {
%4 = tail call i8* @LL_skip_mc30(i8* %0, i8* %1, i8 signext %2)
ret i8* %4
}
int main() {
  int a = 3, b = 10, c = 15;
  if (a > 2) {
    if (b > a) {
      int d = b + 1;
      if (d > b)
        return 0;
      return 4;
    }
    return 3;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
movl   $0xf,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    116f <main+0x6f>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1163 <main+0x63>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1157 <main+0x57>
movl   $0x0,-0x4(%rbp)
jmp    1176 <main+0x76>
movl   $0x4,-0x4(%rbp)
jmp    1176 <main+0x76>
movl   $0x3,-0x4(%rbp)
jmp    1176 <main+0x76>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

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

/* Variables and functions */
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int pthread_mutexattr_destroy(int /*<<< orphan*/ *);
int main(void) {
  pthread_mutexattr_t mutex_attr;
  (void)memset(&mutex_attr, 0, sizeof(mutex_attr));
  return pthread_mutexattr_destroy(&mutex_attr);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    %rbx,%rdi
call   1040 <pthread_mutexattr_destroy@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @memset(i32* %1, i32 0, i32 4)
%4 = call i32 @pthread_mutexattr_destroy(i32* %1)
ret i32 %4
}
/* Variables and functions */
scalar_t__ log10(int);
int pow(int, int);
int recNumRvrs(int num) {
  return num > 10 ? (num % 10) * pow(10, (int)log10(num)) + recNumRvrs(num / 10)
                  : num;
}


x86 assembly (clang, -O0):
<recNumRvrs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jle    1191 <recNumRvrs+0x61>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <log10@plt>
mov    %eax,%esi
mov    $0xa,%edi
call   1040 <pow@plt>
mov    -0x10(%rbp),%edx
imul   %eax,%edx
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <recNumRvrs@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    1197 <recNumRvrs+0x67>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recNumRvrs>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebp
xor    %ebx,%ebx
cmp    $0xb,%edi
jl     1175 <recNumRvrs+0x55>
xor    %ebx,%ebx
mov    $0xcccccccd,%r14d
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebp,%edi
call   1040 <log10@plt>
mov    $0xa,%edi
mov    %eax,%esi
call   1030 <pow@plt>
mov    %ebp,%ecx
imul   %r14,%rcx
shr    $0x23,%rcx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ebp,%esi
sub    %edx,%esi
imul   %eax,%esi
add    %esi,%ebx
cmp    $0x6d,%ebp
mov    %ecx,%ebp
ja     1140 <recNumRvrs+0x20>
jmp    1177 <recNumRvrs+0x57>
mov    %ebp,%ecx
add    %ecx,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @recNumRvrs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 10
br i1 %4, label %5, label %17
5: ; preds = %1
%6 = load i32, i32* %2
%7 = srem i32 %6, 10
%8 = load i32, i32* %2
%9 = call i64 @log10(i32 %8)
%10 = trunc i64 %9 to i32
%11 = call i32 @pow(i32 10, i32 %10)
%12 = mul nsw i32 %7, %11
%13 = load i32, i32* %2
%14 = sdiv i32 %13, 10
%15 = call i32 @recNumRvrs(i32 %14)
%16 = add nsw i32 %12, %15
br label %19
17: ; preds = %1
%18 = load i32, i32* %2
br label %19
19: ; preds = %17, %5
%20 = phi i32 [ %16, %5 ], [ %18, %17 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @recNumRvrs(i32 %0) {
%2 = icmp sgt i32 %0, 10
br i1 %2, label %3, label %14
3: ; preds = %1, %3
%4 = phi i32 [ %11, %3 ], [ %0, %1 ]
%5 = phi i32 [ %12, %3 ], [ 0, %1 ]
%6 = urem i32 %4, 10
%7 = tail call i64 @log10(i32 %4)
%8 = trunc i64 %7 to i32
%9 = tail call i32 @pow(i32 10, i32 %8)
%10 = mul nsw i32 %9, %6
%11 = udiv i32 %4, 10
%12 = add nsw i32 %10, %5
%13 = icmp ugt i32 %4, 109
br i1 %13, label %3, label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %12, %3 ]
%16 = phi i32 [ %0, %1 ], [ %11, %3 ]
%17 = add nsw i32 %16, %15
ret i32 %17
}
/* Variables and functions */
scalar_t__ realloc(char *, int);
int /*<<< orphan*/ strcat(char *, char const *);
int strlen(char const *);
char *addstr(char *dynstr, const char *str) {
  int newSize;
  newSize = strlen(dynstr) + strlen(str) + 1;
  dynstr = (char *)realloc(dynstr, newSize);
  strcat(dynstr, str);
  return dynstr;
}


x86 assembly (clang, -O0):
<addstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addstr>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%r15d
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    (%r15,%rax,1),%esi
add    $0x1,%esi
mov    %rbx,%rdi
call   1040 <realloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @addstr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = add nsw i32 %7, %9
%11 = add nsw i32 %10, 1
store i32 %11, i32* %5
%12 = load i8*, i8** %3
%13 = load i32, i32* %5
%14 = call i64 @realloc(i8* %12, i32 %13)
%15 = inttoptr i64 %14 to i8*
store i8* %15, i8** %3
%16 = load i8*, i8** %3
%17 = load i8*, i8** %4
%18 = call i32 @strcat(i8* %16, i8* %17)
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define i8* @addstr(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = add i32 %3, 1
%6 = add i32 %5, %4
%7 = tail call i64 @realloc(i8* %0, i32 %6)
%8 = inttoptr i64 %7 to i8*
%9 = tail call i32 @strcat(i8* %8, i8* %1)
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
void doSigUsr1(int n __attribute__((unused))) { alarm(420); }


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

x86 assembly (clang, -O2):
<doSigUsr1>:
mov    $0x1a4,%edi
jmp    1030 <alarm@plt>

LLVM IR (-O0):
define void @doSigUsr1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @alarm(i32 420)
ret void
}

LLVM IR (-O2):
define void @doSigUsr1(i32 %0) {
%2 = tail call i32 @alarm(i32 420)
ret void
}
int do_142() { return 142; }


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

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

LLVM IR (-O0):
define i32 @do_142() {
ret i32 142
}

LLVM IR (-O2):
define i32 @do_142() {
ret i32 142
}
/* Variables and functions */
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
int /*<<< orphan*/ VelocityStateHandle();
void VelocityStateRequestUpdate() {
  UAVObjRequestUpdate(VelocityStateHandle());
}


x86 assembly (clang, -O0):
<VelocityStateRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <VelocityStateHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<VelocityStateRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <VelocityStateHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @VelocityStateRequestUpdate() {
%1 = call i32 (...) @VelocityStateHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @VelocityStateRequestUpdate() {
%1 = tail call i32 (...) @VelocityStateHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
__attribute__((section(".after_vectors"))) void NMI_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<NMI_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <NMI_Handler+0x9>
jmp    1109 <NMI_Handler+0x9>

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

LLVM IR (-O0):
define void @NMI_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @NMI_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
void test45_Test2_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test45_Test2_targetInit__I() {
ret void
}
/* Variables and functions */
scalar_t__ i8086ReadStrConfig(char *, char const *, char const *);
int strtoul(char *, int /*<<< orphan*/ *, int);
int i8086ReadDecConfig(const char *filename, const char *name, int defValue) {
  char str[256];
  if (i8086ReadStrConfig(str, filename, name) != 0)
    return strtoul(str, NULL, 10);
  else
    return defValue;
}


x86 assembly (clang, -O0):
<i8086ReadDecConfig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <i8086ReadStrConfig@plt>
cmp    $0x0,%rax
je     1171 <i8086ReadDecConfig+0x51>
lea    -0x120(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %eax,-0x4(%rbp)
jmp    1177 <i8086ReadDecConfig+0x57>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i8086ReadDecConfig>:
push   %rbx
sub    $0x100,%rsp
mov    %edx,%ebx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <i8086ReadStrConfig@plt>
test   %rax,%rax
je     114e <i8086ReadDecConfig+0x2e>
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %eax,%ebx
mov    %ebx,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @i8086ReadDecConfig(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca [256 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = call i64 @i8086ReadStrConfig(i8* %9, i8* %10, i8* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%16 = call i32 @strtoul(i8* %15, i32* null, i32 10)
store i32 %16, i32* %4
br label %19
17: ; preds = %3
%18 = load i32, i32* %7
store i32 %18, i32* %4
br label %19
19: ; preds = %17, %14
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @i8086ReadDecConfig(i8* %0, i8* %1, i32 %2) {
%4 = alloca [256 x i8]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%6 = call i64 @i8086ReadStrConfig(i8* %5, i8* %0, i8* %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = call i32 @strtoul(i8* nocapture %5, i32* null, i32 10)
br label %10
10: ; preds = %3, %8
%11 = phi i32 [ %9, %8 ], [ %2, %3 ]
ret i32 %11
}
int atomic_cmpxchg_int(volatile int *var, int old, int new_v) {
  int ret;
  asm volatile("lock ;"
               " "
               "cmpxchgl %2, %1"
               "\n\t"
               : "=a"(ret), "=m"(*var)
               : "r"(new_v), "m"(*var), "0"(old)
               : "cc", "memory");
  return ret;
}


x86 assembly (clang, -O0):
<atomic_cmpxchg_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%eax
lock cmpxchg %edx,(%rcx)
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_cmpxchg_int>:
mov    %esi,%eax
lock cmpxchg %edx,(%rdi)
ret

LLVM IR (-O0):
define i32 @atomic_cmpxchg_int(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %6
%10 = load i32*, i32** %4
%11 = load i32, i32* %5
%12 = call i32 asm sideeffect "lock ; cmpxchgl $2, $1\0A\09", "={ax},=*m,r,*m,0,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %8, i32 %9, i32* elementtype(i32) %10, i32 %11)
store i32 %12, i32* %7
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
define i32 @atomic_cmpxchg_int(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 asm sideeffect "lock ; cmpxchgl $2, $1\0A\09", "={ax},=*m,r,*m,0,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %0, i32 %2, i32* elementtype(i32) %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
extern void console_log(const char *msg) { printf("INFO: %s\n", msg); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"INFO: %s\0A\00"
define void @console_log(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
adr0imm1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if ((*((unsigned int *)10000000)) <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adr0imm1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    $0x989680,%eax
cmpl   $0x21,(%rax)
ja     1132 <adr0imm1+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1139 <adr0imm1+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adr0imm1>:
xor    %eax,%eax
cmpl   $0x22,0x989680
22
setb   %al
ret

LLVM IR (-O0):
define i32 @adr0imm1(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*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* inttoptr (i64 10000000 to i32*)
%15 = icmp ule i32 %14, 33
br i1 %15, label %16, label %17
16: ; preds = %6
store i32 1, i32* %7
br label %18
17: ; preds = %6
store i32 0, i32* %7
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @adr0imm1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = load i32, i32* inttoptr (i64 10000000 to i32*)
%8 = icmp ult i32 %7, 34
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int snprintf(char *, int, char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int insert_time(char *buf, int size) {
  int len;
  time_t cal;
  cal = time(NULL);
  len = snprintf(buf, size, "%s", ctime(&cal));
  len--;
  return len;
}


x86 assembly (clang, -O0):
<insert_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <ctime@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    %rax,%rcx
lea    0xe8d(%rip),%rdx
call   1040 <snprintf@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_time>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <ctime@plt>
lea    0xeac(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %rax,%rcx
call   1040 <snprintf@plt>
add    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @insert_time(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = call i32 @time(i32* null)
store i32 %7, i32* %6
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i8* @ctime(i32* %6)
%11 = call i32 @snprintf(i8* %8, i32 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = add nsw i32 %12, -1
store i32 %13, i32* %5
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @insert_time(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call i8* @ctime(i32* %3)
%7 = call i32 @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = add nsw i32 %7, -1
ret i32 %8
}
void jinit_1pass_quantizer(void) {}


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

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

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

LLVM IR (-O2):
define void @jinit_1pass_quantizer() {
ret void
}
int islovowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<islovowel>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
je     114b <islovowel+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x65,%eax
je     114b <islovowel+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x69,%eax
je     114b <islovowel+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x6f,%eax
je     114b <islovowel+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x75,%eax
jne    1157 <islovowel+0x57>
movl   $0x1,-0x4(%rbp)
jmp    115e <islovowel+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islovowel>:
add    $0x9f,%dil
ror    %dil
xor    %eax,%eax
cmp    $0xa,%dil
ja     111d <islovowel+0x1d>
movsbq %dil,%rax
lea    0xee6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

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

LLVM IR (-O2):
@switch.table.islovowel = [11 x i32] [i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1]
define i32 @islovowel(i8 signext %0) {
%2 = add i8 %0, -97
%3 = tail call i8 @llvm.fshl.i8(i8 %2, i8 %2, i8 7)
%4 = icmp ult i8 %3, 11
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i8 %3 to i64
%7 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.islovowel, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ %8, %5 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *lxqt_backlight_backend_get_driver();
int read_bl_power(char *);
int lxqt_backlight_is_backlight_off() {
  char *driver = lxqt_backlight_backend_get_driver();
  if (driver == NULL) {
    return -1;
  }
  int bl_power = read_bl_power(driver);
  free(driver);
  return bl_power;
}


x86 assembly (clang, -O0):
<lxqt_backlight_is_backlight_off>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1050 <lxqt_backlight_backend_get_driver@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115a <lxqt_backlight_is_backlight_off+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1175 <lxqt_backlight_is_backlight_off+0x45>
mov    -0x10(%rbp),%rdi
call   1040 <read_bl_power@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lxqt_backlight_is_backlight_off>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <lxqt_backlight_backend_get_driver@plt>
test   %rax,%rax
je     1158 <lxqt_backlight_is_backlight_off+0x28>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <read_bl_power@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
jmp    115d <lxqt_backlight_is_backlight_off+0x2d>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @lxqt_backlight_is_backlight_off() {
%1 = tail call i8* (...) @lxqt_backlight_backend_get_driver()
%2 = icmp eq i8* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 @read_bl_power(i8* %1)
%5 = tail call i32 @free(i8* %1)
br label %6
6: ; preds = %0, %3
%7 = phi i32 [ %4, %3 ], [ -1, %0 ]
ret i32 %7
}
/* Variables and functions */
size_t retro_get_memory_size(unsigned id) {
  (void)id;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i64 @retro_get_memory_size(i32 %0) {
ret i64 0
}
int test_imm_41int64_midword_reg(long long val) {
  return ((val >> 16) & (0x41 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_41int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x41,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_41int64_midword_reg>:
test   $0x410000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_41int64_midword_reg(i64 %0) {
%2 = and i64 %0, 4259840
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Atm128GpioInterruptC__0__Atm128Interrupt__fired();
int /*<<< orphan*/ Atm128GpioInterruptC__3__Atm128Interrupt__fired();
void HplAtm128InterruptPinP__6__Irq__fired(void) {
  Atm128GpioInterruptC__3__Atm128Interrupt__fired();
  Atm128GpioInterruptC__0__Atm128Interrupt__fired();
}


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

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

LLVM IR (-O0):
define void @HplAtm128InterruptPinP__6__Irq__fired() {
%1 = call i32 (...) @Atm128GpioInterruptC__3__Atm128Interrupt__fired()
%2 = call i32 (...) @Atm128GpioInterruptC__0__Atm128Interrupt__fired()
ret void
}

LLVM IR (-O2):
define void @HplAtm128InterruptPinP__6__Irq__fired() {
%1 = tail call i32 (...) @Atm128GpioInterruptC__3__Atm128Interrupt__fired()
%2 = tail call i32 (...) @Atm128GpioInterruptC__0__Atm128Interrupt__fired()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dealAHand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main() {
  srand(time(0));
  dealAHand();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1050 <dealAHand@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32 0)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @dealAHand()
ret i32 0
}
/* Variables and functions */
double acos(double);
char *gettext(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double Arccoseno(double a) {
  printf(gettext("Enter a number: "));
  scanf("%lf", &a);
  return (acos(a));
}


x86 assembly (clang, -O0):
<Arccoseno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xeac(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
lea    0xea9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
call   1050 <acos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Arccoseno>:
push   %rax
movsd  %xmm0,(%rsp)
lea    0xeb3(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
lea    0xeb0(%rip),%rdi
mov    %rsp,%rsi
call   1060 <scanf@plt>
movsd  (%rsp),%xmm0
call   1050 <acos@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @Arccoseno(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i8* @gettext(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* %3)
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = call double @acos(double %6)
ret double %7
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @Arccoseno(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = tail call i8* @gettext(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = call double @acos(double %6)
ret double %7
}
int msm_rpm_send_request_noirq(struct msm_rpm_request *handle) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.msm_rpm_request = type opaque
define i32 @msm_rpm_send_request_noirq(%struct.msm_rpm_request* nocapture readnone %0) {
ret i32 0
}
neg_rhs_2(int i) { return (1 >> i); }


x86 assembly (clang, -O0):
<neg_rhs_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
sar    %cl,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @neg_rhs_2(i32 %0) {
%2 = lshr i32 1, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ die(int);
int /*<<< orphan*/ perror(char const *);
void perrdie(const char *msg) {
  perror(msg);
  die(1);
}


x86 assembly (clang, -O0):
<perrdie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1030 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perrdie>:
push   %rax
call   1040 <perror@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <die@plt>

LLVM IR (-O0):
define void @perrdie(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @die(i32 1)
ret void
}

LLVM IR (-O2):
define void @perrdie(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @die(i32 1)
ret void
}
void bind_pirq() {}


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

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

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

LLVM IR (-O2):
define void @bind_pirq() {
ret void
}
/* Variables and functions */
scalar_t__ EAGAIN;
scalar_t__ ENOSPC;
scalar_t__ errno;
int open(char *, int);
int posix_openpt(int flags) {
  int r = open("/dev/ptmx", flags);
  if (r < 0 && errno == ENOSPC)
    errno = EAGAIN;
  return r;
}


x86 assembly (clang, -O0):
<posix_openpt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <open@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1165 <posix_openpt+0x55>
mov    0x2ea2(%rip),%rax
mov    (%rax),%rax
mov    0x2e90(%rip),%rcx
cmp    (%rcx),%rax
jne    1165 <posix_openpt+0x55>
mov    0x2e70(%rip),%rax
mov    (%rax),%rcx
mov    0x2e7e(%rip),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_openpt>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <open@plt>
test   %eax,%eax
js     1125 <posix_openpt+0x15>
pop    %rcx
ret
mov    0x2eb4(%rip),%rcx
mov    (%rcx),%rdx
mov    0x2ea2(%rip),%rsi
cmp    (%rsi),%rdx
jne    1123 <posix_openpt+0x13>
mov    0x2e86(%rip),%rdx
mov    (%rdx),%rdx
mov    %rdx,(%rcx)
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/dev/ptmx\00"
@errno = global i64 0
@ENOSPC = global i64 0
@EAGAIN = global i64 0
define i32 @posix_openpt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i64, i64* @errno
%10 = load i64, i64* @ENOSPC
%11 = icmp eq i64 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = load i64, i64* @EAGAIN
store i64 %13, i64* @errno
br label %14
14: ; preds = %12, %8, %1
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@.str = [10 x i8] c"/dev/ptmx\00"
@errno = global i64 0
@ENOSPC = global i64 0
@EAGAIN = global i64 0
define i32 @posix_openpt(i32 %0) {
%2 = tail call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = load i64, i64* @errno
%6 = load i64, i64* @ENOSPC
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = load i64, i64* @EAGAIN
store i64 %9, i64* @errno
br label %10
10: ; preds = %8, %4, %1
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int enbyte(int);
uint32_t enmsb(uint32_t x) { return enbyte(x) << 0x00000018; }


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

x86 assembly (clang, -O2):
<enmsb>:
push   %rax
call   1030 <enbyte@plt>
shl    $0x18,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @enmsb(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @enbyte(i32 %3)
%5 = shl i32 %4, 24
ret i32 %5
}

LLVM IR (-O2):
define i32 @enmsb(i32 %0) {
%2 = tail call i32 @enbyte(i32 %0)
%3 = shl i32 %2, 24
ret i32 %3
}
char *strupr(a)
char *a;
{
  char *ret = a;
  while (*a != '\0') {
    if (islower(*a))
      *a = toupper(*a);
    ++a;
  }
  return ret;
}


x86 assembly (clang, -O0):
<strupr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     117e <strupr+0x5e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <islower@plt>
cmp    $0x0,%eax
je     116d <strupr+0x4d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1134 <strupr+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strupr>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1165 <strupr+0x45>
lea    0x1(%r14),%rbx
jmp    114b <strupr+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1165 <strupr+0x45>
movsbl %al,%ebp
mov    %ebp,%edi
call   1030 <islower@plt>
test   %eax,%eax
je     1140 <strupr+0x20>
mov    %ebp,%edi
call   1040 <toupper@plt>
mov    %al,-0x1(%rbx)
jmp    1140 <strupr+0x20>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %rbp
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 = %23, %1
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %26
10: ; preds = %5
%11 = load i8*, i8** %2
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = call i32 @islower(i32 %13)
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %23
16: ; preds = %10
%17 = load i8*, i8** %2
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = call i32 @toupper(i32 %19)
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %2
store i8 %21, i8* %22
br label %23
23: ; preds = %16, %10
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %2
br label %5
26: ; preds = %5
%27 = load i8*, i8** %3
ret i8* %27
}

LLVM IR (-O2):
define i8* @strupr(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %13
%5 = phi i8 [ %15, %13 ], [ %2, %1 ]
%6 = phi i8* [ %14, %13 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i32 @islower(i32 %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %4
%11 = tail call i32 @toupper(i32 %7)
%12 = trunc i32 %11 to i8
store i8 %12, i8* %6
br label %13
13: ; preds = %10, %4
%14 = getelementptr inbounds i8, i8* %6, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %13, %1
ret i8* %0
}
const char *strdur(unsigned long long dur) {
  return ({
    extern __typeof__(strdur) module_api_strdur;
    &module_api_strdur;
  })(dur);
}


x86 assembly (clang, -O0):
<strdur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ecd(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdur>:
jmp    1030 <module_api_strdur@plt>

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

LLVM IR (-O2):
define i8* @strdur(i64 %0) {
%2 = tail call i8* @module_api_strdur(i64 %0)
ret i8* %2
}
int RTP_get_extension_len(unsigned char *p) {
  return 4 * ((((unsigned int)p[14]) << 8) + (unsigned int)p[15]);
}


x86 assembly (clang, -O0):
<RTP_get_extension_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0xe(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xf(%rcx),%ecx
add    %ecx,%eax
shl    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTP_get_extension_len>:
movzbl 0xe(%rdi),%eax
movzbl 0xf(%rdi),%ecx
shl    $0xa,%eax
lea    (%rax,%rcx,4),%eax
ret

LLVM IR (-O0):
define i32 @RTP_get_extension_len(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 14
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 15
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = add i32 %7, %11
%13 = mul i32 4, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @RTP_get_extension_len(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 14
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 15
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %4, 10
%9 = shl nuw nsw i32 %7, 2
%10 = or i32 %9, %8
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int difDays();
  int answer = 0;
  answer = difDays();
  printf("The difference of your selected dates %d days.", answer);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [47 x i8] c"The difference of your selected dates %d days.\00"
define i32 @main() {
%1 = tail call i32 (...) @difDays()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
double _adds(double a, double b) { return a + b; }


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

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

LLVM IR (-O0):
define double @_adds(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @_adds(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
void vboxCKeyDst(void) {}


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

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

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

LLVM IR (-O2):
define void @vboxCKeyDst() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XwcTextPropertyToTextList() {
  printf("XwcTextPropertyToTextList called\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"XwcTextPropertyToTextList called\0A\00"
define i32 @XwcTextPropertyToTextList() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [33 x i8] c"XwcTextPropertyToTextList called\00"
define i32 @XwcTextPropertyToTextList() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 0
}
double cdfBernoulli(double p, long x) { return ((x == 0) ? 1.0 - p : 1.0); }


x86 assembly (clang, -O0):
<cdfBernoulli>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    112f <cdfBernoulli+0x2f>
movsd  0xee0(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1141 <cdfBernoulli+0x41>
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1141 <cdfBernoulli+0x41>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdfBernoulli>:
movapd %xmm0,%xmm1
movsd  0xef4(%rip),%xmm0
test   %rdi,%rdi
jne    1115 <cdfBernoulli+0x15>
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @cdfBernoulli(double %0, i64 %1) {
%3 = alloca double
%4 = alloca i64
store double %0, double* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load double, double* %3
%9 = fsub double 1.000000e+00, %8
br label %11
10: ; preds = %2
br label %11
11: ; preds = %10, %7
%12 = phi double [ %9, %7 ], [ 1.000000e+00, %10 ]
ret double %12
}

LLVM IR (-O2):
define double @cdfBernoulli(double %0, i64 %1) {
%3 = icmp eq i64 %1, 0
%4 = fsub double 1.000000e+00, %0
%5 = select i1 %3, double %4, double 1.000000e+00
ret double %5
}