xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ interpretCommandLine(int, char **);
int /*<<< orphan*/ run();
int main(int argc, char **argv) {
  interpretCommandLine(argc, argv);
  run();
  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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <interpretCommandLine@plt>
mov    $0x0,%al
call   1040 <run@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @interpretCommandLine(i32 %6, i8** %7)
%9 = call i32 (...) @run()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @interpretCommandLine(i32 %0, i8** %1)
%4 = tail call i32 (...) @run()
ret i32 0
}
/* Variables and functions */
char ch();
int /*<<< orphan*/ expression();
int /*<<< orphan*/ inbyte();
doexpression() {
  char *before, *start;
  while (1) {
    expression();
    if (ch() != ',')
      break;
    inbyte();
  }
}


x86 assembly (clang, -O0):
<doexpression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1040 <expression@plt>
mov    $0x0,%al
call   1030 <ch@plt>
movsbl %al,%eax
cmp    $0x2c,%eax
je     1157 <doexpression+0x27>
jmp    1163 <doexpression+0x33>
mov    $0x0,%al
call   1050 <inbyte@plt>
jmp    1138 <doexpression+0x8>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doexpression>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <expression@plt>
xor    %eax,%eax
call   1030 <ch@plt>
cmp    $0x2c,%al
jne    115b <doexpression+0x2b>
xor    %eax,%eax
call   1050 <inbyte@plt>
jmp    1140 <doexpression+0x10>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @doexpression() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
br label %4
4: ; preds = %0, %10
%5 = call i32 (...) @expression()
%6 = call signext i8 (...) @ch()
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 44
br i1 %8, label %9, label %10
9: ; preds = %4
br label %12
10: ; preds = %4
%11 = call i32 (...) @inbyte()
br label %4
12: ; preds = %9
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @doexpression() {
%1 = tail call i32 (...) @expression()
%2 = tail call signext i8 (...) @ch()
%3 = icmp eq i8 %2, 44
br i1 %3, label %4, label %9
4: ; preds = %0, %4
%5 = tail call i32 (...) @inbyte()
%6 = tail call i32 (...) @expression()
%7 = tail call signext i8 (...) @ch()
%8 = icmp eq i8 %7, 44
br i1 %8, label %4, label %9
9: ; preds = %4, %0
ret i32 undef
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double CurrentDaynum() {
  struct timeval tptr;
  int x;
  x = gettimeofday(&tptr, NULL);
  return ((((double)tptr.tv_sec + 0.000001 * (double)tptr.tv_usec) / 86400.0) -
          3651.0);
}


x86 assembly (clang, -O0):
<CurrentDaynum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    %eax,-0x14(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm1
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xed4(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xebc(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xea8(%rip),%xmm1
subsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CurrentDaynum>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
mulsd  0xeca(%rip),%xmm0
addsd  %xmm1,%xmm0
divsd  0xec6(%rip),%xmm0
addsd  0xec6(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @CurrentDaynum() {
%1 = alloca %struct.timeval
%2 = alloca i32
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
store i32 %3, i32* %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = call double @llvm.fmuladd.f64(double 0x3EB0C6F7A0B5ED8D, double %9, double %6)
%11 = fdiv double %10, 8.640000e+04
%12 = fsub double %11, 3.651000e+03
ret double %12
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @CurrentDaynum() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0x3EB0C6F7A0B5ED8D, double %6)
%11 = fdiv double %10, 8.640000e+04
%12 = fadd double %11, -3.651000e+03
ret double %12
}
/* Type definitions */
struct vec2i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec2i_min(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ *);
__attribute__((always_)) struct vec2i *
psvec2i_min(struct vec2i *result, struct vec2i *a, struct vec2i *b) {
  vec2i_min((int32_t *)result, (int32_t *)a, (int32_t *)b);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec2i_min>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2i_min@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2i = type { i32 }
define %struct.vec2i* @psvec2i_min(%struct.vec2i* %0, %struct.vec2i* %1, %struct.vec2i* %2) {
%4 = alloca %struct.vec2i*
%5 = alloca %struct.vec2i*
%6 = alloca %struct.vec2i*
store %struct.vec2i* %0, %struct.vec2i** %4
store %struct.vec2i* %1, %struct.vec2i** %5
store %struct.vec2i* %2, %struct.vec2i** %6
%7 = load %struct.vec2i*, %struct.vec2i** %4
%8 = bitcast %struct.vec2i* %7 to i32*
%9 = load %struct.vec2i*, %struct.vec2i** %5
%10 = bitcast %struct.vec2i* %9 to i32*
%11 = load %struct.vec2i*, %struct.vec2i** %6
%12 = bitcast %struct.vec2i* %11 to i32*
%13 = call i32 @vec2i_min(i32* %8, i32* %10, i32* %12)
%14 = load %struct.vec2i*, %struct.vec2i** %4
ret %struct.vec2i* %14
}

LLVM IR (-O2):
%struct.vec2i = type { i32 }
define %struct.vec2i* @psvec2i_min(%struct.vec2i* returned %0, %struct.vec2i* %1, %struct.vec2i* %2) {
%4 = getelementptr %struct.vec2i, %struct.vec2i* %0, i64 0, i32 0
%5 = getelementptr %struct.vec2i, %struct.vec2i* %1, i64 0, i32 0
%6 = getelementptr %struct.vec2i, %struct.vec2i* %2, i64 0, i32 0
%7 = tail call i32 @vec2i_min(i32* %4, i32* %5, i32* %6)
ret %struct.vec2i* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void helpAndLeave(const char *progname, int status) {
  FILE *stream = stderr;
  if (status == EXIT_SUCCESS)
    stream = stdout;
  fprintf(stream, "Usage: %s <main-thread-path> <thread1-path> [...]\n",
          progname);
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e89(%rip),%rcx
cmp    (%rcx),%eax
jne    115d <helpAndLeave+0x3d>
mov    0x2e82(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2ea3(%rip),%rax
cmp    %esi,(%rax)
jne    113a <helpAndLeave+0x1a>
mov    0x2ea0(%rip),%rax
jmp    1141 <helpAndLeave+0x21>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [51 x i8] c"Usage: %s <main-thread-path> <thread1-path> [...]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32*, i32** @stderr
store i32* %6, i32** %5
%7 = load i32, i32* %4
%8 = load i32, i32* @EXIT_SUCCESS
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32*, i32** @stdout
store i32* %11, i32** %5
br label %12
12: ; preds = %10, %2
%13 = load i32*, i32** %5
%14 = load i8*, i8** %3
%15 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* %4
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [51 x i8] c"Usage: %s <main-thread-path> <thread1-path> [...]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stdout
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ CyEEPROM_Start();
void Re_EEPROM_Enable(void) { CyEEPROM_Start(); }


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

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

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

LLVM IR (-O2):
define void @Re_EEPROM_Enable() {
%1 = tail call i32 (...) @CyEEPROM_Start()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
wr_fatal() { fatal("write error"); }


x86 assembly (clang, -O0):
<wr_fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <fatal@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"write error\00"
define i32 @wr_fatal() {
%1 = alloca i32
%2 = call i32 @fatal(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [12 x i8] c"write error\00"
define i32 @wr_fatal() {
%1 = tail call i32 @fatal(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
void show_utf8_notation(unsigned int c) { printf("U+%04X", c); }


x86 assembly (clang, -O0):
<show_utf8_notation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_utf8_notation>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"U+%04X\00"
define void @show_utf8_notation(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"U+%04X\00"
define void @show_utf8_notation(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
unsigned char *no_data(char *arg1, int *data_size) {
  0;
  *data_size = 0;
  return 0;
}


x86 assembly (clang, -O0):
<no_data>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<no_data>:
movl   $0x0,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @no_data(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
store i32 0, i32* %5
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @no_data(i8* nocapture readnone %0, i32* nocapture writeonly %1) {
store i32 0, i32* %1
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int qperror(char *msg) { printf("Error encountered: %s \n", msg); }


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

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

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

LLVM IR (-O2):
@.str = [24 x i8] c"Error encountered: %s \0A\00"
define i32 @qperror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
/* Variables and functions */
scalar_t__ geteuid();
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  if (geteuid() == 0)
    printf("root\n");
  else
    printf("other\n");
}


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    $0x0,%al
call   1040 <geteuid@plt>
cmp    $0x0,%rax
jne    1158 <main+0x38>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
jmp    1164 <main+0x44>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"root\0A\00"
@.str.1 = [7 x i8] c"other\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 i64 (...) @geteuid()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %12
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@str = [6 x i8] c"other\00"
@str.2 = [5 x i8] c"root\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @geteuid()
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_puts(int /*<<< orphan*/ *, char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void message(BIO *out, const char *m) {
  fprintf(stderr, "test %s\n", m);
  BIO_puts(out, "print \"test ");
  BIO_puts(out, m);
  BIO_puts(out, "\\n\"\n");
}


x86 assembly (clang, -O0):
<message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1040 <BIO_puts@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <BIO_puts@plt>
mov    -0x8(%rbp),%rdi
lea    0xea5(%rip),%rsi
call   1040 <BIO_puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<message>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
mov    %r14,%rdx
call   1030 <fprintf@plt>
lea    0xec0(%rip),%rsi
mov    %rbx,%rdi
call   1040 <BIO_puts@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <BIO_puts@plt>
lea    0xeb3(%rip),%rsi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <BIO_puts@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [9 x i8] c"test %s\0A\00"
@.str.1 = [13 x i8] c"print \22test \00"
@.str.2 = [5 x i8] c"\\n\22\0A\00"
define void @message(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32*, i32** %3
%9 = call i32 @BIO_puts(i32* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32*, i32** %3
%11 = load i8*, i8** %4
%12 = call i32 @BIO_puts(i32* %10, i8* %11)
%13 = load i32*, i32** %3
%14 = call i32 @BIO_puts(i32* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c"test %s\0A\00"
@.str.1 = [13 x i8] c"print \22test \00"
@.str.2 = [5 x i8] c"\\n\22\0A\00"
define void @message(i32* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = tail call i32 @BIO_puts(i32* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @BIO_puts(i32* %0, i8* %1)
%7 = tail call i32 @BIO_puts(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ beolv(char *, int *);
int /*<<< orphan*/ getTele();
int /*<<< orphan*/ kiir(char *, int /*<<< orphan*/);
int /*<<< orphan*/ setTele(int);
int telemenu() {
  int l;
  kiir("Adj meg egy szamot 0-10-ig(Mivel parban vannak, ennek a duplaja fog "
       "megjelenni)(Jelenleg %d): ",
       getTele());
  beolv("%d", &l);
  if (l >= 0 && l <= 10) {
    setTele(l);
  }
  return 1;
}


x86 assembly (clang, -O0):
<telemenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <getTele@plt>
mov    %eax,%esi
lea    0xea8(%rip),%rdi
call   1030 <kiir@plt>
lea    0xefb(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1060 <beolv@plt>
cmpl   $0x0,-0x4(%rbp)
jl     1189 <telemenu+0x49>
cmpl   $0xa,-0x4(%rbp)
jg     1189 <telemenu+0x49>
mov    -0x4(%rbp),%edi
call   1040 <setTele@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<telemenu>:
push   %rax
xor    %eax,%eax
call   1050 <getTele@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1030 <kiir@plt>
lea    0xf02(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <beolv@plt>
mov    0x4(%rsp),%edi
cmp    $0xa,%edi
ja     1175 <telemenu+0x35>
call   1040 <setTele@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [95 x i8] c"Adj meg egy szamot 0-10-ig(Mivel parban vannak, ennek a duplaja fog megjelenni)(Jelenleg %d): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @telemenu() {
%1 = alloca i32
%2 = call i32 (...) @getTele()
%3 = call i32 @kiir(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @beolv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = load i32, i32* %1
%9 = icmp sle i32 %8, 10
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %1
%12 = call i32 @setTele(i32 %11)
br label %13
13: ; preds = %10, %7, %0
ret i32 1
}

LLVM IR (-O2):
@.str = [95 x i8] c"Adj meg egy szamot 0-10-ig(Mivel parban vannak, ennek a duplaja fog megjelenni)(Jelenleg %d): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @telemenu() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (...) @getTele()
%4 = tail call i32 @kiir(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @beolv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp ult i32 %6, 11
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @setTele(i32 %6)
br label %10
10: ; preds = %8, %0
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ my_rhs(double, double *, double *, unsigned int);
void dprhs(unsigned n, double t, double *y, double *f) { my_rhs(t, y, f, n); }


x86 assembly (clang, -O0):
<dprhs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x4(%rbp),%edx
call   1030 <my_rhs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dprhs>:
mov    %edi,%eax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %eax,%edx
jmp    1030 <my_rhs@plt>

LLVM IR (-O0):
define void @dprhs(i32 %0, double %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
store i32 %0, i32* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load double, double* %6
%10 = load double*, double** %7
%11 = load double*, double** %8
%12 = load i32, i32* %5
%13 = call i32 @my_rhs(double %9, double* %10, double* %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @dprhs(i32 %0, double %1, double* %2, double* %3) {
%5 = tail call i32 @my_rhs(double %1, double* %2, double* %3, i32 %0)
ret void
}
void test4(int *a) { a[0] = 0; }


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

x86 assembly (clang, -O2):
<test4>:
movl   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @test4(i32* nocapture writeonly %0) {
store i32 0, i32* %0
ret void
}
void gtk_widget_get_default_direction() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_get_default_direction() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void oid_0000(void) { printf("CNS heartbeat acknowledge\n"); }


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"CNS heartbeat acknowledge\0A\00"
define void @oid_0000() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [26 x i8] c"CNS heartbeat acknowledge\00"
define void @oid_0000() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ readbytes(int, char *, int);
int read_one_byte(int sock) {
  char b;
  if (readbytes(sock, &b, 1) && b > 0 && (b < '\t' || b >= '\033'))
    return b;
  return 0;
}


x86 assembly (clang, -O0):
<read_one_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <readbytes@plt>
cmp    $0x0,%rax
je     1169 <read_one_byte+0x59>
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jle    1169 <read_one_byte+0x59>
movsbl -0x9(%rbp),%eax
cmp    $0x9,%eax
jl     115d <read_one_byte+0x4d>
movsbl -0x9(%rbp),%eax
cmp    $0x1b,%eax
jl     1169 <read_one_byte+0x59>
movsbl -0x9(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <read_one_byte+0x60>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_one_byte>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <readbytes@plt>
movsbl 0x7(%rsp),%edx
lea    -0x1b(%rdx),%ecx
xor    %esi,%esi
cmp    $0xee,%cl
mov    $0x0,%ecx
cmovb  %edx,%ecx
test   %edx,%edx
cmovle %esi,%ecx
test   %rax,%rax
cmove  %esi,%ecx
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @read_one_byte(i32 %0) {
%2 = alloca i8
%3 = call i64 @readbytes(i32 %0, i8* %2, i32 1)
%4 = icmp ne i64 %3, 0
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp sgt i8 %5, 0
%8 = select i1 %4, i1 %7, i1 false
%9 = add i8 %5, -27
%10 = icmp ult i8 %9, -18
%11 = select i1 %8, i1 %10, i1 false
%12 = select i1 %11, i32 %6, i32 0
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int vsprintf(char *, char const *, int /*<<< orphan*/);
int vfprintf(FILE *stream, const char *format, va_list ap) {
  int n;
  char buffer[1024];
  n = vsprintf(buffer, format, ap);
  if (n > 0)
    fputs(buffer, stream);
  return (n);
}


x86 assembly (clang, -O0):
<vfprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <vsprintf@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jle    1166 <vfprintf+0x46>
lea    -0x420(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <fputs@plt>
mov    -0x18(%rbp),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vfprintf>:
push   %rbp
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%rbx
mov    %rsp,%rdi
call   1040 <vsprintf@plt>
mov    %eax,%ebp
test   %eax,%eax
jle    1145 <vfprintf+0x25>
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1030 <fputs@plt>
mov    %ebp,%eax
add    $0x408,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @vfprintf(i32* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = call i32 @vsprintf(i8* %5, i8* %1, i32 %2)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = call i32 @fputs(i8* %5, i32* %0)
br label %10
10: ; preds = %8, %3
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int span_dummy_rx(void *user_data, const int16_t amp[], int len) { return 0; }


x86 assembly (clang, -O0):
<span_dummy_rx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @span_dummy_rx(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @span_dummy_rx(i8* nocapture readnone %0, i32* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int square(int);
int shit(int a) { return square(a) + square(a); }


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

x86 assembly (clang, -O2):
<shit>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <square@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <square@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @shit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @square(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @square(i32 %5)
%7 = add nsw i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @shit(i32 %0) {
%2 = tail call i32 @square(i32 %0)
%3 = tail call i32 @square(i32 %0)
%4 = add nsw i32 %3, %2
ret i32 %4
}
/* Variables and functions */
float wrnoise_2d(float, float, int);
float unsalt_worley_noise(float x, float y) { return wrnoise_2d(x, y, 117); }


x86 assembly (clang, -O0):
<unsalt_worley_noise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mov    $0x75,%edi
call   1030 <wrnoise_2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsalt_worley_noise>:
mov    $0x75,%edi
jmp    1030 <wrnoise_2d@plt>

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

LLVM IR (-O2):
define float @unsalt_worley_noise(float %0, float %1) {
%3 = tail call float @wrnoise_2d(float %0, float %1, i32 117)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double get_coaches_poll(void) {
  double value = 0.0;
  printf("What is the team's Coaches Poll result? ");
  scanf("%lf", &value);
  return value;
}


x86 assembly (clang, -O0):
<get_coaches_poll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_coaches_poll>:
push   %rax
movq   $0x0,(%rsp)
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [41 x i8] c"What is the team's Coaches Poll result? \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @get_coaches_poll() {
%1 = alloca double
store double 0.000000e+00, double* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%4 = load double, double* %1
ret double %4
}

LLVM IR (-O2):
@.str = [41 x i8] c"What is the team's Coaches Poll result? \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @get_coaches_poll() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
ret double %5
}
void gtk_style_apply_default_background() {}


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

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

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

LLVM IR (-O2):
define void @gtk_style_apply_default_background() {
ret void
}
/* Variables and functions */
int fastRangeBitwiseAnd(int, int);
int fast(int m, int n) { return fastRangeBitwiseAnd(m, n); }


x86 assembly (clang, -O0):
<fast>:
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 <fastRangeBitwiseAnd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast>:
jmp    1030 <fastRangeBitwiseAnd@plt>

LLVM IR (-O0):
define i32 @fast(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 @fastRangeBitwiseAnd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @fast(i32 %0, i32 %1) {
%3 = tail call i32 @fastRangeBitwiseAnd(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
struct isal_zstream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
isal_deflate_icf_finish_hash_hist_base(struct isal_zstream *);
void isal_deflate_icf_finish_lvl2(struct isal_zstream *stream) {
  isal_deflate_icf_finish_hash_hist_base(stream);
}


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

x86 assembly (clang, -O2):
<isal_deflate_icf_finish_lvl2>:
jmp    1030 <isal_deflate_icf_finish_hash_hist_base@plt>

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

LLVM IR (-O2):
%struct.isal_zstream = type { i32 }
define void @isal_deflate_icf_finish_lvl2(%struct.isal_zstream* %0) {
%2 = tail call i32 @isal_deflate_icf_finish_hash_hist_base(%struct.isal_zstream* %0)
ret void
}
/* Type definitions */
struct d3_album {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dmp_album(struct d3_album *);
scalar_t__ m_next(int, int *, struct d3_album **);
void d3_dump(int db) {
  int p;
  struct d3_album *a;
  for (p = -1; m_next(db, &p, &a);)
    dmp_album(a);
}


x86 assembly (clang, -O0):
<d3_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <m_next@plt>
cmp    $0x0,%rax
je     115a <d3_dump+0x3a>
mov    -0x10(%rbp),%rdi
call   1030 <dmp_album@plt>
jmp    1132 <d3_dump+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d3_dump>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movl   $0xffffffff,0x4(%rsp)
ff
lea    0x4(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <m_next@plt>
test   %rax,%rax
je     117c <d3_dump+0x5c>
lea    0x4(%rsp),%r14
lea    0x8(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x8(%rsp),%rdi
call   1030 <dmp_album@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <m_next@plt>
test   %rax,%rax
jne    1160 <d3_dump+0x40>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.d3_album = type { i32 }
define void @d3_dump(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.d3_album*
store i32 %0, i32* %2
store i32 -1, i32* %3
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* %2
%7 = call i64 @m_next(i32 %6, i32* %3, %struct.d3_album** %4)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load %struct.d3_album*, %struct.d3_album** %4
%11 = call i32 @dmp_album(%struct.d3_album* %10)
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
%struct.d3_album = type { i32 }
define void @d3_dump(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.d3_album*
%4 = bitcast i32* %2 to i8*
%5 = bitcast %struct.d3_album** %3 to i8*
store i32 -1, i32* %2
%6 = call i64 @m_next(i32 %0, i32* %2, %struct.d3_album** %3)
%7 = icmp eq i64 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %1, %8
%9 = load %struct.d3_album*, %struct.d3_album** %3
%10 = call i32 @dmp_album(%struct.d3_album* %9)
%11 = call i64 @m_next(i32 %0, i32* %2, %struct.d3_album** %3)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %8
13: ; preds = %8, %1
ret void
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ runtimeError(char *);
unsigned long *lvector(long nl, long nh) {
  unsigned long *v;
  v = (unsigned long *)malloc((size_t)((nh - nl + 1 + 1) * sizeof(long)));
  if (!v)
    runtimeError("allocation failure in lvector()");
  return v - nl + 1;
}


x86 assembly (clang, -O0):
<lvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
add    $0x1,%rdi
add    $0x1,%rdi
shl    $0x3,%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1164 <lvector+0x44>
lea    0xea1(%rip),%rdi
call   1040 <runtimeError@plt>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
add    $0x8,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lvector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %rdi,%rsi
lea    0x10(,%rsi,8),%rdi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114b <lvector+0x2b>
lea    0xeba(%rip),%rdi
call   1040 <runtimeError@plt>
shl    $0x3,%r14
sub    %r14,%rbx
add    $0x8,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"allocation failure in lvector()\00"
define i64* @lvector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 1
%10 = add nsw i64 %9, 1
%11 = mul i64 %10, 8
%12 = call i64 @malloc(i64 %11)
%13 = inttoptr i64 %12 to i64*
store i64* %13, i64** %5
%14 = load i64*, i64** %5
%15 = icmp ne i64* %14, null
br i1 %15, label %18, label %16
16: ; preds = %2
%17 = call i32 @runtimeError(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %2
%19 = load i64*, i64** %5
%20 = load i64, i64* %3
%21 = sub i64 0, %20
%22 = getelementptr inbounds i64, i64* %19, i64 %21
%23 = getelementptr inbounds i64, i64* %22, i64 1
ret i64* %23
}

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in lvector()\00"
define i64* @lvector(i64 %0, i64 %1) {
%3 = sub nsw i64 %1, %0
%4 = shl i64 %3, 3
%5 = add i64 %4, 16
%6 = tail call i64 @malloc(i64 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @runtimeError(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = inttoptr i64 %6 to i64*
%12 = sub i64 0, %0
%13 = getelementptr inbounds i64, i64* %11, i64 %12
%14 = getelementptr inbounds i64, i64* %13, i64 1
ret i64* %14
}
/* Type definitions */
typedef int /*<<< orphan*/ fsid_t;
typedef int /*<<< orphan*/ dev_t;

/* Variables and functions */
unsigned int major(int /*<<< orphan*/);
unsigned int minor(int /*<<< orphan*/);
void fillfsid(dev_t dev, fsid_t *fsid) {
  ((unsigned int *)fsid)[0] = major(dev);
  ((unsigned int *)fsid)[1] = minor(dev);
}


x86 assembly (clang, -O0):
<fillfsid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <major@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%edi
call   1030 <minor@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fillfsid>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <major@plt>
mov    %eax,(%rbx)
mov    %ebp,%edi
call   1030 <minor@plt>
mov    %eax,0x4(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @fillfsid(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 = call i32 @major(i32 %5)
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %3
%10 = call i32 @minor(i32 %9)
%11 = load i32*, i32** %4
%12 = getelementptr inbounds i32, i32* %11, i64 1
store i32 %10, i32* %12
ret void
}

LLVM IR (-O2):
define void @fillfsid(i32 %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @major(i32 %0)
store i32 %3, i32* %1
%4 = tail call i32 @minor(i32 %0)
%5 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %4, i32* %5
ret void
}
unsigned int get_rr_interval_idle(struct task_struct *task) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define i32 @get_rr_interval_idle(%struct.task_struct* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void X(int b) {
  if (b == 1) {
    printf("X:: b is 1!\n");
  } else {
    printf("X:: b is not 1!\n");
  }
}


x86 assembly (clang, -O0):
<X>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1136 <X+0x26>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <X+0x32>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<X>:
cmp    $0x1,%edi
lea    0xef6(%rip),%rax
lea    0xedf(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"X:: b is 1!\0A\00"
@.str.1 = [17 x i8] c"X:: b is not 1!\0A\00"
define void @X(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"X:: b is not 1!\00"
@str.2 = [12 x i8] c"X:: b is 1!\00"
define void @X(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_MAKE_POT_SELECT_OUTPUT() { set_io_bit(0x45, 5); }


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

x86 assembly (clang, -O2):
<TOSH_MAKE_POT_SELECT_OUTPUT>:
mov    $0x45,%edi
mov    $0x5,%esi
jmp    1030 <set_io_bit@plt>

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

LLVM IR (-O2):
define void @TOSH_MAKE_POT_SELECT_OUTPUT() {
%1 = tail call i32 @set_io_bit(i32 69, i32 5)
ret void
}
/* Variables and functions */
double sla_epb2d_(double *);
double slaEpb2d(double epb) {
  double EPB;
  double result;
  EPB = epb;
  result = sla_epb2d_(&EPB);
  return result;
}


x86 assembly (clang, -O0):
<slaEpb2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <sla_epb2d_@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaEpb2d>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <sla_epb2d_@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @slaEpb2d(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
store double %5, double* %3
%6 = call double @sla_epb2d_(double* %3)
store double %6, double* %4
%7 = load double, double* %4
ret double %7
}

LLVM IR (-O2):
define double @slaEpb2d(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store double %0, double* %2
%4 = call double @sla_epb2d_(double* %2)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ print(char *, int);
void kmain(void *mbd, unsigned int magic) {
  if (magic != 0x2BADB002) {
    clear();
    print("Error loading!!", 0x04);
  } else {
    clear();
    print("Welcome to Sirsak Operating System", 0x07);
  }
}


x86 assembly (clang, -O0):
<kmain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x2badb002,-0xc(%rbp)
je     1159 <kmain+0x39>
mov    $0x0,%al
call   1040 <clear@plt>
lea    0xeb6(%rip),%rdi
mov    $0x4,%esi
call   1030 <print@plt>
jmp    1171 <kmain+0x51>
mov    $0x0,%al
call   1040 <clear@plt>
lea    0xea9(%rip),%rdi
mov    $0x7,%esi
call   1030 <print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmain>:
push   %rbx
mov    %esi,%ebx
xor    %eax,%eax
call   1040 <clear@plt>
cmp    $0x2badb002,%ebx
jne    1144 <kmain+0x24>
lea    0xed7(%rip),%rdi
mov    $0x7,%esi
pop    %rbx
jmp    1030 <print@plt>
lea    0xeb5(%rip),%rdi
mov    $0x4,%esi
pop    %rbx
jmp    1030 <print@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Error loading!!\00"
@.str.1 = [35 x i8] c"Welcome to Sirsak Operating System\00"
define void @kmain(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 = icmp ne i32 %5, 732803074
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = call i32 (...) @clear()
%9 = call i32 @print(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 4)
br label %13
10: ; preds = %2
%11 = call i32 (...) @clear()
%12 = call i32 @print(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 7)
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Error loading!!\00"
@.str.1 = [35 x i8] c"Welcome to Sirsak Operating System\00"
define void @kmain(i8* nocapture readnone %0, i32 %1) {
%3 = icmp eq i32 %1, 732803074
%4 = tail call i32 (...) @clear()
br i1 %3, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @print(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 4)
br label %9
7: ; preds = %2
%8 = tail call i32 @print(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 7)
br label %9
9: ; preds = %7, %5
ret void
}