xunge/DecIR huggingface dataset:
int test_imm_29int64_midword_reg(long long val) {
  return ((val >> 16) & (0x29 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_29int64_midword_reg>:
test   $0x290000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_29int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 41
%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_29int64_midword_reg(i64 %0) {
%2 = and i64 %0, 2686976
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void gtk_icon_factory_add() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_factory_add() {
ret void
}
/* Variables and functions */
int htoi();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int ret = 0;
  int result = 0;
  result = htoi();
  if (result >= 0)
    printf("\nThe decimal form of the number is: %d\n", result);
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <htoi@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1160 <main+0x40>
mov    -0xc(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <htoi@plt>
test   %eax,%eax
js     113a <main+0x1a>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"\0AThe decimal form of the number is: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%4 = call i32 (...) @htoi()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %0
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [40 x i8] c"\0AThe decimal form of the number is: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @htoi()
%2 = icmp sgt i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x2b() {
  Assert_real((isdigit(43) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              220, ("isdigit should be 0 for +"));
}


x86 assembly (clang, -O0):
<t_isdigit_0x2b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2b,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xdc,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0x2b>:
push   %rax
mov    $0x2b,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xdc,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for +\00"
define void @t_isdigit_0x2b() {
%1 = call i64 @isdigit(i32 43)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 220, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for +\00"
define void @t_isdigit_0x2b() {
%1 = tail call i64 @isdigit(i32 43)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 220, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int f26(unsigned int);
unsigned int f27(unsigned int a) { return f26(f26(a)); }


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

x86 assembly (clang, -O2):
<f27>:
push   %rax
call   1030 <f26@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <f26@plt>

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

LLVM IR (-O2):
define i32 @f27(i32 %0) {
%2 = tail call i32 @f26(i32 %0)
%3 = tail call i32 @f26(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ modf(double, double *);
double floor(double x) {
  modf(x, &x);
  if (x < 0.0)
    x -= 1.0;
  return x;
}


x86 assembly (clang, -O0):
<floor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x8(%rbp),%rdi
call   1030 <modf@plt>
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    114f <floor+0x3f>
movsd  -0x8(%rbp),%xmm0
movsd  0xeba(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floor>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <modf@plt>
movsd  (%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    113a <floor+0x2a>
addsd  0xecb(%rip),%xmm0
movsd  %xmm0,(%rsp)
pop    %rax
ret

LLVM IR (-O0):
define double @floor(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @modf(double %3, double* %2)
%5 = load double, double* %2
%6 = fcmp olt double %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load double, double* %2
%9 = fsub double %8, 1.000000e+00
store double %9, double* %2
br label %10
10: ; preds = %7, %1
%11 = load double, double* %2
ret double %11
}

LLVM IR (-O2):
define double @floor(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @modf(double %0, double* %2)
%4 = load double, double* %2
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = fadd double %4, -1.000000e+00
store double %7, double* %2
br label %8
8: ; preds = %6, %1
%9 = phi double [ %7, %6 ], [ %4, %1 ]
ret double %9
}
/* Variables and functions */
int get_num();
int /*<<< orphan*/ printf(char *, int);
void do_goto() { printf("\tjmp l%i\n", get_num()); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"\09jmp l%i\0A\00"
define void @do_goto() {
%1 = call i32 (...) @get_num()
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"\09jmp l%i\0A\00"
define void @do_goto() {
%1 = tail call i32 (...) @get_num()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
struct cbor_buf {
  int dummy;
};

/* Variables and functions */
int cbor_expect_byte(struct cbor_buf *, int);
bool cbor_expect_true(struct cbor_buf *buf) {
  return cbor_expect_byte(buf, 0xf5);
}


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

x86 assembly (clang, -O2):
<cbor_expect_true>:
mov    $0xf5,%esi
jmp    1030 <cbor_expect_byte@plt>

LLVM IR (-O0):
%struct.cbor_buf = type { i32 }
define i32 @cbor_expect_true(%struct.cbor_buf* %0) {
%2 = alloca %struct.cbor_buf*
store %struct.cbor_buf* %0, %struct.cbor_buf** %2
%3 = load %struct.cbor_buf*, %struct.cbor_buf** %2
%4 = call i32 @cbor_expect_byte(%struct.cbor_buf* %3, i32 245)
ret i32 %4
}

LLVM IR (-O2):
%struct.cbor_buf = type { i32 }
define i32 @cbor_expect_true(%struct.cbor_buf* %0) {
%2 = tail call i32 @cbor_expect_byte(%struct.cbor_buf* %0, i32 245)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ bb_perror_msg_and_die(char *, char const *);
int /*<<< orphan*/ *fopen(char const *, char const *);
FILE *bb_xfopen(const char *path, const char *mode) {
  FILE *fp;
  if ((fp = fopen(path, mode)) == NULL)
    bb_perror_msg_and_die("%s", path);
  return fp;
}


x86 assembly (clang, -O0):
<bb_xfopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    115b <bb_xfopen+0x3b>
mov    -0x8(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <bb_perror_msg_and_die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bb_xfopen>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <bb_xfopen+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1030 <bb_perror_msg_and_die@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define noalias i32* @bb_xfopen(i8* %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @bb_perror_msg_and_die(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %5, %2
ret i32* %3
}
/* Variables and functions */
double ceil(double);
double floor(double);
double dd_aint(double d) { return (d >= 0.0) ? floor(d) : ceil(d); }


x86 assembly (clang, -O0):
<dd_aint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1153 <dd_aint+0x33>
movsd  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    1162 <dd_aint+0x42>
movsd  -0x8(%rbp),%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dd_aint>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    112f <dd_aint+0xf>
jmp    1030 <ceil@plt>
jmp    1040 <floor@plt>

LLVM IR (-O0):
define double @dd_aint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = call double @llvm.floor.f64(double %6)
br label %11
8: ; preds = %1
%9 = load double, double* %2
%10 = call double @llvm.ceil.f64(double %9)
br label %11
11: ; preds = %8, %5
%12 = phi double [ %7, %5 ], [ %10, %8 ]
ret double %12
}

LLVM IR (-O2):
define double @dd_aint(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call double @llvm.floor.f64(double %0)
br label %7
5: ; preds = %1
%6 = tail call double @llvm.ceil.f64(double %0)
br label %7
7: ; preds = %5, %3
%8 = phi double [ %4, %3 ], [ %6, %5 ]
ret double %8
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int strlen(char const *);
bool is_flag(const char *s) {
  return s[0] == '-' && strlen(s) > 1 && strcmp(s, "--") != 0;
}


x86 assembly (clang, -O0):
<is_flag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1174 <is_flag+0x54>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
mov    %al,-0x9(%rbp)
jle    1174 <is_flag+0x54>
mov    -0x8(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_flag>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
cmpb   $0x2d,(%rdi)
jne    114f <is_flag+0x2f>
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0x2,%eax
jl     114f <is_flag+0x2f>
lea    0xec2(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
setne  %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"--\00"
define i32 @is_flag(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 45
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @strlen(i8* %9)
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i8*, i8** %2
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%15 = icmp ne i64 %14, 0
br label %16
16: ; preds = %12, %8, %1
%17 = phi i1 [ false, %8 ], [ false, %1 ], [ %15, %12 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
@.str = [3 x i8] c"--\00"
define i32 @is_flag(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 45
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 0, %4 ], [ 0, %1 ], [ %10, %7 ]
ret i32 %12
}
int test_imm_15uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x15 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_15uint64_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, 21
%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_15uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 21
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int kill(scalar_t__, int);
scalar_t__ plm_pidfile_read();
int plm_kill_master_proc(int signo) {
  int rc = -1;
  pid_t pid;
  pid = plm_pidfile_read();
  if (pid > 0)
    rc = kill(pid, signo);
  return (rc);
}


x86 assembly (clang, -O0):
<plm_kill_master_proc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    $0x0,%al
call   1040 <plm_pidfile_read@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1157 <plm_kill_master_proc+0x37>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <kill@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plm_kill_master_proc>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <plm_pidfile_read@plt>
test   %rax,%rax
jle    113a <plm_kill_master_proc+0x1a>
mov    %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <kill@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @plm_kill_master_proc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %2
store i32 -1, i32* %3
%5 = call i64 (...) @plm_pidfile_read()
store i64 %5, i64* %4
%6 = load i64, i64* %4
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i64, i64* %4
%10 = load i32, i32* %2
%11 = call i32 @kill(i64 %9, i32 %10)
store i32 %11, i32* %3
br label %12
12: ; preds = %8, %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @plm_kill_master_proc(i32 %0) {
%2 = tail call i64 (...) @plm_pidfile_read()
%3 = icmp sgt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @kill(i64 %2, i32 %0)
br label %6
6: ; preds = %4, %1
%7 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ out1fmt(char *, char *);
int aboutcmd(int argc, char **argv) {
  out1fmt("CBSD Project. Version %s\n", "13.0.16a");
  return 0;
}


x86 assembly (clang, -O0):
<aboutcmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
lea    0xeed(%rip),%rsi
call   1030 <out1fmt@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"CBSD Project. Version %s\0A\00"
@.str.1 = [9 x i8] c"13.0.16a\00"
define i32 @aboutcmd(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @out1fmt(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"CBSD Project. Version %s\0A\00"
@.str.1 = [9 x i8] c"13.0.16a\00"
define i32 @aboutcmd(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @out1fmt(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_ldhuio(unsigned short *);
void test_ldhuio(unsigned short *p1, unsigned short *p2) {
  __builtin_ldhuio(p1);
  __builtin_ldhuio(p2);
  __builtin_ldhuio(p2 + 1);
  __builtin_ldhuio(p2 + 2);
  __builtin_ldhuio(p2 + 1023);
  __builtin_ldhuio(p2 + 1024);
}


x86 assembly (clang, -O0):
<test_ldhuio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__builtin_ldhuio@plt>
mov    -0x10(%rbp),%rdi
call   1030 <__builtin_ldhuio@plt>
mov    -0x10(%rbp),%rdi
add    $0x2,%rdi
call   1030 <__builtin_ldhuio@plt>
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
call   1030 <__builtin_ldhuio@plt>
mov    -0x10(%rbp),%rdi
add    $0x7fe,%rdi
call   1030 <__builtin_ldhuio@plt>
mov    -0x10(%rbp),%rdi
add    $0x800,%rdi
call   1030 <__builtin_ldhuio@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ldhuio>:
push   %rbx
mov    %rsi,%rbx
call   1030 <__builtin_ldhuio@plt>
mov    %rbx,%rdi
call   1030 <__builtin_ldhuio@plt>
lea    0x2(%rbx),%rdi
call   1030 <__builtin_ldhuio@plt>
lea    0x4(%rbx),%rdi
call   1030 <__builtin_ldhuio@plt>
lea    0x7fe(%rbx),%rdi
call   1030 <__builtin_ldhuio@plt>
add    $0x800,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <__builtin_ldhuio@plt>

LLVM IR (-O0):
define void @test_ldhuio(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
store i16* %0, i16** %3
store i16* %1, i16** %4
%5 = load i16*, i16** %3
%6 = call i32 @__builtin_ldhuio(i16* %5)
%7 = load i16*, i16** %4
%8 = call i32 @__builtin_ldhuio(i16* %7)
%9 = load i16*, i16** %4
%10 = getelementptr inbounds i16, i16* %9, i64 1
%11 = call i32 @__builtin_ldhuio(i16* %10)
%12 = load i16*, i16** %4
%13 = getelementptr inbounds i16, i16* %12, i64 2
%14 = call i32 @__builtin_ldhuio(i16* %13)
%15 = load i16*, i16** %4
%16 = getelementptr inbounds i16, i16* %15, i64 1023
%17 = call i32 @__builtin_ldhuio(i16* %16)
%18 = load i16*, i16** %4
%19 = getelementptr inbounds i16, i16* %18, i64 1024
%20 = call i32 @__builtin_ldhuio(i16* %19)
ret void
}

LLVM IR (-O2):
define void @test_ldhuio(i16* %0, i16* %1) {
%3 = tail call i32 @__builtin_ldhuio(i16* %0)
%4 = tail call i32 @__builtin_ldhuio(i16* %1)
%5 = getelementptr inbounds i16, i16* %1, i64 1
%6 = tail call i32 @__builtin_ldhuio(i16* %5)
%7 = getelementptr inbounds i16, i16* %1, i64 2
%8 = tail call i32 @__builtin_ldhuio(i16* %7)
%9 = getelementptr inbounds i16, i16* %1, i64 1023
%10 = tail call i32 @__builtin_ldhuio(i16* %9)
%11 = getelementptr inbounds i16, i16* %1, i64 1024
%12 = tail call i32 @__builtin_ldhuio(i16* %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vgs2_pallet256(int /*<<< orphan*/);
int vgs2_init() {
  vgs2_pallet256(0);
  return 0;
}


x86 assembly (clang, -O0):
<vgs2_init>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <vgs2_pallet256@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @vgs2_init() {
%1 = call i32 @vgs2_pallet256(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @vgs2_init() {
%1 = tail call i32 @vgs2_pallet256(i32 0)
ret i32 0
}
void gtk_tree_view_column_cell_set_cell_data() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_cell_set_cell_data() {
ret void
}
int test_imm_03int16_reg(short val) {
  return ((val) & (-0x03 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_03int16_reg>:
test   $0xfffd,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_03int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -3
%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_03int16_reg(i16 signext %0) {
%2 = and i16 %0, -3
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_SCMP(void) { DeinitFields(); }


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

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

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

LLVM IR (-O2):
define void @SwitchFrom_SCMP() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
unsigned int shift(unsigned int X, int S) {
  return ((X << S) | (X >> (32 - S)));
}


x86 assembly (clang, -O0):
<shift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift>:
mov    %esi,%ecx
mov    %edi,%eax
rol    %cl,%eax
ret

LLVM IR (-O0):
define i32 @shift(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = lshr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @shift(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = lshr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void useLocal(void) {
  int x = 25;
  printf("\nlocal x in useLocal is %d after entering useLocal\n", x);
  x++;
  printf("local x in useLocal is %d before exiting useLocal\n", x);
}


x86 assembly (clang, -O0):
<useLocal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x19,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xef3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<useLocal>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x19,%esi
call   1030 <printf@plt>
lea    0xf0b(%rip),%rdi
mov    $0x1a,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"\0Alocal x in useLocal is %d after entering useLocal\0A\00"
@.str.1 = [51 x i8] c"local x in useLocal is %d before exiting useLocal\0A\00"
define void @useLocal() {
%1 = alloca i32
store i32 25, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"\0Alocal x in useLocal is %d after entering useLocal\0A\00"
@.str.1 = [51 x i8] c"local x in useLocal is %d before exiting useLocal\0A\00"
define void @useLocal() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 25)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i32 26)
ret void
}
float my_test_f() { return 0.0f; }


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

x86 assembly (clang, -O2):
<my_test_f>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @my_test_f() {
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @my_test_f() {
ret float 0.000000e+00
}
/* Variables and functions */
int SumDivisibleBy(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d\n", SumDivisibleBy(3) + SumDivisibleBy(5) - SumDivisibleBy(15));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
call   1040 <SumDivisibleBy@plt>
mov    %eax,-0xc(%rbp)
mov    $0x5,%edi
call   1040 <SumDivisibleBy@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0xf,%edi
call   1040 <SumDivisibleBy@plt>
mov    -0x8(%rbp),%esi
sub    %eax,%esi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3,%edi
call   1040 <SumDivisibleBy@plt>
mov    %eax,%ebx
mov    $0x5,%edi
call   1040 <SumDivisibleBy@plt>
add    %eax,%ebx
mov    $0xf,%edi
call   1040 <SumDivisibleBy@plt>
sub    %eax,%ebx
lea    0xeb4(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @SumDivisibleBy(i32 3)
%3 = call i32 @SumDivisibleBy(i32 5)
%4 = add nsw i32 %2, %3
%5 = call i32 @SumDivisibleBy(i32 15)
%6 = sub nsw i32 %4, %5
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @SumDivisibleBy(i32 3)
%2 = tail call i32 @SumDivisibleBy(i32 5)
%3 = add nsw i32 %2, %1
%4 = tail call i32 @SumDivisibleBy(i32 15)
%5 = sub i32 %3, %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, unsigned int);
int strlen(char *);
char *strncat(char *dst, char *src, unsigned int n) {
  memcpy((dst + strlen(dst)), src, n);
  return dst;
}


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

x86 assembly (clang, -O2):
<strncat>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1040 <memcpy@plt>
mov    %rbp,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @strncat(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** %4
%9 = call i32 @strlen(i8* %8)
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %7, i64 %10
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 @memcpy(i8* %11, i8* %12, i32 %13)
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
define i8* @strncat(i8* returned %0, i8* %1, i32 %2) {
%4 = tail call i32 @strlen(i8* %0)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = tail call i32 @memcpy(i8* %6, i8* %1, i32 %2)
ret i8* %0
}
/* Variables and functions */
char *strrchr(char *, char);
char *base_name(char *path) {
  char *base = strrchr(path, '/');
  return base ? (base + 1) : path;
}


x86 assembly (clang, -O0):
<base_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <base_name+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <base_name+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<base_name>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @base_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %13
11: ; preds = %1
%12 = load i8*, i8** %2
br label %13
13: ; preds = %11, %8
%14 = phi i8* [ %10, %8 ], [ %12, %11 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @base_name(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
void PACER_TIMER_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @PACER_TIMER_SaveConfig() {
ret void
}
void memset0(char *m, long len) {
  char *t;
  t = m + len;
  while (m < t) {
    *m = (char)0;
    m = m + 1;
  }
  return;
}


x86 assembly (clang, -O0):
<memset0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    113e <memset0+0x3e>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1118 <memset0+0x18>
pop    %rbp
ret

x86 assembly (clang, -O2):
<memset0>:
test   %rsi,%rsi
jle    1135 <memset0+0x25>
push   %rax
mov    %rsi,%rdx
add    %rdi,%rdx
lea    0x1(%rdi),%rax
cmp    %rax,%rdx
cmovbe %rax,%rdx
sub    %rdi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @memset0(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = getelementptr inbounds i8, i8* %6, i64 %7
store i8* %8, i8** %5
br label %9
9: ; preds = %13, %2
%10 = load i8*, i8** %3
%11 = load i8*, i8** %5
%12 = icmp ult i8* %10, %11
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load i8*, i8** %3
store i8 0, i8* %14
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8* %16, i8** %3
br label %9
17: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @memset0(i8* writeonly %0, i64 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = icmp sgt i64 %1, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = add i64 %3, %1
%7 = add i64 %3, 1
%8 = call i64 @llvm.umax.i64(i64 %6, i64 %7)
%9 = sub i64 %8, %3
br label %10
10: ; preds = %5, %2
ret void
}
/* Variables and functions */
char *__fconv(int /*<<< orphan*/);
int /*<<< orphan*/ concat(char *, char const *, char *);
__attribute__((unused)) char *fconv(char *catbuff, const char *a) {
  return __fconv(concat(catbuff, a, ""));
}


x86 assembly (clang, -O0):
<fconv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xec1(%rip),%rdx
call   1030 <concat@plt>
mov    %eax,%edi
call   1040 <__fconv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fconv>:
push   %rax
lea    0xed8(%rip),%rdx
call   1030 <concat@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <__fconv@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @fconv(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @concat(i8* %5, i8* %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%8 = call i8* @__fconv(i32 %7)
ret i8* %8
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @fconv(i8* %0, i8* %1) {
%3 = tail call i32 @concat(i8* %0, i8* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = tail call i8* @__fconv(i32 %3)
ret i8* %4
}
/* Variables and functions */
size_t round_up(size_t bytes) { return ((bytes + 8 - 1) & ~(8 - 1)); }


x86 assembly (clang, -O0):
<round_up>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
sub    $0x1,%rax
and    $0xfffffffffffffff8,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_up>:
lea    0x7(%rdi),%rax
and    $0xfffffffffffffff8,%rax
ret

LLVM IR (-O0):
define i64 @round_up(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 8
%5 = sub i64 %4, 1
%6 = and i64 %5, -8
ret i64 %6
}

LLVM IR (-O2):
define i64 @round_up(i64 %0) {
%2 = add i64 %0, 7
%3 = and i64 %2, -8
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_nest_lock_t;

/* Variables and functions */
void c_pomp_destroy_nest_lock_(omp_nest_lock_t *s) { (void)0; }


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

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

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

LLVM IR (-O2):
define void @c_pomp_destroy_nest_lock_(i32* nocapture %0) {
ret void
}
int foo(int a) { return (!a & 1) != (a == 0); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
and    $0x1,%eax
cmpl   $0x0,-0x4(%rbp)
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
%7 = and i32 %6, 1
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
%11 = icmp ne i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 0
}
int egcd(int a, int b) {
  int rem;
  while (b != 0) {
    rem = a % b;
    a = b;
    b = rem;
  }
  return a;
}


x86 assembly (clang, -O0):
<egcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <egcd+0x2f>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <egcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<egcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <egcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <egcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @egcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ process_arg(int, char const **);
int /*<<< orphan*/ scm_deinit();
int /*<<< orphan*/ scm_init();
int main(int argc, const char *argv[]) {
  scm_init();
  process_arg(argc, argv);
  scm_deinit();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <scm_init@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <process_arg@plt>
mov    $0x0,%al
call   1030 <scm_deinit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <scm_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <process_arg@plt>
xor    %eax,%eax
call   1030 <scm_deinit@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @scm_init()
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @process_arg(i32 %7, i8** %8)
%10 = call i32 (...) @scm_deinit()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @scm_init()
%4 = tail call i32 @process_arg(i32 %0, i8** %1)
%5 = tail call i32 (...) @scm_deinit()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ a();
int /*<<< orphan*/ r();
void warn_goto1(void) {
  a();
  goto label;
  r();
label:;
}


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

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

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

LLVM IR (-O2):
define void @warn_goto1() {
%1 = tail call i32 (...) @a()
ret void
}
void StubRf_Strobe(void) {}


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

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

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

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


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

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

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

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

/* Variables and functions */
uint32_t TimerLoadGet(uint32_t ui32Base, uint32_t ui32Timer) {
  ;
  ;
  return ((ui32Timer == 0x000000FF)
              ? (*((volatile unsigned long *)(ui32Base + 0x00000028)))
              : (*((volatile unsigned long *)(ui32Base + 0x0000002C))));
}


x86 assembly (clang, -O0):
<TimerLoadGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jne    112b <TimerLoadGet+0x2b>
mov    -0x4(%rbp),%eax
add    $0x28,%eax
cltq
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
jmp    113a <TimerLoadGet+0x3a>
mov    -0x4(%rbp),%eax
add    $0x2c,%eax
cltq
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerLoadGet>:
xor    %eax,%eax
cmp    $0xff,%esi
setne  %al
lea    0x28(,%rax,4),%eax
movslq %edi,%rcx
mov    (%rax,%rcx,1),%rax
ret

LLVM IR (-O0):
define i32 @TimerLoadGet(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
%6 = icmp eq i32 %5, 255
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 40
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
br label %19
13: ; preds = %2
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 44
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i64*
%18 = load volatile i64, i64* %17
br label %19
19: ; preds = %13, %7
%20 = phi i64 [ %12, %7 ], [ %18, %13 ]
%21 = trunc i64 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @TimerLoadGet(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 255
%4 = select i1 %3, i32 40, i32 44
%5 = add nsw i32 %4, %0
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = trunc i64 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
void rpgp_skip_nonspaces(char **p) {
  while (!isspace(**p)) {
    (*p)++;
  }
}


x86 assembly (clang, -O0):
<rpgp_skip_nonspaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1140 <rpgp_skip_nonspaces+0x30>
jmp    1153 <rpgp_skip_nonspaces+0x43>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    111c <rpgp_skip_nonspaces+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpgp_skip_nonspaces>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
movsbl (%rax),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <isspace@plt>
test   %eax,%eax
jne    1139 <rpgp_skip_nonspaces+0x29>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movsbl 0x1(%rax),%edi
jmp    1120 <rpgp_skip_nonspaces+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @rpgp_skip_nonspaces(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
br label %3
3: ; preds = %10, %1
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = call i32 @isspace(i8 signext %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i8**, i8*** %2
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %11
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @rpgp_skip_nonspaces(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = tail call i32 @isspace(i8 signext %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1, %6
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
%9 = load i8, i8* %8
%10 = tail call i32 @isspace(i8 signext %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %6, label %12
12: ; preds = %6, %1
ret void
}
void pathcon_nm8_incref(void) {}


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

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

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

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