xunge/DecIR huggingface dataset:
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gui_buffer_notify_set_all();
void config_dogechat_notify_change_cb(void *data,
                                      struct t_config_option *option) {
  (void)data;
  (void)option;
  gui_buffer_notify_set_all();
}


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

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

LLVM IR (-O0):
%struct.t_config_option = type { i32 }
define void @config_dogechat_notify_change_cb(i8* %0, %struct.t_config_option* %1) {
%3 = alloca i8*
%4 = alloca %struct.t_config_option*
store i8* %0, i8** %3
store %struct.t_config_option* %1, %struct.t_config_option** %4
%5 = load i8*, i8** %3
%6 = load %struct.t_config_option*, %struct.t_config_option** %4
%7 = call i32 (...) @gui_buffer_notify_set_all()
ret void
}

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @config_dogechat_notify_change_cb(i8* nocapture readnone %0, %struct.t_config_option* nocapture readnone %1) {
%3 = tail call i32 (...) @gui_buffer_notify_set_all()
ret void
}
/* Variables and functions */
int M_PI;
double cos(int);
double ws_weight(int y, int h) { return cos((y - 0.5 * h + 0.5) * (M_PI / h)); }


x86 assembly (clang, -O0):
<ws_weight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xed8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xec0(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
cltd
idivl  -0x8(%rbp)
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <cos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ws_weight>:
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
mulsd  0xee0(%rip),%xmm1
addsd  %xmm0,%xmm1
addsd  0xedc(%rip),%xmm1
mov    0x2eb5(%rip),%rax
mov    (%rax),%eax
cltd
idiv   %esi
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
jmp    1030 <cos@plt>

LLVM IR (-O0):
@M_PI = global i32 0
define double @ws_weight(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 = sitofp i32 %5 to double
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %8, double %6)
%10 = fadd double %9, 5.000000e-01
%11 = load i32, i32* @M_PI
%12 = load i32, i32* %4
%13 = sdiv i32 %11, %12
%14 = sitofp i32 %13 to double
%15 = fmul double %10, %14
%16 = fptosi double %15 to i32
%17 = call double @cos(i32 %16)
ret double %17
}

LLVM IR (-O2):
@M_PI = global i32 0
define double @ws_weight(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = sitofp i32 %1 to double
%5 = tail call double @llvm.fmuladd.f64(double %4, double -5.000000e-01, double %3)
%6 = fadd double %5, 5.000000e-01
%7 = load i32, i32* @M_PI
%8 = sdiv i32 %7, %1
%9 = sitofp i32 %8 to double
%10 = fmul double %6, %9
%11 = fptosi double %10 to i32
%12 = tail call double @cos(i32 %11)
ret double %12
}
/* Type definitions */
struct file_tags {
  int dummy;
};

/* Variables and functions */
char *build_title_with_format(struct file_tags const *, int /*<<< orphan*/);
int /*<<< orphan*/ options_get_str(char *);
char *build_title(const struct file_tags *tags) {
  return build_title_with_format(tags, options_get_str("FormatString"));
}


x86 assembly (clang, -O0):
<build_title>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xec5(%rip),%rdi
call   1040 <options_get_str@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <build_title_with_format@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_title>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <options_get_str@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <build_title_with_format@plt>

LLVM IR (-O0):
%struct.file_tags = type { i32 }
@.str = [13 x i8] c"FormatString\00"
define i8* @build_title(%struct.file_tags* %0) {
%2 = alloca %struct.file_tags*
store %struct.file_tags* %0, %struct.file_tags** %2
%3 = load %struct.file_tags*, %struct.file_tags** %2
%4 = call i32 @options_get_str(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = call i8* @build_title_with_format(%struct.file_tags* %3, i32 %4)
ret i8* %5
}

LLVM IR (-O2):
%struct.file_tags = type { i32 }
@.str = [13 x i8] c"FormatString\00"
define i8* @build_title(%struct.file_tags* %0) {
%2 = tail call i32 @options_get_str(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i8* @build_title_with_format(%struct.file_tags* %0, i32 %2)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int mkdirat(int, char const *, int /*<<< orphan*/);
__attribute__((__weak__, __always___)) int
softboundmpx_mkdirat(int dirfd, const char *pathname, mode_t mode) {
  return mkdirat(dirfd, pathname, mode);
}


x86 assembly (clang, -O0):
<softboundmpx_mkdirat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <mkdirat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_mkdirat>:
jmp    1030 <mkdirat@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_mkdirat(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @mkdirat(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ putenv(char *);
void uninitvar_putenv(char *envstr) {
  (void)putenv(envstr);
  char *p;
  (void)putenv(p);
}


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

x86 assembly (clang, -O2):
<uninitvar_putenv>:
push   %rax
call   1030 <putenv@plt>
pop    %rax
jmp    1030 <putenv@plt>

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

LLVM IR (-O2):
define void @uninitvar_putenv(i8* %0) {
%2 = tail call i32 @putenv(i8* %0)
%3 = tail call i32 @putenv(i8* undef)
ret void
}
void ASN1_mbstring_ncopy(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_mbstring_ncopy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2();
int /*<<< orphan*/ test3();
int main() {
  test1();
  test2();
  test3();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <test1@plt>
mov    $0x0,%al
call   1050 <test2@plt>
mov    $0x0,%al
call   1030 <test3@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @test1()
%2 = call i32 (...) @test2()
%3 = call i32 (...) @test3()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test1()
%2 = tail call i32 (...) @test2()
%3 = tail call i32 (...) @test3()
ret i32 0
}
int bit_next(int prev) { return (prev + 1) % 256; }


x86 assembly (clang, -O0):
<bit_next>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_next>:
lea    0x1(%rdi),%eax
lea    0x100(%rdi),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffff00,%ecx
neg    %ecx
lea    (%rdi,%rcx,1),%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @bit_next(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = srem i32 %4, 256
ret i32 %5
}

LLVM IR (-O2):
define i32 @bit_next(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = srem i32 %2, 256
ret i32 %3
}
void bndxb_(double *t, double *u, double *ux, double *bval, int *npde) {
  (void)t;
  (void)u;
  (void)npde;
  bval[0] = ux[0];
  bval[1] = ux[1];
  bval[2] = ux[2];
  bval[3] = ux[3];
}


x86 assembly (clang, -O0):
<bndxb_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bndxb_>:
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rcx)
movsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x8(%rcx)
movsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x10(%rcx)
movsd  0x18(%rdx),%xmm0
movsd  %xmm0,0x18(%rcx)
ret

LLVM IR (-O0):
define void @bndxb_(double* %0, double* %1, double* %2, double* %3, i32* %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32*
store double* %0, double** %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
store i32* %4, i32** %10
%11 = load double*, double** %6
%12 = load double*, double** %7
%13 = load i32*, i32** %10
%14 = load double*, double** %8
%15 = getelementptr inbounds double, double* %14, i64 0
%16 = load double, double* %15
%17 = load double*, double** %9
%18 = getelementptr inbounds double, double* %17, i64 0
store double %16, double* %18
%19 = load double*, double** %8
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = load double*, double** %9
%23 = getelementptr inbounds double, double* %22, i64 1
store double %21, double* %23
%24 = load double*, double** %8
%25 = getelementptr inbounds double, double* %24, i64 2
%26 = load double, double* %25
%27 = load double*, double** %9
%28 = getelementptr inbounds double, double* %27, i64 2
store double %26, double* %28
%29 = load double*, double** %8
%30 = getelementptr inbounds double, double* %29, i64 3
%31 = load double, double* %30
%32 = load double*, double** %9
%33 = getelementptr inbounds double, double* %32, i64 3
store double %31, double* %33
ret void
}

LLVM IR (-O2):
define void @bndxb_(double* nocapture readnone %0, double* nocapture readnone %1, double* nocapture %2, double* nocapture writeonly %3, i32* nocapture readnone %4) {
%6 = load double, double* %2
store double %6, double* %3
%7 = getelementptr inbounds double, double* %2, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %3, i64 1
store double %8, double* %9
%10 = getelementptr inbounds double, double* %2, i64 2
%11 = load double, double* %10
%12 = getelementptr inbounds double, double* %3, i64 2
store double %11, double* %12
%13 = getelementptr inbounds double, double* %2, i64 3
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %3, i64 3
store double %14, double* %15
ret void
}
/* Type definitions */
struct sl_pp_token_buffer {
  int dummy;
};
struct sl_pp_context {
  int dummy;
};

/* Variables and functions */
int _parse_if(struct sl_pp_context *, struct sl_pp_token_buffer *);
int sl_pp_process_if(struct sl_pp_context *context,
                     struct sl_pp_token_buffer *buffer) {
  return _parse_if(context, buffer);
}


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

x86 assembly (clang, -O2):
<sl_pp_process_if>:
jmp    1030 <_parse_if@plt>

LLVM IR (-O0):
%struct.sl_pp_context = type { i32 }
%struct.sl_pp_token_buffer = type { i32 }
define i32 @sl_pp_process_if(%struct.sl_pp_context* %0, %struct.sl_pp_token_buffer* %1) {
%3 = alloca %struct.sl_pp_context*
%4 = alloca %struct.sl_pp_token_buffer*
store %struct.sl_pp_context* %0, %struct.sl_pp_context** %3
store %struct.sl_pp_token_buffer* %1, %struct.sl_pp_token_buffer** %4
%5 = load %struct.sl_pp_context*, %struct.sl_pp_context** %3
%6 = load %struct.sl_pp_token_buffer*, %struct.sl_pp_token_buffer** %4
%7 = call i32 @_parse_if(%struct.sl_pp_context* %5, %struct.sl_pp_token_buffer* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.sl_pp_context = type { i32 }
%struct.sl_pp_token_buffer = type { i32 }
define i32 @sl_pp_process_if(%struct.sl_pp_context* %0, %struct.sl_pp_token_buffer* %1) {
%3 = tail call i32 @_parse_if(%struct.sl_pp_context* %0, %struct.sl_pp_token_buffer* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ mwrite(unsigned int, unsigned char);
void writeBuffer(unsigned int address, unsigned int length,
                 unsigned char *buffer) {
  unsigned int i;
  for (i = 0; i < length; i++) {
    mwrite(address + i, buffer[i]);
  }
}


x86 assembly (clang, -O0):
<writeBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1159 <writeBuffer+0x49>
mov    -0x4(%rbp),%edi
add    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl (%rax,%rcx,1),%esi
call   1030 <mwrite@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <writeBuffer+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeBuffer>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
je     1147 <writeBuffer+0x37>
mov    %rdx,%r14
mov    %esi,%r15d
mov    %edi,%r12d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
lea    (%r12,%rbx,1),%edi
movzbl (%r14,%rbx,1),%esi
call   1030 <mwrite@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <writeBuffer+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @writeBuffer(i32 %0, i32 %1, i8* nocapture %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %14, %7 ]
%9 = trunc i64 %8 to i32
%10 = add i32 %9, %0
%11 = getelementptr inbounds i8, i8* %2, i64 %8
%12 = load i8, i8* %11
%13 = tail call i32 @mwrite(i32 %10, i8 zeroext %12)
%14 = add nuw nsw i64 %8, 1
%15 = icmp eq i64 %14, %6
br i1 %15, label %16, label %7
16: ; preds = %7, %3
ret void
}
int prctl_set_comment(const char *comment) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @prctl_set_comment(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ ValidateFileName(char *);
int strlen(char *);
int ValidatePath(char *Name) {
  if (0 == ValidateFileName(Name))
    return 0;
  if ('/' != Name[strlen(Name) - 1])
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<ValidatePath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ValidateFileName@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    114f <ValidatePath+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1190 <ValidatePath+0x70>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x2f,%eax
cmp    %ecx,%eax
je     1189 <ValidatePath+0x69>
movl   $0x0,-0x4(%rbp)
jmp    1190 <ValidatePath+0x70>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ValidatePath>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ValidateFileName@plt>
test   %rax,%rax
je     1145 <ValidatePath+0x25>
mov    %rbx,%rdi
call   1030 <strlen@plt>
movslq %eax,%rcx
xor    %eax,%eax
cmpb   $0x2f,-0x1(%rcx,%rbx,1)
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ValidatePath(i8* %0) {
%2 = tail call i64 @ValidateFileName(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 47
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %4, %1
%13 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %13
}
__attribute__((always_)) int pm_runtime_suspend(struct device *dev) {
  return -38;
}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define i32 @pm_runtime_suspend(%struct.device* nocapture readnone %0) {
ret i32 -38
}
/* Variables and functions */
scalar_t__ mock(char *);
char *cf_s_logdir(char *s) { return (char *)mock(s); }


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

x86 assembly (clang, -O2):
<cf_s_logdir>:
jmp    1030 <mock@plt>

LLVM IR (-O0):
define i8* @cf_s_logdir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @mock(i8* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @cf_s_logdir(i8* %0) {
%2 = tail call i64 @mock(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
scalar_t__ floor(double);
scalar_t__ isnan(double);
char prediction_to_char(double prediction) {
  if (isnan(prediction)) {
    return '!';
  } else {
    return (char)((int)floor(prediction * 10) + 48);
  }
}


x86 assembly (clang, -O0):
<prediction_to_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
je     114a <prediction_to_char+0x2a>
movb   $0x21,-0x1(%rbp)
jmp    1162 <prediction_to_char+0x42>
movsd  0xeae(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <floor@plt>
add    $0x30,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prediction_to_char>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <isnan@plt>
mov    %rax,%rcx
mov    $0x21,%al
test   %rcx,%rcx
je     1137 <prediction_to_char+0x17>
pop    %rcx
ret
movsd  (%rsp),%xmm0
mulsd  0xebc(%rip),%xmm0
call   1040 <floor@plt>
add    $0x30,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @prediction_to_char(double %0) {
%2 = alloca i8
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = call i64 @isnan(double %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 33, i8* %2
br label %15
8: ; preds = %1
%9 = load double, double* %3
%10 = fmul double %9, 1.000000e+01
%11 = call i64 @floor(double %10)
%12 = trunc i64 %11 to i32
%13 = add nsw i32 %12, 48
%14 = trunc i32 %13 to i8
store i8 %14, i8* %2
br label %15
15: ; preds = %8, %7
%16 = load i8, i8* %2
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @prediction_to_char(double %0) {
%2 = tail call i64 @isnan(double %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = fmul double %0, 1.000000e+01
%6 = tail call i64 @floor(double %5)
%7 = trunc i64 %6 to i8
%8 = add i8 %7, 48
br label %9
9: ; preds = %1, %4
%10 = phi i8 [ %8, %4 ], [ 33, %1 ]
ret i8 %10
}
int main() {
#pragma acc parallel num_workers(2 << 20)
  {}
#pragma acc parallel vector_length(2 << 20)
  {
  }
  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
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void gtk_tree_view_scroll_to_point() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_scroll_to_point() {
ret void
}
void _raise(void) { return; }


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

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

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

LLVM IR (-O2):
define void @_raise() {
ret void
}
/* Variables and functions */
int tirar(int);
int d10() { return tirar(10); }


x86 assembly (clang, -O0):
<d10>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <tirar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<d10>:
mov    $0xa,%edi
jmp    1030 <tirar@plt>

LLVM IR (-O0):
define i32 @d10() {
%1 = call i32 @tirar(i32 10)
ret i32 %1
}

LLVM IR (-O2):
define i32 @d10() {
%1 = tail call i32 @tirar(i32 10)
ret i32 %1
}
/* Type definitions */
typedef unsigned char uint16_t;

/* Variables and functions */
uint16_t read_u16_be(unsigned char *buf) {
  uint16_t n = 0;
  n |= buf[0] << 8;
  n |= buf[1];
  return n;
}


x86 assembly (clang, -O0):
<read_u16_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
shl    $0x8,%ecx
movzbl -0x9(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
movzbl -0x9(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_u16_be>:
mov    0x1(%rdi),%al
ret

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

LLVM IR (-O2):
define zeroext i8 @read_u16_be(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
ret i8 %3
}
/* Variables and functions */
size_t skip_multibyte_char(char c) {
  if (c)
    return 0;
  else
    return 0;
}


x86 assembly (clang, -O0):
<skip_multibyte_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
cmpb   $0x0,-0x9(%rbp)
je     1121 <skip_multibyte_char+0x21>
movq   $0x0,-0x8(%rbp)
jmp    1129 <skip_multibyte_char+0x29>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @skip_multibyte_char(i8 signext %0) {
%2 = alloca i64
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 0, i64* %2
br label %8
7: ; preds = %1
store i64 0, i64* %2
br label %8
8: ; preds = %7, %6
%9 = load i64, i64* %2
ret i64 %9
}

LLVM IR (-O2):
define i64 @skip_multibyte_char(i8 signext %0) {
ret i64 0
}
void ajXmloutExit(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ajXmloutExit() {
ret void
}
/* Variables and functions */
double depth_std_dev(double);
double depth_covariance(double depth) {
  double stddev = depth_std_dev(depth);
  return stddev * stddev;
}


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

x86 assembly (clang, -O2):
<depth_covariance>:
push   %rax
call   1030 <depth_std_dev@plt>
mulsd  %xmm0,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @depth_covariance(double %0) {
%2 = tail call double @depth_std_dev(double %0)
%3 = fmul double %2, %2
ret double %3
}
/* Variables and functions */
long long llabs(long long);
long long abs64(long long a) { return llabs(a); }


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

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

LLVM IR (-O0):
define i64 @abs64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @llabs(i64 %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @abs64(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Variables and functions */
char *diga_ola(const char *nome) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @diga_ola(i8* nocapture readnone %0) {
ret i8* null
}
int lala_je_h__zl(int x) { return x * 2; }


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

x86 assembly (clang, -O2):
<lala_je_h__zl>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @lala_je_h__zl(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
void iicdF(char *x) { int y = x; }


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

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

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

LLVM IR (-O2):
define void @iicdF(i8* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ fuzzyEquals(int /*<<< orphan*/, double);
int /*<<< orphan*/ getValue(double *, size_t, double);
scalar_t__ printf(char *, double);
int printSol(double *equation, size_t degree, double root) {
  if (fuzzyEquals(getValue(equation, degree, root), 0.0))
    return (printf("% .8g\n", root) > 0 ? 1 : 0);
  return 0;
}


x86 assembly (clang, -O0):
<printSol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
movsd  -0x20(%rbp),%xmm0
call   1040 <getValue@plt>
mov    %eax,%edi
xorps  %xmm0,%xmm0
call   1050 <fuzzyEquals@plt>
cmp    $0x0,%rax
je     1195 <printSol+0x65>
movsd  -0x20(%rbp),%xmm0
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovg  %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    119c <printSol+0x6c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printSol>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <getValue@plt>
xorps  %xmm0,%xmm0
mov    %eax,%edi
call   1050 <fuzzyEquals@plt>
test   %rax,%rax
je     1168 <printSol+0x38>
lea    0xeaf(%rip),%rdi
movsd  (%rsp),%xmm0
call   1030 <printf@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setg   %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"% .8g\0A\00"
define i32 @printSol(double* %0, i64 %1, double %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca i64
%7 = alloca double
store double* %0, double** %5
store i64 %1, i64* %6
store double %2, double* %7
%8 = load double*, double** %5
%9 = load i64, i64* %6
%10 = load double, double* %7
%11 = call i32 @getValue(double* %8, i64 %9, double %10)
%12 = call i64 @fuzzyEquals(i32 %11, double 0.000000e+00)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %20
14: ; preds = %3
%15 = load double, double* %7
%16 = call i64 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %15)
%17 = icmp sgt i64 %16, 0
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 1, i32 0
store i32 %19, i32* %4
br label %21
20: ; preds = %3
store i32 0, i32* %4
br label %21
21: ; preds = %20, %14
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
@.str = [7 x i8] c"% .8g\0A\00"
define i32 @printSol(double* %0, i64 %1, double %2) {
%4 = tail call i32 @getValue(double* %0, i64 %1, double %2)
%5 = tail call i64 @fuzzyEquals(i32 %4, double 0.000000e+00)
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = tail call i64 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %2)
%9 = icmp sgt i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %3, %7
%12 = phi i32 [ %10, %7 ], [ 0, %3 ]
ret i32 %12
}
float add_f(float a, float b) { return a + b; }


x86 assembly (clang, -O0):
<add_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_f>:
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @add_f(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 = fadd float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @add_f(float %0, float %1) {
%3 = fadd float %0, %1
ret float %3
}
/* Variables and functions */
unsigned long random();
unsigned long os_random(void) { return random(); }


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

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

LLVM IR (-O0):
define i64 @os_random() {
%1 = call i64 (...) @random()
ret i64 %1
}

LLVM IR (-O2):
define i64 @os_random() {
%1 = tail call i64 (...) @random()
ret i64 %1
}
void handle_und(void) { return; }


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

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

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

LLVM IR (-O2):
define void @handle_und() {
ret void
}
/* Variables and functions */
int test_rr(int, int, int);
int test_rr_7_5_5(int argc, const char **argv) { return test_rr(7, 5, 5); }


x86 assembly (clang, -O0):
<test_rr_7_5_5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x7,%edi
mov    $0x5,%edx
mov    %edx,%esi
call   1030 <test_rr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_rr_7_5_5>:
mov    $0x7,%edi
mov    $0x5,%esi
mov    $0x5,%edx
jmp    1030 <test_rr@plt>

LLVM IR (-O0):
define i32 @test_rr_7_5_5(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @test_rr(i32 7, i32 5, i32 5)
ret i32 %5
}

LLVM IR (-O2):
define i32 @test_rr_7_5_5(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test_rr(i32 7, i32 5, i32 5)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fly(register void *any, void *voidarg) { printf("Monkey fly fly fly\n"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"Monkey fly fly fly\0A\00"
define void @fly(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"Monkey fly fly fly\00"
define void @fly(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
int foo(float f, float g) {
  float beat_freqs[2] = {f - g, f + g};
  return 1;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(float %0, float %1) {
ret i32 1
}
void prefetch(void *addr) { __builtin_prefetch(addr); }


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

x86 assembly (clang, -O2):
<prefetch>:
prefetcht0 (%rdi)
ret

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

LLVM IR (-O2):
define void @prefetch(i8* nocapture %0) {
tail call void @llvm.prefetch.p0i8(i8* %0, i32 0, i32 3, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outop2str(char *);
void outcalladr() { outop2str("JSR"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"JSR\00"
define void @outcalladr() {
%1 = call i32 @outop2str(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"JSR\00"
define void @outcalladr() {
%1 = tail call i32 @outop2str(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ map2check_nondet_get_log();
int /*<<< orphan*/ nondet_log_to_file(int /*<<< orphan*/);
void nondet_generate_aux_witness_files() {
  nondet_log_to_file(map2check_nondet_get_log());
}


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

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

LLVM IR (-O0):
define void @nondet_generate_aux_witness_files() {
%1 = call i32 (...) @map2check_nondet_get_log()
%2 = call i32 @nondet_log_to_file(i32 %1)
ret void
}

LLVM IR (-O2):
define void @nondet_generate_aux_witness_files() {
%1 = tail call i32 (...) @map2check_nondet_get_log()
%2 = tail call i32 @nondet_log_to_file(i32 %1)
ret void
}
/* Variables and functions */
int suma(int, int);
int main(int argc, char *argv[]) {
  int x;
  int total = 0;
  int i = 0;
  for (i = 0; i < 2; i++) {
    total = total + suma(x, 2);
  }
  return total;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jge    1170 <main+0x60>
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x2,%esi
call   1030 <suma@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113b <main+0x2b>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2,%esi
call   1030 <suma@plt>
mov    %eax,%ebx
mov    $0x2,%esi
call   1030 <suma@plt>
add    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @suma(i32 undef, i32 2)
%4 = tail call i32 @suma(i32 undef, i32 2)
%5 = add nsw i32 %4, %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("usage:\n");
  printf("  -h help message\n");
  printf("  -p port\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xee9(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"usage:\0A\00"
@.str.1 = [19 x i8] c" -h help message\0A\00"
@.str.2 = [11 x i8] c" -p port\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"usage:\00"
@str.3 = [18 x i8] c" -h help message\00"
@str.4 = [10 x i8] c" -p port\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0))
ret void
}
int macro_comparison() { return (42 == 42); }


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

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

LLVM IR (-O0):
define i32 @macro_comparison() {
ret i32 1
}

LLVM IR (-O2):
define i32 @macro_comparison() {
ret i32 1
}
void PECI0_Handler(void) {
  while (1) {
  }
}


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

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

LLVM IR (-O0):
define void @PECI0_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @PECI0_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
long int long_tmin() { return 1L << (sizeof(long) << 3) - 1u; }


x86 assembly (clang, -O0):
<long_tmin>:
push   %rbp
mov    %rsp,%rbp
movabs $0x8000000000000000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<long_tmin>:
movabs $0x8000000000000000,%rax
ret

LLVM IR (-O0):
define i64 @long_tmin() {
ret i64 -9223372036854775808
}

LLVM IR (-O2):
define i64 @long_tmin() {
ret i64 -9223372036854775808
}
int fun1313() { return 1313; }


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

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

LLVM IR (-O0):
define i32 @fun1313() {
ret i32 1313
}

LLVM IR (-O2):
define i32 @fun1313() {
ret i32 1313
}
/* Variables and functions */
int strlen(char *);
char *corta_string(char *apuntador) {
  if (strlen(apuntador) > 1) {
    return apuntador + 1;
  } else
    return "ERR: No se tiene al menos un carácter\n";
}


x86 assembly (clang, -O0):
<corta_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
jle    113f <corta_string+0x2f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    114a <corta_string+0x3a>
lea    0xeba(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<corta_string>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
add    $0x1,%rbx
cmp    $0x2,%eax
lea    0xed9(%rip),%rax
cmovge %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"ERR: No se tiene al menos un car\C3\A1cter\0A\00"
define i8* @corta_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strlen(i8* %4)
%6 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8* %9, i8** %2
br label %11
10: ; preds = %1
store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8** %2
br label %11
11: ; preds = %10, %7
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [40 x i8] c"ERR: No se tiene al menos un car\C3\A1cter\0A\00"
define i8* @corta_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 1
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = select i1 %3, i8* %4, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0)
ret i8* %5
}
/* Type definitions */
struct sNode {
  int dummy;
};

/* Variables and functions */
int isEmpty(struct sNode *top) { return (top == NULL) ? 1 : 0; }


x86 assembly (clang, -O0):
<isEmpty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEmpty>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
%struct.sNode = type { i32 }
define i32 @isEmpty(%struct.sNode* %0) {
%2 = alloca %struct.sNode*
store %struct.sNode* %0, %struct.sNode** %2
%3 = load %struct.sNode*, %struct.sNode** %2
%4 = icmp eq %struct.sNode* %3, null
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
%struct.sNode = type { i32 }
define i32 @isEmpty(%struct.sNode* readnone %0) {
%2 = icmp eq %struct.sNode* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
_Bool Long_safe_MINUS_add(long x, long y, long *res) {
  return __builtin_saddl_overflow(x, y, res);
}


x86 assembly (clang, -O0):
<Long_safe_MINUS_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
add    %rax,%rdx
seto   %al
mov    %rdx,(%rcx)
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Long_safe_MINUS_add>:
add    %rsi,%rdi
seto   %al
mov    %rdi,(%rdx)
ret

LLVM IR (-O0):
define zeroext i1 @Long_safe_MINUS_add(i64 %0, i64 %1, i64* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = load i64*, i64** %6
%10 = call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %7, i64 %8)
%11 = extractvalue { i64, i1 } %10, 1
%12 = extractvalue { i64, i1 } %10, 0
store i64 %12, i64* %9
ret i1 %11
}

LLVM IR (-O2):
define zeroext i1 @Long_safe_MINUS_add(i64 %0, i64 %1, i64* nocapture writeonly %2) {
%4 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %0, i64 %1)
%5 = extractvalue { i64, i1 } %4, 1
%6 = extractvalue { i64, i1 } %4, 0
store i64 %6, i64* %2
ret i1 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
char *itob(int /*<<< orphan*/, int, char *);
char *int32tob(int32_t in, char *out) { return itob(in, 32, out); }


x86 assembly (clang, -O0):
<int32tob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x20,%esi
call   1030 <itob@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int32tob>:
mov    %rsi,%rdx
mov    $0x20,%esi
jmp    1030 <itob@plt>

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

LLVM IR (-O2):
define i8* @int32tob(i32 %0, i8* %1) {
%3 = tail call i8* @itob(i32 %0, i32 32, i8* %1)
ret i8* %3
}