xunge/DecIR huggingface dataset:
int sfun_rtwmakecfg_module_03(int i) { return i + 3; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gdk_display_put_event() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double Resta(double a, double b) {
  printf("Enter a number: ");
  scanf("%lf", &a);
  printf("Enter a number: ");
  scanf("%lf", &b);
  return (a - b);
}


x86 assembly (clang, -O0):
<Resta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Resta>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
lea    0xec6(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xec8(%rip),%r14
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @Resta(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%7 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%9 = load double, double* %3
%10 = load double, double* %4
%11 = fsub double %9, %10
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sum1(int *, int);
int /*<<< orphan*/ sum2(int *, int);
int sum3(int *, int);
int main(int argc, char **argv) {
  int arr[5] = {1, 0, 3, 8, 5};
  sum1(arr, 5);
  sum2(arr, 5);
  printf("Final summation == %d\n", sum3(arr, 5));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xea7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xea5(%rip),%eax
mov    %eax,-0x20(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1040 <sum1@plt>
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1060 <sum2@plt>
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1050 <sum3@plt>
mov    %eax,%esi
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xec5(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeaa(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <sum1@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1060 <sum2@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1050 <sum3@plt>
lea    0xe89(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [5 x i32] [i32 1, i32 0, i32 3, i32 8, i32 5]
@.str = [23 x i8] c"Final summation == %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [5 x i32]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = bitcast [5 x i32]* %5 to i8*
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%8 = call i32 @sum1(i32* %7, i32 5)
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%10 = call i32 @sum2(i32* %9, i32 5)
%11 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%12 = call i32 @sum3(i32* %11, i32 5)
%13 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [5 x i32] [i32 1, i32 0, i32 3, i32 8, i32 5]
@.str = [23 x i8] c"Final summation == %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i32]
%4 = bitcast [5 x i32]* %3 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%6 = call i32 @sum1(i32* %5, i32 5)
%7 = call i32 @sum2(i32* %5, i32 5)
%8 = call i32 @sum3(i32* %5, i32 5)
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ states;

/* Variables and functions */
int MAX(int, int);
unsigned int *get_tea_state(unsigned int *const states, int threadnum) {
  return states +
         threadnum * (MAX(64, 2 * sizeof(unsigned int))) / sizeof(states[0]);
}


x86 assembly (clang, -O0):
<get_tea_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x40,%edi
mov    $0x8,%esi
call   1030 <MAX@plt>
mov    -0x1c(%rbp),%ecx
mov    %eax,%edx
mov    -0x18(%rbp),%rax
imul   %edx,%ecx
movslq %ecx,%rcx
shr    $0x2,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tea_state>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    $0x40,%edi
mov    $0x8,%esi
call   1030 <MAX@plt>
imul   %ebx,%eax
cltq
and    $0xfffffffffffffffc,%rax
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @get_tea_state(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = call i32 @MAX(i32 64, i32 8)
%8 = mul nsw i32 %6, %7
%9 = sext i32 %8 to i64
%10 = udiv i64 %9, 4
%11 = getelementptr inbounds i32, i32* %5, i64 %10
ret i32* %11
}

LLVM IR (-O2):
define i32* @get_tea_state(i32* readnone %0, i32 %1) {
%3 = tail call i32 @MAX(i32 64, i32 8)
%4 = mul nsw i32 %3, %1
%5 = sext i32 %4 to i64
%6 = lshr i64 %5, 2
%7 = getelementptr inbounds i32, i32* %0, i64 %6
ret i32* %7
}
int isNumeric(char c) { return ('0' <= c && c <= '9'); }


x86 assembly (clang, -O0):
<isNumeric>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
jg     112d <isNumeric+0x2d>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNumeric>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isNumeric(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 48, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isNumeric(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
int cairo_code_draw_cheapDial_get_width() { return 99; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_cheapDial_get_width() {
ret i32 99
}

LLVM IR (-O2):
define i32 @cairo_code_draw_cheapDial_get_width() {
ret i32 99
}
/* Variables and functions */
unsigned char glk_char_to_lower(unsigned char);
int __wrap_tolower(int ch) {
  unsigned char lch;
  lch = glk_char_to_lower((unsigned char)ch);
  return (int)lch;
}


x86 assembly (clang, -O0):
<__wrap_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movzbl %al,%edi
call   1030 <glk_char_to_lower@plt>
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap_tolower>:
push   %rax
movzbl %dil,%edi
call   1030 <glk_char_to_lower@plt>
movzbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__wrap_tolower(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
%6 = call zeroext i8 @glk_char_to_lower(i8 zeroext %5)
store i8 %6, i8* %3
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @__wrap_tolower(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call zeroext i8 @glk_char_to_lower(i8 zeroext %2)
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
double pow(double, double);
double srgb_to_linear(double v_srgb) {
  if (v_srgb <= 0.04045) {
    return v_srgb / 12.92;
  } else {
    return pow((v_srgb + 0.055) / (1.055), 2.4);
  }
}


x86 assembly (clang, -O0):
<srgb_to_linear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     114b <srgb_to_linear+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  0xee3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1176 <srgb_to_linear+0x66>
movsd  0xec5(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe9c(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<srgb_to_linear>:
movsd  0xee8(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    113b <srgb_to_linear+0x2b>
addsd  0xeea(%rip),%xmm0
divsd  0xeea(%rip),%xmm0
movsd  0xeea(%rip),%xmm1
jmp    1030 <pow@plt>
divsd  0xec5(%rip),%xmm0
ret

LLVM IR (-O0):
define double @srgb_to_linear(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ole double %4, 4.045000e-02
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fdiv double %7, 1.292000e+01
store double %8, double* %2
br label %14
9: ; preds = %1
%10 = load double, double* %3
%11 = fadd double %10, 5.500000e-02
%12 = fdiv double %11, 1.055000e+00
%13 = call double @pow(double %12, double 2.400000e+00)
store double %13, double* %2
br label %14
14: ; preds = %9, %6
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @srgb_to_linear(double %0) {
%2 = fcmp ugt double %0, 4.045000e-02
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = fdiv double %0, 1.292000e+01
br label %9
5: ; preds = %1
%6 = fadd double %0, 5.500000e-02
%7 = fdiv double %6, 1.055000e+00
%8 = tail call double @pow(double %7, double 2.400000e+00)
br label %9
9: ; preds = %5, %3
%10 = phi double [ %4, %3 ], [ %8, %5 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printd(int);
int main() {
  printd(123);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7b,%edi
call   1030 <printd@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @printd(i32 123)
ret i32 0
}
/* Variables and functions */
double __ocml_erfinv_f64(double);
double erfinv(double x) { return __ocml_erfinv_f64(x); }


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

x86 assembly (clang, -O2):
<erfinv>:
jmp    1030 <__ocml_erfinv_f64@plt>

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

LLVM IR (-O2):
define double @erfinv(double %0) {
%2 = tail call double @__ocml_erfinv_f64(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ matNf_mult_matNf_new(float *, float const *, float const *,
                                        int);
void mat3f_mult_mat3f_new(float result[9], const float matA[9],
                          const float matB[9]) {
  matNf_mult_matNf_new(result, matA, matB, 3);
}


x86 assembly (clang, -O0):
<mat3f_mult_mat3f_new>:
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
mov    $0x3,%ecx
call   1030 <matNf_mult_matNf_new@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat3f_mult_mat3f_new>:
mov    $0x3,%ecx
jmp    1030 <matNf_mult_matNf_new@plt>

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

LLVM IR (-O2):
define void @mat3f_mult_mat3f_new(float* %0, float* %1, float* %2) {
%4 = tail call i32 @matNf_mult_matNf_new(float* %0, float* %1, float* %2, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
char *strncat(char *, char const *, size_t);
char *qtstrncpy(char *dst, const char *src, size_t n) {
  assert(dst != NULL);
  assert(src != NULL);
  dst[0] = '\0';
  return strncat(dst, src, n);
}


x86 assembly (clang, -O0):
<qtstrncpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qtstrncpy>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
test   %r15,%r15
setne  %dil
call   1040 <assert@plt>
movb   $0x0,(%rbx)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <strncat@plt>

LLVM IR (-O0):
define i8* @qtstrncpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i8*, i8** %5
%12 = icmp ne i8* %11, null
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 0
store i8 0, i8* %16
%17 = load i8*, i8** %4
%18 = load i8*, i8** %5
%19 = load i64, i64* %6
%20 = call i8* @strncat(i8* %17, i8* %18, i64 %19)
ret i8* %20
}

LLVM IR (-O2):
define i8* @qtstrncpy(i8* returned %0, i8* %1, i64 %2) {
%4 = icmp ne i8* %0, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = icmp ne i8* %1, null
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
store i8 0, i8* %0
%10 = tail call i8* @strncat(i8* %0, i8* %1, i64 %2)
ret i8* %0
}
/* Variables and functions */
int random_linux_libc(int);
unsigned int get_random_number(int nr, int max) {
  return (max > 0 ? random_linux_libc(nr) % max : 0);
}


x86 assembly (clang, -O0):
<get_random_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    113c <get_random_number+0x2c>
mov    -0x4(%rbp),%edi
call   1030 <random_linux_libc@plt>
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
jmp    1146 <get_random_number+0x36>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <get_random_number+0x36>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_random_number>:
test   %esi,%esi
jle    1123 <get_random_number+0x13>
push   %rbx
mov    %esi,%ebx
call   1030 <random_linux_libc@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @get_random_number(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @random_linux_libc(i32 %0)
%6 = srem i32 %5, %1
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ %6, %4 ], [ 0, %2 ]
ret i32 %8
}
/* Variables and functions */
bool nrf52_errata_43(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_43() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ doBlock(char);
int /*<<< orphan*/ epilog(char);
char getName();
int /*<<< orphan*/ match(char);
int /*<<< orphan*/ prolog(char);
void prog() {
  char name;
  match('p');
  name = getName();
  prolog(name);
  doBlock(name);
  match('.');
  epilog(name);
}


x86 assembly (clang, -O0):
<prog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x70,%edi
call   1040 <match@plt>
mov    $0x0,%al
call   1050 <getName@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <prolog@plt>
movsbl -0x1(%rbp),%edi
call   1060 <doBlock@plt>
mov    $0x2e,%edi
call   1040 <match@plt>
movsbl -0x1(%rbp),%edi
call   1070 <epilog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prog>:
push   %rbx
mov    $0x70,%edi
call   1040 <match@plt>
xor    %eax,%eax
call   1050 <getName@plt>
movsbl %al,%ebx
mov    %ebx,%edi
call   1030 <prolog@plt>
mov    %ebx,%edi
call   1060 <doBlock@plt>
mov    $0x2e,%edi
call   1040 <match@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1070 <epilog@plt>

LLVM IR (-O0):
define void @prog() {
%1 = alloca i8
%2 = call i32 @match(i8 signext 112)
%3 = call signext i8 (...) @getName()
store i8 %3, i8* %1
%4 = load i8, i8* %1
%5 = call i32 @prolog(i8 signext %4)
%6 = load i8, i8* %1
%7 = call i32 @doBlock(i8 signext %6)
%8 = call i32 @match(i8 signext 46)
%9 = load i8, i8* %1
%10 = call i32 @epilog(i8 signext %9)
ret void
}

LLVM IR (-O2):
define void @prog() {
%1 = tail call i32 @match(i8 signext 112)
%2 = tail call signext i8 (...) @getName()
%3 = tail call i32 @prolog(i8 signext %2)
%4 = tail call i32 @doBlock(i8 signext %2)
%5 = tail call i32 @match(i8 signext 46)
%6 = tail call i32 @epilog(i8 signext %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RCT2_CALLPROC_EBPSAFE(int);
int /*<<< orphan*/ window_water_should_close();
void window_water_close() {
  if (!window_water_should_close())
    RCT2_CALLPROC_EBPSAFE(0x006EE281);
}


x86 assembly (clang, -O0):
<window_water_close>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <window_water_should_close@plt>
cmp    $0x0,%eax
jne    113e <window_water_close+0x1e>
mov    $0x6ee281,%edi
call   1040 <RCT2_CALLPROC_EBPSAFE@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<window_water_close>:
push   %rax
xor    %eax,%eax
call   1030 <window_water_should_close@plt>
test   %eax,%eax
je     112e <window_water_close+0xe>
pop    %rax
ret
mov    $0x6ee281,%edi
pop    %rax
jmp    1040 <RCT2_CALLPROC_EBPSAFE@plt>

LLVM IR (-O0):
define void @window_water_close() {
%1 = call i32 (...) @window_water_should_close()
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call i32 @RCT2_CALLPROC_EBPSAFE(i32 7266945)
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @window_water_close() {
%1 = tail call i32 (...) @window_water_should_close()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @RCT2_CALLPROC_EBPSAFE(i32 7266945)
br label %5
5: ; preds = %3, %0
ret void
}
char *fix_not_null(char *str) {
  if (str && *str != '\0') {
    *str = '\0';
    return str + 1;
  }
  return str;
}


x86 assembly (clang, -O0):
<fix_not_null>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113b <fix_not_null+0x3b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113b <fix_not_null+0x3b>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1143 <fix_not_null+0x43>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fix_not_null>:
test   %rdi,%rdi
je     1115 <fix_not_null+0x15>
mov    %rdi,%rax
cmpb   $0x0,(%rdi)
je     1114 <fix_not_null+0x14>
movb   $0x0,(%rax)
add    $0x1,%rax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @fix_not_null(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
store i8 0, i8* %0
%7 = getelementptr inbounds i8, i8* %0, i64 1
br label %8
8: ; preds = %1, %3, %6
%9 = phi i8* [ %7, %6 ], [ %0, %3 ], [ null, %1 ]
ret i8* %9
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
uint16_t transform_int_linear(uint16_t input, uint16_t in_min, uint16_t in_max,
                              uint16_t out_min, uint16_t out_max) {
  if (in_min == in_max) {
    return 0;
  }
  return (uint16_t)((((uint32_t)(out_max - out_min) * (input - in_min)) /
                     (in_max - in_min)) +
                    out_min);
}


x86 assembly (clang, -O0):
<transform_int_linear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jne    1133 <transform_int_linear+0x33>
movq   $0x0,-0x8(%rbp)
jmp    115c <transform_int_linear+0x5c>
mov    -0x30(%rbp),%rax
sub    -0x28(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    -0x18(%rbp),%rcx
imul   %rcx,%rax
mov    -0x20(%rbp),%rcx
sub    -0x18(%rbp),%rcx
cqto
idiv   %rcx
add    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<transform_int_linear>:
mov    %rdx,%r9
sub    %rsi,%r9
jne    110b <transform_int_linear+0xb>
xor    %eax,%eax
ret
sub    %rcx,%r8
sub    %rsi,%rdi
imul   %r8,%rdi
mov    %rdi,%rax
or     %r9,%rax
shr    $0x20,%rax
je     112d <transform_int_linear+0x2d>
mov    %rdi,%rax
cqto
idiv   %r9
add    %rcx,%rax
ret
mov    %edi,%eax
xor    %edx,%edx
div    %r9d
add    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @transform_int_linear(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = icmp eq i64 %2, %1
br i1 %6, label %14, label %7
7: ; preds = %5
%8 = sub nsw i64 %4, %3
%9 = sub nsw i64 %0, %1
%10 = mul nsw i64 %8, %9
%11 = sub nsw i64 %2, %1
%12 = sdiv i64 %10, %11
%13 = add nsw i64 %12, %3
br label %14
14: ; preds = %5, %7
%15 = phi i64 [ %13, %7 ], [ 0, %5 ]
ret i64 %15
}
void bar_double(void) { foo_double(2.0 - 2.5i); }


x86 assembly (clang, -O0):
<bar_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mov    $0x2,%al
call   1030 <foo_double@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar_double>:
movsd  0xee8(%rip),%xmm0
movsd  0xee8(%rip),%xmm1
mov    $0x2,%al
jmp    1030 <foo_double@plt>

LLVM IR (-O0):
define void @bar_double() {
%1 = alloca { double, double }
%2 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 0
%3 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 1
store double 2.000000e+00, double* %2
store double -2.500000e+00, double* %3
%4 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 1
%7 = load double, double* %6
%8 = call i32 (double, double, ...) bitcast (i32 (...)* @foo_double to i32 (double, double, ...)*)(double %5, double %7)
ret void
}

LLVM IR (-O2):
define void @bar_double() {
%1 = tail call i32 (double, double, ...) bitcast (i32 (...)* @foo_double to i32 (double, double, ...)*)(double 2.000000e+00, double -2.500000e+00)
ret void
}
/* Variables and functions */
__attribute__((always_)) bool IsEndOfLine(char C) {
  bool Result = ((C == '\n') || (C == '\r'));
  return Result;
}


x86 assembly (clang, -O0):
<IsEndOfLine>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x9(%rbp)
je     1129 <IsEndOfLine+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsEndOfLine>:
cmp    $0xa,%dil
sete   %al
cmp    $0xd,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @IsEndOfLine(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 10
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 13
br label %11
11: ; preds = %7, %1
%12 = phi i1 [ true, %1 ], [ %10, %7 ]
%13 = zext i1 %12 to i32
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @IsEndOfLine(i8 signext %0) {
%2 = icmp eq i8 %0, 10
%3 = icmp eq i8 %0, 13
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct ascii85 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ascii85_encode(struct ascii85 *, unsigned char);
void _ascii85_write_tile(struct ascii85 *ascii85_p, unsigned char tile_index,
                         unsigned char tile_area) {
  ascii85_encode(ascii85_p, (unsigned char)tile_index);
  ascii85_encode(ascii85_p, tile_area);
}


x86 assembly (clang, -O0):
<_ascii85_write_tile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%esi
call   1030 <ascii85_encode@plt>
mov    -0x8(%rbp),%rdi
movzbl -0xa(%rbp),%esi
call   1030 <ascii85_encode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ascii85_write_tile>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <ascii85_encode@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ascii85_encode@plt>

LLVM IR (-O0):
%struct.ascii85 = type { i32 }
define void @_ascii85_write_tile(%struct.ascii85* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca %struct.ascii85*
%5 = alloca i8
%6 = alloca i8
store %struct.ascii85* %0, %struct.ascii85** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load %struct.ascii85*, %struct.ascii85** %4
%8 = load i8, i8* %5
%9 = call i32 @ascii85_encode(%struct.ascii85* %7, i8 zeroext %8)
%10 = load %struct.ascii85*, %struct.ascii85** %4
%11 = load i8, i8* %6
%12 = call i32 @ascii85_encode(%struct.ascii85* %10, i8 zeroext %11)
ret void
}

LLVM IR (-O2):
%struct.ascii85 = type { i32 }
define void @_ascii85_write_tile(%struct.ascii85* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call i32 @ascii85_encode(%struct.ascii85* %0, i8 zeroext %1)
%5 = tail call i32 @ascii85_encode(%struct.ascii85* %0, i8 zeroext %2)
ret void
}
void outl(unsigned int value, int port) {
  __asm__ __volatile__("out"
                       "l"
                       " %"
                       ""
                       "0, %w1"
                       :
                       : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
out    %eax,(%dx)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @outl(i32 %0, i32 %1) {
tail call void asm sideeffect "outl $0, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ __nesf2(float, float);
int _COM_CMPNEf(float a, float b) { return __nesf2(a, b) != 0; }


x86 assembly (clang, -O0):
<_COM_CMPNEf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__nesf2@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_COM_CMPNEf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call i64 @__nesf2(float %5, float %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @_COM_CMPNEf(float %0, float %1) {
%3 = tail call i64 @__nesf2(float %0, float %1)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void GB_LAND_f_FP32(float *z, const float *x, const float *y) {
  (*z) = (((*x) != 0) && ((*y) != 0));
}


x86 assembly (clang, -O0):
<GB_LAND_f_FP32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jne    1134 <GB_LAND_f_FP32+0x34>
jp     1134 <GB_LAND_f_FP32+0x34>
jmp    114d <GB_LAND_f_FP32+0x4d>
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2ss %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GB_LAND_f_FP32>:
movss  (%rsi),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jne    110e <GB_LAND_f_FP32+0xe>
jnp    1121 <GB_LAND_f_FP32+0x21>
xorps  %xmm1,%xmm1
cmpneqss (%rdx),%xmm1
movss  0xee2(%rip),%xmm0
andps  %xmm1,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @GB_LAND_f_FP32(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = load float, float* %7
%9 = fcmp une float %8, 0.000000e+00
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load float*, float** %6
%12 = load float, float* %11
%13 = fcmp une float %12, 0.000000e+00
br label %14
14: ; preds = %10, %3
%15 = phi i1 [ false, %3 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
%17 = sitofp i32 %16 to float
%18 = load float*, float** %4
store float %17, float* %18
ret void
}

LLVM IR (-O2):
define void @GB_LAND_f_FP32(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = fcmp une float %4, 0.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load float, float* %2
%8 = fcmp une float %7, 0.000000e+00
%9 = uitofp i1 %8 to float
br label %10
10: ; preds = %6, %3
%11 = phi float [ 0.000000e+00, %3 ], [ %9, %6 ]
store float %11, float* %0
ret void
}
/* Type definitions */
struct uio_info_t {
  int dummy;
};

/* Variables and functions */
int uio_open_fix(struct uio_info_t *, int /*<<< orphan*/ *);
int uio_open(struct uio_info_t *info) { return uio_open_fix(info, NULL); }


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

x86 assembly (clang, -O2):
<uio_open>:
xor    %esi,%esi
jmp    1030 <uio_open_fix@plt>

LLVM IR (-O0):
%struct.uio_info_t = type { i32 }
define i32 @uio_open(%struct.uio_info_t* %0) {
%2 = alloca %struct.uio_info_t*
store %struct.uio_info_t* %0, %struct.uio_info_t** %2
%3 = load %struct.uio_info_t*, %struct.uio_info_t** %2
%4 = call i32 @uio_open_fix(%struct.uio_info_t* %3, i32* null)
ret i32 %4
}

LLVM IR (-O2):
%struct.uio_info_t = type { i32 }
define i32 @uio_open(%struct.uio_info_t* %0) {
%2 = tail call i32 @uio_open_fix(%struct.uio_info_t* %0, i32* null)
ret i32 %2
}
int Vec_BitCountWord(unsigned uWord) {
  uWord = (uWord & 0x55555555) + ((uWord >> 1) & 0x55555555);
  uWord = (uWord & 0x33333333) + ((uWord >> 2) & 0x33333333);
  uWord = (uWord & 0x0F0F0F0F) + ((uWord >> 4) & 0x0F0F0F0F);
  uWord = (uWord & 0x00FF00FF) + ((uWord >> 8) & 0x00FF00FF);
  return (uWord & 0x0000FFFF) + (uWord >> 16);
}


x86 assembly (clang, -O0):
<Vec_BitCountWord>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x55555555,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
and    $0x55555555,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x33333333,%eax
mov    -0x4(%rbp),%ecx
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf0f0f0f,%eax
mov    -0x4(%rbp),%ecx
shr    $0x4,%ecx
and    $0xf0f0f0f,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00ff,%eax
mov    -0x4(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff00ff,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vec_BitCountWord>:
mov    %edi,%eax
and    $0x55555555,%eax
shr    %edi
and    $0x55555555,%edi
add    %edi,%eax
mov    %eax,%ecx
and    $0x33333333,%ecx
shr    $0x2,%eax
and    $0x33333333,%eax
add    %ecx,%eax
mov    %eax,%ecx
and    $0x7070707,%ecx
shr    $0x4,%eax
and    $0x7070707,%eax
add    %ecx,%eax
mov    %eax,%ecx
and    $0xf000f,%ecx
shr    $0x8,%eax
and    $0xf000f,%eax
add    %ecx,%eax
movzwl %ax,%ecx
shr    $0x10,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Vec_BitCountWord(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1431655765
%5 = load i32, i32* %2
%6 = lshr i32 %5, 1
%7 = and i32 %6, 1431655765
%8 = add i32 %4, %7
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = and i32 %9, 858993459
%11 = load i32, i32* %2
%12 = lshr i32 %11, 2
%13 = and i32 %12, 858993459
%14 = add i32 %10, %13
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = and i32 %15, 252645135
%17 = load i32, i32* %2
%18 = lshr i32 %17, 4
%19 = and i32 %18, 252645135
%20 = add i32 %16, %19
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = and i32 %21, 16711935
%23 = load i32, i32* %2
%24 = lshr i32 %23, 8
%25 = and i32 %24, 16711935
%26 = add i32 %22, %25
store i32 %26, i32* %2
%27 = load i32, i32* %2
%28 = and i32 %27, 65535
%29 = load i32, i32* %2
%30 = lshr i32 %29, 16
%31 = add i32 %28, %30
ret i32 %31
}

LLVM IR (-O2):
define i32 @Vec_BitCountWord(i32 %0) {
%2 = and i32 %0, 1431655765
%3 = lshr i32 %0, 1
%4 = and i32 %3, 1431655765
%5 = add nuw i32 %4, %2
%6 = and i32 %5, 858993459
%7 = lshr i32 %5, 2
%8 = and i32 %7, 858993459
%9 = add nuw nsw i32 %8, %6
%10 = and i32 %9, 117901063
%11 = lshr i32 %9, 4
%12 = and i32 %11, 117901063
%13 = add nuw nsw i32 %12, %10
%14 = and i32 %13, 983055
%15 = lshr i32 %13, 8
%16 = and i32 %15, 983055
%17 = add nuw nsw i32 %16, %14
%18 = and i32 %17, 31
%19 = lshr i32 %17, 16
%20 = add nuw nsw i32 %18, %19
ret i32 %20
}
void ScaleARGBRowDownEvenBox_Any_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @ScaleARGBRowDownEvenBox_Any_SSE2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int shift_ndep();
int main(void) {
  int r = shift_ndep();
  if (r == 0)
    printf("Passed (%d).\n", r);
  else
    printf("Failed (%d).\n", r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <shift_ndep@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1157 <main+0x37>
mov    -0x8(%rbp),%esi
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
jmp    1166 <main+0x46>
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <shift_ndep@plt>
test   %eax,%eax
je     1137 <main+0x17>
lea    0xedb(%rip),%rdi
mov    %eax,%esi
jmp    1140 <main+0x20>
lea    0xec2(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Passed (%d).\0A\00"
@.str.1 = [14 x i8] c"Failed (%d).\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @shift_ndep()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %12
9: ; preds = %0
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %9, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Passed (%d).\0A\00"
@.str.1 = [14 x i8] c"Failed (%d).\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @shift_ndep()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 0)
br label %7
5: ; preds = %0
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %1)
br label %7
7: ; preds = %5, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ allocateMem(int **, int);
int rand();
void generateAverage(int **x, int n) {
  allocateMem(x, n);
  int i = 0;
  for (i = 0; i < n; i++)
    *(*x + i) = rand();
}


x86 assembly (clang, -O0):
<generateAverage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <allocateMem@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117a <generateAverage+0x5a>
mov    $0x0,%al
call   1040 <rand@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1149 <generateAverage+0x29>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateAverage>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
call   1030 <allocateMem@plt>
test   %ebp,%ebp
jle    1156 <generateAverage+0x36>
mov    %ebp,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <rand@plt>
mov    (%r14),%rcx
mov    %eax,(%rcx,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1140 <generateAverage+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
scalar_t__ inet_pton(int /*<<< orphan*/, char *, int /*<<< orphan*/ *);
int isValidIpAddress(char *ipAddress) {
  struct sockaddr_in sa;
  return (inet_pton(AF_INET, ipAddress, &(sa.sin_addr)) != 0);
}


x86 assembly (clang, -O0):
<isValidIpAddress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <inet_pton@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValidIpAddress>:
push   %rax
mov    %rdi,%rsi
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rdx
call   1030 <inet_pton@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
@AF_INET = global i32 0
define i32 @isValidIpAddress(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.sockaddr_in
store i8* %0, i8** %2
%4 = load i32, i32* @AF_INET
%5 = load i8*, i8** %2
%6 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i32 0, i32 0
%7 = call i64 @inet_pton(i32 %4, i8* %5, i32* %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
@AF_INET = global i32 0
define i32 @isValidIpAddress(i8* %0) {
%2 = alloca %struct.sockaddr_in
%3 = bitcast %struct.sockaddr_in* %2 to i8*
%4 = load i32, i32* @AF_INET
%5 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0
%6 = call i64 @inet_pton(i32 %4, i8* %0, i32* %5)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ gotoxy(int, int);
int /*<<< orphan*/ printf(char *, char *);
void sak(void) {
  gotoxy(10 + 16, 15);
  printf("%s", "Oprima una tecla para continuar.");
  getchar();
}


x86 assembly (clang, -O0):
<sak>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1a,%edi
mov    $0xf,%esi
call   1050 <gotoxy@plt>
lea    0xeb6(%rip),%rdi
lea    0xeb2(%rip),%rsi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sak>:
push   %rax
mov    $0x1a,%edi
mov    $0xf,%esi
call   1050 <gotoxy@plt>
lea    0xeb9(%rip),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [33 x i8] c"Oprima una tecla para continuar.\00"
define void @sak() {
%1 = call i32 @gotoxy(i32 26, i32 15)
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [33 x i8] c"Oprima una tecla para continuar.\00"
define void @sak() {
%1 = tail call i32 @gotoxy(i32 26, i32 15)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @getchar()
ret void
}
void picolcd_exit_devfs(struct picolcd_data *data) {}


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

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

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

LLVM IR (-O2):
%struct.picolcd_data = type opaque
define void @picolcd_exit_devfs(%struct.picolcd_data* nocapture %0) {
ret void
}