xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ mac_verify(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *mac_get_oui(char *full_mac) {
  if (mac_verify(full_mac))
    return ("INVALID_MAC");
  static char half_buffer[9] = {0};
  strncpy(half_buffer, full_mac, 8);
  return (half_buffer);
}


x86 assembly (clang, -O0):
<mac_get_oui>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <mac_verify@plt>
cmp    $0x0,%rax
je     114f <mac_get_oui+0x2f>
lea    0xeba(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116f <mac_get_oui+0x4f>
mov    -0x10(%rbp),%rsi
lea    0x2ed7(%rip),%rdi
mov    $0x8,%edx
call   1030 <strncpy@plt>
lea    0x2ec6(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mac_get_oui>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <mac_verify@plt>
test   %rax,%rax
je     113a <mac_get_oui+0x1a>
lea    0xec8(%rip),%rbx
jmp    1151 <mac_get_oui+0x31>
lea    0x2ef0(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"INVALID_MAC\00"
@mac_get_oui.half_buffer = internal global [9 x i8] zeroinitializer
define i8* @mac_get_oui(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @mac_verify(i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %2
br label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @strncpy(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @mac_get_oui.half_buffer, i64 0, i64 0), i8* %9, i32 8)
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @mac_get_oui.half_buffer, i64 0, i64 0), i8** %2
br label %11
11: ; preds = %8, %7
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [12 x i8] c"INVALID_MAC\00"
@mac_get_oui.half_buffer = internal global [9 x i8] zeroinitializer
define i8* @mac_get_oui(i8* %0) {
%2 = tail call i64 @mac_verify(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @strncpy(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @mac_get_oui.half_buffer, i64 0, i64 0), i8* %0, i32 8)
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @mac_get_oui.half_buffer, i64 0, i64 0), %4 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ z_streamp;

/* Variables and functions */
int inflateInit(int /*<<< orphan*/);
__attribute__((__visibility__("default"))) int kz_inflate_init(z_streamp strm) {
  return inflateInit(strm);
}


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

x86 assembly (clang, -O2):
<kz_inflate_init>:
jmp    1030 <inflateInit@plt>

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

LLVM IR (-O2):
define i32 @kz_inflate_init(i32 %0) {
%2 = tail call i32 @inflateInit(i32 %0)
ret i32 %2
}
/* Variables and functions */
double fabs(double);
double one_minus_x2(double x) {
  return (fabs(x) > 0.1) ? (1. + x) * (1. - x) : 1. - x * x;
}


x86 assembly (clang, -O0):
<one_minus_x2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xefb(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xedf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1153 <one_minus_x2+0x53>
movsd  0xed5(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  0xec8(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1189 <one_minus_x2+0x89>
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe88(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<one_minus_x2>:
movapd 0xef8(%rip),%xmm1
andpd  %xmm0,%xmm1
ucomisd 0xefc(%rip),%xmm1
jbe    1133 <one_minus_x2+0x33>
movsd  0xefa(%rip),%xmm1
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
ret
mulsd  %xmm0,%xmm0
movsd  0xed9(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @one_minus_x2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fabs.f64(double %3)
%5 = fcmp ogt double %4, 1.000000e-01
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load double, double* %2
%8 = fadd double 1.000000e+00, %7
%9 = load double, double* %2
%10 = fsub double 1.000000e+00, %9
%11 = fmul double %8, %10
br label %17
12: ; preds = %1
%13 = load double, double* %2
%14 = load double, double* %2
%15 = fneg double %13
%16 = call double @llvm.fmuladd.f64(double %15, double %14, double 1.000000e+00)
br label %17
17: ; preds = %12, %6
%18 = phi double [ %11, %6 ], [ %16, %12 ]
ret double %18
}

LLVM IR (-O2):
define double @one_minus_x2(double %0) {
%2 = tail call double @llvm.fabs.f64(double %0)
%3 = fcmp ogt double %2, 1.000000e-01
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = fadd double %0, 1.000000e+00
%6 = fsub double 1.000000e+00, %0
%7 = fmul double %5, %6
br label %11
8: ; preds = %1
%9 = fneg double %0
%10 = tail call double @llvm.fmuladd.f64(double %9, double %0, double 1.000000e+00)
br label %11
11: ; preds = %8, %4
%12 = phi double [ %7, %4 ], [ %10, %8 ]
ret double %12
}
/* Type definitions */
struct js_value {
  int dummy;
};

/* Variables and functions */
struct js_value *js_create_string(char *);
int /*<<< orphan*/ js_print(struct js_value *);
int /*<<< orphan*/ js_println(struct js_value *);
void js_print2ln(struct js_value *s1, struct js_value *s2) {
  js_print(s1);
  js_print(js_create_string(" "));
  js_println(s2);
}


x86 assembly (clang, -O0):
<js_print2ln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <js_print@plt>
lea    0xeb0(%rip),%rdi
call   1050 <js_create_string@plt>
mov    %rax,%rdi
call   1030 <js_print@plt>
mov    -0x10(%rbp),%rdi
call   1040 <js_println@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<js_print2ln>:
push   %rbx
mov    %rsi,%rbx
call   1030 <js_print@plt>
lea    0xec0(%rip),%rdi
call   1050 <js_create_string@plt>
mov    %rax,%rdi
call   1030 <js_print@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <js_println@plt>

LLVM IR (-O0):
%struct.js_value = type { i32 }
@.str = [2 x i8] c" \00"
define void @js_print2ln(%struct.js_value* %0, %struct.js_value* %1) {
%3 = alloca %struct.js_value*
%4 = alloca %struct.js_value*
store %struct.js_value* %0, %struct.js_value** %3
store %struct.js_value* %1, %struct.js_value** %4
%5 = load %struct.js_value*, %struct.js_value** %3
%6 = call i32 @js_print(%struct.js_value* %5)
%7 = call %struct.js_value* @js_create_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @js_print(%struct.js_value* %7)
%9 = load %struct.js_value*, %struct.js_value** %4
%10 = call i32 @js_println(%struct.js_value* %9)
ret void
}

LLVM IR (-O2):
%struct.js_value = type { i32 }
@.str = [2 x i8] c" \00"
define void @js_print2ln(%struct.js_value* %0, %struct.js_value* %1) {
%3 = tail call i32 @js_print(%struct.js_value* %0)
%4 = tail call %struct.js_value* @js_create_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @js_print(%struct.js_value* %4)
%6 = tail call i32 @js_println(%struct.js_value* %1)
ret void
}
int f(int a[100], int x) {
  a[x] = x * x;
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edx
imul   -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movslq %esi,%rax
imul   %esi,%esi
mov    %esi,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define i32 @f(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %4
%7 = mul nsw i32 %5, %6
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
store i32 %7, i32* %11
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
define i32 @f(i32* nocapture writeonly %0, i32 returned %1) {
%3 = mul nsw i32 %1, %1
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %3, i32* %5
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__8__GeneralIO__makeInput();
void CC2420TransmitP__SFD__makeInput(void) {
  Msp430GpioC__8__GeneralIO__makeInput();
}


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

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

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

LLVM IR (-O2):
define void @CC2420TransmitP__SFD__makeInput() {
%1 = tail call i32 (...) @Msp430GpioC__8__GeneralIO__makeInput()
ret void
}
void SNDWavSetVolume(__attribute((unused)) int volume) {}


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

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

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

LLVM IR (-O2):
define void @SNDWavSetVolume(i32 %0) {
ret void
}
/* Type definitions */
struct event_base {
  int dummy;
};
typedef int /*<<< orphan*/ evutil_socket_t;

/* Variables and functions */
int /*<<< orphan*/ event_base_loopbreak(struct event_base *);
void signal_cb_term(evutil_socket_t fd, short event, void *arg) {
  (void)fd;
  (void)event;
  struct event_base *base = arg;
  event_base_loopbreak(base);
}


x86 assembly (clang, -O0):
<signal_cb_term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <event_base_loopbreak@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_cb_term>:
mov    %rdx,%rdi
jmp    1030 <event_base_loopbreak@plt>

LLVM IR (-O0):
%struct.event_base = type { i32 }
define void @signal_cb_term(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i8*
%7 = alloca %struct.event_base*
store i32 %0, i32* %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%8 = load i32, i32* %4
%9 = load i16, i16* %5
%10 = load i8*, i8** %6
%11 = bitcast i8* %10 to %struct.event_base*
store %struct.event_base* %11, %struct.event_base** %7
%12 = load %struct.event_base*, %struct.event_base** %7
%13 = call i32 @event_base_loopbreak(%struct.event_base* %12)
ret void
}

LLVM IR (-O2):
%struct.event_base = type { i32 }
define void @signal_cb_term(i32 %0, i16 signext %1, i8* %2) {
%4 = bitcast i8* %2 to %struct.event_base*
%5 = tail call i32 @event_base_loopbreak(%struct.event_base* %4)
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ftw(char *, int (*)(char const *, struct stat const *, int),
                       int);
int /*<<< orphan*/ getPath(char *, char *);
void attributeNAME() {
  int getFile(const char *filename, const struct stat *statptr, int flag);
  char searchPath[1000];
  getPath(searchPath, "SEARCHDIR");
  ftw(searchPath, getFile, 5);
}


x86 assembly (clang, -O0):
<attributeNAME>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
lea    -0x3f0(%rbp),%rdi
lea    0xec7(%rip),%rsi
call   1030 <getPath@plt>
lea    -0x3f0(%rbp),%rdi
mov    0x2e94(%rip),%rsi
mov    $0x5,%edx
call   1040 <ftw@plt>
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<attributeNAME>:
push   %rbx
sub    $0x3f0,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <getPath@plt>
mov    0x2e9f(%rip),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
call   1040 <ftw@plt>
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [10 x i8] c"SEARCHDIR\00"
define void @attributeNAME() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getPath(i8* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%5 = call i32 @ftw(i8* %4, i32 (i8*, %struct.stat*, i32)* @getFile, i32 5)
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [10 x i8] c"SEARCHDIR\00"
define void @attributeNAME() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getPath(i8* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @ftw(i8* %2, i32 (i8*, %struct.stat*, i32)* @getFile, i32 5)
ret void
}
/* Variables and functions */
double sqrt(double const);
double norm(const double w[3]) {
  return sqrt(w[0] * w[0] + w[1] * w[1] + w[2] * w[2]);
}


x86 assembly (clang, -O0):
<norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<norm>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1141 <norm+0x31>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @norm(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fmul double %11, %14
%16 = call double @llvm.fmuladd.f64(double %5, double %8, double %15)
%17 = load double*, double** %2
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = load double*, double** %2
%21 = getelementptr inbounds double, double* %20, i64 2
%22 = load double, double* %21
%23 = call double @llvm.fmuladd.f64(double %19, double %22, double %16)
%24 = call double @sqrt(double %23)
ret double %24
}

LLVM IR (-O2):
define double @norm(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %6)
%10 = tail call double @sqrt(double %9)
ret double %10
}
double amsp_interpolate_linear(double v1, double v2, double rt) {
  return rt * v2 + (1 - rt) * v1;
}


x86 assembly (clang, -O0):
<amsp_interpolate_linear>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  0xedb(%rip),%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<amsp_interpolate_linear>:
movsd  0xef8(%rip),%xmm3
subsd  %xmm2,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @amsp_interpolate_linear(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load double, double* %5
%9 = load double, double* %6
%10 = fsub double 1.000000e+00, %9
%11 = load double, double* %4
%12 = fmul double %10, %11
%13 = call double @llvm.fmuladd.f64(double %7, double %8, double %12)
ret double %13
}

LLVM IR (-O2):
define double @amsp_interpolate_linear(double %0, double %1, double %2) {
%4 = fsub double 1.000000e+00, %2
%5 = fmul double %4, %0
%6 = tail call double @llvm.fmuladd.f64(double %2, double %1, double %5)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
void gen_logical_negation(void) { gen_call("cclneg"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"cclneg\00"
define void @gen_logical_negation() {
%1 = call i32 @gen_call(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"cclneg\00"
define void @gen_logical_negation() {
%1 = tail call i32 @gen_call(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int ligne_vide(char *buff) {
  if (strcmp(buff, "\r\n") == 0)
    return 1;
  else if (strcmp(buff, "\n") == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<ligne_vide>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <ligne_vide+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1174 <ligne_vide+0x64>
mov    -0x10(%rbp),%rdi
lea    0xeb4(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1168 <ligne_vide+0x58>
movl   $0x1,-0x4(%rbp)
jmp    1174 <ligne_vide+0x64>
jmp    116d <ligne_vide+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ligne_vide>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1141 <ligne_vide+0x31>
lea    0xed5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @ligne_vide(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ wm_debug(char *);
void grow_up() { wm_debug("Growing up."); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Growing up.\00"
define void @grow_up() {
%1 = call i32 @wm_debug(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Growing up.\00"
define void @grow_up() {
%1 = tail call i32 @wm_debug(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double serieS(int);
int main() {
  printf("O valor da serie S para n = 4 e: %f", serieS(1));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"O valor da serie S para n = 4 e: %f\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double @serieS(i32 1)
%3 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), double %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"O valor da serie S para n = 4 e: %f\00"
define i32 @main() {
%1 = tail call double @serieS(i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scan_dir(char *, int /*<<< orphan*/);
int main() {
  char *path = "/home/sllx/Document";
  printf("*********** scan %s start ***********", path);
  scan_dir(path, 0);
  printf("*********** scan %s end *************", path);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeec(%rip),%rdi
lea    0xed1(%rip),%rbx
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <scan_dir@plt>
lea    0xef2(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"/home/sllx/Document\00"
@.str.1 = [38 x i8] c"*********** scan %s start ***********\00"
@.str.2 = [38 x i8] c"*********** scan %s end *************\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @scan_dir(i8* %5, i32 0)
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"/home/sllx/Document\00"
@.str.1 = [38 x i8] c"*********** scan %s start ***********\00"
@.str.2 = [38 x i8] c"*********** scan %s end *************\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @scan_dir(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int f1(int *p) { return *p; }


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

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

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

LLVM IR (-O2):
define i32 @f1(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
void wczytaj(int *x1, int *x2) {
  printf("Podaj x1: ");
  scanf("%d", x1);
  printf("Podaj x2: ");
  scanf("%d", x2);
}


x86 assembly (clang, -O0):
<wczytaj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xec4(%rip),%rdi
call   1040 <scanf@plt>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xea8(%rip),%rdi
call   1040 <scanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wczytaj>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xecd(%rip),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <scanf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Podaj x1: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [11 x i8] c"Podaj x2: \00"
define void @wczytaj(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = load i32*, i32** %3
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32*, i32** %4
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %9)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Podaj x1: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [11 x i8] c"Podaj x2: \00"
define void @wczytaj(i32* %0, i32* %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %0)
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int sizeOfType(char *type) {
  if (!strcmp(type, "byte"))
    return 1;
  else if (!strcmp(type, "ptr"))
    return 2;
  else
    return -131072;
}


x86 assembly (clang, -O0):
<sizeOfType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1141 <sizeOfType+0x31>
movl   $0x1,-0x4(%rbp)
jmp    116d <sizeOfType+0x5d>
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1166 <sizeOfType+0x56>
movl   $0x2,-0x4(%rbp)
jmp    116d <sizeOfType+0x5d>
movl   $0xfffe0000,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sizeOfType>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1144 <sizeOfType+0x34>
lea    0xeda(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
mov    $0x2,%ecx
mov    $0xfffe0000,%eax
cmove  %ecx,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"byte\00"
@.str.1 = [4 x i8] c"ptr\00"
define i32 @sizeOfType(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 2, i32 -131072
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ op_write1(int);
void op_enc_ret(void) { op_write1(0xc9); }


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

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

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

LLVM IR (-O2):
define void @op_enc_ret() {
%1 = tail call i32 @op_write1(i32 201)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pem_password_cb;
typedef int /*<<< orphan*/ d2i_of_void;
typedef int /*<<< orphan*/ X509_CRL;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *PEM_ASN1_read(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int /*<<< orphan*/ *, void **,
                                  int /*<<< orphan*/ *, void *);
int /*<<< orphan*/ PEM_STRING_X509_CRL;
scalar_t__ d2i_X509_CRL;
X509_CRL *PEM_read_X509_CRL(FILE *fp, X509_CRL **x, pem_password_cb *cb,
                            void *u) {
  return PEM_ASN1_read((d2i_of_void *)d2i_X509_CRL, PEM_STRING_X509_CRL, fp,
                       (void **)x, cb, u);
}


x86 assembly (clang, -O0):
<PEM_read_X509_CRL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%rdi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <PEM_ASN1_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_read_X509_CRL>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ebd(%rip),%rax
mov    (%rax),%rdi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
jmp    1030 <PEM_ASN1_read@plt>

LLVM IR (-O0):
@d2i_X509_CRL = global i64 0
@PEM_STRING_X509_CRL = global i32 0
define i32* @PEM_read_X509_CRL(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i64, i64* @d2i_X509_CRL
%10 = inttoptr i64 %9 to i32*
%11 = load i32, i32* @PEM_STRING_X509_CRL
%12 = load i32*, i32** %5
%13 = load i32**, i32*** %6
%14 = bitcast i32** %13 to i8**
%15 = load i32*, i32** %7
%16 = load i8*, i8** %8
%17 = call i32* @PEM_ASN1_read(i32* %10, i32 %11, i32* %12, i8** %14, i32* %15, i8* %16)
ret i32* %17
}

LLVM IR (-O2):
@d2i_X509_CRL = global i64 0
@PEM_STRING_X509_CRL = global i32 0
define i32* @PEM_read_X509_CRL(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = load i64, i64* @d2i_X509_CRL
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_X509_CRL
%8 = bitcast i32** %1 to i8**
%9 = tail call i32* @PEM_ASN1_read(i32* %6, i32 %7, i32* %0, i8** %8, i32* %2, i8* %3)
ret i32* %9
}
void nseel_asm_assign(void) {
  __asm__("movl (%eax), %ecx\n"
          "movl 4(%eax), %edx\n"
          "movl %edx, %eax\n"
          "addl $0x00100000, %eax\n"
          "andl $0x7ff00000, %eax\n"
          "cmpl $0x00100000, %eax\n"
          "jg 0f\n"
          "subl %ecx, %ecx\n"
          "subl %edx, %edx\n"
          "0:\n"
          "movl %edi, %eax\n"
          "movl %ecx, (%edi)\n"
          "movl %edx, 4(%edi)\n");
}


x86 assembly (clang, -O0):
<nseel_asm_assign>:
push   %rbp
mov    %rsp,%rbp
mov    (%eax),%ecx
mov    0x4(%eax),%edx
mov    %edx,%eax
add    $0x100000,%eax
and    $0x7ff00000,%eax
cmp    $0x100000,%eax
jg     1126 <nseel_asm_assign+0x26>
sub    %ecx,%ecx
sub    %edx,%edx
mov    %edi,%eax
mov    %ecx,(%edi)
mov    %edx,0x4(%edi)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nseel_asm_assign>:
mov    (%eax),%ecx
mov    0x4(%eax),%edx
mov    %edx,%eax
add    $0x100000,%eax
and    $0x7ff00000,%eax
cmp    $0x100000,%eax
jg     111e <nseel_asm_assign+0x1e>
sub    %ecx,%ecx
sub    %edx,%edx
mov    %edi,%eax
mov    %ecx,(%edi)
mov    %edx,0x4(%edi)
ret

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

LLVM IR (-O2):
define void @nseel_asm_assign() {
tail call void asm sideeffect "movl (%eax), %ecx\0Amovl 4(%eax), %edx\0Amovl %edx, %eax\0Aaddl $$0x00100000, %eax\0Aandl $$0x7ff00000, %eax\0Acmpl $$0x00100000, %eax\0Ajg 0f\0Asubl %ecx, %ecx\0Asubl %edx, %edx\0A0:\0Amovl %edi, %eax\0Amovl %ecx, (%edi)\0Amovl %edx, 4(%edi)\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void aligned_free(void *memblock) { free(memblock); }


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

x86 assembly (clang, -O2):
<aligned_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @aligned_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ merge(int *, int, int, int);
void sort(int *a, int l, int r) {
  if (l >= r)
    return;
  int m = (l + r) / 2;
  sort(a, l, m);
  sort(a, m + 1, r);
  merge(a, l, m, r);
}


x86 assembly (clang, -O0):
<sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1143 <sort+0x23>
jmp    1187 <sort+0x67>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort>:
cmp    %edx,%esi
jge    1172 <sort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1030 <sort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <sort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <merge@plt>
ret

LLVM IR (-O0):
define void @sort(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %3
br label %29
12: ; preds = %3
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = add nsw i32 %13, %14
%16 = sdiv i32 %15, 2
store i32 %16, i32* %7
%17 = load i32*, i32** %4
%18 = load i32, i32* %5
%19 = load i32, i32* %7
%20 = load i32*, i32** %4
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
%23 = load i32, i32* %6
%24 = load i32*, i32** %4
%25 = load i32, i32* %5
%26 = load i32, i32* %7
%27 = load i32, i32* %6
%28 = call i32 @merge(i32* %24, i32 %25, i32 %26, i32 %27)
br label %29
29: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @sort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @sort(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @sort(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
/* Variables and functions */
unsigned long long __blcfill_u64(unsigned long long);
unsigned long long test__blcfill_u64(unsigned long long a) {
  return __blcfill_u64(a);
}


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

x86 assembly (clang, -O2):
<test__blcfill_u64>:
jmp    1030 <__blcfill_u64@plt>

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

LLVM IR (-O2):
define i64 @test__blcfill_u64(i64 %0) {
%2 = tail call i64 @__blcfill_u64(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0x96() {
  Assert_real((isascii(150) == 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_isascii.c",
              755, ("isascii should be 0 for 0x96"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x96>:
push   %rax
mov    $0x96,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2f3,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0x96\00"
define void @t_isascii_0x96() {
%1 = call i64 @isascii(i32 150)
%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 755, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0x96\00"
define void @t_isascii_0x96() {
%1 = tail call i64 @isascii(i32 150)
%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 755, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int validate_prefix(struct key_settings *settings, char *key) {}


x86 assembly (clang, -O0):
<validate_prefix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.key_settings = type opaque
define i32 @validate_prefix(%struct.key_settings* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.key_settings*
%5 = alloca i8*
store %struct.key_settings* %0, %struct.key_settings** %4
store i8* %1, i8** %5
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.key_settings = type opaque
define i32 @validate_prefix(%struct.key_settings* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 undef
}
__attribute__((no, noclone)) unsigned __int128 t143_3sub(unsigned __int128 y) {
  unsigned __int128 r;
  if (__builtin_sub_overflow((signed __int128)(-1), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t143_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rdx
not    %rcx
not    %rdx
mov    $0x1,%al
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
test   $0x1,%al
jne    1155 <t143_3sub+0x45>
jmp    115c <t143_3sub+0x4c>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t143_3sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
not    %rbx
not    %r14
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define { i64, i64 } @t143_3sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = xor i128 %6, -1
%8 = tail call i32 (...) @bar()
%9 = trunc i128 %7 to i64
%10 = lshr i128 %7, 64
%11 = trunc i128 %10 to i64
%12 = insertvalue { i64, i64 } poison, i64 %9, 0
%13 = insertvalue { i64, i64 } %12, i64 %11, 1
ret { i64, i64 } %13
}
/* Variables and functions */
int getCleanLine(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int len;
  char line[1000];
  char longest[1000];
  while ((len = getCleanLine(line, 1000)) > 0) {
    if (line[0] != '\n')
      printf("%s", line);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7e0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1030 <getCleanLine@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1177 <main+0x57>
movsbl -0x3f0(%rbp),%eax
cmp    $0xa,%eax
je     1172 <main+0x52>
lea    -0x3f0(%rbp),%rsi
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
jmp    1132 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0x7e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1030 <getCleanLine@plt>
test   %eax,%eax
jle    1174 <main+0x54>
mov    %rsp,%rbx
lea    0xebb(%rip),%r14
jmp    1161 <main+0x41>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1030 <getCleanLine@plt>
test   %eax,%eax
jle    1174 <main+0x54>
cmpb   $0xa,(%rsp)
je     1150 <main+0x30>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
jmp    1150 <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]
%4 = alloca [1000 x i8]
store i32 0, i32* %1
br label %5
5: ; preds = %17, %0
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%7 = call i32 @getCleanLine(i8* %6, i32 1000)
store i32 %7, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 10
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %14, %9
br label %5
18: ; preds = %5
%19 = load i32, i32* %1
ret i32 %19
}

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 @getCleanLine(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = load i8, i8* %2
%7 = icmp eq i8 %6, 10
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i32 @getCleanLine(i8* %2, i32 1000)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
void gtk_text_view_backward_display_line() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_view_backward_display_line() {
ret void
}
int security_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot,
                           unsigned long prot) {
  return 0;
}


x86 assembly (clang, -O0):
<security_file_mprotect>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.vm_area_struct = type opaque
define i32 @security_file_mprotect(%struct.vm_area_struct* %0, i64 %1, i64 %2) {
%4 = alloca %struct.vm_area_struct*
%5 = alloca i64
%6 = alloca i64
store %struct.vm_area_struct* %0, %struct.vm_area_struct** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
ret i32 0
}

LLVM IR (-O2):
%struct.vm_area_struct = type opaque
define i32 @security_file_mprotect(%struct.vm_area_struct* nocapture readnone %0, i64 %1, i64 %2) {
ret i32 0
}