xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ fatal(char *, char *);
char *strerror(scalar_t__);
void read_error() {
  fatal("Module index: unexpected error: %s\n"
        "Try re-running depmod\n",
        errno ? strerror(errno) : "EOF");
}


x86 assembly (clang, -O0):
<read_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
cmpq   $0x0,(%rax)
je     1151 <read_error+0x31>
mov    0x2ea0(%rip),%rax
mov    (%rax),%rdi
call   1030 <strerror@plt>
mov    %rax,-0x8(%rbp)
jmp    1161 <read_error+0x41>
lea    0xee2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1161 <read_error+0x41>
mov    -0x8(%rbp),%rsi
lea    0xe94(%rip),%rdi
call   1040 <fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_error>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%rdi
test   %rdi,%rdi
je     113a <read_error+0x1a>
call   1030 <strerror@plt>
mov    %rax,%rsi
jmp    1141 <read_error+0x21>
lea    0xef9(%rip),%rsi
lea    0xeb8(%rip),%rdi
pop    %rax
jmp    1040 <fatal@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"Module index: unexpected error: %s\0ATry re-running depmod\0A\00"
@errno = global i64 0
@.str.1 = [4 x i8] c"EOF\00"
define void @read_error() {
%1 = load i64, i64* @errno
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i64, i64* @errno
%5 = call i8* @strerror(i64 %4)
br label %7
6: ; preds = %0
br label %7
7: ; preds = %6, %3
%8 = phi i8* [ %5, %3 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ]
%9 = call i32 @fatal(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [58 x i8] c"Module index: unexpected error: %s\0ATry re-running depmod\0A\00"
@errno = global i64 0
@.str.1 = [4 x i8] c"EOF\00"
define void @read_error() {
%1 = load i64, i64* @errno
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i8* @strerror(i64 %1)
br label %5
5: ; preds = %0, %3
%6 = phi i8* [ %4, %3 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %0 ]
%7 = tail call i32 @fatal(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}
void Tcl_Ckfree(ptr) void *ptr;
{ free(ptr); }


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

x86 assembly (clang, -O2):
<Tcl_Ckfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @Tcl_Ckfree(i8* nocapture %0) {
tail call void @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_error(char *, int);
int /*<<< orphan*/ seq_ctrl_set_record_mode(int /*<<< orphan*/);
int /*<<< orphan*/ seq_engine_change_scene(int);
void seq_ctrl_set_scene(int scene) {
  if (scene < 0 || scene >= 6) {
    log_error("scss - scene invalid: %d", scene);
    return;
  }
  seq_ctrl_set_record_mode(0);
  seq_engine_change_scene(scene);
}


x86 assembly (clang, -O0):
<seq_ctrl_set_scene>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     114f <seq_ctrl_set_scene+0x1f>
cmpl   $0x6,-0x4(%rbp)
jl     1163 <seq_ctrl_set_scene+0x33>
mov    -0x4(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1030 <log_error@plt>
jmp    1172 <seq_ctrl_set_scene+0x42>
xor    %edi,%edi
call   1040 <seq_ctrl_set_record_mode@plt>
mov    -0x4(%rbp),%edi
call   1050 <seq_engine_change_scene@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_ctrl_set_scene>:
push   %rbx
mov    %edi,%ebx
cmp    $0x6,%edi
jb     1147 <seq_ctrl_set_scene+0x17>
lea    0xec1(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <log_error@plt>
xor    %edi,%edi
call   1040 <seq_ctrl_set_record_mode@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <seq_engine_change_scene@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"scss - scene invalid: %d\00"
define void @seq_ctrl_set_scene(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 6
br i1 %7, label %8, label %11
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = call i32 @log_error(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %15
11: ; preds = %5
%12 = call i32 @seq_ctrl_set_record_mode(i32 0)
%13 = load i32, i32* %2
%14 = call i32 @seq_engine_change_scene(i32 %13)
br label %15
15: ; preds = %11, %8
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"scss - scene invalid: %d\00"
define void @seq_ctrl_set_scene(i32 %0) {
%2 = icmp ugt i32 %0, 5
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @log_error(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %8
5: ; preds = %1
%6 = tail call i32 @seq_ctrl_set_record_mode(i32 0)
%7 = tail call i32 @seq_engine_change_scene(i32 %0)
br label %8
8: ; preds = %5, %3
ret void
}
int main(void) {
  char local_var;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ c_nnsetrd(char *, double);
void nnsetrd_(char *pnam, double *rval) { c_nnsetrd(pnam, *rval); }


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

x86 assembly (clang, -O2):
<nnsetrd_>:
movsd  (%rsi),%xmm0
jmp    1030 <c_nnsetrd@plt>

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

LLVM IR (-O2):
define void @nnsetrd_(i8* %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = tail call i32 @c_nnsetrd(i8* %0, double %3)
ret void
}
/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ exit(int);
scalar_t__ fputs(char *, int /*<<< orphan*/);
scalar_t__ putchar(int);
int /*<<< orphan*/ stdout;
void print(char *text, int end) {
  if (fputs(text, stdout) == EOF)
    exit(1);
  if (putchar(end) == EOF)
    exit(1);
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e8e(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    0x2e90(%rip),%rcx
cmp    (%rcx),%rax
jne    116b <print+0x3b>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0xc(%rbp),%edi
call   1030 <putchar@plt>
mov    0x2e6e(%rip),%rcx
cmp    (%rcx),%rax
jne    118d <print+0x5d>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    0x2e9d(%rip),%r14
cmp    (%r14),%rax
je     1164 <print+0x34>
mov    %ebx,%edi
call   1030 <putchar@plt>
cmp    (%r14),%rax
je     1164 <print+0x34>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@EOF = global i64 0
define void @print(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 = load i32, i32* @stdout
%7 = call i64 @fputs(i8* %5, i32 %6)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = load i32, i32* %4
%14 = call i64 @putchar(i32 %13)
%15 = load i64, i64* @EOF
%16 = icmp eq i64 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %12
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@EOF = global i64 0
define void @print(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i64 @fputs(i8* %0, i32 %3)
%5 = load i64, i64* @EOF
%6 = icmp eq i64 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
%10 = tail call i64 @putchar(i32 %1)
%11 = load i64, i64* @EOF
%12 = icmp eq i64 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = tail call i32 @exit(i32 1)
unreachable
15: ; preds = %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ C67_asm(char *, int, int, int);
void C67_SUBDP(int r, int v) { C67_asm("SUBDP.L", v, r, v); }


x86 assembly (clang, -O0):
<C67_SUBDP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xed2(%rip),%rdi
call   1030 <C67_asm@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"SUBDP.L\00"
define void @C67_SUBDP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @C67_asm(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"SUBDP.L\00"
define void @C67_SUBDP(i32 %0, i32 %1) {
%3 = tail call i32 @C67_asm(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int, float, double);
int /*<<< orphan*/ scanf(char *, char *, int *, float *, double *);
int main() {
  char ch;
  int i;
  float f;
  double d;
  scanf("%c %d %f %lf", &ch, &i, &f, &d);
  printf("%c %d %f %lf", ch, i, f, d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x18(%rbp),%r8
call   1040 <scanf@plt>
mov    -0x5(%rbp),%al
mov    -0xc(%rbp),%edx
movss  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe9e(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rbx
lea    0xf(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x18(%rsp),%r8
mov    %rbx,%rdi
call   1040 <scanf@plt>
movsbl 0xf(%rsp),%esi
mov    0x14(%rsp),%edx
movss  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"%c %d %f %lf\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca float
%4 = alloca double
%5 = bitcast i32* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = bitcast double* %4 to i8*
%8 = call i32 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1, i32* %2, float* %3, double* %4)
%9 = load i8, i8* %1
%10 = load i32, i32* %2
%11 = load float, float* %3
%12 = load double, double* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext %9, i32 %10, float %11, double %12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ orgfx_enable_tex0(int /*<<< orphan*/);
int /*<<< orphan*/ orgfx_rect(int, int, int, int);
int /*<<< orphan*/ orgfx_set_color(unsigned int);
void orgfxplus_fill(int x0, int y0, int x1, int y1, unsigned int color) {
  orgfx_enable_tex0(0);
  orgfx_set_color(color);
  orgfx_rect(x0, y0, x1, y1);
}


x86 assembly (clang, -O0):
<orgfxplus_fill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
xor    %edi,%edi
call   1050 <orgfx_enable_tex0@plt>
mov    -0x14(%rbp),%edi
call   1040 <orgfx_set_color@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <orgfx_rect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<orgfxplus_fill>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%ebx
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%r12d
mov    %edi,%ebp
xor    %edi,%edi
call   1050 <orgfx_enable_tex0@plt>
mov    %ebx,%edi
call   1040 <orgfx_set_color@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <orgfx_rect@plt>

LLVM IR (-O0):
define void @orgfxplus_fill(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = call i32 @orgfx_enable_tex0(i32 0)
%12 = load i32, i32* %10
%13 = call i32 @orgfx_set_color(i32 %12)
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = load i32, i32* %9
%18 = call i32 @orgfx_rect(i32 %14, i32 %15, i32 %16, i32 %17)
ret void
}

LLVM IR (-O2):
define void @orgfxplus_fill(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @orgfx_enable_tex0(i32 0)
%7 = tail call i32 @orgfx_set_color(i32 %4)
%8 = tail call i32 @orgfx_rect(i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void imprimir_entero(void *data) { printf("%d ", *((int *)data)); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @imprimir_entero(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ sig_unblock(int /*<<< orphan*/);
void sig_termunblock() { sig_unblock(SIGTERM); }


x86 assembly (clang, -O0):
<sig_termunblock>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <sig_unblock@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_termunblock>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sig_unblock@plt>

LLVM IR (-O0):
@SIGTERM = global i32 0
define void @sig_termunblock() {
%1 = load i32, i32* @SIGTERM
%2 = call i32 @sig_unblock(i32 %1)
ret void
}

LLVM IR (-O2):
@SIGTERM = global i32 0
define void @sig_termunblock() {
%1 = load i32, i32* @SIGTERM
%2 = tail call i32 @sig_unblock(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ClearONOFF();
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_H8_3(void) {
  DeinitFields();
  ClearONOFF();
}


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

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

LLVM IR (-O0):
define void @SwitchFrom_H8_3() {
%1 = call i32 (...) @DeinitFields()
%2 = call i32 (...) @ClearONOFF()
ret void
}

LLVM IR (-O2):
define void @SwitchFrom_H8_3() {
%1 = tail call i32 (...) @DeinitFields()
%2 = tail call i32 (...) @ClearONOFF()
ret void
}
char sdt(char ch[50]) { int j; }


x86 assembly (clang, -O0):
<sdt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i8 @sdt(i8* nocapture readnone %0) {
ret i8 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ op_dbus_send_duration();
int /*<<< orphan*/ op_dbus_send_position();
int opc_status(int64_t pbpos[]) {
  pbpos[0] = op_dbus_send_duration();
  pbpos[1] = op_dbus_send_position();
  return 0;
}


x86 assembly (clang, -O0):
<opc_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <op_dbus_send_duration@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1040 <op_dbus_send_position@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opc_status>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <op_dbus_send_duration@plt>
mov    %eax,(%rbx)
xor    %eax,%eax
call   1040 <op_dbus_send_position@plt>
mov    %eax,0x4(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @opc_status(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 (...) @op_dbus_send_duration()
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
store i32 %3, i32* %5
%6 = call i32 (...) @op_dbus_send_position()
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
store i32 %6, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @opc_status(i32* nocapture writeonly %0) {
%2 = tail call i32 (...) @op_dbus_send_duration()
store i32 %2, i32* %0
%3 = tail call i32 (...) @op_dbus_send_position()
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %3, i32* %4
ret i32 0
}
/* Variables and functions */
char *dirname(char *);
int /*<<< orphan*/ free(char *);
char *strdup(char const *);
char *qfile_get_dir(const char *filepath) {
  char *path = strdup(filepath);
  char *dname = dirname(path);
  char *dir = strdup(dname);
  free(path);
  return dir;
}


x86 assembly (clang, -O0):
<qfile_get_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <dirname@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qfile_get_dir>:
push   %r14
push   %rbx
push   %rax
call   1050 <strdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <dirname@plt>
mov    %rax,%rdi
call   1050 <strdup@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @qfile_get_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @strdup(i8* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i8* @dirname(i8* %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = call i8* @strdup(i8* %10)
store i8* %11, i8** %5
%12 = load i8*, i8** %3
%13 = call i32 @free(i8* %12)
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @qfile_get_dir(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = tail call i8* @dirname(i8* %2)
%4 = tail call i8* @strdup(i8* %3)
%5 = tail call i32 @free(i8* %2)
ret i8* %4
}
/* Variables and functions */
int foo3();
int foo2(void) { return foo3(); }


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

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

LLVM IR (-O0):
define i32 @foo2() {
%1 = call i32 (...) @foo3()
ret i32 %1
}

LLVM IR (-O2):
define i32 @foo2() {
%1 = tail call i32 (...) @foo3()
ret i32 %1
}
int main() {
  goto __Cont;
  for (;;)
    continue;
__Cont:
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
unsigned int inswap_le32(unsigned int);
void inswap_le32_num(unsigned int *s, int n) {
  int i;
  for (i = 0; i < n; i++)
    s[i] = inswap_le32(s[i]);
}


x86 assembly (clang, -O0):
<inswap_le32_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115d <inswap_le32_num+0x4d>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <inswap_le32@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <inswap_le32_num+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inswap_le32_num>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1146 <inswap_le32_num+0x36>
mov    %rdi,%r15
mov    %esi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%edi
call   1030 <inswap_le32@plt>
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <inswap_le32_num+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @inswap_le32_num(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @inswap_le32(i32 %9)
store i32 %10, i32* %8
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ merge(int /*<<< orphan*/ *, int, int, int);
void merge_sort(FILE *A, int p, int r) {
  int q;
  if (p < r) {
    q = (p + r) / 2;
    merge_sort(A, p, q);
    merge_sort(A, q + 1, r);
    merge(A, p, q, r);
  }
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <merge_sort+0x62>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
cmp    %edx,%esi
jge    1172 <merge_sort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1040 <merge_sort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1040 <merge_sort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <merge@plt>
ret

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

LLVM IR (-O2):
define void @merge_sort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @merge_sort(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @merge_sort(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
int test_05(unsigned char *x) { return x[0] & -129 ? -20 : -40; }


x86 assembly (clang, -O0):
<test_05>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffff7f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_05>:
testb  $0x7f,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_05(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = and i32 %6, -129
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 -20, i32 -40
ret i32 %10
}

LLVM IR (-O2):
define i32 @test_05(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 127
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int posix_get_current_irq();
int _sys_current_irq_key_get(void) { return posix_get_current_irq(); }


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

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

LLVM IR (-O0):
define i32 @_sys_current_irq_key_get() {
%1 = call i32 (...) @posix_get_current_irq()
ret i32 %1
}

LLVM IR (-O2):
define i32 @_sys_current_irq_key_get() {
%1 = tail call i32 (...) @posix_get_current_irq()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

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


x86 assembly (clang, -O0):
<store8>:
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):
<store8>:
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 @store8(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 @store8(i8* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @memcpy(i8* %0, i32* %3, i32 4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ m45_reset();
int /*<<< orphan*/ mmc3init(int /*<<< orphan*/ *, int /*<<< orphan*/,
                            int /*<<< orphan*/ *, int /*<<< orphan*/,
                            int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void m45_init(uint8_t *prgROMin, uint32_t prgROMsizeIn, uint8_t *prgRAMin,
              uint32_t prgRAMsizeIn, uint8_t *chrROMin, uint32_t chrROMsizeIn) {
  mmc3init(prgROMin, prgROMsizeIn, prgRAMin, prgRAMsizeIn, chrROMin,
           chrROMsizeIn);
  m45_reset();
  printf("Mapper 45 (Mapper 4 Game Select) inited\n");
}


x86 assembly (clang, -O0):
<m45_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1030 <mmc3init@plt>
mov    $0x0,%al
call   1050 <m45_reset@plt>
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m45_init>:
push   %rax
call   1030 <mmc3init@plt>
xor    %eax,%eax
call   1050 <m45_reset@plt>
lea    0xebc(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Mapper 45 (Mapper 4 Game Select) inited\0A\00"
define void @m45_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32* %4, i32** %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = load i32*, i32** %9
%16 = load i32, i32* %10
%17 = load i32*, i32** %11
%18 = load i32, i32* %12
%19 = call i32 @mmc3init(i32* %13, i32 %14, i32* %15, i32 %16, i32* %17, i32 %18)
%20 = call i32 (...) @m45_reset()
%21 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [40 x i8] c"Mapper 45 (Mapper 4 Game Select) inited\00"
define void @m45_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = tail call i32 @mmc3init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5)
%8 = tail call i32 (...) @m45_reset()
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
ret void
}
int isEven(int number) { return !(number % 2); }


x86 assembly (clang, -O0):
<isEven>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEven>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isEven(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 2
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @isEven(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exp(double const);
double log1p(int /*<<< orphan*/);
double soft_plus_activate(const double x) { return log1p(exp(x)); }


x86 assembly (clang, -O0):
<soft_plus_activate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
mov    %eax,%edi
call   1040 <log1p@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<soft_plus_activate>:
push   %rax
call   1030 <exp@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <log1p@plt>

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

LLVM IR (-O2):
define double @soft_plus_activate(double %0) {
%2 = tail call i32 @exp(double %0)
%3 = tail call double @log1p(i32 %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ Lut_N(double *, double *, int);
void Lut_12(double *out, double *in) { Lut_N(out, in, 12); }


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

x86 assembly (clang, -O2):
<Lut_12>:
mov    $0xc,%edx
jmp    1030 <Lut_N@plt>

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

LLVM IR (-O2):
define void @Lut_12(double* %0, double* %1) {
%3 = tail call i32 @Lut_N(double* %0, double* %1, i32 12)
ret void
}
char *getval(nam, def)
char *nam, *def;
{
  char *val;
  if ((val = getenv(nam)) == ((char *)0) || !*val)
    val = def;
  return val;
}


x86 assembly (clang, -O0):
<getval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <getenv@plt>
cltq
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1148 <getval+0x38>
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1150 <getval+0x40>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getval>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
call   1030 <getenv@plt>
test   %eax,%eax
je     1128 <getval+0x18>
cltq
cmpb   $0x0,(%rax)
je     1128 <getval+0x18>
pop    %rbx
ret
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @getval(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @getenv to i32 (i8*, ...)*)(i8* %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = load i8, i8* %12
%14 = icmp ne i8 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %11, %2
%16 = load i8*, i8** %4
store i8* %16, i8** %5
br label %17
17: ; preds = %15, %11
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @getval(i8* %0, i8* readnone %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @getenv to i32 (i8*, ...)*)(i8* %0)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i32 %3, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i8, i8* %5
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7, %2
br label %11
11: ; preds = %10, %7
%12 = phi i8* [ %1, %10 ], [ %5, %7 ]
ret i8* %12
}
void glInitNames(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glInitNames() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void out1str(const char *s) {
  if (s)
    fputs(s, stdout);
}


x86 assembly (clang, -O0):
<out1str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <out1str+0x29>
mov    -0x8(%rbp),%rdi
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out1str>:
test   %rdi,%rdi
je     1123 <out1str+0x13>
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @out1str(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = load i32, i32* @stdout
%8 = call i32 @fputs(i8* %6, i32 %7)
br label %9
9: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @out1str(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i32, i32* @stdout
%5 = tail call i32 @fputs(i8* %0, i32 %4)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ McDevIf_AddPacket(int, unsigned char);
unsigned char McResCtrl_GetRegVal(int, int);
void AddStopADC(void) {
  unsigned char bReg;
  bReg = McResCtrl_GetRegVal((0x00005000UL), (72));
  if ((bReg & (0x01)) != 0) {
    McDevIf_AddPacket((0x10000000UL) | (0x00005000UL) | (unsigned long)(72),
                      bReg & (unsigned char)~(0x01));
  }
  McDevIf_AddPacket((0x40000000UL) | (0x000C0000UL), 0);
}


x86 assembly (clang, -O0):
<AddStopADC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5000,%edi
mov    $0x48,%esi
call   1030 <McResCtrl_GetRegVal@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1160 <AddStopADC+0x40>
movzbl -0x1(%rbp),%eax
and    $0xfe,%eax
mov    $0x10005048,%edi
movzbl %al,%esi
call   1040 <McDevIf_AddPacket@plt>
mov    $0x400c0000,%edi
xor    %esi,%esi
call   1040 <McDevIf_AddPacket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AddStopADC>:
push   %rax
mov    $0x5000,%edi
mov    $0x48,%esi
call   1030 <McResCtrl_GetRegVal@plt>
test   $0x1,%al
je     1143 <AddStopADC+0x23>
and    $0xfe,%al
movzbl %al,%esi
mov    $0x10005048,%edi
call   1040 <McDevIf_AddPacket@plt>
mov    $0x400c0000,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <McDevIf_AddPacket@plt>

LLVM IR (-O0):
define void @AddStopADC() {
%1 = alloca i8
%2 = call zeroext i8 @McResCtrl_GetRegVal(i32 20480, i32 72)
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = and i32 %4, 1
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = load i8, i8* %1
%9 = zext i8 %8 to i32
%10 = and i32 %9, 254
%11 = trunc i32 %10 to i8
%12 = call i32 @McDevIf_AddPacket(i32 268456008, i8 zeroext %11)
br label %13
13: ; preds = %7, %0
%14 = call i32 @McDevIf_AddPacket(i32 1074528256, i8 zeroext 0)
ret void
}

LLVM IR (-O2):
define void @AddStopADC() {
%1 = tail call zeroext i8 @McResCtrl_GetRegVal(i32 20480, i32 72)
%2 = and i8 %1, 1
%3 = icmp eq i8 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = and i8 %1, -2
%6 = tail call i32 @McDevIf_AddPacket(i32 268456008, i8 zeroext %5)
br label %7
7: ; preds = %4, %0
%8 = tail call i32 @McDevIf_AddPacket(i32 1074528256, i8 zeroext 0)
ret void
}
int isid(int *p, int n) {
  while (n--) {
    if (*(p + n) != n + 1)
      return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<isid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     1149 <isid+0x49>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
je     1144 <isid+0x44>
movl   $0x0,-0x4(%rbp)
jmp    1150 <isid+0x50>
jmp    110b <isid+0xb>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isid>:
movslq %esi,%rax
lea    0x1(%rax),%ecx
cs nopw 0x0(%rax,%rax,1)
sub    $0x1,%rax
jb     1121 <isid+0x21>
add    $0xffffffff,%ecx
cmp    (%rdi,%rax,4),%ecx
je     1110 <isid+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @isid(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %8, %2
%5 = phi i64 [ %6, %8 ], [ %3, %2 ]
%6 = add nsw i64 %5, -1
%7 = icmp eq i64 %5, 0
br i1 %7, label %13, label %8
8: ; preds = %4
%9 = getelementptr inbounds i32, i32* %0, i64 %6
%10 = load i32, i32* %9
%11 = trunc i64 %5 to i32
%12 = icmp eq i32 %10, %11
br i1 %12, label %4, label %13
13: ; preds = %4, %8
%14 = phi i32 [ 0, %8 ], [ 1, %4 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__14__GeneralIO__makeOutput();
void HplSensirionSht11P__PWR__makeOutput(void) {
  Msp430GpioC__14__GeneralIO__makeOutput();
}


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

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

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

LLVM IR (-O2):
define void @HplSensirionSht11P__PWR__makeOutput() {
%1 = tail call i32 (...) @Msp430GpioC__14__GeneralIO__makeOutput()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serial_writechar(char);
void serial_writestring(char *s) {
  while (*s) {
    serial_writechar(*s);
    s++;
  }
}


x86 assembly (clang, -O0):
<serial_writestring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <serial_writestring+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <serial_writechar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <serial_writestring+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_writestring>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <serial_writestring+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <serial_writechar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <serial_writestring+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @serial_writestring(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call i32 @serial_writechar(i8 signext %9)
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @serial_writestring(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @serial_writechar(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
char *passphrase_read2(int /*<<< orphan*/, int /*<<< orphan*/);
char *passphrase_read(void) { return passphrase_read2(STDIN_FILENO, 0); }


x86 assembly (clang, -O0):
<passphrase_read>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <passphrase_read2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<passphrase_read>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
jmp    1030 <passphrase_read2@plt>

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
define i8* @passphrase_read() {
%1 = load i32, i32* @STDIN_FILENO
%2 = call i8* @passphrase_read2(i32 %1, i32 0)
ret i8* %2
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
define i8* @passphrase_read() {
%1 = load i32, i32* @STDIN_FILENO
%2 = tail call i8* @passphrase_read2(i32 %1, i32 0)
ret i8* %2
}
int tolower(int c) {
  if (c >= 'A' && c <= 'Z')
    return c + ('a' - 'A');
  return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     1129 <tolower+0x29>
cmpl   $0x5a,-0x8(%rbp)
jg     1129 <tolower+0x29>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <tolower+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 32
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
size_t retro_serialize_size(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @retro_serialize_size() {
ret i64 0
}

LLVM IR (-O2):
define i64 @retro_serialize_size() {
ret i64 0
}
void function_3() {}


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

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

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

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