xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_entity(int /*<<< orphan*/, char *,
                                             char *);
void test_awk_comment_entities() {
  test_parser_verify_entity(test_parser_sourcefile("awk", " #comment"),
                            "comment", "#comment");
}


x86 assembly (clang, -O0):
<test_awk_comment_entities>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec6(%rip),%rsi
lea    0xebe(%rip),%rdx
call   1040 <test_parser_verify_entity@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_awk_comment_entities>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
lea    0xecb(%rip),%rsi
lea    0xec3(%rip),%rdx
mov    %eax,%edi
pop    %rax
jmp    1040 <test_parser_verify_entity@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"awk\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [9 x i8] c"#comment\00"
define void @test_awk_comment_entities() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"awk\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [9 x i8] c"#comment\00"
define void @test_awk_comment_entities() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core5_swap(char *, int);
void U_EMRSETTEXTCOLOR_swap(char *record, int torev) {
  core5_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_EMRSETTEXTCOLOR_swap>:
jmp    1030 <core5_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRSETTEXTCOLOR_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core5_swap(i8* %0, i32 %1)
ret void
}
void swap(int a[], int i, int j) {
  int temp = a[i];
  a[i] = a[j];
  a[j] = temp;
}


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

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

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gc_free(void *);
void free(void *ptr) { gc_free(ptr); }


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

x86 assembly (clang, -O2):
<free>:
jmp    1030 <gc_free@plt>

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

LLVM IR (-O2):
define void @free(i8* %0) {
%2 = tail call i32 @gc_free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
FILE *open_file_or_die(char *file_name, char *mode) {
  FILE *fp = fopen(file_name, mode);
  if (fp == 0) {
    fprintf(stderr, "Couldn't open file \"%s\" for mode \"%s\".\n", file_name,
            mode);
    exit(1);
  }
  return fp;
}


x86 assembly (clang, -O0):
<open_file_or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1183 <open_file_or_die+0x53>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe8c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_file_or_die>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <fopen@plt>
test   %rax,%rax
je     114c <open_file_or_die+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"Couldn't open file \22%s\22 for mode \22%s\22.\0A\00"
define i32* @open_file_or_die(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %3
%14 = load i8*, i8** %4
%15 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14)
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %2
%18 = load i32*, i32** %5
ret i32* %18
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"Couldn't open file \22%s\22 for mode \22%s\22.\0A\00"
define noalias i32* @open_file_or_die(i8* %0, i8* %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i32* %3
}
int clamp(int n) {
  n = n > 255 ? 255 : n;
  return n < 0 ? 0 : n;
}


x86 assembly (clang, -O0):
<clamp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jle    1121 <clamp+0x21>
mov    $0xff,%eax
mov    %eax,-0x8(%rbp)
jmp    1127 <clamp+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1141 <clamp+0x41>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <clamp+0x47>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp>:
cmp    $0xff,%edi
mov    $0xff,%ecx
cmovl  %edi,%ecx
xor    %eax,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @clamp(i32 %0) {
%2 = icmp slt i32 %0, 255
%3 = select i1 %2, i32 %0, i32 255
%4 = icmp sgt i32 %3, 0
%5 = select i1 %4, i32 %3, i32 0
ret i32 %5
}
unsigned long query_drivemap(void) { return 1L; }


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

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

LLVM IR (-O0):
define i64 @query_drivemap() {
ret i64 1
}

LLVM IR (-O2):
define i64 @query_drivemap() {
ret i64 1
}
/* Variables and functions */
int /*<<< orphan*/ ADC_(int);
int /*<<< orphan*/ c64_memIndirectZeroY();
void ADC_izy(void) {
  c64_memIndirectZeroY();
  ADC_(1);
}


x86 assembly (clang, -O0):
<ADC_izy>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <c64_memIndirectZeroY@plt>
mov    $0x1,%edi
call   1030 <ADC_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADC_izy>:
push   %rax
xor    %eax,%eax
call   1040 <c64_memIndirectZeroY@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <ADC_@plt>

LLVM IR (-O0):
define void @ADC_izy() {
%1 = call i32 (...) @c64_memIndirectZeroY()
%2 = call i32 @ADC_(i32 1)
ret void
}

LLVM IR (-O2):
define void @ADC_izy() {
%1 = tail call i32 (...) @c64_memIndirectZeroY()
%2 = tail call i32 @ADC_(i32 1)
ret void
}
void ff_hevc_put_hevc_bi_w_qpel_h12_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_h12_8_sse4() {
ret void
}
/* Variables and functions */
int TIOCM_RTS;
int get_mlines(int);
int put_mlines(int, int);
int clr_rts(int fd) {
  int i;
  i = get_mlines(fd);
  i &= ~(TIOCM_RTS);
  i = put_mlines(fd, i);
  return (i);
}


x86 assembly (clang, -O0):
<clr_rts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <get_mlines@plt>
mov    %eax,-0x8(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <put_mlines@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clr_rts>:
push   %rbx
mov    %edi,%ebx
call   1030 <get_mlines@plt>
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%esi
not    %esi
and    %eax,%esi
mov    %ebx,%edi
pop    %rbx
jmp    1040 <put_mlines@plt>

LLVM IR (-O0):
@TIOCM_RTS = global i32 0
define i32 @clr_rts(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @get_mlines(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* @TIOCM_RTS
%7 = xor i32 %6, -1
%8 = load i32, i32* %3
%9 = and i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @put_mlines(i32 %10, i32 %11)
store i32 %12, i32* %3
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@TIOCM_RTS = global i32 0
define i32 @clr_rts(i32 %0) {
%2 = tail call i32 @get_mlines(i32 %0)
%3 = load i32, i32* @TIOCM_RTS
%4 = xor i32 %3, -1
%5 = and i32 %2, %4
%6 = tail call i32 @put_mlines(i32 %0, i32 %5)
ret i32 %6
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double scalbnl(long double x, int n) {
  return __infer_nondet_long_double();
}


x86 assembly (clang, -O0):
<scalbnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %edi,-0x14(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @scalbnl(x86_fp80 %0, i32 %1) {
%3 = alloca x86_fp80
%4 = alloca i32
store x86_fp80 %0, x86_fp80* %3
store i32 %1, i32* %4
%5 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @scalbnl(x86_fp80 %0, i32 %1) {
%3 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}
/* Variables and functions */
long expmod_helper(long, long, long, int);
long expmod(long x, long n, long m) { return expmod_helper(x, n, m, 1); }


x86 assembly (clang, -O0):
<expmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <expmod_helper@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expmod>:
mov    $0x1,%ecx
jmp    1030 <expmod_helper@plt>

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

LLVM IR (-O2):
define i64 @expmod(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 @expmod_helper(i64 %0, i64 %1, i64 %2, i32 1)
ret i64 %4
}
/* Variables and functions */
char *nvram_bufget(char const *);
char *_nvram_get(const char *name) { return nvram_bufget(name); }


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

x86 assembly (clang, -O2):
<_nvram_get>:
jmp    1030 <nvram_bufget@plt>

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

LLVM IR (-O2):
define i8* @_nvram_get(i8* %0) {
%2 = tail call i8* @nvram_bufget(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_version() {
  printf("rmdir %s\n", "0.01");
  printf("Written by Constantinos Georgiades\n");
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee8(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedb(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"rmdir %s\0A\00"
@.str.1 = [5 x i8] c"0.01\00"
@.str.2 = [36 x i8] c"Written by Constantinos Georgiades\0A\00"
define void @print_version() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"rmdir %s\0A\00"
@.str.1 = [5 x i8] c"0.01\00"
@str = [35 x i8] c"Written by Constantinos Georgiades\00"
define void @print_version() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret void
}
int hex_char(const int ch) {
  if (ch >= '0' && ch <= '9')
    return ch - '0';
  if (ch >= 'a' && ch <= 'f')
    return ch - 'a' + 10;
  return ch - 'A' + 10;
}


x86 assembly (clang, -O0):
<hex_char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1129 <hex_char+0x29>
cmpl   $0x39,-0x8(%rbp)
jg     1129 <hex_char+0x29>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    115a <hex_char+0x5a>
cmpl   $0x61,-0x8(%rbp)
jl     114e <hex_char+0x4e>
cmpl   $0x66,-0x8(%rbp)
jg     114e <hex_char+0x4e>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    115a <hex_char+0x5a>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_char>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     111a <hex_char+0x1a>
lea    -0x61(%rdi),%eax
cmp    $0x5,%eax
ja     1115 <hex_char+0x15>
add    $0xffffffa9,%edi
jmp    1118 <hex_char+0x18>
add    $0xffffffc9,%edi
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @hex_char(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 48
store i32 %11, i32* %2
br label %26
12: ; preds = %6, %1
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %22
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 102
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i32, i32* %3
%20 = sub nsw i32 %19, 97
%21 = add nsw i32 %20, 10
store i32 %21, i32* %2
br label %26
22: ; preds = %15, %12
%23 = load i32, i32* %3
%24 = sub nsw i32 %23, 65
%25 = add nsw i32 %24, 10
store i32 %25, i32* %2
br label %26
26: ; preds = %22, %18, %9
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @hex_char(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = add i32 %0, -97
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nsw i32 %0, -87
br label %11
9: ; preds = %4
%10 = add nsw i32 %0, -55
br label %11
11: ; preds = %1, %9, %7
%12 = phi i32 [ %8, %7 ], [ %10, %9 ], [ %2, %1 ]
ret i32 %12
}
/* Type definitions */
struct oscap_string {
  int dummy;
};
struct oscap_buffer {
  int dummy;
};

/* Variables and functions */
char *oscap_buffer_bequeath(struct oscap_buffer *);
char *oscap_string_bequeath(struct oscap_string *s) {
  return oscap_buffer_bequeath((struct oscap_buffer *)s);
}


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

x86 assembly (clang, -O2):
<oscap_string_bequeath>:
jmp    1030 <oscap_buffer_bequeath@plt>

LLVM IR (-O0):
%struct.oscap_string = type { i32 }
%struct.oscap_buffer = type { i32 }
define i8* @oscap_string_bequeath(%struct.oscap_string* %0) {
%2 = alloca %struct.oscap_string*
store %struct.oscap_string* %0, %struct.oscap_string** %2
%3 = load %struct.oscap_string*, %struct.oscap_string** %2
%4 = bitcast %struct.oscap_string* %3 to %struct.oscap_buffer*
%5 = call i8* @oscap_buffer_bequeath(%struct.oscap_buffer* %4)
ret i8* %5
}

LLVM IR (-O2):
%struct.oscap_string = type { i32 }
%struct.oscap_buffer = type { i32 }
define i8* @oscap_string_bequeath(%struct.oscap_string* %0) {
%2 = bitcast %struct.oscap_string* %0 to %struct.oscap_buffer*
%3 = tail call i8* @oscap_buffer_bequeath(%struct.oscap_buffer* %2)
ret i8* %3
}
/* Variables and functions */
int system(char *);
int do_test(void) { return system(":"); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c":\00"
define i32 @do_test() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int addOne(int x, int y) { return x + 1; }


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

x86 assembly (clang, -O2):
<addOne>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @addOne(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 1
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void WatchdogIntTypeSet(uint32_t ui32Base, uint32_t ui32Type) {
  ;

  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000008))) =
      ((*((volatile uint32_t *)(ui32Base + 0x00000008))) & ~0x00000004) |
      ui32Type;
}


x86 assembly (clang, -O0):
<WatchdogIntTypeSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x8,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffffb,%ecx
or     -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x8,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogIntTypeSet>:
movslq %edi,%rax
mov    0x8(%rax),%ecx
and    $0xfffffffb,%ecx
or     %esi,%ecx
mov    %ecx,0x8(%rax)
ret

LLVM IR (-O0):
define void @WatchdogIntTypeSet(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 = add nsw i32 %5, 8
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -5
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 8
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
store volatile i32 %12, i32* %16
ret void
}

LLVM IR (-O2):
define void @WatchdogIntTypeSet(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 8
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -5
%8 = or i32 %7, %1
store volatile i32 %8, i32* %5
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int compare_uint32_ptr(void *a, void *b) {
  uint32_t *sa = (uint32_t *)a;
  uint32_t *sb = (uint32_t *)b;
  if (*sa > *sb) {
    return 1;
  }
  if (*sa < *sb) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<compare_uint32_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jle    113c <compare_uint32_ptr+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1163 <compare_uint32_ptr+0x63>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jge    115c <compare_uint32_ptr+0x5c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <compare_uint32_ptr+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_uint32_ptr>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rcx,%rax
setl   %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_uint32_ptr(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
%8 = icmp slt i64 %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
void X509_ATTRIBUTE_dup(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_ATTRIBUTE_dup() {
ret void
}
char rotate(char dir) { return (dir + 2) % 12; }


x86 assembly (clang, -O0):
<rotate>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x2,%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
mov    %dl,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate>:
lea    0x2(%rdi),%eax
imul   $0x2aab,%eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
shr    $0x11,%ecx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @rotate(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, 2
%6 = srem i32 %5, 12
%7 = trunc i32 %6 to i8
ret i8 %7
}

LLVM IR (-O2):
define signext i8 @rotate(i8 signext %0) {
%2 = sext i8 %0 to i16
%3 = add nsw i16 %2, 2
%4 = srem i16 %3, 12
%5 = trunc i16 %4 to i8
ret i8 %5
}
/* Type definitions */
struct BinTree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int help(struct BinTree *dict, char *in) {
  printf("Short help. Just input a word or one of those commands:\n"
         "  /help - show this text\n"
         "  /about - some words about this program\n"
         "  /add - add a word\n"
         "  /edit - edit a word\n"
         "  /remove - remove a word\n"
         "  /quit - exit this program\n"
         "  /store - save data to disk\n"
         "  /load - load data from disk\n"
         "  /tree - print a binary tree (for debugging only)\n\n");
  return 1;
}


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

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.BinTree = type { i32 }
@.str = [330 x i8] c"Short help. Just input a word or one of those commands:\0A /help - show this text\0A /about - some words about this program\0A /add - add a word\0A /edit - edit a word\0A /remove - remove a word\0A /quit - exit this program\0A /store - save data to disk\0A /load - load data from disk\0A /tree - print a binary tree (for debugging only)\0A\0A\00"
define i32 @help(%struct.BinTree* %0, i8* %1) {
%3 = alloca %struct.BinTree*
%4 = alloca i8*
store %struct.BinTree* %0, %struct.BinTree** %3
store i8* %1, i8** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([330 x i8], [330 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
%struct.BinTree = type { i32 }
@str = [329 x i8] c"Short help. Just input a word or one of those commands:\0A /help - show this text\0A /about - some words about this program\0A /add - add a word\0A /edit - edit a word\0A /remove - remove a word\0A /quit - exit this program\0A /store - save data to disk\0A /load - load data from disk\0A /tree - print a binary tree (for debugging only)\0A\00"
define i32 @help(%struct.BinTree* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([329 x i8], [329 x i8]* @str, i64 0, i64 0))
ret i32 1
}
void stat64() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gdk_window_class_get_type() {
ret void
}
/* Type definitions */
struct winsize {
  int ws_col;
};

/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ TIOCGWINSZ;
int /*<<< orphan*/ ioctl(int /*<<< orphan*/, int /*<<< orphan*/,
                         struct winsize *);
int nmstermio_get_cols(void) {
  struct winsize w;
  ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
  return w.ws_col;
}


x86 assembly (clang, -O0):
<nmstermio_get_cols>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nmstermio_get_cols>:
push   %rax
mov    0x2ed8(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <ioctl@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.winsize = type { i32 }
@STDOUT_FILENO = global i32 0
@TIOCGWINSZ = global i32 0
define i32 @nmstermio_get_cols() {
%1 = alloca %struct.winsize
%2 = load i32, i32* @STDOUT_FILENO
%3 = load i32, i32* @TIOCGWINSZ
%4 = call i32 @ioctl(i32 %2, i32 %3, %struct.winsize* %1)
%5 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i32 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.winsize = type { i32 }
@STDOUT_FILENO = global i32 0
@TIOCGWINSZ = global i32 0
define i32 @nmstermio_get_cols() {
%1 = alloca %struct.winsize
%2 = bitcast %struct.winsize* %1 to i8*
%3 = load i32, i32* @STDOUT_FILENO
%4 = load i32, i32* @TIOCGWINSZ
%5 = call i32 @ioctl(i32 %3, i32 %4, %struct.winsize* %1)
%6 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i64 0, i32 0
%7 = load i32, i32* %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ gen_op_ld32_raw(int, int);
void gen_op_ldf32_raw(int dest, int addr) { gen_op_ld32_raw(dest, addr); }


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

x86 assembly (clang, -O2):
<gen_op_ldf32_raw>:
jmp    1030 <gen_op_ld32_raw@plt>

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

LLVM IR (-O2):
define void @gen_op_ldf32_raw(i32 %0, i32 %1) {
%3 = tail call i32 @gen_op_ld32_raw(i32 %0, i32 %1)
ret void
}
void Con_Print(const char *text) {}


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

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

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

LLVM IR (-O2):
define void @Con_Print(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_write() {
  printf("NOT IMPLEMENTED:"
         "pa_write"
         "\n");
}


x86 assembly (clang, -O0):
<pa_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"NOT IMPLEMENTED:pa_write\0A\00"
define i32 @pa_write() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [25 x i8] c"NOT IMPLEMENTED:pa_write\00"
define i32 @pa_write() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
const char *ls_cost_nm5_name_out(int i) {
  switch (i) {
  case 0:
    return "o0";
  case 1:
    return "o1";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<ls_cost_nm5_name_out>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <ls_cost_nm5_name_out+0x2b>
jmp    111a <ls_cost_nm5_name_out+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <ls_cost_nm5_name_out+0x3b>
jmp    114b <ls_cost_nm5_name_out+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <ls_cost_nm5_name_out+0x53>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <ls_cost_nm5_name_out+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_cost_nm5_name_out>:
xor    %ecx,%ecx
cmp    $0x1,%edi
lea    0xef7(%rip),%rax
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee7(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
define i8* @ls_cost_nm5_name_out(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* null, i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
define i8* @ls_cost_nm5_name_out(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
int fun1263() { return 1263; }


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

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

LLVM IR (-O0):
define i32 @fun1263() {
ret i32 1263
}

LLVM IR (-O2):
define i32 @fun1263() {
ret i32 1263
}
int contains_int_const(int *src, int *c) {
  int i;
  int size = sizeof(src) / sizeof(src[0]);
  for (i = 0; i < size; i++)
    if (src[i] == *c)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<contains_int_const>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x2,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    115c <contains_int_const+0x5c>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    1149 <contains_int_const+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1163 <contains_int_const+0x63>
jmp    114e <contains_int_const+0x4e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111a <contains_int_const+0x1a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<contains_int_const>:
mov    (%rsi),%ecx
mov    $0x1,%eax
cmp    %ecx,(%rdi)
je     1113 <contains_int_const+0x13>
xor    %eax,%eax
cmp    %ecx,0x4(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @contains_int_const(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
%5 = icmp eq i32 %4, %3
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = getelementptr inbounds i32, i32* %0, i64 1
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, %3
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %6, %2
%12 = phi i32 [ 1, %2 ], [ %10, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void tab(int t) {
  int i;
  for (i = 0; i < t; i++)
    printf("  ");
}


x86 assembly (clang, -O0):
<tab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <tab+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <tab+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tab>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    113d <tab+0x2d>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <tab+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c" \00"
define void @tab(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
double cosh(double);
double sinh(double);
double tanh(double x) { return sinh(x) / cosh(x); }


x86 assembly (clang, -O0):
<tanh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sinh@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cosh@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tanh>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <sinh@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <cosh@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @tanh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sinh(double %3)
%5 = load double, double* %2
%6 = call double @cosh(double %5)
%7 = fdiv double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @tanh(double %0) {
%2 = tail call double @sinh(double %0)
%3 = tail call double @cosh(double %0)
%4 = fdiv double %2, %3
ret double %4
}
/* Variables and functions */
size_t strlen(char const *);
scalar_t__ strncasecmp(char const *, char const *, size_t);
char *startswith_no_case(const char *s, const char *prefix) {
  size_t l;
  l = strlen(prefix);
  if (strncasecmp(s, prefix, l) == 0)
    return (char *)s + l;
  return NULL;
}


x86 assembly (clang, -O0):
<startswith_no_case>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <strncasecmp@plt>
cmp    $0x0,%rax
jne    1169 <startswith_no_case+0x49>
mov    -0x10(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1171 <startswith_no_case+0x51>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startswith_no_case>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1040 <strncasecmp@plt>
add    %r15,%rbx
xor    %ecx,%ecx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @startswith_no_case(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %5
%8 = call i64 @strlen(i8* %7)
store i64 %8, i64* %6
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = call i64 @strncasecmp(i8* %9, i8* %10, i64 %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = load i64, i64* %6
%17 = getelementptr inbounds i8, i8* %15, i64 %16
store i8* %17, i8** %3
br label %19
18: ; preds = %2
store i8* null, i8** %3
br label %19
19: ; preds = %18, %14
%20 = load i8*, i8** %3
ret i8* %20
}

LLVM IR (-O2):
define i8* @startswith_no_case(i8* %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i64 @strncasecmp(i8* %0, i8* %1, i64 %3)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds i8, i8* %0, i64 %3
%7 = select i1 %5, i8* %6, i8* null
ret i8* %7
}
void gtk_menu_item_set_right_justified() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_item_set_right_justified() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ADXL345_writeTo(int, int, int);
void ADXL345_powerOn(int file) {
  ADXL345_writeTo(file, 0x2d, 0);
  ADXL345_writeTo(file, 0x2d, 16);
  ADXL345_writeTo(file, 0x2d, 8);
}


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

x86 assembly (clang, -O2):
<ADXL345_powerOn>:
push   %rbx
mov    %edi,%ebx
mov    $0x2d,%esi
xor    %edx,%edx
call   1030 <ADXL345_writeTo@plt>
mov    %ebx,%edi
mov    $0x2d,%esi
mov    $0x10,%edx
call   1030 <ADXL345_writeTo@plt>
mov    %ebx,%edi
mov    $0x2d,%esi
mov    $0x8,%edx
pop    %rbx
jmp    1030 <ADXL345_writeTo@plt>

LLVM IR (-O0):
define void @ADXL345_powerOn(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ADXL345_writeTo(i32 %3, i32 45, i32 0)
%5 = load i32, i32* %2
%6 = call i32 @ADXL345_writeTo(i32 %5, i32 45, i32 16)
%7 = load i32, i32* %2
%8 = call i32 @ADXL345_writeTo(i32 %7, i32 45, i32 8)
ret void
}

LLVM IR (-O2):
define void @ADXL345_powerOn(i32 %0) {
%2 = tail call i32 @ADXL345_writeTo(i32 %0, i32 45, i32 0)
%3 = tail call i32 @ADXL345_writeTo(i32 %0, i32 45, i32 16)
%4 = tail call i32 @ADXL345_writeTo(i32 %0, i32 45, i32 8)
ret void
}
const char *SKP_Silk_SDK_get_version() {
  static const char version[] = "1.0.9";
  return version;
}


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

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

LLVM IR (-O0):
@SKP_Silk_SDK_get_version.version = internal constant [6 x i8] c"1.0.9\00"
define i8* @SKP_Silk_SDK_get_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @SKP_Silk_SDK_get_version.version, i64 0, i64 0)
}

LLVM IR (-O2):
@SKP_Silk_SDK_get_version.version = internal constant [6 x i8] c"1.0.9\00"
define i8* @SKP_Silk_SDK_get_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @SKP_Silk_SDK_get_version.version, i64 0, i64 0)
}
void delay_s(volatile unsigned int time) {
  volatile unsigned int i;
  while (time > 0) {
    for (i = 0; i < 5 * 1200000; i++)
      ;
    time--;
  }
}


x86 assembly (clang, -O0):
<delay_s>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    $0x0,%eax
jbe    1149 <delay_s+0x49>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0x5b8d80,%eax
jae    113b <delay_s+0x3b>
jmp    112d <delay_s+0x2d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111a <delay_s+0x1a>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <delay_s+0x7>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_s>:
mov    %edi,-0x4(%rsp)
jmp    1115 <delay_s+0x15>
cs nopw 0x0(%rax,%rax,1)
addl   $0xffffffff,-0x4(%rsp)
cmpl   $0x0,-0x4(%rsp)
je     1142 <delay_s+0x42>
movl   $0x0,-0x8(%rsp)
mov    -0x8(%rsp),%eax
cmp    $0x5b8d7f,%eax
ja     1110 <delay_s+0x10>
nop
addl   $0x1,-0x8(%rsp)
mov    -0x8(%rsp),%eax
cmp    $0x5b8d80,%eax
jb     1130 <delay_s+0x30>
jmp    1110 <delay_s+0x10>
ret

LLVM IR (-O0):
define void @delay_s(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store volatile i32 %0, i32* %2
br label %4
4: ; preds = %15, %1
%5 = load volatile i32, i32* %2
%6 = icmp ugt i32 %5, 0
br i1 %6, label %7, label %18
7: ; preds = %4
store volatile i32 0, i32* %3
br label %8
8: ; preds = %12, %7
%9 = load volatile i32, i32* %3
%10 = icmp ult i32 %9, 6000000
br i1 %10, label %11, label %15
11: ; preds = %8
br label %12
12: ; preds = %11
%13 = load volatile i32, i32* %3
%14 = add i32 %13, 1
store volatile i32 %14, i32* %3
br label %8
15: ; preds = %8
%16 = load volatile i32, i32* %2
%17 = add i32 %16, -1
store volatile i32 %17, i32* %2
br label %4
18: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @delay_s(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store volatile i32 %0, i32* %2
%4 = bitcast i32* %3 to i8*
%5 = load volatile i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %20, label %7
7: ; preds = %1, %15
store volatile i32 0, i32* %3
%8 = load volatile i32, i32* %3
%9 = icmp ult i32 %8, 6000000
br i1 %9, label %10, label %15
10: ; preds = %7, %10
%11 = load volatile i32, i32* %3
%12 = add i32 %11, 1
store volatile i32 %12, i32* %3
%13 = load volatile i32, i32* %3
%14 = icmp ult i32 %13, 6000000
br i1 %14, label %10, label %15
15: ; preds = %10, %7
%16 = load volatile i32, i32* %2
%17 = add i32 %16, -1
store volatile i32 %17, i32* %2
%18 = load volatile i32, i32* %2
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %7
20: ; preds = %15, %1
ret void
}