xunge/DecIR huggingface dataset:
int main() {
  empty_fpu_stack();
  asm("fld1");
  asm("fldl2t");
  asm("fldl2e");
  asm("fldpi");
  asm("fldlg2");
  asm("fldln2");
  asm("fldz");
  asm("fld1");
  asm("nop");
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <empty_fpu_stack@plt>
fld1
fldl2t
fldl2e
fldpi
fldlg2
fldln2
fldz
fld1
nop
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <empty_fpu_stack@plt>
fld1
fldl2t
fldl2e
fldpi
fldlg2
fldln2
fldz
fld1
nop
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @empty_fpu_stack()
tail call void asm sideeffect "fld1", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "fldl2t", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "fldl2e", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "fldpi", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "fldlg2", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "fldln2", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "fldz", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "fld1", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret i32 1
}
int HEventsPending(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HEventsPending() {
ret i32 0
}
double atan(double x) {
  return ({
    extern __typeof__(atan) module_libc_atan;
    &module_libc_atan;
  })(x);
}


x86 assembly (clang, -O0):
<atan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ed4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  -0x8(%rbp),%xmm0
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan>:
jmp    1030 <module_libc_atan@plt>

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

LLVM IR (-O2):
define double @atan(double %0) {
%2 = tail call double @module_libc_atan(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ LCD_CLR_RESET();
int /*<<< orphan*/ LCD_DELAY(int);
int /*<<< orphan*/ LCD_SET_CS();
int /*<<< orphan*/ LCD_SET_RD();
int /*<<< orphan*/ LCD_SET_RESET();
int /*<<< orphan*/ LCD_SET_WR();
void LCD_X_Init(void) {
  LCD_SET_CS();
  LCD_SET_RD();
  LCD_SET_WR();
  LCD_CLR_RESET();
  LCD_DELAY(2);
  LCD_SET_RESET();
}


x86 assembly (clang, -O0):
<LCD_X_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <LCD_SET_CS@plt>
mov    $0x0,%al
call   1040 <LCD_SET_RD@plt>
mov    $0x0,%al
call   1070 <LCD_SET_WR@plt>
mov    $0x0,%al
call   1060 <LCD_CLR_RESET@plt>
mov    $0x2,%edi
call   1030 <LCD_DELAY@plt>
mov    $0x0,%al
call   1050 <LCD_SET_RESET@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_X_Init>:
push   %rax
xor    %eax,%eax
call   1080 <LCD_SET_CS@plt>
xor    %eax,%eax
call   1040 <LCD_SET_RD@plt>
xor    %eax,%eax
call   1070 <LCD_SET_WR@plt>
xor    %eax,%eax
call   1060 <LCD_CLR_RESET@plt>
mov    $0x2,%edi
call   1030 <LCD_DELAY@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <LCD_SET_RESET@plt>

LLVM IR (-O0):
define void @LCD_X_Init() {
%1 = call i32 (...) @LCD_SET_CS()
%2 = call i32 (...) @LCD_SET_RD()
%3 = call i32 (...) @LCD_SET_WR()
%4 = call i32 (...) @LCD_CLR_RESET()
%5 = call i32 @LCD_DELAY(i32 2)
%6 = call i32 (...) @LCD_SET_RESET()
ret void
}

LLVM IR (-O2):
define void @LCD_X_Init() {
%1 = tail call i32 (...) @LCD_SET_CS()
%2 = tail call i32 (...) @LCD_SET_RD()
%3 = tail call i32 (...) @LCD_SET_WR()
%4 = tail call i32 (...) @LCD_CLR_RESET()
%5 = tail call i32 @LCD_DELAY(i32 2)
%6 = tail call i32 (...) @LCD_SET_RESET()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ board_ti_get_config();
int /*<<< orphan*/ strncmp(int /*<<< orphan*/, char *, int);
int board_is_idk(void) { return !strncmp(board_ti_get_config(), "SKU#02", 6); }


x86 assembly (clang, -O0):
<board_is_idk>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <board_ti_get_config@plt>
mov    %eax,%edi
lea    0xecc(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_is_idk>:
push   %rax
xor    %eax,%eax
call   1040 <board_ti_get_config@plt>
lea    0xed1(%rip),%rsi
mov    %eax,%edi
mov    $0x6,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"SKU\00"
define i32 @board_is_idk() {
%1 = call i32 (...) @board_ti_get_config()
%2 = call i32 @strncmp(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
@.str = [7 x i8] c"SKU\00"
define i32 @board_is_idk() {
%1 = tail call i32 (...) @board_ti_get_config()
%2 = tail call i32 @strncmp(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int comparar(const void *a, const void *b) {
  const double *fa = a;
  const double *fb = b;
  if (*fa < *fb)
    return 1;
  else if (*fa > *fb)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<comparar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1142 <comparar+0x42>
movl   $0x1,-0x4(%rbp)
jmp    116b <comparar+0x6b>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    1164 <comparar+0x64>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <comparar+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparar>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
neg    %ecx
ucomisd %xmm0,%xmm1
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @comparar(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
%8 = fcmp ogt double %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
int test_imm_38int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x38 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_38int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x38,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_38int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 56
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_38int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 240518168576
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void c_pomp_atomic_enter_(struct ompregdescr *r) { (void)0; }


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

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

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

LLVM IR (-O2):
%struct.ompregdescr = type opaque
define void @c_pomp_atomic_enter_(%struct.ompregdescr* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_head_lfmm();
int /*<<< orphan*/ print_head_licence_lfmm();
int /*<<< orphan*/ print_help_lfmm();
int /*<<< orphan*/ print_licence_lfmm();
int /*<<< orphan*/ print_options(int, char **);
int main(int argc, char *argv[]) {
  print_licence_lfmm();
  print_head_licence_lfmm();
  print_head_lfmm();
  print_help_lfmm();
  print_options(argc, argv);
  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)
mov    $0x0,%al
call   1050 <print_licence_lfmm@plt>
mov    $0x0,%al
call   1040 <print_head_licence_lfmm@plt>
mov    $0x0,%al
call   1060 <print_head_lfmm@plt>
mov    $0x0,%al
call   1030 <print_help_lfmm@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1070 <print_options@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <print_licence_lfmm@plt>
xor    %eax,%eax
call   1040 <print_head_licence_lfmm@plt>
xor    %eax,%eax
call   1060 <print_head_lfmm@plt>
xor    %eax,%eax
call   1030 <print_help_lfmm@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1070 <print_options@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
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 (...) @print_licence_lfmm()
%7 = call i32 (...) @print_head_licence_lfmm()
%8 = call i32 (...) @print_head_lfmm()
%9 = call i32 (...) @print_help_lfmm()
%10 = load i32, i32* %4
%11 = load i8**, i8*** %5
%12 = call i32 @print_options(i32 %10, i8** %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @print_licence_lfmm()
%4 = tail call i32 (...) @print_head_licence_lfmm()
%5 = tail call i32 (...) @print_head_lfmm()
%6 = tail call i32 (...) @print_help_lfmm()
%7 = tail call i32 @print_options(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int strncmp(char const *, char const *, int /*<<< orphan*/);
int prefix(const char *str, const char *pre) {
  return strncmp(pre, str, strlen(pre));
}


x86 assembly (clang, -O0):
<prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prefix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strncmp@plt>

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

LLVM IR (-O2):
define i32 @prefix(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @strncmp(i8* %1, i8* %0, i32 %3)
ret i32 %4
}
XEqualRegion() {}


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

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

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

LLVM IR (-O2):
define i32 @XEqualRegion() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ DisplayUsage();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void DisplayInvalidParameter(char *param) {
  fprintf(stderr, "apply_mask: Parameter %s is invalid.\n", param);
  DisplayUsage();
}


x86 assembly (clang, -O0):
<DisplayInvalidParameter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <DisplayUsage@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DisplayInvalidParameter>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <DisplayUsage@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"apply_mask: Parameter %s is invalid.\0A\00"
define void @DisplayInvalidParameter(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @DisplayUsage()
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"apply_mask: Parameter %s is invalid.\0A\00"
define void @DisplayInvalidParameter(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @DisplayUsage()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_string(char *);
void indirect2(char c[]) { print_string(c); }


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

x86 assembly (clang, -O2):
<indirect2>:
jmp    1030 <print_string@plt>

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

LLVM IR (-O2):
define void @indirect2(i8* %0) {
%2 = tail call i32 @print_string(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("My name is Abdullah Alshubaili\n");
  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    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [32 x i8] c"My name is Abdullah Alshubaili\0A\00"
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 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [31 x i8] c"My name is Abdullah Alshubaili\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int demanarValor(char *, char *, int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int j;
  j = demanarValor("Introdueix un enter positiu: ",
                   "\nT'he dit un enter positiu!!\n\n", 1, 100000000);
  printf("\nHas introduït un %d\n\n", j);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    0xeda(%rip),%rsi
mov    $0x1,%edx
mov    $0x5f5e100,%ecx
call   1040 <demanarValor@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xeef(%rip),%rsi
mov    $0x1,%edx
mov    $0x5f5e100,%ecx
call   1040 <demanarValor@plt>
lea    0xef8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Introdueix un enter positiu: \00"
@.str.1 = [31 x i8] c"\0AT'he dit un enter positiu!!\0A\0A\00"
@.str.2 = [24 x i8] c"\0AHas introdu\C3\AFt un %d\0A\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @demanarValor(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 100000000)
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}

LLVM IR (-O2):
@.str = [30 x i8] c"Introdueix un enter positiu: \00"
@.str.1 = [31 x i8] c"\0AT'he dit un enter positiu!!\0A\0A\00"
@.str.2 = [24 x i8] c"\0AHas introdu\C3\AFt un %d\0A\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @demanarValor(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 100000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
int test_imm_74int16_mem(short *val) {
  return ((*val) & (0x74 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_74int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 116
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISREG(int /*<<< orphan*/);
scalar_t__ lstat(char *, struct stat *);
int __uio_dev_attr_filter(char *filename) {
  struct stat filestat;
  if (lstat(filename, &filestat))
    return 0;
  if (S_ISREG(filestat.st_mode))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<__uio_dev_attr_filter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <lstat@plt>
cmp    $0x0,%rax
je     114f <__uio_dev_attr_filter+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1174 <__uio_dev_attr_filter+0x54>
mov    -0x18(%rbp),%edi
call   1040 <S_ISREG@plt>
cmp    $0x0,%rax
je     116d <__uio_dev_attr_filter+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1174 <__uio_dev_attr_filter+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__uio_dev_attr_filter>:
push   %rax
mov    %rsp,%rsi
call   1030 <lstat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <__uio_dev_attr_filter+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <S_ISREG@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @__uio_dev_attr_filter(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @lstat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %16
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i64 @S_ISREG(i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
store i32 1, i32* %2
br label %16
15: ; preds = %9
store i32 0, i32* %2
br label %16
16: ; preds = %15, %14, %8
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @__uio_dev_attr_filter(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @lstat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i64 @S_ISREG(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
void bnxt_dl_unregister(struct bnxt *bp) {}


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

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

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

LLVM IR (-O2):
%struct.bnxt = type opaque
define void @bnxt_dl_unregister(%struct.bnxt* nocapture %0) {
ret void
}
/* Variables and functions */
void *calloc(int, size_t);
void *zalloc(size_t s) { return calloc(1, s); }


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

x86 assembly (clang, -O2):
<zalloc>:
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @zalloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @calloc(i32 1, i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @zalloc(i64 %0) {
%2 = tail call i8* @calloc(i32 1, i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void show_int(int i) { printf("%i\n", i); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define void @show_int(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
long strtol(char const *, char **, int);
__attribute__((always_, used)) long int __Tales_atol(const char *__nptr) {
  return strtol(__nptr, (char **)NULL, 10);
}


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

x86 assembly (clang, -O2):
<__Tales_atol>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i64 (i8*)* @__Tales_atol to i8*)], section "llvm.metadata"
define i64 @__Tales_atol(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strtol(i8* %3, i8** null, i32 10)
ret i64 %4
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i64 (i8*)* @__Tales_atol to i8*)], section "llvm.metadata"
define i64 @__Tales_atol(i8* nocapture %0) {
%2 = tail call i64 @strtol(i8* nocapture %0, i8** null, i32 10)
ret i64 %2
}
void RTVfsFsStrmRetain(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsFsStrmRetain() {
ret void
}
void rule_dgp_cond_cover(const struct XCSF *xcsf, const struct Cl *c,
                         const double *x) {
  (void)xcsf;
  (void)c;
  (void)x;
}


x86 assembly (clang, -O0):
<rule_dgp_cond_cover>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @rule_dgp_cond_cover(%struct.XCSF* %0, %struct.Cl* %1, double* %2) {
%4 = alloca %struct.XCSF*
%5 = alloca %struct.Cl*
%6 = alloca double*
store %struct.XCSF* %0, %struct.XCSF** %4
store %struct.Cl* %1, %struct.Cl** %5
store double* %2, double** %6
%7 = load %struct.XCSF*, %struct.XCSF** %4
%8 = load %struct.Cl*, %struct.Cl** %5
%9 = load double*, double** %6
ret void
}

LLVM IR (-O2):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @rule_dgp_cond_cover(%struct.XCSF* nocapture %0, %struct.Cl* nocapture %1, double* nocapture %2) {
ret void
}
/* Variables and functions */
char *get_special_input(char);
char *get_array_type() { return get_special_input('%'); }


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

x86 assembly (clang, -O2):
<get_array_type>:
mov    $0x25,%edi
jmp    1030 <get_special_input@plt>

LLVM IR (-O0):
define i8* @get_array_type() {
%1 = call i8* @get_special_input(i8 signext 37)
ret i8* %1
}

LLVM IR (-O2):
define i8* @get_array_type() {
%1 = tail call i8* @get_special_input(i8 signext 37)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ palindrome_check(long);
int /*<<< orphan*/ scanf(char *, long *);
int main() {
  long int decimal;
  scanf("%ld", &decimal);
  palindrome_check(decimal);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%rdi
call   1030 <palindrome_check@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %2)
%4 = load i64, i64* %2
%5 = call i32 @palindrome_check(i64 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = call i32 @palindrome_check(i64 %4)
ret i32 0
}
int test(double a) {
  if (a)
    return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1126 <test+0x26>
jp     1126 <test+0x26>
jmp    112d <test+0x2d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp une double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @test(double %0) {
ret i32 0
}
void dns_free(void) {}


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

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

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

LLVM IR (-O2):
define void @dns_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testCase(char *, char *, int /*<<< orphan*/);
void test3(void) {
  char haystack1[] = "AABAACAADAABAAABAA";
  char needle1[] = "AABA";
  testCase(haystack1, needle1, 0);
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xed3(%rip),%al
mov    %al,-0xe(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x25(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x21(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x25(%rbp),%rsi
xor    %edx,%edx
call   1030 <testCase@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x414142,0x1f(%rsp)
movb   $0x0,0xc(%rsp)
movl   $0x41424141,0x8(%rsp)
41
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
xor    %edx,%edx
call   1030 <testCase@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.test3.haystack1 = [19 x i8] c"AABAACAADAABAAABAA\00"
@__const.test3.needle1 = [5 x i8] c"AABA\00"
define void @test3() {
%1 = alloca [19 x i8]
%2 = alloca [5 x i8]
%3 = bitcast [19 x i8]* %1 to i8*
%4 = bitcast [5 x i8]* %2 to i8*
%5 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%7 = call i32 @testCase(i8* %5, i8* %6, i32 0)
ret void
}

LLVM IR (-O2):
@__const.test3.haystack1 = [19 x i8] c"AABAACAADAABAAABAA\00"
@__const.test3.needle1 = [5 x i8] c"AABA\00"
define void @test3() {
%1 = alloca [19 x i8]
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = call i32 @testCase(i8* %3, i8* %4, i32 0)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ log_init(char *, int);
int /*<<< orphan*/ testSkipList();
int main(int argc, const char *argv[]) {
  log_init("debug.log", 0x01);
  testSkipList();
  return EXIT_SUCCESS;
}


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    0xec3(%rip),%rdi
mov    $0x1,%esi
call   1030 <log_init@plt>
mov    $0x0,%al
call   1040 <testSkipList@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1,%esi
call   1030 <log_init@plt>
xor    %eax,%eax
call   1040 <testSkipList@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"debug.log\00"
@EXIT_SUCCESS = global i32 0
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 @log_init(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%7 = call i32 (...) @testSkipList()
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@.str = [10 x i8] c"debug.log\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @log_init(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = tail call i32 (...) @testSkipList()
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Variables and functions */
int strlen(char *);
unsigned char toupper(unsigned char);
void strUpper(unsigned char *string) {
  int i, size = strlen((char *)string);
  for (i = 0; i < size; i++)
    string[i] = toupper(string[i]);
}


x86 assembly (clang, -O0):
<strUpper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1177 <strUpper+0x57>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <strUpper+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strUpper>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1040 <strlen@plt>
test   %eax,%eax
jle    1157 <strUpper+0x37>
mov    %eax,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movzbl (%r15,%rbx,1),%edi
call   1030 <toupper@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <strUpper+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @strUpper(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1
%5 = zext i32 %2 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call zeroext i8 @toupper(i8 zeroext %9)
store i8 %10, i8* %8
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %1
ret void
}
void video_flush(void) {}


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

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

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

LLVM IR (-O2):
define void @video_flush() {
ret void
}
int func_0(int a) {
  int b;
  switch (a) {
  case 1:
    b = a - 20;
    break;
  case 3:
    b = a - 40;
    break;
  case 5:
    b = a - 80;
    break;
  case 7:
    b = a - 120;
    break;
  case 9:
    b = a - 140;
    break;
  case 12:
    b = a - 220;
    break;
  default:
    b = 0;
    break;
  }
  return b;
}


x86 assembly (clang, -O0):
<func_0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xb,%eax
ja     1188 <func_0+0x88>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x4(%rbp),%eax
sub    $0x14,%eax
mov    %eax,-0x8(%rbp)
jmp    118f <func_0+0x8f>
mov    -0x4(%rbp),%eax
sub    $0x28,%eax
mov    %eax,-0x8(%rbp)
jmp    118f <func_0+0x8f>
mov    -0x4(%rbp),%eax
sub    $0x50,%eax
mov    %eax,-0x8(%rbp)
jmp    118f <func_0+0x8f>
mov    -0x4(%rbp),%eax
sub    $0x78,%eax
mov    %eax,-0x8(%rbp)
jmp    118f <func_0+0x8f>
mov    -0x4(%rbp),%eax
sub    $0x8c,%eax
mov    %eax,-0x8(%rbp)
jmp    118f <func_0+0x8f>
mov    -0x4(%rbp),%eax
sub    $0xdc,%eax
mov    %eax,-0x8(%rbp)
jmp    118f <func_0+0x8f>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_0>:
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0xb,%edi
ja     1117 <func_0+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @func_0(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %23 [
i32 1, label %5
i32 3, label %8
i32 5, label %11
i32 7, label %14
i32 9, label %17
i32 12, label %20
]
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 %6, 20
store i32 %7, i32* %3
br label %24
8: ; preds = %1
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 40
store i32 %10, i32* %3
br label %24
11: ; preds = %1
%12 = load i32, i32* %2
%13 = sub nsw i32 %12, 80
store i32 %13, i32* %3
br label %24
14: ; preds = %1
%15 = load i32, i32* %2
%16 = sub nsw i32 %15, 120
store i32 %16, i32* %3
br label %24
17: ; preds = %1
%18 = load i32, i32* %2
%19 = sub nsw i32 %18, 140
store i32 %19, i32* %3
br label %24
20: ; preds = %1
%21 = load i32, i32* %2
%22 = sub nsw i32 %21, 220
store i32 %22, i32* %3
br label %24
23: ; preds = %1
store i32 0, i32* %3
br label %24
24: ; preds = %23, %20, %17, %14, %11, %8, %5
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@switch.table.func_0 = [12 x i32] [i32 -19, i32 0, i32 -37, i32 0, i32 -75, i32 0, i32 -113, i32 0, i32 -131, i32 0, i32 0, i32 -208]
define i32 @func_0(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 12
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [12 x i32], [12 x i32]* @switch.table.func_0, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ds_sll_deleteElement(void **element) {
  if (*element != NULL) {
    free(*element);
    *element = NULL;
  }
}


x86 assembly (clang, -O0):
<ds_sll_deleteElement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1141 <ds_sll_deleteElement+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ds_sll_deleteElement>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1128 <ds_sll_deleteElement+0x18>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ds_sll_deleteElement(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(i8* %2)
store i8* null, i8** %0
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int dispatch();
int __attribute__((hot)) fn1() { return dispatch(); }


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

x86 assembly (clang, -O2):
<fn1>:
xor    %eax,%eax
jmp    1030 <dispatch@plt>
nopw   0x0(%rax,%rax,1)

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

LLVM IR (-O2):
define i32 @fn1() {
%1 = tail call i32 (...) @dispatch()
ret i32 %1
}
int flteq(double a, double b) {
  double hibnd = a + (0.00002);
  double lobnd = a - (0.00002);
  if (b >= lobnd && b <= hibnd)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<flteq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  0xeea(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed3(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jb     1166 <flteq+0x66>
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1166 <flteq+0x66>
movl   $0x1,-0x4(%rbp)
jmp    116d <flteq+0x6d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flteq>:
movsd  0xef8(%rip),%xmm2
addsd  %xmm0,%xmm2
ucomisd %xmm2,%xmm1
setae  %al
addsd  0xeed(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @flteq(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
%8 = load double, double* %4
%9 = fadd double %8, 2.000000e-05
store double %9, double* %6
%10 = load double, double* %4
%11 = fsub double %10, 2.000000e-05
store double %11, double* %7
%12 = load double, double* %5
%13 = load double, double* %7
%14 = fcmp oge double %12, %13
br i1 %14, label %15, label %20
15: ; preds = %2
%16 = load double, double* %5
%17 = load double, double* %6
%18 = fcmp ole double %16, %17
br i1 %18, label %19, label %20
19: ; preds = %15
store i32 1, i32* %3
br label %21
20: ; preds = %15, %2
store i32 0, i32* %3
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @flteq(double %0, double %1) {
%3 = fadd double %0, -2.000000e-05
%4 = fcmp ole double %3, %1
%5 = fadd double %0, 2.000000e-05
%6 = fcmp oge double %5, %1
%7 = and i1 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
int testBigEndin2() {
  int n = 1;
  if (*(char *)&n == 1) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<testBigEndin2>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
movsbl -0x8(%rbp),%eax
cmp    $0x1,%eax
jne    1124 <testBigEndin2+0x24>
movl   $0x0,-0x4(%rbp)
jmp    112b <testBigEndin2+0x2b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @testBigEndin2() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 0, i32* %1
br label %9
8: ; preds = %0
store i32 1, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @testBigEndin2() {
ret i32 0
}
int test_imm_6Duint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x6D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Duint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x6d,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_6Duint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 109
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int first(int x, int y) { return x + y; }


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

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

LLVM IR (-O0):
define i32 @first(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @first(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ gen_is_atom(int);
bool gen_is_server(int devid) {
  assert(!gen_is_atom(devid));
  return ((devid & 0xf) == 0xa);
}


x86 assembly (clang, -O0):
<gen_is_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <gen_is_atom@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
and    $0xf,%eax
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_is_server>:
push   %rbx
mov    %edi,%ebx
call   1040 <gen_is_atom@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
and    $0xf,%ebx
xor    %eax,%eax
cmp    $0xa,%ebx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @gen_is_server(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @gen_is_atom(i32 %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %2
%10 = and i32 %9, 15
%11 = icmp eq i32 %10, 10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @gen_is_server(i32 %0) {
%2 = tail call i32 @gen_is_atom(i32 %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = and i32 %0, 15
%7 = icmp eq i32 %6, 10
%8 = zext i1 %7 to i32
ret i32 %8
}
void gtk_text_view_get_wrap_mode() {}


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

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

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

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