xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
void sprint_reti(char *str) {
  sprintf(str, "RETI                            ");
}


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

x86 assembly (clang, -O2):
<sprint_reti>:
movups 0xf09(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movups 0xeee(%rip),%xmm0
movups %xmm0,(%rdi)
movb   $0x0,0x20(%rdi)
ret

LLVM IR (-O0):
@.str = [33 x i8] c"RETI \00"
define void @sprint_reti(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"RETI \00"
define void @sprint_reti(i8* nocapture writeonly %0) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(33) %0, i8* align 1 dereferenceable(33) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 33, i1 false)
ret void
}
void I422ToRGB565Row_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @I422ToRGB565Row_Any_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ opt_show_help();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ show_banner();
void show_help() {
  show_banner();
  printf("%% dupd operation options\n");
  printf("\n");
  opt_show_help();
}


x86 assembly (clang, -O0):
<show_help>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <show_banner@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <opt_show_help@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_help>:
push   %rax
xor    %eax,%eax
call   1060 <show_banner@plt>
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <opt_show_help@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"%% dupd operation options\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @show_help() {
%1 = call i32 (...) @show_banner()
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @opt_show_help()
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"%% dupd operation options\0A\00"
define void @show_help() {
%1 = tail call i32 (...) @show_banner()
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 (...) @opt_show_help()
ret void
}
int toInt(float fractional) { return (int)(fractional + 0.5f); }


x86 assembly (clang, -O0):
<toInt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toInt>:
addss  0xef8(%rip),%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @toInt(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fadd float %3, 5.000000e-01
%5 = fptosi float %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @toInt(float %0) {
%2 = fadd float %0, 5.000000e-01
%3 = fptosi float %2 to i32
ret i32 %3
}
/* Variables and functions */
int powi(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int x, n;
  printf("Enter the values for X and N:\n");
  scanf("%d %d", &x, &n);
  printf("%d^%d is %d", x, n, powi(x, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <powi@plt>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    %eax,%ecx
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeaa(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1060 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    (%rsp),%ebp
mov    %ebx,%edi
mov    %ebp,%esi
call   1050 <powi@plt>
lea    0xe8c(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Enter the values for X and N:\0A\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [12 x i8] c"%d^%d is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @powi(i32 %8, i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [12 x i8] c"%d^%d is %d\00"
@str = [30 x i8] c"Enter the values for X and N:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @powi(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/ *);
void write_line(FILE *out, const char *line, const char *blank_tag) {
  if (line[0] == '\0' && blank_tag)
    fputs(blank_tag, out);
  else
    fputs(line, out);
  fputc('\n', out);
  return;
}


x86 assembly (clang, -O0):
<write_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1161 <write_line+0x41>
cmpq   $0x0,-0x18(%rbp)
je     1161 <write_line+0x41>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <fputs@plt>
jmp    116e <write_line+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rsi
mov    $0xa,%edi
call   1040 <fputc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_line>:
push   %rbx
cmpb   $0x0,(%rsi)
mov    %rsi,%rax
cmove  %rdx,%rax
mov    %rdi,%rbx
test   %rdx,%rdx
cmove  %rsi,%rax
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <fputs@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <fputc@plt>

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

LLVM IR (-O2):
define void @write_line(i32* nocapture %0, i8* nocapture %1, i8* %2) {
%4 = load i8, i8* %1
%5 = icmp eq i8 %4, 0
%6 = icmp ne i8* %2, null
%7 = and i1 %6, %5
%8 = select i1 %7, i8* %2, i8* %1
%9 = tail call i32 @fputs(i8* %8, i32* %0)
%10 = tail call i32 @fputc(i8 signext 10, i32* %0)
ret void
}
long VMM_IS_ERR_OR_NULL(const void *ptr) {
  return !ptr || ((unsigned long)((unsigned long)ptr) <= (unsigned long)4095);
}


x86 assembly (clang, -O0):
<VMM_IS_ERR_OR_NULL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1128 <VMM_IS_ERR_OR_NULL+0x28>
mov    -0x8(%rbp),%rax
cmp    $0xfff,%rax
setbe  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<VMM_IS_ERR_OR_NULL>:
xor    %eax,%eax
cmp    $0x1000,%rdi
setb   %al
ret

LLVM IR (-O0):
define i64 @VMM_IS_ERR_OR_NULL(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = ptrtoint i8* %6 to i64
%8 = icmp ule i64 %7, 4095
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ true, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
%12 = sext i32 %11 to i64
ret i64 %12
}

LLVM IR (-O2):
define i64 @VMM_IS_ERR_OR_NULL(i8* readnone %0) {
%2 = icmp ult i8* %0, inttoptr (i64 4096 to i8*)
%3 = zext i1 %2 to i64
ret i64 %3
}
unsigned int choice(unsigned int x, unsigned int y, unsigned int z) {
  return (x & y) ^ (~x & z);
}


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

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

LLVM IR (-O0):
define i32 @choice(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = and i32 %7, %8
%10 = load i32, i32* %4
%11 = xor i32 %10, -1
%12 = load i32, i32* %6
%13 = and i32 %11, %12
%14 = xor i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @choice(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, %0
%5 = xor i32 %0, -1
%6 = and i32 %5, %2
%7 = or i32 %6, %4
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_pointer(void **p) {
  if (*p) {
    free(*p);
    *p = NULL;
  }
}


x86 assembly (clang, -O0):
<free_pointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1141 <free_pointer+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_pointer>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1128 <free_pointer+0x18>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @free_pointer(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8**, i8*** %2
%8 = load i8*, i8** %7
%9 = call i32 @free(i8* %8)
%10 = load i8**, i8*** %2
store i8* null, i8** %10
br label %11
11: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @free_pointer(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(i8* %2)
store i8* null, i8** %0
br label %6
6: ; preds = %4, %1
ret void
}
long test_lroundl(long double x) { return __builtin_lroundl(x); }


x86 assembly (clang, -O0):
<test_lroundl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <lroundl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_lroundl>:
jmp    1030 <lroundl@plt>

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

LLVM IR (-O2):
define i64 @test_lroundl(x86_fp80 %0) {
%2 = tail call i64 @lroundl(x86_fp80 %0)
ret i64 %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t mpga_get_mode(const uint8_t *p_mpga) { return (p_mpga[3] & 0xc0) >> 6; }


x86 assembly (clang, -O0):
<mpga_get_mode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
and    $0xc0,%eax
sar    $0x6,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpga_get_mode>:
mov    0xc(%rdi),%eax
shr    $0x6,%eax
and    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @mpga_get_mode(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
%4 = lshr i32 %3, 6
%5 = and i32 %4, 3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __NR_getrandom;
int syscall(int /*<<< orphan*/, void *, size_t, unsigned int);
int f_getrandom(void *buf, size_t buflen, unsigned int flags) {
  return syscall(__NR_getrandom, buf, buflen, flags);
}


x86 assembly (clang, -O0):
<f_getrandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_getrandom>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@__NR_getrandom = global i32 0
define i32 @f_getrandom(i8* %0, i64 %1, i32 %2) {
%4 = load i32, i32* @__NR_getrandom
%5 = tail call i32 @syscall(i32 %4, i8* %0, i64 %1, i32 %2)
ret i32 %5
}
int valueset_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @valueset_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putc(int, int /*<<< orphan*/);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
void charatatime(char *str) {
  char *ptr;
  int c;
  setbuf(stdout, NULL);
  for (ptr = str; (c = *ptr++) != 0;) {
    putc(c, stdout);
  }
}


x86 assembly (clang, -O0):
<charatatime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     117a <charatatime+0x5a>
mov    -0x14(%rbp),%edi
mov    0x2e72(%rip),%rax
mov    (%rax),%esi
call   1040 <putc@plt>
jmp    1146 <charatatime+0x26>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<charatatime>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
xor    %esi,%esi
call   1030 <setbuf@plt>
mov    (%rbx),%al
test   %al,%al
je     1166 <charatatime+0x46>
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
mov    (%r14),%esi
call   1040 <putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1150 <charatatime+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @charatatime(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i32, i32* @stdout
%6 = call i32 @setbuf(i32 %5, i32* null)
%7 = load i8*, i8** %2
store i8* %7, i8** %3
br label %8
8: ; preds = %14, %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %3
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
store i32 %12, i32* %4
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %8
%15 = load i32, i32* %4
%16 = load i32, i32* @stdout
%17 = call i32 @putc(i32 %15, i32 %16)
br label %8
18: ; preds = %8
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @charatatime(i8* nocapture %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @setbuf(i32 %2, i32* null)
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %1, %6
%7 = phi i8 [ %13, %6 ], [ %4, %1 ]
%8 = phi i8* [ %10, %6 ], [ %0, %1 ]
%9 = sext i8 %7 to i32
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i32, i32* @stdout
%12 = tail call i32 @putc(i32 %9, i32 %11)
%13 = load i8, i8* %10
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(int /*<<< orphan*/ *);
char **realloc(char **, size_t);
void resize_list(char ***list, size_t *listsize) {
  char **temp;
  *listsize *= 2;
  if (temp = realloc(*list, (*listsize) * sizeof(char *))) {
    *list = temp;
  } else {
    perror(NULL);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<resize_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
shl    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
shl    $0x3,%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1183 <resize_list+0x53>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1196 <resize_list+0x66>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resize_list>:
push   %rbx
mov    %rdi,%rbx
mov    (%rsi),%rax
lea    (%rax,%rax,1),%rcx
mov    %rcx,(%rsi)
mov    (%rdi),%rdi
shl    $0x4,%rax
mov    %rax,%rsi
call   1030 <realloc@plt>
test   %rax,%rax
je     1157 <resize_list+0x27>
mov    %rax,(%rbx)
pop    %rbx
ret
xor    %edi,%edi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @resize_list(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 i64*, i64** %4
%7 = load i64, i64* %6
%8 = mul i64 %7, 2
store i64 %8, i64* %6
%9 = load i8***, i8**** %3
%10 = load i8**, i8*** %9
%11 = load i64*, i64** %4
%12 = load i64, i64* %11
%13 = mul i64 %12, 8
%14 = call i8** @realloc(i8** %10, i64 %13)
store i8** %14, i8*** %5
%15 = icmp ne i8** %14, null
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = load i8***, i8**** %3
store i8** %17, i8*** %18
br label %22
19: ; preds = %2
%20 = call i32 @perror(i32* null)
%21 = call i32 @exit(i32 1)
unreachable
22: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @resize_list(i8*** nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = shl i64 %3, 1
store i64 %4, i64* %1
%5 = load i8**, i8*** %0
%6 = shl i64 %3, 4
%7 = tail call i8** @realloc(i8** %5, i64 %6)
%8 = icmp eq i8** %7, null
br i1 %8, label %10, label %9
9: ; preds = %2
store i8** %7, i8*** %0
ret void
10: ; preds = %2
%11 = tail call i32 @perror(i32* null)
%12 = tail call i32 @exit(i32 1)
unreachable
}
int test_imm_A3uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xA3 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_A3uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 700079669248
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
size_t wcslen(int /*<<< orphan*/ *);
size_t dvm_wcslen(wchar_t *str) { return wcslen(str); }


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

x86 assembly (clang, -O2):
<dvm_wcslen>:
jmp    1030 <wcslen@plt>

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

LLVM IR (-O2):
define i64 @dvm_wcslen(i32* nocapture %0) {
%2 = tail call i64 @wcslen(i32* %0)
ret i64 %2
}
/* Type definitions */
struct pool {
  int dummy;
};

/* Variables and functions */
int pool_append_str(struct pool *, int, char *);
int pool_append_char(struct pool *p, int h, char c) {
  char buf[2];
  buf[0] = c;
  buf[1] = 0;
  return pool_append_str(p, h, buf);
}


x86 assembly (clang, -O0):
<pool_append_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
mov    %al,-0xf(%rbp)
movb   $0x0,-0xe(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0xf(%rbp),%rdx
call   1030 <pool_append_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pool_append_char>:
push   %rax
mov    %dl,0x6(%rsp)
movb   $0x0,0x7(%rsp)
lea    0x6(%rsp),%rdx
call   1030 <pool_append_str@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.pool = type { i32 }
define i32 @pool_append_char(%struct.pool* %0, i32 %1, i8 signext %2) {
%4 = alloca %struct.pool*
%5 = alloca i32
%6 = alloca i8
%7 = alloca [2 x i8]
store %struct.pool* %0, %struct.pool** %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%8 = load i8, i8* %6
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
store i8 %8, i8* %9
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 1
store i8 0, i8* %10
%11 = load %struct.pool*, %struct.pool** %4
%12 = load i32, i32* %5
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%14 = call i32 @pool_append_str(%struct.pool* %11, i32 %12, i8* %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.pool = type { i32 }
define i32 @pool_append_char(%struct.pool* %0, i32 %1, i8 signext %2) {
%4 = alloca [2 x i8]
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
store i8 %2, i8* %5
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 1
store i8 0, i8* %6
%7 = call i32 @pool_append_str(%struct.pool* %0, i32 %1, i8* %5)
ret i32 %7
}
XSetBackground() {}


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

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

LLVM IR (-O0):
define i32 @XSetBackground() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XSetBackground() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help(void) {
  printf("Standard targets: DROP, ACCEPT, RETURN or CONTINUE;\n"
         "The target can also be a user defined chain.\n");
}


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

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

LLVM IR (-O0):
@.str = [98 x i8] c"Standard targets: DROP, ACCEPT, RETURN or CONTINUE;\0AThe target can also be a user defined chain.\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [97 x i8] c"Standard targets: DROP, ACCEPT, RETURN or CONTINUE;\0AThe target can also be a user defined chain.\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @str, i64 0, i64 0))
ret void
}
void path_025_expected_5(int a, int b, int c) {
  switch (a) {
  case 0: {
    if (b) {
    }
    if (c) {
    }
    break;
  }
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<path_025_expected_5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
test   %eax,%eax
jne    1140 <path_025_expected_5+0x40>
jmp    111d <path_025_expected_5+0x1d>
cmpl   $0x0,-0x8(%rbp)
je     112c <path_025_expected_5+0x2c>
jmp    112c <path_025_expected_5+0x2c>
cmpl   $0x0,-0xc(%rbp)
je     113b <path_025_expected_5+0x3b>
jmp    113b <path_025_expected_5+0x3b>
jmp    1145 <path_025_expected_5+0x45>
jmp    1145 <path_025_expected_5+0x45>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @path_025_expected_5(i32 %0, i32 %1, i32 %2) {
ret void
}
int main() {
  int i;
  int a;
  int x = 1;
  for (i = 0; i < 1000000000; i++) {
    x = x << 2;
    x = x << 6;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3b9aca00,-0x8(%rbp)
jge    1146 <main+0x46>
mov    -0x10(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x6,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
long c(void) { return 'c'; }


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

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

LLVM IR (-O0):
define i64 @c() {
ret i64 99
}

LLVM IR (-O2):
define i64 @c() {
ret i64 99
}
int blur_init() { return 1; }


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

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

LLVM IR (-O0):
define i32 @blur_init() {
ret i32 1
}

LLVM IR (-O2):
define i32 @blur_init() {
ret i32 1
}
int st_numhash(x, size)
char *x;
int size;
{ return ((((int)x) < 0 ? -((int)x) : ((int)x)) % (size)); }


x86 assembly (clang, -O0):
<st_numhash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x0,%eax
jge    112a <st_numhash+0x2a>
mov    -0x8(%rbp),%rax
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    1131 <st_numhash+0x31>
mov    -0x8(%rbp),%rax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<st_numhash>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @st_numhash(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 = ptrtoint i8* %5 to i32
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = ptrtoint i8* %9 to i32
%11 = sub nsw i32 0, %10
br label %15
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = ptrtoint i8* %13 to i32
br label %15
15: ; preds = %12, %8
%16 = phi i32 [ %11, %8 ], [ %14, %12 ]
%17 = load i32, i32* %4
%18 = srem i32 %16, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @st_numhash(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @llvm.abs.i32(i32 %4, i1 true)
%6 = srem i32 %5, %1
ret i32 %6
}
int dlclose(handle) void *handle;
{ return -1; }


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

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

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

LLVM IR (-O2):
define i32 @dlclose(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void fldl2t() {
  db(0xD9);
  db(0xE9);
}


x86 assembly (clang, -O0):
<fldl2t>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xe9,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fldl2t>:
push   %rax
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xe9,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @fldl2t() {
%1 = call i32 @db(i32 217)
%2 = call i32 @db(i32 233)
ret void
}

LLVM IR (-O2):
define void @fldl2t() {
%1 = tail call i32 @db(i32 217)
%2 = tail call i32 @db(i32 233)
ret void
}
long long uuuz() { return 0x7fff7fff7fff0000LL; }


x86 assembly (clang, -O0):
<uuuz>:
push   %rbp
mov    %rsp,%rbp
movabs $0x7fff7fff7fff0000,%rax
7f ff 7f
pop    %rbp
ret

x86 assembly (clang, -O2):
<uuuz>:
movabs $0x7fff7fff7fff0000,%rax
7f ff 7f
ret

LLVM IR (-O0):
define i64 @uuuz() {
ret i64 9223231297218871296
}

LLVM IR (-O2):
define i64 @uuuz() {
ret i64 9223231297218871296
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char);
int show_selection_b(void) {
  printf("%s%c\n", "Select menu item ", 'B');
  return (0);
}


x86 assembly (clang, -O0):
<show_selection_b>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee4(%rip),%rsi
mov    $0x42,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_selection_b>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee7(%rip),%rsi
mov    $0x42,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s%c\0A\00"
@.str.1 = [18 x i8] c"Select menu item \00"
define i32 @show_selection_b() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8 signext 66)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s%c\0A\00"
@.str.1 = [18 x i8] c"Select menu item \00"
define i32 @show_selection_b() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8 signext 66)
ret i32 0
}
int charCount(char c, char *s) {
  int i = 0;
  int count = 0;
  while (s[i] != 0) {
    if (s[i] == c)
      count++;
    i++;
  }
  return count;
}


x86 assembly (clang, -O0):
<charCount>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1160 <charCount+0x60>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x1(%rbp),%ecx
cmp    %ecx,%eax
jne    1152 <charCount+0x52>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111c <charCount+0x1c>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charCount>:
mov    (%rsi),%cl
test   %cl,%cl
je     1126 <charCount+0x26>
add    $0x1,%rsi
xor    %eax,%eax
nopl   0x0(%rax)
xor    %edx,%edx
cmp    %dil,%cl
sete   %dl
add    %edx,%eax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <charCount+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @charCount(i8 signext %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %12, %5 ], [ 0, %2 ]
%7 = phi i8 [ %14, %5 ], [ %3, %2 ]
%8 = phi i32 [ %11, %5 ], [ 0, %2 ]
%9 = icmp eq i8 %7, %0
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %8, %10
%12 = add nuw nsw i64 %6, 1
%13 = getelementptr inbounds i8, i8* %1, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %2
%17 = phi i32 [ 0, %2 ], [ %11, %5 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void nr_free_vector(float *v, long nl, long nh) { free((char *)(v + nl - 1)); }


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

x86 assembly (clang, -O2):
<nr_free_vector>:
lea    (%rdi,%rsi,4),%rdi
add    $0xfffffffffffffffc,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @nr_free_vector(float* %0, i64 %1, i64 %2) {
%4 = alloca float*
%5 = alloca i64
%6 = alloca i64
store float* %0, float** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load float*, float** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds float, float* %7, i64 %8
%10 = getelementptr inbounds float, float* %9, i64 -1
%11 = bitcast float* %10 to i8*
%12 = call i32 @free(i8* %11)
ret void
}

LLVM IR (-O2):
define void @nr_free_vector(float* nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds float, float* %0, i64 %1
%5 = getelementptr inbounds float, float* %4, i64 -1
%6 = bitcast float* %5 to i8*
%7 = tail call i32 @free(i8* %6)
ret void
}
int test_imm_5Buint8_reg(unsigned char val) {
  return ((val) & (-0x5B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Buint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffffa5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_5Buint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -91
%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_5Buint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -91
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void swap(int *a, int *b) {
  int aux = *a;
  *a = *b;
  *b = aux;
}


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

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

LLVM IR (-O0):
define void @swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int chmod(char *, int);
int md_chmod(char *filename, int mode) { return (chmod(filename, mode)); }


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

x86 assembly (clang, -O2):
<md_chmod>:
jmp    1030 <chmod@plt>

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

LLVM IR (-O2):
define i32 @md_chmod(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @chmod(i8* %0, i32 %1)
ret i32 %3
}
int tosInt32_sub(int x, int y) { return x - y; }


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

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

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

LLVM IR (-O2):
define i32 @tosInt32_sub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ *freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ quit(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
void openfile(char *file) {
  if (freopen(file, "r", stdin) == NULL) {
    fprintf(stderr, "sed: can't open %s\n", file);
    quit(1);
  }
}


x86 assembly (clang, -O0):
<openfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
lea    0xeb0(%rip),%rsi
call   1040 <freopen@plt>
cmp    $0x0,%rax
jne    1182 <openfile+0x52>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe8f(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1030 <quit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openfile>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ead(%rip),%rax
mov    (%rax),%edx
lea    0xebc(%rip),%rsi
call   1040 <freopen@plt>
test   %rax,%rax
je     1150 <openfile+0x20>
pop    %rbx
ret
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
lea    0xea2(%rip),%rsi
mov    %rbx,%rdx
call   1050 <fprintf@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1030 <quit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@stdin = global i32 0
@stderr = global i32 0
@.str.1 = [20 x i8] c"sed: can't open %s\0A\00"
define void @openfile(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stdin
%5 = call i32* @freopen(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %2
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = call i32 @quit(i32 1)
br label %12
12: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@stdin = global i32 0
@stderr = global i32 0
@.str.1 = [20 x i8] c"sed: can't open %s\0A\00"
define void @openfile(i8* %0) {
%2 = load i32, i32* @stdin
%3 = tail call i32* @freopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%8 = tail call i32 @quit(i32 1)
br label %9
9: ; preds = %5, %1
ret void
}
int idx_write_entry() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @idx_write_entry() {
ret i32 0
}
/* Variables and functions */
scalar_t__ any(char, char *);
int is_op(char c) {
  if (any(c, "+-*/&%|^"))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<is_op>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
lea    0xedb(%rip),%rsi
movsbl -0x5(%rbp),%edi
call   1030 <any@plt>
cmp    $0x0,%rax
je     1144 <is_op+0x34>
movl   $0x1,-0x4(%rbp)
jmp    114b <is_op+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_op>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <any@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"+-*/&%|^\00"
define i32 @is_op(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @any(i8 signext %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [9 x i8] c"+-*/&%|^\00"
define i32 @is_op(i8 signext %0) {
%2 = tail call i64 @any(i8 signext %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void mobicore_log_read(void) {}


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

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

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

LLVM IR (-O2):
define void @mobicore_log_read() {
ret void
}
/* Variables and functions */
int set42(int *);
void nodpd() {
  int w, z;
  z = set42(&w);
}


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

x86 assembly (clang, -O2):
<nodpd>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <set42@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @nodpd() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @set42(i32* %1)
store i32 %3, i32* %2
ret void
}

LLVM IR (-O2):
define void @nodpd() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @set42(i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ free_clients();
int /*<<< orphan*/ free_servers();
int /*<<< orphan*/ stderr;
void signal_handler(int signum) {
  fprintf(stderr, "signal cought: %d\n", signum);
  free_servers();
  free_clients();
  exit(0);
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xea2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <free_servers@plt>
mov    $0x0,%al
call   1050 <free_clients@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<signal_handler>:
push   %rax
mov    %edi,%edx
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
lea    0xead(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
call   1040 <free_servers@plt>
xor    %eax,%eax
call   1050 <free_clients@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"signal cought: %d\0A\00"
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @free_servers()
%7 = call i32 (...) @free_clients()
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"signal cought: %d\0A\00"
define void @signal_handler(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 (...) @free_servers()
%5 = tail call i32 (...) @free_clients()
%6 = tail call i32 @exit(i32 0)
unreachable
}
void fc271(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
a:
  goto a;
  0;
}


x86 assembly (clang, -O0):
<fc271>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc271+0x7>

x86 assembly (clang, -O2):
<fc271>:
jmp    1100 <fc271>

LLVM IR (-O0):
define void @fc271(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %1
br label %21
}

LLVM IR (-O2):
define void @fc271(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}