xunge/DecIR huggingface dataset:
double form_volume(double rg) { return 1.0; }


x86 assembly (clang, -O0):
<form_volume>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<form_volume>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @form_volume(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @form_volume(double %0) {
ret double 1.000000e+00
}
int set_kth_bit_from_right(int n, int k) { return n | (1 << k); }


x86 assembly (clang, -O0):
<set_kth_bit_from_right>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @set_kth_bit_from_right(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 = shl i32 1, %6
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @set_kth_bit_from_right(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = or i32 %3, %0
ret i32 %4
}
void rust_dbg_do_nothing() {}


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

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

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

LLVM IR (-O2):
define void @rust_dbg_do_nothing() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void foobar_fini(void) {
  printf("Exit: Good Night, Foobar!\n");
  return;
}


x86 assembly (clang, -O0):
<foobar_fini>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [27 x i8] c"Exit: Good Night, Foobar!\0A\00"
define void @foobar_fini() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [26 x i8] c"Exit: Good Night, Foobar!\00"
define void @foobar_fini() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t kr_splitmix64(uint64_t x) {
  uint64_t z = (x += 0x9E3779B97F4A7C15ULL);
  z = (z ^ (z >> 30)) * 0xBF58476D1CE4E5B9ULL;
  z = (z ^ (z >> 27)) * 0x94D049BB133111EBULL;
  return z ^ (z >> 31);
}


x86 assembly (clang, -O0):
<kr_splitmix64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0x9e3779b97f4a7c15,%rcx
79 37 9e
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    $0x1e,%ecx
xor    %ecx,%eax
cltq
movabs $0xbf58476d1ce4e5b9,%rcx
47 58 bf
imul   %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    $0x1b,%ecx
xor    %ecx,%eax
cltq
movabs $0x94d049bb133111eb,%rcx
49 d0 94
imul   %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    $0x1f,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kr_splitmix64>:
add    $0x7f4a7c15,%edi
mov    %edi,%eax
sar    $0x1e,%eax
xor    %edi,%eax
imul   $0x1ce4e5b9,%eax,%eax
mov    %eax,%ecx
sar    $0x1b,%ecx
xor    %eax,%ecx
imul   $0x133111eb,%ecx,%ecx
mov    %ecx,%eax
sar    $0x1f,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @kr_splitmix64(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = add i64 %5, -7046029254386353131
%7 = trunc i64 %6 to i32
store i32 %7, i32* %2
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = ashr i32 %9, 30
%11 = xor i32 %8, %10
%12 = sext i32 %11 to i64
%13 = mul i64 %12, -4658895280553007687
%14 = trunc i64 %13 to i32
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = load i32, i32* %3
%17 = ashr i32 %16, 27
%18 = xor i32 %15, %17
%19 = sext i32 %18 to i64
%20 = mul i64 %19, -7723592293110705685
%21 = trunc i64 %20 to i32
store i32 %21, i32* %3
%22 = load i32, i32* %3
%23 = load i32, i32* %3
%24 = ashr i32 %23, 31
%25 = xor i32 %22, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @kr_splitmix64(i32 %0) {
%2 = add i32 %0, 2135587861
%3 = ashr i32 %2, 30
%4 = xor i32 %3, %2
%5 = mul i32 %4, 484763065
%6 = ashr i32 %5, 27
%7 = xor i32 %6, %5
%8 = mul i32 %7, 321982955
%9 = ashr i32 %8, 31
%10 = xor i32 %9, %8
ret i32 %10
}
int test_imm_66uint32_mem(unsigned int *val) {
  return ((*val) & (0x66 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_66uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 102
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void foo_2_1_1_1_1_1_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_1_1_1_1_1_1() {
ret void
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};

/* Variables and functions */
char *stringFieldInSubmissionSet(struct sqlConnection *, int, char *);
char *genePixPublication(struct sqlConnection *conn, int id) {
  return stringFieldInSubmissionSet(conn, id, "publication");
}


x86 assembly (clang, -O0):
<genePixPublication>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <stringFieldInSubmissionSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genePixPublication>:
lea    0xee9(%rip),%rdx
jmp    1030 <stringFieldInSubmissionSet@plt>

LLVM IR (-O0):
%struct.sqlConnection = type { i32 }
@.str = [12 x i8] c"publication\00"
define i8* @genePixPublication(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%5 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%6 = load i32, i32* %4
%7 = call i8* @stringFieldInSubmissionSet(%struct.sqlConnection* %5, i32 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
%struct.sqlConnection = type { i32 }
@.str = [12 x i8] c"publication\00"
define i8* @genePixPublication(%struct.sqlConnection* %0, i32 %1) {
%3 = tail call i8* @stringFieldInSubmissionSet(%struct.sqlConnection* %0, i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t i() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @i() {
ret i32 0
}
unsigned xrop3_10_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;
  stk2 = ~T;
  stk1 = D & stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_10_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    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%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_10_1_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
not    %cl
movzbl %cl,%ecx
not    %eax
and    %ecx,%eax
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_10_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* %7
%23 = xor i32 %22, -1
store i32 %23, i32* %9
%24 = load i32, i32* %5
%25 = load i32, i32* %9
%26 = and i32 %24, %25
store i32 %26, i32* %8
%27 = load i32, i32* %8
%28 = load i32, i32* %6
%29 = xor i32 %28, -1
%30 = and i32 %27, %29
%31 = load i32, i32* %7
%32 = xor i32 %31, -1
%33 = and i32 %30, %32
%34 = load i32, i32* %5
%35 = load i32, i32* %6
%36 = and i32 %34, %35
%37 = or i32 %33, %36
%38 = load i32, i32* %5
%39 = load i32, i32* %7
%40 = and i32 %38, %39
%41 = or i32 %37, %40
ret i32 %41
}

LLVM IR (-O2):
define i32 @xrop3_10_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i8 %1, -1
%6 = zext i8 %5 to i32
%7 = xor i32 %4, -1
%8 = and i32 %6, %7
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %8, %10
ret i32 %11
}
int Sign(double arg) {
  if (arg > 0)
    return (1);
  else if (arg < 0)
    return (-1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<Sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1127 <Sign+0x27>
movl   $0x1,-0x4(%rbp)
jmp    1148 <Sign+0x48>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1141 <Sign+0x41>
movl   $0xffffffff,-0x4(%rbp)
jmp    1148 <Sign+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @Sign(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fcmp olt double %0, 0.000000e+00
%4 = sext i1 %3 to i32
%5 = select i1 %2, i32 1, i32 %4
ret i32 %5
}
void gotos(char *a) {
L:
  a++;
  if (*a)
    goto L;
}


x86 assembly (clang, -O0):
<gotos>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1126 <gotos+0x26>
jmp    1108 <gotos+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gotos>:
add    $0x1,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <gotos+0x10>
ret

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

LLVM IR (-O2):
define void @gotos(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void start_test(const char *description) { printf("  * %s ", description); }


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

x86 assembly (clang, -O2):
<start_test>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c" * %s \00"
define void @start_test(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void NOROM_SysCtrlShutdown(void) {
  (*((volatile unsigned long *)(0x40090000 + 0x00000018))) = 0x00000001;
  while (1)
    ;
}


x86 assembly (clang, -O0):
<NOROM_SysCtrlShutdown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40090018,%eax
movq   $0x1,(%rax)
jmp    1110 <NOROM_SysCtrlShutdown+0x10>

x86 assembly (clang, -O2):
<NOROM_SysCtrlShutdown>:
movq   $0x1,0x40090018
nopl   0x0(%rax)
jmp    1110 <NOROM_SysCtrlShutdown+0x10>

LLVM IR (-O0):
define void @NOROM_SysCtrlShutdown() {
store volatile i64 1, i64* inttoptr (i64 1074331672 to i64*)
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @NOROM_SysCtrlShutdown() {
store volatile i64 1, i64* inttoptr (i64 1074331672 to i64*)
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ OpticalFlowHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void OpticalFlowUpdated() { UAVObjUpdated(OpticalFlowHandle()); }


x86 assembly (clang, -O0):
<OpticalFlowUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <OpticalFlowHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpticalFlowUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <OpticalFlowHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @OpticalFlowUpdated() {
%1 = call i32 (...) @OpticalFlowHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OpticalFlowUpdated() {
%1 = tail call i32 (...) @OpticalFlowHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
void ShutdownNetwork() {}


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

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

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

LLVM IR (-O2):
define void @ShutdownNetwork() {
ret void
}
unsigned coap_szx2size(unsigned szx) { return (1 << (szx + 4)); }


x86 assembly (clang, -O0):
<coap_szx2size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x4,%ecx
mov    $0x1,%eax
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<coap_szx2size>:
lea    0x4(%rdi),%ecx
mov    $0x1,%eax
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @coap_szx2size(i32 %0) {
%2 = add i32 %0, 4
%3 = shl nuw i32 1, %2
ret i32 %3
}
/* Type definitions */
struct task_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BUG();
void frozen_process(struct task_struct *p) { BUG(); }


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

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

LLVM IR (-O0):
%struct.task_struct = type { i32 }
define void @frozen_process(%struct.task_struct* %0) {
%2 = alloca %struct.task_struct*
store %struct.task_struct* %0, %struct.task_struct** %2
%3 = call i32 (...) @BUG()
ret void
}

LLVM IR (-O2):
%struct.task_struct = type { i32 }
define void @frozen_process(%struct.task_struct* nocapture readnone %0) {
%2 = tail call i32 (...) @BUG()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _delay_us(unsigned int);
void delay_us(unsigned int d) { _delay_us(d); }


x86 assembly (clang, -O0):
<delay_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_delay_us@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_us>:
jmp    1030 <_delay_us@plt>

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

LLVM IR (-O2):
define void @delay_us(i32 %0) {
%2 = tail call i32 @_delay_us(i32 %0)
ret void
}
/* Variables and functions */
int EOF;
int getch();
int /*<<< orphan*/ ungetch(int);
int comment(void) {
  int c;
  while ((c = getch()) != EOF)
    if (c == '*')
      if ((c = getch()) == '/')
        break;
      else
        ungetch(c);
  return c;
}


x86 assembly (clang, -O0):
<comment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getch@plt>
mov    %eax,-0x4(%rbp)
mov    0x2eaf(%rip),%rcx
cmp    (%rcx),%eax
je     1175 <comment+0x55>
cmpl   $0x2a,-0x4(%rbp)
jne    1170 <comment+0x50>
mov    $0x0,%al
call   1040 <getch@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x2f,%eax
jne    1163 <comment+0x43>
jmp    1175 <comment+0x55>
mov    -0x4(%rbp),%edi
call   1030 <ungetch@plt>
jmp    1170 <comment+0x50>
jmp    1128 <comment+0x8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comment>:
push   %rbx
xor    %eax,%eax
call   1040 <getch@plt>
mov    0x2eb9(%rip),%rbx
jmp    1147 <comment+0x27>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getch@plt>
cmp    (%rbx),%eax
je     116a <comment+0x4a>
cmp    $0x2a,%eax
jne    1140 <comment+0x20>
xor    %eax,%eax
call   1040 <getch@plt>
cmp    $0x2f,%eax
je     1165 <comment+0x45>
mov    %eax,%edi
call   1030 <ungetch@plt>
jmp    1140 <comment+0x20>
mov    $0x2f,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @comment() {
%1 = alloca i32
br label %2
2: ; preds = %17, %0
%3 = call i32 (...) @getch()
store i32 %3, i32* %1
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %3, %4
br i1 %5, label %6, label %18
6: ; preds = %2
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 42
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = call i32 (...) @getch()
store i32 %10, i32* %1
%11 = icmp eq i32 %10, 47
br i1 %11, label %12, label %13
12: ; preds = %9
br label %18
13: ; preds = %9
%14 = load i32, i32* %1
%15 = call i32 @ungetch(i32 %14)
br label %16
16: ; preds = %13
br label %17
17: ; preds = %16, %6
br label %2
18: ; preds = %12, %2
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @comment() {
%1 = tail call i32 (...) @getch()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %16, label %4
4: ; preds = %0, %12
%5 = phi i32 [ %13, %12 ], [ %1, %0 ]
%6 = icmp eq i32 %5, 42
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = tail call i32 (...) @getch()
%9 = icmp eq i32 %8, 47
br i1 %9, label %16, label %10
10: ; preds = %7
%11 = tail call i32 @ungetch(i32 %8)
br label %12
12: ; preds = %10, %4
%13 = tail call i32 (...) @getch()
%14 = load i32, i32* @EOF
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %4
16: ; preds = %12, %7, %0
%17 = phi i32 [ %1, %0 ], [ 47, %7 ], [ %13, %12 ]
ret i32 %17
}
double sum7(double a, double b, double c, double d, double e, double f,
            double g) {
  return a + b + c + d + e + f + g;
}


x86 assembly (clang, -O0):
<sum7>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum7>:
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
addsd  %xmm4,%xmm0
addsd  %xmm5,%xmm0
addsd  %xmm6,%xmm0
ret

LLVM IR (-O0):
define double @sum7(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double %6, double* %14
%15 = load double, double* %8
%16 = load double, double* %9
%17 = fadd double %15, %16
%18 = load double, double* %10
%19 = fadd double %17, %18
%20 = load double, double* %11
%21 = fadd double %19, %20
%22 = load double, double* %12
%23 = fadd double %21, %22
%24 = load double, double* %13
%25 = fadd double %23, %24
%26 = load double, double* %14
%27 = fadd double %25, %26
ret double %27
}

LLVM IR (-O2):
define double @sum7(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = fadd double %0, %1
%9 = fadd double %8, %2
%10 = fadd double %9, %3
%11 = fadd double %10, %4
%12 = fadd double %11, %5
%13 = fadd double %12, %6
ret double %13
}
int irq_can_set_affinity(unsigned int irq) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @irq_can_set_affinity(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef size_t ssize_t;

/* Variables and functions */
int bufbsdsock_write(size_t count, char const *buf, void *data) {
  int fd = *((int *)data);
  ssize_t wb = 0;
  ssize_t w = 0;
  do {
  } while (wb < count);
  return wb;
}


x86 assembly (clang, -O0):
<bufbsdsock_write>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
jmp    112e <bufbsdsock_write+0x2e>
mov    -0x28(%rbp),%rax
cmp    -0x8(%rbp),%rax
jb     1129 <bufbsdsock_write+0x29>
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bufbsdsock_write>:
test   %rdi,%rdi
je     1112 <bufbsdsock_write+0x12>
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1110 <bufbsdsock_write+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @bufbsdsock_write(i64 %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %6, label %5
5: ; preds = %3, %5
br label %5
6: ; preds = %3
ret i32 0
}
void ff_hevc_put_hevc_bi_qpel_h16_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_h16_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int /*<<< orphan*/);
int /*<<< orphan*/ creat(char *, int);
int /*<<< orphan*/ mktemp(char *);
int open(char *, int);
int /*<<< orphan*/ unlink(char *);
int tmp() {
  static char path[] = "/tmp/btXXXXXX";
  int fd;
  mktemp(path);
  close(creat(path, 0600));
  fd = open(path, 2);
  unlink(path);
  return (fd);
}


x86 assembly (clang, -O0):
<tmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0x2ee9(%rip),%rdi
call   1070 <mktemp@plt>
lea    0x2edd(%rip),%rdi
mov    $0x180,%esi
call   1060 <creat@plt>
mov    %eax,%edi
call   1040 <close@plt>
lea    0x2ec5(%rip),%rdi
mov    $0x2,%esi
call   1050 <open@plt>
mov    %eax,-0x4(%rbp)
lea    0x2eb1(%rip),%rdi
call   1030 <unlink@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tmp>:
push   %rbp
push   %rbx
push   %rax
lea    0x2eee(%rip),%rbx
mov    %rbx,%rdi
call   1070 <mktemp@plt>
mov    %rbx,%rdi
mov    $0x180,%esi
call   1060 <creat@plt>
mov    %eax,%edi
call   1040 <close@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1050 <open@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <unlink@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@tmp.path = internal global [14 x i8] c"/tmp/btXXXXXX\00"
define i32 @tmp() {
%1 = alloca i32
%2 = call i32 @mktemp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @tmp.path, i64 0, i64 0))
%3 = call i32 @creat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @tmp.path, i64 0, i64 0), i32 384)
%4 = call i32 @close(i32 %3)
%5 = call i32 @open(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @tmp.path, i64 0, i64 0), i32 2)
store i32 %5, i32* %1
%6 = call i32 @unlink(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @tmp.path, i64 0, i64 0))
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
@tmp.path = internal global [14 x i8] c"/tmp/btXXXXXX\00"
define i32 @tmp() {
%1 = tail call i32 @mktemp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @tmp.path, i64 0, i64 0))
%2 = tail call i32 @creat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @tmp.path, i64 0, i64 0), i32 384)
%3 = tail call i32 @close(i32 %2)
%4 = tail call i32 @open(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @tmp.path, i64 0, i64 0), i32 2)
%5 = tail call i32 @unlink(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @tmp.path, i64 0, i64 0))
ret i32 %4
}
/* Variables and functions */
char *String_ltrim(char *);
char *String_rtrim(char *);
char *String_trim(char *s) {
  if (!s)
    return NULL;
  if (!*s)
    return s;
  s = String_rtrim(s);
  return String_ltrim(s);
}


x86 assembly (clang, -O0):
<String_trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <String_trim+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1178 <String_trim+0x58>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    115e <String_trim+0x3e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <String_trim+0x58>
mov    -0x10(%rbp),%rdi
call   1040 <String_rtrim@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <String_ltrim@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<String_trim>:
push   %rax
test   %rdi,%rdi
je     1139 <String_trim+0x19>
cmpb   $0x0,(%rdi)
je     113b <String_trim+0x1b>
call   1040 <String_rtrim@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <String_ltrim@plt>
xor    %edi,%edi
mov    %rdi,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @String_trim(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i8* @String_rtrim(i8* %0)
%8 = tail call i8* @String_ltrim(i8* %7)
br label %9
9: ; preds = %3, %1, %6
%10 = phi i8* [ %8, %6 ], [ null, %1 ], [ %0, %3 ]
ret i8* %10
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
int fuzix_toupper(int c) {
  uint8_t cb = c;
  if ((cb >= 'a') && (cb <= 'z'))
    cb ^= 0x20;
  return cb;
}


x86 assembly (clang, -O0):
<fuzix_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1131 <fuzix_toupper+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1131 <fuzix_toupper+0x31>
movsbl -0x5(%rbp),%eax
xor    $0x20,%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fuzix_toupper>:
movsbl %dil,%ecx
shl    $0x18,%edi
add    $0x9fffffff,%edi
mov    %ecx,%eax
xor    $0x20,%eax
cmp    $0x1affffff,%edi
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fuzix_toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = icmp sge i32 %7, 97
br i1 %8, label %9, label %18
9: ; preds = %1
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = icmp sle i32 %11, 122
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = xor i32 %15, 32
%17 = trunc i32 %16 to i8
store i8 %17, i8* %3
br label %18
18: ; preds = %13, %9, %1
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @fuzix_toupper(i32 %0) {
%2 = shl i32 %0, 24
%3 = add i32 %2, -1610612737
%4 = icmp ult i32 %3, 452984831
%5 = ashr exact i32 %2, 24
%6 = xor i32 %5, 32
%7 = select i1 %4, i32 %6, i32 %5
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  printf(" 1 << 8-1: %d\n", 1 << 8 - 1);
  printf(" (1<<8) - 1: %d\n", (1 << 8) - 1);
  printf(" 1<<8 & 256: %d\n", 1 << 8 & 256);
  printf(" 1 << (8 & 256): %d\n", 1 << (8 & 256));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x80,%esi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0xff,%esi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x100,%esi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x80,%esi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0xff,%esi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x100,%esi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c" 1 << 8-1: %d\0A\00"
@.str.1 = [17 x i8] c" (1<<8) - 1: %d\0A\00"
@.str.2 = [17 x i8] c" 1<<8 & 256: %d\0A\00"
@.str.3 = [21 x i8] c" 1 << (8 & 256): %d\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 128)
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 255)
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 256)
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c" 1 << 8-1: %d\0A\00"
@.str.1 = [17 x i8] c" (1<<8) - 1: %d\0A\00"
@.str.2 = [17 x i8] c" 1<<8 & 256: %d\0A\00"
@.str.3 = [21 x i8] c" 1 << (8 & 256): %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 128)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 255)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 256)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 1)
ret i32 0
}
int test_imm_E0int8_mem(signed char *val) {
  return ((*val) & (0xE0 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E0int8_mem>:
cmpb   $0x20,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E0int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 224
%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_E0int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp ult i8 %2, 32
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage:\n"
         "-l: List the contents of the toolbox.\n"
         "-d: List the contents along with the descriptions.\n"
         "-d \"toolname\": Show the description of the \"toolname\".\n"
         "-p \"toolname\": Put the file \"toolname\" into the toolbox.\n"
         "-r \"toolname\": Remove the file \"toolname\" from the toolbox.\n"
         "-h: Show this usage help.\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [295 x i8] c"Usage:\0A-l: List the contents of the toolbox.\0A-d: List the contents along with the descriptions.\0A-d \22toolname\22: Show the description of the \22toolname\22.\0A-p \22toolname\22: Put the file \22toolname\22 into the toolbox.\0A-r \22toolname\22: Remove the file \22toolname\22 from the toolbox.\0A-h: Show this usage help.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([295 x i8], [295 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [294 x i8] c"Usage:\0A-l: List the contents of the toolbox.\0A-d: List the contents along with the descriptions.\0A-d \22toolname\22: Show the description of the \22toolname\22.\0A-p \22toolname\22: Put the file \22toolname\22 into the toolbox.\0A-r \22toolname\22: Remove the file \22toolname\22 from the toolbox.\0A-h: Show this usage help.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([294 x i8], [294 x i8]* @str, i64 0, i64 0))
ret void
}
void glutWarpPointer(int x, int y) {}


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

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

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

LLVM IR (-O2):
define void @glutWarpPointer(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_pid_get_user_unit(pid_t pid,
                                                                char **unit) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_pid_get_user_unit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_pid_get_user_unit>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_pid_get_user_unit(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_pid_get_user_unit(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
void ln_get_ecl_prec(struct ln_lnlat_posn *mean_position, double JD,
                     struct ln_lnlat_posn *position) {}


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

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

LLVM IR (-O0):
%struct.ln_lnlat_posn = type opaque
define void @ln_get_ecl_prec(%struct.ln_lnlat_posn* %0, double %1, %struct.ln_lnlat_posn* %2) {
%4 = alloca %struct.ln_lnlat_posn*
%5 = alloca double
%6 = alloca %struct.ln_lnlat_posn*
store %struct.ln_lnlat_posn* %0, %struct.ln_lnlat_posn** %4
store double %1, double* %5
store %struct.ln_lnlat_posn* %2, %struct.ln_lnlat_posn** %6
ret void
}

LLVM IR (-O2):
%struct.ln_lnlat_posn = type opaque
define void @ln_get_ecl_prec(%struct.ln_lnlat_posn* nocapture %0, double %1, %struct.ln_lnlat_posn* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  if (sizeof(int) > -1) {
    printf("True");
  } else {
    printf("False");
  }
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"False\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void handle_59(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_59(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ examinador();
void examinar() { examinador(); }


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

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

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

LLVM IR (-O2):
define void @examinar() {
%1 = tail call i32 (...) @examinador()
ret void
}
void ff_hevc_put_hevc_uni_qpel_hv48_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_hv48_10_sse4() {
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_reply_method_return(void *call, const char *types, ...) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_reply_method_return>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%eax
neg    %eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_reply_method_return>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_reply_method_return(i8* %0, i8* %1, ...) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_reply_method_return(i8* nocapture readnone %0, i8* nocapture readnone %1, ...) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int splx(int /*<<< orphan*/);
int spl0(void) { return splx(0); }


x86 assembly (clang, -O0):
<spl0>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <splx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<spl0>:
xor    %edi,%edi
jmp    1030 <splx@plt>

LLVM IR (-O0):
define i32 @spl0() {
%1 = call i32 @splx(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @spl0() {
%1 = tail call i32 @splx(i32 0)
ret i32 %1
}
void fmDisablePorts(void) {}


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

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

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

LLVM IR (-O2):
define void @fmDisablePorts() {
ret void
}
/* Variables and functions */
scalar_t__ mock(char *);
char *cf_s_inbound(char *s) { return (char *)mock(s); }


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

x86 assembly (clang, -O2):
<cf_s_inbound>:
jmp    1030 <mock@plt>

LLVM IR (-O0):
define i8* @cf_s_inbound(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @mock(i8* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @cf_s_inbound(i8* %0) {
%2 = tail call i64 @mock(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
void fd148(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  p02A:
    goto p02A;
    goto a;
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  a:;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd148>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd148+0x7>

x86 assembly (clang, -O2):
<fd148>:
jmp    1100 <fd148>

LLVM IR (-O0):
define void @fd148(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; preds = %27
br label %27
28: ; No predecessors!
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
br label %31
31: ; preds = %31, %28
br label %31
32: ; preds = %32
br label %32
33: ; No predecessors!
%34 = load i32, i32* %2
%35 = zext i32 %34 to i64
br label %36
36: ; preds = %36, %33
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd148(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
int is(char *num, int *p) {
  while (*num) {
    if (*(p + ((*num) - '0'))) {
      return 1;
    }
    num++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1151 <is+0x51>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1140 <is+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1158 <is+0x58>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <is+0xc>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1129 <is+0x29>
add    $0x1,%rdi
nopl   0x0(%rax)
movsbq %cl,%rcx
cmpl   $0x0,-0xc0(%rsi,%rcx,4)
jne    112a <is+0x2a>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <is+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is(i8* nocapture %0, i32* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %17, label %8
5: ; preds = %8
%6 = load i8, i8* %16
%7 = icmp eq i8 %6, 0
br i1 %7, label %17, label %8
8: ; preds = %2, %5
%9 = phi i8 [ %6, %5 ], [ %3, %2 ]
%10 = phi i8* [ %16, %5 ], [ %0, %2 ]
%11 = sext i8 %9 to i64
%12 = add nsw i64 %11, -48
%13 = getelementptr inbounds i32, i32* %1, i64 %12
%14 = load i32, i32* %13
%15 = icmp eq i32 %14, 0
%16 = getelementptr inbounds i8, i8* %10, i64 1
br i1 %15, label %5, label %17
17: ; preds = %8, %5, %2
%18 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %8 ]
ret i32 %18
}
void ASN1_ENUMERATED_new(void) {}


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

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

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

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