xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool is_larx(uint32_t insn) {
  uint32_t insn_base = insn & 0xfc0007fe;
  if ((insn_base == 0x7c000068) || (insn_base == 0x7c0000e8) ||
      (insn_base == 0x7c000028) || (insn_base == 0x7c0000A8) ||
      (insn_base == 0x7c000228))
    return true;
  return false;
}


x86 assembly (clang, -O0):
<is_larx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xfc0007fe,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x7c000068,-0xc(%rbp)
je     1153 <is_larx+0x53>
cmpl   $0x7c0000e8,-0xc(%rbp)
je     1153 <is_larx+0x53>
cmpl   $0x7c000028,-0xc(%rbp)
je     1153 <is_larx+0x53>
cmpl   $0x7c0000a8,-0xc(%rbp)
je     1153 <is_larx+0x53>
cmpl   $0x7c000228,-0xc(%rbp)
jne    115f <is_larx+0x5f>
movl   $0x1,-0x4(%rbp)
jmp    1166 <is_larx+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_larx>:
mov    %edi,%eax
and    $0xfc0007fe,%eax
and    $0xfc00073e,%edi
cmp    $0x7c000028,%edi
sete   %cl
cmp    $0x7c000228,%eax
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @is_larx(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = and i32 %5, -67106818
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 2080374888
br i1 %8, label %21, label %9
9: ; preds = %1
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 2080375016
br i1 %11, label %21, label %12
12: ; preds = %9
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, 2080374824
br i1 %14, label %21, label %15
15: ; preds = %12
%16 = load i32, i32* %4
%17 = icmp eq i32 %16, 2080374952
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load i32, i32* %4
%20 = icmp eq i32 %19, 2080375336
br i1 %20, label %21, label %22
21: ; preds = %18, %15, %12, %9, %1
store i32 1, i32* %2
br label %23
22: ; preds = %18
store i32 0, i32* %2
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @is_larx(i32 %0) {
%2 = and i32 %0, -67106818
%3 = and i32 %0, -67107010
%4 = icmp eq i32 %3, 2080374824
%5 = icmp eq i32 %2, 2080375336
%6 = or i1 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
void t4() {
  unsigned long long a;
  struct reg {
    unsigned long long a, b;
  } b;
  __asm__ volatile("" ::"m"(a), "m"(b));
}


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

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

LLVM IR (-O0):
%struct.reg = type { i64, i64 }
define void @t4() {
%1 = alloca i64
%2 = alloca %struct.reg
ret void
}

LLVM IR (-O2):
%struct.reg = type { i64, i64 }
define void @t4() {
%1 = alloca i64
%2 = alloca %struct.reg
%3 = bitcast i64* %1 to i8*
%4 = bitcast %struct.reg* %2 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disable_irq(int /*<<< orphan*/);
void timer_off() { disable_irq(0); }


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

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

LLVM IR (-O0):
define void @timer_off() {
%1 = call i32 @disable_irq(i32 0)
ret void
}

LLVM IR (-O2):
define void @timer_off() {
%1 = tail call i32 @disable_irq(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DifferingObjectSize0(void *const);
int /*<<< orphan*/ DifferingObjectSize1(void *const);
int /*<<< orphan*/ DifferingObjectSize2(void *const);
int /*<<< orphan*/ DifferingObjectSize3(void *const);
void test12(void *const p __attribute__((pass_object_size(3)))) {
  DifferingObjectSize0(p);
  DifferingObjectSize1(p);
  DifferingObjectSize2(p);
  DifferingObjectSize3(p);
}


x86 assembly (clang, -O0):
<test12>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <DifferingObjectSize0@plt>
mov    -0x8(%rbp),%rdi
call   1030 <DifferingObjectSize1@plt>
mov    -0x8(%rbp),%rdi
call   1060 <DifferingObjectSize2@plt>
mov    -0x8(%rbp),%rdi
call   1040 <DifferingObjectSize3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test12>:
push   %rbx
mov    %rdi,%rbx
call   1050 <DifferingObjectSize0@plt>
mov    %rbx,%rdi
call   1030 <DifferingObjectSize1@plt>
mov    %rbx,%rdi
call   1060 <DifferingObjectSize2@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <DifferingObjectSize3@plt>

LLVM IR (-O0):
define void @test12(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = call i32 @DifferingObjectSize0(i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @DifferingObjectSize1(i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 @DifferingObjectSize2(i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 @DifferingObjectSize3(i8* %11)
ret void
}

LLVM IR (-O2):
define void @test12(i8* %0, i64 %1) {
%3 = tail call i32 @DifferingObjectSize0(i8* %0)
%4 = tail call i32 @DifferingObjectSize1(i8* %0)
%5 = tail call i32 @DifferingObjectSize2(i8* %0)
%6 = tail call i32 @DifferingObjectSize3(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __sum16;

/* Variables and functions */
int /*<<< orphan*/ csum_fold(int /*<<< orphan*/);
int /*<<< orphan*/ csum_partial(void const *, int, int /*<<< orphan*/);
__sum16 ip_compute_csum(const void *buf, int len) {
  return csum_fold(csum_partial(buf, len, 0));
}


x86 assembly (clang, -O0):
<ip_compute_csum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <csum_partial@plt>
mov    %eax,%edi
call   1040 <csum_fold@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_compute_csum>:
push   %rax
xor    %edx,%edx
call   1030 <csum_partial@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <csum_fold@plt>

LLVM IR (-O0):
define i32 @ip_compute_csum(i8* %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 @csum_partial(i8* %5, i32 %6, i32 0)
%8 = call i32 @csum_fold(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @ip_compute_csum(i8* %0, i32 %1) {
%3 = tail call i32 @csum_partial(i8* %0, i32 %1, i32 0)
%4 = tail call i32 @csum_fold(i32 %3)
ret i32 %4
}
/* Variables and functions */
char *realloc(char *, int);
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
char *Append(char *string, char *toAppend) {
  string =
      realloc(string, sizeof(char) * (strlen(string) + strlen(toAppend) + 1));
  strcat(string, toAppend);
  return string;
}


x86 assembly (clang, -O0):
<Append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%esi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Append>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%r15d
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    (%r15,%rax,1),%esi
add    $0x1,%esi
mov    %rbx,%rdi
call   1040 <realloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @Append(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** %3
%7 = call i32 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = add nsw i32 %7, %9
%11 = add nsw i32 %10, 1
%12 = sext i32 %11 to i64
%13 = mul i64 1, %12
%14 = trunc i64 %13 to i32
%15 = call i8* @realloc(i8* %5, i32 %14)
store i8* %15, i8** %3
%16 = load i8*, i8** %3
%17 = load i8*, i8** %4
%18 = call i32 @strcat(i8* %16, i8* %17)
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define i8* @Append(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = add i32 %3, 1
%6 = add i32 %5, %4
%7 = tail call i8* @realloc(i8* %0, i32 %6)
%8 = tail call i32 @strcat(i8* %7, i8* %1)
ret i8* %7
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ call_myclass_func(void *, int);
void *create_myclass();
int /*<<< orphan*/ destroy_myclass(void *);
int main() {
  void *pclass = create_myclass();
  call_myclass_func(pclass, 10);
  destroy_myclass(pclass);
  pclass = NULL;
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <create_myclass@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1030 <call_myclass_func@plt>
mov    -0x10(%rbp),%rdi
call   1050 <destroy_myclass@plt>
movq   $0x0,-0x10(%rbp)
mov    0x2e70(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <create_myclass@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0xa,%esi
call   1030 <call_myclass_func@plt>
mov    %rbx,%rdi
call   1050 <destroy_myclass@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* (...) @create_myclass()
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @call_myclass_func(i8* %4, i32 10)
%6 = load i8*, i8** %2
%7 = call i32 @destroy_myclass(i8* %6)
store i8* null, i8** %2
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i8* (...) @create_myclass()
%2 = tail call i32 @call_myclass_func(i8* %1, i32 10)
%3 = tail call i32 @destroy_myclass(i8* %1)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ D4Np2_PowerOff_CommonPart();
int /*<<< orphan*/ D4Np2_PowerOff_InputPart();
int /*<<< orphan*/ D4Np2_PowerOff_OutputPart();
int /*<<< orphan*/ pantech_amp_log(int /*<<< orphan*/, char *);
void D4Np2_PowerOff(void) {
  pantech_amp_log(0, "+++++ D4Np2_PowerOff");
  D4Np2_PowerOff_OutputPart();
  D4Np2_PowerOff_InputPart();
  D4Np2_PowerOff_CommonPart();
}


x86 assembly (clang, -O0):
<D4Np2_PowerOff>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xeb3(%rip),%rsi
call   1060 <pantech_amp_log@plt>
mov    $0x0,%al
call   1040 <D4Np2_PowerOff_OutputPart@plt>
mov    $0x0,%al
call   1030 <D4Np2_PowerOff_InputPart@plt>
mov    $0x0,%al
call   1050 <D4Np2_PowerOff_CommonPart@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<D4Np2_PowerOff>:
push   %rax
lea    0xeb8(%rip),%rsi
xor    %edi,%edi
call   1060 <pantech_amp_log@plt>
xor    %eax,%eax
call   1040 <D4Np2_PowerOff_OutputPart@plt>
xor    %eax,%eax
call   1030 <D4Np2_PowerOff_InputPart@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <D4Np2_PowerOff_CommonPart@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"+++++ D4Np2_PowerOff\00"
define void @D4Np2_PowerOff() {
%1 = call i32 @pantech_amp_log(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @D4Np2_PowerOff_OutputPart()
%3 = call i32 (...) @D4Np2_PowerOff_InputPart()
%4 = call i32 (...) @D4Np2_PowerOff_CommonPart()
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"+++++ D4Np2_PowerOff\00"
define void @D4Np2_PowerOff() {
%1 = tail call i32 @pantech_amp_log(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @D4Np2_PowerOff_OutputPart()
%3 = tail call i32 (...) @D4Np2_PowerOff_InputPart()
%4 = tail call i32 (...) @D4Np2_PowerOff_CommonPart()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ quickSort2Internal(int *, int /*<<< orphan*/, int);
void quickSort2(int data[], int size) { quickSort2Internal(data, 0, size); }


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

x86 assembly (clang, -O2):
<quickSort2>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <quickSort2Internal@plt>

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

LLVM IR (-O2):
define void @quickSort2(i32* %0, i32 %1) {
%3 = tail call i32 @quickSort2Internal(i32* %0, i32 0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef scalar_t__ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ putchar(char);
wint_t putwchar(wchar_t wc) { return putchar((char)wc); }


x86 assembly (clang, -O0):
<putwchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl %al,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putwchar>:
movsbl %dil,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define i32 @putwchar(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i8
%5 = call i32 @putchar(i8 signext %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @putwchar(i64 %0) {
%2 = trunc i64 %0 to i8
%3 = tail call i32 @putchar(i8 signext %2)
ret i32 %3
}
/* Type definitions */
struct runlevel {
  int dummy;
};

/* Variables and functions */
scalar_t__ set_newlevel_info(struct runlevel *);
scalar_t__ set_prevlevel_info(struct runlevel *);
int set_runlevel_info(struct runlevel *prevlevel, struct runlevel *newlevel) {
  return set_prevlevel_info(prevlevel) || set_newlevel_info(newlevel);
}


x86 assembly (clang, -O0):
<set_runlevel_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <set_prevlevel_info@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    115e <set_runlevel_info+0x3e>
mov    -0x10(%rbp),%rdi
call   1030 <set_newlevel_info@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_runlevel_info>:
push   %rbx
mov    %rsi,%rbx
call   1040 <set_prevlevel_info@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <set_runlevel_info+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <set_newlevel_info@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
%struct.runlevel = type { i32 }
define i32 @set_runlevel_info(%struct.runlevel* %0, %struct.runlevel* %1) {
%3 = alloca %struct.runlevel*
%4 = alloca %struct.runlevel*
store %struct.runlevel* %0, %struct.runlevel** %3
store %struct.runlevel* %1, %struct.runlevel** %4
%5 = load %struct.runlevel*, %struct.runlevel** %3
%6 = call i64 @set_prevlevel_info(%struct.runlevel* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load %struct.runlevel*, %struct.runlevel** %4
%10 = call i64 @set_newlevel_info(%struct.runlevel* %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %8, %2
%13 = phi i1 [ true, %2 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.runlevel = type { i32 }
define i32 @set_runlevel_info(%struct.runlevel* %0, %struct.runlevel* %1) {
%3 = tail call i64 @set_prevlevel_info(%struct.runlevel* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @set_newlevel_info(%struct.runlevel* %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 1, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ syscall(int, char, int /*<<< orphan*/, int /*<<< orphan*/);
void isetcolor(char col) { syscall(0x494B, col, 0, 0); }


x86 assembly (clang, -O0):
<isetcolor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x494b,%edi
xor    %ecx,%ecx
movsbl -0x1(%rbp),%esi
mov    %ecx,%edx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isetcolor>:
mov    %edi,%esi
mov    $0x494b,%edi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define void @isetcolor(i8 signext %0) {
%2 = tail call i32 @syscall(i32 18763, i8 signext %0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *progname) {
  fprintf(stderr,
          "%s: validate json from stdin\n"
          "usage: json_verify [options]\n"
          "    -c allow comments\n"
          "    -q quiet mode\n"
          "    -s verify a stream of multiple json entities\n"
          "    -u allow invalid utf8 inside strings\n",
          progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [189 x i8] c"%s: validate json from stdin\0Ausage: json_verify [options]\0A -c allow comments\0A -q quiet mode\0A -s verify a stream of multiple json entities\0A -u allow invalid utf8 inside strings\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [189 x i8] c"%s: validate json from stdin\0Ausage: json_verify [options]\0A -c allow comments\0A -q quiet mode\0A -s verify a stream of multiple json entities\0A -u allow invalid utf8 inside strings\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
unsigned short reverse_bit16(unsigned short n) {
  n = ((n >> 1) & 0x5555) | ((n << 1) & 0xaaaa);
  n = ((n >> 2) & 0x3333) | ((n << 2) & 0xcccc);
  n = ((n >> 4) & 0x0f0f) | ((n << 4) & 0xf0f0);
  n = ((n >> 8) & 0x00ff) | ((n << 8) & 0xff00);
  return n;
}


x86 assembly (clang, -O0):
<reverse_bit16>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x1,%eax
and    $0x5555,%eax
movzwl -0x2(%rbp),%ecx
shl    $0x1,%ecx
and    $0xaaaa,%ecx
or     %ecx,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x2,%eax
and    $0x3333,%eax
movzwl -0x2(%rbp),%ecx
shl    $0x2,%ecx
and    $0xcccc,%ecx
or     %ecx,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x4,%eax
and    $0xf0f,%eax
movzwl -0x2(%rbp),%ecx
shl    $0x4,%ecx
and    $0xf0f0,%ecx
or     %ecx,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
movzwl -0x2(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_bit16>:
rol    $0x8,%di
mov    %edi,%eax
and    $0xf0f,%eax
shl    $0x4,%eax
shr    $0x4,%edi
and    $0xf0f,%edi
or     %eax,%edi
mov    %edi,%eax
and    $0x3333,%eax
shr    $0x2,%edi
and    $0x3333,%edi
lea    (%rdi,%rax,4),%eax
mov    %eax,%ecx
and    $0x5555,%ecx
shr    %eax
and    $0x5555,%eax
lea    (%rax,%rcx,2),%eax
ret

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

LLVM IR (-O2):
define zeroext i16 @reverse_bit16(i16 zeroext %0) {
%2 = tail call i16 @llvm.bitreverse.i16(i16 %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ e_rol();
int /*<<< orphan*/ e_writeback();
int /*<<< orphan*/ e_zpx();
void e_rol_zpx() {
  e_zpx();
  e_rol();
  e_writeback();
}


x86 assembly (clang, -O0):
<e_rol_zpx>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <e_zpx@plt>
mov    $0x0,%al
call   1050 <e_rol@plt>
mov    $0x0,%al
call   1030 <e_writeback@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_rol_zpx>:
push   %rax
xor    %eax,%eax
call   1040 <e_zpx@plt>
xor    %eax,%eax
call   1050 <e_rol@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <e_writeback@plt>

LLVM IR (-O0):
define void @e_rol_zpx() {
%1 = call i32 (...) @e_zpx()
%2 = call i32 (...) @e_rol()
%3 = call i32 (...) @e_writeback()
ret void
}

LLVM IR (-O2):
define void @e_rol_zpx() {
%1 = tail call i32 (...) @e_zpx()
%2 = tail call i32 (...) @e_rol()
%3 = tail call i32 (...) @e_writeback()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ *malloc(int);
int /*<<< orphan*/ wcscpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
size_t wcslen(int /*<<< orphan*/ *);
wchar_t *private_allocWStringToWString(wchar_t *s) {
  size_t len = wcslen(s);
  wchar_t *t = malloc(sizeof(wchar_t) * (len + 1));
  wcscpy(t, s);
  return t;
}


x86 assembly (clang, -O0):
<private_allocWStringToWString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <wcslen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <wcscpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<private_allocWStringToWString>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <wcslen@plt>
lea    0x4(,%rax,4),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <wcscpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @private_allocWStringToWString(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i32*
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @wcslen(i32* %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = add i64 %7, 1
%9 = mul i64 4, %8
%10 = trunc i64 %9 to i32
%11 = call i32* @malloc(i32 %10)
store i32* %11, i32** %4
%12 = load i32*, i32** %4
%13 = load i32*, i32** %2
%14 = call i32 @wcscpy(i32* %12, i32* %13)
%15 = load i32*, i32** %4
ret i32* %15
}

LLVM IR (-O2):
define i32* @private_allocWStringToWString(i32* %0) {
%2 = tail call i64 @wcslen(i32* %0)
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 2
%5 = add i32 %4, 4
%6 = tail call i32* @malloc(i32 %5)
%7 = tail call i32 @wcscpy(i32* %6, i32* %0)
ret i32* %6
}
void foo733(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo733(i32 %0) {
ret void
}
/* Variables and functions */
int errno;
char *strerror(int);
int /*<<< orphan*/ tell(char *);
void report(char *say) {
  int err = errno;
  tell("loadfont: ");
  if (say != NULL) {
    tell(say);
    tell(": ");
  }
  tell(strerror(err));
  tell("\n");
}


x86 assembly (clang, -O0):
<report>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    0xec1(%rip),%rdi
call   1030 <tell@plt>
cmpq   $0x0,-0x8(%rbp)
je     1164 <report+0x44>
mov    -0x8(%rbp),%rdi
call   1030 <tell@plt>
lea    0xea9(%rip),%rdi
call   1030 <tell@plt>
mov    -0xc(%rbp),%edi
call   1040 <strerror@plt>
mov    %rax,%rdi
call   1030 <tell@plt>
lea    0xe90(%rip),%rdi
call   1030 <tell@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
lea    0xeca(%rip),%rdi
call   1030 <tell@plt>
test   %rbx,%rbx
je     1154 <report+0x34>
mov    %rbx,%rdi
call   1030 <tell@plt>
lea    0xeb9(%rip),%rdi
call   1030 <tell@plt>
mov    %ebp,%edi
call   1040 <strerror@plt>
mov    %rax,%rdi
call   1030 <tell@plt>
lea    0xea1(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <tell@plt>

LLVM IR (-O0):
@errno = global i32 0
@.str = [11 x i8] c"loadfont: \00"
@.str.1 = [3 x i8] c": \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @report(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i32, i32* @errno
store i32 %4, i32* %3
%5 = call i32 @tell(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @tell(i8* %9)
%11 = call i32 @tell(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %8, %1
%13 = load i32, i32* %3
%14 = call i8* @strerror(i32 %13)
%15 = call i32 @tell(i8* %14)
%16 = call i32 @tell(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [11 x i8] c"loadfont: \00"
@.str.1 = [3 x i8] c": \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @report(i8* %0) {
%2 = load i32, i32* @errno
%3 = tail call i32 @tell(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i8* %0, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i32 @tell(i8* %0)
%7 = tail call i32 @tell(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %5, %1
%9 = tail call i8* @strerror(i32 %2)
%10 = tail call i32 @tell(i8* %9)
%11 = tail call i32 @tell(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
void strcat(char *new, const char *orig) {
  while (*new != '\0')
    new ++;
  do {
    *new ++ = *orig++;
  } while (*orig != '\0');
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     112d <strcat+0x2d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <strcat+0xc>
jmp    1132 <strcat+0x32>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1132 <strcat+0x32>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1100 <strcat>
mov    (%rsi),%cl
xor    %eax,%eax
nopl   (%rax)
mov    %cl,-0x1(%rdi,%rax,1)
movzbl 0x1(%rsi,%rax,1),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strcat+0x10>
ret

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

LLVM IR (-O2):
define void @strcat(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = load i8, i8* %1
br label %10
10: ; preds = %8, %10
%11 = phi i8 [ %16, %10 ], [ %9, %8 ]
%12 = phi i8* [ %15, %10 ], [ %4, %8 ]
%13 = phi i8* [ %14, %10 ], [ %1, %8 ]
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %12
%16 = load i8, i8* %14
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %10
18: ; preds = %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ draw_filled_rectangle(int /*<<< orphan*/, int /*<<< orphan*/,
                                         int, int, int);
void clear_lcd_screen() { draw_filled_rectangle(0, 0, 132, 132, 0x0F0); }


x86 assembly (clang, -O0):
<clear_lcd_screen>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    $0x84,%ecx
mov    $0xf0,%r8d
mov    %esi,%edi
mov    %ecx,%edx
call   1030 <draw_filled_rectangle@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_lcd_screen>:
xor    %edi,%edi
xor    %esi,%esi
mov    $0x84,%edx
mov    $0x84,%ecx
mov    $0xf0,%r8d
jmp    1030 <draw_filled_rectangle@plt>

LLVM IR (-O0):
define void @clear_lcd_screen() {
%1 = call i32 @draw_filled_rectangle(i32 0, i32 0, i32 132, i32 132, i32 240)
ret void
}

LLVM IR (-O2):
define void @clear_lcd_screen() {
%1 = tail call i32 @draw_filled_rectangle(i32 0, i32 0, i32 132, i32 132, i32 240)
ret void
}
void write_word(int address, int word) {
  int *a = (int *)address;
  *a = word;
}


x86 assembly (clang, -O0):
<write_word>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_word>:
movslq %edi,%rax
mov    %esi,(%rax)
ret

LLVM IR (-O0):
define void @write_word(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store i32* %8, i32** %5
%9 = load i32, i32* %4
%10 = load i32*, i32** %5
store i32 %9, i32* %10
ret void
}

LLVM IR (-O2):
define void @write_word(i32 %0, i32 %1) {
%3 = sext i32 %0 to i64
%4 = inttoptr i64 %3 to i32*
store i32 %1, i32* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int parse_maf_alignment(int /*<<< orphan*/ *, char ***, char ***, int);
int parse_aln_maf(FILE *fp, char ***names, char ***aln, char **id,
                  char **structure, int verbosity) {
  if (id)
    *id = NULL;
  if (structure)
    *structure = NULL;
  return parse_maf_alignment(fp, names, aln, verbosity);
}


x86 assembly (clang, -O0):
<parse_aln_maf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1146 <parse_aln_maf+0x36>
mov    -0x20(%rbp),%rax
movq   $0x0,(%rax)
cmpq   $0x0,-0x28(%rbp)
je     115c <parse_aln_maf+0x4c>
mov    -0x28(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
call   1030 <parse_maf_alignment@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_aln_maf>:
test   %rcx,%rcx
je     111c <parse_aln_maf+0xc>
movq   $0x0,(%rcx)
test   %r8,%r8
je     1128 <parse_aln_maf+0x18>
movq   $0x0,(%r8)
mov    %r9d,%ecx
jmp    1030 <parse_maf_alignment@plt>

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

LLVM IR (-O2):
define i32 @parse_aln_maf(i32* %0, i8*** %1, i8*** %2, i8** writeonly %3, i8** writeonly %4, i32 %5) {
%7 = icmp eq i8** %3, null
br i1 %7, label %9, label %8
8: ; preds = %6
store i8* null, i8** %3
br label %9
9: ; preds = %8, %6
%10 = icmp eq i8** %4, null
br i1 %10, label %12, label %11
11: ; preds = %9
store i8* null, i8** %4
br label %12
12: ; preds = %11, %9
%13 = tail call i32 @parse_maf_alignment(i32* %0, i8*** %1, i8*** %2, i32 %5)
ret i32 %13
}
int test_imm_7Bint32_reg(int val) { return ((val) & (0x7B << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_7Bint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x7b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_7Bint32_reg(i32 %0) {
%2 = and i32 %0, 123
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int foo = 2;
  printf("%d\n", 1000 + 7000);
  printf("%d\n", 1 + 2 + 7 + 4);
  printf("%d\n", foo - 66 + 33 - foo - 7 + 8);
  printf("%d\n", 4 + 1 + 7 - 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x1f40,%esi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
mov    $0xe,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
sub    $0x42,%esi
add    $0x21,%esi
sub    -0x8(%rbp),%esi
sub    $0x7,%esi
add    $0x8,%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe93(%rip),%rdi
mov    $0xb,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1f40,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xe,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffffe0,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8000)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 14)
%5 = load i32, i32* %2
%6 = sub nsw i32 %5, 66
%7 = add nsw i32 %6, 33
%8 = load i32, i32* %2
%9 = sub nsw i32 %7, %8
%10 = sub nsw i32 %9, 7
%11 = add nsw i32 %10, 8
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 11)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 14)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -32)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 11)
ret i32 0
}
/* Variables and functions */
int lpc_uart_reg_read(int);
int lpc_uart_rx_empty(void) { return !(lpc_uart_reg_read(5) & 0x01); }


x86 assembly (clang, -O0):
<lpc_uart_rx_empty>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <lpc_uart_reg_read@plt>
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lpc_uart_rx_empty>:
push   %rax
mov    $0x5,%edi
call   1030 <lpc_uart_reg_read@plt>
not    %eax
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @lpc_uart_rx_empty() {
%1 = call i32 @lpc_uart_reg_read(i32 5)
%2 = and i32 %1, 1
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @lpc_uart_rx_empty() {
%1 = tail call i32 @lpc_uart_reg_read(i32 5)
%2 = and i32 %1, 1
%3 = xor i32 %2, 1
ret i32 %3
}
/* Type definitions */
struct cache_policy_item_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ free(struct cache_policy_item_ *);
void cache_lfu_policy_destroy_item(struct cache_policy_item_ *item) {
  (void)0;
  assert(item != NULL);
  free(item);
  (void)0;
}


x86 assembly (clang, -O0):
<cache_lfu_policy_destroy_item>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cache_lfu_policy_destroy_item>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.cache_policy_item_ = type { i32 }
define void @cache_lfu_policy_destroy_item(%struct.cache_policy_item_* %0) {
%2 = alloca %struct.cache_policy_item_*
store %struct.cache_policy_item_* %0, %struct.cache_policy_item_** %2
%3 = load %struct.cache_policy_item_*, %struct.cache_policy_item_** %2
%4 = icmp ne %struct.cache_policy_item_* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load %struct.cache_policy_item_*, %struct.cache_policy_item_** %2
%8 = call i32 @free(%struct.cache_policy_item_* %7)
ret void
}

LLVM IR (-O2):
%struct.cache_policy_item_ = type { i32 }
define void @cache_lfu_policy_destroy_item(%struct.cache_policy_item_* %0) {
%2 = icmp ne %struct.cache_policy_item_* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @free(%struct.cache_policy_item_* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
int usage(char *progname) {
  printf("Usage: %s add x1 y1 x2 y2\n"
         "       %s mul x  y  k\n",
         progname, progname);
  return 1;
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
lea    0xee5(%rip),%rdi
mov    %rdx,%rsi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"Usage: %s add x1 y1 x2 y2\0A %s mul x y k\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [49 x i8] c"Usage: %s add x1 y1 x2 y2\0A %s mul x y k\0A\00"
define i32 @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret i32 1
}
float atan2f(float y, float x) {
  float res = 0.0F;
  asm volatile("fpatan" : "=t"(res) : "u"(y), "0"(x) : "st(1)");
  return res;
}


x86 assembly (clang, -O0):
<atan2f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
movss  %xmm1,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
flds   -0x10(%rbp)
flds   -0x14(%rbp)
fpatan
fstps  -0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan2f>:
movss  %xmm0,-0x4(%rsp)
movss  %xmm1,-0x8(%rsp)
flds   -0x4(%rsp)
flds   -0x8(%rsp)
fpatan
fstps  -0xc(%rsp)
movss  -0xc(%rsp),%xmm0
ret

LLVM IR (-O0):
define float @atan2f(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
store float 0.000000e+00, float* %5
%6 = load float, float* %3
%7 = load float, float* %4
%8 = call float asm sideeffect "fpatan", "={st},{st(1)},0,~{st(1)},~{dirflag},~{fpsr},~{flags}"(float %6, float %7)
store float %8, float* %5
%9 = load float, float* %5
ret float %9
}

LLVM IR (-O2):
define float @atan2f(float %0, float %1) {
%3 = tail call float asm sideeffect "fpatan", "={st},{st(1)},0,~{st(1)},~{dirflag},~{fpsr},~{flags}"(float %0, float %1)
ret float %3
}
int rijndaelEndOfCode(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @rijndaelEndOfCode() {
ret i32 1
}

LLVM IR (-O2):
define i32 @rijndaelEndOfCode() {
ret i32 1
}
int isupper(int c) {
  if ((c >= 'A') && (c <= 'Z'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     1127 <isupper+0x27>
cmpl   $0x5a,-0x8(%rbp)
jg     1127 <isupper+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <isupper+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %11
10: ; preds = %6, %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ mt_rand_int32();
long mt_rand_int31(void) { return (long)mt_rand_int32() >> 1; }


x86 assembly (clang, -O0):
<mt_rand_int31>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mt_rand_int32@plt>
sar    $0x1,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @mt_rand_int31() {
%1 = call i64 (...) @mt_rand_int32()
%2 = ashr i64 %1, 1
ret i64 %2
}

LLVM IR (-O2):
define i64 @mt_rand_int31() {
%1 = tail call i64 (...) @mt_rand_int32()
%2 = ashr i64 %1, 1
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int *);
scalar_t__ malloc(int);
int *new_Int(const int value) {
  int *p = (int *)malloc(sizeof(int));
  assert(p);
  *p = value;
  return p;
}


x86 assembly (clang, -O0):
<new_Int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_Int>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <assert@plt>
mov    %ebp,(%rbx)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32* @new_Int(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @assert(i32* %6)
%8 = load i32, i32* %2
%9 = load i32*, i32** %3
store i32 %8, i32* %9
%10 = load i32*, i32** %3
ret i32* %10
}

LLVM IR (-O2):
define i32* @new_Int(i32 %0) {
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
%4 = tail call i32 @assert(i32* %3)
store i32 %0, i32* %3
ret i32* %3
}
call7k(c, i, s, l, f, uc, d, us, ul, ui) char c;
int i;
short s;
long l;
float f;
unsigned char uc;
double d;
unsigned short us;
unsigned long ul;
unsigned int ui;
{
  c = 'a';
  i = 7;
  s = 8;
  l = 7;
  f = 0.3;
  uc = 44;
  d = 0.44;
  us = 77;
  ul = 43;
  ui = 33;
}


x86 assembly (clang, -O0):
<call7k>:
push   %rbp
mov    %rsp,%rbp
mov    %r8d,%eax
mov    %rcx,-0x38(%rbp)
mov    %edx,%ecx
mov    -0x38(%rbp),%rdx
mov    %esi,-0x30(%rbp)
mov    %edi,%esi
mov    -0x30(%rbp),%edi
mov    0x18(%rbp),%r8d
mov    0x10(%rbp),%r8
mov    %sil,%r8b
mov    %cx,%si
cvtsd2ss %xmm0,%xmm0
mov    %al,%cl
mov    %r9w,%ax
mov    %r8b,-0x5(%rbp)
mov    %edi,-0xc(%rbp)
mov    %si,-0xe(%rbp)
mov    %rdx,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
mov    %cl,-0x1d(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %ax,-0x2a(%rbp)
movb   $0x61,-0x5(%rbp)
movl   $0x7,-0xc(%rbp)
movw   $0x8,-0xe(%rbp)
movq   $0x7,-0x18(%rbp)
movss  0xe96(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movb   $0x2c,-0x1d(%rbp)
movsd  0xe7d(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movw   $0x4d,-0x2a(%rbp)
movq   $0x2b,0x10(%rbp)
movl   $0x21,0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @call7k(i32 %0, i32 %1, i32 %2, i64 %3, double %4, i32 %5, double %6, i32 %7, i64 %8, i32 %9) {
%11 = alloca i32
%12 = alloca i8
%13 = alloca i32
%14 = alloca i16
%15 = alloca i64
%16 = alloca float
%17 = alloca i8
%18 = alloca double
%19 = alloca i16
%20 = alloca i64
%21 = alloca i32
%22 = trunc i32 %0 to i8
%23 = trunc i32 %2 to i16
%24 = fptrunc double %4 to float
%25 = trunc i32 %5 to i8
%26 = trunc i32 %7 to i16
store i8 %22, i8* %12
store i32 %1, i32* %13
store i16 %23, i16* %14
store i64 %3, i64* %15
store float %24, float* %16
store i8 %25, i8* %17
store double %6, double* %18
store i16 %26, i16* %19
store i64 %8, i64* %20
store i32 %9, i32* %21
store i8 97, i8* %12
store i32 7, i32* %13
store i16 8, i16* %14
store i64 7, i64* %15
store float 0x3FD3333340000000, float* %16
store i8 44, i8* %17
store double 4.400000e-01, double* %18
store i16 77, i16* %19
store i64 43, i64* %20
store i32 33, i32* %21
%27 = load i32, i32* %11
ret i32 %27
}

LLVM IR (-O2):
define i32 @call7k(i32 %0, i32 %1, i32 %2, i64 %3, double %4, i32 %5, double %6, i32 %7, i64 %8, i32 %9) {
ret i32 undef
}