xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int async_read_no_copy() {
  printf("Your system does not support async I/O\n");
  exit(172);
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"Your system does not support async I/O\0A\00"
define i32 @async_read_no_copy() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 172)
unreachable
}

LLVM IR (-O2):
@str = [39 x i8] c"Your system does not support async I/O\00"
define i32 @async_read_no_copy() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 172)
unreachable
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  x = __VERIFIER_nondet_int();
  while (x >= 0) {
    x = x + __VERIFIER_nondet_int();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     114f <main+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
js     112b <main+0x1b>
mov    %eax,%ebx
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
add    %eax,%ebx
jns    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp sgt i32 %1, -1
br i1 %2, label %3, label %8
3: ; preds = %0, %3
%4 = phi i32 [ %6, %3 ], [ %1, %0 ]
%5 = tail call i32 (...) @__VERIFIER_nondet_int()
%6 = add nsw i32 %5, %4
%7 = icmp sgt i32 %6, -1
br i1 %7, label %3, label %8
8: ; preds = %3, %0
ret i32 0
}
int main() {
  int i = 0, b = 10;
  for (i; i > 9; i++) {
    b--;
  }
  return b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
cmpl   $0x9,-0x8(%rbp)
jle    113a <main+0x3a>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ GPIO1_Combined_0_15_DriverIRQHandler();
__attribute__((weak)) void GPIO1_Combined_0_15_IRQHandler(void) {
  GPIO1_Combined_0_15_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @GPIO1_Combined_0_15_IRQHandler() {
%1 = call i32 (...) @GPIO1_Combined_0_15_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @GPIO1_Combined_0_15_IRQHandler() {
%1 = tail call i32 (...) @GPIO1_Combined_0_15_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ analogWrite(int, int);
int /*<<< orphan*/ ino(int);
void analogWriteX(int x, int pin, int value) {
  ino(x);
  analogWrite(pin, value);
}


x86 assembly (clang, -O0):
<analogWriteX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ino@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <analogWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<analogWriteX>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <ino@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <analogWrite@plt>

LLVM IR (-O0):
define void @analogWriteX(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = call i32 @ino(i32 %7)
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @analogWrite(i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
define void @analogWriteX(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @ino(i32 %0)
%5 = tail call i32 @analogWrite(i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int EINVAL;
int /*<<< orphan*/ free(int /*<<< orphan*/);
int /*<<< orphan*/ get_header(void *);
int array_object_free(void *object) {
  if (object == NULL)
    return -EINVAL;
  free(get_header(object));
  return 0;
}


x86 assembly (clang, -O0):
<array_object_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114a <array_object_free+0x2a>
xor    %eax,%eax
mov    0x2ea0(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <array_object_free+0x41>
mov    -0x10(%rbp),%rdi
call   1040 <get_header@plt>
mov    %eax,%edi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_object_free>:
push   %rax
test   %rdi,%rdi
je     1136 <array_object_free+0x16>
call   1040 <get_header@plt>
mov    %eax,%edi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2ea3(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @array_object_free(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %13
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i32 @get_header(i8* %10)
%12 = call i32 @free(i32 %11)
store i32 0, i32* %2
br label %13
13: ; preds = %9, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @array_object_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
br label %9
6: ; preds = %1
%7 = tail call i32 @get_header(i8* %0)
%8 = tail call i32 @free(i32 %7)
br label %9
9: ; preds = %6, %3
%10 = phi i32 [ %5, %3 ], [ 0, %6 ]
ret i32 %10
}
/* Type definitions */
struct feed_prompt_iterator {
  int dummy;
};

/* Variables and functions */
char feed_prompt_iterator_set_glyph(struct feed_prompt_iterator *const,
                                    unsigned long);
char feed_prompt_iterator_first_glyph(
    struct feed_prompt_iterator *const p_iterator) {
  char b_result;
  b_result = feed_prompt_iterator_set_glyph(p_iterator, 0ul);
  return b_result;
}


x86 assembly (clang, -O0):
<feed_prompt_iterator_first_glyph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <feed_prompt_iterator_set_glyph@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<feed_prompt_iterator_first_glyph>:
xor    %esi,%esi
jmp    1030 <feed_prompt_iterator_set_glyph@plt>

LLVM IR (-O0):
%struct.feed_prompt_iterator = type { i32 }
define signext i8 @feed_prompt_iterator_first_glyph(%struct.feed_prompt_iterator* %0) {
%2 = alloca %struct.feed_prompt_iterator*
%3 = alloca i8
store %struct.feed_prompt_iterator* %0, %struct.feed_prompt_iterator** %2
%4 = load %struct.feed_prompt_iterator*, %struct.feed_prompt_iterator** %2
%5 = call signext i8 @feed_prompt_iterator_set_glyph(%struct.feed_prompt_iterator* %4, i64 0)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
%struct.feed_prompt_iterator = type { i32 }
define signext i8 @feed_prompt_iterator_first_glyph(%struct.feed_prompt_iterator* %0) {
%2 = tail call signext i8 @feed_prompt_iterator_set_glyph(%struct.feed_prompt_iterator* %0, i64 0)
ret i8 %2
}
/* Variables and functions */
char *lmc_string_data(char *s) { return s + sizeof(size_t); }


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

x86 assembly (clang, -O2):
<lmc_string_data>:
lea    0x8(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @lmc_string_data(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 8
ret i8* %4
}

LLVM IR (-O2):
define i8* @lmc_string_data(i8* readnone %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 8
ret i8* %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool nth_position(uint32_t num, int position) {
  return ((num >> position) & 1U);
}


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

x86 assembly (clang, -O2):
<nth_position>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @nth_position(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int rand();
int rng(int low, int high) {
  high += 1;
  int temp = low;
  int addend = rand() % (high - low);
  temp += addend;
  return temp;
}


x86 assembly (clang, -O0):
<rng>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rng>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rng(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 1
store i32 %8, i32* %4
%9 = load i32, i32* %3
store i32 %9, i32* %5
%10 = call i32 (...) @rand()
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = sub nsw i32 %11, %12
%14 = srem i32 %10, %13
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = load i32, i32* %5
%17 = add nsw i32 %16, %15
store i32 %17, i32* %5
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
define i32 @rng(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = srem i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ curtain();
int /*<<< orphan*/ phase1();
int /*<<< orphan*/ phase2();
int /*<<< orphan*/ phase2a();
int /*<<< orphan*/ phase4();
int /*<<< orphan*/ phase5();
int /*<<< orphan*/ phase6();
void compactify() {
  phase1();
  phase2();
  phase2a();
  phase4();
  phase5();
  phase6();
  curtain();
}


x86 assembly (clang, -O0):
<compactify>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <phase1@plt>
mov    $0x0,%al
call   1030 <phase2@plt>
mov    $0x0,%al
call   1070 <phase2a@plt>
mov    $0x0,%al
call   1040 <phase4@plt>
mov    $0x0,%al
call   1090 <phase5@plt>
mov    $0x0,%al
call   1050 <phase6@plt>
mov    $0x0,%al
call   1060 <curtain@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<compactify>:
push   %rax
xor    %eax,%eax
call   1080 <phase1@plt>
xor    %eax,%eax
call   1030 <phase2@plt>
xor    %eax,%eax
call   1070 <phase2a@plt>
xor    %eax,%eax
call   1040 <phase4@plt>
xor    %eax,%eax
call   1090 <phase5@plt>
xor    %eax,%eax
call   1050 <phase6@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <curtain@plt>

LLVM IR (-O0):
define void @compactify() {
%1 = call i32 (...) @phase1()
%2 = call i32 (...) @phase2()
%3 = call i32 (...) @phase2a()
%4 = call i32 (...) @phase4()
%5 = call i32 (...) @phase5()
%6 = call i32 (...) @phase6()
%7 = call i32 (...) @curtain()
ret void
}

LLVM IR (-O2):
define void @compactify() {
%1 = tail call i32 (...) @phase1()
%2 = tail call i32 (...) @phase2()
%3 = tail call i32 (...) @phase2a()
%4 = tail call i32 (...) @phase4()
%5 = tail call i32 (...) @phase5()
%6 = tail call i32 (...) @phase6()
%7 = tail call i32 (...) @curtain()
ret void
}
int callme(void) {
  static int call_times = 0;
  return ++call_times;
}


x86 assembly (clang, -O0):
<callme>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f11(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<callme>:
mov    0x2f1e(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f15(%rip)
ret

LLVM IR (-O0):
@callme.call_times = internal global i32 0
define i32 @callme() {
%1 = load i32, i32* @callme.call_times
%2 = add nsw i32 %1, 1
store i32 %2, i32* @callme.call_times
ret i32 %2
}

LLVM IR (-O2):
@callme.call_times = internal unnamed_addr global i32 0
define i32 @callme() {
%1 = load i32, i32* @callme.call_times
%2 = add nsw i32 %1, 1
store i32 %2, i32* @callme.call_times
ret i32 %2
}
void GB_LOR_f_FP64(double *z, const double *x, const double *y) {
  (*z) = (((*x) != 0) || ((*y) != 0));
}


x86 assembly (clang, -O0):
<GB_LOR_f_FP64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    $0x1,%al
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jne    114a <GB_LOR_f_FP64+0x4a>
jp     114a <GB_LOR_f_FP64+0x4a>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GB_LOR_f_FP64>:
movsd  (%rsi),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1110 <GB_LOR_f_FP64+0x10>
jnp    111d <GB_LOR_f_FP64+0x1d>
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,(%rdi)
ret
cmpneqsd (%rdx),%xmm1
movsd  0xed6(%rip),%xmm0
andpd  %xmm1,%xmm0
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @GB_LOR_f_FP64(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = load double, double* %7
%9 = fcmp une double %8, 0.000000e+00
br i1 %9, label %14, label %10
10: ; preds = %3
%11 = load double*, double** %6
%12 = load double, double* %11
%13 = fcmp une double %12, 0.000000e+00
br label %14
14: ; preds = %10, %3
%15 = phi i1 [ true, %3 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
%17 = sitofp i32 %16 to double
%18 = load double*, double** %4
store double %17, double* %18
ret void
}

LLVM IR (-O2):
define void @GB_LOR_f_FP64(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = fcmp une double %4, 0.000000e+00
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = load double, double* %2
%8 = fcmp une double %7, 0.000000e+00
%9 = uitofp i1 %8 to double
br label %10
10: ; preds = %6, %3
%11 = phi double [ 1.000000e+00, %3 ], [ %9, %6 ]
store double %11, double* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ oi(char *);
scalar_t__ strlen(char *);
int direct_out_it(char *cp) {
  oi(cp);
  return (int)strlen(cp);
}


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

x86 assembly (clang, -O2):
<direct_out_it>:
push   %rbx
mov    %rdi,%rbx
call   1030 <oi@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strlen@plt>

LLVM IR (-O0):
define i32 @direct_out_it(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @oi(i8* %3)
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @direct_out_it(i8* %0) {
%2 = tail call i32 @oi(i8* %0)
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ light;

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
void revelation() {
  char light[489];
  fgets(light, sizeof(light) - 1, stdin);
  printf(light);
}


x86 assembly (clang, -O0):
<revelation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f0,%rsp
lea    -0x1f0(%rbp),%rdi
mov    0x2eaf(%rip),%rax
mov    (%rax),%edx
mov    $0x1e8,%esi
call   1040 <fgets@plt>
lea    -0x1f0(%rbp),%rdi
call   1030 <printf@plt>
add    $0x1f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<revelation>:
push   %rbx
sub    $0x1f0,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1e8,%esi
call   1040 <fgets@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x1f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define void @revelation() {
%1 = alloca [489 x i8]
%2 = getelementptr inbounds [489 x i8], [489 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 488, i32 %3)
%5 = getelementptr inbounds [489 x i8], [489 x i8]* %1, i64 0, i64 0
%6 = call i32 @printf(i8* %5)
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @revelation() {
%1 = alloca [489 x i8]
%2 = getelementptr inbounds [489 x i8], [489 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 488, i32 %3)
%5 = call i32 @printf(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendInterrupt(int, int, int, int);
void ScuSendExternalInterrupt07(void) {
  SendInterrupt(0x57, 0x4, 0x8000, 0x00800000);
}


x86 assembly (clang, -O0):
<ScuSendExternalInterrupt07>:
push   %rbp
mov    %rsp,%rbp
mov    $0x57,%edi
mov    $0x4,%esi
mov    $0x8000,%edx
mov    $0x800000,%ecx
call   1030 <SendInterrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScuSendExternalInterrupt07>:
mov    $0x57,%edi
mov    $0x4,%esi
mov    $0x8000,%edx
mov    $0x800000,%ecx
jmp    1030 <SendInterrupt@plt>

LLVM IR (-O0):
define void @ScuSendExternalInterrupt07() {
%1 = call i32 @SendInterrupt(i32 87, i32 4, i32 32768, i32 8388608)
ret void
}

LLVM IR (-O2):
define void @ScuSendExternalInterrupt07() {
%1 = tail call i32 @SendInterrupt(i32 87, i32 4, i32 32768, i32 8388608)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PrintErrorCode();
int dxl_read_byte(int, int);
int getAngle(int ID, int direction) {
  direction = dxl_read_byte(ID, direction);
  PrintErrorCode();
  return direction;
}


x86 assembly (clang, -O0):
<getAngle>:
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   1040 <dxl_read_byte@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <PrintErrorCode@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getAngle>:
push   %rbx
call   1040 <dxl_read_byte@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <PrintErrorCode@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getAngle(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 @dxl_read_byte(i32 %5, i32 %6)
store i32 %7, i32* %4
%8 = call i32 (...) @PrintErrorCode()
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @getAngle(i32 %0, i32 %1) {
%3 = tail call i32 @dxl_read_byte(i32 %0, i32 %1)
%4 = tail call i32 (...) @PrintErrorCode()
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int send_event;
};
struct TYPE_4__ {
  TYPE_1__ xselection;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xselection_send_event(void *_p, int _v) {
  ((XEvent *)_p)->xselection.send_event = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xselection_send_event>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XEvent_xselection_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(float, float);
int main() {
  foo(1.2f, 2.3f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  0xed5(%rip),%xmm1
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xee7(%rip),%xmm0
movss  0xee3(%rip),%xmm1
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(float 0x3FF3333340000000, float 0x4002666660000000)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(float 0x3FF3333340000000, float 0x4002666660000000)
ret i32 0
}
int test_imm_FAint32_reg(int val) { return ((val) & (0xFA << 0)) ? -20 : -40; }


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

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

LLVM IR (-O0):
define i32 @test_imm_FAint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 250
%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_FAint32_reg(i32 %0) {
%2 = and i32 %0, 250
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void foo_1_2_2_2_2_1_2_2_1() {}


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

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

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

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

/* Variables and functions */
int g_DUMMY_cons_fputs(const char *string, FILE *file) {
  string = string;
  file = file;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @g_DUMMY_cons_fputs(i8* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int pow(int, int);
int getResistance(int st, int nd, int rd) {
  int resistance = 0;
  return resistance += (10 * st + nd) * pow(10, rd);
}


x86 assembly (clang, -O0):
<getResistance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
imul   $0xa,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%esi
mov    $0xa,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getResistance>:
push   %rbx
lea    (%rdi,%rdi,4),%eax
lea    (%rsi,%rax,2),%ebx
mov    $0xa,%edi
mov    %edx,%esi
call   1030 <pow@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getResistance(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
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = mul nsw i32 10, %8
%10 = load i32, i32* %5
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %6
%13 = call i32 @pow(i32 10, i32 %12)
%14 = mul nsw i32 %11, %13
%15 = load i32, i32* %7
%16 = add nsw i32 %15, %14
store i32 %16, i32* %7
ret i32 %16
}

LLVM IR (-O2):
define i32 @getResistance(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %0, 10
%5 = add nsw i32 %4, %1
%6 = tail call i32 @pow(i32 10, i32 %2)
%7 = mul nsw i32 %6, %5
ret i32 %7
}
int __write(int i, char *c, int n) {
  (void)i;
  (void)n;
  (void)c;
  return 0;
}


x86 assembly (clang, -O0):
<__write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @__write(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %6
%9 = load i8*, i8** %5
ret i32 0
}

LLVM IR (-O2):
define i32 @__write(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void saluda(void) {
  printf("\n");
  printf("Hola Mundo!");
  printf("\n");
}


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

x86 assembly (clang, -O2):
<saluda>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str.1 = [12 x i8] c"Hola Mundo!\00"
define void @saluda() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 10)
ret void
}
void initWindows(void) {}


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

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

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

LLVM IR (-O2):
define void @initWindows() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void usage() {
  fprintf(stdout, "./ftalat [-c coreID] startFreq targetFreq\n");
  fprintf(stdout,
          "\t-c coreID\t:\tto run the test on a precise core (default 0)\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xef2(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xefc(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [43 x i8] c"./ftalat [-c coreID] startFreq targetFreq\0A\00"
@.str.1 = [60 x i8] c"\09-c coreID\09:\09to run the test on a precise core (default 0)\0A\00"
define void @usage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [43 x i8] c"./ftalat [-c coreID] startFreq targetFreq\0A\00"
@.str.1 = [60 x i8] c"\09-c coreID\09:\09to run the test on a precise core (default 0)\0A\00"
define void @usage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ propagate_latent_1_latent(int);
void propagate_latent_2_latent(int a2) { propagate_latent_1_latent(a2); }


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

x86 assembly (clang, -O2):
<propagate_latent_2_latent>:
jmp    1030 <propagate_latent_1_latent@plt>

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

LLVM IR (-O2):
define void @propagate_latent_2_latent(i32 %0) {
%2 = tail call i32 @propagate_latent_1_latent(i32 %0)
ret void
}
/* Type definitions */
struct timer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free_timer(struct timer *);
int /*<<< orphan*/ usleep_since_timer_start(struct timer *, long);
void usleep_since_timer_start_free(struct timer *t, long usec) {
  usleep_since_timer_start(t, usec);
  free_timer(t);
}


x86 assembly (clang, -O0):
<usleep_since_timer_start_free>:
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   1040 <usleep_since_timer_start@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free_timer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usleep_since_timer_start_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <usleep_since_timer_start@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free_timer@plt>

LLVM IR (-O0):
%struct.timer = type { i32 }
define void @usleep_since_timer_start_free(%struct.timer* %0, i64 %1) {
%3 = alloca %struct.timer*
%4 = alloca i64
store %struct.timer* %0, %struct.timer** %3
store i64 %1, i64* %4
%5 = load %struct.timer*, %struct.timer** %3
%6 = load i64, i64* %4
%7 = call i32 @usleep_since_timer_start(%struct.timer* %5, i64 %6)
%8 = load %struct.timer*, %struct.timer** %3
%9 = call i32 @free_timer(%struct.timer* %8)
ret void
}

LLVM IR (-O2):
%struct.timer = type { i32 }
define void @usleep_since_timer_start_free(%struct.timer* %0, i64 %1) {
%3 = tail call i32 @usleep_since_timer_start(%struct.timer* %0, i64 %1)
%4 = tail call i32 @free_timer(%struct.timer* %0)
ret void
}
void SteamAPI_ISteamHTMLSurface_AddHeader(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamHTMLSurface_AddHeader>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_AddHeader = [37 x i8] c"SteamAPI_ISteamHTMLSurface_AddHeader\00"
define void @SteamAPI_ISteamHTMLSurface_AddHeader(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_AddHeader, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_AddHeader = [37 x i8] c"SteamAPI_ISteamHTMLSurface_AddHeader\00"
define void @SteamAPI_ISteamHTMLSurface_AddHeader(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_AddHeader, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lseek(int, long, int /*<<< orphan*/);
int read(int, char *, int);
int bread(int fd, char *buf, int blk) {
  lseek(fd, (long)blk << 10, 0);
  if (read(fd, buf, 1024) != 1024)
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<bread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
movslq -0x14(%rbp),%rsi
shl    $0xa,%rsi
xor    %edx,%edx
call   1030 <lseek@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x400,%edx
call   1040 <read@plt>
cmp    $0x400,%eax
je     116c <bread+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1173 <bread+0x53>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bread>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
movslq %edx,%rsi
shl    $0xa,%rsi
xor    %edx,%edx
call   1030 <lseek@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
call   1040 <read@plt>
xor    %ecx,%ecx
cmp    $0x400,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @bread(i32 %0, i8* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = shl nsw i64 %4, 10
%6 = tail call i32 @lseek(i32 %0, i64 %5, i32 0)
%7 = tail call i32 @read(i32 %0, i8* %1, i32 1024)
%8 = icmp eq i32 %7, 1024
%9 = zext i1 %8 to i32
ret i32 %9
}
int main(int argc, char *argv[]) {
  char s[] = {"bbab"};
  char p[] = {"b*a*"};
  printf("%d\n", isMatch(s, p));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x15(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x11(%rbp)
mov    0xebe(%rip),%eax
mov    %eax,-0x1a(%rbp)
mov    0xeb9(%rip),%al
mov    %al,-0x16(%rbp)
lea    -0x15(%rbp),%rdi
lea    -0x1a(%rbp),%rsi
mov    $0x0,%al
call   1030 <isMatch@plt>
mov    %eax,%esi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movb   $0x0,0x14(%rsp)
movl   $0x62616262,0x10(%rsp)
62
movb   $0x0,0xc(%rsp)
movl   $0x2a612a62,0x8(%rsp)
2a
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1030 <isMatch@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.s = [5 x i8] c"bbab\00"
@__const.main.p = [5 x i8] c"b*a*\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [5 x i8]
%6 = alloca [5 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = bitcast [5 x i8]* %5 to i8*
%8 = bitcast [5 x i8]* %6 to i8*
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%11 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @isMatch to i32 (i8*, i8*, ...)*)(i8* %9, i8* %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [5 x i8] c"bbab\00"
@__const.main.p = [5 x i8] c"b*a*\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i8]
%4 = alloca [5 x i8]
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%7 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @isMatch to i32 (i8*, i8*, ...)*)(i8* %5, i8* %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
int __divsi3(int, int);
int __modsi3(int value1, int value2) {
  return value1 - __divsi3(value1, value2) * value2;
}


x86 assembly (clang, -O0):
<__modsi3>:
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    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <__divsi3@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%ecx
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__modsi3>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <__divsi3@plt>
imul   %ebx,%eax
sub    %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @__modsi3(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* %3
%7 = load i32, i32* %4
%8 = call i32 @__divsi3(i32 %6, i32 %7)
%9 = load i32, i32* %4
%10 = mul nsw i32 %8, %9
%11 = sub nsw i32 %5, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @__modsi3(i32 %0, i32 %1) {
%3 = tail call i32 @__divsi3(i32 %0, i32 %1)
%4 = mul nsw i32 %3, %1
%5 = sub nsw i32 %0, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, float, char);
int main() {
  int v1;
  float v2;
  char v3;
  v1 = 65;
  v2 = -16.65;
  v3 = 'a';
  printf("%d %f %c", v1, v2, v3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x41,-0x8(%rbp)
movss  0xed2(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movb   $0x61,-0xd(%rbp)
mov    -0x8(%rbp),%esi
movss  -0xc(%rbp),%xmm0
lea    0xebe(%rip),%rdi
movsbl -0xd(%rbp),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
movss  0xee0(%rip),%xmm0
mov    $0x41,%esi
mov    $0x61,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %f %c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 65, float 0xC030A66660000000, i8 signext 97)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ in_chars(int /*<<< orphan*/, int /*<<< orphan*/);
void do_insert(void) { in_chars(0, 0); }


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

x86 assembly (clang, -O2):
<do_insert>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <in_chars@plt>

LLVM IR (-O0):
define void @do_insert() {
%1 = call i32 @in_chars(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @do_insert() {
%1 = tail call i32 @in_chars(i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __fpurge(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ system(char *);
void finalize_scr() {
  __fpurge(stdin);
  system("clear");
}


x86 assembly (clang, -O0):
<finalize_scr>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <__fpurge@plt>
lea    0xec7(%rip),%rdi
call   1040 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<finalize_scr>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1030 <__fpurge@plt>
lea    0xeca(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@stdin = global i32 0
@.str = [6 x i8] c"clear\00"
define void @finalize_scr() {
%1 = load i32, i32* @stdin
%2 = call i32 @__fpurge(i32 %1)
%3 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [6 x i8] c"clear\00"
define void @finalize_scr() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @__fpurge(i32 %1)
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wfree(void *);
void freeInt(void *ptr) { wfree(ptr); }


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

x86 assembly (clang, -O2):
<freeInt>:
jmp    1030 <wfree@plt>

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

LLVM IR (-O2):
define void @freeInt(i8* %0) {
%2 = tail call i32 @wfree(i8* %0)
ret void
}
int f2(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<f2>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @f2(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @f2(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
unsigned string_hash_func(const void *p) {
  unsigned hash = 5381;
  const signed char *c;
  for (c = p; *c; c++)
    hash = (hash << 5) + hash + (unsigned)*c;
  return hash;
}


x86 assembly (clang, -O0):
<string_hash_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <string_hash_func+0x4a>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
add    -0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1117 <string_hash_func+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_hash_func>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <string_hash_func+0x28>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %eax,%edx
shl    $0x5,%edx
add    %eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <string_hash_func+0x10>
ret
mov    $0x1505,%eax
ret

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

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