xunge/DecIR huggingface dataset:
void lstat_set(unsigned int addr, int cnt, int cpuahbm, int event) {
  volatile unsigned int *ctrl = (unsigned int *)(addr + 0x80);
  ctrl[cnt] = (1 << 12) | (event << 4) | cpuahbm;
}


x86 assembly (clang, -O0):
<lstat_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%eax
mov    %eax,%eax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%edx
shl    $0x4,%edx
or     $0x1000,%edx
or     -0xc(%rbp),%edx
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<lstat_set>:
sub    $0xffffff80,%edi
shl    $0x4,%ecx
or     %edx,%ecx
or     $0x1000,%ecx
movslq %esi,%rax
mov    %ecx,(%rdi,%rax,4)
ret

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

LLVM IR (-O2):
define void @lstat_set(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = add i32 %0, 128
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = shl i32 %3, 4
%9 = or i32 %8, %2
%10 = or i32 %9, 4096
%11 = sext i32 %1 to i64
%12 = getelementptr inbounds i32, i32* %7, i64 %11
store volatile i32 %10, i32* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ io_hlt();
int /*<<< orphan*/ write_mem8(int, int);
void HariMain(void) {
  int i;
  for (i = 0xa0000; i <= 0xaffff; ++i)
    write_mem8(i, 15);
  for (;;)
    io_hlt();
}


x86 assembly (clang, -O0):
<HariMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa0000,-0x4(%rbp)
cmpl   $0xaffff,-0x4(%rbp)
jg     1157 <HariMain+0x37>
mov    -0x4(%rbp),%edi
mov    $0xf,%esi
call   1040 <write_mem8@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <HariMain+0xf>
jmp    115c <HariMain+0x3c>
mov    $0x0,%al
call   1030 <io_hlt@plt>
jmp    115c <HariMain+0x3c>

x86 assembly (clang, -O2):
<HariMain>:
push   %rbx
mov    $0xa0000,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    $0xf,%esi
call   1040 <write_mem8@plt>
add    $0x1,%ebx
cmp    $0xb0000,%ebx
jne    1130 <HariMain+0x10>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <io_hlt@plt>
jmp    1150 <HariMain+0x30>

LLVM IR (-O0):
define void @HariMain() {
%1 = alloca i32
store i32 655360, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp sle i32 %3, 720895
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @write_mem8(i32 %6, i32 15)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
br label %12
12: ; preds = %12, %11
%13 = call i32 (...) @io_hlt()
br label %12
}

LLVM IR (-O2):
define void @HariMain() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 655360, %0 ], [ %4, %1 ]
%3 = tail call i32 @write_mem8(i32 %2, i32 15)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 720896
br i1 %5, label %6, label %1
6: ; preds = %1, %6
%7 = tail call i32 (...) @io_hlt()
br label %6
}
/* Variables and functions */
int /*<<< orphan*/ bcopy(char *, char *, int);
void bcopy1() {
  char src[] = {1, 2, 3, 4};
  char dst[10];
  bcopy(src, dst, 5);
}


x86 assembly (clang, -O0):
<bcopy1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee2(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0xe(%rbp),%rsi
mov    $0x5,%edx
call   1030 <bcopy@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.bcopy1.src = [4 x i8] c"\01\02\03\04"
define void @bcopy1() {
%1 = alloca [4 x i8]
%2 = alloca [10 x i8]
%3 = bitcast [4 x i8]* %1 to i8*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%6 = call i32 @bcopy(i8* %4, i8* %5, i32 5)
ret void
}

LLVM IR (-O2):
define void @bcopy1() {
ret void
}
void foo622(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo622(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_putchar(char);
int size(char *);
char *my_evil_str(char *str) {
  int i;
  i = size(str);
  while (i >= 0) {
    my_putchar(str[i]);
    i--;
  }
  return (0);
}


x86 assembly (clang, -O0):
<my_evil_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <size@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1161 <my_evil_str+0x41>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <my_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1138 <my_evil_str+0x18>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_evil_str>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <size@plt>
test   %eax,%eax
js     1150 <my_evil_str+0x30>
mov    %eax,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1040 <my_putchar@plt>
add    $0xffffffffffffffff,%rbx
jb     1140 <my_evil_str+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @my_evil_str(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @size(i8* %4)
store i32 %5, i32* %3
br label %6
6: ; preds = %9, %1
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i8*, i8** %2
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
%15 = call i32 @my_putchar(i8 signext %14)
%16 = load i32, i32* %3
%17 = add nsw i32 %16, -1
store i32 %17, i32* %3
br label %6
18: ; preds = %6
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @my_evil_str(i8* %0) {
%2 = tail call i32 @size(i8* %0)
%3 = icmp sgt i32 %2, -1
br i1 %3, label %4, label %13
4: ; preds = %1
%5 = zext i32 %2 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @my_putchar(i8 signext %9)
%11 = add nsw i64 %7, -1
%12 = icmp eq i64 %7, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %1
ret i8* null
}
/* Variables and functions */
char *fonly(char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *dirname(char *nam, char *dnam) {
  char buf[128];
  strcpy(buf, fonly(nam));
  strcpy(nam, dnam);
  strcat(nam, "\\");
  strcat(nam, buf);
  return (nam);
}


x86 assembly (clang, -O0):
<dirname>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x90(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fonly@plt>
mov    -0x98(%rbp),%rdi
mov    %rax,%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%rdi
lea    0xe7f(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1050 <strcat@plt>
mov    -0x8(%rbp),%rax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dirname>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <fonly@plt>
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rax,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
lea    0xe99(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rax
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\\\00"
define i8* @dirname(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [128 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = call i8* @fonly(i8* %7)
%9 = call i32 @strcpy(i8* %6, i8* %8)
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
%14 = call i32 @strcat(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = load i8*, i8** %3
%16 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%17 = call i32 @strcat(i8* %15, i8* %16)
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
@.str = [2 x i8] c"\\\00"
define i8* @dirname(i8* returned %0, i8* %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = tail call i8* @fonly(i8* %0)
%6 = call i32 @strcpy(i8* %4, i8* %5)
%7 = call i32 @strcpy(i8* %0, i8* %1)
%8 = call i32 @strcat(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @strcat(i8* %0, i8* %4)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ BackupPC();
int /*<<< orphan*/ Exception(int);
void DoCodeFdefault(void) {
  BackupPC();
  Exception(0xB);
}


x86 assembly (clang, -O0):
<DoCodeFdefault>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <BackupPC@plt>
mov    $0xb,%edi
call   1030 <Exception@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoCodeFdefault>:
push   %rax
xor    %eax,%eax
call   1040 <BackupPC@plt>
mov    $0xb,%edi
pop    %rax
jmp    1030 <Exception@plt>

LLVM IR (-O0):
define void @DoCodeFdefault() {
%1 = call i32 (...) @BackupPC()
%2 = call i32 @Exception(i32 11)
ret void
}

LLVM IR (-O2):
define void @DoCodeFdefault() {
%1 = tail call i32 (...) @BackupPC()
%2 = tail call i32 @Exception(i32 11)
ret void
}
void ConversionBoxRefocus() { return; }


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

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

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

LLVM IR (-O2):
define void @ConversionBoxRefocus() {
ret void
}
/* Variables and functions */
double sin(double);
double Sin(double a, double b) { return sin(a); }


x86 assembly (clang, -O0):
<Sin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sin>:
jmp    1030 <sin@plt>

LLVM IR (-O0):
define double @Sin(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 = call double @sin(double %5)
ret double %6
}

LLVM IR (-O2):
define double @Sin(double %0, double %1) {
%3 = tail call double @sin(double %0)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void exit_with_help() {
  printf("Usage: predict [options] test_file model_file output_file\n"
         "options:\n"
         "-b probability_estimates: whether to output probability estimates, 0 "
         "or 1 (default 0)\n");
  exit(1);
}


x86 assembly (clang, -O0):
<exit_with_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_with_help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [154 x i8] c"Usage: predict [options] test_file model_file output_file\0Aoptions:\0A-b probability_estimates: whether to output probability estimates, 0 or 1 (default 0)\0A\00"
define void @exit_with_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [153 x i8] c"Usage: predict [options] test_file model_file output_file\0Aoptions:\0A-b probability_estimates: whether to output probability estimates, 0 or 1 (default 0)\00"
define void @exit_with_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([153 x i8], [153 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char fgetc(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
void flush_stdin() {
  while (fgetc(stdin) != '\n')
    ;
}


x86 assembly (clang, -O0):
<flush_stdin>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <flush_stdin+0x9>
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <fgetc@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1138 <flush_stdin+0x28>
jmp    1119 <flush_stdin+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush_stdin>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edi
call   1030 <fgetc@plt>
cmp    $0xa,%al
jne    1120 <flush_stdin+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define void @flush_stdin() {
br label %1
1: ; preds = %6, %0
%2 = load i32, i32* @stdin
%3 = call signext i8 @fgetc(i32 %2)
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %7
6: ; preds = %1
br label %1
7: ; preds = %1
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @flush_stdin() {
br label %1
1: ; preds = %1, %0
%2 = load i32, i32* @stdin
%3 = tail call signext i8 @fgetc(i32 %2)
%4 = icmp eq i8 %3, 10
br i1 %4, label %5, label %1
5: ; preds = %1
ret void
}
void WriteCommand(S) char *S;
{
  standout();
  addch(*S);
  standend();
  printw("%s", S + 1);
}


x86 assembly (clang, -O0):
<WriteCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <standout@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
mov    $0x0,%al
call   1060 <addch@plt>
mov    $0x0,%al
call   1030 <standend@plt>
mov    -0x8(%rbp),%rsi
add    $0x1,%rsi
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1040 <printw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteCommand>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <standout@plt>
movsbl (%rbx),%edi
xor    %eax,%eax
call   1060 <addch@plt>
xor    %eax,%eax
call   1030 <standend@plt>
add    $0x1,%rbx
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printw@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @WriteCommand(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @standout()
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = call i32 (i32, ...) bitcast (i32 (...)* @addch to i32 (i32, ...)*)(i32 %6)
%8 = call i32 (...) @standend()
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @printw to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @WriteCommand(i8* %0) {
%2 = tail call i32 (...) @standout()
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @addch to i32 (i32, ...)*)(i32 %4)
%6 = tail call i32 (...) @standend()
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @printw to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}
/* Type definitions */
struct rq_asset_irswap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rq_asset_irswap_free(struct rq_asset_irswap *);
void rq_asset_irswap_freefunc(void *asset_data) {
  rq_asset_irswap_free((struct rq_asset_irswap *)asset_data);
}


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

x86 assembly (clang, -O2):
<rq_asset_irswap_freefunc>:
jmp    1030 <rq_asset_irswap_free@plt>

LLVM IR (-O0):
%struct.rq_asset_irswap = type { i32 }
define void @rq_asset_irswap_freefunc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.rq_asset_irswap*
%5 = call i32 @rq_asset_irswap_free(%struct.rq_asset_irswap* %4)
ret void
}

LLVM IR (-O2):
%struct.rq_asset_irswap = type { i32 }
define void @rq_asset_irswap_freefunc(i8* %0) {
%2 = bitcast i8* %0 to %struct.rq_asset_irswap*
%3 = tail call i32 @rq_asset_irswap_free(%struct.rq_asset_irswap* %2)
ret void
}
int syscall0(int sys_num) {
  int retval;
  __asm__("int $0x80      \n\t"
          "mov %%eax, %0"
          : "=m"(retval)
          : "a"(sys_num)
          : "memory");
  return retval;
}


x86 assembly (clang, -O0):
<syscall0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
int    $0x80
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall0>:
mov    %edi,%eax
int    $0x80
mov    %eax,-0x4(%rsp)
mov    -0x4(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @syscall0(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* %2
ret i32 %4
}
/* Type definitions */
struct display {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ background_color(struct display *, int /*<<< orphan*/);
int /*<<< orphan*/ foreground_color(struct display *, int);
void default_colors(struct display *display) {
  foreground_color(display, 0xff);
  background_color(display, (~0));
}


x86 assembly (clang, -O0):
<default_colors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xff,%esi
call   1030 <foreground_color@plt>
mov    -0x8(%rbp),%rdi
mov    $0xffffffff,%esi
call   1040 <background_color@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_colors>:
push   %rbx
mov    %rdi,%rbx
mov    $0xff,%esi
call   1030 <foreground_color@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
pop    %rbx
jmp    1040 <background_color@plt>

LLVM IR (-O0):
%struct.display = type { i32 }
define void @default_colors(%struct.display* %0) {
%2 = alloca %struct.display*
store %struct.display* %0, %struct.display** %2
%3 = load %struct.display*, %struct.display** %2
%4 = call i32 @foreground_color(%struct.display* %3, i32 255)
%5 = load %struct.display*, %struct.display** %2
%6 = call i32 @background_color(%struct.display* %5, i32 -1)
ret void
}

LLVM IR (-O2):
%struct.display = type { i32 }
define void @default_colors(%struct.display* %0) {
%2 = tail call i32 @foreground_color(%struct.display* %0, i32 255)
%3 = tail call i32 @background_color(%struct.display* %0, i32 -1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
void usart_send_blocking(uint32_t usart, char ch) {
  printf("TX 0x%02x ('%c')\n", ch, ch);
}


x86 assembly (clang, -O0):
<usart_send_blocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
lea    0xed5(%rip),%rdi
movsbl %al,%esi
movsbl -0x5(%rbp),%edx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usart_send_blocking>:
lea    0xee9(%rip),%rdi
mov    %esi,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"TX 0x%02x ('%c')\0A\00"
define void @usart_send_blocking(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i8, i8* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext %5, i8 signext %6)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"TX 0x%02x ('%c')\0A\00"
define void @usart_send_blocking(i32 %0, i8 signext %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext %1, i8 signext %1)
ret void
}
void revinplc8(void *in) {
  __asm__("bswap %0" : "=r"(*(unsigned long *)in) : "0"(*(unsigned long *)in));
}


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

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

LLVM IR (-O0):
define void @revinplc8(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i64*
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = call i64 asm "bswap $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i64 %7)
store i64 %8, i64* %4
ret void
}

LLVM IR (-O2):
define void @revinplc8(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = tail call i64 asm "bswap $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i64 %3)
store i64 %4, i64* %2
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(unsigned char *, int, int);
unsigned char *CreatePadding(unsigned int Filesize) {
  int PadSize = (((Filesize / 0x1000) + 1) * 0x1000) - Filesize;
  unsigned char *Padding = (unsigned char *)malloc(sizeof(char) * PadSize);
  memset(Padding, 0x00, PadSize);
  return Padding;
}


x86 assembly (clang, -O0):
<CreatePadding>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0xc,%eax
add    $0x1,%eax
shl    $0xc,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movslq -0x8(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreatePadding>:
push   %r14
push   %rbx
push   %rax
lea    0x1000(%rdi),%ebx
and    $0xfffff000,%ebx
sub    %edi,%ebx
mov    %ebx,%edi
call   1040 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
xor    %esi,%esi
mov    %ebx,%edx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @CreatePadding(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = udiv i32 %5, 4096
%7 = add i32 %6, 1
%8 = mul i32 %7, 4096
%9 = load i32, i32* %2
%10 = sub i32 %8, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = mul i64 1, %12
%14 = trunc i64 %13 to i32
%15 = call i64 @malloc(i32 %14)
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %4
%17 = load i8*, i8** %4
%18 = load i32, i32* %3
%19 = call i32 @memset(i8* %17, i32 0, i32 %18)
%20 = load i8*, i8** %4
ret i8* %20
}

LLVM IR (-O2):
define i8* @CreatePadding(i32 %0) {
%2 = add i32 %0, 4096
%3 = and i32 %2, -4096
%4 = sub i32 %3, %0
%5 = tail call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @memset(i8* %6, i32 0, i32 %4)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int /*<<< orphan*/ swap(int *, int *);
int main(void) {
  int x, y;
  scanf("%d%d", &x, &y);
  swap(&x, &y);
  printf("%d %d\n", x, y);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
lea    0x4(%rsp),%rbx
mov    %rsp,%r14
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <swap@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = call i32 @swap(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float const *, int);
void mlVectorCopy(const float *a, float *result) {
  memcpy(result, a, 3 * sizeof(float));
}


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

x86 assembly (clang, -O2):
<mlVectorCopy>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0xc,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @mlVectorCopy(float* %0, float* %1) {
%3 = tail call i32 @memcpy(float* %1, float* %0, i32 12)
ret void
}
int lang_specific_pre_link() { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_si128(int /*<<< orphan*/, int);
__m128i test_mm_slli_si128_2(__m128i A) { return _mm_slli_si128(A, 17); }


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

x86 assembly (clang, -O2):
<test_mm_slli_si128_2>:
mov    $0x11,%esi
jmp    1030 <_mm_slli_si128@plt>

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

LLVM IR (-O2):
define i32 @test_mm_slli_si128_2(i32 %0) {
%2 = tail call i32 @_mm_slli_si128(i32 %0, i32 17)
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t bin2word(uint8_t *b) {
  return ((b[0] & 0b1111) << 12) + ((b[1] & 0b111111) << 6) + (b[2] & 0b111111);
}


x86 assembly (clang, -O0):
<bin2word>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xf,%eax
shl    $0xc,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
and    $0x3f,%ecx
shl    $0x6,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
and    $0x3f,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bin2word>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0xc,%eax
movzwl %ax,%eax
and    $0x3f,%ecx
shl    $0x6,%ecx
or     %eax,%ecx
mov    0x8(%rdi),%eax
and    $0x3f,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @bin2word(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = and i32 %5, 15
%7 = shl i32 %6, 12
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = and i32 %10, 63
%12 = shl i32 %11, 6
%13 = add nsw i32 %7, %12
%14 = load i32*, i32** %2
%15 = getelementptr inbounds i32, i32* %14, i64 2
%16 = load i32, i32* %15
%17 = and i32 %16, 63
%18 = add nsw i32 %13, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @bin2word(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 12
%4 = and i32 %3, 61440
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = shl i32 %6, 6
%8 = and i32 %7, 4032
%9 = or i32 %8, %4
%10 = getelementptr inbounds i32, i32* %0, i64 2
%11 = load i32, i32* %10
%12 = and i32 %11, 63
%13 = or i32 %9, %12
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ f2();
f1() { f2(); }


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

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

LLVM IR (-O0):
define i32 @f1() {
%1 = alloca i32
%2 = call i32 (...) @f2()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @f1() {
%1 = tail call i32 (...) @f2()
ret i32 undef
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tprintf(char *, long);
int /*<<< orphan*/ tprints(char *);
void printmqattr(struct tcb *tcp, long addr) {
  if (addr == 0)
    tprints("NULL");
  else {
    tprintf("%#lx", addr);
  }
}


x86 assembly (clang, -O0):
<printmqattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114c <printmqattr+0x2c>
lea    0xebe(%rip),%rdi
call   1040 <tprints@plt>
jmp    115c <printmqattr+0x3c>
mov    -0x10(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1030 <tprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printmqattr>:
test   %rsi,%rsi
je     1131 <printmqattr+0x11>
lea    0xed9(%rip),%rdi
jmp    1030 <tprintf@plt>
lea    0xec8(%rip),%rdi
jmp    1040 <tprints@plt>

LLVM IR (-O0):
%struct.tcb = type { i32 }
@.str = [5 x i8] c"NULL\00"
@.str.1 = [5 x i8] c"%#lx\00"
define void @printmqattr(%struct.tcb* %0, i64 %1) {
%3 = alloca %struct.tcb*
%4 = alloca i64
store %struct.tcb* %0, %struct.tcb** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @tprints(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %12
9: ; preds = %2
%10 = load i64, i64* %4
%11 = call i32 @tprintf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %10)
br label %12
12: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
%struct.tcb = type { i32 }
@.str = [5 x i8] c"NULL\00"
@.str.1 = [5 x i8] c"%#lx\00"
define void @printmqattr(%struct.tcb* nocapture readnone %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @tprints(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %2
%7 = tail call i32 @tprintf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %1)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ conf_upload_conf_file(char *);
void conf_upload_default_cfg_global_file(void) {
  conf_upload_conf_file("/etc/marcelino.cfg");
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"/etc/marcelino.cfg\00"
define void @conf_upload_default_cfg_global_file() {
%1 = call i32 @conf_upload_conf_file(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"/etc/marcelino.cfg\00"
define void @conf_upload_default_cfg_global_file() {
%1 = tail call i32 @conf_upload_conf_file(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _keystore_valid_sector_size(size_t sector_size) {
  if (sector_size == 0)
    return 1;
  if (sector_size < 512 || sector_size > 4096)
    return 0;
  if (sector_size & (sector_size - 1))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<_keystore_valid_sector_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <_keystore_valid_sector_size+0x1f>
movl   $0x1,-0x4(%rbp)
jmp    1173 <_keystore_valid_sector_size+0x73>
cmpq   $0x200,-0x10(%rbp)
jb     113b <_keystore_valid_sector_size+0x3b>
cmpq   $0x1000,-0x10(%rbp)
jbe    1147 <_keystore_valid_sector_size+0x47>
movl   $0x0,-0x4(%rbp)
jmp    1173 <_keystore_valid_sector_size+0x73>
mov    -0x10(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
je     116c <_keystore_valid_sector_size+0x6c>
movl   $0x0,-0x4(%rbp)
jmp    1173 <_keystore_valid_sector_size+0x73>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_keystore_valid_sector_size>:
test   %rdi,%rdi
je     1124 <_keystore_valid_sector_size+0x24>
lea    -0x1001(%rdi),%rcx
xor    %eax,%eax
cmp    $0xfffffffffffff1ff,%rcx
jb     1123 <_keystore_valid_sector_size+0x23>
lea    -0x1(%rdi),%rcx
xor    %eax,%eax
test   %rcx,%rdi
sete   %al
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @_keystore_valid_sector_size(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %22
7: ; preds = %1
%8 = load i64, i64* %3
%9 = icmp ult i64 %8, 512
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = load i64, i64* %3
%12 = icmp ugt i64 %11, 4096
br i1 %12, label %13, label %14
13: ; preds = %10, %7
store i32 0, i32* %2
br label %22
14: ; preds = %10
%15 = load i64, i64* %3
%16 = load i64, i64* %3
%17 = sub i64 %16, 1
%18 = and i64 %15, %17
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %14
store i32 0, i32* %2
br label %22
21: ; preds = %14
store i32 1, i32* %2
br label %22
22: ; preds = %21, %20, %13, %6
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @_keystore_valid_sector_size(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = add i64 %0, -4097
%5 = icmp ult i64 %4, -3585
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i64 @llvm.ctpop.i64(i64 %0)
%8 = icmp ult i64 %7, 2
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %1
%11 = phi i32 [ 1, %1 ], [ 0, %3 ], [ %9, %6 ]
ret i32 %11
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ serial;
};
typedef TYPE_1__ XSelectionRequestEvent;

/* Variables and functions */
unsigned long get_XSelectionRequestEvent_serial(void *_p) {
  return (unsigned long)((XSelectionRequestEvent *)_p)->serial;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XSelectionRequestEvent_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, int /*<<< orphan*/ *, int);
void pack_to_8(void *v, uint8_t u) { memcpy(v, &u, sizeof(uint8_t)); }


x86 assembly (clang, -O0):
<pack_to_8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_to_8>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @pack_to_8(i8* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @memcpy(i8* %0, i32* %3, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CEC_ISR();
int /*<<< orphan*/ USB_WAKEUP_ISR();
void USB_WAKEUP_CEC_ISR(void) {
  USB_WAKEUP_ISR();
  CEC_ISR();
}


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

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

LLVM IR (-O0):
define void @USB_WAKEUP_CEC_ISR() {
%1 = call i32 (...) @USB_WAKEUP_ISR()
%2 = call i32 (...) @CEC_ISR()
ret void
}

LLVM IR (-O2):
define void @USB_WAKEUP_CEC_ISR() {
%1 = tail call i32 (...) @USB_WAKEUP_ISR()
%2 = tail call i32 (...) @CEC_ISR()
ret void
}
/* Variables and functions */
size_t check_bytes(const char *buf, int byte, size_t len) {
  const char *p;
  for (p = buf; p < buf + len; p++)
    if (*p != byte)
      break;
  return p - buf;
}


x86 assembly (clang, -O0):
<check_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
add    -0x18(%rbp),%rcx
cmp    %rcx,%rax
jae    1157 <check_bytes+0x57>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
je     1141 <check_bytes+0x41>
jmp    1157 <check_bytes+0x57>
jmp    1146 <check_bytes+0x46>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1117 <check_bytes+0x17>
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_bytes>:
mov    %rdi,%rax
test   %rdx,%rdx
jle    1120 <check_bytes+0x20>
add    %rdi,%rdx
mov    %rdi,%rax
xchg   %ax,%ax
movsbl (%rax),%ecx
cmp    %esi,%ecx
jne    1120 <check_bytes+0x20>
add    $0x1,%rax
cmp    %rdx,%rax
jb     1110 <check_bytes+0x10>
sub    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @check_bytes(i8* %0, i32 %1, i64 %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 %2
%5 = icmp sgt i64 %2, 0
br i1 %5, label %6, label %14
6: ; preds = %3, %11
%7 = phi i8* [ %12, %11 ], [ %0, %3 ]
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, %1
br i1 %10, label %11, label %14
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = icmp ult i8* %12, %4
br i1 %13, label %6, label %14
14: ; preds = %11, %6, %3
%15 = phi i8* [ %0, %3 ], [ %7, %6 ], [ %12, %11 ]
%16 = ptrtoint i8* %15 to i64
%17 = ptrtoint i8* %0 to i64
%18 = sub i64 %16, %17
ret i64 %18
}
/* Variables and functions */
size_t relocate_dense_BZ_grid_address(int **, size_t *, int **, int const *,
                                      double **, int const *);
size_t kpt_relocate_dense_BZ_grid_address(
    int bz_grid_address[][3], size_t bz_map[], int grid_address[][3],
    const int mesh[3], double rec_lattice[3][3], const int is_shift[3]) {
  return relocate_dense_BZ_grid_address(bz_grid_address, bz_map, grid_address,
                                        mesh, rec_lattice, is_shift);
}


x86 assembly (clang, -O0):
<kpt_relocate_dense_BZ_grid_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <relocate_dense_BZ_grid_address@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kpt_relocate_dense_BZ_grid_address>:
jmp    1030 <relocate_dense_BZ_grid_address@plt>

LLVM IR (-O0):
define i64 @kpt_relocate_dense_BZ_grid_address([3 x i32]* %0, i64* %1, [3 x i32]* %2, i32* %3, [3 x double]* %4, i32* %5) {
%7 = alloca [3 x i32]*
%8 = alloca i64*
%9 = alloca [3 x i32]*
%10 = alloca i32*
%11 = alloca [3 x double]*
%12 = alloca i32*
store [3 x i32]* %0, [3 x i32]** %7
store i64* %1, i64** %8
store [3 x i32]* %2, [3 x i32]** %9
store i32* %3, i32** %10
store [3 x double]* %4, [3 x double]** %11
store i32* %5, i32** %12
%13 = load [3 x i32]*, [3 x i32]** %7
%14 = bitcast [3 x i32]* %13 to i32**
%15 = load i64*, i64** %8
%16 = load [3 x i32]*, [3 x i32]** %9
%17 = bitcast [3 x i32]* %16 to i32**
%18 = load i32*, i32** %10
%19 = load [3 x double]*, [3 x double]** %11
%20 = bitcast [3 x double]* %19 to double**
%21 = load i32*, i32** %12
%22 = call i64 @relocate_dense_BZ_grid_address(i32** %14, i64* %15, i32** %17, i32* %18, double** %20, i32* %21)
ret i64 %22
}

LLVM IR (-O2):
define i64 @kpt_relocate_dense_BZ_grid_address([3 x i32]* %0, i64* %1, [3 x i32]* %2, i32* %3, [3 x double]* %4, i32* %5) {
%7 = bitcast [3 x i32]* %0 to i32**
%8 = bitcast [3 x i32]* %2 to i32**
%9 = bitcast [3 x double]* %4 to double**
%10 = tail call i64 @relocate_dense_BZ_grid_address(i32** %7, i64* %1, i32** %8, i32* %3, double** %9, i32* %5)
ret i64 %10
}
void rpmalloc_dump_statistics(void *file) { (void)sizeof(file); }


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

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

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

LLVM IR (-O2):
define void @rpmalloc_dump_statistics(i8* nocapture %0) {
ret void
}
void __attribute__((weak)) dma2_stream0_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<dma2_stream0_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):
<dma2_stream0_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

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

LLVM IR (-O2):
@__FUNCTION__.dma2_stream0_isr = [17 x i8] c"dma2_stream0_isr\00"
define weak void @dma2_stream0_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.dma2_stream0_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int real_setenv(char const *, char const *, int);
int /*<<< orphan*/ setproctitle(char const *);
scalar_t__ strlen(char const *);
int /*<<< orphan*/ strncmp(char const *, char *, int);
int setenv(const char *key, const char *value, int overwrite) {
  if (!strncmp(key, "SETPROCTITLE", 13) && (strlen(value) > 0)) {
    setproctitle(value);
  }
  return real_setenv(key, value, overwrite);
}


x86 assembly (clang, -O0):
<setenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea2(%rip),%rsi
mov    $0xd,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    118d <setenv+0x4d>
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x0,%rax
jle    118d <setenv+0x4d>
mov    -0x10(%rbp),%rdi
call   1030 <setproctitle@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1060 <real_setenv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setenv>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xeac(%rip),%rsi
mov    $0xd,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    1177 <setenv+0x37>
mov    %rbx,%rdi
call   1050 <strlen@plt>
test   %rax,%rax
jle    1177 <setenv+0x37>
mov    %rbx,%rdi
call   1030 <setproctitle@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1060 <real_setenv@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"SETPROCTITLE\00"
define i32 @setenv(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = call i32 @strncmp(i8* %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 13)
%9 = icmp ne i32 %8, 0
br i1 %9, label %17, label %10
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = call i64 @strlen(i8* %11)
%13 = icmp sgt i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i8*, i8** %5
%16 = call i32 @setproctitle(i8* %15)
br label %17
17: ; preds = %14, %10, %3
%18 = load i8*, i8** %4
%19 = load i8*, i8** %5
%20 = load i32, i32* %6
%21 = call i32 @real_setenv(i8* %18, i8* %19, i32 %20)
ret i32 %21
}

LLVM IR (-O2):
@.str = [13 x i8] c"SETPROCTITLE\00"
define i32 @setenv(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 13)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 @setproctitle(i8* %1)
br label %11
11: ; preds = %9, %6, %3
%12 = tail call i32 @real_setenv(i8* %0, i8* %1, i32 %2)
ret i32 %12
}