xunge/DecIR huggingface dataset:
/* Variables and functions */
int dq_count_impl(unsigned int, unsigned int, unsigned int);
int dq_space_impl(unsigned int tail, unsigned int head, unsigned int size) {
  return dq_count_impl(head, tail + 1, size);
}


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

x86 assembly (clang, -O2):
<dq_space_impl>:
mov    %esi,%eax
lea    0x1(%rdi),%esi
mov    %eax,%edi
jmp    1030 <dq_count_impl@plt>

LLVM IR (-O0):
define i32 @dq_space_impl(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* %5
%8 = load i32, i32* %4
%9 = add i32 %8, 1
%10 = load i32, i32* %6
%11 = call i32 @dq_count_impl(i32 %7, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @dq_space_impl(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %0, 1
%5 = tail call i32 @dq_count_impl(i32 %1, i32 %4, i32 %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ test_css_comment_entities();
int /*<<< orphan*/ test_css_comments();
void all_css_tests() {
  test_css_comments();
  test_css_comment_entities();
}


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

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

LLVM IR (-O0):
define void @all_css_tests() {
%1 = call i32 (...) @test_css_comments()
%2 = call i32 (...) @test_css_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_css_tests() {
%1 = tail call i32 (...) @test_css_comments()
%2 = tail call i32 (...) @test_css_comment_entities()
ret void
}
unsigned zone_span_seqbegin(struct zone *zone) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.zone = type opaque
define i32 @zone_span_seqbegin(%struct.zone* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("usage: nasltokens [-dh] file.nasl file.nasl ...\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"usage: nasltokens [-dh] file.nasl file.nasl ...\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [48 x i8] c"usage: nasltokens [-dh] file.nasl file.nasl ...\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
int test_imm_8Duint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x8D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_8Duint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 9240576
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
OP(dd, c5) { op_c5(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_c5()
ret i32 undef
}
unsigned int UINT32ARRAY(const void *x) {
  unsigned char *p = (unsigned char *)x;
  return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
}


x86 assembly (clang, -O0):
<UINT32ARRAY>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @UINT32ARRAY(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fread(void *, int, int, int /*<<< orphan*/ *);
void safe_fread(void *buffer, int size, FILE *stream) {
  fread(buffer, size, 1, stream);
  if (buffer == NULL) {
    fclose(stream);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<safe_fread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rcx
mov    $0x1,%edx
call   1030 <fread@plt>
cmpq   $0x0,-0x8(%rbp)
jne    1176 <safe_fread+0x46>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_fread>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
mov    $0x1,%edx
mov    %r14,%rcx
call   1030 <fread@plt>
test   %rbx,%rbx
je     1154 <safe_fread+0x24>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @safe_fread(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32*, i32** %6
%10 = call i32 @fread(i8* %7, i32 %8, i32 1, i32* %9)
%11 = load i8*, i8** %4
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %17
13: ; preds = %3
%14 = load i32*, i32** %6
%15 = call i32 @fclose(i32* %14)
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @safe_fread(i8* %0, i32 %1, i32* nocapture %2) {
%4 = tail call i32 @fread(i8* %0, i32 %1, i32 1, i32* %2)
%5 = icmp eq i8* %0, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @fclose(i32* %2)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret void
}
/* Variables and functions */
char const *Atom_new(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
const char *Atom_string(const char *str) { return Atom_new(str, strlen(str)); }


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

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

LLVM IR (-O0):
define i8* @Atom_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i8* @Atom_new(i8* %3, i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @Atom_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @Atom_new(i8* %0, i32 %2)
ret i8* %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long selection;
};
typedef TYPE_1__ XSelectionClearEvent;

/* Variables and functions */
void set_XSelectionClearEvent_selection(void *_p, unsigned long _v) {
  ((XSelectionClearEvent *)_p)->selection = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XSelectionClearEvent_selection(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ presentar(float);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, float *);
void main() {
  float f;
  printf("Introduce valor real: ");
  scanf("%f", &f);
  presentar(f);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0x4(%rbp),%xmm0
call   1040 <presentar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
call   1040 <presentar@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Introduce valor real: \00"
@.str.1 = [3 x i8] c"%f\00"
define void @main() {
%1 = alloca float
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = call i32 @presentar(float %4)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Introduce valor real: \00"
@.str.1 = [3 x i8] c"%f\00"
define void @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = call i32 @presentar(float %5)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t F(uint32_t B, uint32_t C, uint32_t D) { return (B & C) | (~B & D); }


x86 assembly (clang, -O0):
<F>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<F>:
mov    %esi,%eax
xor    %edx,%eax
and    %edi,%eax
xor    %edx,%eax
ret

LLVM IR (-O0):
define i32 @F(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 = load i32, i32* %5
%9 = and i32 %7, %8
%10 = load i32, i32* %4
%11 = xor i32 %10, -1
%12 = load i32, i32* %6
%13 = and i32 %11, %12
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @F(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, %0
%5 = xor i32 %0, -1
%6 = and i32 %5, %2
%7 = or i32 %6, %4
ret i32 %7
}
void dummy_sysquotas_xfs(void) {}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @RTPathHaveExt() {
ret void
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 "
         "REPO_URL=r3p1-01rel0 REVISION=r3p1-01rel0 "
         "CHANGED_REVISION=r3p1-01rel0 CHANGE_DATE=r3p1-01rel0 BUILD_DATE=Mon "
         "Oct 15 16:23:54 KST 2012 BUILD=DEBUG CPU=ux500 USING_UMP=1 "
         "USING_HWMEM=1 USING_MALI200=0 USING_MALI400=3 "
         "USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= "
         "MALI_PLATFORM_FILE=platform/ux500/mali_platform.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=32 USING_PROFILING=0 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y";
}


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

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

LLVM IR (-O0):
@.str = [471 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL=r3p1-01rel0 REVISION=r3p1-01rel0 CHANGED_REVISION=r3p1-01rel0 CHANGE_DATE=r3p1-01rel0 BUILD_DATE=Mon Oct 15 16:23:54 KST 2012 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=32 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([471 x i8], [471 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [471 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL=r3p1-01rel0 REVISION=r3p1-01rel0 CHANGED_REVISION=r3p1-01rel0 CHANGE_DATE=r3p1-01rel0 BUILD_DATE=Mon Oct 15 16:23:54 KST 2012 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=32 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([471 x i8], [471 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
char *gettext(char *);
int /*<<< orphan*/ stderr;
void wrerr() {
  (void)fprintf(stderr, gettext("col: write error.\n"));
  exit(1);
}


x86 assembly (clang, -O0):
<wrerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
lea    0xeb5(%rip),%rdi
call   1030 <gettext@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<wrerr>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
lea    0xebf(%rip),%rdi
call   1030 <gettext@plt>
mov    %ebx,%edi
mov    %rax,%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"col: write error.\0A\00"
define void @wrerr() {
%1 = load i32, i32* @stderr
%2 = call i8* @gettext(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @fprintf(i32 %1, i8* %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"col: write error.\0A\00"
define void @wrerr() {
%1 = load i32, i32* @stderr
%2 = tail call i8* @gettext(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @fprintf(i32 %1, i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int invqxl(int il, int detl, int *code_table, int mode) {
  long int dlt;
  dlt = (long)detl * code_table[il >> (mode - 1)];
  return ((int)(dlt >> 15));
}


x86 assembly (clang, -O0):
<invqxl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
movslq -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
sar    %cl,%edx
mov    -0x28(%rbp),%rcx
movslq %edx,%rdx
movslq (%rcx,%rdx,4),%rcx
imul   %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
sar    $0xf,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invqxl>:
movslq %esi,%rsi
add    $0xff,%cl
sar    %cl,%edi
movslq %edi,%rax
movslq (%rdx,%rax,4),%rax
imul   %rsi,%rax
shr    $0xf,%rax
ret

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

LLVM IR (-O2):
define i32 @invqxl(i32 %0, i32 %1, i32* nocapture %2, i32 %3) {
%5 = sext i32 %1 to i64
%6 = add nsw i32 %3, -1
%7 = ashr i32 %0, %6
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %2, i64 %8
%10 = load i32, i32* %9
%11 = sext i32 %10 to i64
%12 = mul nsw i64 %11, %5
%13 = lshr i64 %12, 15
%14 = trunc i64 %13 to i32
ret i32 %14
}
/* Variables and functions */
char *prefixParser(char *, char *, char *, char *);
char *unigeneParser(char *header) {
  return prefixParser(header, " ", "/ug=", "unigeneParser");
}


x86 assembly (clang, -O0):
<unigeneParser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    0xed4(%rip),%rdx
lea    0xed2(%rip),%rcx
call   1030 <prefixParser@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unigeneParser>:
lea    0xee9(%rip),%rsi
lea    0xee4(%rip),%rdx
lea    0xee2(%rip),%rcx
jmp    1030 <prefixParser@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [5 x i8] c"/ug=\00"
@.str.2 = [14 x i8] c"unigeneParser\00"
define i8* @unigeneParser(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @prefixParser(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [5 x i8] c"/ug=\00"
@.str.2 = [14 x i8] c"unigeneParser\00"
define i8* @unigeneParser(i8* %0) {
%2 = tail call i8* @prefixParser(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void foo(void) { printf("TEST2\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"TEST2\00"
define void @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned char getc(void) {
  while (((*((volatile unsigned long *)0x7F005018)) & (1 << 6)) == 0 &&
         ((*((volatile unsigned long *)0x7F005018)) & 0x3f) == 0)
    ;
  return (*((volatile unsigned char *)0x7F005024));
}


x86 assembly (clang, -O0):
<getc>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <getc+0x9>
mov    $0x7f005018,%eax
mov    (%rax),%rcx
and    $0x40,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    113a <getc+0x3a>
mov    $0x7f005018,%eax
mov    (%rax),%rax
and    $0x3f,%rax
cmp    $0x0,%rax
sete   %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
test   $0x1,%al
jne    114a <getc+0x4a>
jmp    114f <getc+0x4f>
jmp    1109 <getc+0x9>
mov    $0x7f005024,%eax
mov    (%rax),%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getc>:
testq  $0x40,0x7f005018
jne    111c <getc+0x1c>
testq  $0x3f,0x7f005018
je     1100 <getc>
mov    0x7f005024,%al
ret

LLVM IR (-O0):
define zeroext i8 @getc() {
br label %1
1: ; preds = %11, %0
%2 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
%3 = and i64 %2, 64
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
%7 = and i64 %6, 63
%8 = icmp eq i64 %7, 0
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ false, %1 ], [ %8, %5 ]
br i1 %10, label %11, label %12
11: ; preds = %9
br label %1
12: ; preds = %9
%13 = load volatile i8, i8* inttoptr (i64 2130726948 to i8*)
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @getc() {
br label %1
1: ; preds = %5, %0
%2 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
%3 = and i64 %2, 64
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
%7 = and i64 %6, 63
%8 = icmp eq i64 %7, 0
br i1 %8, label %1, label %9
9: ; preds = %1, %5
%10 = load volatile i8, i8* inttoptr (i64 2130726948 to i8*)
ret i8 %10
}
void foo() {
  int i;
  int a[100];
  for (i = 0; i <= 98; i += 1) {
    a[i + 1] = a[i] + 1;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x62,-0x4(%rbp)
jg     1147 <foo+0x47>
movslq -0x4(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <foo+0x12>
add    $0x120,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
%2 = alloca [100 x i32]
store i32 0, i32* %1
br label %3
3: ; preds = %16, %0
%4 = load i32, i32* %1
%5 = icmp sle i32 %4, 98
br i1 %5, label %6, label %19
6: ; preds = %3
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %8
%10 = load i32, i32* %9
%11 = add nsw i32 %10, 1
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %14
store i32 %11, i32* %15
br label %16
16: ; preds = %6
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 1
store i32 %18, i32* %1
br label %3
19: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
bool s2010_get_continued(const uint16_t *p_s2010) { return p_s2010[0] & 0x04; }


x86 assembly (clang, -O0):
<s2010_get_continued>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2010_get_continued>:
mov    (%rdi),%eax
and    $0x4,%eax
ret

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

LLVM IR (-O2):
define i32 @s2010_get_continued(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 4
ret i32 %3
}
void sm_cleanup() {}


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

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

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

LLVM IR (-O2):
define void @sm_cleanup() {
ret void
}
char *bdd_version(void) { return ("1.0"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"1.0\00"
define i8* @bdd_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"1.0\00"
define i8* @bdd_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ display_imm(char *);
void display_clear(void) {
  display_imm("\033[2J");
  display_imm("\033["
              "500"
              "B");
}


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

x86 assembly (clang, -O2):
<display_clear>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <display_imm@plt>
lea    0xee1(%rip),%rdi
pop    %rax
jmp    1030 <display_imm@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [7 x i8] c"\1B[500B\00"
define void @display_clear() {
%1 = call i32 @display_imm(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @display_imm(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [7 x i8] c"\1B[500B\00"
define void @display_clear() {
%1 = tail call i32 @display_imm(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @display_imm(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void close_pipes(int pipefd[], int num_pipes) {
  int i = 0;
  for (; i < num_pipes * 2; i++)
    close(pipefd[i]);
}


x86 assembly (clang, -O0):
<close_pipes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    1155 <close_pipes+0x45>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <close@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <close_pipes+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_pipes>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1142 <close_pipes+0x32>
mov    %rdi,%r14
add    %esi,%esi
cmp    $0x2,%esi
mov    $0x1,%r15d
cmovge %esi,%r15d
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r14,%rbx,4),%edi
call   1030 <close@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <close_pipes+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @close_pipes(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = mul nsw i32 %8, 2
%10 = icmp slt i32 %7, %9
br i1 %10, label %11, label %21
11: ; preds = %6
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = call i32 @close(i32 %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @close_pipes(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = shl nuw i32 %1, 1
%6 = call i32 @llvm.smax.i32(i32 %5, i32 1)
%7 = zext i32 %6 to i64
br label %8
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 @close(i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %15, label %8
15: ; preds = %8, %2
ret void
}
/* Type definitions */
typedef scalar_t__ pthread_key_t;

/* Variables and functions */
scalar_t__ pthread_key_create(scalar_t__ *, int /*<<< orphan*/ *);
long OsCreateThreadDataKey() {
  pthread_key_t tdk;
  return (pthread_key_create(&tdk, NULL) ? -1 : (long)tdk);
}


x86 assembly (clang, -O0):
<OsCreateThreadDataKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <pthread_key_create@plt>
cmp    $0x0,%rax
je     113f <OsCreateThreadDataKey+0x2f>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1147 <OsCreateThreadDataKey+0x37>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OsCreateThreadDataKey>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <pthread_key_create@plt>
neg    %rax
sbb    %rax,%rax
or     (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @OsCreateThreadDataKey() {
%1 = alloca i64
%2 = call i64 @pthread_key_create(i64* %1, i32* null)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
br label %7
5: ; preds = %0
%6 = load i64, i64* %1
br label %7
7: ; preds = %5, %4
%8 = phi i64 [ -1, %4 ], [ %6, %5 ]
ret i64 %8
}

LLVM IR (-O2):
define i64 @OsCreateThreadDataKey() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i64 @pthread_key_create(i64* %1, i32* null)
%4 = icmp eq i64 %3, 0
%5 = load i64, i64* %1
%6 = select i1 %4, i64 %5, i64 -1
ret i64 %6
}
void undef(void) { int undefvar __attribute__((annotate("undefvar_ann_0"))); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"undefvar_ann_0\00", section "llvm.metadata"
@.str.1 = [62 x i8] c"/home/jiang/dataset/exebench/tmp/tmphiul3eur/formatted_code.c\00", section "llvm.metadata"
define void @undef() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"undefvar_ann_0\00", section "llvm.metadata"
@.str.1 = [62 x i8] c"/home/jiang/dataset/exebench/tmp/tmphiul3eur/formatted_code.c\00", section "llvm.metadata"
define void @undef() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
ret void
}
int main() {
  int arg1 = 0;
  int arg2 = 0;
  int calc = 0;
  __asm__("movl $2, %%eax;"
          "movl $10, %%ebx;"
          "addl %%eax, %%ebx;"
          : "=b"(calc)
          : "a"(arg1), "b"(arg2));
  return calc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ebx
mov    $0x2,%eax
mov    $0xa,%ebx
add    %eax,%ebx
mov    %ebx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
xor    %ebx,%ebx
mov    $0x2,%eax
mov    $0xa,%ebx
add    %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 asm "movl $$2, %eax;movl $$10, %ebx;addl %eax, %ebx;", "={bx},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm "movl $$2, %eax;movl $$10, %ebx;addl %eax, %ebx;", "={bx},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 0, i32 0)
ret i32 %1
}
char GenerateBug(unsigned char iKey) {
  if (iKey == 'T') {
    return 1;
  } else if (iKey != 't') {
    return 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<GenerateBug>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x54,%eax
jne    1120 <GenerateBug+0x20>
movb   $0x1,-0x1(%rbp)
jmp    113f <GenerateBug+0x3f>
movzbl -0x2(%rbp),%eax
cmp    $0x74,%eax
je     1136 <GenerateBug+0x36>
movb   $0x2,-0x1(%rbp)
jmp    113f <GenerateBug+0x3f>
jmp    113b <GenerateBug+0x3b>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenerateBug>:
cmp    $0x74,%dil
setne  %al
add    %al,%al
cmp    $0x54,%dil
movzbl %al,%ecx
mov    $0x1,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @GenerateBug(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp eq i32 %5, 84
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 1, i8* %2
br label %15
8: ; preds = %1
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = icmp ne i32 %10, 116
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 2, i8* %2
br label %15
13: ; preds = %8
br label %14
14: ; preds = %13
store i8 0, i8* %2
br label %15
15: ; preds = %14, %12, %7
%16 = load i8, i8* %2
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @GenerateBug(i8 zeroext %0) {
%2 = icmp eq i8 %0, 116
%3 = select i1 %2, i8 0, i8 2
%4 = icmp eq i8 %0, 84
%5 = select i1 %4, i8 1, i8 %3
ret i8 %5
}
void AKSC_VNorm(void) {}


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

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

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

LLVM IR (-O2):
define void @AKSC_VNorm() {
ret void
}
int foo1(int x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @foo1(i32 returned %0) {
ret i32 %0
}
__attribute__((always_)) int get_mp_bus_to_node(int busnum) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_mp_bus_to_node(i32 %0) {
ret i32 0
}
/* Type definitions */
struct PhoneNumber {
  int dummy;
};

/* Variables and functions */
int PhoneNumber_write_delimited_to(struct PhoneNumber *, void *, int);
int write_raw_varint32(int, void *, int);
int PhoneNumber_write_with_tag(struct PhoneNumber *_PhoneNumber, void *_buffer,
                               int offset, int tag) {
  offset = write_raw_varint32((tag << 3) + 2, _buffer, offset);
  offset = PhoneNumber_write_delimited_to(_PhoneNumber, _buffer, offset);
  return offset;
}


x86 assembly (clang, -O0):
<PhoneNumber_write_with_tag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%edi
shl    $0x3,%edi
add    $0x2,%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write_raw_varint32@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <PhoneNumber_write_delimited_to@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PhoneNumber_write_with_tag>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0x2(,%rcx,8),%edi
call   1030 <write_raw_varint32@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <PhoneNumber_write_delimited_to@plt>

LLVM IR (-O0):
%struct.PhoneNumber = type { i32 }
define i32 @PhoneNumber_write_with_tag(%struct.PhoneNumber* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca %struct.PhoneNumber*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store %struct.PhoneNumber* %0, %struct.PhoneNumber** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = shl i32 %9, 3
%11 = add nsw i32 %10, 2
%12 = load i8*, i8** %6
%13 = load i32, i32* %7
%14 = call i32 @write_raw_varint32(i32 %11, i8* %12, i32 %13)
store i32 %14, i32* %7
%15 = load %struct.PhoneNumber*, %struct.PhoneNumber** %5
%16 = load i8*, i8** %6
%17 = load i32, i32* %7
%18 = call i32 @PhoneNumber_write_delimited_to(%struct.PhoneNumber* %15, i8* %16, i32 %17)
store i32 %18, i32* %7
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
%struct.PhoneNumber = type { i32 }
define i32 @PhoneNumber_write_with_tag(%struct.PhoneNumber* %0, i8* %1, i32 %2, i32 %3) {
%5 = shl i32 %3, 3
%6 = or i32 %5, 2
%7 = tail call i32 @write_raw_varint32(i32 %6, i8* %1, i32 %2)
%8 = tail call i32 @PhoneNumber_write_delimited_to(%struct.PhoneNumber* %0, i8* %1, i32 %7)
ret i32 %8
}
/* Variables and functions */
int strcmp(char const *, char const *);
int comparator(const void *a, const void *b) {
  return strcmp(*((const char **)a), *((const char **)b));
}


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

x86 assembly (clang, -O2):
<comparator>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @comparator(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @comparator(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ EOF;
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
void main() { putchar(EOF); }


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

x86 assembly (clang, -O2):
<main>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@EOF = global i32 0
define void @main() {
%1 = load i32, i32* @EOF
%2 = call i32 @putchar(i32 %1)
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @putchar(i32 %1)
ret void
}
/* Variables and functions */
char *memcpy(char *, char const *, size_t);
int strlen(char const *);
char *xmalloc(size_t);
char *xstrdup(const char *s) {
  size_t len = strlen(s) + 1;
  char *p = xmalloc(len);
  return memcpy(p, s, len);
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1050 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%rbx
mov    %rbx,%rdi
call   1040 <xmalloc@plt>
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <memcpy@plt>

LLVM IR (-O0):
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = call i8* @xmalloc(i64 %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = load i8*, i8** %2
%13 = load i64, i64* %3
%14 = call i8* @memcpy(i8* %11, i8* %12, i64 %13)
ret i8* %14
}

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @xmalloc(i64 %4)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 1 %0, i64 %4, i1 false)
ret i8* %5
}
void I2STxConfigSet(unsigned long ulBase, unsigned long ulConfig) {
  ;

  ;
  if ((ulConfig & 0x03000000) == 0x03000000) {
    ulConfig &= ~0x02000000;
    (*((volatile unsigned long *)(ulBase + 0x00000004))) = 0x00000002;
  } else {
    (*((volatile unsigned long *)(ulBase + 0x00000004))) = 0;
  }
  (*((volatile unsigned long *)(ulBase + 0x00000008))) = ulConfig;
}


x86 assembly (clang, -O0):
<I2STxConfigSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x3000000,%rax
cmp    $0x3000000,%rax
jne    1141 <I2STxConfigSet+0x41>
mov    -0x10(%rbp),%rax
and    $0xfffffffffdffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x2,0x4(%rax)
jmp    114d <I2STxConfigSet+0x4d>
mov    -0x8(%rbp),%rax
movq   $0x0,0x4(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2STxConfigSet>:
mov    %esi,%eax
not    %eax
mov    %rsi,%rcx
and    $0xfffffffffdffffff,%rcx
xor    %edx,%edx
test   $0x3000000,%eax
cmovne %rsi,%rcx
sete   %dl
add    %rdx,%rdx
mov    %rdx,0x4(%rdi)
mov    %rcx,0x8(%rdi)
ret

LLVM IR (-O0):
define void @I2STxConfigSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 50331648
%7 = icmp eq i64 %6, 50331648
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i64, i64* %4
%10 = and i64 %9, -33554433
store i64 %10, i64* %4
%11 = load i64, i64* %3
%12 = add i64 %11, 4
%13 = inttoptr i64 %12 to i64*
store volatile i64 2, i64* %13
br label %18
14: ; preds = %2
%15 = load i64, i64* %3
%16 = add i64 %15, 4
%17 = inttoptr i64 %16 to i64*
store volatile i64 0, i64* %17
br label %18
18: ; preds = %14, %8
%19 = load i64, i64* %4
%20 = load i64, i64* %3
%21 = add i64 %20, 8
%22 = inttoptr i64 %21 to i64*
store volatile i64 %19, i64* %22
ret void
}

LLVM IR (-O2):
define void @I2STxConfigSet(i64 %0, i64 %1) {
%3 = and i64 %1, 50331648
%4 = icmp eq i64 %3, 50331648
%5 = and i64 %1, -33554433
%6 = select i1 %4, i64 2, i64 0
%7 = select i1 %4, i64 %5, i64 %1
%8 = add i64 %0, 4
%9 = inttoptr i64 %8 to i64*
store volatile i64 %6, i64* %9
%10 = add i64 %0, 8
%11 = inttoptr i64 %10 to i64*
store volatile i64 %7, i64* %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendInterrupt(int, int, int, int);
void ScuSendExternalInterrupt08(void) {
  SendInterrupt(0x58, 0x1, 0x8000, 0x01000000);
}


x86 assembly (clang, -O0):
<ScuSendExternalInterrupt08>:
push   %rbp
mov    %rsp,%rbp
mov    $0x58,%edi
mov    $0x1,%esi
mov    $0x8000,%edx
mov    $0x1000000,%ecx
call   1030 <SendInterrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScuSendExternalInterrupt08>:
mov    $0x58,%edi
mov    $0x1,%esi
mov    $0x8000,%edx
mov    $0x1000000,%ecx
jmp    1030 <SendInterrupt@plt>

LLVM IR (-O0):
define void @ScuSendExternalInterrupt08() {
%1 = call i32 @SendInterrupt(i32 88, i32 1, i32 32768, i32 16777216)
ret void
}

LLVM IR (-O2):
define void @ScuSendExternalInterrupt08() {
%1 = tail call i32 @SendInterrupt(i32 88, i32 1, i32 32768, i32 16777216)
ret void
}
void XtSetLanguageProc() {}


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

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

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

LLVM IR (-O2):
define void @XtSetLanguageProc() {
ret void
}
int PyDTrace_AUDIT_ENABLED(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @PyDTrace_AUDIT_ENABLED() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("sponge [-a] <file>: soak up all input from stdin and write it "
         "to <file>\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [73 x i8] c"sponge [-a] <file>: soak up all input from stdin and write it to <file>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [72 x i8] c"sponge [-a] <file>: soak up all input from stdin and write it to <file>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}