xunge/DecIR huggingface dataset:
/* Variables and functions */
double song_enable_cmd(double, double, double, int, int /*<<< orphan*/);
double modipulategml_song_disable_effect(double songid, double ch, double cmd) {
  return song_enable_cmd(songid, ch, cmd, 1, 0);
}


x86 assembly (clang, -O0):
<modipulategml_song_disable_effect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <song_enable_cmd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modipulategml_song_disable_effect>:
mov    $0x1,%edi
xor    %esi,%esi
jmp    1030 <song_enable_cmd@plt>

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

LLVM IR (-O2):
define double @modipulategml_song_disable_effect(double %0, double %1, double %2) {
%4 = tail call double @song_enable_cmd(double %0, double %1, double %2, i32 1, i32 0)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_get_sink_input_info_list() {
  printf("NOT IMPLEMENTED:"
         "pa_context_get_sink_input_info_list"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [53 x i8] c"NOT IMPLEMENTED:pa_context_get_sink_input_info_list\0A\00"
define i32 @pa_context_get_sink_input_info_list() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [52 x i8] c"NOT IMPLEMENTED:pa_context_get_sink_input_info_list\00"
define i32 @pa_context_get_sink_input_info_list() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void perror(const char *x) {}


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

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

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

LLVM IR (-O2):
define void @perror(i8* nocapture %0) {
ret void
}
int jac_chain_nm5_n_in(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @jac_chain_nm5_n_in() {
ret i32 2
}

LLVM IR (-O2):
define i32 @jac_chain_nm5_n_in() {
ret i32 2
}
int PCGetDirNextFile(void *handle, const char *dirName, char *filename,
                     int filenamelength, int *filesize) {}


x86 assembly (clang, -O0):
<PCGetDirNextFile>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @PCGetDirNextFile(i8* %0, i8* %1, i8* %2, i32 %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32*
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32* %4, i32** %11
%12 = load i32, i32* %6
ret i32 %12
}

LLVM IR (-O2):
define i32 @PCGetDirNextFile(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3, i32* nocapture readnone %4) {
ret i32 undef
}
void init_array(int *array, int size) {}


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

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

LLVM IR (-O0):
define void @init_array(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @init_array(i32* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  const double PI = 3.14159;
  double radius;
  scanf("%lf", &radius);
  printf("VOLUME = %.3lf\n", ((4.0 / 3.0) * PI * radius * radius * radius));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xecd(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xeac(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm1
movsd  0xec3(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [16 x i8] c"VOLUME = %.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
store double 3.141590e+00, double* %2
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%5 = load double, double* %3
%6 = fmul double 0x4010C1514ABD0449, %5
%7 = load double, double* %3
%8 = fmul double %6, %7
%9 = load double, double* %3
%10 = fmul double %8, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [16 x i8] c"VOLUME = %.3lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = fmul double %4, 0x4010C1514ABD0449
%6 = fmul double %4, %5
%7 = fmul double %4, %6
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %7)
ret i32 0
}
void gtk_editable_get_position() {}


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

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

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

LLVM IR (-O2):
define void @gtk_editable_get_position() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Zdravo, kako si?\n");
  printf("Neshto ne ti se pravi muabet?\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Zdravo, kako si?\0A\00"
@.str.1 = [31 x i8] c"Neshto ne ti se pravi muabet?\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [17 x i8] c"Zdravo, kako si?\00"
@str.2 = [30 x i8] c"Neshto ne ti se pravi muabet?\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int endmntent(FILE *fp __attribute__((unused))) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @endmntent(i32* nocapture readnone %0) {
ret i32 1
}
void glDisable(int a) {}


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

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

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

LLVM IR (-O2):
define void @glDisable(i32 %0) {
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ audio_utils_ns_from_timespec(struct timespec *);
scalar_t__ clock_gettime(int /*<<< orphan*/, struct timespec *);
int64_t audio_utils_get_real_time_ns() {
  struct timespec now_ts;
  if (clock_gettime(CLOCK_REALTIME, &now_ts) == 0) {
    return audio_utils_ns_from_timespec(&now_ts);
  }
  return 0;
}


x86 assembly (clang, -O0):
<audio_utils_get_real_time_ns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
cmp    $0x0,%rax
jne    1155 <audio_utils_get_real_time_ns+0x35>
lea    -0x8(%rbp),%rdi
call   1040 <audio_utils_ns_from_timespec@plt>
mov    %eax,-0x4(%rbp)
jmp    115c <audio_utils_get_real_time_ns+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<audio_utils_get_real_time_ns>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     113e <audio_utils_get_real_time_ns+0x1e>
pop    %rcx
ret
mov    %rsp,%rdi
call   1040 <audio_utils_ns_from_timespec@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @audio_utils_get_real_time_ns() {
%1 = alloca i32
%2 = alloca %struct.timespec
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i64 @clock_gettime(i32 %3, %struct.timespec* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @audio_utils_ns_from_timespec(%struct.timespec* %2)
store i32 %7, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @audio_utils_get_real_time_ns() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i64 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @audio_utils_ns_from_timespec(%struct.timespec* %1)
br label %8
8: ; preds = %0, %6
%9 = phi i32 [ %7, %6 ], [ 0, %0 ]
ret i32 %9
}
/* Variables and functions */
double cosh(double);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double CosenoHiperbolico(double x) {
  printf("Enter a number: ");
  scanf("%lf", &x);
  return (cosh(x));
}


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

x86 assembly (clang, -O2):
<CosenoHiperbolico>:
push   %rax
movsd  %xmm0,(%rsp)
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
call   1030 <cosh@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @CosenoHiperbolico(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = call double @cosh(double %5)
ret double %6
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @CosenoHiperbolico(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = call double @cosh(double %5)
ret double %6
}
void tagid_free(struct tagid *tagid) {}


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

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

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

LLVM IR (-O2):
%struct.tagid = type opaque
define void @tagid_free(%struct.tagid* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_poly1305_opp(uintptr_t, uintptr_t);
void fiat_poly1305_opp(uint32_t out1[5], const uint32_t arg1[5]) {
  internal_fiat_poly1305_opp((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_poly1305_opp>:
jmp    1030 <internal_fiat_poly1305_opp@plt>

LLVM IR (-O0):
define void @fiat_poly1305_opp(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_poly1305_opp(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_poly1305_opp(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_poly1305_opp(i64 %3, i64 %4)
ret void
}
void outb(unsigned char value, int port) {
  __asm__ __volatile__("out"
                       "b"
                       " %"
                       "b"
                       "0, %w1"
                       :
                       : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%edx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%edx
mov    %edi,%eax
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb(i8 zeroext %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* %4
ret void
}

LLVM IR (-O2):
define void @outb(i8 zeroext %0, i32 %1) {
tail call void asm sideeffect "outb ${0:b}, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ fexcept_t;

/* Variables and functions */
int fegetexceptflag(fexcept_t *flagp, int excepts) { return 0; }


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

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

LLVM IR (-O0):
define i32 @fegetexceptflag(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @fegetexceptflag(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void checkerr(int err, const char *op, const char *name) {
  if (err < 0) {
    fprintf(stderr, "There was an error %s %s: %s\n", op, name,
            strerror(errno));
  }
}


x86 assembly (clang, -O0):
<checkerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1181 <checkerr+0x61>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    %rax,%r8
lea    0xe84(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkerr>:
test   %edi,%edi
js     1125 <checkerr+0x5>
ret
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    0x2eaa(%rip),%rax
mov    (%rax),%ebp
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xeb3(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %rax,%r8
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"There was an error %s %s: %s\0A\00"
@errno = global i32 0
define void @checkerr(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %3
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = load i32, i32* @errno
%14 = call i8* @strerror(i32 %13)
%15 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12, i8* %14)
br label %16
16: ; preds = %9, %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"There was an error %s %s: %s\0A\00"
@errno = global i32 0
define void @checkerr(i32 %0, i8* %1, i8* %2) {
%4 = icmp slt i32 %0, 0
br i1 %4, label %5, label %10
5: ; preds = %3
%6 = load i32, i32* @stderr
%7 = load i32, i32* @errno
%8 = tail call i8* @strerror(i32 %7)
%9 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %8)
br label %10
10: ; preds = %5, %3
ret void
}
void strtolower_ascii(char *str) {
  char *p = str;
  while (*p) {
    if (*p >= 'A' && *p <= 'Z') {
      *p = *p - 'A' + 'a';
    }
    p++;
  }
}


x86 assembly (clang, -O0):
<strtolower_ascii>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1163 <strtolower_ascii+0x63>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1152 <strtolower_ascii+0x52>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     1152 <strtolower_ascii+0x52>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strtolower_ascii+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtolower_ascii>:
mov    (%rdi),%al
test   %al,%al
je     112a <strtolower_ascii+0x2a>
add    $0x1,%rdi
jmp    111b <strtolower_ascii+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     112a <strtolower_ascii+0x2a>
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     1110 <strtolower_ascii+0x10>
add    $0x20,%al
mov    %al,-0x1(%rdi)
jmp    1110 <strtolower_ascii+0x10>
ret

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

LLVM IR (-O2):
define void @strtolower_ascii(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %9, %4
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret void
}
double Clamp_L_double(double L) {
  if (L < 0)
    L = 0;
  if (L > 100)
    L = 100;
  return L;
}


x86 assembly (clang, -O0):
<Clamp_L_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    111f <Clamp_L_double+0x1f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1143 <Clamp_L_double+0x43>
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Clamp_L_double>:
xorpd  %xmm1,%xmm1
maxsd  %xmm0,%xmm1
movsd  0xef0(%rip),%xmm0
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Clamp_L_double(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
store double 0.000000e+00, double* %2
br label %6
6: ; preds = %5, %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 1.000000e+02
br i1 %8, label %9, label %10
9: ; preds = %6
store double 1.000000e+02, double* %2
br label %10
10: ; preds = %9, %6
%11 = load double, double* %2
ret double %11
}

LLVM IR (-O2):
define double @Clamp_L_double(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = select i1 %2, double 0.000000e+00, double %0
%4 = fcmp ogt double %3, 1.000000e+02
%5 = select i1 %4, double 1.000000e+02, double %3
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void die(char *s) {
  fprintf(stderr, "error: %s\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"error: %s\0A\00"
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"error: %s\0A\00"
define void @die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ getDefaultProfileName();
int /*<<< orphan*/ sqlExecProgProfile(int /*<<< orphan*/, char *, char **, int,
                                      char **);
void sqlExecProg(char *prog, char **progArgs, int userArgc, char *userArgv[]) {
  sqlExecProgProfile(getDefaultProfileName(), prog, progArgs, userArgc,
                     userArgv);
}


x86 assembly (clang, -O0):
<sqlExecProg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1040 <getDefaultProfileName@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
call   1030 <sqlExecProgProfile@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlExecProg>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %edx,%r15d
mov    %rsi,%rbx
mov    %rdi,%rbp
xor    %eax,%eax
call   1040 <getDefaultProfileName@plt>
mov    %eax,%edi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r15d,%ecx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <sqlExecProgProfile@plt>

LLVM IR (-O0):
define void @sqlExecProg(i8* %0, i8** %1, i32 %2, i8** %3) {
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i8**
store i8* %0, i8** %5
store i8** %1, i8*** %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%9 = call i32 (...) @getDefaultProfileName()
%10 = load i8*, i8** %5
%11 = load i8**, i8*** %6
%12 = load i32, i32* %7
%13 = load i8**, i8*** %8
%14 = call i32 @sqlExecProgProfile(i32 %9, i8* %10, i8** %11, i32 %12, i8** %13)
ret void
}

LLVM IR (-O2):
define void @sqlExecProg(i8* %0, i8** %1, i32 %2, i8** %3) {
%5 = tail call i32 (...) @getDefaultProfileName()
%6 = tail call i32 @sqlExecProgProfile(i32 %5, i8* %0, i8** %1, i32 %2, i8** %3)
ret void
}
struct internal_ibv_pd *ibv_pd_to_internal(struct ibv_pd *pd) {
  return (struct internal_ibv_pd *)pd;
}


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

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

LLVM IR (-O0):
%struct.internal_ibv_pd = type opaque
%struct.ibv_pd = type opaque
define %struct.internal_ibv_pd* @ibv_pd_to_internal(%struct.ibv_pd* %0) {
%2 = alloca %struct.ibv_pd*
store %struct.ibv_pd* %0, %struct.ibv_pd** %2
%3 = load %struct.ibv_pd*, %struct.ibv_pd** %2
%4 = bitcast %struct.ibv_pd* %3 to %struct.internal_ibv_pd*
ret %struct.internal_ibv_pd* %4
}

LLVM IR (-O2):
%struct.internal_ibv_pd = type opaque
%struct.ibv_pd = type opaque
define %struct.internal_ibv_pd* @ibv_pd_to_internal(%struct.ibv_pd* readnone %0) {
%2 = bitcast %struct.ibv_pd* %0 to %struct.internal_ibv_pd*
ret %struct.internal_ibv_pd* %2
}
void foo_2_1_2_1_1_1_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_2_1_1_1_1_2_2() {
ret void
}
/* Type definitions */
typedef scalar_t__ base;

/* Variables and functions */
int /*<<< orphan*/ barrier();
unsigned long get_uart_base();
void putc(int c) {
  unsigned long base = get_uart_base();
  while ((*(volatile unsigned char *)((base) + 0x18)) & (1 << 5))
    barrier();
  (*(volatile unsigned char *)((base) + 0x00)) = c;
}


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <get_uart_base@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%al
movzbl %al,%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     1158 <putc+0x38>
mov    $0x0,%al
call   1030 <barrier@plt>
jmp    1136 <putc+0x16>
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <get_uart_base@plt>
mov    %rax,%rbx
testb  $0x20,0x18(%rax)
je     114d <putc+0x2d>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1030 <barrier@plt>
testb  $0x20,0x18(%rbx)
jne    1140 <putc+0x20>
mov    %bpl,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @putc(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = call i64 (...) @get_uart_base()
store i64 %4, i64* %3
br label %5
5: ; preds = %13, %1
%6 = load i64, i64* %3
%7 = add i64 %6, 24
%8 = inttoptr i64 %7 to i8*
%9 = load volatile i8, i8* %8
%10 = zext i8 %9 to i32
%11 = and i32 %10, 32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %5
%14 = call i32 (...) @barrier()
br label %5
15: ; preds = %5
%16 = load i32, i32* %2
%17 = trunc i32 %16 to i8
%18 = load i64, i64* %3
%19 = add i64 %18, 0
%20 = inttoptr i64 %19 to i8*
store volatile i8 %17, i8* %20
ret void
}

LLVM IR (-O2):
define void @putc(i32 %0) {
%2 = tail call i64 (...) @get_uart_base()
%3 = add i64 %2, 24
%4 = inttoptr i64 %3 to i8*
%5 = load volatile i8, i8* %4
%6 = and i8 %5, 32
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %1, %8
%9 = tail call i32 (...) @barrier()
%10 = load volatile i8, i8* %4
%11 = and i8 %10, 32
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %8
13: ; preds = %8, %1
%14 = trunc i32 %0 to i8
%15 = inttoptr i64 %2 to i8*
store volatile i8 %14, i8* %15
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_col(char *, int const, int const, float const *,
                             int /*<<< orphan*/);
void print_bounds(const int m, const int n, const float *lp) {
  print_col("bnd: ", m, n, lp, 0);
}


x86 assembly (clang, -O0):
<print_bounds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xecd(%rip),%rdi
xor    %r8d,%r8d
call   1030 <print_col@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_bounds>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee2(%rip),%rdi
xor    %r8d,%r8d
jmp    1030 <print_col@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"bnd: \00"
define void @print_bounds(i32 %0, i32 %1, float* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float*
store i32 %0, i32* %4
store i32 %1, i32* %5
store float* %2, float** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load float*, float** %6
%10 = call i32 @print_col(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, float* %9, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"bnd: \00"
define void @print_bounds(i32 %0, i32 %1, float* %2) {
%4 = tail call i32 @print_col(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, float* %2, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ipc_can_recv(unsigned long *, unsigned long, int *, int *);
int /*<<< orphan*/ yield();
int ipc_recv(unsigned long *whom, unsigned long dstva, int *perm) {
  int value;
  ipc_can_recv(whom, dstva, perm, &value);
  yield();
  return value;
}


x86 assembly (clang, -O0):
<ipc_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1040 <ipc_can_recv@plt>
mov    $0x0,%al
call   1030 <yield@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipc_recv>:
push   %rax
lea    0x4(%rsp),%rcx
call   1040 <ipc_can_recv@plt>
xor    %eax,%eax
call   1030 <yield@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ipc_recv(i64* %0, i64 %1, i32* %2) {
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i32*
%7 = alloca i32
store i64* %0, i64** %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%8 = load i64*, i64** %4
%9 = load i64, i64* %5
%10 = load i32*, i32** %6
%11 = call i32 @ipc_can_recv(i64* %8, i64 %9, i32* %10, i32* %7)
%12 = call i32 (...) @yield()
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
define i32 @ipc_recv(i64* %0, i64 %1, i32* %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i32 @ipc_can_recv(i64* %0, i64 %1, i32* %2, i32* %4)
%7 = call i32 (...) @yield()
%8 = load i32, i32* %4
ret i32 %8
}
void foo630(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo630(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_variable(int /*<<< orphan*/);
int /*<<< orphan*/ eat_blanks();
int /*<<< orphan*/ return_next_tok();
void do_global(void) {
  eat_blanks();
  add_variable(return_next_tok());
}


x86 assembly (clang, -O0):
<do_global>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <eat_blanks@plt>
mov    $0x0,%al
call   1050 <return_next_tok@plt>
mov    %eax,%edi
call   1040 <add_variable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_global>:
push   %rax
xor    %eax,%eax
call   1030 <eat_blanks@plt>
xor    %eax,%eax
call   1050 <return_next_tok@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <add_variable@plt>

LLVM IR (-O0):
define void @do_global() {
%1 = call i32 (...) @eat_blanks()
%2 = call i32 (...) @return_next_tok()
%3 = call i32 @add_variable(i32 %2)
ret void
}

LLVM IR (-O2):
define void @do_global() {
%1 = tail call i32 (...) @eat_blanks()
%2 = tail call i32 (...) @return_next_tok()
%3 = tail call i32 @add_variable(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ callrts(char *);
ult() { callrts("ccult"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"ccult\00"
define i32 @ult() {
%1 = tail call i32 @callrts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ VIM_HIF_SetReg8(int, unsigned char);
void VIM_MARB_SetRecaptureEn(unsigned char Enable) {
  unsigned char temp = 0;
  temp |= Enable;
  temp |= (Enable << 1);
  VIM_HIF_SetReg8((0x2400 + 0x0A4), temp);
}


x86 assembly (clang, -O0):
<VIM_MARB_SetRecaptureEn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
movzbl -0x1(%rbp),%ecx
movzbl -0x2(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%ecx
shl    $0x1,%ecx
movzbl -0x2(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x2(%rbp)
mov    $0x24a4,%edi
movzbl -0x2(%rbp),%esi
call   1030 <VIM_HIF_SetReg8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_MARB_SetRecaptureEn>:
lea    (%rdi,%rdi,1),%eax
or     %dil,%al
movzbl %al,%esi
mov    $0x24a4,%edi
jmp    1030 <VIM_HIF_SetReg8@plt>

LLVM IR (-O0):
define void @VIM_MARB_SetRecaptureEn(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
store i8 0, i8* %3
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = load i8, i8* %3
%7 = zext i8 %6 to i32
%8 = or i32 %7, %5
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i8, i8* %2
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 1
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %14, %12
%16 = trunc i32 %15 to i8
store i8 %16, i8* %3
%17 = load i8, i8* %3
%18 = call i32 @VIM_HIF_SetReg8(i32 9380, i8 zeroext %17)
ret void
}

LLVM IR (-O2):
define void @VIM_MARB_SetRecaptureEn(i8 zeroext %0) {
%2 = shl i8 %0, 1
%3 = or i8 %2, %0
%4 = tail call i32 @VIM_HIF_SetReg8(i32 9380, i8 zeroext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printw(char *);
void ion_cmd_set(char *cmd) { printw("\n\rset command\n\r\n\r"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"\0A\0Dset command\0A\0D\0A\0D\00"
define void @ion_cmd_set(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printw(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"\0A\0Dset command\0A\0D\0A\0D\00"
define void @ion_cmd_set(i8* nocapture readnone %0) {
%2 = tail call i32 @printw(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int getofield(int, int);
scalar_t__ inlist(int, int);
int hasnoun(int obj, int noun) {
  while (obj) {
    if (inlist(getofield(obj, 2), noun))
      return (1);
    obj = getofield(obj, 0);
  }
  return (0);
}


x86 assembly (clang, -O0):
<hasnoun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1177 <hasnoun+0x57>
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   1030 <getofield@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1040 <inlist@plt>
cmp    $0x0,%rax
je     1165 <hasnoun+0x45>
movl   $0x1,-0x4(%rbp)
jmp    117e <hasnoun+0x5e>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1030 <getofield@plt>
mov    %eax,-0x8(%rbp)
jmp    112e <hasnoun+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hasnoun>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
je     115c <hasnoun+0x3c>
mov    %esi,%r14d
mov    %edi,%ebp
xor    %ebx,%ebx
nop
mov    %ebp,%edi
mov    $0x2,%esi
call   1030 <getofield@plt>
mov    %eax,%edi
mov    %r14d,%esi
call   1040 <inlist@plt>
test   %rax,%rax
jne    1160 <hasnoun+0x40>
mov    %ebp,%edi
xor    %esi,%esi
call   1030 <getofield@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1130 <hasnoun+0x10>
jmp    1165 <hasnoun+0x45>
xor    %ebx,%ebx
jmp    1165 <hasnoun+0x45>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @hasnoun(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 = %16, %2
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load i32, i32* %4
%11 = call i32 @getofield(i32 %10, i32 2)
%12 = load i32, i32* %5
%13 = call i64 @inlist(i32 %11, i32 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %9
store i32 1, i32* %3
br label %20
16: ; preds = %9
%17 = load i32, i32* %4
%18 = call i32 @getofield(i32 %17, i32 0)
store i32 %18, i32* %4
br label %6
19: ; preds = %6
store i32 0, i32* %3
br label %20
20: ; preds = %19, %15
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @hasnoun(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %9
%5 = phi i32 [ %10, %9 ], [ %0, %2 ]
%6 = tail call i32 @getofield(i32 %5, i32 2)
%7 = tail call i64 @inlist(i32 %6, i32 %1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = tail call i32 @getofield(i32 %5, i32 0)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %9, %2
%13 = phi i32 [ 0, %2 ], [ 0, %9 ], [ 1, %4 ]
ret i32 %13
}
/* Variables and functions */
scalar_t__ fma(double, double, double);
int /*<<< orphan*/ link_failure_fma();
void test_fma(double d1, double d2, double d3) {
  if (fma(d1, d2, d3) != fma(d1, d2, d3))
    link_failure_fma();
}


x86 assembly (clang, -O0):
<test_fma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1040 <fma@plt>
mov    %rax,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1040 <fma@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
je     117a <test_fma+0x5a>
mov    $0x0,%al
call   1030 <link_failure_fma@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fma>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1040 <fma@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
call   1040 <fma@plt>
cmp    %rax,%rbx
jne    1161 <test_fma+0x41>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1030 <link_failure_fma@plt>

LLVM IR (-O0):
define void @test_fma(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call i64 @fma(double %7, double %8, double %9)
%11 = load double, double* %4
%12 = load double, double* %5
%13 = load double, double* %6
%14 = call i64 @fma(double %11, double %12, double %13)
%15 = icmp ne i64 %10, %14
br i1 %15, label %16, label %18
16: ; preds = %3
%17 = call i32 (...) @link_failure_fma()
br label %18
18: ; preds = %16, %3
ret void
}

LLVM IR (-O2):
define void @test_fma(double %0, double %1, double %2) {
%4 = tail call i64 @fma(double %0, double %1, double %2)
%5 = tail call i64 @fma(double %0, double %1, double %2)
%6 = icmp eq i64 %4, %5
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 (...) @link_failure_fma()
br label %9
9: ; preds = %7, %3
ret void
}
double RoundDouble(double d) {
  int intValue = (d * 1000) + .00000001;
  if (intValue % 10 >= 5) {
    intValue /= 10;
    intValue++;
  } else {
    intValue /= 10;
  }
  return (double)intValue / 100.0;
}


x86 assembly (clang, -O0):
<RoundDouble>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee6(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x5,%edx
jl     115d <RoundDouble+0x5d>
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116b <RoundDouble+0x6b>
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xe98(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<RoundDouble>:
mulsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
cvttsd2si %xmm0,%eax
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%eax
xor    %edx,%edx
cmp    $0x5,%eax
setge  %dl
add    %ecx,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
divsd  0xec5(%rip),%xmm0
ret

LLVM IR (-O0):
define double @RoundDouble(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @llvm.fmuladd.f64(double %4, double 1.000000e+03, double 1.000000e-08)
%6 = fptosi double %5 to i32
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = srem i32 %7, 10
%9 = icmp sge i32 %8, 5
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load i32, i32* %3
%12 = sdiv i32 %11, 10
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %18
15: ; preds = %1
%16 = load i32, i32* %3
%17 = sdiv i32 %16, 10
store i32 %17, i32* %3
br label %18
18: ; preds = %15, %10
%19 = load i32, i32* %3
%20 = sitofp i32 %19 to double
%21 = fdiv double %20, 1.000000e+02
ret double %21
}

LLVM IR (-O2):
define double @RoundDouble(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 1.000000e+03, double 1.000000e-08)
%3 = fptosi double %2 to i32
%4 = srem i32 %3, 10
%5 = icmp sgt i32 %4, 4
%6 = sdiv i32 %3, 10
%7 = zext i1 %5 to i32
%8 = add nsw i32 %6, %7
%9 = sitofp i32 %8 to double
%10 = fdiv double %9, 1.000000e+02
ret double %10
}
int test_imm_B8int16_reg(short val) {
  return ((val) & (0xB8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B8int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xb8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_B8int16_reg>:
test   $0xb8,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_B8int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 184
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_B8int16_reg(i16 signext %0) {
%2 = and i16 %0, 184
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct pkt_buff {
  int dummy;
};
typedef scalar_t__ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ tprintf(char *);
void dissect_opt_dest(struct pkt_buff *pkt __attribute__((__unused__)),
                      ssize_t *opt_len) {
  if (*opt_len)
    tprintf(", Option(s) recognized ");
}


x86 assembly (clang, -O0):
<dissect_opt_dest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     113a <dissect_opt_dest+0x2a>
lea    0xecb(%rip),%rdi
call   1030 <tprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dissect_opt_dest>:
cmpq   $0x0,(%rsi)
je     1122 <dissect_opt_dest+0x12>
lea    0xee3(%rip),%rdi
jmp    1030 <tprintf@plt>
ret

LLVM IR (-O0):
%struct.pkt_buff = type { i32 }
@.str = [24 x i8] c", Option(s) recognized \00"
define void @dissect_opt_dest(%struct.pkt_buff* %0, i64* %1) {
%3 = alloca %struct.pkt_buff*
%4 = alloca i64*
store %struct.pkt_buff* %0, %struct.pkt_buff** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = load i64, i64* %5
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @tprintf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
%struct.pkt_buff = type { i32 }
@.str = [24 x i8] c", Option(s) recognized \00"
define void @dissect_opt_dest(%struct.pkt_buff* nocapture readnone %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @tprintf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
int bar(int i) { return i + 2; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
lea    0x2(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = add nsw i32 %0, 2
ret i32 %2
}