xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ bswap32(int /*<<< orphan*/);
void set32(char *addr, uint32_t val, bool swap) {
  if (swap)
    val = bswap32(val);
  *(uint32_t *)addr = val;
}


x86 assembly (clang, -O0):
<set32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1137 <set32+0x27>
mov    -0xc(%rbp),%edi
call   1030 <bswap32@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set32>:
push   %rbx
mov    %rdi,%rbx
test   %edx,%edx
je     1121 <set32+0x11>
mov    %esi,%edi
call   1030 <bswap32@plt>
mov    %eax,%esi
mov    %esi,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @set32(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @bswap32(i32 %1)
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ %6, %5 ], [ %1, %3 ]
%9 = bitcast i8* %0 to i32*
store i32 %8, i32* %9
ret void
}
/* Variables and functions */
double __ieee754_yn(int, double);
double yn(int n, double x) { return __ieee754_yn(n, x); }


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

x86 assembly (clang, -O2):
<yn>:
jmp    1030 <__ieee754_yn@plt>

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

LLVM IR (-O2):
define double @yn(i32 %0, double %1) {
%3 = tail call double @__ieee754_yn(i32 %0, double %1)
ret double %3
}
void setpwent(void) { anvil_syslog(0, "%s unimplemented\n", __FUNCTION__); }


x86 assembly (clang, -O0):
<setpwent>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
lea    0xeee(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setpwent>:
lea    0xee9(%rip),%rsi
lea    0xef4(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <anvil_syslog@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.setpwent = [9 x i8] c"setpwent\00"
define void @setpwent() {
%1 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.setpwent, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.setpwent = [9 x i8] c"setpwent\00"
define void @setpwent() {
%1 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.setpwent, i64 0, i64 0))
ret void
}
int d(int a, int b) { return 0; }


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

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

LLVM IR (-O0):
define i32 @d(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @d(i32 %0, i32 %1) {
ret i32 0
}
int mibb(int a) {
  if (a < 5 && a > 3)
    return 0;
  return a - 1;
}


x86 assembly (clang, -O0):
<mibb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1127 <mibb+0x27>
cmpl   $0x3,-0x8(%rbp)
jle    1127 <mibb+0x27>
movl   $0x0,-0x4(%rbp)
jmp    1130 <mibb+0x30>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mibb>:
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
cmp    $0x4,%edi
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @mibb(i32 %0) {
%2 = icmp eq i32 %0, 4
%3 = add nsw i32 %0, -1
%4 = select i1 %2, i32 0, i32 %3
ret i32 %4
}
/* Variables and functions */
char *mkstr(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *cpstr(const char *s) { return mkstr(s, strlen(s)); }


x86 assembly (clang, -O0):
<cpstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <mkstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpstr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <mkstr@plt>

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

LLVM IR (-O2):
define i8* @cpstr(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @mkstr(i8* %0, i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ core1_swap(char *, int);
void U_EMRPOLYLINETO_swap(char *record, int torev) {
  core1_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_EMRPOLYLINETO_swap>:
jmp    1030 <core1_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRPOLYLINETO_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core1_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(unsigned char, unsigned char *);
void SensorGetReg_SP80818(unsigned char uAddr, unsigned short *uVal) {
  VIM_SIF_I2cReadByte((unsigned char)uAddr, (unsigned char *)uVal);
}


x86 assembly (clang, -O0):
<SensorGetReg_SP80818>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorGetReg_SP80818>:
jmp    1030 <VIM_SIF_I2cReadByte@plt>

LLVM IR (-O0):
define void @SensorGetReg_SP80818(i8 zeroext %0, i16* %1) {
%3 = alloca i8
%4 = alloca i16*
store i8 %0, i8* %3
store i16* %1, i16** %4
%5 = load i8, i8* %3
%6 = load i16*, i16** %4
%7 = bitcast i16* %6 to i8*
%8 = call i32 @VIM_SIF_I2cReadByte(i8 zeroext %5, i8* %7)
ret void
}

LLVM IR (-O2):
define void @SensorGetReg_SP80818(i8 zeroext %0, i16* %1) {
%3 = bitcast i16* %1 to i8*
%4 = tail call i32 @VIM_SIF_I2cReadByte(i8 zeroext %0, i8* %3)
ret void
}
int __ompc_task_true_cond() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @__ompc_task_true_cond() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ get_file(char *);
int /*<<< orphan*/ print_quotes(int /*<<< orphan*/);
int main() {
  print_quotes(get_file("index.html"));
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <get_file@plt>
mov    %eax,%edi
call   1030 <print_quotes@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"index.html\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @get_file(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @print_quotes(i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"index.html\00"
define i32 @main() {
%1 = tail call i32 @get_file(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_quotes(i32 %1)
ret i32 0
}
int test02(const char *s1) { return __builtin_strncmp(s1, "abcdefghi", 8); }


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

x86 assembly (clang, -O2):
<test02>:
lea    0xee9(%rip),%rsi
mov    $0x8,%edx
jmp    1030 <strncmp@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"abcdefghi\00"
define i32 @test02(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strncmp(i8* %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64 8)
ret i32 %4
}

LLVM IR (-O2):
@.str = [10 x i8] c"abcdefghi\00"
define i32 @test02(i8* nocapture %0) {
%2 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64 8)
ret i32 %2
}
void ufshpb_rsp_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) {}


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

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

LLVM IR (-O0):
%struct.ufs_hba = type opaque
%struct.ufshcd_lrb = type opaque
define void @ufshpb_rsp_upiu(%struct.ufs_hba* %0, %struct.ufshcd_lrb* %1) {
%3 = alloca %struct.ufs_hba*
%4 = alloca %struct.ufshcd_lrb*
store %struct.ufs_hba* %0, %struct.ufs_hba** %3
store %struct.ufshcd_lrb* %1, %struct.ufshcd_lrb** %4
ret void
}

LLVM IR (-O2):
%struct.ufs_hba = type opaque
%struct.ufshcd_lrb = type opaque
define void @ufshpb_rsp_upiu(%struct.ufs_hba* nocapture %0, %struct.ufshcd_lrb* nocapture %1) {
ret void
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ putchar(int);
int main(void) {
  int c;
  int i = 0;
  c = getchar();
  while (c != '\n') {
    putchar(c);
    c = getchar();
    i++;
  }
  printf("\n%i\n", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
je     117a <main+0x4a>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1150 <main+0x20>
mov    -0xc(%rbp),%esi
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0xa,%eax
je     1166 <main+0x36>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
add    $0x1,%ebx
cmp    $0xa,%eax
jne    1150 <main+0x20>
lea    0xe93(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"\0A%i\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = icmp eq i32 %1, 10
br i1 %2, label %10, label %3
3: ; preds = %0, %3
%4 = phi i32 [ %8, %3 ], [ 0, %0 ]
%5 = phi i32 [ %7, %3 ], [ %1, %0 ]
%6 = tail call i32 @putchar(i32 %5)
%7 = tail call i32 (...) @getchar()
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %7, 10
br i1 %9, label %10, label %3
10: ; preds = %3, %0
%11 = phi i32 [ 0, %0 ], [ %8, %3 ]
%12 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int write(int, void *, int);
void writeout(int rawfd, void *buf, int size) {
  if (write(rawfd, buf, size) < size) {
    fprintf(stderr, "can not write raw file\n");
    close(rawfd);
    exit(10);
  }
}


x86 assembly (clang, -O0):
<writeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
cmp    -0x14(%rbp),%eax
jge    1191 <writeout+0x51>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
lea    0xe86(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    $0xa,%edi
call   1060 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeout>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %edi,%ebx
call   1030 <write@plt>
cmp    %ebp,%eax
jl     1157 <writeout+0x17>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
lea    0xe99(%rip),%rsi
call   1050 <fprintf@plt>
mov    %ebx,%edi
call   1040 <close@plt>
mov    $0xa,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"can not write raw file\0A\00"
define void @writeout(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @write(i32 %7, i8* %8, i32 %9)
%11 = load i32, i32* %6
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %19
13: ; preds = %3
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* %4
%17 = call i32 @close(i32 %16)
%18 = call i32 @exit(i32 10)
unreachable
19: ; preds = %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"can not write raw file\0A\00"
define void @writeout(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
%5 = icmp slt i32 %4, %2
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @close(i32 %0)
%10 = tail call i32 @exit(i32 10)
unreachable
11: ; preds = %3
ret void
}
N(j, e) {
  ae(j + 131);
  s((e < 512) << 7 | 5, e);
}


x86 assembly (clang, -O0):
<N>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
add    $0x83,%edi
mov    $0x0,%al
call   1030 <ae@plt>
cmpl   $0x200,-0xc(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
shl    $0x7,%edi
or     $0x5,%edi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1040 <s@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<N>:
push   %rbx
mov    %esi,%ebx
add    $0x83,%edi
xor    %eax,%eax
call   1030 <ae@plt>
xor    %edi,%edi
cmp    $0x200,%ebx
setl   %dil
shl    $0x7,%edi
or     $0x5,%edi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <s@plt>

LLVM IR (-O0):
define i32 @N(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 131
%8 = call i32 (i32, ...) bitcast (i32 (...)* @ae to i32 (i32, ...)*)(i32 %7)
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 512
%11 = zext i1 %10 to i32
%12 = shl i32 %11, 7
%13 = or i32 %12, 5
%14 = load i32, i32* %5
%15 = call i32 (i32, i32, ...) bitcast (i32 (...)* @s to i32 (i32, i32, ...)*)(i32 %13, i32 %14)
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @N(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 131
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @ae to i32 (i32, ...)*)(i32 %3)
%5 = icmp slt i32 %1, 512
%6 = select i1 %5, i32 133, i32 5
%7 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @s to i32 (i32, i32, ...)*)(i32 %6, i32 %1)
ret i32 undef
}
void g_get_filename_charsets() {}


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

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

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

LLVM IR (-O2):
define void @g_get_filename_charsets() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int example_service_1_routine(void) {
  printf("example_service_1_routine: Hello World!!!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"example_service_1_routine: Hello World!!!\0A\00"
define i32 @example_service_1_routine() {
%1 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [42 x i8] c"example_service_1_routine: Hello World!!!\00"
define i32 @example_service_1_routine() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int FoF_FindFather(int *, int);
int FoF_FindFather_compression(int *grp, int Id) {
  int id_f = FoF_FindFather(grp, Id);
  while (Id != id_f) {
    int tmp = grp[Id];
    grp[Id] = id_f;
    Id = tmp;
  }
  return id_f;
}


x86 assembly (clang, -O0):
<FoF_FindFather_compression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <FoF_FindFather@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1161 <FoF_FindFather_compression+0x51>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    112e <FoF_FindFather_compression+0x1e>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FoF_FindFather_compression>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <FoF_FindFather@plt>
cmp    %ebp,%eax
je     113d <FoF_FindFather_compression+0x2d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movslq %ebp,%rcx
mov    (%rbx,%rcx,4),%ebp
mov    %eax,(%rbx,%rcx,4)
cmp    %eax,%ebp
jne    1130 <FoF_FindFather_compression+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @FoF_FindFather_compression(i32* %0, i32 %1) {
%3 = tail call i32 @FoF_FindFather(i32* %0, i32 %1)
%4 = icmp eq i32 %3, %1
br i1 %4, label %11, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %9, %5 ], [ %1, %2 ]
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %3, i32* %8
%10 = icmp eq i32 %9, %3
br i1 %10, label %11, label %5
11: ; preds = %5, %2
ret i32 %3
}
void IWL_DEBUG(int level, const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @IWL_DEBUG(i32 %0, i8* nocapture %1, ...) {
ret void
}
int test_imm_97uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x97 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_97uint64_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, 151
%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_97uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 648540061696
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void g_ptr_array_remove() {}


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

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

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

LLVM IR (-O2):
define void @g_ptr_array_remove() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep2(int);
int main(void) {
  sleep2(2);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sleep2(i32 2)
ret i32 0
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ucs_atomic_fadd64(volatile uint64_t *ptr, uint64_t value) {
  asm volatile("lock xadd"
               "q"
               " %0, %1"
               : "+r"(value), "+m"(*ptr)
               :
               : "memory");
  return value;
}


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

x86 assembly (clang, -O2):
<ucs_atomic_fadd64>:
mov    %rsi,%rax
lock xadd %rax,(%rdi)
ret

LLVM IR (-O0):
define i8* @ucs_atomic_fadd64(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8**, i8*** %3
%7 = call i8* asm sideeffect "lock xaddq $0, $1", "=r,=*m,0,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %6, i8* %5, i8** elementtype(i8*) %6)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
ret i8* %8
}

LLVM IR (-O2):
define i8* @ucs_atomic_fadd64(i8** %0, i8* %1) {
%3 = tail call i8* asm sideeffect "lock xaddq $0, $1", "=r,=*m,0,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %0, i8* %1, i8** elementtype(i8*) %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ computes_correct_sleep_times();
int /*<<< orphan*/ sleeps_correct_amount();
int /*<<< orphan*/ works_after_being_idle();
void rate_limiter_suite() {
  computes_correct_sleep_times();
  works_after_being_idle();
  sleeps_correct_amount();
}


x86 assembly (clang, -O0):
<rate_limiter_suite>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <computes_correct_sleep_times@plt>
mov    $0x0,%al
call   1040 <works_after_being_idle@plt>
mov    $0x0,%al
call   1050 <sleeps_correct_amount@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rate_limiter_suite>:
push   %rax
xor    %eax,%eax
call   1030 <computes_correct_sleep_times@plt>
xor    %eax,%eax
call   1040 <works_after_being_idle@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <sleeps_correct_amount@plt>

LLVM IR (-O0):
define void @rate_limiter_suite() {
%1 = call i32 (...) @computes_correct_sleep_times()
%2 = call i32 (...) @works_after_being_idle()
%3 = call i32 (...) @sleeps_correct_amount()
ret void
}

LLVM IR (-O2):
define void @rate_limiter_suite() {
%1 = tail call i32 (...) @computes_correct_sleep_times()
%2 = tail call i32 (...) @works_after_being_idle()
%3 = tail call i32 (...) @sleeps_correct_amount()
ret void
}
long kernel__Int___47d(long self, long p0) {
  long var;
  long var1;
  var1 = self / p0;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<kernel__Int___47d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel__Int___47d>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1115 <kernel__Int___47d+0x15>
cqto
idiv   %rsi
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
define i64 @kernel__Int___47d(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = sdiv i64 %7, %8
store i64 %9, i64* %6
%10 = load i64, i64* %6
store i64 %10, i64* %5
br label %11
11: ; preds = %2
%12 = load i64, i64* %5
ret i64 %12
}

LLVM IR (-O2):
define i64 @kernel__Int___47d(i64 %0, i64 %1) {
%3 = sdiv i64 %0, %1
ret i64 %3
}
int xmlUCSIsCombiningHalfMarks(int code) {
  return (((code >= 0xFE20) && (code <= 0xFE2F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsCombiningHalfMarks>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xfe20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsCombiningHalfMarks+0x26>
cmpl   $0xfe2f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsCombiningHalfMarks>:
and    $0xfffffff0,%edi
xor    %eax,%eax
cmp    $0xfe20,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsCombiningHalfMarks(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65056
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 65071
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsCombiningHalfMarks(i32 %0) {
%2 = and i32 %0, -16
%3 = icmp eq i32 %2, 65056
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned strhash(void *str2) {
  char *str = str2;
  unsigned hash = 0;
  int i = 0;
  while (str[i]) {
    hash ^= str[i] << (i * 4 % (sizeof(int) * 8));
    i++;
  }
  return hash;
}


x86 assembly (clang, -O0):
<strhash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     115f <strhash+0x5f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
and    $0x1f,%rcx
shl    %cl,%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111e <strhash+0x1e>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strhash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112b <strhash+0x2b>
add    $0x1,%rdi
xor    %edx,%edx
xor    %eax,%eax
xchg   %ax,%ax
movsbl %cl,%esi
mov    %edx,%ecx
and    $0x1c,%cl
shl    %cl,%esi
xor    %esi,%eax
movzbl (%rdi),%ecx
add    $0x4,%edx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <strhash+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @strhash(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
store i8* %6, i8** %3
store i32 0, i32* %4
store i32 0, i32* %5
br label %7
7: ; preds = %14, %1
%8 = load i8*, i8** %3
%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 = icmp ne i8 %12, 0
br i1 %13, label %14, label %31
14: ; preds = %7
%15 = load i8*, i8** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = load i32, i32* %5
%22 = mul nsw i32 %21, 4
%23 = sext i32 %22 to i64
%24 = urem i64 %23, 32
%25 = trunc i64 %24 to i32
%26 = shl i32 %20, %25
%27 = load i32, i32* %4
%28 = xor i32 %27, %26
store i32 %28, i32* %4
%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* %4
ret i32 %32
}

LLVM IR (-O2):
define i32 @strhash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %18, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %14, %4 ], [ 0, %1 ]
%6 = phi i8 [ %16, %4 ], [ %2, %1 ]
%7 = phi i32 [ %13, %4 ], [ 0, %1 ]
%8 = sext i8 %6 to i32
%9 = trunc i64 %5 to i32
%10 = shl nsw i32 %9, 2
%11 = and i32 %10, 28
%12 = shl i32 %8, %11
%13 = xor i32 %12, %7
%14 = add nuw nsw i64 %5, 1
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %4
18: ; preds = %4, %1
%19 = phi i32 [ 0, %1 ], [ %13, %4 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ drftf1(int, double *, double *, double *, int *);
void __ogg_fdrfftf(int n, double *r, double *wsave, int *ifac) {
  if (n == 1)
    return;
  drftf1(n, r, wsave, wsave + n, ifac);
}


x86 assembly (clang, -O0):
<__ogg_fdrfftf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1136 <__ogg_fdrfftf+0x26>
jmp    1159 <__ogg_fdrfftf+0x49>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x20(%rbp),%r8
call   1030 <drftf1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ogg_fdrfftf>:
cmp    $0x1,%edi
jne    1116 <__ogg_fdrfftf+0x6>
ret
mov    %rcx,%r8
movslq %edi,%rax
lea    (%rdx,%rax,8),%rcx
jmp    1030 <drftf1@plt>

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

LLVM IR (-O2):
define void @__ogg_fdrfftf(i32 %0, double* %1, double* %2, i32* %3) {
%5 = icmp eq i32 %0, 1
br i1 %5, label %10, label %6
6: ; preds = %4
%7 = sext i32 %0 to i64
%8 = getelementptr inbounds double, double* %2, i64 %7
%9 = tail call i32 @drftf1(i32 %0, double* %1, double* %2, double* %8, i32* %3)
br label %10
10: ; preds = %4, %6
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned char const *data;
};
typedef TYPE_1__ ASN1_STRING;

/* Variables and functions */
const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x) {
  return x->data;
}


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

x86 assembly (clang, -O2):
<ASN1_STRING_get0_data>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i8* }
define i8* @ASN1_STRING_get0_data(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%5 = load i8*, i8** %4
ret i8* %5
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i8* }
define i8* @ASN1_STRING_get0_data(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i8*, i8** %2
ret i8* %3
}
void xmplayer_code_lock_end(void) {}


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

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

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

LLVM IR (-O2):
define void @xmplayer_code_lock_end() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int sumHead(int);
int main() {
  int number = 0;
  printf("Type a number:\n");
  scanf("%d", &number);
  int result = sumHead(number);
  printf("The sum of the first %d integers is %d.\n", number, result);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
lea    0xea4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <sumHead@plt>
mov    0x4(%rsp),%esi
lea    0xe89(%rip),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Type a number:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [41 x i8] c"The sum of the first %d integers is %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @sumHead(i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [41 x i8] c"The sum of the first %d integers is %d.\0A\00"
@str = [15 x i8] c"Type a number:\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @sumHead(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %6)
ret i32 0
}
void t2(unsigned long long t) { __asm__ volatile("" : "+m"(t)); }


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

x86 assembly (clang, -O2):
<t2>:
mov    %rdi,-0x8(%rsp)
ret

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

LLVM IR (-O2):
define void @t2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
ret void
}
/* Variables and functions */
char const *sd_locker_posix_error_message();
const char *sd_locker_error_message(void) {
  return sd_locker_posix_error_message();
}


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

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

LLVM IR (-O0):
define i8* @sd_locker_error_message() {
%1 = call i8* (...) @sd_locker_posix_error_message()
ret i8* %1
}

LLVM IR (-O2):
define i8* @sd_locker_error_message() {
%1 = tail call i8* (...) @sd_locker_posix_error_message()
ret i8* %1
}
int ret_val(int val) {
  static int ret = 0;
  if (val == -2) {
    if (ret != -1)
      ret = 0;
  } else
    ret = (val == -1) || (ret == -1) ? -1 : ret + val;
  return (ret);
}


x86 assembly (clang, -O0):
<ret_val>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
jne    112d <ret_val+0x2d>
cmpl   $0xffffffff,0x2f0c(%rip)
je     1128 <ret_val+0x28>
movl   $0x0,0x2efc(%rip)
jmp    1166 <ret_val+0x66>
cmpl   $0xffffffff,-0x4(%rbp)
je     1144 <ret_val+0x44>
cmpl   $0xffffffff,0x2ee6(%rip)
jne    1151 <ret_val+0x51>
mov    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    115d <ret_val+0x5d>
mov    0x2ecd(%rip),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,0x2ebe(%rip)
mov    0x2eb8(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ret_val>:
cmp    $0xfffffffe,%edi
jne    1117 <ret_val+0x17>
xor    %eax,%eax
cmpl   $0xffffffff,0x2f16(%rip)
je     1133 <ret_val+0x33>
mov    %eax,0x2f0e(%rip)
ret
mov    0x2f07(%rip),%ecx
lea    (%rcx,%rdi,1),%eax
cmp    $0xffffffff,%ecx
cmove  %ecx,%eax
cmp    $0xffffffff,%edi
cmove  %edi,%eax
mov    %eax,0x2ef2(%rip)
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ret_val.ret = internal global i32 0
define i32 @ret_val(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, -2
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* @ret_val.ret
%7 = icmp ne i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 0, i32* @ret_val.ret
br label %9
9: ; preds = %8, %5
br label %23
10: ; preds = %1
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, -1
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i32, i32* @ret_val.ret
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %17
16: ; preds = %13, %10
br label %21
17: ; preds = %13
%18 = load i32, i32* @ret_val.ret
%19 = load i32, i32* %2
%20 = add nsw i32 %18, %19
br label %21
21: ; preds = %17, %16
%22 = phi i32 [ -1, %16 ], [ %20, %17 ]
store i32 %22, i32* @ret_val.ret
br label %23
23: ; preds = %21, %9
%24 = load i32, i32* @ret_val.ret
ret i32 %24
}

LLVM IR (-O2):
@ret_val.ret = internal unnamed_addr global i32 0
define i32 @ret_val(i32 %0) {
%2 = icmp eq i32 %0, -2
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @ret_val.ret
%5 = icmp eq i32 %4, -1
br i1 %5, label %15, label %13
6: ; preds = %1
%7 = icmp eq i32 %0, -1
%8 = load i32, i32* @ret_val.ret
%9 = icmp eq i32 %8, -1
%10 = select i1 %7, i1 true, i1 %9
%11 = add nsw i32 %8, %0
%12 = select i1 %10, i32 -1, i32 %11
br label %13
13: ; preds = %3, %6
%14 = phi i32 [ %12, %6 ], [ 0, %3 ]
store i32 %14, i32* @ret_val.ret
br label %15
15: ; preds = %13, %3
%16 = phi i32 [ -1, %3 ], [ %14, %13 ]
ret i32 %16
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ res_name;
};
typedef TYPE_1__ XClassHint;

/* Variables and functions */
void *get_XClassHint_res_name(void *_p) {
  return (void *)((XClassHint *)_p)->res_name;
}


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

x86 assembly (clang, -O2):
<get_XClassHint_res_name>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @get_XClassHint_res_name(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ __pread64(int, void *, size_t, int /*<<< orphan*/);
ssize_t pread(int fd, void *buf, size_t nbytes, off_t offset) {
  return __pread64(fd, buf, nbytes, offset);
}


x86 assembly (clang, -O0):
<pread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <__pread64@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pread>:
jmp    1030 <__pread64@plt>

LLVM IR (-O0):
define i32 @pread(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i32, i32* %8
%13 = call i32 @__pread64(i32 %9, i8* %10, i64 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @pread(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @__pread64(i32 %0, i8* %1, i64 %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int strlen(char *);
void reverse(char s[]) {
  int i = 0, j = strlen(s);
  char tmp;
  if (i <= j) {
    tmp = s[i];
    s[i] = s[j];
    s[j] = tmp;
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     116d <reverse+0x5d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %eax,%eax
js     1129 <reverse+0x19>
mov    (%rbx),%cl
mov    %eax,%eax
mov    (%rbx,%rax,1),%dl
mov    %dl,(%rbx)
mov    %cl,(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @reverse(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, -1
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i8, i8* %0
%6 = zext i32 %2 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
store i8 %8, i8* %0
store i8 %5, i8* %7
br label %9
9: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, ...);
void interceptor_increaseBy(unsigned long v) {
  unsigned long gs;
  syscall(158, 0x1004, &gs);
  gs += v;
  syscall(158, 0x1001, gs);
  return;
  if (v == 5) {
    return;
  }
}


x86 assembly (clang, -O0):
<interceptor_increaseBy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x9e,%edi
mov    $0x1004,%esi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    $0x9e,%edi
mov    $0x1001,%esi
mov    $0x0,%al
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interceptor_increaseBy>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdx
mov    $0x9e,%edi
mov    $0x1004,%esi
xor    %eax,%eax
call   1030 <syscall@plt>
add    0x8(%rsp),%rbx
mov    %rbx,0x8(%rsp)
mov    $0x9e,%edi
mov    $0x1001,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @interceptor_increaseBy(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = call i32 (i32, i32, ...) @syscall(i32 158, i32 4100, i64* %3)
%5 = load i64, i64* %2
%6 = load i64, i64* %3
%7 = add i64 %6, %5
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = call i32 (i32, i32, ...) @syscall(i32 158, i32 4097, i64 %8)
ret void
}

LLVM IR (-O2):
define void @interceptor_increaseBy(i64 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i32 (i32, i32, ...) @syscall(i32 158, i32 4100, i64* %2)
%5 = load i64, i64* %2
%6 = add i64 %5, %0
store i64 %6, i64* %2
%7 = call i32 (i32, i32, ...) @syscall(i32 158, i32 4097, i64 %6)
ret void
}
int unlink_disk_dev(char *basedir) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @unlink_disk_dev(i8* nocapture readnone %0) {
ret i32 0
}