xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ prv_is_simple_operator(char);
scalar_t__ prv_is_whitespace(char);
bool prv_is_separator(char c) {
  return prv_is_whitespace(c) || prv_is_simple_operator(c);
}


x86 assembly (clang, -O0):
<prv_is_separator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <prv_is_whitespace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <prv_is_separator+0x3c>
movsbl -0x1(%rbp),%edi
call   1030 <prv_is_simple_operator@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prv_is_separator>:
push   %rbx
mov    %edi,%ebx
call   1040 <prv_is_whitespace@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <prv_is_separator+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1030 <prv_is_simple_operator@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @prv_is_separator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @prv_is_whitespace(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @prv_is_simple_operator(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @prv_is_separator(i8 signext %0) {
%2 = tail call i64 @prv_is_whitespace(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @prv_is_simple_operator(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
void av_dv_codec_profile() {}


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

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

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

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

/* Variables and functions */
struct udvt_entry *add_udv_by_name(char *);
int /*<<< orphan*/ copy_str(char *, int, int);
struct udvt_entry *add_udv(int t_num) {
  char varname[50 + 1];
  copy_str(varname, t_num, 50);
  return add_udv_by_name(varname);
}


x86 assembly (clang, -O0):
<add_udv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x32,%edx
call   1030 <copy_str@plt>
lea    -0x40(%rbp),%rdi
call   1040 <add_udv_by_name@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_udv>:
push   %rbx
sub    $0x40,%rsp
mov    %edi,%esi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x32,%edx
call   1030 <copy_str@plt>
mov    %rbx,%rdi
call   1040 <add_udv_by_name@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.udvt_entry = type { i32 }
define %struct.udvt_entry* @add_udv(i32 %0) {
%2 = alloca i32
%3 = alloca [51 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [51 x i8], [51 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @copy_str(i8* %4, i32 %5, i32 50)
%7 = getelementptr inbounds [51 x i8], [51 x i8]* %3, i64 0, i64 0
%8 = call %struct.udvt_entry* @add_udv_by_name(i8* %7)
ret %struct.udvt_entry* %8
}

LLVM IR (-O2):
%struct.udvt_entry = type { i32 }
define %struct.udvt_entry* @add_udv(i32 %0) {
%2 = alloca [51 x i8]
%3 = getelementptr inbounds [51 x i8], [51 x i8]* %2, i64 0, i64 0
%4 = call i32 @copy_str(i8* %3, i32 %0, i32 50)
%5 = call %struct.udvt_entry* @add_udv_by_name(i8* %3)
ret %struct.udvt_entry* %5
}
/* Type definitions */
struct sigaction {
  int dummy;
};

/* Variables and functions */
int my_sigaction(int, struct sigaction const *, struct sigaction *);
int sigaction(int signum, const struct sigaction *act,
              struct sigaction *oldact) {
  return my_sigaction(signum, act, oldact);
}


x86 assembly (clang, -O0):
<sigaction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <my_sigaction@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigaction>:
jmp    1030 <my_sigaction@plt>

LLVM IR (-O0):
%struct.sigaction = type { i32 }
define i32 @sigaction(i32 %0, %struct.sigaction* %1, %struct.sigaction* %2) {
%4 = alloca i32
%5 = alloca %struct.sigaction*
%6 = alloca %struct.sigaction*
store i32 %0, i32* %4
store %struct.sigaction* %1, %struct.sigaction** %5
store %struct.sigaction* %2, %struct.sigaction** %6
%7 = load i32, i32* %4
%8 = load %struct.sigaction*, %struct.sigaction** %5
%9 = load %struct.sigaction*, %struct.sigaction** %6
%10 = call i32 @my_sigaction(i32 %7, %struct.sigaction* %8, %struct.sigaction* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.sigaction = type { i32 }
define i32 @sigaction(i32 %0, %struct.sigaction* %1, %struct.sigaction* %2) {
%4 = tail call i32 @my_sigaction(i32 %0, %struct.sigaction* %1, %struct.sigaction* %2)
ret i32 %4
}
int getButton() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @getButton() {
ret i32 0
}
long oldfunctiondef3() { return (99); }


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

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

LLVM IR (-O0):
define i64 @oldfunctiondef3() {
ret i64 99
}

LLVM IR (-O2):
define i64 @oldfunctiondef3() {
ret i64 99
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
unsigned char pow(int, unsigned char);
void flags_set_byte(unsigned char *p_flag, unsigned char pos) {
  assert(pos >= 0 && pos <= 7);
  unsigned char to_mul = pow(2, pos);
  *p_flag = (*p_flag | to_mul);
}


x86 assembly (clang, -O0):
<flags_set_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xb(%rbp)
jl     1151 <flags_set_byte+0x31>
movzbl -0x9(%rbp),%eax
cmp    $0x7,%eax
setle  %al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x2,%edi
movzbl -0x9(%rbp),%esi
call   1040 <pow@plt>
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flags_set_byte>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %edi,%edi
cmp    $0x8,%bl
setb   %dil
call   1030 <assert@plt>
mov    $0x2,%edi
mov    %ebx,%esi
call   1040 <pow@plt>
or     %al,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @flags_set_byte(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i8, i8* %4
%11 = zext i8 %10 to i32
%12 = icmp sle i32 %11, 7
br label %13
13: ; preds = %9, %2
%14 = phi i1 [ false, %2 ], [ %12, %9 ]
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i8, i8* %4
%18 = call zeroext i8 @pow(i32 2, i8 zeroext %17)
store i8 %18, i8* %5
%19 = load i8*, i8** %3
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = load i8, i8* %5
%23 = zext i8 %22 to i32
%24 = or i32 %21, %23
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %3
store i8 %25, i8* %26
ret void
}

LLVM IR (-O2):
define void @flags_set_byte(i8* nocapture %0, i8 zeroext %1) {
%3 = icmp ult i8 %1, 8
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call zeroext i8 @pow(i32 2, i8 zeroext %1)
%7 = load i8, i8* %0
%8 = or i8 %7, %6
store i8 %8, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void callback(char *string, int len) {
  printf("CALLBACK : Trouve : %s\n", string);
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"CALLBACK : Trouve : %s\0A\00"
define void @callback(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 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"CALLBACK : Trouve : %s\0A\00"
define void @callback(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void bar_llong(long long *x) { *x = __real foo_llong(5); }


x86 assembly (clang, -O0):
<bar_llong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x5,%edi
mov    $0x0,%al
call   1030 <foo_llong@plt>
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar_llong>:
push   %rbx
mov    %rdi,%rbx
mov    $0x5,%edi
xor    %eax,%eax
call   1030 <foo_llong@plt>
cltq
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @bar_llong(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @foo_llong to i32 (i32, ...)*)(i32 5)
%4 = sext i32 %3 to i64
%5 = load i64*, i64** %2
store i64 %4, i64* %5
ret void
}

LLVM IR (-O2):
define void @bar_llong(i64* nocapture writeonly %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @foo_llong to i32 (i32, ...)*)(i32 5)
%3 = sext i32 %2 to i64
store i64 %3, i64* %0
ret void
}
int test_imm_E1uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xE1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E1uint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0xe1,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E1uint64_highword_reg>:
movabs $0xe100000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E1uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 966367641600
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
unsigned long __raw_local_save_flags();
int /*<<< orphan*/ raw_local_irq_restore(int /*<<< orphan*/);
unsigned long __raw_local_irq_save(void) {
  unsigned long flags;
  flags = __raw_local_save_flags();
  raw_local_irq_restore(0);
  return flags;
}


x86 assembly (clang, -O0):
<__raw_local_irq_save>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__raw_local_save_flags@plt>
mov    %rax,-0x8(%rbp)
xor    %edi,%edi
call   1040 <raw_local_irq_restore@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__raw_local_irq_save>:
push   %rbx
xor    %eax,%eax
call   1030 <__raw_local_save_flags@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   1040 <raw_local_irq_restore@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @__raw_local_irq_save() {
%1 = alloca i64
%2 = call i64 (...) @__raw_local_save_flags()
store i64 %2, i64* %1
%3 = call i32 @raw_local_irq_restore(i32 0)
%4 = load i64, i64* %1
ret i64 %4
}

LLVM IR (-O2):
define i64 @__raw_local_irq_save() {
%1 = tail call i64 (...) @__raw_local_save_flags()
%2 = tail call i32 @raw_local_irq_restore(i32 0)
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ copy_roots();
int /*<<< orphan*/ inflate_new_space();
int /*<<< orphan*/ prep_new_space();
int /*<<< orphan*/ switch_spaces();
void gc(void) {
  prep_new_space();
  copy_roots();
  inflate_new_space();
  switch_spaces();
}


x86 assembly (clang, -O0):
<gc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <prep_new_space@plt>
mov    $0x0,%al
call   1060 <copy_roots@plt>
mov    $0x0,%al
call   1050 <inflate_new_space@plt>
mov    $0x0,%al
call   1040 <switch_spaces@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gc>:
push   %rax
xor    %eax,%eax
call   1030 <prep_new_space@plt>
xor    %eax,%eax
call   1060 <copy_roots@plt>
xor    %eax,%eax
call   1050 <inflate_new_space@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <switch_spaces@plt>

LLVM IR (-O0):
define void @gc() {
%1 = call i32 (...) @prep_new_space()
%2 = call i32 (...) @copy_roots()
%3 = call i32 (...) @inflate_new_space()
%4 = call i32 (...) @switch_spaces()
ret void
}

LLVM IR (-O2):
define void @gc() {
%1 = tail call i32 (...) @prep_new_space()
%2 = tail call i32 (...) @copy_roots()
%3 = tail call i32 (...) @inflate_new_space()
%4 = tail call i32 (...) @switch_spaces()
ret void
}
/* Variables and functions */
scalar_t__ klock_getT2();
int getTIssue() {
  int *a = (int *)klock_getT2();
  int b = 14;
  int c = *a - b;
  return c;
}


x86 assembly (clang, -O0):
<getTIssue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <klock_getT2@plt>
mov    %rax,-0x8(%rbp)
movl   $0xe,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTIssue>:
push   %rax
xor    %eax,%eax
call   1030 <klock_getT2@plt>
mov    (%rax),%eax
add    $0xfffffff2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getTIssue() {
%1 = alloca i32*
%2 = alloca i32
%3 = alloca i32
%4 = call i64 (...) @klock_getT2()
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %1
store i32 14, i32* %2
%6 = load i32*, i32** %1
%7 = load i32, i32* %6
%8 = load i32, i32* %2
%9 = sub nsw i32 %7, %8
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @getTIssue() {
%1 = tail call i64 (...) @klock_getT2()
%2 = inttoptr i64 %1 to i32*
%3 = load i32, i32* %2
%4 = add nsw i32 %3, -14
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ LZ4_compressBound(int);
int LZ4_compress_HC_extStateHC(void *, char const *, char *, int,
                               int /*<<< orphan*/, int /*<<< orphan*/);
int LZ4_compressHC_withStateHC(void *state, const char *src, char *dst,
                               int srcSize) {
  return LZ4_compress_HC_extStateHC(state, src, dst, srcSize,
                                    LZ4_compressBound(srcSize), 0);
}


x86 assembly (clang, -O0):
<LZ4_compressHC_withStateHC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <LZ4_compressBound@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%ecx
mov    %eax,%r8d
xor    %r9d,%r9d
call   1040 <LZ4_compress_HC_extStateHC@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_compressHC_withStateHC>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
mov    %ecx,%edi
call   1030 <LZ4_compressBound@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %ebx,%ecx
mov    %eax,%r8d
xor    %r9d,%r9d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <LZ4_compress_HC_extStateHC@plt>

LLVM IR (-O0):
define i32 @LZ4_compressHC_withStateHC(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = load i32, i32* %8
%14 = call i32 @LZ4_compressBound(i32 %13)
%15 = call i32 @LZ4_compress_HC_extStateHC(i8* %9, i8* %10, i8* %11, i32 %12, i32 %14, i32 0)
ret i32 %15
}

LLVM IR (-O2):
define i32 @LZ4_compressHC_withStateHC(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @LZ4_compressBound(i32 %3)
%6 = tail call i32 @LZ4_compress_HC_extStateHC(i8* %0, i8* %1, i8* %2, i32 %3, i32 %5, i32 0)
ret i32 %6
}
char *langRomTypeSvi328Prn() { return "SVI-328 Printer"; }


x86 assembly (clang, -O0):
<langRomTypeSvi328Prn>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<langRomTypeSvi328Prn>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"SVI-328 Printer\00"
define i8* @langRomTypeSvi328Prn() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"SVI-328 Printer\00"
define i8* @langRomTypeSvi328Prn() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
void uart_puts(const char *s) {}


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

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

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

LLVM IR (-O2):
define void @uart_puts(i8* nocapture %0) {
ret void
}
int lib_sub(const int a, const int b) { return a - b; }


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

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

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

LLVM IR (-O2):
define i32 @lib_sub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
liq2(pbottle) int pbottle;
{ return ((1 - pbottle) * 21 + (pbottle >> 1) * (21 + 22)); }


x86 assembly (clang, -O0):
<liq2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%eax
sub    -0x4(%rbp),%eax
imul   $0x15,%eax,%eax
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
imul   $0x2b,%ecx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<liq2>:
mov    $0x1,%eax
sub    %edi,%eax
lea    (%rax,%rax,4),%ecx
lea    (%rax,%rcx,4),%ecx
sar    %edi
imul   $0x2b,%edi,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @liq2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 1, %3
%5 = mul nsw i32 %4, 21
%6 = load i32, i32* %2
%7 = ashr i32 %6, 1
%8 = mul nsw i32 %7, 43
%9 = add nsw i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @liq2(i32 %0) {
%2 = sub nsw i32 1, %0
%3 = mul nsw i32 %2, 21
%4 = ashr i32 %0, 1
%5 = mul nsw i32 %4, 43
%6 = add nsw i32 %3, %5
ret i32 %6
}
void rop3_218_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = S & *D;
  stk3 = ~stk3;
  stk2 = T & stk3;
  stk1 = *D ^ stk2;
  *D = stk1;
}


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

x86 assembly (clang, -O2):
<rop3_218_0_0>:
mov    (%rdi),%al
and    %al,%sil
not    %sil
and    %dl,%sil
xor    %al,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_218_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = and i32 %11, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = xor i32 %18, -1
%20 = trunc i32 %19 to i8
store i8 %20, i8* %9
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = load i8, i8* %9
%24 = zext i8 %23 to i32
%25 = and i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %8
%27 = load i8*, i8** %4
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = load i8, i8* %8
%31 = zext i8 %30 to i32
%32 = xor i32 %29, %31
%33 = trunc i32 %32 to i8
store i8 %33, i8* %7
%34 = load i8, i8* %7
%35 = load i8*, i8** %4
store i8 %34, i8* %35
ret void
}

LLVM IR (-O2):
define void @rop3_218_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
%6 = xor i8 %5, -1
%7 = and i8 %6, %2
%8 = xor i8 %7, %4
store i8 %8, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popreal8array_(char *x, unsigned int *n) { popNarray(x, (*n * 8)); }


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

x86 assembly (clang, -O2):
<popreal8array_>:
mov    (%rsi),%esi
shl    $0x3,%esi
jmp    1030 <popNarray@plt>

LLVM IR (-O0):
define void @popreal8array_(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 = load i32, i32* %6
%8 = mul i32 %7, 8
%9 = call i32 @popNarray(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @popreal8array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 3
%5 = tail call i32 @popNarray(i8* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int /*<<< orphan*/ STDIN_FILENO;
int fcntl(int /*<<< orphan*/, int /*<<< orphan*/, ...);
int async_setup_stdin(void) {
  return fcntl(STDIN_FILENO, F_SETFL,
               fcntl(STDIN_FILENO, F_GETFL) | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<async_setup_stdin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    %eax,%edx
mov    0x2e90(%rip),%rax
or     (%rax),%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<async_setup_stdin>:
push   %rbp
push   %rbx
push   %rax
mov    0x2eae(%rip),%rax
mov    (%rax),%ebx
mov    0x2eb5(%rip),%rax
mov    (%rax),%ebp
mov    0x2ea4(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <fcntl@plt>
mov    0x2eaa(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
@F_SETFL = global i32 0
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @async_setup_stdin() {
%1 = load i32, i32* @STDIN_FILENO
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @STDIN_FILENO
%4 = load i32, i32* @F_GETFL
%5 = call i32 (i32, i32, ...) @fcntl(i32 %3, i32 %4)
%6 = load i32, i32* @O_NONBLOCK
%7 = or i32 %5, %6
%8 = call i32 (i32, i32, ...) @fcntl(i32 %1, i32 %2, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
@F_SETFL = global i32 0
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @async_setup_stdin() {
%1 = load i32, i32* @STDIN_FILENO
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @F_GETFL
%4 = tail call i32 (i32, i32, ...) @fcntl(i32 %1, i32 %3)
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %5, %4
%7 = tail call i32 (i32, i32, ...) @fcntl(i32 %1, i32 %2, i32 %6)
ret i32 %7
}
int calculateBitmapSize(int width, int height) {
  return (14 + 40 + (width * height * 3));
}


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

x86 assembly (clang, -O2):
<calculateBitmapSize>:
imul   %esi,%edi
lea    (%rdi,%rdi,2),%eax
add    $0x36,%eax
ret

LLVM IR (-O0):
define i32 @calculateBitmapSize(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 = mul nsw i32 %5, %6
%8 = mul nsw i32 %7, 3
%9 = add nsw i32 54, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @calculateBitmapSize(i32 %0, i32 %1) {
%3 = mul i32 %0, 3
%4 = mul i32 %3, %1
%5 = add nsw i32 %4, 54
ret i32 %5
}
/* Type definitions */
struct option {
  int dummy;
};

/* Variables and functions */
int _getopt_internal(int, char **, char const *, struct option const *, int *,
                     int /*<<< orphan*/);
int getopt_long(int argc, char *argv[], const char *shortopts,
                const struct option *longopts, int *longind) {
  return _getopt_internal(argc, argv, shortopts, longopts, longind, 0);
}


x86 assembly (clang, -O0):
<getopt_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
xor    %r9d,%r9d
call   1030 <_getopt_internal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt_long>:
xor    %r9d,%r9d
jmp    1030 <_getopt_internal@plt>

LLVM IR (-O0):
%struct.option = type { i32 }
define i32 @getopt_long(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.option* %3, %struct.option** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.option*, %struct.option** %9
%15 = load i32*, i32** %10
%16 = call i32 @_getopt_internal(i32 %11, i8** %12, i8* %13, %struct.option* %14, i32* %15, i32 0)
ret i32 %16
}

LLVM IR (-O2):
%struct.option = type { i32 }
define i32 @getopt_long(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = tail call i32 @_getopt_internal(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, i32 0)
ret i32 %6
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int64_t Function4Int64(int64_t a, int64_t b, int64_t c, int64_t d) {
  return a + b + c + d;
}


x86 assembly (clang, -O0):
<Function4Int64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Function4Int64>:
lea    (%rdi,%rsi,1),%rax
add    %rdx,%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @Function4Int64(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = add nsw i64 %9, %10
%12 = load i64, i64* %7
%13 = add nsw i64 %11, %12
%14 = load i64, i64* %8
%15 = add nsw i64 %13, %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @Function4Int64(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = add nsw i64 %1, %0
%6 = add nsw i64 %5, %2
%7 = add nsw i64 %6, %3
ret i64 %7
}
/* Variables and functions */
int run_migration(char const *, int /*<<< orphan*/);
int migration_downgrade(const char *path) { return run_migration(path, 0); }


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

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

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

LLVM IR (-O2):
define i32 @migration_downgrade(i8* %0) {
%2 = tail call i32 @run_migration(i8* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, int);
void LZ4_copy8(void *dstPtr, const void *srcPtr) { memcpy(dstPtr, srcPtr, 8); }


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

x86 assembly (clang, -O2):
<LZ4_copy8>:
mov    $0x8,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @LZ4_copy8(i8* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %0, i8* %1, i32 8)
ret void
}
void foo526(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo526(i32 %0) {
ret void
}
char *__SubStrings__ASCII__LowerS(char *const S) {
  register char *Worker = S;
  for (; *Worker != '\0'; ++Worker) {
    if (*Worker >= 'A' && *Worker <= 'Z') {
      *Worker += ('a' - 'A');
    }
  }
  return S;
}


x86 assembly (clang, -O0):
<__SubStrings__ASCII__LowerS>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1162 <__SubStrings__ASCII__LowerS+0x62>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     114c <__SubStrings__ASCII__LowerS+0x4c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     114c <__SubStrings__ASCII__LowerS+0x4c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
add    $0x20,%ecx
mov    %cl,(%rax)
jmp    1151 <__SubStrings__ASCII__LowerS+0x51>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <__SubStrings__ASCII__LowerS+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__SubStrings__ASCII__LowerS>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     112c <__SubStrings__ASCII__LowerS+0x2c>
lea    0x1(%rax),%rdx
jmp    111b <__SubStrings__ASCII__LowerS+0x1b>
nop
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
je     112c <__SubStrings__ASCII__LowerS+0x2c>
lea    -0x41(%rcx),%esi
cmp    $0x19,%sil
ja     1110 <__SubStrings__ASCII__LowerS+0x10>
add    $0x20,%cl
mov    %cl,-0x1(%rdx)
jmp    1110 <__SubStrings__ASCII__LowerS+0x10>
ret

LLVM IR (-O0):
define i8* @__SubStrings__ASCII__LowerS(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %27, %1
%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 %30
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %26
15: ; preds = %10
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 90
br i1 %19, label %20, label %26
20: ; preds = %15
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = add nsw i32 %23, 32
%25 = trunc i32 %24 to i8
store i8 %25, i8* %21
br label %26
26: ; preds = %20, %15, %10
br label %27
27: ; preds = %26
%28 = load i8*, i8** %3
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %3
br label %5
30: ; preds = %5
%31 = load i8*, i8** %2
ret i8* %31
}

LLVM IR (-O2):
define i8* @__SubStrings__ASCII__LowerS(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %4, %9
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ leave(int, char *);
sigemt() { leave(1, "Unable to start driver.  Try again."); }


x86 assembly (clang, -O0):
<sigemt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    0xedc(%rip),%rsi
call   1030 <leave@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [36 x i8] c"Unable to start driver. Try again.\00"
define i32 @sigemt() {
%1 = alloca i32
%2 = call i32 @leave(i32 1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [36 x i8] c"Unable to start driver. Try again.\00"
define i32 @sigemt() {
%1 = tail call i32 @leave(i32 1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int snowflakes(int *, int);
int snowflakes_brute(int *, int);
int test_terrain() {
  int array[] = {0, 2, 5, 3, 7, 2, 4, 8, 3, 1};
  return 10 == snowflakes_brute(array, 10) && 10 == snowflakes(array, 10);
}


x86 assembly (clang, -O0):
<test_terrain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <snowflakes_brute@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0xa,%ecx
cmp    %edx,%ecx
mov    %al,-0x31(%rbp)
jne    118c <test_terrain+0x5c>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1050 <snowflakes@plt>
mov    %eax,%ecx
mov    $0xa,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_terrain>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1030 <snowflakes_brute@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
jne    1174 <test_terrain+0x54>
mov    %rsp,%rdi
mov    $0xa,%esi
call   1040 <snowflakes@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
sete   %al
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.test_terrain.array = [10 x i32] [i32 0, i32 2, i32 5, i32 3, i32 7, i32 2, i32 4, i32 8, i32 3, i32 1]
define i32 @test_terrain() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @snowflakes_brute(i32* %3, i32 10)
%5 = icmp eq i32 10, %4
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%8 = call i32 @snowflakes(i32* %7, i32 10)
%9 = icmp eq i32 10, %8
br label %10
10: ; preds = %6, %0
%11 = phi i1 [ false, %0 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@__const.test_terrain.array = [10 x i32] [i32 0, i32 2, i32 5, i32 3, i32 7, i32 2, i32 4, i32 8, i32 3, i32 1]
define i32 @test_terrain() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @snowflakes_brute(i32* %3, i32 10)
%5 = icmp eq i32 %4, 10
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = call i32 @snowflakes(i32* %3, i32 10)
%8 = icmp eq i32 %7, 10
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %0
%11 = phi i32 [ 0, %0 ], [ %9, %6 ]
ret i32 %11
}
void force_eval_float(float x) { volatile float y = x; }


x86 assembly (clang, -O0):
<force_eval_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<force_eval_float>:
movss  %xmm0,-0x4(%rsp)
ret

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

LLVM IR (-O2):
define void @force_eval_float(float %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
store volatile float %0, float* %2
ret void
}
void yy_1_ptExtSpaceStar(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_ptExtSpaceStar(i8* nocapture %0, i32 %1) {
ret void
}
int picked6() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @picked6() {
ret i32 0
}
int codepoint_to_charindex(const unsigned int codepoint) {
  if (codepoint == 32) {
    return codepoint - 32;
  } else if (codepoint == 43) {
    return codepoint - 42;
  } else if ((codepoint >= 45) && (codepoint <= 46)) {
    return codepoint - 43;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<codepoint_to_charindex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jne    111f <codepoint_to_charindex+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <codepoint_to_charindex+0x60>
cmpl   $0x2b,-0x8(%rbp)
jne    1137 <codepoint_to_charindex+0x37>
mov    -0x8(%rbp),%eax
sub    $0x2a,%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <codepoint_to_charindex+0x60>
cmpl   $0x2d,-0x8(%rbp)
jb     1159 <codepoint_to_charindex+0x59>
cmpl   $0x2e,-0x8(%rbp)
ja     1159 <codepoint_to_charindex+0x59>
mov    -0x8(%rbp),%eax
sub    $0x2b,%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <codepoint_to_charindex+0x60>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<codepoint_to_charindex>:
cmp    $0x20,%edi
je     1110 <codepoint_to_charindex+0x10>
cmp    $0x2b,%edi
jne    1113 <codepoint_to_charindex+0x13>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret
lea    -0x2d(%rdi),%eax
add    $0xffffffd5,%edi
cmp    $0x2,%eax
mov    $0xffffffff,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @codepoint_to_charindex(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 32
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sub i32 %7, 32
store i32 %8, i32* %2
br label %25
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 43
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %3
%14 = sub i32 %13, 42
store i32 %14, i32* %2
br label %25
15: ; preds = %9
%16 = load i32, i32* %3
%17 = icmp uge i32 %16, 45
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = load i32, i32* %3
%20 = icmp ule i32 %19, 46
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* %3
%23 = sub i32 %22, 43
store i32 %23, i32* %2
br label %25
24: ; preds = %18, %15
store i32 -1, i32* %2
br label %25
25: ; preds = %24, %21, %12, %6
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @codepoint_to_charindex(i32 %0) {
switch i32 %0, label %3 [
i32 32, label %8
i32 43, label %2
]
2: ; preds = %1
br label %8
3: ; preds = %1
%4 = add i32 %0, -45
%5 = icmp ult i32 %4, 2
%6 = add i32 %0, -43
%7 = select i1 %5, i32 %6, i32 -1
br label %8
8: ; preds = %3, %1, %2
%9 = phi i32 [ 1, %2 ], [ 0, %1 ], [ %7, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ DrawBMP220(unsigned long, unsigned long, unsigned long,
                              unsigned long, unsigned long, unsigned long,
                              unsigned long, unsigned long);
void drawbmp(unsigned long xs, unsigned long ys, unsigned long ws,
             unsigned long hs, unsigned long xd, unsigned long yd,
             unsigned long wd, unsigned long hd) {
  DrawBMP220(xs, ys, ws, hs, xd, yd, wd, hd);
}


x86 assembly (clang, -O0):
<drawbmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <DrawBMP220@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawbmp>:
jmp    1030 <DrawBMP220@plt>

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

LLVM IR (-O2):
define void @drawbmp(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7) {
%9 = tail call i32 @DrawBMP220(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7)
ret void
}
/* Variables and functions */
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int is_library(char *project_name) {
  if (strlen(project_name) < 3) {
    return 0;
  }
  if (strncmp(project_name, "lib", 3) == 0) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_library>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x3,%eax
jge    114a <is_library+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    117c <is_library+0x5c>
mov    -0x10(%rbp),%rdi
lea    0xeab(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1175 <is_library+0x55>
movl   $0x1,-0x4(%rbp)
jmp    117c <is_library+0x5c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_library>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x3,%ecx
jl     1151 <is_library+0x31>
lea    0xec7(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"lib\00"
define i32 @is_library(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp slt i32 %2, 3
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int yyerror(char *s) { return fprintf(stderr, "%s\n", s); }


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyerror>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @yyerror(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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @yyerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint8_t encodeFourthByte(uint32_t a) {
  uint32_t *p_a = &a;
  uint8_t *p_b = (uint8_t *)p_a;
  return *(p_b + 3);
}


x86 assembly (clang, -O0):
<encodeFourthByte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @encodeFourthByte(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
store i32 %0, i32* %2
store i32* %2, i32** %3
%5 = load i32*, i32** %3
store i32* %5, i32** %4
%6 = load i32*, i32** %4
%7 = getelementptr inbounds i32, i32* %6, i64 3
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @encodeFourthByte(i32 %0) {
ret i32 poison
}
void RTDbgModSetTag(void) {}


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

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

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

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