xunge/DecIR huggingface dataset:
int funcion_i_ii(int x, int y) {
  int f;
  f = 80;
}


x86 assembly (clang, -O0):
<funcion_i_ii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x50,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @funcion_i_ii(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 80, i32* %6
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @funcion_i_ii(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
double sqrt(double);
double dv3_length(double *a) {
  return sqrt(a[0] * a[0] + a[1] * a[1] + a[2] * a[2]);
}


x86 assembly (clang, -O0):
<dv3_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dv3_length>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1141 <dv3_length+0x31>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @dv3_length(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fmul double %11, %14
%16 = call double @llvm.fmuladd.f64(double %5, double %8, double %15)
%17 = load double*, double** %2
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = load double*, double** %2
%21 = getelementptr inbounds double, double* %20, i64 2
%22 = load double, double* %21
%23 = call double @llvm.fmuladd.f64(double %19, double %22, double %16)
%24 = call double @sqrt(double %23)
ret double %24
}

LLVM IR (-O2):
define double @dv3_length(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %6)
%10 = tail call double @sqrt(double %9)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ ixmp_sub();
int /*<<< orphan*/ xmp_finalize();
int /*<<< orphan*/ xmp_init(int *, char ***);
int main(int argc, char **argv) {
  xmp_init(&argc, &argv);
  ixmp_sub();
  xmp_finalize();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <xmp_init@plt>
mov    $0x0,%al
call   1040 <ixmp_sub@plt>
mov    $0x0,%al
call   1030 <xmp_finalize@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %rsi,0x10(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1050 <xmp_init@plt>
xor    %eax,%eax
call   1040 <ixmp_sub@plt>
xor    %eax,%eax
call   1030 <xmp_finalize@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @xmp_init(i32* %4, i8*** %5)
%7 = call i32 (...) @ixmp_sub()
%8 = call i32 (...) @xmp_finalize()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @xmp_init(i32* %3, i8*** %4)
%6 = call i32 (...) @ixmp_sub()
%7 = call i32 (...) @xmp_finalize()
ret i32 0
}
void evloop_do_on_socket_create(struct st_h2o_evloop_socket_t *sock) {}


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

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

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

LLVM IR (-O2):
%struct.st_h2o_evloop_socket_t = type opaque
define void @evloop_do_on_socket_create(%struct.st_h2o_evloop_socket_t* nocapture %0) {
ret void
}
/* Variables and functions */
int pow(double, int);
float get_humidity(unsigned char seis_h, unsigned char ocho_h) {
  unsigned int result = ((seis_h << 26) >> 18) + ocho_h;
  float val = result / (pow(2.0, 14) - 2) * 100;
  return val;
}


x86 assembly (clang, -O0):
<get_humidity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x1a,%eax
sar    $0x12,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
movsd  0xebb(%rip),%xmm0
mov    $0xe,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    $0xfffffffe,%ecx
xor    %edx,%edx
div    %ecx
imul   $0x64,%eax,%eax
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_humidity>:
push   %rbx
shl    $0x1a,%edi
sar    $0x12,%edi
lea    (%rdi,%rsi,1),%ebx
movsd  0xede(%rip),%xmm0
mov    $0xe,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
add    $0xfffffffe,%ecx
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
imul   $0x64,%eax,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define float @get_humidity(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca float
store i8 %0, i8* %3
store i8 %1, i8* %4
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 26
%10 = ashr i32 %9, 18
%11 = load i8, i8* %4
%12 = zext i8 %11 to i32
%13 = add nsw i32 %10, %12
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = call i32 @pow(double 2.000000e+00, i32 14)
%16 = sub nsw i32 %15, 2
%17 = udiv i32 %14, %16
%18 = mul i32 %17, 100
%19 = uitofp i32 %18 to float
store float %19, float* %6
%20 = load float, float* %6
ret float %20
}

LLVM IR (-O2):
define float @get_humidity(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl i32 %3, 26
%5 = ashr exact i32 %4, 18
%6 = zext i8 %1 to i32
%7 = or i32 %5, %6
%8 = tail call i32 @pow(double 2.000000e+00, i32 14)
%9 = add nsw i32 %8, -2
%10 = udiv i32 %7, %9
%11 = mul i32 %10, 100
%12 = uitofp i32 %11 to float
ret float %12
}
/* Variables and functions */
int FN();
int main() {
  int x = 3 + FN() + FN();
  x = 3 + FN() + FN();
  FN();
  return 3 + FN() + FN();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <FN@plt>
add    $0x3,%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <FN@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <FN@plt>
add    $0x3,%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <FN@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <FN@plt>
mov    $0x0,%al
call   1030 <FN@plt>
add    $0x3,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <FN@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @FN()
%4 = add nsw i32 3, %3
%5 = call i32 (...) @FN()
%6 = add nsw i32 %4, %5
store i32 %6, i32* %2
%7 = call i32 (...) @FN()
%8 = add nsw i32 3, %7
%9 = call i32 (...) @FN()
%10 = add nsw i32 %8, %9
store i32 %10, i32* %2
%11 = call i32 (...) @FN()
%12 = call i32 (...) @FN()
%13 = add nsw i32 3, %12
%14 = call i32 (...) @FN()
%15 = add nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @FN()
%2 = tail call i32 (...) @FN()
%3 = tail call i32 (...) @FN()
%4 = tail call i32 (...) @FN()
%5 = tail call i32 (...) @FN()
%6 = tail call i32 (...) @FN()
%7 = add nsw i32 %6, 3
%8 = tail call i32 (...) @FN()
%9 = add nsw i32 %7, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, int);
void exitfunc13(int status, void *arg) {
  printf("Executing exitfunc13 (status=%d, arg=%d)\n", status, (int)arg);
  exit((int)arg);
}


x86 assembly (clang, -O0):
<exitfunc13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc13>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Executing exitfunc13 (status=%d, arg=%d)\0A\00"
define void @exitfunc13(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 = ptrtoint i8* %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i32
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"Executing exitfunc13 (status=%d, arg=%d)\0A\00"
define void @exitfunc13(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %4)
%6 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
void appStr(char arr[]) {
  char app[100 + 20] = "My sentence is: \0";
  strcat(app, arr);
  printf("Appended ==>  %s", app);
}


x86 assembly (clang, -O0):
<appStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x80(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x78,%edx
call   1040 <memcpy@plt>
lea    -0x80(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x80(%rbp),%rsi
lea    0xf0c(%rip),%rdi
call   1030 <printf@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appStr>:
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rsi
movaps 0xf2e(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xf12(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xef6(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeda(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xebe(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xea2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe86(%rip),%xmm0
movaps %xmm0,(%rsp)
movq   $0x0,0x70(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strcat@plt>
lea    0xedf(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.appStr.app = [120 x i8] c"My sentence is: \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [17 x i8] c"Appended ==> %s\00"
define void @appStr(i8* %0) {
%2 = alloca i8*
%3 = alloca [120 x i8]
store i8* %0, i8** %2
%4 = bitcast [120 x i8]* %3 to i8*
%5 = getelementptr inbounds [120 x i8], [120 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @strcat(i8* %5, i8* %6)
%8 = getelementptr inbounds [120 x i8], [120 x i8]* %3, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@__const.appStr.app = [120 x i8] c"My sentence is: \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [17 x i8] c"Appended ==> %s\00"
define void @appStr(i8* %0) {
%2 = alloca [120 x i8]
%3 = getelementptr inbounds [120 x i8], [120 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcat(i8* %3, i8* %0)
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ syslog(int, int /*<<< orphan*/, int);
void console_level(int level) { syslog(8, 0, level); }


x86 assembly (clang, -O0):
<console_level>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x8,%edi
xor    %esi,%esi
call   1030 <syslog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_level>:
mov    %edi,%edx
mov    $0x8,%edi
xor    %esi,%esi
jmp    1030 <syslog@plt>

LLVM IR (-O0):
define void @console_level(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @syslog(i32 8, i32 0, i32 %3)
ret void
}

LLVM IR (-O2):
define void @console_level(i32 %0) {
%2 = tail call i32 @syslog(i32 8, i32 0, i32 %0)
ret void
}
int f1(__attribute__((vector_size(16))) int t) { return ((int *)&t)[1]; }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
movdqa %xmm0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
pshufd $0x55,%xmm0,%xmm0
movd   %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @f1(<4 x i32> %0) {
%2 = alloca <4 x i32>
store <4 x i32> %0, <4 x i32>* %2
%3 = bitcast <4 x i32>* %2 to i32*
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @f1(<4 x i32> %0) {
%2 = extractelement <4 x i32> %0, i64 1
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t EMACFrameFilterGet(uint32_t ui32Base) {
  return ((*((volatile uint32_t *)(ui32Base + 0x00000004))) &
          (0x80000000 | 0x00010000 | 0x00000400 | 0x00000200 | 0x00000100 |
           (0x01 << 6) | (0x02 << 6) | (0x03 << 6) | 0x00000020 | 0x00000010 |
           0x00000008 | 0x00000004 | 0x00000002 | 0x00000001));
}


x86 assembly (clang, -O0):
<EMACFrameFilterGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4,%eax
cltq
mov    (%rax),%eax
and    $0x800107ff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACFrameFilterGet>:
movslq %edi,%rcx
mov    $0x800107ff,%eax
and    0x4(%rcx),%eax
ret

LLVM IR (-O0):
define i32 @EMACFrameFilterGet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 4
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -2147416065
ret i32 %8
}

LLVM IR (-O2):
define i32 @EMACFrameFilterGet(i32 %0) {
%2 = add nsw i32 %0, 4
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, -2147416065
ret i32 %6
}
int f_bgt_rm2(float a1, float *a2) { return !(__builtin_isgreater(a1, *a2)); }


x86 assembly (clang, -O0):
<f_bgt_rm2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x10(%rbp),%rax
ucomiss (%rax),%xmm0
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_bgt_rm2>:
xor    %eax,%eax
ucomiss (%rdi),%xmm0
setbe  %al
ret

LLVM IR (-O0):
define i32 @f_bgt_rm2(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 = load float, float* %6
%8 = fcmp ogt float %5, %7
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @f_bgt_rm2(float %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = fcmp uge float %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printChar(char);
int /*<<< orphan*/ str_arr2(char *, int);
void str_arr(char str[], int len) {
  int i;
  for (i = 0; i < len; i++) {
    printChar(str[i]);
    printChar(' ');
  }
  str_arr2(str, len);
}


x86 assembly (clang, -O0):
<str_arr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    116b <str_arr+0x4b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <printChar@plt>
mov    $0x20,%edi
call   1040 <printChar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <str_arr+0x16>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <str_arr2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_arr>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%r15
test   %esi,%esi
jle    115d <str_arr+0x3d>
mov    %r14d,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1040 <printChar@plt>
mov    $0x20,%edi
call   1040 <printChar@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1140 <str_arr+0x20>
mov    %r15,%rdi
mov    %r14d,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <str_arr2@plt>

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

LLVM IR (-O2):
define void @str_arr(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @printChar(i8 signext %9)
%11 = tail call i32 @printChar(i8 signext 32)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = tail call i32 @str_arr2(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TOSH_CLR_HUM_SCL_PIN();
void HUMIDITY_CLEAR_CLOCK() { TOSH_CLR_HUM_SCL_PIN(); }


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

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

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

LLVM IR (-O2):
define void @HUMIDITY_CLEAR_CLOCK() {
%1 = tail call i32 (...) @TOSH_CLR_HUM_SCL_PIN()
ret void
}
/* Type definitions */
typedef int (*addition_func)(int, int);

/* Variables and functions */
int add(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("add(3,4) %d\n", add(3, 4));
  typedef int (*addition_func)(int, int);
  addition_func plus = add;
  printf("plus(3,4) %d\n", plus(3, 4));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <add@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    $0x3,%edi
mov    $0x4,%esi
call   *-0x10(%rbp)
mov    %eax,%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x4,%esi
call   1030 <add@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   1030 <add@plt>
lea    0xeb9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"add(3,4) %d\0A\00"
@.str.1 = [14 x i8] c"plus(3,4) %d\0A\00"
define i32 @main() {
%1 = tail call i32 @add(i32 3, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @add(i32 3, i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
int MAX(int a, int b) {
  if (a > b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<MAX>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <MAX+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <MAX+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAX>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @MAX(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %5
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @MAX(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *vestiario() { printf("oi\n\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"oi\0A\00"
define noalias i8* @vestiario() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ display_help_and_quit();
void got_help_flag(const char *arg, void *context) { display_help_and_quit(); }


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

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

LLVM IR (-O0):
define void @got_help_flag(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (...) @display_help_and_quit()
ret void
}

LLVM IR (-O2):
define void @got_help_flag(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @display_help_and_quit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ helper_double_27_recursive(double *, int);
void helper_double_27(double *buf) { helper_double_27_recursive(buf, 27); }


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

x86 assembly (clang, -O2):
<helper_double_27>:
mov    $0x1b,%esi
jmp    1030 <helper_double_27_recursive@plt>

LLVM IR (-O0):
define void @helper_double_27(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = call i32 @helper_double_27_recursive(double* %3, i32 27)
ret void
}

LLVM IR (-O2):
define void @helper_double_27(double* %0) {
%2 = tail call i32 @helper_double_27_recursive(double* %0, i32 27)
ret void
}
/* Variables and functions */
char *c_malloc(int);
int /*<<< orphan*/ init(char *);
int main() {
  char *p;
  init(p);
  p = c_malloc(42);
  p[0] = '\n';
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x8(%rbp),%rdi
call   1040 <init@plt>
mov    $0x2a,%edi
call   1030 <c_malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0xa,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <init@plt>
mov    $0x2a,%edi
call   1030 <c_malloc@plt>
movb   $0xa,(%rax)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i8*
%2 = load i8*, i8** %1
%3 = call i32 @init(i8* %2)
%4 = call i8* @c_malloc(i32 42)
store i8* %4, i8** %1
%5 = load i8*, i8** %1
%6 = getelementptr inbounds i8, i8* %5, i64 0
store i8 10, i8* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @init(i8* undef)
%2 = tail call i8* @c_malloc(i32 42)
store i8 10, i8* %2
ret i32 0
}
int config_READER_SECA(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_READER_SECA() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
void QEIIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000020))) |= ui32IntFlags;
}


x86 assembly (clang, -O0):
<QEIIntEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rcx
or     %rdx,%rcx
mov    %rcx,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<QEIIntEnable>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    -0x10(%rsp),%rax
mov    -0x8(%rsp),%rcx
or     %rax,0x20(%rcx)
ret

LLVM IR (-O0):
define void @QEIIntEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* %3
%7 = add nsw i64 %6, 32
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = or i64 %9, %5
store volatile i64 %10, i64* %8
ret void
}

LLVM IR (-O2):
define void @QEIIntEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* %3
%7 = add nsw i64 %6, 32
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = or i64 %9, %5
store volatile i64 %10, i64* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ spc_command(int, int /*<<< orphan*/);
void music_stop(void) { (spc_command(0x2000, 0)); }


x86 assembly (clang, -O0):
<music_stop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2000,%edi
xor    %esi,%esi
call   1030 <spc_command@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<music_stop>:
mov    $0x2000,%edi
xor    %esi,%esi
jmp    1030 <spc_command@plt>

LLVM IR (-O0):
define void @music_stop() {
%1 = call i32 @spc_command(i32 8192, i32 0)
ret void
}

LLVM IR (-O2):
define void @music_stop() {
%1 = tail call i32 @spc_command(i32 8192, i32 0)
ret void
}
/* Variables and functions */
int main_nested();
int main() { return main_nested(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @main_nested()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ atomic_decrement(unsigned int volatile *);
void atomic_dec_uint(volatile unsigned int *target) {
  atomic_decrement(target);
}


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

x86 assembly (clang, -O2):
<atomic_dec_uint>:
jmp    1030 <atomic_decrement@plt>

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

LLVM IR (-O2):
define void @atomic_dec_uint(i32* %0) {
%2 = tail call i32 @atomic_decrement(i32* %0)
ret void
}
int qsort_cmp_AHEAP_ID(const void *x, const void *y) {
  if (*((int *)x) < *((int *)y))
    return (-1);
  else
    return (*((int *)x) > *((int *)y));
}


x86 assembly (clang, -O0):
<qsort_cmp_AHEAP_ID>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    112a <qsort_cmp_AHEAP_ID+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1141 <qsort_cmp_AHEAP_ID+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort_cmp_AHEAP_ID>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @qsort_cmp_AHEAP_ID(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int ARGUMENT_SPLITER(int, char **);
int main(int argc, char *argv[]) { return ARGUMENT_SPLITER(argc, argv); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <ARGUMENT_SPLITER@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <ARGUMENT_SPLITER@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @ARGUMENT_SPLITER(i32 %0, i8** %1)
ret i32 %3
}
__typeof__(strcmp(1, 1)) test_strcmp_181(void) { return strcmp(1, 1); }


x86 assembly (clang, -O0):
<test_strcmp_181>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%esi
mov    %rsi,%rdi
call   1030 <strcmp@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_strcmp_181() {
%1 = call i32 @strcmp(i8* inttoptr (i64 1 to i8*), i8* inttoptr (i64 1 to i8*))
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_strcmp_181() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ context_error_1(int *, float **);
void test_context_error_1() {
  int x;
  float *error;
  context_error_1(&x, &error);
}


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

x86 assembly (clang, -O2):
<test_context_error_1>:
sub    $0x18,%rsp
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <context_error_1@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @test_context_error_1() {
%1 = alloca i32
%2 = alloca float*
%3 = call i32 @context_error_1(i32* %1, float** %2)
ret void
}

LLVM IR (-O2):
define void @test_context_error_1() {
%1 = alloca i32
%2 = alloca float*
%3 = bitcast i32* %1 to i8*
%4 = bitcast float** %2 to i8*
%5 = call i32 @context_error_1(i32* %1, float** %2)
ret void
}
/* Variables and functions */
double quaglo_(double *, double *);
double cquaglo(double *f, double *para) { return quaglo_(f, para); }


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

x86 assembly (clang, -O2):
<cquaglo>:
jmp    1030 <quaglo_@plt>

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

LLVM IR (-O2):
define double @cquaglo(double* %0, double* %1) {
%3 = tail call double @quaglo_(double* %0, double* %1)
ret double %3
}
const char *dln_strerror() {}


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

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

LLVM IR (-O0):
define i8* @dln_strerror() {
%1 = alloca i8*
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
define noalias i8* @dln_strerror() {
ret i8* undef
}
int lingot_signal_compare_int(const void *a, const void *b) {
  return (*((const int *)a) < *((const int *)b)) ? -1 : 1;
}


x86 assembly (clang, -O0):
<lingot_signal_compare_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lingot_signal_compare_int>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setge  %cl
lea    (%rcx,%rcx,1),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @lingot_signal_compare_int(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = icmp slt i32 %7, %10
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 -1, i32 1
ret i32 %13
}

LLVM IR (-O2):
define i32 @lingot_signal_compare_int(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = select i1 %7, i32 -1, i32 1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ remove(char *);
int DoDeleteFile(char *filename) { return !remove(filename); }


x86 assembly (clang, -O0):
<DoDeleteFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <remove@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoDeleteFile>:
push   %rax
call   1030 <remove@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @DoDeleteFile(i8* nocapture %0) {
%2 = tail call i32 @remove(i8* %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void kbase_as_fault_debugfs_new(struct kbase_device *kbdev, int as_no) {
  return;
}


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

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

LLVM IR (-O0):
%struct.kbase_device = type opaque
define void @kbase_as_fault_debugfs_new(%struct.kbase_device* %0, i32 %1) {
%3 = alloca %struct.kbase_device*
%4 = alloca i32
store %struct.kbase_device* %0, %struct.kbase_device** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.kbase_device = type opaque
define void @kbase_as_fault_debugfs_new(%struct.kbase_device* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
scalar_t__ check_for_size(int, int);
scalar_t__ check_for_suitable_knife(int, int);
int check_arguments(int watermelon, int knife) {
  if (check_for_size(watermelon, knife) != 0)
    return -1;
  if (check_for_suitable_knife(watermelon, knife) != 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<check_arguments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <check_for_size@plt>
cmp    $0x0,%rax
je     114f <check_arguments+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <check_arguments+0x57>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <check_for_suitable_knife@plt>
cmp    $0x0,%rax
je     1170 <check_arguments+0x50>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <check_arguments+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_arguments>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <check_for_size@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jne    1147 <check_arguments+0x27>
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <check_for_suitable_knife@plt>
neg    %rax
sbb    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @check_arguments(i32 %0, i32 %1) {
%3 = tail call i64 @check_for_size(i32 %0, i32 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @check_for_suitable_knife(i32 %0, i32 %1)
%7 = icmp ne i64 %6, 0
%8 = sext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ -1, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void copyMessage(char *start, int length, char *message) {
  strncpy(message, start, length);
}


x86 assembly (clang, -O0):
<copyMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copyMessage>:
mov    %rdx,%rax
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rax,%rdi
jmp    1030 <strncpy@plt>

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

LLVM IR (-O2):
define void @copyMessage(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @strncpy(i8* %2, i8* %0, i32 %1)
ret void
}
int revoke(line)
char *line;
{ return 0; }


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

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

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

LLVM IR (-O2):
define i32 @revoke(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ c2_pulse();
int /*<<< orphan*/ c2_send(int, int);
int /*<<< orphan*/ gpio_input(int, int);
int /*<<< orphan*/ gpio_output(int, int);
void c2_addr_write(uint8_t addr) {
  c2_pulse();
  gpio_output(4, 13);
  c2_send(3, 2);
  c2_send(addr, 8);
  gpio_input(4, 13);
  c2_pulse();
}


x86 assembly (clang, -O0):
<c2_addr_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <c2_pulse@plt>
mov    $0x4,%edi
mov    $0xd,%esi
call   1050 <gpio_output@plt>
mov    $0x3,%edi
mov    $0x2,%esi
call   1060 <c2_send@plt>
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1060 <c2_send@plt>
mov    $0x4,%edi
mov    $0xd,%esi
call   1040 <gpio_input@plt>
mov    $0x0,%al
call   1030 <c2_pulse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c2_addr_write>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <c2_pulse@plt>
mov    $0x4,%edi
mov    $0xd,%esi
call   1050 <gpio_output@plt>
mov    $0x3,%edi
mov    $0x2,%esi
call   1060 <c2_send@plt>
mov    %ebx,%edi
mov    $0x8,%esi
call   1060 <c2_send@plt>
mov    $0x4,%edi
mov    $0xd,%esi
call   1040 <gpio_input@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <c2_pulse@plt>

LLVM IR (-O0):
define void @c2_addr_write(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @c2_pulse()
%4 = call i32 @gpio_output(i32 4, i32 13)
%5 = call i32 @c2_send(i32 3, i32 2)
%6 = load i32, i32* %2
%7 = call i32 @c2_send(i32 %6, i32 8)
%8 = call i32 @gpio_input(i32 4, i32 13)
%9 = call i32 (...) @c2_pulse()
ret void
}

LLVM IR (-O2):
define void @c2_addr_write(i32 %0) {
%2 = tail call i32 (...) @c2_pulse()
%3 = tail call i32 @gpio_output(i32 4, i32 13)
%4 = tail call i32 @c2_send(i32 3, i32 2)
%5 = tail call i32 @c2_send(i32 %0, i32 8)
%6 = tail call i32 @gpio_input(i32 4, i32 13)
%7 = tail call i32 (...) @c2_pulse()
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int get_degree(uint64_t x) {
  int result = -1;
  while (x != 0) {
    x >>= 1;
    result++;
  }
  return result;
}


x86 assembly (clang, -O0):
<get_degree>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <get_degree+0x2f>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <get_degree+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_degree>:
mov    $0xffffffff,%eax
test   %edi,%edi
je     111c <get_degree+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <get_degree+0x10>
ret

LLVM IR (-O0):
define i32 @get_degree(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %2
%9 = ashr i32 %8, 1
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @get_degree(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ -1, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nsw i32 %4, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ -1, %1 ], [ %7, %3 ]
ret i32 %10
}
int main() {
  double arr[1];
  arr[0] = 1;
  return (int)arr[0];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movsd  0xeed(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1 x double]
store i32 0, i32* %1
%3 = getelementptr inbounds [1 x double], [1 x double]* %2, i64 0, i64 0
store double 1.000000e+00, double* %3
%4 = getelementptr inbounds [1 x double], [1 x double]* %2, i64 0, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
int main() {
  int i, j, k, l;
  {
    {
      i = 1;
      j = 2;
      k = 3;
    }
    { ++i; }
  }
  ++k;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

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