xunge/DecIR huggingface dataset:
void Start_Precise_Delay() {}


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

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

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

LLVM IR (-O2):
define void @Start_Precise_Delay() {
ret void
}
/* Variables and functions */
int round(double a) {
  if (a > 0.0)
    return (int)(a + 0.5);
  else
    return (int)(a - 0.5);
}


x86 assembly (clang, -O0):
<round>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1134 <round+0x34>
movsd  0xedd(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
jmp    114c <round+0x4c>
movsd  -0x10(%rbp),%xmm0
movsd  0xebf(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
lea    0xeec(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @round(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 %10
6: ; preds = %1
%7 = load double, double* %3
%8 = fadd double %7, 5.000000e-01
%9 = fptosi double %8 to i32
store i32 %9, i32* %2
br label %14
10: ; preds = %1
%11 = load double, double* %3
%12 = fsub double %11, 5.000000e-01
%13 = fptosi double %12 to i32
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @round(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = select i1 %2, double 5.000000e-01, double -5.000000e-01
%4 = fadd double %3, %0
%5 = fptosi double %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ ERA_T_FMT;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_era_t_fmt() { return nl_langinfo(ERA_T_FMT); }


x86 assembly (clang, -O0):
<langinfo_era_t_fmt>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_era_t_fmt>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@ERA_T_FMT = global i32 0
define i8* @langinfo_era_t_fmt() {
%1 = load i32, i32* @ERA_T_FMT
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@ERA_T_FMT = global i32 0
define i8* @langinfo_era_t_fmt() {
%1 = load i32, i32* @ERA_T_FMT
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ XIMCallback;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XIMCallback(void) {
  XIMCallback *_p = (XIMCallback *)malloc(sizeof(XIMCallback));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XIMCallback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XIMCallback+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XIMCallback>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XIMCallback+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XIMCallback() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XIMCallback() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
int diff(char const *a __attribute__((unused)),
         char const *b __attribute__((unused)),
         char const *udata __attribute__((unused)),
         int uleng __attribute__((unused))) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @diff(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
ret i32 0
}

LLVM IR (-O2):
define i32 @diff(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i32 0
}
/* Variables and functions */
scalar_t__ argint(int /*<<< orphan*/, int *);
int kill(int);
int sys_kill(void) {
  int pid;
  if (argint(0, &pid) < 0)
    return -1;
  return kill(pid);
}


x86 assembly (clang, -O0):
<sys_kill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0x8(%rbp),%rsi
call   1040 <argint@plt>
cmp    $0x0,%rax
jge    1149 <sys_kill+0x29>
movl   $0xffffffff,-0x4(%rbp)
jmp    1154 <sys_kill+0x34>
mov    -0x8(%rbp),%edi
call   1030 <kill@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_kill>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %edi,%edi
call   1040 <argint@plt>
test   %rax,%rax
js     113d <sys_kill+0x1d>
mov    0x4(%rsp),%edi
call   1030 <kill@plt>
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sys_kill() {
%1 = alloca i32
%2 = alloca i32
%3 = call i64 @argint(i32 0, i32* %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 -1, i32* %1
br label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = call i32 @kill(i32 %7)
store i32 %8, i32* %1
br label %9
9: ; preds = %6, %5
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @sys_kill() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @argint(i32 0, i32* %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i32, i32* %1
%7 = call i32 @kill(i32 %6)
br label %8
8: ; preds = %0, %5
%9 = phi i32 [ %7, %5 ], [ -1, %0 ]
ret i32 %9
}
void rop3_87_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T | S;
  stk1 = *D & stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_87_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_87_1_1>:
mov    (%rdi),%al
mov    %edx,%ecx
or     %sil,%cl
not    %cl
and    %al,%sil
or     %cl,%sil
and    %dl,%al
or     %sil,%al
mov    %al,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_87_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = xor i8 %5, -1
%7 = and i8 %4, %1
%8 = or i8 %7, %6
%9 = and i8 %4, %2
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
void bch_data_verify(struct cached_dev *dc, struct bio *bio) {}


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

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

LLVM IR (-O0):
%struct.cached_dev = type opaque
%struct.bio = type opaque
define void @bch_data_verify(%struct.cached_dev* %0, %struct.bio* %1) {
%3 = alloca %struct.cached_dev*
%4 = alloca %struct.bio*
store %struct.cached_dev* %0, %struct.cached_dev** %3
store %struct.bio* %1, %struct.bio** %4
ret void
}

LLVM IR (-O2):
%struct.cached_dev = type opaque
%struct.bio = type opaque
define void @bch_data_verify(%struct.cached_dev* nocapture %0, %struct.bio* nocapture %1) {
ret void
}
/* Variables and functions */
int f();
int main(void) {
  int x[124];
  int y[54];
  x[1 + 2 + 3 + f() + 23] = 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2e0,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
add    $0x6,%eax
add    $0x17,%eax
cltq
movl   $0x1,-0x200(%rbp,%rax,4)
xor    %eax,%eax
add    $0x2e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [124 x i32]
%3 = alloca [54 x i32]
store i32 0, i32* %1
%4 = call i32 (...) @f()
%5 = add nsw i32 6, %4
%6 = add nsw i32 %5, 23
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [124 x i32], [124 x i32]* %2, i64 0, i64 %7
store i32 1, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ put_le32(int /*<<< orphan*/ *, int);
void put_le64(uint8_t *ptr, uint64_t v) {
  put_le32(ptr, v);
  put_le32(ptr + 4, v >> 32);
}


x86 assembly (clang, -O0):
<put_le64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <put_le32@plt>
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
mov    -0xc(%rbp),%esi
mov    $0x20,%ecx
sar    %cl,%esi
call   1030 <put_le32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_le64>:
push   %rbx
mov    %rdi,%rbx
call   1030 <put_le32@plt>
add    $0x10,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <put_le32@plt>

LLVM IR (-O0):
define void @put_le64(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 @put_le32(i32* %5, i32 %6)
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 4
%10 = load i32, i32* %4
%11 = ashr i32 %10, 32
%12 = call i32 @put_le32(i32* %9, i32 %11)
ret void
}

LLVM IR (-O2):
define void @put_le64(i32* %0, i32 %1) {
%3 = tail call i32 @put_le32(i32* %0, i32 %1)
%4 = getelementptr inbounds i32, i32* %0, i64 4
%5 = tail call i32 @put_le32(i32* %4, i32 poison)
ret void
}
void exchange(int v[], int i, int j) {
  int temp;
  temp = v[i];
  v[i] = v[j];
  v[j] = temp;
}


x86 assembly (clang, -O0):
<exchange>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<exchange>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @exchange(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @exchange(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
int right(int i) { return (2 * i + 1); }


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

x86 assembly (clang, -O2):
<right>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @right(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = or i32 %2, 1
ret i32 %3
}
int main(int argc, char **argv) {
  int x;
  if (argc & 1) {
    x = (((argc | 5) + 8) | 23) + 1;
  } else {
    x = (argc + 4) & 0x77;
  }
  return (*argv) = x << 3;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1138 <main+0x38>
mov    -0x8(%rbp),%eax
or     $0x5,%eax
add    $0x8,%eax
or     $0x17,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1144 <main+0x44>
mov    -0x8(%rbp),%eax
add    $0x4,%eax
and    $0x77,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x3,%eax
cltq
mov    -0x10(%rbp),%rcx
mov    %rax,(%rcx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
test   $0x1,%dil
jne    110e <main+0xe>
add    $0x4,%edi
and    $0x77,%edi
jmp    111a <main+0x1a>
or     $0x5,%edi
add    $0x8,%edi
or     $0x17,%edi
add    $0x1,%edi
shl    $0x3,%edi
movslq %edi,%rax
mov    %rax,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture writeonly %1) {
%3 = and i32 %0, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = or i32 %0, 5
%7 = add nsw i32 %6, 8
%8 = or i32 %7, 23
%9 = add nsw i32 %8, 1
br label %13
10: ; preds = %2
%11 = add nsw i32 %0, 4
%12 = and i32 %11, 119
br label %13
13: ; preds = %10, %5
%14 = phi i32 [ %9, %5 ], [ %12, %10 ]
%15 = shl i32 %14, 3
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i8*
store i8* %17, i8** %1
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char *, char);
int is_whitespace(char ch) {
  return (ch != 0 && strchr(" \r\n\t,;()+-", ch) != NULL);
}


x86 assembly (clang, -O0):
<is_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
je     114a <is_whitespace+0x3a>
lea    0xec9(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_whitespace>:
test   %dil,%dil
je     1136 <is_whitespace+0x26>
push   %rax
movsbl %dil,%esi
lea    0xedf(%rip),%rdi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [11 x i8] c" \0D\0A\09,;()+-\00"
define i32 @is_whitespace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i32* @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8 signext %7)
%9 = icmp ne i32* %8, null
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [11 x i8] c" \0D\0A\09,;()+-\00"
define i32 @is_whitespace(i8 signext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32* @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
void pdecimal(d, digits) int d, digits;
{ pldecimal((unsigned long)d, digits); }


x86 assembly (clang, -O0):
<pdecimal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x4(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <pldecimal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdecimal>:
movslq %edi,%rdi
xor    %eax,%eax
jmp    1030 <pldecimal@plt>

LLVM IR (-O0):
define void @pdecimal(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 = sext i32 %5 to i64
%7 = load i32, i32* %4
%8 = call i32 (i64, i32, ...) bitcast (i32 (...)* @pldecimal to i32 (i64, i32, ...)*)(i64 %6, i32 %7)
ret void
}

LLVM IR (-O2):
define void @pdecimal(i32 %0, i32 %1) {
%3 = sext i32 %0 to i64
%4 = tail call i32 (i64, i32, ...) bitcast (i32 (...)* @pldecimal to i32 (i64, i32, ...)*)(i64 %3, i32 %1)
ret void
}
int t(int x) { return x * 29; }


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x1d,-0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t>:
lea    (%rdi,%rdi,8),%eax
lea    (%rax,%rax,2),%eax
add    %edi,%eax
add    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @t(i32 %0) {
%2 = mul nsw i32 %0, 29
ret i32 %2
}
void XCloseDisplay() {}


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

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

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

LLVM IR (-O2):
define void @XCloseDisplay() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DoCodeBraB();
scalar_t__ cctrue();
void DoCodeBccB(void) {
  if (cctrue()) {
    DoCodeBraB();
  } else {
  }
}


x86 assembly (clang, -O0):
<DoCodeBccB>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cctrue@plt>
cmp    $0x0,%rax
je     1141 <DoCodeBccB+0x21>
mov    $0x0,%al
call   1040 <DoCodeBraB@plt>
jmp    1146 <DoCodeBccB+0x26>
jmp    1146 <DoCodeBccB+0x26>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoCodeBccB>:
push   %rax
xor    %eax,%eax
call   1030 <cctrue@plt>
test   %rax,%rax
je     1135 <DoCodeBccB+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1040 <DoCodeBraB@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @DoCodeBccB() {
%1 = call i64 (...) @cctrue()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @DoCodeBraB()
br label %6
5: ; preds = %0
br label %6
6: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
define void @DoCodeBccB() {
%1 = tail call i64 (...) @cctrue()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @DoCodeBraB()
br label %5
5: ; preds = %0, %3
ret void
}
void cbor_null_undefined_callback(void *_ctx) {}


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

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

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

LLVM IR (-O2):
define void @cbor_null_undefined_callback(i8* nocapture %0) {
ret void
}
int BCD2DEC(int x) { return ((x) >> 4) * 10 + ((x)&0xf); }


x86 assembly (clang, -O0):
<BCD2DEC>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
imul   $0xa,%eax,%eax
mov    -0x4(%rbp),%ecx
and    $0xf,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BCD2DEC>:
mov    %edi,%eax
sar    $0x4,%eax
lea    (%rax,%rax,4),%eax
and    $0xf,%edi
lea    (%rdi,%rax,2),%eax
ret

LLVM IR (-O0):
define i32 @BCD2DEC(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 4
%5 = mul nsw i32 %4, 10
%6 = load i32, i32* %2
%7 = and i32 %6, 15
%8 = add nsw i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @BCD2DEC(i32 %0) {
%2 = ashr i32 %0, 4
%3 = mul nsw i32 %2, 10
%4 = and i32 %0, 15
%5 = add nsw i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int dowild(unsigned char const *, unsigned char const *,
           unsigned char const **);
int wildmatch(const char *pattern, const char *text) {
  static const unsigned char *nomore[1];
  return dowild((const unsigned char *)pattern, (const unsigned char *)text,
                nomore) == 1;
}


x86 assembly (clang, -O0):
<wildmatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0x2f01(%rip),%rdx
call   1030 <dowild@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wildmatch>:
push   %rax
lea    0x2f18(%rip),%rdx
call   1030 <dowild@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@wildmatch.nomore = internal global [1 x i8*] zeroinitializer
define i32 @wildmatch(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @dowild(i8* %5, i8* %6, i8** getelementptr inbounds ([1 x i8*], [1 x i8*]* @wildmatch.nomore, i64 0, i64 0))
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@wildmatch.nomore = internal global [1 x i8*] zeroinitializer
define i32 @wildmatch(i8* %0, i8* %1) {
%3 = tail call i32 @dowild(i8* %0, i8* %1, i8** getelementptr inbounds ([1 x i8*], [1 x i8*]* @wildmatch.nomore, i64 0, i64 0))
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
char *hmac384hex(bitstr, bitcnt, key, keylen)
unsigned char *bitstr;
unsigned long bitcnt;
unsigned char *key;
unsigned int keylen;
{ return ((char *)hmaccomp(384, 2, bitstr, bitcnt, key, keylen)); }


x86 assembly (clang, -O0):
<hmac384hex>:
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    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    $0x180,%edi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <hmaccomp@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hmac384hex>:
push   %rax
mov    %ecx,%r9d
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    $0x180,%edi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <hmaccomp@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @hmac384hex(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 (i32, i32, i8*, i64, i8*, i32, ...) bitcast (i32 (...)* @hmaccomp to i32 (i32, i32, i8*, i64, i8*, i32, ...)*)(i32 384, i32 2, i8* %9, i64 %10, i8* %11, i32 %12)
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
ret i8* %15
}

LLVM IR (-O2):
define i8* @hmac384hex(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i32 (i32, i32, i8*, i64, i8*, i32, ...) bitcast (i32 (...)* @hmaccomp to i32 (i32, i32, i8*, i64, i8*, i32, ...)*)(i32 384, i32 2, i8* %0, i64 %1, i8* %2, i32 %3)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ CursorXY(int, int);
int /*<<< orphan*/ exit(int);
void die(int code) {
  CursorXY(1, 16);
  exit(code);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x10,%esi
call   1030 <CursorXY@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
mov    $0x10,%esi
call   1030 <CursorXY@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @die(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @CursorXY(i32 1, i32 16)
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
define void @die(i32 %0) {
%2 = tail call i32 @CursorXY(i32 1, i32 16)
%3 = tail call i32 @exit(i32 %0)
unreachable
}
/* Type definitions */
struct vec2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec2_normalize(float *, float *);
__attribute__((always_)) struct vec2 *psvec2_normalize(struct vec2 *result,
                                                       struct vec2 *a) {
  vec2_normalize((float *)result, (float *)a);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec2_normalize>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2_normalize@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_normalize(%struct.vec2* %0, %struct.vec2* %1) {
%3 = alloca %struct.vec2*
%4 = alloca %struct.vec2*
store %struct.vec2* %0, %struct.vec2** %3
store %struct.vec2* %1, %struct.vec2** %4
%5 = load %struct.vec2*, %struct.vec2** %3
%6 = bitcast %struct.vec2* %5 to float*
%7 = load %struct.vec2*, %struct.vec2** %4
%8 = bitcast %struct.vec2* %7 to float*
%9 = call i32 @vec2_normalize(float* %6, float* %8)
%10 = load %struct.vec2*, %struct.vec2** %3
ret %struct.vec2* %10
}

LLVM IR (-O2):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_normalize(%struct.vec2* returned %0, %struct.vec2* %1) {
%3 = bitcast %struct.vec2* %0 to float*
%4 = bitcast %struct.vec2* %1 to float*
%5 = tail call i32 @vec2_normalize(float* %3, float* %4)
ret %struct.vec2* %0
}
void **__attribute__((const)) __libc_dl_error_tsd(void) {
  static __thread void *data __attribute__((tls_model("initial-exec")));
  return &data;
}


x86 assembly (clang, -O0):
<__libc_dl_error_tsd>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rcx
mov    %fs:0x0,%rax
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__libc_dl_error_tsd>:
mov    %fs:0x0,%rax
add    0x2ec8(%rip),%rax
ret

LLVM IR (-O0):
@__libc_dl_error_tsd.data = internal thread_local(initialexec) global i8* null
define i8** @__libc_dl_error_tsd() {
ret i8** @__libc_dl_error_tsd.data
}

LLVM IR (-O2):
@__libc_dl_error_tsd.data = internal thread_local(initialexec) global i8* null
define i8** @__libc_dl_error_tsd() {
ret i8** @__libc_dl_error_tsd.data
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned short width;
};
typedef TYPE_1__ XRectangle;

/* Variables and functions */
void set_XRectangle_width(void *_p, unsigned short _v) {
  ((XRectangle *)_p)->width = (unsigned short)_v;
}


x86 assembly (clang, -O0):
<set_XRectangle_width>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XRectangle_width>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i16 }
define void @set_XRectangle_width(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i16 %5, i16* %8
ret void
}

LLVM IR (-O2):
define void @set_XRectangle_width(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
/* Variables and functions */
void *__libc_tls_get_addr(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @__libc_tls_get_addr() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @__libc_tls_get_addr() {
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ on_miss(int /*<<< orphan*/, int /*<<< orphan*/);
void use_on_miss_function(uint64_t tag, uint64_t index) { on_miss(tag, index); }


x86 assembly (clang, -O0):
<use_on_miss_function>:
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 <on_miss@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<use_on_miss_function>:
jmp    1030 <on_miss@plt>

LLVM IR (-O0):
define void @use_on_miss_function(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 @on_miss(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @use_on_miss_function(i32 %0, i32 %1) {
%3 = tail call i32 @on_miss(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int edge_ori(int);
int edge_ori_add(int cv1, int cv2) { return cv1 ^ edge_ori(cv2); }


x86 assembly (clang, -O0):
<edge_ori_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <edge_ori@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<edge_ori_add>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <edge_ori@plt>
xor    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @edge_ori_add(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 @edge_ori(i32 %6)
%8 = xor i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @edge_ori_add(i32 %0, i32 %1) {
%3 = tail call i32 @edge_ori(i32 %1)
%4 = xor i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void get_architecture(void) { printf("POWER"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"POWER\00"
define void @get_architecture() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef size_t uint8_t;
typedef int /*<<< orphan*/ volatile uint16_t;

/* Variables and functions */
uint16_t GetPaletteObj(uint8_t entry) {
  return ((volatile uint16_t *)(0x5000200))[entry];
}


x86 assembly (clang, -O0):
<GetPaletteObj>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x5000200,%eax
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetPaletteObj>:
mov    0x5000200(,%rdi,4),%eax
ret

LLVM IR (-O0):
define i32 @GetPaletteObj(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = getelementptr inbounds i32, i32* inttoptr (i64 83886592 to i32*), i64 %3
%5 = load volatile i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @GetPaletteObj(i64 %0) {
%2 = getelementptr inbounds i32, i32* inttoptr (i64 83886592 to i32*), i64 %0
%3 = load volatile i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Foo(int *);
int main() {
  int ary[(32 * 32 * 32 + 17)];
  Foo(ary);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x20048,%rsp
mov    %rsp,%rdi
call   1030 <Foo@plt>
xor    %eax,%eax
add    $0x20048,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [32785 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [32785 x i32], [32785 x i32]* %2, i64 0, i64 0
%4 = call i32 @Foo(i32* %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [32785 x i32]
%2 = bitcast [32785 x i32]* %1 to i8*
%3 = getelementptr inbounds [32785 x i32], [32785 x i32]* %1, i64 0, i64 0
%4 = call i32 @Foo(i32* %3)
ret i32 0
}
/* Variables and functions */
unsigned long long __blcic_u64(unsigned long long);
unsigned long long test__blcic_u64(unsigned long long a) {
  return __blcic_u64(a);
}


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

x86 assembly (clang, -O2):
<test__blcic_u64>:
jmp    1030 <__blcic_u64@plt>

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

LLVM IR (-O2):
define i64 @test__blcic_u64(i64 %0) {
%2 = tail call i64 @__blcic_u64(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: mkfs <input file> <file sytem name> <ninodes> <nblocks> \n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"Usage: mkfs <input file> <file sytem name> <ninodes> <nblocks> \0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [64 x i8] c"Usage: mkfs <input file> <file sytem name> <ninodes> <nblocks> \00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
int fegetexcept(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fegetexcept() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
char *strrchr(char const *, char);
char *file_name(const char *path) {
  char *name;
  assert(path != NULL);
  if ((name = strrchr(path, '/')) == NULL) {
    return (char *)path;
  }
  return (name + 1);
}


x86 assembly (clang, -O0):
<file_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1167 <file_name+0x47>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1173 <file_name+0x53>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_name>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @file_name(i8* %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%6 = icmp eq i8* %5, null
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = select i1 %6, i8* %0, i8* %7
ret i8* %8
}
OP(dd, d3) { op_d3(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_d3@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_d3()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void preVisit() { printf("("); }


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

x86 assembly (clang, -O2):
<preVisit>:
mov    $0x28,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @preVisit() {
%1 = tail call i32 @putchar(i32 40)
ret void
}
int test_imm_4Fint16_mem(short *val) {
  return ((*val) & (0x4F << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_4Fint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, 79
%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_4Fint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 79
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct expr {
  int dummy;
};

/* Variables and functions */
struct expr *expr_parse_i(char const *, char *, int);
struct expr *expr_parse(const char *str) {
  return expr_parse_i(str, "filter contains control characters", 1);
}


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

x86 assembly (clang, -O2):
<expr_parse>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edx
jmp    1030 <expr_parse_i@plt>

LLVM IR (-O0):
%struct.expr = type { i32 }
@.str = [35 x i8] c"filter contains control characters\00"
define %struct.expr* @expr_parse(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call %struct.expr* @expr_parse_i(i8* %3, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 1)
ret %struct.expr* %4
}

LLVM IR (-O2):
%struct.expr = type { i32 }
@.str = [35 x i8] c"filter contains control characters\00"
define %struct.expr* @expr_parse(i8* %0) {
%2 = tail call %struct.expr* @expr_parse_i(i8* %0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 1)
ret %struct.expr* %2
}
void foo_1_2_1_2_2_2_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_1_2_2_2_1_1_1() {
ret void
}
int angel_capable(struct task_struct *tsk, int cap) { return 0; }


x86 assembly (clang, -O0):
<angel_capable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.task_struct = type opaque
define i32 @angel_capable(%struct.task_struct* %0, i32 %1) {
%3 = alloca %struct.task_struct*
%4 = alloca i32
store %struct.task_struct* %0, %struct.task_struct** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.task_struct = type opaque
define i32 @angel_capable(%struct.task_struct* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outb(unsigned char, int);
int /*<<< orphan*/ slow_down_io();
void outb_p(unsigned char value, int port) {
  outb(value, port);
  slow_down_io();
}


x86 assembly (clang, -O0):
<outb_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%esi
movzbl %al,%edi
call   1030 <outb@plt>
mov    $0x0,%al
call   1040 <slow_down_io@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb_p>:
push   %rax
call   1030 <outb@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <slow_down_io@plt>

LLVM IR (-O0):
define void @outb_p(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = load i32, i32* %4
%7 = call i32 @outb(i8 zeroext %5, i32 %6)
%8 = call i32 (...) @slow_down_io()
ret void
}

LLVM IR (-O2):
define void @outb_p(i8 zeroext %0, i32 %1) {
%3 = tail call i32 @outb(i8 zeroext %0, i32 %1)
%4 = tail call i32 (...) @slow_down_io()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void f6(int i) {
  int x;
  for (i = 0; i < 10; i++)
    printf("%d", x++);
}


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1151 <f6+0x41>
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1122 <f6+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @f6(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
ret void
}
int editor_free_func(const struct cmd_info *ci) { return 1; }


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

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

LLVM IR (-O0):
%struct.cmd_info = type opaque
define i32 @editor_free_func(%struct.cmd_info* %0) {
%2 = alloca %struct.cmd_info*
store %struct.cmd_info* %0, %struct.cmd_info** %2
ret i32 1
}

LLVM IR (-O2):
%struct.cmd_info = type opaque
define i32 @editor_free_func(%struct.cmd_info* nocapture readnone %0) {
ret i32 1
}