xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ gui_set_status_text_part(int, int /*<<< orphan*/, int,
                                            char *);
void gui_set_menu_param(char *text) {
  gui_set_status_text_part(3, 0, 14, text);
}


x86 assembly (clang, -O0):
<gui_set_menu_param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x3,%edi
xor    %esi,%esi
mov    $0xe,%edx
call   1030 <gui_set_status_text_part@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_set_menu_param>:
mov    %rdi,%rcx
mov    $0x3,%edi
xor    %esi,%esi
mov    $0xe,%edx
jmp    1030 <gui_set_status_text_part@plt>

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

LLVM IR (-O2):
define void @gui_set_menu_param(i8* %0) {
%2 = tail call i32 @gui_set_status_text_part(i32 3, i32 0, i32 14, i8* %0)
ret void
}
void mdp4_dsi_cmd_free_base_pipe(struct msm_fb_data_type *mfd) {}


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

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

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

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_dsi_cmd_free_base_pipe(%struct.msm_fb_data_type* nocapture %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t load32_le(const uint8_t src[4]) {
  uint32_t w = (uint32_t)src[0];
  w |= (uint32_t)src[1] << 8;
  w |= (uint32_t)src[2] << 16;
  w |= (uint32_t)src[3] << 24;
  return w;
}


x86 assembly (clang, -O0):
<load32_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
shl    $0x18,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<load32_le>:
mov    0x8(%rdi),%ecx
mov    0x10(%rdi),%edx
shl    $0x8,%ecx
or     (%rdi),%ecx
shl    $0x10,%edx
mov    0x18(%rdi),%eax
shl    $0x18,%eax
or     %edx,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @load32_le(i64* %0) {
%2 = alloca i64*
%3 = alloca i32
store i64* %0, i64** %2
%4 = load i64*, i64** %2
%5 = getelementptr inbounds i64, i64* %4, i64 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
store i32 %7, i32* %3
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i64 1
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 8
%13 = load i32, i32* %3
%14 = or i32 %13, %12
store i32 %14, i32* %3
%15 = load i64*, i64** %2
%16 = getelementptr inbounds i64, i64* %15, i64 2
%17 = load i64, i64* %16
%18 = trunc i64 %17 to i32
%19 = shl i32 %18, 16
%20 = load i32, i32* %3
%21 = or i32 %20, %19
store i32 %21, i32* %3
%22 = load i64*, i64** %2
%23 = getelementptr inbounds i64, i64* %22, i64 3
%24 = load i64, i64* %23
%25 = trunc i64 %24 to i32
%26 = shl i32 %25, 24
%27 = load i32, i32* %3
%28 = or i32 %27, %26
store i32 %28, i32* %3
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
define i32 @load32_le(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = getelementptr inbounds i64, i64* %0, i64 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i64, i64* %0, i64 2
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i64, i64* %0, i64 3
%15 = load i64, i64* %14
%16 = trunc i64 %15 to i32
%17 = shl i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
void rop3_50_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T | S;
  stk2 = *D | stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_50_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_50_1_0>:
or     %esi,%edx
mov    (%rdi),%al
or     %al,%dl
xor    %dl,%al
and    %sil,%al
xor    %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_50_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %9
%16 = load i8*, i8** %4
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %5
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = xor i32 %32, -1
%34 = and i32 %30, %33
%35 = load i8*, i8** %4
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = load i8, i8* %5
%39 = zext i8 %38 to i32
%40 = and i32 %37, %39
%41 = or i32 %34, %40
%42 = trunc i32 %41 to i8
%43 = load i8*, i8** %4
store i8 %42, i8* %43
ret void
}

LLVM IR (-O2):
define void @rop3_50_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %4, %5
%7 = xor i8 %1, -1
%8 = and i8 %6, %7
%9 = and i8 %5, %1
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_banner(void) {
  printf("fwcutter "
         "FWCUTTER_VERSION_"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"fwcutter FWCUTTER_VERSION_\0A\00"
define void @print_banner() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"fwcutter FWCUTTER_VERSION_\00"
define void @print_banner() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ strlen(char const *);
char *xmemdup(char const *, scalar_t__);
char *xstrdup(char const *string) {
  return xmemdup(string, strlen(string) + 1);
}


x86 assembly (clang, -O0):
<xstrdup>:
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    %rax,%rsi
add    $0x1,%rsi
call   1040 <xmemdup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rax),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <xmemdup@plt>

LLVM IR (-O0):
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @xmemdup(i8* %3, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @xmemdup(i8* %0, i64 %3)
ret i8* %4
}
void print_double_hex(double f) {
  union {
    double f;
    int i
  } test;
  test.f = f;
  printf("%#010x\n", test.i);
}


x86 assembly (clang, -O0):
<print_double_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_double_hex>:
movq   %xmm0,%rsi
lea    0xee4(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
%union.anon = type { double }
@.str = [8 x i8] c"%x\0A\00"
define void @print_double_hex(double %0) {
%2 = alloca double
%3 = alloca %union.anon
store double %0, double* %2
%4 = load double, double* %2
%5 = bitcast %union.anon* %3 to double*
store double %4, double* %5
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%x\0A\00"
define void @print_double_hex(double %0) {
%2 = bitcast double %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
double exp(double);
double cosh(double x) { return (exp(x) + exp(-x)) * 0.5; }


x86 assembly (clang, -O0):
<cosh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  0xe9f(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosh>:
sub    $0x28,%rsp
movaps %xmm0,0x10(%rsp)
call   1030 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
xorpd  0xece(%rip),%xmm0
call   1030 <exp@plt>
addsd  0x8(%rsp),%xmm0
mulsd  0xecb(%rip),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @cosh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @exp(double %3)
%5 = load double, double* %2
%6 = fneg double %5
%7 = call double @exp(double %6)
%8 = fadd double %4, %7
%9 = fmul double %8, 5.000000e-01
ret double %9
}

LLVM IR (-O2):
define double @cosh(double %0) {
%2 = tail call double @exp(double %0)
%3 = fneg double %0
%4 = tail call double @exp(double %3)
%5 = fadd double %2, %4
%6 = fmul double %5, 5.000000e-01
ret double %6
}
char *skip(char *p) {
  for (; *p == ' '; p++) {
  }
  return p;
}


x86 assembly (clang, -O0):
<skip>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    112e <skip+0x2e>
jmp    111d <skip+0x1d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x20,0x1(%rax)
lea    0x1(%rax),%rax
je     1110 <skip+0x10>
ret

LLVM IR (-O0):
define i8* @skip(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %9, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 32
br i1 %7, label %8, label %12
8: ; preds = %3
br label %9
9: ; preds = %8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %2
br label %3
12: ; preds = %3
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
define i8* @skip(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 32
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
void *malloc(int);
int klock_getT1(void *tv) { tv = malloc(4); }


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

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

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

LLVM IR (-O2):
define i32 @klock_getT1(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int, char const *);
void ok(unsigned int ok, const char *msg) {
  static int testnum = 0;
  printf("%s %d - %s\n", (ok ? "ok" : "not ok"), ++testnum, msg);
}


x86 assembly (clang, -O0):
<ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xee3(%rip),%rsi
lea    0xee0(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    0x2eef(%rip),%edx
add    $0x1,%edx
mov    %edx,0x2ee6(%rip)
mov    -0x10(%rbp),%rcx
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ok>:
mov    %rsi,%rcx
test   %edi,%edi
lea    0xef0(%rip),%rax
lea    0xeed(%rip),%rsi
cmove  %rax,%rsi
mov    0x2eff(%rip),%edx
add    $0x1,%edx
mov    %edx,0x2ef6(%rip)
lea    0xec3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@ok.testnum = internal global i32 0
@.str = [12 x i8] c"%s %d - %s\0A\00"
@.str.1 = [3 x i8] c"ok\00"
@.str.2 = [7 x i8] c"not ok\00"
define void @ok(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0)
%9 = load i32, i32* @ok.testnum
%10 = add nsw i32 %9, 1
store i32 %10, i32* @ok.testnum
%11 = load i8*, i8** %4
%12 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %10, i8* %11)
ret void
}

LLVM IR (-O2):
@ok.testnum = internal unnamed_addr global i32 0
@.str = [12 x i8] c"%s %d - %s\0A\00"
@.str.1 = [3 x i8] c"ok\00"
@.str.2 = [7 x i8] c"not ok\00"
define void @ok(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%5 = load i32, i32* @ok.testnum
%6 = add nsw i32 %5, 1
store i32 %6, i32* @ok.testnum
%7 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stress_float_put(float const);
float __attribute__((no))
stress_funccall_float_2(const float a, const float b) {
  stress_float_put(a);
  stress_float_put(b);
  return a + b;
}


x86 assembly (clang, -O0):
<stress_funccall_float_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <stress_float_put@plt>
movss  -0x8(%rbp),%xmm0
call   1030 <stress_float_put@plt>
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_funccall_float_2>:
push   %rax
movss  %xmm1,(%rsp)
movss  %xmm0,0x4(%rsp)
call   1030 <stress_float_put@plt>
movss  (%rsp),%xmm0
call   1030 <stress_float_put@plt>
movss  0x4(%rsp),%xmm0
addss  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @stress_funccall_float_2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = call i32 @stress_float_put(float %5)
%7 = load float, float* %4
%8 = call i32 @stress_float_put(float %7)
%9 = load float, float* %3
%10 = load float, float* %4
%11 = fadd float %9, %10
ret float %11
}

LLVM IR (-O2):
define float @stress_funccall_float_2(float %0, float %1) {
%3 = tail call i32 @stress_float_put(float %0)
%4 = tail call i32 @stress_float_put(float %1)
%5 = fadd float %0, %1
ret float %5
}
/* Type definitions */
struct flashmap_descriptor {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_with_prefix(struct flashmap_descriptor const *,
                                     char *);
void fmd_print(const struct flashmap_descriptor *tree) {
  print_with_prefix(tree, "");
}


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

x86 assembly (clang, -O2):
<fmd_print>:
lea    0xee9(%rip),%rsi
jmp    1030 <print_with_prefix@plt>

LLVM IR (-O0):
%struct.flashmap_descriptor = type { i32 }
@.str = [1 x i8] zeroinitializer
define void @fmd_print(%struct.flashmap_descriptor* %0) {
%2 = alloca %struct.flashmap_descriptor*
store %struct.flashmap_descriptor* %0, %struct.flashmap_descriptor** %2
%3 = load %struct.flashmap_descriptor*, %struct.flashmap_descriptor** %2
%4 = call i32 @print_with_prefix(%struct.flashmap_descriptor* %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.flashmap_descriptor = type { i32 }
@.str = [1 x i8] zeroinitializer
define void @fmd_print(%struct.flashmap_descriptor* %0) {
%2 = tail call i32 @print_with_prefix(%struct.flashmap_descriptor* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int get_char_count();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("The number of chars is %d\n", get_char_count());
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"The number of chars is %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @get_char_count()
%3 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"The number of chars is %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @get_char_count()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ init();
int /*<<< orphan*/ scanf(char *, double *);
int /*<<< orphan*/ solve(double);
int main() {
  double mana;
  init();
  scanf("%lf", &mana);
  solve(mana);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <init@plt>
lea    0xeb3(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
call   1030 <solve@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <init@plt>
lea    0xec1(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
call   1030 <solve@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (...) @init()
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = call i32 @solve(double %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ do_exit(int);
int /*<<< orphan*/ do_remove();
void abort_gzip() {
  do_remove();
  do_exit(1);
}


x86 assembly (clang, -O0):
<abort_gzip>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <do_remove@plt>
mov    $0x1,%edi
call   1030 <do_exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<abort_gzip>:
push   %rax
xor    %eax,%eax
call   1040 <do_remove@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <do_exit@plt>

LLVM IR (-O0):
define void @abort_gzip() {
%1 = call i32 (...) @do_remove()
%2 = call i32 @do_exit(i32 1)
ret void
}

LLVM IR (-O2):
define void @abort_gzip() {
%1 = tail call i32 (...) @do_remove()
%2 = tail call i32 @do_exit(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void *funcion(void *input) {
  int i = (int)input;
  printf("Hebra numero %d\n", i);
}


x86 assembly (clang, -O0):
<funcion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcion>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Hebra numero %d\0A\00"
define i8* @funcion(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i32
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [17 x i8] c"Hebra numero %d\0A\00"
define noalias i8* @funcion(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* undef
}
void LMotorPwm_RestoreConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @LMotorPwm_RestoreConfig() {
ret void
}
/* Type definitions */
struct epoll_event {
  int events;
};

/* Variables and functions */
int epoll_wait(int, struct epoll_event *, int, int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ error(int /*<<< orphan*/, int /*<<< orphan*/, char *);
void block(int fd, int ev) {
  struct epoll_event ep = {.events = ev};
  if (epoll_wait(fd, &ep, sizeof ep, -1) == -1)
    error(0, errno, "epoll error");
}


x86 assembly (clang, -O0):
<block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
mov    $0xffffffff,%ecx
call   1030 <epoll_wait@plt>
cmp    $0xffffffff,%eax
jne    116a <block+0x4a>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    0xe9b(%rip),%rdx
call   1040 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<block>:
push   %rax
mov    %esi,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edx
mov    $0xffffffff,%ecx
call   1030 <epoll_wait@plt>
cmp    $0xffffffff,%eax
je     113d <block+0x1d>
pop    %rax
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
lea    0xeb3(%rip),%rdx
xor    %edi,%edi
call   1040 <error@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.epoll_event = type { i32 }
@errno = global i32 0
@.str = [12 x i8] c"epoll error\00"
define void @block(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.epoll_event
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds %struct.epoll_event, %struct.epoll_event* %5, i32 0, i32 0
%7 = load i32, i32* %4
store i32 %7, i32* %6
%8 = load i32, i32* %3
%9 = call i32 @epoll_wait(i32 %8, %struct.epoll_event* %5, i32 4, i32 -1)
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i32, i32* @errno
%13 = call i32 @error(i32 0, i32 %12, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
%struct.epoll_event = type { i32 }
@errno = global i32 0
@.str = [12 x i8] c"epoll error\00"
define void @block(i32 %0, i32 %1) {
%3 = alloca %struct.epoll_event
%4 = bitcast %struct.epoll_event* %3 to i8*
%5 = getelementptr inbounds %struct.epoll_event, %struct.epoll_event* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = call i32 @epoll_wait(i32 %0, %struct.epoll_event* %3, i32 4, i32 -1)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @errno
%10 = call i32 @error(i32 0, i32 %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %8, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct ts_nit {
  int dummy;
};

/* Variables and functions */
struct ts_nit *ts_nit_alloc();
struct ts_nit *ts_nit_init(struct ts_nit *, int /*<<< orphan*/);
struct ts_nit *ts_nit_alloc_init(uint16_t network_id) {
  struct ts_nit *nit = ts_nit_alloc();
  if (!nit)
    return NULL;
  return ts_nit_init(nit, network_id);
}


x86 assembly (clang, -O0):
<ts_nit_alloc_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    $0x0,%al
call   1040 <ts_nit_alloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    114e <ts_nit_alloc_init+0x2e>
movq   $0x0,-0x8(%rbp)
jmp    115e <ts_nit_alloc_init+0x3e>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <ts_nit_init@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_nit_alloc_init>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <ts_nit_alloc@plt>
test   %rax,%rax
je     113a <ts_nit_alloc_init+0x1a>
mov    %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <ts_nit_init@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ts_nit = type { i32 }
define %struct.ts_nit* @ts_nit_alloc_init(i32 %0) {
%2 = alloca %struct.ts_nit*
%3 = alloca i32
%4 = alloca %struct.ts_nit*
store i32 %0, i32* %3
%5 = call %struct.ts_nit* (...) @ts_nit_alloc()
store %struct.ts_nit* %5, %struct.ts_nit** %4
%6 = load %struct.ts_nit*, %struct.ts_nit** %4
%7 = icmp ne %struct.ts_nit* %6, null
br i1 %7, label %9, label %8
8: ; preds = %1
store %struct.ts_nit* null, %struct.ts_nit** %2
br label %13
9: ; preds = %1
%10 = load %struct.ts_nit*, %struct.ts_nit** %4
%11 = load i32, i32* %3
%12 = call %struct.ts_nit* @ts_nit_init(%struct.ts_nit* %10, i32 %11)
store %struct.ts_nit* %12, %struct.ts_nit** %2
br label %13
13: ; preds = %9, %8
%14 = load %struct.ts_nit*, %struct.ts_nit** %2
ret %struct.ts_nit* %14
}

LLVM IR (-O2):
%struct.ts_nit = type { i32 }
define %struct.ts_nit* @ts_nit_alloc_init(i32 %0) {
%2 = tail call %struct.ts_nit* (...) @ts_nit_alloc()
%3 = icmp eq %struct.ts_nit* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call %struct.ts_nit* @ts_nit_init(%struct.ts_nit* %2, i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi %struct.ts_nit* [ %5, %4 ], [ null, %1 ]
ret %struct.ts_nit* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ESPIPE;
int /*<<< orphan*/ errno;
int fseek(FILE *stream, long int offset, int origin) {
  errno = ESPIPE;
  return -1;
}


x86 assembly (clang, -O0):
<fseek>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ed2(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb9(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fseek>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ESPIPE = global i32 0
@errno = global i32 0
define i32 @fseek(i32* %0, i64 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32
store i32* %0, i32** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* @ESPIPE
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ESPIPE = global i32 0
@errno = global i32 0
define i32 @fseek(i32* nocapture readnone %0, i64 %1, i32 %2) {
%4 = load i32, i32* @ESPIPE
store i32 %4, i32* @errno
ret i32 -1
}
/* Type definitions */
struct SensorModul {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ initAcpiBattery(struct SensorModul *);
int /*<<< orphan*/ initAcpiThermal(struct SensorModul *);
void initAcpi(struct SensorModul *sm) {
  initAcpiBattery(sm);
  initAcpiThermal(sm);
}


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

x86 assembly (clang, -O2):
<initAcpi>:
push   %rbx
mov    %rdi,%rbx
call   1030 <initAcpiBattery@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <initAcpiThermal@plt>

LLVM IR (-O0):
%struct.SensorModul = type { i32 }
define void @initAcpi(%struct.SensorModul* %0) {
%2 = alloca %struct.SensorModul*
store %struct.SensorModul* %0, %struct.SensorModul** %2
%3 = load %struct.SensorModul*, %struct.SensorModul** %2
%4 = call i32 @initAcpiBattery(%struct.SensorModul* %3)
%5 = load %struct.SensorModul*, %struct.SensorModul** %2
%6 = call i32 @initAcpiThermal(%struct.SensorModul* %5)
ret void
}

LLVM IR (-O2):
%struct.SensorModul = type { i32 }
define void @initAcpi(%struct.SensorModul* %0) {
%2 = tail call i32 @initAcpiBattery(%struct.SensorModul* %0)
%3 = tail call i32 @initAcpiThermal(%struct.SensorModul* %0)
ret void
}
int main() {
  double A[10], b;
  int i;
  for (i = 0; i < 10; i++) {
    if (i > 5)
      A[i] = 10 - A[i - 1];
    else
      A[i] = 10 + A[i - 1];
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x6c(%rbp)
cmpl   $0xa,-0x6c(%rbp)
jge    117e <main+0x7e>
cmpl   $0x5,-0x6c(%rbp)
jle    114b <main+0x4b>
mov    -0x6c(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  0xeca(%rip),%xmm0
subsd  -0x60(%rbp,%rax,8),%xmm0
movslq -0x6c(%rbp),%rax
movsd  %xmm0,-0x60(%rbp,%rax,8)
jmp    116b <main+0x6b>
mov    -0x6c(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  0xea5(%rip),%xmm0
addsd  -0x60(%rbp,%rax,8),%xmm0
movslq -0x6c(%rbp),%rax
movsd  %xmm0,-0x60(%rbp,%rax,8)
jmp    1170 <main+0x70>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1112 <main+0x12>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x double]
%3 = alloca double
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
br label %5
5: ; preds = %32, %0
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %35
8: ; preds = %5
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 5
br i1 %10, label %11, label %21
11: ; preds = %8
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %14
%16 = load double, double* %15
%17 = fsub double 1.000000e+01, %16
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %19
store double %17, double* %20
br label %31
21: ; preds = %8
%22 = load i32, i32* %4
%23 = sub nsw i32 %22, 1
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %24
%26 = load double, double* %25
%27 = fadd double 1.000000e+01, %26
%28 = load i32, i32* %4
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %29
store double %27, double* %30
br label %31
31: ; preds = %21, %11
br label %32
32: ; preds = %31
%33 = load i32, i32* %4
%34 = add nsw i32 %33, 1
store i32 %34, i32* %4
br label %5
35: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void clntraw_geterr() {}


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

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

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

LLVM IR (-O2):
define void @clntraw_geterr() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ step_hash(int);
int func_33(int *p_34, unsigned p_35) {
  signed char l_646[7][5] = {
      {6L, 0xF7L, 6L, 0x4CL, (-5L)}, {6L, 0xF7L, 6L, 0x4CL, (-5L)},
      {6L, 0xF7L, 6L, 0x4CL, (-5L)}, {6L, 0xF7L, 6L, 0x4CL, (-5L)},
      {6L, 0xF7L, 6L, 0x4CL, (-5L)}, {6L, 0xF7L, 6L, 0x4CL, (-5L)},
      {6L, 0xF7L, 6L, 0x4CL, (-5L)}};
  int i, j;
  step_hash(571);
  return l_646[4][1];
}


x86 assembly (clang, -O0):
<func_33>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x23,%edx
call   1040 <memcpy@plt>
mov    $0x23b,%edi
call   1030 <step_hash@plt>
movsbl -0x1b(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_33>:
push   %rax
mov    $0x23b,%edi
call   1030 <step_hash@plt>
mov    $0xfffffff7,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.func_33.l_646 = [7 x [5 x i8]] [[5 x i8] c"\06\F7\06L\FB", [5 x i8] c"\06\F7\06L\FB", [5 x i8] c"\06\F7\06L\FB", [5 x i8] c"\06\F7\06L\FB", [5 x i8] c"\06\F7\06L\FB", [5 x i8] c"\06\F7\06L\FB", [5 x i8] c"\06\F7\06L\FB"]
define i32 @func_33(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca [7 x [5 x i8]]
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%8 = bitcast [7 x [5 x i8]]* %5 to i8*
%9 = call i32 @step_hash(i32 571)
%10 = getelementptr inbounds [7 x [5 x i8]], [7 x [5 x i8]]* %5, i64 0, i64 4
%11 = getelementptr inbounds [5 x i8], [5 x i8]* %10, i64 0, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @func_33(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @step_hash(i32 571)
ret i32 -9
}
/* Variables and functions */
int /*<<< orphan*/ test(char *);
int main(void) {
  test("arg");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"arg\00"
define i32 @main() {
%1 = tail call i32 @test(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct xrdp_channel {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ g_free(struct xrdp_channel *);
void xrdp_channel_delete(struct xrdp_channel *self) {
  if (self == 0) {
    return;
  }
  g_free(self);
}


x86 assembly (clang, -O0):
<xrdp_channel_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <xrdp_channel_delete+0x1c>
jmp    1135 <xrdp_channel_delete+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <g_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrdp_channel_delete>:
test   %rdi,%rdi
je     111a <xrdp_channel_delete+0xa>
jmp    1030 <g_free@plt>
ret

LLVM IR (-O0):
%struct.xrdp_channel = type { i32 }
define void @xrdp_channel_delete(%struct.xrdp_channel* %0) {
%2 = alloca %struct.xrdp_channel*
store %struct.xrdp_channel* %0, %struct.xrdp_channel** %2
%3 = load %struct.xrdp_channel*, %struct.xrdp_channel** %2
%4 = icmp eq %struct.xrdp_channel* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load %struct.xrdp_channel*, %struct.xrdp_channel** %2
%8 = call i32 @g_free(%struct.xrdp_channel* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.xrdp_channel = type { i32 }
define void @xrdp_channel_delete(%struct.xrdp_channel* %0) {
%2 = icmp eq %struct.xrdp_channel* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @g_free(%struct.xrdp_channel* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Type definitions */
struct lex_buf {
  int dummy;
};

/* Variables and functions */
int getch(struct lex_buf *);
int skip_white_space(struct lex_buf *buf) {
  int c;
  do {
    c = getch(buf);
  } while ((c == ' ') || (c == '\t'));
  return c;
}


x86 assembly (clang, -O0):
<skip_white_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getch@plt>
mov    %eax,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     1141 <skip_white_space+0x31>
cmpl   $0x9,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    111c <skip_white_space+0xc>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_white_space>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <getch@plt>
cmp    $0x9,%eax
je     1120 <skip_white_space+0x10>
cmp    $0x20,%eax
je     1120 <skip_white_space+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.lex_buf = type { i32 }
define i32 @skip_white_space(%struct.lex_buf* %0) {
%2 = alloca %struct.lex_buf*
%3 = alloca i32
store %struct.lex_buf* %0, %struct.lex_buf** %2
br label %4
4: ; preds = %13, %1
%5 = load %struct.lex_buf*, %struct.lex_buf** %2
%6 = call i32 @getch(%struct.lex_buf* %5)
store i32 %6, i32* %3
br label %7
7: ; preds = %4
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 32
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 9
br label %13
13: ; preds = %10, %7
%14 = phi i1 [ true, %7 ], [ %12, %10 ]
br i1 %14, label %4, label %15
15: ; preds = %13
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.lex_buf = type { i32 }
define i32 @skip_white_space(%struct.lex_buf* %0) {
br label %2
2: ; preds = %4, %1
%3 = tail call i32 @getch(%struct.lex_buf* %0)
switch i32 %3, label %5 [
i32 32, label %4
i32 9, label %4
]
4: ; preds = %2, %2
br label %2
5: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x31() {
  Assert_real((isspace(49) == 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_isspace.c",
              250, ("isspace should be 0 for 1"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x31>:
push   %rax
mov    $0x31,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xfa,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for 1\00"
define void @t_isspace_0x31() {
%1 = call i64 @isspace(i32 49)
%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 250, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for 1\00"
define void @t_isspace_0x31() {
%1 = tail call i64 @isspace(i32 49)
%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 250, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int hash_code_int(void *a) {
  int *aa;
  aa = (int *)a;
  return *aa;
}


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

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

LLVM IR (-O0):
define i32 @hash_code_int(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @hash_code_int(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int foo(int);
int main(void) {
  if (foo(0x32) != 0x32ff || foo(0x174) != 0x74ff)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x32,%edi
call   1040 <foo@plt>
cmp    $0x32ff,%eax
jne    1159 <main+0x39>
mov    $0x174,%edi
call   1040 <foo@plt>
cmp    $0x74ff,%eax
je     1160 <main+0x40>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x32,%edi
call   1040 <foo@plt>
cmp    $0x32ff,%eax
jne    1147 <main+0x27>
mov    $0x174,%edi
call   1040 <foo@plt>
cmp    $0x74ff,%eax
jne    1147 <main+0x27>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 50)
%3 = icmp ne i32 %2, 13055
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = call i32 @foo(i32 372)
%6 = icmp ne i32 %5, 29951
br i1 %6, label %7, label %9
7: ; preds = %4, %0
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 50)
%2 = icmp eq i32 %1, 13055
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @foo(i32 372)
%5 = icmp eq i32 %4, 29951
br i1 %5, label %8, label %6
6: ; preds = %3, %0
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %3
ret i32 0
}
void v4(unsigned a, unsigned b) {
  if (a < 0x1000)
    return;
  if (a > 0x1000)
    return;
  if (b < 0x0110)
    return;
  if (!__builtin_constant_p((a | b) >= 0x01000))
    __asm__("vrp.bug.always.true");
  if (__builtin_constant_p((a | b) >= 0x10000))
    __asm__("vrp.bug.not.always.true");
}


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

LLVM IR (-O0):
LLVM IR (-O2):
define void @v4(i32 %0, i32 %1) {
ret void
}
void ptwq_set_current_thread_priority(int priority) { return; }


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

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

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

LLVM IR (-O2):
define void @ptwq_set_current_thread_priority(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ swap32(int /*<<< orphan*/);
void print_chunkid(uint32_t id) {
  char str[5] = {0};
  id = swap32(id);
  memcpy(str, &id, 4);
  puts(str);
}


x86 assembly (clang, -O0):
<print_chunkid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x9(%rbp),%rdi
xor    %esi,%esi
mov    $0x5,%edx
call   1040 <memset@plt>
mov    -0x4(%rbp),%edi
call   1060 <swap32@plt>
mov    %eax,-0x4(%rbp)
lea    -0x9(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1050 <memcpy@plt>
lea    -0x9(%rbp),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_chunkid>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0x8(%rsp)
movl   $0x0,0x4(%rsp)
call   1050 <swap32@plt>
mov    %eax,0xc(%rsp)
lea    0x4(%rsp),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @print_chunkid(i32 %0) {
%2 = alloca i32
%3 = alloca [5 x i8]
store i32 %0, i32* %2
%4 = bitcast [5 x i8]* %3 to i8*
%5 = load i32, i32* %2
%6 = call i32 @swap32(i32 %5)
store i32 %6, i32* %2
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%8 = call i32 @memcpy(i8* %7, i32* %2, i32 4)
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%10 = call i32 @puts(i8* %9)
ret void
}

LLVM IR (-O2):
define void @print_chunkid(i32 %0) {
%2 = alloca i32
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @swap32(i32 %0)
store i32 %5, i32* %2
%6 = call i32 @memcpy(i8* %4, i32* %2, i32 4)
%7 = call i32 @puts(i8* %4)
ret void
}
float edge(const float a, const float b, const float c) {
  if (b < a)
    return a;
  if (b > c)
    return c;
  return b;
}


x86 assembly (clang, -O0):
<edge>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <edge+0x35>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <edge+0x5d>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1153 <edge+0x53>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <edge+0x5d>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<edge>:
minss  %xmm1,%xmm2
cmpltss %xmm0,%xmm1
andps  %xmm1,%xmm0
andnps %xmm2,%xmm1
orps   %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @edge(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %6
%9 = load float, float* %5
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %5
store float %12, float* %4
br label %21
13: ; preds = %3
%14 = load float, float* %6
%15 = load float, float* %7
%16 = fcmp ogt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load float, float* %7
store float %18, float* %4
br label %21
19: ; preds = %13
%20 = load float, float* %6
store float %20, float* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
define float @edge(float %0, float %1, float %2) {
%4 = fcmp olt float %1, %0
%5 = fcmp ogt float %1, %2
%6 = select i1 %5, float %2, float %1
%7 = select i1 %4, float %0, float %6
ret float %7
}