xunge/DecIR huggingface dataset:
void byte_swap(char *in) {
  char temp;
  temp = in[0];
  in[0] = in[3];
  in[3] = temp;
  temp = in[1];
  in[1] = in[2];
  in[2] = temp;
}


x86 assembly (clang, -O0):
<byte_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<byte_swap>:
mov    (%rdi),%al
mov    0x3(%rdi),%cl
mov    %cl,(%rdi)
mov    %al,0x3(%rdi)
rolw   $0x8,0x1(%rdi)
ret

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

LLVM IR (-O2):
define void @byte_swap(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 3
%4 = load i8, i8* %3
store i8 %4, i8* %0
store i8 %2, i8* %3
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 2
%8 = load i8, i8* %7
store i8 %8, i8* %5
store i8 %6, i8* %7
ret void
}
unsigned int __gcd(unsigned int number1, unsigned int number2) {
  unsigned int remainder;
  unsigned int quotient;
  quotient = number1 / number2;
  remainder = number1 - number2 * quotient;
  while (remainder != 0) {
    number1 = number2;
    number2 = remainder;
    quotient = number1 / number2;
    remainder = number1 - number2 * quotient;
  }
  return number2;
}


x86 assembly (clang, -O0):
<__gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0x10(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1159 <__gcd+0x59>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0x10(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <__gcd+0x24>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gcd>:
mov    %edi,%eax
xor    %edx,%edx
div    %esi
test   %edx,%edx
je     1121 <__gcd+0x21>
nopw   0x0(%rax,%rax,1)
mov    %edx,%ecx
mov    %esi,%eax
xor    %edx,%edx
div    %ecx
mov    %ecx,%esi
test   %edx,%edx
jne    1110 <__gcd+0x10>
mov    %ecx,%eax
ret
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @__gcd(i32 %0, i32 %1) {
%3 = urem i32 %0, %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ %3, %2 ]
%7 = phi i32 [ %6, %5 ], [ %1, %2 ]
%8 = urem i32 %7, %6
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
%11 = phi i32 [ %1, %2 ], [ %6, %5 ]
ret i32 %11
}
void inquire_remote_apic(int apicid) {}


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

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

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

LLVM IR (-O2):
define void @inquire_remote_apic(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int size_uint32(int /*<<< orphan*/);
int /*<<< orphan*/ zigzag32(int /*<<< orphan*/);
unsigned size_sint32(int32_t v) { return size_uint32(zigzag32(v)); }


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

x86 assembly (clang, -O2):
<size_sint32>:
push   %rax
call   1030 <zigzag32@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <size_uint32@plt>

LLVM IR (-O0):
define i32 @size_sint32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @zigzag32(i32 %3)
%5 = call i32 @size_uint32(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @size_sint32(i32 %0) {
%2 = tail call i32 @zigzag32(i32 %0)
%3 = tail call i32 @size_uint32(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_crystal_comments() {
  test_parser_verify_parse(test_parser_sourcefile("crystal", " #comment"),
                           "crystal", "", "#comment", 0);
}


x86 assembly (clang, -O0):
<test_crystal_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xec0(%rip),%rdx
lea    0xebb(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_crystal_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xec9(%rip),%rdx
lea    0xec4(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"crystal\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [9 x i8] c"#comment\00"
define void @test_crystal_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([8 x i8], [8 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_parse(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"crystal\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [9 x i8] c"#comment\00"
define void @test_crystal_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([8 x i8], [8 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_parse(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
long long roundf(float);
long long llroundf(float x) { return roundf(x); }


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

x86 assembly (clang, -O2):
<llroundf>:
jmp    1030 <roundf@plt>

LLVM IR (-O0):
define i64 @llroundf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @roundf(float %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @llroundf(float %0) {
%2 = tail call i64 @roundf(float %0)
ret i64 %2
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_event_get_watchdog(void *e) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_event_get_watchdog>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_event_get_watchdog>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_event_get_watchdog(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_event_get_watchdog(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memswap(void *, void *, size_t);
void swap(void *base, size_t size, size_t i, size_t j) {
  if (i == j)
    return;
  memswap(base + size * i, base + size * j, size);
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jne    113b <swap+0x2b>
jmp    1164 <swap+0x54>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
imul   -0x20(%rbp),%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
call   1030 <memswap@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
cmp    %rcx,%rdx
jne    1116 <swap+0x6>
ret
mov    %rsi,%rax
imul   %rsi,%rdx
add    %rdi,%rdx
imul   %rsi,%rcx
add    %rdi,%rcx
mov    %rdx,%rdi
mov    %rcx,%rsi
mov    %rax,%rdx
jmp    1030 <memswap@plt>

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

LLVM IR (-O2):
define void @swap(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = icmp eq i64 %2, %3
br i1 %5, label %12, label %6
6: ; preds = %4
%7 = mul i64 %2, %1
%8 = getelementptr i8, i8* %0, i64 %7
%9 = mul i64 %3, %1
%10 = getelementptr i8, i8* %0, i64 %9
%11 = tail call i32 @memswap(i8* %8, i8* %10, i64 %1)
br label %12
12: ; preds = %4, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void rt_free_matrix(void *matrix_ptr) { free(matrix_ptr); }


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

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

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

LLVM IR (-O2):
define void @rt_free_matrix(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void byPtr(int *x) { printf("byPtr(ptr to %i)\n", *x); }


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

x86 assembly (clang, -O2):
<byPtr>:
mov    (%rdi),%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"byPtr(ptr to %i)\0A\00"
define void @byPtr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"byPtr(ptr to %i)\0A\00"
define void @byPtr(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int m_conf_multiple_choice(char *, char *, char *, char **, int, int);
int m_conf_tof(char *ope, char *opestr, char *val, char *str1, char *str2,
               int case_sensitive) {
  char *choice[2];
  choice[0] = str1;
  choice[1] = str2;
  return m_conf_multiple_choice(ope, opestr, val, choice, 2, case_sensitive);
}


x86 assembly (clang, -O0):
<m_conf_tof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x40(%rbp),%rcx
mov    -0x2c(%rbp),%r9d
mov    $0x2,%r8d
call   1030 <m_conf_multiple_choice@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_conf_tof>:
sub    $0x18,%rsp
mov    %rcx,(%rsp)
mov    %r8,0x8(%rsp)
mov    %rsp,%rcx
mov    $0x2,%r8d
call   1030 <m_conf_multiple_choice@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @m_conf_tof(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca [2 x i8*]
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%14 = load i8*, i8** %10
%15 = getelementptr inbounds [2 x i8*], [2 x i8*]* %13, i64 0, i64 0
store i8* %14, i8** %15
%16 = load i8*, i8** %11
%17 = getelementptr inbounds [2 x i8*], [2 x i8*]* %13, i64 0, i64 1
store i8* %16, i8** %17
%18 = load i8*, i8** %7
%19 = load i8*, i8** %8
%20 = load i8*, i8** %9
%21 = getelementptr inbounds [2 x i8*], [2 x i8*]* %13, i64 0, i64 0
%22 = load i32, i32* %12
%23 = call i32 @m_conf_multiple_choice(i8* %18, i8* %19, i8* %20, i8** %21, i32 2, i32 %22)
ret i32 %23
}

LLVM IR (-O2):
define i32 @m_conf_tof(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5) {
%7 = alloca [2 x i8*]
%8 = bitcast [2 x i8*]* %7 to i8*
%9 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 0
store i8* %3, i8** %9
%10 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 1
store i8* %4, i8** %10
%11 = call i32 @m_conf_multiple_choice(i8* %0, i8* %1, i8* %2, i8** %9, i32 2, i32 %5)
ret i32 %11
}
int *bar(void) { return 0; }


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

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

LLVM IR (-O0):
define i32* @bar() {
ret i32* null
}

LLVM IR (-O2):
define noalias i32* @bar() {
ret i32* null
}
/* Variables and functions */
int /*<<< orphan*/ digraph();
int /*<<< orphan*/ dollar();
int /*<<< orphan*/ escape();
int /*<<< orphan*/ newline();
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ whitespace();
void testmain() {
  print("lexer");
  digraph();
  escape();
  whitespace();
  newline();
  dollar();
}


x86 assembly (clang, -O0):
<testmain>:
push   %rbp
mov    %rsp,%rbp
lea    0xe95(%rip),%rdi
call   1050 <print@plt>
mov    $0x0,%al
call   1060 <digraph@plt>
mov    $0x0,%al
call   1080 <escape@plt>
mov    $0x0,%al
call   1070 <whitespace@plt>
mov    $0x0,%al
call   1030 <newline@plt>
mov    $0x0,%al
call   1040 <dollar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testmain>:
push   %rax
lea    0xe98(%rip),%rdi
call   1050 <print@plt>
xor    %eax,%eax
call   1060 <digraph@plt>
xor    %eax,%eax
call   1080 <escape@plt>
xor    %eax,%eax
call   1070 <whitespace@plt>
xor    %eax,%eax
call   1030 <newline@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <dollar@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"lexer\00"
define void @testmain() {
%1 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @digraph()
%3 = call i32 (...) @escape()
%4 = call i32 (...) @whitespace()
%5 = call i32 (...) @newline()
%6 = call i32 (...) @dollar()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"lexer\00"
define void @testmain() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @digraph()
%3 = tail call i32 (...) @escape()
%4 = tail call i32 (...) @whitespace()
%5 = tail call i32 (...) @newline()
%6 = tail call i32 (...) @dollar()
ret void
}
int my_str_isprintable(char *str) {
  int i;
  i = 0;
  while (str[i] != '\0') {
    if (!(str[i] >= 32 && str[i] <= 126))
      return (0);
    i++;
  }
  return (1);
}


x86 assembly (clang, -O0):
<my_str_isprintable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1168 <my_str_isprintable+0x68>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jl     114e <my_str_isprintable+0x4e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7e,%eax
jle    115a <my_str_isprintable+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    116f <my_str_isprintable+0x6f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <my_str_isprintable+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_str_isprintable>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <my_str_isprintable+0x23>
add    $0x1,%rdi
nop
add    $0x81,%cl
cmp    $0xa0,%cl
jbe    1124 <my_str_isprintable+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <my_str_isprintable+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @my_str_isprintable(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %30, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %33
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp sge i32 %19, 32
br i1 %20, label %21, label %29
21: ; preds = %13
%22 = load i8*, i8** %3
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp sle i32 %27, 126
br i1 %28, label %30, label %29
29: ; preds = %21, %13
store i32 0, i32* %2
br label %34
30: ; preds = %21
%31 = load i32, i32* %4
%32 = add nsw i32 %31, 1
store i32 %32, i32* %4
br label %5
33: ; preds = %5
store i32 1, i32* %2
br label %34
34: ; preds = %33, %29
%35 = load i32, i32* %2
ret i32 %35
}

LLVM IR (-O2):
define i32 @my_str_isprintable(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -127
%12 = icmp ult i8 %11, -95
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
void doConversion() { return; }


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

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

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

LLVM IR (-O2):
define void @doConversion() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ key;

/* Variables and functions */
int /*<<< orphan*/ rgph_u64_t1ha64s_data(int /*<<< orphan*/ const *, size_t,
                                         uintptr_t);
uint64_t rgph_u64_t1ha64s_u16a(const uint16_t *key, size_t len,
                               uintptr_t seed) {
  const uint8_t *arg = ((const uint8_t *)(const char *)(key));
  return rgph_u64_t1ha64s_data(arg, len * sizeof(key[0]), seed);
}


x86 assembly (clang, -O0):
<rgph_u64_t1ha64s_u16a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
shl    $0x2,%rsi
mov    -0x18(%rbp),%rdx
call   1030 <rgph_u64_t1ha64s_data@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_u64_t1ha64s_u16a>:
shl    $0x2,%rsi
jmp    1030 <rgph_u64_t1ha64s_data@plt>

LLVM IR (-O0):
define i32 @rgph_u64_t1ha64s_u16a(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32*
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i32*, i32** %4
%9 = bitcast i32* %8 to i8*
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %7
%11 = load i32*, i32** %7
%12 = load i64, i64* %5
%13 = mul i64 %12, 4
%14 = load i64, i64* %6
%15 = call i32 @rgph_u64_t1ha64s_data(i32* %11, i64 %13, i64 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @rgph_u64_t1ha64s_u16a(i32* %0, i64 %1, i64 %2) {
%4 = shl i64 %1, 2
%5 = tail call i32 @rgph_u64_t1ha64s_data(i32* %0, i64 %4, i64 %2)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void write_ticker_file(char *tname) {
  FILE *fd;
  time_t now = time(NULL);
  fd = fopen(tname, "a");
  fprintf(fd, "%s\n", ctime(&now));
  fclose(fd);
}


x86 assembly (clang, -O0):
<write_ticker_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <ctime@plt>
mov    -0x20(%rbp),%rdi
mov    %rax,%rdx
lea    0xe67(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_ticker_file>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xe96(%rip),%rsi
mov    %rbx,%rdi
call   1070 <fopen@plt>
mov    %rax,%rbx
lea    0xc(%rsp),%rdi
call   1040 <ctime@plt>
lea    0xe7c(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
call   1050 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @write_ticker_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
store i8* %0, i8** %2
%5 = call i32 @time(i32* null)
store i32 %5, i32* %4
%6 = load i8*, i8** %2
%7 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %3
%8 = load i32*, i32** %3
%9 = call i8* @ctime(i32* %4)
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = load i32*, i32** %3
%12 = call i32 @fclose(i32* %11)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @write_ticker_file(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = call i8* @ctime(i32* %2)
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = call i32 @fclose(i32* %5)
ret void
}
char *string2(void) { return 'h'; }


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

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

LLVM IR (-O0):
define i8* @string2() {
ret i8* inttoptr (i64 104 to i8*)
}

LLVM IR (-O2):
define i8* @string2() {
ret i8* inttoptr (i64 104 to i8*)
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
long long _mm_cvtsi128_si64(int /*<<< orphan*/);
long long test_mm_cvtsi128_si64(__m128i A) { return _mm_cvtsi128_si64(A); }


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

x86 assembly (clang, -O2):
<test_mm_cvtsi128_si64>:
jmp    1030 <_mm_cvtsi128_si64@plt>

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

LLVM IR (-O2):
define i64 @test_mm_cvtsi128_si64(i32 %0) {
%2 = tail call i64 @_mm_cvtsi128_si64(i32 %0)
ret i64 %2
}
unsigned int lshift_u_s(unsigned int left, int right) {
  if ((right) || (right >= sizeof(unsigned int) * 8) ||
      (left > (4294967295U >> right)))
    return left;
}


x86 assembly (clang, -O0):
<lshift_u_s>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1139 <lshift_u_s+0x39>
movslq -0xc(%rbp),%rax
cmp    $0x20,%rax
jae    1139 <lshift_u_s+0x39>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shr    %cl,%edx
mov    %edx,%ecx
cmp    %ecx,%eax
jbe    113f <lshift_u_s+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @lshift_u_s(i32 returned %0, i32 %1) {
ret i32 %0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint8_t integer_bits(uint64_t value) {
  uint8_t bits = 0;
  while (value) {
    ++bits;
    value >>= 1;
  }
  return bits;
}


x86 assembly (clang, -O0):
<integer_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1133 <integer_bits+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110f <integer_bits+0xf>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<integer_bits>:
xor    %eax,%eax
test   %edi,%edi
je     111d <integer_bits+0x1d>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
sar    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <integer_bits+0x10>
ret

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

LLVM IR (-O2):
define i64 @integer_bits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i64 %4, 1
%7 = ashr i32 %5, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i64 [ 0, %1 ], [ %6, %3 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int do_invalid_stuff() {
  printf("Invalid serial number!\nExiting\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"Invalid serial number!\0AExiting\0A\00"
define i32 @do_invalid_stuff() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [31 x i8] c"Invalid serial number!\0AExiting\00"
define i32 @do_invalid_stuff() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
int console_write(char *s) {
  int retval;
  __asm__("int $0x80      \n\t"
          "mov %%eax, %0"
          : "=m"(retval)
          : "a"(4), "b"(s)
          : "memory");
  return retval;
}


x86 assembly (clang, -O0):
<console_write>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rbx
mov    $0x4,%eax
int    $0x80
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_write>:
push   %rbx
mov    %rdi,%rbx
mov    $0x4,%eax
int    $0x80
mov    %eax,-0x4(%rsp)
mov    -0x4(%rsp),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @console_write(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* %2
ret i32 %4
}
float ft_isval(int i) {
  int nan;
  int inf;
  nan = 0x7F800001;
  inf = 0x7F800000;
  if (i == 0)
    return (*(float *)&nan);
  return (i * *(float *)&inf);
}


x86 assembly (clang, -O0):
<ft_isval>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x7f800001,-0xc(%rbp)
movl   $0x7f800000,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    112e <ft_isval+0x2e>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113d <ft_isval+0x3d>
cvtsi2ssl -0x8(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isval>:
test   %edi,%edi
je     1111 <ft_isval+0x11>
cvtsi2ss %edi,%xmm0
mulss  0xef0(%rip),%xmm0
ret
movss  0xeeb(%rip),%xmm0
ret

LLVM IR (-O0):
define float @ft_isval(i32 %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 2139095041, i32* %4
store i32 2139095040, i32* %5
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = bitcast i32* %4 to float*
%10 = load float, float* %9
store float %10, float* %2
br label %17
11: ; preds = %1
%12 = load i32, i32* %3
%13 = sitofp i32 %12 to float
%14 = bitcast i32* %5 to float*
%15 = load float, float* %14
%16 = fmul float %13, %15
store float %16, float* %2
br label %17
17: ; preds = %11, %8
%18 = load float, float* %2
ret float %18
}

LLVM IR (-O2):
define float @ft_isval(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = sitofp i32 %0 to float
%4 = fmul float %3, 0x7FF0000000000000
%5 = select i1 %2, float 0x7FF0000020000000, float %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ strncpy(char *, char *, int);
int /*<<< orphan*/ system(char *);
extern void system_(register char *str, int len) {
  char *buff;
  buff = (char *)malloc(len + 1);
  strncpy(buff, str, len);
  buff[len] = '\0';
  system(buff);
  free(buff);
}


x86 assembly (clang, -O0):
<system_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <strncpy@plt>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
call   1050 <system@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<system_>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x1(%r15),%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1040 <strncpy@plt>
movslq %r15d,%rax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rdi
call   1050 <system@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @system_(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = call i32 @strncpy(i8* %10, i8* %11, i32 %12)
%14 = load i8*, i8** %5
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
%18 = load i8*, i8** %5
%19 = call i32 @system(i8* %18)
%20 = load i8*, i8** %5
%21 = call i32 @free(i8* %20)
ret void
}

LLVM IR (-O2):
define void @system_(i8* %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strncpy(i8* %5, i8* %0, i32 %1)
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
store i8 0, i8* %8
%9 = tail call i32 @system(i8* %5)
%10 = tail call i32 @free(i8* %5)
ret void
}
int isprint(int c) { return (((c > 31) && (c < 127)) ? (1) : (0)); }


x86 assembly (clang, -O0):
<isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1120 <isprint+0x20>
cmpl   $0x7f,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 31
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 127
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
char const *greet(void) { return "Mijau!"; }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"Mijau!\00"
define i8* @greet() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ OS_TaskRegister();
void task_11(void) {
  OS_TaskRegister();
  while (1)
    ;
  return;
}


x86 assembly (clang, -O0):
<task_11>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <OS_TaskRegister@plt>
jmp    111b <task_11+0xb>

x86 assembly (clang, -O2):
<task_11>:
push   %rax
xor    %eax,%eax
call   1030 <OS_TaskRegister@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <task_11+0x10>

LLVM IR (-O0):
define void @task_11() {
%1 = call i32 (...) @OS_TaskRegister()
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
define void @task_11() {
%1 = tail call i32 (...) @OS_TaskRegister()
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i;
  i = 102;
  while (i >= 100) {
    i = i - 2;
    assert(i > 0);
  }
  assert(i == 98);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x66,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jl     114f <main+0x3f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    1126 <main+0x16>
cmpl   $0x62,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 102, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 100
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 2
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
br label %3
13: ; preds = %3
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 98
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ munmap(void *, int);
void mmiof_close(void *iomem) {
  if (munmap(iomem, 4096)) {
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<mmiof_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1000,%esi
call   1030 <munmap@plt>
cmp    $0x0,%rax
je     114e <mmiof_close+0x2e>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmiof_close>:
push   %rax
mov    $0x1000,%esi
call   1030 <munmap@plt>
test   %rax,%rax
jne    1132 <mmiof_close+0x12>
pop    %rax
ret
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @mmiof_close(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @munmap(i8* %3, i32 4096)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @exit(i32 -1)
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @mmiof_close(i8* %0) {
%2 = tail call i64 @munmap(i8* %0, i32 4096)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @exit(i32 -1)
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cmd_Args();
int /*<<< orphan*/ Com_Printf(char *, int /*<<< orphan*/);
void Cmd_Echo_f(void) { Com_Printf("%s\n", Cmd_Args()); }


x86 assembly (clang, -O0):
<Cmd_Echo_f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Cmd_Args@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1040 <Com_Printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cmd_Echo_f>:
push   %rax
xor    %eax,%eax
call   1030 <Cmd_Args@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <Com_Printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @Cmd_Echo_f() {
%1 = call i32 (...) @Cmd_Args()
%2 = call i32 @Com_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @Cmd_Echo_f() {
%1 = tail call i32 (...) @Cmd_Args()
%2 = tail call i32 @Com_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void daemon_crit(void) { return; }


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

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

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

LLVM IR (-O2):
define void @daemon_crit() {
ret void
}
int null_char(char *s, char c) {
  char *a;
  for (a = s; *a != (char)0; a++)
    if (*a == c) {
      *a = (char)0;
      return (1);
    }
  return (0);
}


x86 assembly (clang, -O0):
<null_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1162 <null_char+0x62>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    114c <null_char+0x4c>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1169 <null_char+0x69>
jmp    1151 <null_char+0x51>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1116 <null_char+0x16>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_char>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1120 <null_char+0x20>
add    $0x1,%rdi
nopl   0x0(%rax)
cmp    %sil,%cl
je     1121 <null_char+0x21>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <null_char+0x10>
ret
movb   $0x0,-0x1(%rdi)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @null_char(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %10
%6 = phi i8 [ %12, %10 ], [ %3, %2 ]
%7 = phi i8* [ %11, %10 ], [ %0, %2 ]
%8 = icmp eq i8 %6, %1
br i1 %8, label %9, label %10
9: ; preds = %5
store i8 0, i8* %7
br label %14
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %10, %2, %9
%15 = phi i32 [ 1, %9 ], [ 0, %2 ], [ 0, %10 ]
ret i32 %15
}
/* Variables and functions */
scalar_t__ COND_LE();
int /*<<< orphan*/ EA_AY_PD_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_sle_8_pd(void) {
  m68ki_write_8(EA_AY_PD_8(), COND_LE() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_sle_8_pd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_AY_PD_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_LE@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_sle_8_pd>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_AY_PD_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_LE@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_sle_8_pd() {
%1 = call i32 (...) @EA_AY_PD_8()
%2 = call i64 (...) @COND_LE()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_sle_8_pd() {
%1 = tail call i32 (...) @EA_AY_PD_8()
%2 = tail call i64 (...) @COND_LE()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c, n;
  c = 1;
  n = __VERIFIER_nondet_int();
  while (c > 0) {
    if (n > 100) {
      n = n - 10;
      c = c - 1;
    } else {
      n = n + 11;
      c = c + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1172 <main+0x62>
cmpl   $0x64,-0xc(%rbp)
jle    115b <main+0x4b>
mov    -0xc(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116d <main+0x5d>
mov    -0xc(%rbp),%eax
add    $0xb,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    $0x1,%ecx
nopl   (%rax)
lea    0xb(%rax),%edx
xor    %esi,%esi
cmp    $0x65,%eax
lea    -0xa(%rax),%eax
setl   %sil
lea    (%rcx,%rsi,2),%ecx
cmovl  %edx,%eax
add    $0xffffffff,%ecx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %3
br label %5
5: ; preds = %21, %0
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %22
8: ; preds = %5
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 100
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 10
store i32 %13, i32* %3
%14 = load i32, i32* %2
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %2
br label %21
16: ; preds = %8
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 11
store i32 %18, i32* %3
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
br label %21
21: ; preds = %16, %11
br label %5
22: ; preds = %5
ret i32 0
}

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