xunge/DecIR huggingface dataset:
/* Variables and functions */
int jump(int *, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ system(char *);
int main() {
  int nums[] = {2, 3, 1, 1, 4};
  printf("%d\n", jump(nums, 5));
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1050 <jump@plt>
mov    %eax,%esi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
lea    0xe97(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xed6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xebb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1050 <jump@plt>
lea    0xeb7(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xead(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.nums = [5 x i32] [i32 2, i32 3, i32 1, i32 1, i32 4]
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
store i32 0, i32* %1
%3 = bitcast [5 x i32]* %2 to i8*
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%5 = call i32 @jump(i32* %4, i32 5)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.nums = [5 x i32] [i32 2, i32 3, i32 1, i32 1, i32 4]
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @jump(i32* %3, i32 5)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int ft_strcontains(char *s, char c) {
  int i;
  i = 0;
  if (!*s)
    return (-1);
  while (*s) {
    if (*s == c)
      i++;
    s++;
  }
  return (i);
}


x86 assembly (clang, -O0):
<ft_strcontains>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    112e <ft_strcontains+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <ft_strcontains+0x73>
jmp    1133 <ft_strcontains+0x33>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     116d <ft_strcontains+0x6d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    115c <ft_strcontains+0x5c>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1133 <ft_strcontains+0x33>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @MirrorRow_Any_AVX2() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
scalar_t__ pthread_cond_wait(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void std_pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) {
  if (pthread_cond_wait(cond, mutex) != 0) {
    perror("pthread_cond_wait");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<std_pthread_cond_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <pthread_cond_wait@plt>
cmp    $0x0,%rax
je     116d <std_pthread_cond_wait+0x3d>
lea    0xea2(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_pthread_cond_wait>:
push   %rax
call   1030 <pthread_cond_wait@plt>
test   %rax,%rax
jne    113d <std_pthread_cond_wait+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"pthread_cond_wait\00"
define void @std_pthread_cond_wait(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 = call i64 @pthread_cond_wait(i32* %5, i32* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"pthread_cond_wait\00"
define void @std_pthread_cond_wait(i32* %0, i32* %1) {
%3 = tail call i64 @pthread_cond_wait(i32* %0, i32* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
unsigned int __arch_hweight32(unsigned int);
unsigned int __arch_hweight8(unsigned int w) {
  return __arch_hweight32(w & 0xff);
}


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

x86 assembly (clang, -O2):
<__arch_hweight8>:
movzbl %dil,%edi
jmp    1030 <__arch_hweight32@plt>

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

LLVM IR (-O2):
define i32 @__arch_hweight8(i32 %0) {
%2 = and i32 %0, 255
%3 = tail call i32 @__arch_hweight32(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ MacDef(int /*<<< orphan*/);
void DoMacro(void) { MacDef(0); }


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

x86 assembly (clang, -O2):
<DoMacro>:
xor    %edi,%edi
jmp    1030 <MacDef@plt>

LLVM IR (-O0):
define void @DoMacro() {
%1 = call i32 @MacDef(i32 0)
ret void
}

LLVM IR (-O2):
define void @DoMacro() {
%1 = tail call i32 @MacDef(i32 0)
ret void
}
/* Variables and functions */
double arithmetic_incremental(double x0, double x1, size_t n) {
  return x0 + (x1 - x0) / n;
}


x86 assembly (clang, -O0):
<arithmetic_incremental>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  %xmm0,%xmm1
movaps 0xed9(%rip),%xmm3
movq   -0x18(%rbp),%xmm2
punpckldq %xmm3,%xmm2
movapd 0xed8(%rip),%xmm3
subpd  %xmm3,%xmm2
movaps %xmm2,%xmm3
unpckhpd %xmm2,%xmm2
addsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<arithmetic_incremental>:
subsd  %xmm0,%xmm1
movq   %rdi,%xmm2
punpckldq 0xeef(%rip),%xmm2
subpd  0xef7(%rip),%xmm2
movapd %xmm2,%xmm3
unpckhpd %xmm2,%xmm3
addsd  %xmm2,%xmm3
divsd  %xmm3,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @arithmetic_incremental(double %0, double %1, i64 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i64
store double %0, double* %4
store double %1, double* %5
store i64 %2, i64* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %4
%10 = fsub double %8, %9
%11 = load i64, i64* %6
%12 = uitofp i64 %11 to double
%13 = fdiv double %10, %12
%14 = fadd double %7, %13
ret double %14
}

LLVM IR (-O2):
define double @arithmetic_incremental(double %0, double %1, i64 %2) {
%4 = fsub double %1, %0
%5 = uitofp i64 %2 to double
%6 = fdiv double %4, %5
%7 = fadd double %6, %0
ret double %7
}
void global_filetable_delayed_print(struct mount *mnt) {}


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

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

LLVM IR (-O0):
%struct.mount = type opaque
define void @global_filetable_delayed_print(%struct.mount* %0) {
%2 = alloca %struct.mount*
store %struct.mount* %0, %struct.mount** %2
ret void
}

LLVM IR (-O2):
%struct.mount = type opaque
define void @global_filetable_delayed_print(%struct.mount* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void boxless_pstate_table_header(__attribute__((unused)) void *report_data) {
  printf("   P-state        min        max        avg      total    hits\n");
}


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

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

LLVM IR (-O0):
@.str = [64 x i8] c" P-state min max avg total hits\0A\00"
define void @boxless_pstate_table_header(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [63 x i8] c" P-state min max avg total hits\00"
define void @boxless_pstate_table_header(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ op_write1(int);
void op_enc_ldd_a_hlp(void) { op_write1(0x3a); }


x86 assembly (clang, -O0):
<op_enc_ldd_a_hlp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3a,%edi
call   1030 <op_write1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_enc_ldd_a_hlp>:
mov    $0x3a,%edi
jmp    1030 <op_write1@plt>

LLVM IR (-O0):
define void @op_enc_ldd_a_hlp() {
%1 = call i32 @op_write1(i32 58)
ret void
}

LLVM IR (-O2):
define void @op_enc_ldd_a_hlp() {
%1 = tail call i32 @op_write1(i32 58)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void USB_EndPoint7(uint32_t event) {}


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

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

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

LLVM IR (-O2):
define void @USB_EndPoint7(i32 %0) {
ret void
}
/* Variables and functions */
double drand48();
double uniform(double min, double max) {
  double retval;
  retval = drand48();
  retval = retval * (max - min);
  return retval + min;
}


x86 assembly (clang, -O0):
<uniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <drand48@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uniform>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <drand48@plt>
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @uniform(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = call double (...) @drand48()
store double %6, double* %5
%7 = load double, double* %5
%8 = load double, double* %4
%9 = load double, double* %3
%10 = fsub double %8, %9
%11 = fmul double %7, %10
store double %11, double* %5
%12 = load double, double* %5
%13 = load double, double* %3
%14 = fadd double %12, %13
ret double %14
}

LLVM IR (-O2):
define double @uniform(double %0, double %1) {
%3 = tail call double (...) @drand48()
%4 = fsub double %1, %0
%5 = fmul double %4, %3
%6 = fadd double %5, %0
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *roman(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number;
  scanf("%d", &number);
  printf("%s", roman(number));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <roman@plt>
lea    0xeb1(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i8* @roman(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i8* @roman(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}
__attribute__((noreturn)) void halt(void) {
  for (;;)
    __asm__ __volatile__("cli; hlt");
}


x86 assembly (clang, -O0):
<halt>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <halt+0x9>
cli
hlt
jmp    1109 <halt+0x9>

x86 assembly (clang, -O2):
<halt>:
cli
hlt
jmp    1100 <halt>

LLVM IR (-O0):
define void @halt() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @halt() {
br label %1
1: ; preds = %1, %0
tail call void asm sideeffect "cli; hlt", "~{dirflag},~{fpsr},~{flags}"()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ strcmp(char const *, char *);
int test_3(const char *str, char *ptr) {
  if (!strcmp(str, "VALUE"))
    free(ptr);
  free(ptr);
}


x86 assembly (clang, -O0):
<test_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1152 <test_3+0x32>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_3>:
push   %rbx
mov    %rsi,%rbx
lea    0xed5(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    113c <test_3+0x1c>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"VALUE\00"
define i32 @test_3(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @free(i8* %1)
br label %7
7: ; preds = %5, %2
%8 = tail call i32 @free(i8* %1)
ret i32 undef
}
void IFstat(void) {}


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

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

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

LLVM IR (-O2):
define void @IFstat() {
ret void
}
/* Variables and functions */
int getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
main() {
  int len;
  char line[1000];
  while ((len = getline(line, 1000)) > 0) {
    reverse(line);
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1183 <main+0x53>
lea    -0x3f0(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %eax,%eax
jle    1184 <main+0x54>
mov    %rsp,%rbx
lea    0xeab(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = call i32 @reverse(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = call i32 @getline(i8* %2, i32 1000)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void handler(int sig) { printf("recv %d\n", sig); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"recv %d\0A\00"
define void @handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int is_cpu_feature_present(int, int, int);
int is_cpu_clflush_present(void) {
  int ret = is_cpu_feature_present(0x1, 3, (1 << 23));
  return ret;
}


x86 assembly (clang, -O0):
<is_cpu_clflush_present>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x800000,%edx
call   1030 <is_cpu_feature_present@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_cpu_clflush_present>:
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x800000,%edx
jmp    1030 <is_cpu_feature_present@plt>

LLVM IR (-O0):
define i32 @is_cpu_clflush_present() {
%1 = alloca i32
%2 = call i32 @is_cpu_feature_present(i32 1, i32 3, i32 8388608)
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @is_cpu_clflush_present() {
%1 = tail call i32 @is_cpu_feature_present(i32 1, i32 3, i32 8388608)
ret i32 %1
}
__attribute__((no, noclone)) unsigned __int128 t100_2add(signed char y) {
  signed char x = (-1);
  unsigned __int128 r;
  if (__builtin_add_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x11(%rbp)
movb   $0xff,-0x12(%rbp)
movsbq -0x12(%rbp),%rdx
mov    %rdx,%r9
sar    $0x3f,%r9
movsbq -0x11(%rbp),%rcx
mov    %rcx,%rax
sar    $0x3f,%rax
add    %rcx,%rdx
mov    %r9,%rcx
adc    %rax,%rcx
mov    %r9,%r8
adc    %rax,%r8
adc    %rax,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
or     %rsi,%rax
setne  %al
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x28(%rbp)
test   $0x1,%al
jne    1181 <t100_2add+0x71>
jmp    1188 <t100_2add+0x78>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %r14
push   %rbx
push   %rax
movslq %edi,%r14
mov    %r14,%rbx
sar    $0x3f,%rbx
add    $0xffffffffffffffff,%r14
adc    $0xffffffffffffffff,%rbx
test   %dil,%dil
jg     1132 <t100_2add+0x22>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t100_2add(i8 signext %0) {
%2 = alloca i128
%3 = alloca i8
%4 = alloca i8
%5 = alloca i128
store i8 %0, i8* %3
store i8 -1, i8* %4
%6 = load i8, i8* %4
%7 = load i8, i8* %3
%8 = sext i8 %6 to i129
%9 = sext i8 %7 to i129
%10 = call { i129, i1 } @llvm.sadd.with.overflow.i129(i129 %8, i129 %9)
%11 = extractvalue { i129, i1 } %10, 1
%12 = extractvalue { i129, i1 } %10, 0
%13 = trunc i129 %12 to i128
%14 = zext i128 %13 to i129
%15 = icmp ne i129 %12, %14
%16 = or i1 %11, %15
store i128 %13, i128* %5
br i1 %16, label %17, label %19
17: ; preds = %1
%18 = call i32 (...) @bar()
br label %19
19: ; preds = %17, %1
%20 = load i128, i128* %5
store i128 %20, i128* %2
%21 = bitcast i128* %2 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @t100_2add(i8 signext %0) {
%2 = sext i8 %0 to i129
%3 = add nsw i129 %2, -1
%4 = icmp slt i8 %0, 1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @bar()
br label %7
7: ; preds = %5, %1
%8 = trunc i129 %3 to i64
%9 = lshr i129 %3, 64
%10 = trunc i129 %9 to i64
%11 = insertvalue { i64, i64 } poison, i64 %8, 0
%12 = insertvalue { i64, i64 } %11, i64 %10, 1
ret { i64, i64 } %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
volatile void sesc_future_epoch_jump(void *codeAddr) {
  fprintf(stderr, "TLS simulator needed for sesc_future_epoch_jump\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<sesc_future_epoch_jump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sesc_future_epoch_jump>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [49 x i8] c"TLS simulator needed for sesc_future_epoch_jump\0A\00"
define void @sesc_future_epoch_jump(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [49 x i8] c"TLS simulator needed for sesc_future_epoch_jump\0A\00"
define void @sesc_future_epoch_jump(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 -1)
unreachable
}
void RTStrVersionCompare(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrVersionCompare() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void sapi_unix_tcp_client_destroy(int sock) { close(sock); }


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

x86 assembly (clang, -O2):
<sapi_unix_tcp_client_destroy>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @sapi_unix_tcp_client_destroy(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
double pow(double, unsigned int);
int /*<<< orphan*/ printf(char *, double);
int main() {
  double x = 4;
  unsigned int y = 2;
  double action = pow(x, y);
  printf("%.0lf \n", action);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%edi
call   1040 <pow@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%.0lf \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca i32
%4 = alloca double
store i32 0, i32* %1
store double 4.000000e+00, double* %2
store i32 2, i32* %3
%5 = load double, double* %2
%6 = load i32, i32* %3
%7 = call double @pow(double %5, i32 %6)
store double %7, double* %4
%8 = load double, double* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%.0lf \0A\00"
define i32 @main() {
%1 = tail call double @pow(double 4.000000e+00, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
OP(ed, b7) { illegal_2(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
/* Variables and functions */
int atoi(char *);
int strlen(char *);
int /*<<< orphan*/ uwsgi_exit(int);
int uwsgi_hook_exit(char *arg) {
  int exit_code = 0;
  if (strlen(arg) > 1) {
    exit_code = atoi(arg);
  }
  uwsgi_exit(exit_code);
}


x86 assembly (clang, -O0):
<uwsgi_hook_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
jle    1161 <uwsgi_hook_exit+0x31>
mov    -0x10(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <uwsgi_exit@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_hook_exit>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
xor    %edi,%edi
cmp    $0x2,%eax
jl     114a <uwsgi_hook_exit+0x1a>
mov    %rbx,%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
pop    %rbx
jmp    1040 <uwsgi_exit@plt>

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

LLVM IR (-O2):
define i32 @uwsgi_hook_exit(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @atoi(i8* %0)
br label %6
6: ; preds = %4, %1
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
%8 = tail call i32 @uwsgi_exit(i32 %7)
ret i32 undef
}
void gtk_toolbar_set_style() {}


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

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

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

LLVM IR (-O2):
define void @gtk_toolbar_set_style() {
ret void
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void RNDResponseSink_RenderingControl_SetGreenVideoGain(
    struct UPnPService *Service, int ErrorCode, void *User) {
  printf("RND Invoke Response: "
         "RenderingControl/SetGreenVideoGain[ErrorCode:%d]()\r\n",
         ErrorCode);
}


x86 assembly (clang, -O0):
<RNDResponseSink_RenderingControl_SetGreenVideoGain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [74 x i8] c"RND Invoke Response: RenderingControl/SetGreenVideoGain[ErrorCode:%d]()\0D\0A\00"
define void @RNDResponseSink_RenderingControl_SetGreenVideoGain(%struct.UPnPService* %0, i32 %1, i8* %2) {
%4 = alloca %struct.UPnPService*
%5 = alloca i32
%6 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [74 x i8] c"RND Invoke Response: RenderingControl/SetGreenVideoGain[ErrorCode:%d]()\0D\0A\00"
define void @RNDResponseSink_RenderingControl_SetGreenVideoGain(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
float __nv_frexpf(float, int *);
float frexpf(float __a, int *__b) { return __nv_frexpf(__a, __b); }


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

x86 assembly (clang, -O2):
<frexpf>:
jmp    1030 <__nv_frexpf@plt>

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

LLVM IR (-O2):
define float @frexpf(float %0, i32* %1) {
%3 = tail call float @__nv_frexpf(float %0, i32* %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ test_pile_Dom();
int main() {
  test_pile_Dom();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_pile_Dom()
ret i32 0
}
void e113toasc(x, string, ndigs) unsigned short x[];
char *string;
int ndigs;
{
  unsigned short w[(6 + 3)];
  e113toe(x, w);
  etoasc(w, string, ndigs);
}


x86 assembly (clang, -O0):
<e113toasc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1040 <e113toe@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1030 <etoasc@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e113toasc>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <e113toe@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <etoasc@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @e113toasc(i16* %0, i8* %1, i32 %2) {
%4 = alloca i16*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [9 x i16]
store i16* %0, i16** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i16*, i16** %4
%9 = getelementptr inbounds [9 x i16], [9 x i16]* %7, i64 0, i64 0
%10 = call i32 (i16*, i16*, ...) bitcast (i32 (...)* @e113toe to i32 (i16*, i16*, ...)*)(i16* %8, i16* %9)
%11 = getelementptr inbounds [9 x i16], [9 x i16]* %7, i64 0, i64 0
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 (i16*, i8*, i32, ...) bitcast (i32 (...)* @etoasc to i32 (i16*, i8*, i32, ...)*)(i16* %11, i8* %12, i32 %13)
ret void
}

LLVM IR (-O2):
define void @e113toasc(i16* %0, i8* %1, i32 %2) {
%4 = alloca [9 x i16]
%5 = bitcast [9 x i16]* %4 to i8*
%6 = getelementptr inbounds [9 x i16], [9 x i16]* %4, i64 0, i64 0
%7 = call i32 (i16*, i16*, ...) bitcast (i32 (...)* @e113toe to i32 (i16*, i16*, ...)*)(i16* %0, i16* %6)
%8 = call i32 (i16*, i8*, i32, ...) bitcast (i32 (...)* @etoasc to i32 (i16*, i8*, i32, ...)*)(i16* %6, i8* %1, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct chirp_client {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ simple_command(struct chirp_client *, int /*<<< orphan*/,
                                  char *, char const *);
int64_t chirp_client_cookie(struct chirp_client *c, const char *cookie,
                            time_t stoptime) {
  return simple_command(c, stoptime, "cookie %s\n", cookie);
}


x86 assembly (clang, -O0):
<chirp_client_cookie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rcx
lea    0xecb(%rip),%rdx
call   1030 <simple_command@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chirp_client_cookie>:
mov    %rsi,%rcx
lea    0xee6(%rip),%rax
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <simple_command@plt>

LLVM IR (-O0):
%struct.chirp_client = type { i32 }
@.str = [11 x i8] c"cookie %s\0A\00"
define i32 @chirp_client_cookie(%struct.chirp_client* %0, i8* %1, i32 %2) {
%4 = alloca %struct.chirp_client*
%5 = alloca i8*
%6 = alloca i32
store %struct.chirp_client* %0, %struct.chirp_client** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.chirp_client*, %struct.chirp_client** %4
%8 = load i32, i32* %6
%9 = load i8*, i8** %5
%10 = call i32 @simple_command(%struct.chirp_client* %7, i32 %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.chirp_client = type { i32 }
@.str = [11 x i8] c"cookie %s\0A\00"
define i32 @chirp_client_cookie(%struct.chirp_client* %0, i8* %1, i32 %2) {
%4 = tail call i32 @simple_command(%struct.chirp_client* %0, i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 %4
}
void SCE_Quit_File(void) {}


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

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

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

LLVM IR (-O2):
define void @SCE_Quit_File() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xa1() {
  Assert_real((isupper(161) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              810, ("isupper should be 0 for 0xa1"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xa1\00"
define void @t_isupper_0xa1() {
%1 = tail call i64 @isupper(i32 161)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 810, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _main();
int main(void) { return _main(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @_main()
ret i32 %1
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t quicly_decode16(const uint8_t **src) {
  uint16_t v = (uint16_t)(*src)[0] << 8 | (*src)[1];
  *src += 2;
  return v;
}


x86 assembly (clang, -O0):
<quicly_decode16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
or     0x4(%rcx),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicly_decode16>:
mov    (%rdi),%rcx
mov    (%rcx),%eax
shl    $0x8,%eax
or     0x4(%rcx),%eax
add    $0x8,%rcx
mov    %rcx,(%rdi)
ret

LLVM IR (-O0):
define i32 @quicly_decode16(i32** %0) {
%2 = alloca i32**
%3 = alloca i32
store i32** %0, i32*** %2
%4 = load i32**, i32*** %2
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = shl i32 %7, 8
%9 = load i32**, i32*** %2
%10 = load i32*, i32** %9
%11 = getelementptr inbounds i32, i32* %10, i64 1
%12 = load i32, i32* %11
%13 = or i32 %8, %12
store i32 %13, i32* %3
%14 = load i32**, i32*** %2
%15 = load i32*, i32** %14
%16 = getelementptr inbounds i32, i32* %15, i64 2
store i32* %16, i32** %14
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @quicly_decode16(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = getelementptr inbounds i32, i32* %2, i64 1
%6 = load i32, i32* %5
%7 = or i32 %4, %6
%8 = getelementptr inbounds i32, i32* %2, i64 2
store i32* %8, i32** %0
ret i32 %7
}
int no_good(double test) { return test == (9.9E999) || test == (-9.9E999); }


x86 assembly (clang, -O0):
<no_good>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
movsd  0xee8(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    1130 <no_good+0x30>
jp     1130 <no_good+0x30>
jmp    114c <no_good+0x4c>
movsd  -0x8(%rbp),%xmm0
movsd  0xecb(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<no_good>:
ucomisd 0xef8(%rip),%xmm0
setae  %al
movsd  0xef5(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @no_good(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double %3, 0x7FF0000000000000
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load double, double* %2
%7 = fcmp oeq double %6, 0xFFF0000000000000
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @no_good(double %0) {
%2 = fcmp oeq double %0, 0x7FF0000000000000
%3 = fcmp oeq double %0, 0xFFF0000000000000
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __le16;

/* Variables and functions */
void *nla_reserve(void **, int, int);
void nla_put_le16(void **ctx, int t, __le16 var) {
  void *data = nla_reserve(ctx, t, sizeof(__le16));
  *(__le16 *)data = var;
}


x86 assembly (clang, -O0):
<nla_put_le16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x4,%edx
call   1030 <nla_reserve@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nla_put_le16>:
push   %rbx
mov    %edx,%ebx
mov    $0x4,%edx
call   1030 <nla_reserve@plt>
mov    %ebx,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @nla_put_le16(i8** %0, i32 %1, i32 %2) {
%4 = tail call i8* @nla_reserve(i8** %0, i32 %1, i32 4)
%5 = bitcast i8* %4 to i32*
store i32 %2, i32* %5
ret void
}