xunge/DecIR huggingface dataset:
unsigned char read_byte(unsigned int addr) {
  while (*((volatile unsigned char *)(0x3F)) & (1 << 1))
    ;
  *((volatile unsigned char *)(0x41)) = addr;
  (*((volatile unsigned char *)(0x3F)) |= (1 << 0));
  return *((volatile unsigned char *)(0x40));
}


x86 assembly (clang, -O0):
<read_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x3f,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1122 <read_byte+0x22>
jmp    1107 <read_byte+0x7>
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    $0x41,%eax
mov    %cl,(%rax)
mov    $0x3f,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x1,%eax
mov    %al,%cl
mov    $0x3f,%eax
mov    %cl,(%rax)
mov    $0x40,%eax
mov    (%rax),%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_byte>:
testb  $0x2,0x3f
02
jne    1100 <read_byte>
mov    %dil,0x41
orb    $0x1,0x3f
01
mov    0x40,%al
ret

LLVM IR (-O0):
define zeroext i8 @read_byte(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %8, %1
%4 = load volatile i8, i8* inttoptr (i64 63 to i8*)
%5 = zext i8 %4 to i32
%6 = and i32 %5, 2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %3
br label %3
9: ; preds = %3
%10 = load i32, i32* %2
%11 = trunc i32 %10 to i8
store volatile i8 %11, i8* inttoptr (i64 65 to i8*)
%12 = load volatile i8, i8* inttoptr (i64 63 to i8*)
%13 = zext i8 %12 to i32
%14 = or i32 %13, 1
%15 = trunc i32 %14 to i8
store volatile i8 %15, i8* inttoptr (i64 63 to i8*)
%16 = load volatile i8, i8* inttoptr (i64 64 to i8*)
ret i8 %16
}

LLVM IR (-O2):
define zeroext i8 @read_byte(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i8, i8* inttoptr (i64 63 to i8*)
%4 = and i8 %3, 2
%5 = icmp eq i8 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
%7 = trunc i32 %0 to i8
store volatile i8 %7, i8* inttoptr (i64 65 to i8*)
%8 = load volatile i8, i8* inttoptr (i64 63 to i8*)
%9 = or i8 %8, 1
store volatile i8 %9, i8* inttoptr (i64 63 to i8*)
%10 = load volatile i8, i8* inttoptr (i64 64 to i8*)
ret i8 %10
}
void glClearColorx(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glClearColorx() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *stdout;
void uninit_fputs(void) {
  const char *s;
  FILE *fp;
  fputs("a", stdout);
  fputs(s, stdout);
  fputs("a", fp);
}


x86 assembly (clang, -O0):
<uninit_fputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%rsi
lea    0xed7(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
mov    0x2ea7(%rip),%rax
mov    (%rax),%rsi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninit_fputs>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%rsi
mov    $0x61,%edi
call   1040 <fputc@plt>
mov    (%rbx),%rsi
call   1030 <fputs@plt>
mov    $0x61,%edi
pop    %rbx
jmp    1040 <fputc@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@stdout = global i32* null
define void @uninit_fputs() {
%1 = alloca i8*
%2 = alloca i32*
%3 = load i32*, i32** @stdout
%4 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = load i8*, i8** %1
%6 = load i32*, i32** @stdout
%7 = call i32 @fputs(i8* %5, i32* %6)
%8 = load i32*, i32** %2
%9 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* %8)
ret void
}

LLVM IR (-O2):
@stdout = global i32* null
define void @uninit_fputs() {
%1 = load i32*, i32** @stdout
%2 = tail call i32 @fputc(i32 97, i32* %1)
%3 = load i32*, i32** @stdout
%4 = tail call i32 @fputs(i8* undef, i32* %3)
%5 = tail call i32 @fputc(i32 97, i32* undef)
ret void
}
/* Type definitions */
struct ArrayList {
  int dummy;
};

/* Variables and functions */
int ArrayList_indexOf(struct ArrayList const *, void const *);
int ArrayList_contains(const struct ArrayList *this, const void *item) {
  if (this == NULL)
    return -2;
  int result = ArrayList_indexOf(this, item);
  return result < 0 ? result : result >= 0;
}


x86 assembly (clang, -O0):
<ArrayList_contains>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <ArrayList_contains+0x27>
movl   $0xfffffffe,-0x4(%rbp)
jmp    1171 <ArrayList_contains+0x61>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <ArrayList_indexOf@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    115c <ArrayList_contains+0x4c>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    116b <ArrayList_contains+0x5b>
cmpl   $0x0,-0x1c(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ArrayList_contains>:
test   %rdi,%rdi
je     112c <ArrayList_contains+0x1c>
push   %rax
call   1030 <ArrayList_indexOf@plt>
mov    %eax,%ecx
not    %eax
shr    $0x1f,%eax
test   %ecx,%ecx
cmovs  %ecx,%eax
add    $0x8,%rsp
ret
mov    $0xfffffffe,%eax
ret

LLVM IR (-O0):
%struct.ArrayList = type { i32 }
define i32 @ArrayList_contains(%struct.ArrayList* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.ArrayList*
%5 = alloca i8*
%6 = alloca i32
store %struct.ArrayList* %0, %struct.ArrayList** %4
store i8* %1, i8** %5
%7 = load %struct.ArrayList*, %struct.ArrayList** %4
%8 = icmp eq %struct.ArrayList* %7, null
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 -2, i32* %3
br label %24
10: ; preds = %2
%11 = load %struct.ArrayList*, %struct.ArrayList** %4
%12 = load i8*, i8** %5
%13 = call i32 @ArrayList_indexOf(%struct.ArrayList* %11, i8* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %10
%17 = load i32, i32* %6
br label %22
18: ; preds = %10
%19 = load i32, i32* %6
%20 = icmp sge i32 %19, 0
%21 = zext i1 %20 to i32
br label %22
22: ; preds = %18, %16
%23 = phi i32 [ %17, %16 ], [ %21, %18 ]
store i32 %23, i32* %3
br label %24
24: ; preds = %22, %9
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
%struct.ArrayList = type { i32 }
define i32 @ArrayList_contains(%struct.ArrayList* %0, i8* %1) {
%3 = icmp eq %struct.ArrayList* %0, null
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = tail call i32 @ArrayList_indexOf(%struct.ArrayList* %0, i8* %1)
%6 = icmp slt i32 %5, 0
%7 = xor i32 %5, -1
%8 = lshr i32 %7, 31
%9 = select i1 %6, i32 %5, i32 %8
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ %9, %4 ], [ -2, %2 ]
ret i32 %11
}
int test_imm_D4uint8_mem(unsigned char *val) {
  return ((*val) & (-0xD4 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D4uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -212
%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_D4uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 44
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
float math_acosf(float);
float call_acosf(float x) { return math_acosf(x); }


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

x86 assembly (clang, -O2):
<call_acosf>:
jmp    1030 <math_acosf@plt>

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

LLVM IR (-O2):
define float @call_acosf(float %0) {
%2 = tail call float @math_acosf(float %0)
ret float %2
}
int c(int x, int y) {
  unsigned t = x & y;
  unsigned tt = x | y;
  tt = tt + 1;
  return t - tt;
}


x86 assembly (clang, -O0):
<c>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c>:
mov    %esi,%eax
and    %edi,%eax
or     %edi,%esi
not    %esi
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @c(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = and i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = or i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = add i32 %13, 1
store i32 %14, i32* %6
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = sub i32 %15, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @c(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = or i32 %1, %0
%5 = xor i32 %4, -1
%6 = add i32 %3, %5
ret i32 %6
}
/* Variables and functions */
int nrf_802154_core_cca_cfg_update();
bool nrf_802154_request_cca_cfg_update(void) {
  bool result;
  result = nrf_802154_core_cca_cfg_update();
  return result;
}


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

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

LLVM IR (-O0):
define i32 @nrf_802154_request_cca_cfg_update() {
%1 = alloca i32
%2 = call i32 (...) @nrf_802154_core_cca_cfg_update()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @nrf_802154_request_cca_cfg_update() {
%1 = tail call i32 (...) @nrf_802154_core_cca_cfg_update()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void alpha_blend_replace(uint32_t *dest_bmp, uint32_t *src_bmp) {
  *dest_bmp = *src_bmp;
}


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

x86 assembly (clang, -O2):
<alpha_blend_replace>:
mov    (%rsi),%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @alpha_blend_replace(i32* nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
store i32 %3, i32* %0
ret void
}
long double fmaxl(long double x, long double y) { return (x > y) ? x : y; }


x86 assembly (clang, -O0):
<fmaxl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jbe    1132 <fmaxl+0x32>
jmp    1127 <fmaxl+0x27>
fldt   -0x10(%rbp)
fstpt  -0x2c(%rbp)
jmp    1138 <fmaxl+0x38>
fldt   -0x20(%rbp)
fstpt  -0x2c(%rbp)
fldt   -0x2c(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmaxl>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fucomi %st(1),%st
fxch   %st(1)
fcmovnbe %st(1),%st
fstp   %st(1)
ret

LLVM IR (-O0):
define x86_fp80 @fmaxl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fcmp ogt x86_fp80 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load x86_fp80, x86_fp80* %3
br label %12
10: ; preds = %2
%11 = load x86_fp80, x86_fp80* %4
br label %12
12: ; preds = %10, %8
%13 = phi x86_fp80 [ %9, %8 ], [ %11, %10 ]
ret x86_fp80 %13
}

LLVM IR (-O2):
define x86_fp80 @fmaxl(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp ogt x86_fp80 %0, %1
%4 = select i1 %3, x86_fp80 %0, x86_fp80 %1
ret x86_fp80 %4
}
/* Variables and functions */
char *frob();
int /*<<< orphan*/ oof();
test_2(int code) {
  char *temp = frob();
  int rotate = (code == 22);
  if (!rotate && temp == 0)
    oof();
}


x86 assembly (clang, -O0):
<test_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <frob@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x16,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1161 <test_2+0x41>
cmpq   $0x0,-0x10(%rbp)
jne    1161 <test_2+0x41>
mov    $0x0,%al
call   1030 <oof@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_2>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <frob@plt>
cmp    $0x16,%ebx
je     113b <test_2+0x1b>
test   %rax,%rax
jne    113b <test_2+0x1b>
xor    %eax,%eax
call   1030 <oof@plt>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
%6 = call i8* (...) @frob()
store i8* %6, i8** %4
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 22
%9 = zext i1 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp ne i32 %10, 0
br i1 %11, label %17, label %12
12: ; preds = %1
%13 = load i8*, i8** %4
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 (...) @oof()
br label %17
17: ; preds = %15, %12, %1
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @test_2(i32 %0) {
%2 = tail call i8* (...) @frob()
%3 = icmp ne i32 %0, 22
%4 = icmp eq i8* %2, null
%5 = select i1 %3, i1 %4, i1 false
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 (...) @oof()
br label %8
8: ; preds = %6, %1
ret i32 undef
}
unsigned long Sys_HashKey(const char *str) {
  unsigned long hash = 0;
  int c;
  while ((c = *str++))
    hash = (c & ~32) + (hash << 6) + (hash << 16) - hash;
  return hash;
}


x86 assembly (clang, -O0):
<Sys_HashKey>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1159 <Sys_HashKey+0x59>
mov    -0x14(%rbp),%eax
and    $0xffffffdf,%eax
cltq
mov    -0x10(%rbp),%rcx
shl    $0x6,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%rcx
shl    $0x10,%rcx
add    %rcx,%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <Sys_HashKey+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_HashKey>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <Sys_HashKey+0x2d>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
and    $0xdf,%cl
movsbq %cl,%rcx
imul   $0x1003f,%rax,%rax
add    %rcx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <Sys_HashKey+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @Sys_HashKey(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %12, %4 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = and i8 %5, -33
%10 = sext i8 %9 to i64
%11 = mul i64 %7, 65599
%12 = add i64 %11, %10
%13 = load i8, i8* %8
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i64 [ 0, %1 ], [ %12, %4 ]
ret i64 %16
}
/* Variables and functions */
int strlen(char const *);
int strncmp(char const *, char const *, int);
int llist_strncmp(const char *s1, const char *s2) {
  int len, rv;
  len = strlen(s1);
  rv = strncmp(s1, s2, len);
  return rv;
}


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

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

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

LLVM IR (-O2):
define i32 @llist_strncmp(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strncmp(i8* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("C-stuff-1\n"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"C-stuff-1\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"C-stuff-1\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_srl_si64(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test64(__m64 a, __m64 b) { return _mm_srl_si64(a, b); }


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

x86 assembly (clang, -O2):
<test64>:
jmp    1030 <_mm_srl_si64@plt>

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

LLVM IR (-O2):
define i32 @test64(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_srl_si64(i32 %0, i32 %1)
ret i32 %3
}
int tegra_soc_speedo_id(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tegra_soc_speedo_id() {
ret i32 0
}
/* Type definitions */
struct sched_param {
  int sched_priority;
};

/* Variables and functions */
int /*<<< orphan*/ SCHED_RR;
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ query_policy();
int /*<<< orphan*/ sched_setscheduler(int /*<<< orphan*/, int /*<<< orphan*/,
                                      struct sched_param *);
int main() {
  struct sched_param param;
  param.sched_priority = 60;
  query_policy();
  getchar();
  sched_setscheduler(0, SCHED_RR, &param);
  getchar();
  query_policy();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3c,-0x8(%rbp)
mov    $0x0,%al
call   1050 <query_policy@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setscheduler@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    $0x0,%al
call   1050 <query_policy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x3c,(%rsp)
xor    %eax,%eax
call   1050 <query_policy@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
xor    %edi,%edi
call   1030 <sched_setscheduler@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
call   1050 <query_policy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sched_param = type { i32 }
@SCHED_RR = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.sched_param
store i32 0, i32* %1
%3 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %2, i32 0, i32 0
store i32 60, i32* %3
%4 = call i32 (...) @query_policy()
%5 = call i32 (...) @getchar()
%6 = load i32, i32* @SCHED_RR
%7 = call i32 @sched_setscheduler(i32 0, i32 %6, %struct.sched_param* %2)
%8 = call i32 (...) @getchar()
%9 = call i32 (...) @query_policy()
ret i32 0
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
@SCHED_RR = global i32 0
define i32 @main() {
%1 = alloca %struct.sched_param
%2 = bitcast %struct.sched_param* %1 to i8*
%3 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %1, i64 0, i32 0
store i32 60, i32* %3
%4 = tail call i32 (...) @query_policy()
%5 = tail call i32 (...) @getchar()
%6 = load i32, i32* @SCHED_RR
%7 = call i32 @sched_setscheduler(i32 0, i32 %6, %struct.sched_param* %1)
%8 = call i32 (...) @getchar()
%9 = call i32 (...) @query_policy()
ret i32 0
}
void ARGBShuffleRow_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ARGBShuffleRow_Any_SSSE3() {
ret void
}
double I_tan(x)
double x;
{ return I_sin(x) / I_cos(x); }


x86 assembly (clang, -O0):
<I_tan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1040 <I_sin@plt>
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1030 <I_cos@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I_tan>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1040 <I_sin@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1030 <I_cos@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @I_tan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 (double, ...) bitcast (i32 (...)* @I_sin to i32 (double, ...)*)(double %3)
%5 = load double, double* %2
%6 = call i32 (double, ...) bitcast (i32 (...)* @I_cos to i32 (double, ...)*)(double %5)
%7 = sdiv i32 %4, %6
%8 = sitofp i32 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @I_tan(double %0) {
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @I_sin to i32 (double, ...)*)(double %0)
%3 = tail call i32 (double, ...) bitcast (i32 (...)* @I_cos to i32 (double, ...)*)(double %0)
%4 = sdiv i32 %2, %3
%5 = sitofp i32 %4 to double
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getuid();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%u\n", getuid());
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getuid@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getuid()
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getuid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
struct timeval MQTTClient_start_clock(void) {
  static struct timeval start;
  gettimeofday(&start, NULL);
  return start;
}


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

x86 assembly (clang, -O2):
<MQTTClient_start_clock>:
push   %rax
lea    0x2f14(%rip),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    0x2f07(%rip),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
@MQTTClient_start_clock.start = internal global %struct.timeval zeroinitializer
define i32 @MQTTClient_start_clock() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* @MQTTClient_start_clock.start, i32* null)
%3 = bitcast %struct.timeval* %1 to i8*
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@MQTTClient_start_clock.start = internal global %struct.timeval zeroinitializer
define i32 @MQTTClient_start_clock() {
%1 = tail call i32 @gettimeofday(%struct.timeval* @MQTTClient_start_clock.start, i32* null)
%2 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @MQTTClient_start_clock.start, i64 0, i32 0)
ret i32 %2
}
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local1;
  {
    state[0UL] = (input[0UL] | 51238316UL) >> 3U;
    local1 = 0UL;
    while (local1 < 1UL) {
      state[0UL] <<= ((state[0UL] >> 3U) & 7U) | 1UL;
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] | 28054104UL) | 326507717U;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
or     $0x30dd5ac,%rax
shr    $0x3,%rax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    $0x1,%rax
jae    115b <RandomFunc+0x5b>
mov    -0x14(%rbp),%eax
shr    $0x3,%eax
and    $0x7,%eax
mov    %eax,%eax
mov    %eax,%ecx
or     $0x1,%rcx
mov    -0x14(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x18(%rbp)
jmp    1126 <RandomFunc+0x26>
mov    -0x14(%rbp),%eax
or     $0x1ac1258,%rax
or     $0x13761cc5,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%eax
shl    $0x4,%eax
and    $0xcc00a100,%eax
or     $0x33ff5edd,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1 x i32]
%6 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = zext i32 %9 to i64
%11 = or i64 %10, 51238316
%12 = lshr i64 %11, 3
%13 = trunc i64 %12 to i32
%14 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 %13, i32* %14
store i32 0, i32* %6
br label %15
15: ; preds = %19, %2
%16 = load i32, i32* %6
%17 = zext i32 %16 to i64
%18 = icmp ult i64 %17, 1
br i1 %18, label %19, label %34
19: ; preds = %15
%20 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%21 = load i32, i32* %20
%22 = lshr i32 %21, 3
%23 = and i32 %22, 7
%24 = zext i32 %23 to i64
%25 = or i64 %24, 1
%26 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%27 = load i32, i32* %26
%28 = trunc i64 %25 to i32
%29 = shl i32 %27, %28
store i32 %29, i32* %26
%30 = load i32, i32* %6
%31 = zext i32 %30 to i64
%32 = add i64 %31, 2
%33 = trunc i64 %32 to i32
store i32 %33, i32* %6
br label %15
34: ; preds = %15
%35 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%36 = load i32, i32* %35
%37 = zext i32 %36 to i64
%38 = or i64 %37, 28054104
%39 = or i64 %38, 326507717
%40 = trunc i64 %39 to i32
%41 = load i32*, i32** %4
%42 = getelementptr inbounds i32, i32* %41, i64 0
store i32 %40, i32* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = shl i32 %3, 4
%5 = and i32 %4, -872374016
%6 = or i32 %5, 872373981
store i32 %6, i32* %1
ret void
}
/* Type definitions */
typedef int ptrdiff_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
void ptrdiff_put(ptrdiff_t number, FILE *stream) {
  if (number > (ptrdiff_t)9) {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
    ptrdiff_put(number / (ptrdiff_t)10, stream);
#pragma GCC diagnostic pop
  }
  fputc('0' + (char)(number % (ptrdiff_t)10), stream);
}


x86 assembly (clang, -O0):
<ptrdiff_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x9,-0x4(%rbp)
jle    114f <ptrdiff_put+0x2f>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1030 <ptrdiff_put@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %dl,%al
movsbl %al,%eax
add    $0x30,%eax
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1040 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptrdiff_put>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
cmp    $0xa,%edi
jl     1144 <ptrdiff_put+0x24>
mov    %ebp,%eax
mov    $0xcccccccd,%edi
imul   %rax,%rdi
shr    $0x23,%rdi
mov    %rbx,%rsi
call   1030 <ptrdiff_put@plt>
movslq %ebp,%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebp
add    $0x30,%bpl
movsbl %bpl,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fputc@plt>

LLVM IR (-O0):
define void @ptrdiff_put(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 = icmp sgt i32 %5, 9
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* %3
%9 = sdiv i32 %8, 10
%10 = load i32*, i32** %4
br label %11
11: ; preds = %7, %2
%12 = load i32, i32* %3
%13 = srem i32 %12, 10
%14 = trunc i32 %13 to i8
%15 = sext i8 %14 to i32
%16 = add nsw i32 48, %15
%17 = trunc i32 %16 to i8
%18 = load i32*, i32** %4
%19 = call i32 @fputc(i8 signext %17, i32* %18)
ret void
}

LLVM IR (-O2):
define void @ptrdiff_put(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 9
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = udiv i32 %0, 10
tail call void @ptrdiff_put(i32 %5, i32* %1)
br label %6
6: ; preds = %4, %2
%7 = srem i32 %0, 10
%8 = trunc i32 %7 to i8
%9 = add nsw i8 %8, 48
%10 = tail call i32 @fputc(i8 signext %9, i32* %1)
ret void
}
void ff_hevc_put_hevc_uni_qpel_v4_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_v4_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_alnum_args(char *args) {
  if (args != NULL)
    free(args);
}


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

x86 assembly (clang, -O2):
<free_alnum_args>:
test   %rdi,%rdi
je     111a <free_alnum_args+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @free_alnum_args(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int myfunc(int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int x = 5;
  int y = myfunc(x);
  printf("Vals: %d %d\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <myfunc@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1040 <myfunc@plt>
lea    0xece(%rip),%rdi
mov    $0x5,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"Vals: %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @myfunc(i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 5, i32 %1)
ret i32 0
}
void maximaCircleCollision(double *array, unsigned int _array_high, double a,
                           double b, double c, double d, double e, double f,
                           double g, double h, double k, double l, double m,
                           double n, double o, double p) {}


x86 assembly (clang, -O0):
<maximaCircleCollision>:
push   %rbp
mov    %rsp,%rbp
movsd  0x38(%rbp),%xmm8
movsd  0x30(%rbp),%xmm8
movsd  0x28(%rbp),%xmm8
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movsd  %xmm4,-0x38(%rbp)
movsd  %xmm5,-0x40(%rbp)
movsd  %xmm6,-0x48(%rbp)
movsd  %xmm7,-0x50(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @maximaCircleCollision(double* %0, i32 %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, double %11, double %12, double %13, double %14, double %15) {
%17 = alloca double*
%18 = alloca i32
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
store double* %0, double** %17
store i32 %1, i32* %18
store double %2, double* %19
store double %3, double* %20
store double %4, double* %21
store double %5, double* %22
store double %6, double* %23
store double %7, double* %24
store double %8, double* %25
store double %9, double* %26
store double %10, double* %27
store double %11, double* %28
store double %12, double* %29
store double %13, double* %30
store double %14, double* %31
store double %15, double* %32
ret void
}

LLVM IR (-O2):
define void @maximaCircleCollision(double* nocapture %0, i32 %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, double %11, double %12, double %13, double %14, double %15) {
ret void
}
void _dummy_isr(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<_dummy_isr>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <_dummy_isr+0x9>
jmp    1109 <_dummy_isr+0x9>

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

LLVM IR (-O0):
define void @_dummy_isr() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @_dummy_isr() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int *allocate_int();
int /*<<< orphan*/ set(int *, int);
void deref_null() {
  int *p = allocate_int();
  set(p, 42);
}


x86 assembly (clang, -O0):
<deref_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <allocate_int@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2a,%esi
call   1040 <set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deref_null>:
push   %rax
xor    %eax,%eax
call   1030 <allocate_int@plt>
mov    %rax,%rdi
mov    $0x2a,%esi
pop    %rax
jmp    1040 <set@plt>

LLVM IR (-O0):
define void @deref_null() {
%1 = alloca i32*
%2 = call i32* (...) @allocate_int()
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @set(i32* %3, i32 42)
ret void
}

LLVM IR (-O2):
define void @deref_null() {
%1 = tail call i32* (...) @allocate_int()
%2 = tail call i32 @set(i32* %1, i32 42)
ret void
}
void foo663(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo663(i32 %0) {
ret void
}
const char *pathcon_nm8_name_out(int i) {
  switch (i) {
  case 0:
    return "o0";
  case 1:
    return "o1";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<pathcon_nm8_name_out>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <pathcon_nm8_name_out+0x2b>
jmp    111a <pathcon_nm8_name_out+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <pathcon_nm8_name_out+0x3b>
jmp    114b <pathcon_nm8_name_out+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <pathcon_nm8_name_out+0x53>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <pathcon_nm8_name_out+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm8_name_out>:
xor    %ecx,%ecx
cmp    $0x1,%edi
lea    0xef7(%rip),%rax
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee7(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
define i8* @pathcon_nm8_name_out(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* null, i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
define i8* @pathcon_nm8_name_out(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct rusage {
  TYPE_1__ ru_utime;
};

/* Variables and functions */
int /*<<< orphan*/ RUSAGE_SELF;
int /*<<< orphan*/ getrusage(int /*<<< orphan*/, struct rusage *);
double HPL_timer_cputime(void) {
  struct rusage ruse;
  double cputime;
  (void)getrusage(RUSAGE_SELF, &ruse);
  cputime = ((double)(ruse.ru_utime.tv_sec) +
             ((double)(ruse.ru_utime.tv_usec) / 1000000.0));
  return cputime;
}


x86 assembly (clang, -O0):
<HPL_timer_cputime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <getrusage@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
movsd  0xec2(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HPL_timer_cputime>:
sub    $0x18,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <getrusage@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
divsd  0xec3(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.rusage = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64, i64 }
@RUSAGE_SELF = global i32 0
define double @HPL_timer_cputime() {
%1 = alloca %struct.rusage
%2 = alloca double
%3 = load i32, i32* @RUSAGE_SELF
%4 = call i32 @getrusage(i32 %3, %struct.rusage* %1)
%5 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %5, i32 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i32 0, i32 0
%10 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %9, i32 0, i32 0
%11 = load i64, i64* %10
%12 = sitofp i64 %11 to double
%13 = fdiv double %12, 1.000000e+06
%14 = fadd double %8, %13
store double %14, double* %2
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
%struct.rusage = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64, i64 }
@RUSAGE_SELF = global i32 0
define double @HPL_timer_cputime() {
%1 = alloca %struct.rusage
%2 = bitcast %struct.rusage* %1 to i8*
%3 = load i32, i32* @RUSAGE_SELF
%4 = call i32 @getrusage(i32 %3, %struct.rusage* %1)
%5 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 0, i32 1
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 0, i32 0
%9 = load i64, i64* %8
%10 = sitofp i64 %9 to double
%11 = fdiv double %10, 1.000000e+06
%12 = fadd double %11, %7
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int front(int regimento, int valor) {
  int delta = 100;
  if (regimento == 4)
    delta = 30;
  if (0 >= 2) {
    printf("Regimento: %d, homens: %d\n", regimento, valor);
  }
  return (valor + delta);
}


x86 assembly (clang, -O0):
<front>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x64,-0xc(%rbp)
cmpl   $0x4,-0x4(%rbp)
jne    1122 <front+0x22>
movl   $0x1e,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<front>:
lea    0x64(%rsi),%ecx
lea    0x1e(%rsi),%eax
cmp    $0x4,%edi
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @front(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 4
%4 = select i1 %3, i32 30, i32 100
%5 = add nsw i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_panic__();
void _assert_string_not_equal(const char *const a, const char *const b,
                              const char *file, const int line) {
  __coverity_panic__();
}


x86 assembly (clang, -O0):
<_assert_string_not_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <__coverity_panic__@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @_assert_string_not_equal(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = call i32 (...) @__coverity_panic__()
ret void
}

LLVM IR (-O2):
define void @_assert_string_not_equal(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
%5 = tail call i32 (...) @__coverity_panic__()
ret void
}
/* Variables and functions */
int round(double const);
double const sin(double);
double rounded_sin(double x) {
  const double faktor = 100;
  return round(faktor * sin(x)) * (1 / faktor);
}


x86 assembly (clang, -O0):
<rounded_sin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xeb9(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <round@plt>
cvtsi2sd %eax,%xmm0
movsd  0xe9c(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rounded_sin>:
push   %rax
call   1030 <sin@plt>
mulsd  0xed2(%rip),%xmm0
call   1040 <round@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xec6(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rounded_sin(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 1.000000e+02, double* %3
%4 = load double, double* %2
%5 = call double @sin(double %4)
%6 = fmul double 1.000000e+02, %5
%7 = call i32 @round(double %6)
%8 = sitofp i32 %7 to double
%9 = fmul double %8, 1.000000e-02
ret double %9
}

LLVM IR (-O2):
define double @rounded_sin(double %0) {
%2 = tail call double @sin(double %0)
%3 = fmul double %2, 1.000000e+02
%4 = tail call i32 @round(double %3)
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 1.000000e-02
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __get_unaligned_le16(int /*<<< orphan*/ const *);
uint16_t get_unaligned_le16(const void *p) {
  return __get_unaligned_le16((const uint8_t *)p);
}


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

x86 assembly (clang, -O2):
<get_unaligned_le16>:
jmp    1030 <__get_unaligned_le16@plt>

LLVM IR (-O0):
define i32 @get_unaligned_le16(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @__get_unaligned_le16(i32* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_unaligned_le16(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @__get_unaligned_le16(i32* %2)
ret i32 %3
}