xunge/DecIR huggingface dataset:
/* Variables and functions */
int RCFileReadWrite(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ RCgenerator(char *);
int VerifyRC(char target[]) { return RCFileReadWrite(RCgenerator(target), 0); }


x86 assembly (clang, -O0):
<VerifyRC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <RCgenerator@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <RCFileReadWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VerifyRC>:
push   %rax
call   1040 <RCgenerator@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <RCFileReadWrite@plt>

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

LLVM IR (-O2):
define i32 @VerifyRC(i8* %0) {
%2 = tail call i32 @RCgenerator(i8* %0)
%3 = tail call i32 @RCFileReadWrite(i32 %2, i32 0)
ret i32 %3
}
float sum(int x, int y) {
  float z;
  z = x * y;
  return z;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
imul   %esi,%edi
cvtsi2ss %edi,%xmm0
ret

LLVM IR (-O0):
define float @sum(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = sitofp i32 %8 to float
store float %9, float* %5
%10 = load float, float* %5
ret float %10
}

LLVM IR (-O2):
define float @sum(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = sitofp i32 %3 to float
ret float %4
}
int sync_ss2(unsigned char *buff, unsigned char data) {
  buff[0] = buff[1];
  buff[1] = buff[2];
  buff[2] = data;
  return buff[0] == 0x01 && (buff[1] ^ buff[2]) == 0xFF;
}


x86 assembly (clang, -O0):
<sync_ss2>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
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)
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
mov    %al,-0xa(%rbp)
jne    1165 <sync_ss2+0x65>
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
xor    %ecx,%eax
cmp    $0xff,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync_ss2>:
mov    0x1(%rdi),%cl
mov    0x2(%rdi),%dl
mov    %cl,(%rdi)
mov    %dl,0x1(%rdi)
mov    %sil,0x2(%rdi)
xor    $0x1,%cl
xor    %sil,%dl
not    %dl
xor    %eax,%eax
or     %cl,%dl
sete   %al
ret

LLVM IR (-O0):
define i32 @sync_ss2(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %6
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 2
%12 = load i8, i8* %11
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
%15 = load i8, i8* %4
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 2
store i8 %15, i8* %17
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 0
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %34
23: ; preds = %2
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i64 1
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = load i8*, i8** %3
%29 = getelementptr inbounds i8, i8* %28, i64 2
%30 = load i8, i8* %29
%31 = zext i8 %30 to i32
%32 = xor i32 %27, %31
%33 = icmp eq i32 %32, 255
br label %34
34: ; preds = %23, %2
%35 = phi i1 [ false, %2 ], [ %33, %23 ]
%36 = zext i1 %35 to i32
ret i32 %36
}

LLVM IR (-O2):
define i32 @sync_ss2(i8* nocapture %0, i8 zeroext %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
store i8 %4, i8* %0
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
store i8 %6, i8* %3
store i8 %1, i8* %5
%7 = icmp eq i8 %4, 1
%8 = xor i8 %6, %1
%9 = icmp eq i8 %8, -1
%10 = select i1 %7, i1 %9, i1 false
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Type definitions */
typedef char uint32_t;
struct parser_state {
  int dummy;
};

/* Variables and functions */
char parser_far_peek_ch(struct parser_state *, int);
int /*<<< orphan*/ parser_pop(struct parser_state *);
void parse_comment(struct parser_state *pstate, uint32_t ch) {
  if (ch == '/' && parser_far_peek_ch(pstate, -2) == '*') {
    parser_pop(pstate);
  }
}


x86 assembly (clang, -O0):
<parse_comment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x2f,%eax
jne    1162 <parse_comment+0x42>
mov    -0x8(%rbp),%rdi
mov    $0xfffffffe,%esi
call   1040 <parser_far_peek_ch@plt>
movsbl %al,%eax
cmp    $0x2a,%eax
jne    1162 <parse_comment+0x42>
mov    -0x8(%rbp),%rdi
call   1030 <parser_pop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_comment>:
push   %rbx
cmp    $0x2f,%sil
jne    1141 <parse_comment+0x21>
mov    %rdi,%rbx
mov    $0xfffffffe,%esi
call   1040 <parser_far_peek_ch@plt>
cmp    $0x2a,%al
jne    1141 <parse_comment+0x21>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <parser_pop@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.parser_state = type { i32 }
define void @parse_comment(%struct.parser_state* %0, i8 signext %1) {
%3 = alloca %struct.parser_state*
%4 = alloca i8
store %struct.parser_state* %0, %struct.parser_state** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 47
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load %struct.parser_state*, %struct.parser_state** %3
%10 = call signext i8 @parser_far_peek_ch(%struct.parser_state* %9, i32 -2)
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 42
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = load %struct.parser_state*, %struct.parser_state** %3
%15 = call i32 @parser_pop(%struct.parser_state* %14)
br label %16
16: ; preds = %13, %8, %2
ret void
}

LLVM IR (-O2):
%struct.parser_state = type { i32 }
define void @parse_comment(%struct.parser_state* %0, i8 signext %1) {
%3 = icmp eq i8 %1, 47
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = tail call signext i8 @parser_far_peek_ch(%struct.parser_state* %0, i32 -2)
%6 = icmp eq i8 %5, 42
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @parser_pop(%struct.parser_state* %0)
br label %9
9: ; preds = %7, %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(unsigned int *, int, int, int /*<<< orphan*/ *);
void write_u32(FILE *f, unsigned int n) {
  n = (n);
  fwrite(&n, 4, 1, f);
}


x86 assembly (clang, -O0):
<write_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_u32>:
push   %rax
mov    %rdi,%rcx
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @write_u32(i32* nocapture %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @fwrite(i32* %3, i32 4, i32 1, i32* %0)
ret void
}
/* Variables and functions */
int INT_MIN;
int /*<<< orphan*/ this_comparison_is_false();
void bla1eq(int var) {
  if (var + 10 == INT_MIN + 9)
    this_comparison_is_false();
}


x86 assembly (clang, -O0):
<bla1eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa,%eax
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%ecx
add    $0x9,%ecx
cmp    %ecx,%eax
jne    113c <bla1eq+0x2c>
mov    $0x0,%al
call   1030 <this_comparison_is_false@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bla1eq>:
mov    0x2ed1(%rip),%rax
add    $0x1,%edi
cmp    (%rax),%edi
jne    1125 <bla1eq+0x15>
xor    %eax,%eax
jmp    1030 <this_comparison_is_false@plt>
ret

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

LLVM IR (-O2):
@INT_MIN = global i32 0
define void @bla1eq(i32 %0) {
%2 = load i32, i32* @INT_MIN
%3 = add nsw i32 %0, 1
%4 = icmp eq i32 %3, %2
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @this_comparison_is_false()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FD_CLOEXEC;
int /*<<< orphan*/ F_SETFD;
int fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int set_cloexec(int fd) {
  return fcntl(fd, F_SETFD, FD_CLOEXEC) != -1 ? 0 : -1;
}


x86 assembly (clang, -O0):
<set_cloexec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
mov    %eax,%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0xffffffff,%edx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cloexec>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
mov    0x2eb7(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@F_SETFD = global i32 0
@FD_CLOEXEC = global i32 0
define i32 @set_cloexec(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_SETFD
%5 = load i32, i32* @FD_CLOEXEC
%6 = call i32 @fcntl(i32 %3, i32 %4, i32 %5)
%7 = icmp ne i32 %6, -1
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 0, i32 -1
ret i32 %9
}

LLVM IR (-O2):
@F_SETFD = global i32 0
@FD_CLOEXEC = global i32 0
define i32 @set_cloexec(i32 %0) {
%2 = load i32, i32* @F_SETFD
%3 = load i32, i32* @FD_CLOEXEC
%4 = tail call i32 @fcntl(i32 %0, i32 %2, i32 %3)
%5 = icmp eq i32 %4, -1
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
struct sfmt_state_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gen_rand32(struct sfmt_state_t *);
double to_real2(int /*<<< orphan*/);
double genrand_real2(struct sfmt_state_t *s) { return to_real2(gen_rand32(s)); }


x86 assembly (clang, -O0):
<genrand_real2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <gen_rand32@plt>
mov    %eax,%edi
call   1030 <to_real2@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sfmt_state_t = type { i32 }
define double @genrand_real2(%struct.sfmt_state_t* %0) {
%2 = alloca %struct.sfmt_state_t*
store %struct.sfmt_state_t* %0, %struct.sfmt_state_t** %2
%3 = load %struct.sfmt_state_t*, %struct.sfmt_state_t** %2
%4 = call i32 @gen_rand32(%struct.sfmt_state_t* %3)
%5 = call double @to_real2(i32 %4)
ret double %5
}

LLVM IR (-O2):
%struct.sfmt_state_t = type { i32 }
define double @genrand_real2(%struct.sfmt_state_t* %0) {
%2 = tail call i32 @gen_rand32(%struct.sfmt_state_t* %0)
%3 = tail call double @to_real2(i32 %2)
ret double %3
}
int fun707() { return 707; }


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

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

LLVM IR (-O0):
define i32 @fun707() {
ret i32 707
}

LLVM IR (-O2):
define i32 @fun707() {
ret i32 707
}
int string_is_comment(char *s) {
  while (*s == ' ' || *s == '\t')
    s++;
  return *s == 0 || *s == '\n' || *s == '#';
}


x86 assembly (clang, -O0):
<string_is_comment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <string_is_comment+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <string_is_comment+0x3d>
jmp    114e <string_is_comment+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <string_is_comment+0x8>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0xa(%rbp)
je     1188 <string_is_comment+0x88>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0xa(%rbp)
je     1188 <string_is_comment+0x88>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_is_comment>:
lea    0xef9(%rip),%rax
nopw   0x0(%rax,%rax,1)
movzbl (%rdi),%ecx
cmp    $0x20,%rcx
ja     112e <string_is_comment+0x2e>
movslq (%rax,%rcx,4),%rdx
add    %rax,%rdx
jmp    *%rdx
add    $0x1,%rdi
jmp    1110 <string_is_comment+0x10>
mov    $0x1,%eax
ret
xor    %eax,%eax
cmp    $0x23,%cl
sete   %al
ret

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

LLVM IR (-O2):
define i32 @string_is_comment(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
i8 0, label %10
i8 10, label %10
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
%8 = icmp eq i8 %4, 35
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %2, %7
%11 = phi i32 [ %9, %7 ], [ 1, %2 ], [ 1, %2 ]
ret i32 %11
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t rotl_64d(short dummy, uint64_t x) { return (x << 32) | (x >> 32); }


x86 assembly (clang, -O0):
<rotl_64d>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%edx
mov    $0x20,%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @rotl_64d(i16 signext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 %5, 32
%7 = load i32, i32* %4
%8 = ashr i32 %7, 32
%9 = or i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @rotl_64d(i16 signext %0, i32 %1) {
ret i32 poison
}
void RTAvlPVInsert(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlPVInsert() {
ret void
}
int foo_local() { return 42; }


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

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

LLVM IR (-O0):
define i32 @foo_local() {
ret i32 42
}

LLVM IR (-O2):
define i32 @foo_local() {
ret i32 42
}
int string_pos(char *search_for, char *search_in) {
  return strstr(search_in, search_for) - search_in;
}


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

x86 assembly (clang, -O2):
<string_pos>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rbx,%rdi
call   1030 <strstr@plt>
sub    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @string_pos(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @strstr(i8* %5, i8* %6)
%8 = load i8*, i8** %4
%9 = ptrtoint i8* %7 to i64
%10 = ptrtoint i8* %8 to i64
%11 = sub i64 %9, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @string_pos(i8* nocapture %0, i8* %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %1, i8* dereferenceable(1) %0)
%4 = ptrtoint i8* %3 to i64
%5 = ptrtoint i8* %1 to i64
%6 = sub i64 %4, %5
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ ext();
void n2(int a, int b) { ext(); }


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

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

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

LLVM IR (-O2):
define void @n2(i32 %0, i32 %1) {
%3 = tail call i32 (...) @ext()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GIT_UNUSED(unsigned int *);
int git_mutex_init(unsigned int *mutex) {
  GIT_UNUSED(mutex);
  return 0;
}


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

x86 assembly (clang, -O2):
<git_mutex_init>:
push   %rax
call   1030 <GIT_UNUSED@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @git_mutex_init(i32* %0) {
%2 = tail call i32 @GIT_UNUSED(i32* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fdc_putchar(int);
void fdc_printchar(char **str, int c) {
  if (str) {
    **str = c;
    ++(*str);
  } else
    fdc_putchar(c);
}


x86 assembly (clang, -O0):
<fdc_printchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114b <fdc_printchar+0x3b>
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1153 <fdc_printchar+0x43>
mov    -0xc(%rbp),%edi
call   1030 <fdc_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdc_printchar>:
test   %rdi,%rdi
je     1120 <fdc_printchar+0x10>
mov    (%rdi),%rax
mov    %sil,(%rax)
addq   $0x1,(%rdi)
ret
mov    %esi,%edi
jmp    1030 <fdc_putchar@plt>

LLVM IR (-O0):
define void @fdc_printchar(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 = icmp ne i8** %5, null
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = load i32, i32* %4
%9 = trunc i32 %8 to i8
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
store i8 %9, i8* %11
%12 = load i8**, i8*** %3
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %12
br label %18
15: ; preds = %2
%16 = load i32, i32* %4
%17 = call i32 @fdc_putchar(i32 %16)
br label %18
18: ; preds = %15, %7
ret void
}

LLVM IR (-O2):
define void @fdc_printchar(i8** %0, i32 %1) {
%3 = icmp eq i8** %0, null
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = trunc i32 %1 to i8
%6 = load i8*, i8** %0
store i8 %5, i8* %6
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
br label %11
9: ; preds = %2
%10 = tail call i32 @fdc_putchar(i32 %1)
br label %11
11: ; preds = %9, %4
ret void
}
int Calc_CheckInput(char *input) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Calc_CheckInput(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int rom_present(char *);
int s3_diamond_stealth64_available(void) {
  return rom_present(L"roms/video/s3/stealt64.bin");
}


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

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

LLVM IR (-O0):
@.str = [27 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 115, i32 51, i32 47, i32 115, i32 116, i32 101, i32 97, i32 108, i32 116, i32 54, i32 52, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @s3_diamond_stealth64_available() {
%1 = call i32 @rom_present(i8* bitcast ([27 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [27 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 115, i32 51, i32 47, i32 115, i32 116, i32 101, i32 97, i32 108, i32 116, i32 54, i32 52, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @s3_diamond_stealth64_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([27 x i32]* @.str to i8*))
ret i32 %1
}
void change_bit(int nr, volatile unsigned long *addr) {
  addr += nr / 32;
  *addr ^= (1 << (nr % 32));
}


x86 assembly (clang, -O0):
<change_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rdx
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
xor    %rdx,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<change_bit>:
mov    %edi,%ecx
lea    0x1f(%rcx),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x5,%eax
cltq
mov    $0x1,%edx
shl    %cl,%edx
movslq %edx,%rcx
xor    %rcx,(%rsi,%rax,8)
ret

LLVM IR (-O0):
define void @change_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = sdiv i32 %5, 32
%7 = load i64*, i64** %4
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds i64, i64* %7, i64 %8
store i64* %9, i64** %4
%10 = load i32, i32* %3
%11 = srem i32 %10, 32
%12 = shl i32 1, %11
%13 = sext i32 %12 to i64
%14 = load i64*, i64** %4
%15 = load volatile i64, i64* %14
%16 = xor i64 %15, %13
store volatile i64 %16, i64* %14
ret void
}

LLVM IR (-O2):
define void @change_bit(i32 %0, i64* %1) {
%3 = sdiv i32 %0, 32
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i64, i64* %1, i64 %4
%6 = and i32 %0, 31
%7 = shl nuw i32 1, %6
%8 = sext i32 %7 to i64
%9 = load volatile i64, i64* %5
%10 = xor i64 %9, %8
store volatile i64 %10, i64* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ InlineWords(int, int, int, int);
void DoBounds(void) { InlineWords(3, 18, 11, 16); }


x86 assembly (clang, -O0):
<DoBounds>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
mov    $0x12,%esi
mov    $0xb,%edx
mov    $0x10,%ecx
call   1030 <InlineWords@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoBounds>:
mov    $0x3,%edi
mov    $0x12,%esi
mov    $0xb,%edx
mov    $0x10,%ecx
jmp    1030 <InlineWords@plt>

LLVM IR (-O0):
define void @DoBounds() {
%1 = call i32 @InlineWords(i32 3, i32 18, i32 11, i32 16)
ret void
}

LLVM IR (-O2):
define void @DoBounds() {
%1 = tail call i32 @InlineWords(i32 3, i32 18, i32 11, i32 16)
ret void
}
void gtk_icon_source_set_size() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_source_set_size() {
ret void
}
/* Variables and functions */
double floor(double);
double mt_genrand_real2();
double mtrandom_double(double range) {
  double r = floor(mt_genrand_real2() * range);
  return r;
}


x86 assembly (clang, -O0):
<mtrandom_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <mt_genrand_real2@plt>
mulsd  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtrandom_double>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <mt_genrand_real2@plt>
mulsd  (%rsp),%xmm0
pop    %rax
jmp    1040 <floor@plt>

LLVM IR (-O0):
define double @mtrandom_double(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = call double (...) @mt_genrand_real2()
%5 = load double, double* %2
%6 = fmul double %4, %5
%7 = call double @llvm.floor.f64(double %6)
store double %7, double* %3
%8 = load double, double* %3
ret double %8
}

LLVM IR (-O2):
define double @mtrandom_double(double %0) {
%2 = tail call double (...) @mt_genrand_real2()
%3 = fmul double %2, %0
%4 = tail call double @llvm.floor.f64(double %3)
ret double %4
}
/* Variables and functions */
scalar_t__ strlen(char *);
char *strncat(char *, char const *, scalar_t__);
char *str_max_n_cat(char *dst, const char *src, int len) {
  return strncat(dst, src, len - strlen(dst));
}


x86 assembly (clang, -O0):
<str_max_n_cat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
sub    %rax,%rdx
call   1040 <strncat@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_max_n_cat>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
movslq %edx,%rbx
call   1030 <strlen@plt>
sub    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <strncat@plt>

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

LLVM IR (-O2):
define i8* @str_max_n_cat(i8* returned %0, i8* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%6 = sub nsw i64 %4, %5
%7 = tail call i8* @strncat(i8* dereferenceable(1) %0, i8* %1, i64 %6)
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *gmtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void get_date(char *formated_time) {
  time_t t = time(NULL);
  struct tm *a = gmtime(&t);
  strftime(formated_time, 256, "%a, %d %b %Y %H:%M:%S GMT", a);
}


x86 assembly (clang, -O0):
<get_date>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1050 <gmtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x100,%esi
lea    0xe97(%rip),%rdx
call   1040 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_date>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1050 <gmtime@plt>
lea    0xeac(%rip),%rdx
mov    %rbx,%rdi
mov    $0x100,%esi
mov    %rax,%rcx
call   1040 <strftime@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [26 x i8] c"%a, %d %b %Y %H:%M:%S GMT\00"
define void @get_date(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.tm*
store i8* %0, i8** %2
%5 = call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call %struct.tm* @gmtime(i32* %3)
store %struct.tm* %6, %struct.tm** %4
%7 = load i8*, i8** %2
%8 = load %struct.tm*, %struct.tm** %4
%9 = call i32 @strftime(i8* %7, i32 256, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), %struct.tm* %8)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [26 x i8] c"%a, %d %b %Y %H:%M:%S GMT\00"
define void @get_date(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = call %struct.tm* @gmtime(i32* %2)
%6 = call i32 @strftime(i8* %0, i32 256, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret void
}
void foo110() {}


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

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

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

LLVM IR (-O2):
define void @foo110() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int width;
};
struct TYPE_4__ {
  TYPE_1__ xresizerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xresizerequest_width(void *_p, int _v) {
  ((XEvent *)_p)->xresizerequest.width = (int)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xresizerequest_width(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello! Welcome to Fedora 21 Release Party\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"Hello! Welcome to Fedora 21 Release Party\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [42 x i8] c"Hello! Welcome to Fedora 21 Release Party\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void parse_options(char *arg) {
  char *pc;
  int i;
  assert(arg[0] == '-');
  if (arg[1] == '\0') {
    printf("Missing letter options after '-'!\n");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<parse_options>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    117a <parse_options+0x4a>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_options>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
cmpb   $0x2d,(%rbx)
sete   %dil
call   1040 <assert@plt>
cmpb   $0x0,0x1(%rbx)
je     114a <parse_options+0x1a>
pop    %rbx
ret
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Missing letter options after '-'!\0A\00"
define void @parse_options(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 45
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %1
%18 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%19 = call i32 @exit(i32 -1)
unreachable
20: ; preds = %1
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"Missing letter options after '-'!\00"
define void @parse_options(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 45
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%11 = tail call i32 @exit(i32 -1)
unreachable
12: ; preds = %1
ret void
}
/* Type definitions */
struct _tuple25 {
  int dummy;
};
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_line_rec(struct Cyc_Lexing_lexbuf *, int /*<<< orphan*/);
struct _tuple25 *Cyc_line(struct Cyc_Lexing_lexbuf *lexbuf) {
  return ({ Cyc_line_rec(lexbuf, 0); });
}


x86 assembly (clang, -O0):
<Cyc_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <Cyc_line_rec@plt>
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_line>:
push   %rax
xor    %esi,%esi
call   1030 <Cyc_line_rec@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
%struct._tuple25 = type { i32 }
%struct.Cyc_Lexing_lexbuf = type { i32 }
define %struct._tuple25* @Cyc_line(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_line_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 0)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to %struct._tuple25*
ret %struct._tuple25* %8
}

LLVM IR (-O2):
%struct._tuple25 = type { i32 }
%struct.Cyc_Lexing_lexbuf = type { i32 }
define %struct._tuple25* @Cyc_line(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_line_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to %struct._tuple25*
ret %struct._tuple25* %4
}
int fun705() { return 705; }


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

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

LLVM IR (-O0):
define i32 @fun705() {
ret i32 705
}

LLVM IR (-O2):
define i32 @fun705() {
ret i32 705
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long event;
};
typedef TYPE_1__ XCirculateEvent;

/* Variables and functions */
void set_XCirculateEvent_event(void *_p, unsigned long _v) {
  ((XCirculateEvent *)_p)->event = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XCirculateEvent_event(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int rdbyte(int /*<<< orphan*/ *);
int rdbool(FILE *fd) { return rdbyte(fd); }


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

x86 assembly (clang, -O2):
<rdbool>:
jmp    1030 <rdbyte@plt>

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

LLVM IR (-O2):
define i32 @rdbool(i32* %0) {
%2 = tail call i32 @rdbyte(i32* %0)
ret i32 %2
}
int test_imm_6Cint64_lowword_mem(long long *val) {
  return ((*val) & (0x6C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_6Cint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 108
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ applyBt5Patch();
void rf_patch_cpe_bt5(void) { applyBt5Patch(); }


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

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

LLVM IR (-O0):
define void @rf_patch_cpe_bt5() {
%1 = call i32 (...) @applyBt5Patch()
ret void
}

LLVM IR (-O2):
define void @rf_patch_cpe_bt5() {
%1 = tail call i32 (...) @applyBt5Patch()
ret void
}
void R_GLstate_Add(void) {}


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

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

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

LLVM IR (-O2):
define void @R_GLstate_Add() {
ret void
}
/* Type definitions */
struct sembuf {
  int sem_num;
  int sem_op;
  int /*<<< orphan*/ sem_flg;
};

/* Variables and functions */
int /*<<< orphan*/ SEM_UNDO;
scalar_t__ semop(int, struct sembuf *, int);
bool qsem_leave(int semid, int semno) {
  struct sembuf sbuf;
  sbuf.sem_num = semno;
  sbuf.sem_op = 1;
  sbuf.sem_flg = SEM_UNDO;
  if (semop(semid, &sbuf, 1) != 0)
    return false;
  return true;
}


x86 assembly (clang, -O0):
<qsem_leave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x1,-0x14(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
cmp    $0x0,%rax
je     115e <qsem_leave+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1165 <qsem_leave+0x55>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsem_leave>:
sub    $0x18,%rsp
mov    %esi,0x8(%rsp)
movl   $0x1,0xc(%rsp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i32, i32 }
@SEM_UNDO = global i32 0
define i32 @qsem_leave(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.sembuf
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %6, i32 0, i32 0
store i32 %7, i32* %8
%9 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %6, i32 0, i32 1
store i32 1, i32* %9
%10 = load i32, i32* @SEM_UNDO
%11 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %6, i32 0, i32 2
store i32 %10, i32* %11
%12 = load i32, i32* %4
%13 = call i64 @semop(i32 %12, %struct.sembuf* %6, i32 1)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 0, i32* %3
br label %17
16: ; preds = %2
store i32 1, i32* %3
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32, i32 }
@SEM_UNDO = global i32 0
define i32 @qsem_leave(i32 %0, i32 %1) {
%3 = alloca %struct.sembuf
%4 = bitcast %struct.sembuf* %3 to i8*
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 1
store i32 1, i32* %6
%7 = load i32, i32* @SEM_UNDO
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 2
store i32 %7, i32* %8
%9 = call i64 @semop(i32 %0, %struct.sembuf* %3, i32 1)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
void genfloor_l_s() {}


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

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

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

LLVM IR (-O2):
define void @genfloor_l_s() {
ret void
}
int test_imm_2Auint16_reg(unsigned short val) {
  return ((val) & (0x2A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Auint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x2a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_2Auint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 42
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int, int);
int /*<<< orphan*/ msf_frame_to_msf(long, int *, int *, int *);
int /*<<< orphan*/ stdout;
void print_m_ss_ff(long frame) {
  int minutes, seconds, frames;
  msf_frame_to_msf(frame, &minutes, &seconds, &frames);
  fprintf(stdout, "%d:%02d.%02d\n", minutes, seconds, frames);
}


x86 assembly (clang, -O0):
<print_m_ss_ff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
call   1040 <msf_frame_to_msf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xea5(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_m_ss_ff>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <msf_frame_to_msf@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
mov    0x14(%rsp),%edx
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%r8d
lea    0xeab(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [14 x i8] c"%d:%02d.%02d\0A\00"
define void @print_m_ss_ff(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i64 %0, i64* %2
%6 = load i64, i64* %2
%7 = call i32 @msf_frame_to_msf(i64 %6, i32* %3, i32* %4, i32* %5)
%8 = load i32, i32* @stdout
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [14 x i8] c"%d:%02d.%02d\0A\00"
define void @print_m_ss_ff(i64 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = call i32 @msf_frame_to_msf(i64 %0, i32* %2, i32* %3, i32* %4)
%9 = load i32, i32* @stdout
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, i32 %12)
ret void
}
/* Variables and functions */
void PKCS12_PBE_add(void) {}


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

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

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

LLVM IR (-O2):
define void @PKCS12_PBE_add() {
ret void
}
__attribute__((noipa)) int f2(int x) { return __builtin_clz(x) == 0; }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
bsr    %eax,%eax
xor    $0x1f,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    %edi,%eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @f2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @llvm.ctlz.i32(i32 %3, i1 true)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f2(i32 %0) {
%2 = lshr i32 %0, 31
ret i32 %2
}