xunge/DecIR huggingface dataset:
int test_imm_D0int16_mem(short *val) {
  return ((*val) & (0xD0 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D0int16_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, 208
%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_D0int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 208
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
long _hoisting() {
  long EV_a;
  long EV_b;
  long EV_c;
  long EV_d;
  long EV_e;
  long EV_f;
  long EV_g;
  long EV_h;
  long EV_i;
  EV_a = 1;
  EV_b = 2;
  EV_c = 3;
  EV_d = 4;
  EV_i = 0;
  while ((EV_i < 1000000)) {
    EV_e = 5;
    EV_g = ((EV_a + EV_b) + EV_c);
    EV_h = ((EV_c + EV_d) + EV_g);
    EV_i = (EV_i + 1);
  }
  return EV_b;
}


x86 assembly (clang, -O0):
<_hoisting>:
push   %rbp
mov    %rsp,%rbp
movq   $0x1,-0x8(%rbp)
movq   $0x2,-0x10(%rbp)
movq   $0x3,-0x18(%rbp)
movq   $0x4,-0x20(%rbp)
movq   $0x0,-0x48(%rbp)
cmpq   $0xf4240,-0x48(%rbp)
jge    1173 <_hoisting+0x73>
movq   $0x5,-0x28(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    112c <_hoisting+0x2c>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @_hoisting() {
ret i64 2
}
unsigned xrop3_24_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk1 = S ^ T;
  stk2 = T ^ D;
  stk1 = stk1 & stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_24_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_24_1_1>:
mov    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_24_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = xor i32 %22, %23
store i32 %24, i32* %8
%25 = load i32, i32* %7
%26 = load i32, i32* %5
%27 = xor i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %8
%29 = load i32, i32* %9
%30 = and i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %7
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = load i32, i32* %5
%39 = load i32, i32* %6
%40 = and i32 %38, %39
%41 = or i32 %37, %40
%42 = load i32, i32* %5
%43 = load i32, i32* %7
%44 = and i32 %42, %43
%45 = or i32 %41, %44
ret i32 %45
}

LLVM IR (-O2):
define i32 @xrop3_24_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void swap_chars(char *s1, int x, int y) {
  char tmp = s1[x];
  s1[x] = s1[y];
  s1[y] = tmp;
  printf("%c\n", tmp);
}


x86 assembly (clang, -O0):
<swap_chars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
lea    0xea5(%rip),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_chars>:
movslq %esi,%rax
movsbl (%rdi,%rax,1),%esi
movslq %edx,%rcx
mov    (%rdi,%rcx,1),%dl
mov    %dl,(%rdi,%rax,1)
mov    %sil,(%rdi,%rcx,1)
lea    0xed5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%c\0A\00"
define void @swap_chars(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
store i8 %12, i8* %7
%13 = load i8*, i8** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = load i8*, i8** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
store i8 %17, i8* %21
%22 = load i8, i8* %7
%23 = load i8*, i8** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %23, i64 %25
store i8 %22, i8* %26
%27 = load i8, i8* %7
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %27)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define void @swap_chars(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %5
store i8 %6, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %6)
ret void
}
int main(int argc, char const *argv[]) {
  char board[9][9] = {"..4...63.", ".........", "5......9.",
                      "...56....", "4.3.....1", "...7.....",
                      "...5.....", ".........", "........."};
  printf("%d", isValidSudoku(board));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x51,%edx
call   1050 <memcpy@plt>
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1030 <isValidSudoku@plt>
mov    %eax,%esi
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
mov    0xf26(%rip),%al
mov    %al,0x50(%rsp)
movaps 0xf0b(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeef(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed3(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb7(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe9b(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
xor    %eax,%eax
call   1030 <isValidSudoku@plt>
lea    0xed7(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.board = [9 x [9 x i8]] [[9 x i8] c"..4...63.", [9 x i8] c".........", [9 x i8] c"5......9.", [9 x i8] c"...56....", [9 x i8] c"4.3.....1", [9 x i8] c"...7.....", [9 x i8] c"...5.....", [9 x i8] c".........", [9 x i8] c"........."]
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [9 x [9 x i8]]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [9 x [9 x i8]]* %6 to i8*
%8 = getelementptr inbounds [9 x [9 x i8]], [9 x [9 x i8]]* %6, i64 0, i64 0
%9 = call i32 ([9 x i8]*, ...) bitcast (i32 (...)* @isValidSudoku to i32 ([9 x i8]*, ...)*)([9 x i8]* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.board = [9 x [9 x i8]] [[9 x i8] c"..4...63.", [9 x i8] c".........", [9 x i8] c"5......9.", [9 x i8] c"...56....", [9 x i8] c"4.3.....1", [9 x i8] c"...7.....", [9 x i8] c"...5.....", [9 x i8] c".........", [9 x i8] c"........."]
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [9 x [9 x i8]]
%4 = getelementptr inbounds [9 x [9 x i8]], [9 x [9 x i8]]* %3, i64 0, i64 0, i64 0
%5 = getelementptr inbounds [9 x [9 x i8]], [9 x [9 x i8]]* %3, i64 0, i64 0
%6 = call i32 ([9 x i8]*, ...) bitcast (i32 (...)* @isValidSudoku to i32 ([9 x i8]*, ...)*)([9 x i8]* %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
double ___jn(int, double *);
double j1(double x) { return ___jn(1, &x); }


x86 assembly (clang, -O0):
<j1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x1,%edi
lea    -0x8(%rbp),%rsi
call   1030 <___jn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j1>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x1,%edi
call   1030 <___jn@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @j1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double @___jn(i32 1, double* %2)
ret double %3
}

LLVM IR (-O2):
define double @j1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double @___jn(i32 1, double* %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ hoc_pushx(int);
int /*<<< orphan*/ hoc_ret();
hoc_Graph() {
  hoc_ret();
  hoc_pushx(0.);
}


x86 assembly (clang, -O0):
<hoc_Graph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <hoc_ret@plt>
xor    %edi,%edi
call   1040 <hoc_pushx@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hoc_Graph>:
push   %rax
xor    %eax,%eax
call   1030 <hoc_ret@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <hoc_pushx@plt>

LLVM IR (-O0):
define i32 @hoc_Graph() {
%1 = alloca i32
%2 = call i32 (...) @hoc_ret()
%3 = call i32 @hoc_pushx(i32 0)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @hoc_Graph() {
%1 = tail call i32 (...) @hoc_ret()
%2 = tail call i32 @hoc_pushx(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *futimens;
int main(int argc, char *argv[]) {
  void *p;
  (void)argc;
  (void)argv;
  p = futimens;
  exit(0);
}


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)
mov    0x2eb3(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@futimens = global i8* null
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load i8*, i8** @futimens
store i8* %9, i8** %6
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@futimens = global i8* null
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, void const *, int);
int /*<<< orphan*/ ntoh64(int /*<<< orphan*/);
int64_t voip_readInt64(const void *p) {
  int64_t v;
  memcpy(&v, p, 8);
  return ntoh64(v);
}


x86 assembly (clang, -O0):
<voip_readInt64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    -0xc(%rbp),%edi
call   1030 <ntoh64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<voip_readInt64>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    0x4(%rsp),%edi
call   1030 <ntoh64@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @voip_readInt64(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 8)
%5 = load i32, i32* %2
%6 = call i32 @ntoh64(i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int x = 1;
  if (x == 1)
    printf("x is equal to one.\n");
  if (x != 1)
    printf("x is not equal to one.\n");
  else
    printf("x is equal to one.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    113c <main+0x2c>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
je     1157 <main+0x47>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
jmp    1163 <main+0x53>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str.2 = [19 x i8] c"x is equal to one.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.2, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XMapRequestEvent;

/* Variables and functions */
void *get_XMapRequestEvent_display(void *_p) {
  return (void *)((XMapRequestEvent *)_p)->display;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XMapRequestEvent_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XMapRequestEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
int test_imm_D1uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xD1 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D1uint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 209
%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_D1uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 209
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void calculate(int number, char c) {
  while (number--)
    printf("%c", c);
}


x86 assembly (clang, -O0):
<calculate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     114a <calculate+0x3a>
lea    0xec4(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
jmp    1121 <calculate+0x11>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
je     113f <calculate+0x2f>
mov    %edi,%ebx
movsbl %sil,%ebp
lea    0xedb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <calculate+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @calculate(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %3
%7 = add nsw i32 %6, -1
store i32 %7, i32* %3
%8 = icmp ne i32 %6, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i8, i8* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %10)
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @calculate(i32 %0, i8 signext %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %1)
%8 = icmp eq i32 %6, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
/* Variables and functions */
int convert_bit_range(int, int, int);
int rgb_to_565(int r, int g, int b) {
  return (convert_bit_range(r, 8, 5) << 11) |
         (convert_bit_range(g, 8, 6) << 05) |
         (convert_bit_range(b, 8, 5) << 00);
}


x86 assembly (clang, -O0):
<rgb_to_565>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
mov    $0x5,%edx
call   1030 <convert_bit_range@plt>
shl    $0xb,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x8,%esi
mov    $0x6,%edx
call   1030 <convert_bit_range@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
shl    $0x5,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x8,%esi
mov    $0x5,%edx
call   1030 <convert_bit_range@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
shl    $0x0,%ecx
or     %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgb_to_565>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    $0x8,%esi
mov    $0x5,%edx
call   1030 <convert_bit_range@plt>
mov    %eax,%ebx
shl    $0xb,%ebx
mov    %ebp,%edi
mov    $0x8,%esi
mov    $0x6,%edx
call   1030 <convert_bit_range@plt>
mov    %eax,%ebp
shl    $0x5,%ebp
or     %ebx,%ebp
mov    %r14d,%edi
mov    $0x8,%esi
mov    $0x5,%edx
call   1030 <convert_bit_range@plt>
or     %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rgb_to_565(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = call i32 @convert_bit_range(i32 %7, i32 8, i32 5)
%9 = shl i32 %8, 11
%10 = load i32, i32* %5
%11 = call i32 @convert_bit_range(i32 %10, i32 8, i32 6)
%12 = shl i32 %11, 5
%13 = or i32 %9, %12
%14 = load i32, i32* %6
%15 = call i32 @convert_bit_range(i32 %14, i32 8, i32 5)
%16 = shl i32 %15, 0
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @rgb_to_565(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @convert_bit_range(i32 %0, i32 8, i32 5)
%5 = shl i32 %4, 11
%6 = tail call i32 @convert_bit_range(i32 %1, i32 8, i32 6)
%7 = shl i32 %6, 5
%8 = or i32 %7, %5
%9 = tail call i32 @convert_bit_range(i32 %2, i32 8, i32 5)
%10 = or i32 %8, %9
ret i32 %10
}
int ataribasic_atoh(int ch) {
  if (ch >= '0' && ch <= '9')
    ch -= '0';
  if (ch >= 'A' && ch <= 'F')
    ch -= 'A' - 10;
  if (ch >= 'a' && ch <= 'f')
    ch -= 'a' - 10;
  return (ch);
}


x86 assembly (clang, -O0):
<ataribasic_atoh>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x30,-0x4(%rbp)
jl     1124 <ataribasic_atoh+0x24>
cmpl   $0x39,-0x4(%rbp)
jg     1124 <ataribasic_atoh+0x24>
mov    -0x4(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1141 <ataribasic_atoh+0x41>
cmpl   $0x46,-0x4(%rbp)
jg     1141 <ataribasic_atoh+0x41>
mov    -0x4(%rbp),%eax
sub    $0x37,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     115e <ataribasic_atoh+0x5e>
cmpl   $0x66,-0x4(%rbp)
jg     115e <ataribasic_atoh+0x5e>
mov    -0x4(%rbp),%eax
sub    $0x57,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ataribasic_atoh>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
cmovae %edi,%eax
lea    -0x41(%rax),%ecx
lea    -0x37(%rax),%edx
cmp    $0x6,%ecx
cmovae %eax,%edx
lea    -0x61(%rdx),%ecx
lea    -0x57(%rdx),%eax
cmp    $0x6,%ecx
cmovae %edx,%eax
ret

LLVM IR (-O0):
define i32 @ataribasic_atoh(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 48
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %5, %1
%12 = load i32, i32* %2
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %20
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp sle i32 %15, 70
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = sub nsw i32 %18, 55
store i32 %19, i32* %2
br label %20
20: ; preds = %17, %14, %11
%21 = load i32, i32* %2
%22 = icmp sge i32 %21, 97
br i1 %22, label %23, label %29
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp sle i32 %24, 102
br i1 %25, label %26, label %29
26: ; preds = %23
%27 = load i32, i32* %2
%28 = sub nsw i32 %27, 87
store i32 %28, i32* %2
br label %29
29: ; preds = %26, %23, %20
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @ataribasic_atoh(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = select i1 %3, i32 %2, i32 %0
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = add nsw i32 %4, -55
%8 = select i1 %6, i32 %7, i32 %4
%9 = add i32 %8, -97
%10 = icmp ult i32 %9, 6
%11 = add nsw i32 %8, -87
%12 = select i1 %10, i32 %11, i32 %8
ret i32 %12
}
void imv_console_add_completion(struct imv_console *console,
                                const char *template) {
  (void)console;
  (void)template;
}


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

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

LLVM IR (-O0):
%struct.imv_console = type opaque
define void @imv_console_add_completion(%struct.imv_console* %0, i8* %1) {
%3 = alloca %struct.imv_console*
%4 = alloca i8*
store %struct.imv_console* %0, %struct.imv_console** %3
store i8* %1, i8** %4
%5 = load %struct.imv_console*, %struct.imv_console** %3
%6 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
%struct.imv_console = type opaque
define void @imv_console_add_completion(%struct.imv_console* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execlp(char *, char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Running ps with execlp\n");
  execlp("ps", "ps", "ax", 0);
  printf("done\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xec6(%rip),%rsi
lea    0xec2(%rip),%rdx
xor    %ecx,%ecx
mov    %rsi,%rdi
call   1050 <execlp@plt>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0xeb8(%rip),%rdx
mov    %rdi,%rsi
xor    %ecx,%ecx
call   1050 <execlp@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Running ps with execlp\0A\00"
@.str.1 = [3 x i8] c"ps\00"
@.str.2 = [3 x i8] c"ax\00"
@.str.3 = [6 x i8] c"done\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @execlp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 0)
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"ps\00"
@.str.2 = [3 x i8] c"ax\00"
@str = [23 x i8] c"Running ps with execlp\00"
@str.4 = [5 x i8] c"done\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @execlp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  scanf("%d", &a);
  if (a % 2 <= 1) {
    printf("yes\n");
  } else {
    printf("no\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jg     1164 <main+0x44>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    1170 <main+0x50>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [4 x i8] c"yes\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar_fd(char const, int);
void ft_putendl_fd(char const *s, int fd) {
  int i;
  i = 0;
  while (s[i] != '\0') {
    ft_putchar_fd(s[i], fd);
    i++;
  }
  ft_putchar_fd('\n', fd);
}


x86 assembly (clang, -O0):
<ft_putendl_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115f <ft_putendl_fd+0x4f>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0xc(%rbp),%esi
movsbl %al,%edi
call   1030 <ft_putchar_fd@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <ft_putendl_fd+0x16>
mov    -0xc(%rbp),%esi
mov    $0xa,%edi
call   1030 <ft_putchar_fd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putendl_fd>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    (%rdi),%al
test   %al,%al
je     1145 <ft_putendl_fd+0x35>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
mov    %ebp,%esi
call   1030 <ft_putchar_fd@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <ft_putendl_fd+0x20>
mov    $0xa,%edi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ft_putchar_fd@plt>

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

LLVM IR (-O2):
define void @ft_putendl_fd(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = tail call i32 @ft_putchar_fd(i8 signext %7, i32 %1)
%9 = add nuw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = tail call i32 @ft_putchar_fd(i8 signext 10, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ htonb2(scalar_t__, int /*<<< orphan*/ *);
uint16_t htons(uint16_t host) {
  uint16_t result = 0;
  htonb2(host, (uint8_t *)&result);
  return result;
}


x86 assembly (clang, -O0):
<htons>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <htonb2@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htons>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1030 <htonb2@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @htons(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
%4 = load i64, i64* %2
%5 = bitcast i64* %3 to i32*
%6 = call i32 @htonb2(i64 %4, i32* %5)
%7 = load i64, i64* %3
ret i64 %7
}

LLVM IR (-O2):
define i64 @htons(i64 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%4 = bitcast i64* %2 to i32*
%5 = call i32 @htonb2(i64 %0, i32* %4)
%6 = load i64, i64* %2
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void c_print_int(int n) { printf("%d", n); }


x86 assembly (clang, -O0):
<c_print_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):
<c_print_int>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @c_print_int(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ showElements();
int /*<<< orphan*/ siftDown(int);
void heapify() {
  int i, temp;
  for (i = 1; i <= 7; i++) {
    siftDown(i);
  }
  printf("\n:: Elements after heapify ::\n");
  showElements();
}


x86 assembly (clang, -O0):
<heapify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x7,-0x4(%rbp)
jg     115f <heapify+0x2f>
mov    -0x4(%rbp),%edi
call   1040 <siftDown@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <heapify+0xf>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <showElements@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heapify>:
push   %rax
mov    $0x1,%edi
call   1040 <siftDown@plt>
mov    $0x2,%edi
call   1040 <siftDown@plt>
mov    $0x3,%edi
call   1040 <siftDown@plt>
mov    $0x4,%edi
call   1040 <siftDown@plt>
mov    $0x5,%edi
call   1040 <siftDown@plt>
mov    $0x6,%edi
call   1040 <siftDown@plt>
mov    $0x7,%edi
call   1040 <siftDown@plt>
lea    0xe82(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <showElements@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"\0A:: Elements after heapify ::\0A\00"
define void @heapify() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %1
%5 = icmp sle i32 %4, 7
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %1
%8 = call i32 @siftDown(i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %3
12: ; preds = %3
%13 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (...) @showElements()
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"\0A:: Elements after heapify ::\00"
define void @heapify() {
%1 = tail call i32 @siftDown(i32 1)
%2 = tail call i32 @siftDown(i32 2)
%3 = tail call i32 @siftDown(i32 3)
%4 = tail call i32 @siftDown(i32 4)
%5 = tail call i32 @siftDown(i32 5)
%6 = tail call i32 @siftDown(i32 6)
%7 = tail call i32 @siftDown(i32 7)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 (...) @showElements()
ret void
}
/* Variables and functions */
char *getenv(char *);
scalar_t__ strlen(char *);
char *is_specific() {
  char *id = getenv("WPA_ID_STR");
  if (id && strlen(id) > 0)
    return id;
  return NULL;
}


x86 assembly (clang, -O0):
<is_specific>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1163 <is_specific+0x43>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%rax
jle    1163 <is_specific+0x43>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116b <is_specific+0x4b>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_specific>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1142 <is_specific+0x22>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
test   %rax,%rax
jg     1144 <is_specific+0x24>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"WPA_ID_STR\00"
define i8* @is_specific() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %12
6: ; preds = %0
%7 = load i8*, i8** %2
%8 = call i64 @strlen(i8* %7)
%9 = icmp sgt i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = load i8*, i8** %2
store i8* %11, i8** %1
br label %13
12: ; preds = %6, %0
store i8* null, i8** %1
br label %13
13: ; preds = %12, %10
%14 = load i8*, i8** %1
ret i8* %14
}

LLVM IR (-O2):
@.str = [11 x i8] c"WPA_ID_STR\00"
define i8* @is_specific() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i64 @strlen(i8* %1)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %3, %0
br label %7
7: ; preds = %3, %6
%8 = phi i8* [ null, %6 ], [ %1, %3 ]
ret i8* %8
}
/* Variables and functions */
double ceil(double);
double floor(double);
double myround(double x) {
  if ((ceil(x) - x) > 0.5)
    return floor(x);
  else
    return ceil(x);
}


x86 assembly (clang, -O0):
<myround>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <ceil@plt>
subsd  -0x10(%rbp),%xmm0
movsd  0xebc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1162 <myround+0x42>
movsd  -0x10(%rbp),%xmm0
call   1040 <floor@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1171 <myround+0x51>
movsd  -0x10(%rbp),%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myround>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <ceil@plt>
movsd  (%rsp),%xmm2
movapd %xmm0,%xmm1
subsd  %xmm2,%xmm1
ucomisd 0xec0(%rip),%xmm1
jbe    114c <myround+0x2c>
movapd %xmm2,%xmm0
pop    %rax
jmp    1040 <floor@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @myround(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = call double @llvm.ceil.f64(double %4)
%6 = load double, double* %3
%7 = fsub double %5, %6
%8 = fcmp ogt double %7, 5.000000e-01
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load double, double* %3
%11 = call double @llvm.floor.f64(double %10)
store double %11, double* %2
br label %15
12: ; preds = %1
%13 = load double, double* %3
%14 = call double @llvm.ceil.f64(double %13)
store double %14, double* %2
br label %15
15: ; preds = %12, %9
%16 = load double, double* %2
ret double %16
}

LLVM IR (-O2):
define double @myround(double %0) {
%2 = tail call double @llvm.ceil.f64(double %0)
%3 = fsub double %2, %0
%4 = fcmp ogt double %3, 5.000000e-01
%5 = tail call double @llvm.floor.f64(double %0)
%6 = select i1 %4, double %5, double %2
ret double %6
}
/* Variables and functions */
float cosf(float);
float sinf(float);
float sinfPLUScosf(float x) {
  float s = sinf(x), c = cosf(x);
  return (s + c);
}


x86 assembly (clang, -O0):
<sinfPLUScosf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <cosf@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinfPLUScosf>:
push   %rax
movss  %xmm0,(%rsp)
call   1030 <sinf@plt>
movss  %xmm0,0x4(%rsp)
movss  (%rsp),%xmm0
call   1040 <cosf@plt>
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sinfPLUScosf(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = call float @sinf(float %5)
store float %6, float* %3
%7 = load float, float* %2
%8 = call float @cosf(float %7)
store float %8, float* %4
%9 = load float, float* %3
%10 = load float, float* %4
%11 = fadd float %9, %10
ret float %11
}

LLVM IR (-O2):
define float @sinfPLUScosf(float %0) {
%2 = tail call float @sinf(float %0)
%3 = tail call float @cosf(float %0)
%4 = fadd float %2, %3
ret float %4
}
/* Variables and functions */
float sqrt(float);
float xy_norm(float x1, float y1, float x2, float y2) {
  float x = x2 - x1;
  float y = y2 - y1;
  return sqrt(x * x + y * y);
}


x86 assembly (clang, -O0):
<xy_norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x18(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xy_norm>:
subss  %xmm0,%xmm2
subss  %xmm1,%xmm3
mulss  %xmm3,%xmm3
mulss  %xmm2,%xmm2
addss  %xmm3,%xmm2
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm2
jb     1134 <xy_norm+0x24>
xorps  %xmm0,%xmm0
sqrtss %xmm2,%xmm0
ret
movaps %xmm2,%xmm0
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define float @xy_norm(float %0, float %1, float %2, float %3) {
%5 = fsub float %2, %0
%6 = fsub float %3, %1
%7 = fmul float %6, %6
%8 = tail call float @llvm.fmuladd.f32(float %5, float %5, float %7)
%9 = tail call float @sqrt(float %8)
ret float %9
}
int cairo_code_draw_casHarmWaveLabel_get_width() { return 68; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casHarmWaveLabel_get_width() {
ret i32 68
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casHarmWaveLabel_get_width() {
ret i32 68
}
unsigned int calcoloEta(unsigned int annoDiNascita, unsigned int annoAttuale) {
  unsigned int etaAttuale;
  return etaAttuale = annoAttuale - annoDiNascita;
}


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

x86 assembly (clang, -O2):
<calcoloEta>:
mov    %esi,%eax
sub    %edi,%eax
ret

LLVM IR (-O0):
define i32 @calcoloEta(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* %4
%7 = load i32, i32* %3
%8 = sub i32 %6, %7
store i32 %8, i32* %5
ret i32 %8
}

LLVM IR (-O2):
define i32 @calcoloEta(i32 %0, i32 %1) {
%3 = sub i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ lib_x(int, void (*)(int));
void lib_h(int i, ...) { lib_x(i + 1, &lib_h); }


x86 assembly (clang, -O0):
<lib_h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    0x2ec0(%rip),%rsi
call   1030 <lib_x@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lib_h>:
add    $0x1,%edi
mov    0x2ece(%rip),%rsi
jmp    1030 <lib_x@plt>

LLVM IR (-O0):
define void @lib_h(i32 %0, ...) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = call i32 @lib_x(i32 %4, void (i32)* bitcast (void (i32, ...)* @lib_h to void (i32)*))
ret void
}

LLVM IR (-O2):
define void @lib_h(i32 %0, ...) {
%2 = add nsw i32 %0, 1
%3 = tail call i32 @lib_x(i32 %2, void (i32)* bitcast (void (i32, ...)* @lib_h to void (i32)*))
ret void
}
double ffi_test_6(float x, float y) { return x * y; }


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

x86 assembly (clang, -O2):
<ffi_test_6>:
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @ffi_test_6(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 = fmul float %5, %6
%8 = fpext float %7 to double
ret double %8
}

LLVM IR (-O2):
define double @ffi_test_6(float %0, float %1) {
%3 = fmul float %0, %1
%4 = fpext float %3 to double
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ busy_loop(void *);
void test1(void *userdata) { busy_loop(userdata); }


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

x86 assembly (clang, -O2):
<test1>:
jmp    1030 <busy_loop@plt>

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

LLVM IR (-O2):
define void @test1(i8* %0) {
%2 = tail call i32 @busy_loop(i8* %0)
ret void
}