xunge/DecIR huggingface dataset:
/* Variables and functions */
char *DL_GetIniValue(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ DL_TrimQuotesInPlace(char *);
char *DL_GetIniStringValue(char *key, char *DefaultValue) {
  char *p;
  char *retval;
  retval = DefaultValue;
  p = DL_GetIniValue(key, NULL);
  if (p != NULL) {
    DL_TrimQuotesInPlace(p);
    retval = p;
  }
  return retval;
}


x86 assembly (clang, -O0):
<DL_GetIniStringValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <DL_GetIniValue@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1165 <DL_GetIniStringValue+0x45>
mov    -0x18(%rbp),%rdi
call   1040 <DL_TrimQuotesInPlace@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DL_GetIniStringValue>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
xor    %esi,%esi
call   1030 <DL_GetIniValue@plt>
test   %rax,%rax
je     1141 <DL_GetIniStringValue+0x21>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <DL_TrimQuotesInPlace@plt>
mov    %rbx,%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @DL_GetIniStringValue(i8* %0, i8* readnone %1) {
%3 = tail call i8* @DL_GetIniValue(i8* %0, i32* null)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @DL_TrimQuotesInPlace(i8* %3)
br label %7
7: ; preds = %5, %2
%8 = phi i8* [ %3, %5 ], [ %1, %2 ]
ret i8* %8
}
unsigned long long has_zero64(unsigned long long x) {
  unsigned long long y;
  y = x - 0x0101010101010101ULL;
  y &= ~x;
  return y & 0x8080808080808080ULL;
}


x86 assembly (clang, -O0):
<has_zero64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movabs $0x101010101010101,%rcx
01 01 01
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
movabs $0x8080808080808080,%rax
80 80 80
and    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_zero64>:
movabs $0xfefefefefefefeff,%rcx
fe fe fe
add    %rdi,%rcx
not    %rdi
movabs $0x8080808080808080,%rax
80 80 80
and    %rdi,%rax
and    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @has_zero64(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = sub i64 %4, 72340172838076673
store i64 %5, i64* %3
%6 = load i64, i64* %2
%7 = xor i64 %6, -1
%8 = load i64, i64* %3
%9 = and i64 %8, %7
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = and i64 %10, -9187201950435737472
ret i64 %11
}

LLVM IR (-O2):
define i64 @has_zero64(i64 %0) {
%2 = add i64 %0, -72340172838076673
%3 = and i64 %0, -9187201950435737472
%4 = xor i64 %3, -9187201950435737472
%5 = and i64 %4, %2
ret i64 %5
}
int node_compare(const int t1, const int t2) { return t1 - t2; }


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

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

LLVM IR (-O0):
define i32 @node_compare(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @node_compare(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
unsigned func2(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @func2() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int main() {
  printf("Running ps with system.\n");
  system("ps -ax");
  printf("Done.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xec7(%rip),%rdi
call   1030 <system@plt>
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
call   1040 <system@plt>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Running ps with system.\0A\00"
@.str.1 = [7 x i8] c"ps -ax\00"
@.str.2 = [7 x i8] c"Done.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"ps -ax\00"
@str = [24 x i8] c"Running ps with system.\00"
@str.3 = [6 x i8] c"Done.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
void gdk_window_get_geometry() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_get_geometry() {
ret void
}
void BN_mul_word(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_mul_word() {
ret void
}
float toG(unsigned char *data) {
  short signed int value = (short int)((data[0] << 8) | data[1]);
  return (float)value / 4096.0;
}


x86 assembly (clang, -O0):
<toG>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%eax
shl    $0x8,%eax
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%eax
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed0(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<toG>:
movzwl (%rdi),%eax
rol    $0x8,%ax
cwtl
cvtsi2sd %eax,%xmm0
mulsd  0xeec(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @toG(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl i32 %7, 8
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = or i32 %8, %12
%14 = trunc i32 %13 to i16
store i16 %14, i16* %3
%15 = load i16, i16* %3
%16 = sitofp i16 %15 to float
%17 = fpext float %16 to double
%18 = fdiv double %17, 4.096000e+03
%19 = fptrunc double %18 to float
ret float %19
}

LLVM IR (-O2):
define float @toG(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = shl nuw i16 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = or i16 %4, %7
%9 = sitofp i16 %8 to double
%10 = fmul double %9, 0x3F30000000000000
%11 = fptrunc double %10 to float
ret float %11
}
/* Variables and functions */
int DigitSum(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("%d\n", DigitSum(1928));
  printf("%d\n", DigitSum(3428));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x788,%edi
call   1030 <DigitSum@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xd64,%edi
call   1030 <DigitSum@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
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 @DigitSum(i32 1928)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @DigitSum(i32 3428)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @DigitSum(i32 1928)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @DigitSum(i32 3428)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ t1outp(unsigned int, int, int);
void t1_disable_irq(unsigned int base) { t1outp(base, 0x12, 0x00); }


x86 assembly (clang, -O0):
<t1_disable_irq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x12,%esi
xor    %edx,%edx
call   1030 <t1outp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1_disable_irq>:
mov    $0x12,%esi
xor    %edx,%edx
jmp    1030 <t1outp@plt>

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

LLVM IR (-O2):
define void @t1_disable_irq(i32 %0) {
%2 = tail call i32 @t1outp(i32 %0, i32 18, i32 0)
ret void
}
void BSP_GPIO_SetPinHigh(unsigned int port, unsigned int pin) {
  unsigned int temp = (unsigned int)(volatile unsigned int *)0x56000004;
  volatile unsigned int *dataReg;
  unsigned int mask = 0x00000001;
  port = port << 4;
  dataReg = (volatile unsigned int *)(temp | port);
  mask = mask << pin;
  *dataReg = *dataReg | mask;
}


x86 assembly (clang, -O0):
<BSP_GPIO_SetPinHigh>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x56000004,%eax
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,%eax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
or     -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_GPIO_SetPinHigh>:
mov    %esi,%ecx
shl    $0x4,%edi
mov    $0x1,%eax
shl    %cl,%eax
or     $0x56000004,%rdi
or     %eax,(%rdi)
ret

LLVM IR (-O0):
define void @BSP_GPIO_SetPinHigh(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 ptrtoint (i32* inttoptr (i64 1442840580 to i32*) to i32), i32* %5
store i32 1, i32* %7
%8 = load i32, i32* %3
%9 = shl i32 %8, 4
store i32 %9, i32* %3
%10 = load i32, i32* %5
%11 = load i32, i32* %3
%12 = or i32 %10, %11
%13 = zext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
store i32* %14, i32** %6
%15 = load i32, i32* %7
%16 = load i32, i32* %4
%17 = shl i32 %15, %16
store i32 %17, i32* %7
%18 = load i32*, i32** %6
%19 = load volatile i32, i32* %18
%20 = load i32, i32* %7
%21 = or i32 %19, %20
%22 = load i32*, i32** %6
store volatile i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @BSP_GPIO_SetPinHigh(i32 %0, i32 %1) {
%3 = shl i32 %0, 4
%4 = or i32 %3, 1442840580
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = shl nuw i32 1, %1
%8 = load volatile i32, i32* %6
%9 = or i32 %8, %7
store volatile i32 %9, i32* %6
ret void
}
float dfn_rf() { return 5; }


x86 assembly (clang, -O0):
<dfn_rf>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dfn_rf>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @dfn_rf() {
ret float 5.000000e+00
}

LLVM IR (-O2):
define float @dfn_rf() {
ret float 5.000000e+00
}
char *predec(char *base) {
  --base;
  return base;
}


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

x86 assembly (clang, -O2):
<predec>:
lea    -0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @predec(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i32 -1
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @predec(i8* readnone %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -1
ret i8* %2
}
/* Variables and functions */
int task_ith(int, int);
int srv_id(int i, int cpu) { return task_ith(i, cpu); }


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

x86 assembly (clang, -O2):
<srv_id>:
jmp    1030 <task_ith@plt>

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

LLVM IR (-O2):
define i32 @srv_id(i32 %0, i32 %1) {
%3 = tail call i32 @task_ith(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print_array();
void print_results() { print_array(); }


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

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

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

LLVM IR (-O2):
define void @print_results() {
%1 = tail call i32 (...) @print_array()
ret void
}
int of_parse_phandle_with_args(const struct device_node *np,
                               const char *list_name, const char *cells_name,
                               int index, struct of_phandle_args *out_args) {
  return -38;
}


x86 assembly (clang, -O0):
<of_parse_phandle_with_args>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    $0xffffffda,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.device_node = type opaque
%struct.of_phandle_args = type opaque
define i32 @of_parse_phandle_with_args(%struct.device_node* %0, i8* %1, i8* %2, i32 %3, %struct.of_phandle_args* %4) {
%6 = alloca %struct.device_node*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca %struct.of_phandle_args*
store %struct.device_node* %0, %struct.device_node** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store %struct.of_phandle_args* %4, %struct.of_phandle_args** %10
ret i32 -38
}

LLVM IR (-O2):
%struct.device_node = type opaque
%struct.of_phandle_args = type opaque
define i32 @of_parse_phandle_with_args(%struct.device_node* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3, %struct.of_phandle_args* nocapture readnone %4) {
ret i32 -38
}
void set_bit(int nr, unsigned long *addr) {
  unsigned long mask = (1UL << ((nr) % (sizeof(unsigned long) * 8)));
  unsigned long *p = addr + ((nr) / (sizeof(unsigned long) * 8));
  *p |= mask;
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movslq -0x4(%rbp),%rcx
and    $0x3f,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
shr    $0x6,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%rax
or     (%rax),%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
movslq %edi,%rcx
mov    $0x1,%eax
shl    %cl,%rax
shr    $0x6,%rcx
or     %rax,(%rsi,%rcx,8)
ret

LLVM IR (-O0):
define void @set_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = urem i64 %8, 64
%10 = shl i64 1, %9
store i64 %10, i64* %5
%11 = load i64*, i64** %4
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = udiv i64 %13, 64
%15 = getelementptr inbounds i64, i64* %11, i64 %14
store i64* %15, i64** %6
%16 = load i64, i64* %5
%17 = load i64*, i64** %6
%18 = load i64, i64* %17
%19 = or i64 %18, %16
store i64 %19, i64* %17
ret void
}

LLVM IR (-O2):
define void @set_bit(i32 %0, i64* nocapture %1) {
%3 = sext i32 %0 to i64
%4 = and i64 %3, 63
%5 = shl nuw i64 1, %4
%6 = lshr i64 %3, 6
%7 = getelementptr inbounds i64, i64* %1, i64 %6
%8 = load i64, i64* %7
%9 = or i64 %8, %5
store i64 %9, i64* %7
ret void
}
/* Variables and functions */
scalar_t__ virtual_mcu_TimerMilli_isRunning__E();
int /*<<< orphan*/ virtual_mcu_TimerMilli_stop__E();
void pollen_time_TimerManager_stop__E() {
  if (virtual_mcu_TimerMilli_isRunning__E()) {
    virtual_mcu_TimerMilli_stop__E();
  }
}


x86 assembly (clang, -O0):
<pollen_time_TimerManager_stop__E>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <virtual_mcu_TimerMilli_isRunning__E@plt>
cmp    $0x0,%rax
je     113c <pollen_time_TimerManager_stop__E+0x1c>
mov    $0x0,%al
call   1040 <virtual_mcu_TimerMilli_stop__E@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pollen_time_TimerManager_stop__E>:
push   %rax
xor    %eax,%eax
call   1030 <virtual_mcu_TimerMilli_isRunning__E@plt>
test   %rax,%rax
je     1135 <pollen_time_TimerManager_stop__E+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1040 <virtual_mcu_TimerMilli_stop__E@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @pollen_time_TimerManager_stop__E() {
%1 = call i64 (...) @virtual_mcu_TimerMilli_isRunning__E()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @virtual_mcu_TimerMilli_stop__E()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @pollen_time_TimerManager_stop__E() {
%1 = tail call i64 (...) @virtual_mcu_TimerMilli_isRunning__E()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @virtual_mcu_TimerMilli_stop__E()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ m3f_fill_rotx_m3fo(float, float *);
int /*<<< orphan*/ m3f_mul_m3fo(float *, float const *, float *);
void rotatex_v3fo(float rx, const float *v, float *result) {
  float rm[9];
  m3f_fill_rotx_m3fo(rx, rm);
  m3f_mul_m3fo(rm, v, result);
}


x86 assembly (clang, -O0):
<rotatex_v3fo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
lea    -0x40(%rbp),%rdi
call   1040 <m3f_fill_rotx_m3fo@plt>
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <m3f_mul_m3fo@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotatex_v3fo>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
call   1040 <m3f_fill_rotx_m3fo@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <m3f_mul_m3fo@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @rotatex_v3fo(float %0, float* %1, float* %2) {
%4 = alloca float
%5 = alloca float*
%6 = alloca float*
%7 = alloca [9 x float]
store float %0, float* %4
store float* %1, float** %5
store float* %2, float** %6
%8 = load float, float* %4
%9 = getelementptr inbounds [9 x float], [9 x float]* %7, i64 0, i64 0
%10 = call i32 @m3f_fill_rotx_m3fo(float %8, float* %9)
%11 = getelementptr inbounds [9 x float], [9 x float]* %7, i64 0, i64 0
%12 = load float*, float** %5
%13 = load float*, float** %6
%14 = call i32 @m3f_mul_m3fo(float* %11, float* %12, float* %13)
ret void
}

LLVM IR (-O2):
define void @rotatex_v3fo(float %0, float* %1, float* %2) {
%4 = alloca [9 x float]
%5 = bitcast [9 x float]* %4 to i8*
%6 = getelementptr inbounds [9 x float], [9 x float]* %4, i64 0, i64 0
%7 = call i32 @m3f_fill_rotx_m3fo(float %0, float* %6)
%8 = call i32 @m3f_mul_m3fo(float* %6, float* %1, float* %2)
ret void
}
void debug() {
  __asm__ __volatile__("cli");
  SetTextColor(0x04 | 0x08, 0x00);
  kprintf("\nERROR: debug\n");
  do {
    __asm__ __volatile__("cli  \n\t"
                         "hlt");
  } while (1 == 1);
}


x86 assembly (clang, -O0):
<debug>:
push   %rbp
mov    %rsp,%rbp
cli
mov    $0xc,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <SetTextColor@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1040 <kprintf@plt>
cli
hlt
mov    $0x1,%al
test   $0x1,%al
jne    1141 <debug+0x21>
jmp    1152 <debug+0x32>
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug>:
push   %rax
cli
mov    $0xc,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <SetTextColor@plt>
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1040 <kprintf@plt>
xchg   %ax,%ax
cli
hlt
jmp    1140 <debug+0x20>

LLVM IR (-O0):
@.str = [15 x i8] c"\0AERROR: debug\0A\00"
define void @debug() {
%1 = call i32 (i32, i32, ...) bitcast (i32 (...)* @SetTextColor to i32 (i32, i32, ...)*)(i32 12, i32 0)
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @kprintf to i32 (i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %4, %0
br label %4
4: ; preds = %3
br i1 true, label %3, label %5
5: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"\0AERROR: debug\0A\00"
define void @debug() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
%1 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @SetTextColor to i32 (i32, i32, ...)*)(i32 12, i32 0)
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @kprintf to i32 (i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %3, %0
tail call void asm sideeffect "cli \0A\09hlt", "~{dirflag},~{fpsr},~{flags}"()
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void version(void) {
  printf("tmips 0.4.1 \"Ikea\"\n"
         "Copyright (C) 2011 Thomas Tuttle\n"
         "This is free software, and comes with no warranty.\n"
         "See COPYING for details.\n");
}


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

x86 assembly (clang, -O2):
<version>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [129 x i8] c"tmips 0.4.1 \22Ikea\22\0ACopyright (C) 2011 Thomas Tuttle\0AThis is free software, and comes with no warranty.\0ASee COPYING for details.\0A\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [128 x i8] c"tmips 0.4.1 \22Ikea\22\0ACopyright (C) 2011 Thomas Tuttle\0AThis is free software, and comes with no warranty.\0ASee COPYING for details.\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct devlisthead {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ flush_dev_cache(struct devlisthead *);
int /*<<< orphan*/ free(struct devlisthead *);
void free_dev_list(struct devlisthead *devlisthead) {
  if (devlisthead) {
    flush_dev_cache(devlisthead);
    free(devlisthead);
  }
  return;
}


x86 assembly (clang, -O0):
<free_dev_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <free_dev_list+0x29>
mov    -0x8(%rbp),%rdi
call   1040 <flush_dev_cache@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_dev_list>:
test   %rdi,%rdi
je     1137 <free_dev_list+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <flush_dev_cache@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.devlisthead = type { i32 }
define void @free_dev_list(%struct.devlisthead* %0) {
%2 = alloca %struct.devlisthead*
store %struct.devlisthead* %0, %struct.devlisthead** %2
%3 = load %struct.devlisthead*, %struct.devlisthead** %2
%4 = icmp ne %struct.devlisthead* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load %struct.devlisthead*, %struct.devlisthead** %2
%7 = call i32 @flush_dev_cache(%struct.devlisthead* %6)
%8 = load %struct.devlisthead*, %struct.devlisthead** %2
%9 = call i32 @free(%struct.devlisthead* %8)
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.devlisthead = type { i32 }
define void @free_dev_list(%struct.devlisthead* %0) {
%2 = icmp eq %struct.devlisthead* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @flush_dev_cache(%struct.devlisthead* %0)
%5 = tail call i32 @free(%struct.devlisthead* %0)
br label %6
6: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ ENODEV;
int /*<<< orphan*/ errno;
ssize_t read(int fd, void *dest, size_t count) {
  (void)fd;
  (void)dest;
  (void)count;
  errno = ENODEV;
  return -1;
}


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENODEV = global i32 0
@errno = global i32 0
define i32 @read(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = load i32, i32* @ENODEV
store i32 %10, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENODEV = global i32 0
@errno = global i32 0
define i32 @read(i32 %0, i8* nocapture readnone %1, i64 %2) {
%4 = load i32, i32* @ENODEV
store i32 %4, i32* @errno
ret i32 -1
}
/* Variables and functions */
scalar_t__ hash_string(void *);
int equal_string(void *s1, void *s2) {
  return (hash_string(s1) == hash_string(s2));
}


x86 assembly (clang, -O0):
<equal_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <hash_string@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <hash_string@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal_string>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <hash_string@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <hash_string@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @equal_string(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 = call i64 @hash_string(i8* %5)
%7 = load i8*, i8** %4
%8 = call i64 @hash_string(i8* %7)
%9 = icmp eq i64 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @equal_string(i8* %0, i8* %1) {
%3 = tail call i64 @hash_string(i8* %0)
%4 = tail call i64 @hash_string(i8* %1)
%5 = icmp eq i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
scalar_t__ isReflection(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
int main(void) {
  if (isReflection(NULL, NULL))
    printf("Success!\n");
  else
    printf("fail whale :(\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1040 <isReflection@plt>
cmp    $0x0,%rax
je     1156 <main+0x36>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
jmp    1162 <main+0x42>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1040 <isReflection@plt>
test   %rax,%rax
lea    0xecc(%rip),%rax
lea    0xed3(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Success!\0A\00"
@.str.1 = [15 x i8] c"fail whale :(\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @isReflection(i32* null, i32* null)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"fail whale :(\00"
@str.2 = [9 x i8] c"Success!\00"
define i32 @main() {
%1 = tail call i64 @isReflection(i32* null, i32* null)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
int MsgReceive(int chid, void *msg, int bytes, struct _msg_info *info) {
  return 0;
}


x86 assembly (clang, -O0):
<MsgReceive>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._msg_info = type opaque
define i32 @MsgReceive(i32 %0, i8* %1, i32 %2, %struct._msg_info* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca %struct._msg_info*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store %struct._msg_info* %3, %struct._msg_info** %8
ret i32 0
}

LLVM IR (-O2):
%struct._msg_info = type opaque
define i32 @MsgReceive(i32 %0, i8* nocapture readnone %1, i32 %2, %struct._msg_info* nocapture readnone %3) {
ret i32 0
}
void redislite_put_2bytes(unsigned char *p, int v) {
  p[0] = (unsigned char)(v >> 8);
  p[1] = (unsigned char)v;
}


x86 assembly (clang, -O0):
<redislite_put_2bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<redislite_put_2bytes>:
rol    $0x8,%si
mov    %si,(%rdi)
ret

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

LLVM IR (-O2):
define void @redislite_put_2bytes(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = trunc i32 %3 to i8
store i8 %4, i8* %0
%5 = trunc i32 %1 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ bytes_to_num(int *, int);
int /*<<< orphan*/ print_seperator();
int /*<<< orphan*/ printf(char *, ...);
void print_header(uint8_t *uid, uint8_t type) {
  print_seperator();
  printf("| %dK|            %08lx             |\n", type, bytes_to_num(uid, 4));
  print_seperator();
  printf("|sec|key A           |key B           |\n");
  print_seperator();
}


x86 assembly (clang, -O0):
<print_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1040 <print_seperator@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1050 <bytes_to_num@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <print_seperator@plt>
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <print_seperator@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_header>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <print_seperator@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1060 <bytes_to_num@plt>
lea    0xe9d(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <print_seperator@plt>
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <print_seperator@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"| %dK| %08lx |\0A\00"
@.str.1 = [41 x i8] c"|sec|key A |key B |\0A\00"
define void @print_header(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = call i32 (...) @print_seperator()
%6 = load i32, i32* %4
%7 = load i32*, i32** %3
%8 = call i32 @bytes_to_num(i32* %7, i32 4)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8)
%10 = call i32 (...) @print_seperator()
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 (...) @print_seperator()
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"| %dK| %08lx |\0A\00"
@str = [40 x i8] c"|sec|key A |key B |\00"
define void @print_header(i32* %0, i32 %1) {
%3 = tail call i32 (...) @print_seperator()
%4 = tail call i32 @bytes_to_num(i32* %0, i32 4)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %4)
%6 = tail call i32 (...) @print_seperator()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 (...) @print_seperator()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int days[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  int i;
  scanf("%d", &i);
  printf("%d", days[i - 1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x30,%edx
call   1040 <memcpy@plt>
lea    0xedc(%rip),%rdi
lea    -0x34(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xf04(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
lea    0xebb(%rip),%rcx
mov    -0x4(%rcx,%rax,4),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.days = [12 x i32] [i32 31, i32 28, i32 31, i32 30, i32 31, i32 30, i32 31, i32 31, i32 30, i32 31, i32 30, i32 31]
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [12 x i32]
%2 = alloca i32
%3 = bitcast [12 x i32]* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = sub nsw i32 %5, 1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [12 x i32], [12 x i32]* %1, i64 0, i64 %7
%9 = load i32, i32* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.days = [12 x i32] [i32 31, i32 28, i32 31, i32 30, i32 31, i32 30, i32 31, i32 31, i32 30, i32 31, i32 30, i32 31]
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = add nsw i32 %4, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [12 x i32], [12 x i32]* @__const.main.days, i64 0, i64 %6
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ put_unaligned_be32(int, int /*<<< orphan*/ *);
void put_unaligned_be64(uint64_t val, void *ptr) {
  uint8_t *p = ptr;
  put_unaligned_be32(val >> 32, p);
  put_unaligned_be32(val, p + 4);
}


x86 assembly (clang, -O0):
<put_unaligned_be64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x20,%ecx
sar    %cl,%edi
mov    -0x18(%rbp),%rsi
call   1030 <put_unaligned_be32@plt>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
add    $0x10,%rsi
call   1030 <put_unaligned_be32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_unaligned_be64>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1030 <put_unaligned_be32@plt>
add    $0x10,%rbx
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <put_unaligned_be32@plt>

LLVM IR (-O0):
define void @put_unaligned_be64(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32, i32* %3
%9 = ashr i32 %8, 32
%10 = load i32*, i32** %5
%11 = call i32 @put_unaligned_be32(i32 %9, i32* %10)
%12 = load i32, i32* %3
%13 = load i32*, i32** %5
%14 = getelementptr inbounds i32, i32* %13, i64 4
%15 = call i32 @put_unaligned_be32(i32 %12, i32* %14)
ret void
}

LLVM IR (-O2):
define void @put_unaligned_be64(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i32*
%4 = tail call i32 @put_unaligned_be32(i32 poison, i32* %3)
%5 = getelementptr inbounds i8, i8* %1, i64 16
%6 = bitcast i8* %5 to i32*
%7 = tail call i32 @put_unaligned_be32(i32 %0, i32* %6)
ret void
}
/* Variables and functions */
int X_OK;
int octave_access_x_ok(void) { return X_OK; }


x86 assembly (clang, -O0):
<octave_access_x_ok>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<octave_access_x_ok>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@X_OK = global i32 0
define i32 @octave_access_x_ok() {
%1 = load i32, i32* @X_OK
ret i32 %1
}

LLVM IR (-O2):
@X_OK = global i32 0
define i32 @octave_access_x_ok() {
%1 = load i32, i32* @X_OK
ret i32 %1
}
adrreg0indreg1_set(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ (p0[10000000]) = (*p1); }


x86 assembly (clang, -O0):
<adrreg0indreg1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%cx
mov    -0x18(%rbp),%rax
mov    %cx,0x1312d00(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrreg0indreg1_set>:
movzwl (%r9),%eax
mov    %ax,0x1312d00(%r8)
01
ret

LLVM IR (-O0):
define i32 @adrreg0indreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16*, i16** %13
%17 = load i16, i16* %16
%18 = load i16*, i16** %12
%19 = getelementptr inbounds i16, i16* %18, i64 10000000
store i16 %17, i16* %19
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @adrreg0indreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture writeonly %4, i16* nocapture %5) {
%7 = load i16, i16* %5
%8 = getelementptr inbounds i16, i16* %4, i64 10000000
store i16 %7, i16* %8
ret i32 undef
}
/* Variables and functions */
bool nrf52_errata_65(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_65() {
ret i32 0
}
double sub(double a, double b) { return (a - b); }


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

x86 assembly (clang, -O2):
<sub>:
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @sub(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 = fsub double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @sub(double %0, double %1) {
%3 = fsub double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int check_func(char *str) {
  if (!strcmp(str, "ABCDEF!"))
    return 42;
  return -1;
}


x86 assembly (clang, -O0):
<check_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1141 <check_func+0x31>
movl   $0x2a,-0x4(%rbp)
jmp    1148 <check_func+0x38>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_func>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
neg    %eax
sbb    %eax,%eax
or     $0x2a,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"ABCDEF!\00"
define i32 @check_func(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 42, i32 -1
ret i32 %4
}
/* Variables and functions */
int func2(int, int);
int /*<<< orphan*/ printf(char *, ...);
int func1(int x, int y) {
  int a, b;
  register char *const basepointer __asm("rbp");
  register char *const stackpointer __asm("rsp");
  printf("In func1\n");
  printf("&a = %p, &b = %p\n", &a, &b);
  return func2(x, y);
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <func2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func1>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb6(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <func2@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"In func1\0A\00"
@.str.1 = [18 x i8] c"&a = %p, &b = %p\0A\00"
define i32 @func1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32* %5, i32* %6)
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @func2(i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
@.str.1 = [18 x i8] c"&a = %p, &b = %p\0A\00"
@str = [9 x i8] c"In func1\00"
define i32 @func1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %4)
%9 = call i32 @func2(i32 %0, i32 %1)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_usage(void) {
  printf("Usage:\n"
         "  -h --help        show loginf version, usage, and exit\n"
         "  -c --config      assign the config file path\n"
         "\n"
         "Report bugs to <damonyang@tencent.com>\n");
}


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

x86 assembly (clang, -O2):
<show_usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [151 x i8] c"Usage:\0A -h --help show loginf version, usage, and exit\0A -c --config assign the config file path\0A\0AReport bugs to <damonyang@tencent.com>\0A\00"
define void @show_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [150 x i8] c"Usage:\0A -h --help show loginf version, usage, and exit\0A -c --config assign the config file path\0A\0AReport bugs to <damonyang@tencent.com>\00"
define void @show_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([150 x i8], [150 x i8]* @str, i64 0, i64 0))
ret void
}