xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isprime(int);
int primes(int n) {
  int count = 0;
  int i;
  for (i = 2; i <= n; ++i)
    if (isprime(i))
      ++count;
  return count;
}


x86 assembly (clang, -O0):
<primes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1163 <primes+0x53>
mov    -0xc(%rbp),%edi
call   1030 <isprime@plt>
cmp    $0x0,%rax
je     1150 <primes+0x40>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <primes+0x45>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <primes+0x19>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primes>:
push   %rbp
push   %r14
push   %rbx
xor    %ebp,%ebp
cmp    $0x2,%edi
jl     1151 <primes+0x41>
mov    %edi,%r14d
neg    %r14d
xor    %ebp,%ebp
mov    $0x2,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <isprime@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebp
lea    (%r14,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1130 <primes+0x20>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @primes(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 2, i32* %4
br label %5
5: ; preds = %17, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %2
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %20
9: ; preds = %5
%10 = load i32, i32* %4
%11 = call i64 @isprime(i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %16
16: ; preds = %13, %9
br label %17
17: ; preds = %16
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %5
20: ; preds = %5
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @primes(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %10, %3 ], [ 2, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = tail call i64 @isprime(i32 %4)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %5, %8
%10 = add nuw i32 %4, 1
%11 = icmp eq i32 %4, %0
br i1 %11, label %12, label %3
12: ; preds = %3, %1
%13 = phi i32 [ 0, %1 ], [ %9, %3 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("RTable_test: TESTS PASSED\n");
  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 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [26 x i8] c"RTable_test: TESTS PASSED\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ say(char *, int);
void hit(void) { say("Hahaha!!", 1); }


x86 assembly (clang, -O0):
<hit>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <say@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hit>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <say@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"Hahaha!!\00"
define void @hit() {
%1 = call i32 @say(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"Hahaha!!\00"
define void @hit() {
%1 = tail call i32 @say(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Type definitions */
typedef unsigned int uint64_t;

/* Variables and functions */
uint64_t pack_r16(unsigned int r16) { return r16; }


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

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

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

LLVM IR (-O2):
define i32 @pack_r16(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
double sqrt(double);
double bar(double x) { return sqrt(1.0 / x); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
movapd %xmm0,%xmm1
movsd  0xee4(%rip),%xmm0
divsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112f <bar+0x1f>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @bar(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double 1.000000e+00, %3
%5 = call double @sqrt(double %4)
ret double %5
}

LLVM IR (-O2):
define double @bar(double %0) {
%2 = fdiv double 1.000000e+00, %0
%3 = tail call double @sqrt(double %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ clearCoders();
int /*<<< orphan*/ initHCTL2032();
void initCoders(void) {
  initHCTL2032();
  clearCoders();
}


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

x86 assembly (clang, -O2):
<initCoders>:
push   %rax
xor    %eax,%eax
call   1030 <initHCTL2032@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <clearCoders@plt>

LLVM IR (-O0):
define void @initCoders() {
%1 = call i32 (...) @initHCTL2032()
%2 = call i32 (...) @clearCoders()
ret void
}

LLVM IR (-O2):
define void @initCoders() {
%1 = tail call i32 (...) @initHCTL2032()
%2 = tail call i32 (...) @clearCoders()
ret void
}
void MlmeDLSAction(struct rt_rtmp_adapter *pAd,
                   struct rt_mlme_queue_elem *Elem) {}


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

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

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

LLVM IR (-O2):
%struct.rt_rtmp_adapter = type opaque
%struct.rt_mlme_queue_elem = type opaque
define void @MlmeDLSAction(%struct.rt_rtmp_adapter* nocapture %0, %struct.rt_mlme_queue_elem* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Warning(char const *);
int /*<<< orphan*/ exit(int);
void Fatal(const char *cp) {
  Warning(cp);
  exit(1);
}


x86 assembly (clang, -O0):
<Fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Warning@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Fatal>:
push   %rax
call   1030 <Warning@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @Fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @Warning(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @Fatal(i8* %0) {
%2 = tail call i32 @Warning(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
unsigned long ADCResolutionGet(unsigned long ulBase) {
  DEBUG_ASSERT((ulBase == 0x40038000) || (ulBase == 0x40039000));
  return ((*((volatile unsigned long *)(ulBase + 0x00000038))) & 0x00000010);
}


x86 assembly (clang, -O0):
<ADCResolutionGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x40038000,-0x8(%rbp)
40
mov    %al,-0x9(%rbp)
je     113d <ADCResolutionGet+0x2d>
cmpq   $0x40039000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%rax
and    $0x10,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCResolutionGet>:
push   %rbx
mov    %rdi,%rbx
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x40038000,%rax
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    0x38(%rbx),%rax
and    $0x10,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @ADCResolutionGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 1073971200
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp eq i64 %6, 1073975296
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @DEBUG_ASSERT(i32 %10)
%12 = load i64, i64* %2
%13 = add i64 %12, 56
%14 = inttoptr i64 %13 to i64*
%15 = load volatile i64, i64* %14
%16 = and i64 %15, 16
ret i64 %16
}

LLVM IR (-O2):
define i64 @ADCResolutionGet(i64 %0) {
%2 = and i64 %0, -4097
%3 = icmp eq i64 %2, 1073971200
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = add i64 %0, 56
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = and i64 %8, 16
ret i64 %9
}
/* Variables and functions */
int *get_g_islands_sub(short *, int, short);
int *get_g_islands(short *S) { return get_g_islands_sub(S, 1, S[0]); }


x86 assembly (clang, -O0):
<get_g_islands>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    $0x1,%esi
movswl (%rax),%edx
call   1030 <get_g_islands_sub@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_g_islands>:
movswl (%rdi),%edx
mov    $0x1,%esi
jmp    1030 <get_g_islands_sub@plt>

LLVM IR (-O0):
define i32* @get_g_islands(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16*, i16** %2
%5 = getelementptr inbounds i16, i16* %4, i64 0
%6 = load i16, i16* %5
%7 = call i32* @get_g_islands_sub(i16* %3, i32 1, i16 signext %6)
ret i32* %7
}

LLVM IR (-O2):
define i32* @get_g_islands(i16* %0) {
%2 = load i16, i16* %0
%3 = tail call i32* @get_g_islands_sub(i16* %0, i32 1, i16 signext %2)
ret i32* %3
}
void rop3_247_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & S;
  stk2 = ~stk2;
  stk1 = T | stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_247_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%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_247_0_1>:
mov    (%rdi),%r8b
mov    %r8d,%ecx
and    %sil,%cl
not    %cl
mov    %edx,%eax
not    %al
and    %cl,%al
or     %dl,%cl
and    %sil,%cl
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %al,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_247_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
%6 = xor i8 %5, -1
%7 = or i8 %6, %2
%8 = and i8 %7, %1
%9 = xor i8 %2, -1
%10 = and i8 %6, %9
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %4
%14 = or i8 %10, %13
%15 = or i8 %14, %8
store i8 %15, i8* %0
ret void
}
/* Variables and functions */
scalar_t__ klock_getT2();
int getTIssue1(int x) {
  int *a;
  a = (int *)klock_getT2();
  return *a + x;
}


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

x86 assembly (clang, -O2):
<getTIssue1>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <klock_getT2@plt>
add    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getTIssue1(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i64 (...) @klock_getT2()
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = load i32, i32* %2
%9 = add nsw i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @getTIssue1(i32 %0) {
%2 = tail call i64 (...) @klock_getT2()
%3 = inttoptr i64 %2 to i32*
%4 = load i32, i32* %3
%5 = add nsw i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ flowmon_cleanup();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ rtmon_release();
void pna_cleanup(void) {
  rtmon_release();
  flowmon_cleanup();
  printf("pna: module is inactive\n");
}


x86 assembly (clang, -O0):
<pna_cleanup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rtmon_release@plt>
mov    $0x0,%al
call   1040 <flowmon_cleanup@plt>
lea    0xeb7(%rip),%rdi
call   1050 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pna_cleanup>:
push   %rax
xor    %eax,%eax
call   1040 <rtmon_release@plt>
xor    %eax,%eax
call   1050 <flowmon_cleanup@plt>
lea    0xeba(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"pna: module is inactive\0A\00"
define void @pna_cleanup() {
%1 = call i32 (...) @rtmon_release()
%2 = call i32 (...) @flowmon_cleanup()
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"pna: module is inactive\00"
define void @pna_cleanup() {
%1 = tail call i32 (...) @rtmon_release()
%2 = tail call i32 (...) @flowmon_cleanup()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
__attribute__((no, noclone)) signed __int128 t102_5add(signed __int128 x) {
  signed __int128 r;
  if (__builtin_add_overflow(x, (signed __int128)(0), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t102_5add>:
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
xor    %eax,%eax
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
test   $0x1,%al
jne    114f <t102_5add+0x3f>
jmp    1156 <t102_5add+0x46>
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):
<t102_5add>:
mov    %rsi,%rdx
mov    %rdi,%rax
ret

LLVM IR (-O0):
define { i64, i64 } @t102_5add(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 = call { i128, i1 } @llvm.sadd.with.overflow.i128(i128 %11, i128 0)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t102_5add(i64 %0, i64 %1) {
%3 = insertvalue { i64, i64 } poison, i64 %0, 0
%4 = insertvalue { i64, i64 } %3, i64 %1, 1
ret { i64, i64 } %4
}
int mem_compare(const char *p1, const char *p2, int max_len) {
  int match_len = 0;
  while ((match_len < max_len) && (*p1++ == *p2++))
    match_len++;
  return (match_len);
}


x86 assembly (clang, -O0):
<mem_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%ecx
xor    %eax,%eax
cmp    -0x14(%rbp),%ecx
mov    %al,-0x19(%rbp)
jge    1153 <mem_compare+0x53>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1163 <mem_compare+0x63>
jmp    1171 <mem_compare+0x71>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1116 <mem_compare+0x16>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_compare>:
test   %edx,%edx
jle    1122 <mem_compare+0x22>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rcx,1),%edx
cmp    (%rsi,%rcx,1),%dl
jne    1125 <mem_compare+0x25>
add    $0x1,%rcx
cmp    %ecx,%eax
jne    1110 <mem_compare+0x10>
ret
xor    %eax,%eax
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @mem_compare(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3, %12
%6 = phi i32 [ %15, %12 ], [ 0, %3 ]
%7 = phi i8* [ %14, %12 ], [ %0, %3 ]
%8 = phi i8* [ %13, %12 ], [ %1, %3 ]
%9 = load i8, i8* %7
%10 = load i8, i8* %8
%11 = icmp eq i8 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %5
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = getelementptr inbounds i8, i8* %7, i64 1
%15 = add nuw nsw i32 %6, 1
%16 = icmp eq i32 %15, %2
br i1 %16, label %17, label %5
17: ; preds = %5, %12, %3
%18 = phi i32 [ 0, %3 ], [ %2, %12 ], [ %6, %5 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int processo();
int main(void) {
  int resultado;
  resultado = processo();
  printf("%d\n", resultado);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <processo@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebd(%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 <processo@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @processo()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void cfs_stub_destroy(void) { return; }


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

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

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

LLVM IR (-O2):
define void @cfs_stub_destroy() {
ret void
}
int main() {
  const char *x = "abc";
  const char *const y = x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ MD5(unsigned char const *, size_t, unsigned char *);
int md5_generate(unsigned char *hash, const unsigned char *text, size_t len) {
  if (!MD5(text, len, hash)) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<md5_generate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <MD5@plt>
cmp    $0x0,%eax
jne    114a <md5_generate+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1151 <md5_generate+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md5_generate>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rax,%rdx
call   1030 <MD5@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @md5_generate(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @MD5(i8* %1, i64 %2, i8* %0)
%5 = icmp eq i32 %4, 0
%6 = sext i1 %5 to i32
ret i32 %6
}
int fun1356() { return 1356; }


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

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

LLVM IR (-O0):
define i32 @fun1356() {
ret i32 1356
}

LLVM IR (-O2):
define i32 @fun1356() {
ret i32 1356
}
/* Variables and functions */
int /*<<< orphan*/ Init(int, int);
void InitDefault(void) { Init(31, 41); }


x86 assembly (clang, -O0):
<InitDefault>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1f,%edi
mov    $0x29,%esi
call   1030 <Init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitDefault>:
mov    $0x1f,%edi
mov    $0x29,%esi
jmp    1030 <Init@plt>

LLVM IR (-O0):
define void @InitDefault() {
%1 = call i32 @Init(i32 31, i32 41)
ret void
}

LLVM IR (-O2):
define void @InitDefault() {
%1 = tail call i32 @Init(i32 31, i32 41)
ret void
}
/* Variables and functions */
int isnan(double);
int c_isnan(double arg0) { return isnan(arg0); }


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

x86 assembly (clang, -O2):
<c_isnan>:
jmp    1030 <isnan@plt>

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

LLVM IR (-O2):
define i32 @c_isnan(double %0) {
%2 = tail call i32 @isnan(double %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ bar(int, int);
int /*<<< orphan*/ xxx(int, int);
int main() {
  bar(12, 1);
  xxx(12, 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
mov    $0x1,%esi
call   1030 <bar@plt>
mov    $0xc,%edi
mov    $0x1,%esi
call   1040 <xxx@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
mov    $0x1,%esi
call   1030 <bar@plt>
mov    $0xc,%edi
mov    $0x1,%esi
call   1040 <xxx@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @bar(i32 12, i32 1)
%2 = call i32 @xxx(i32 12, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @bar(i32 12, i32 1)
%2 = tail call i32 @xxx(i32 12, i32 1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ size;

/* Variables and functions */
int __get_array_size(char const *);
int __infer_nondet_int();
char *malloc(int);
char *readline(const char *prompt) {
  int size_prompt;
  char *ret;
  int size;
  if (prompt != NULL) {
    size_prompt = __get_array_size(prompt);
  }
  size = __infer_nondet_int();
  if (size < 0)
    while (1)
      ;
  ret = malloc(sizeof(size));
  return ret;
}


x86 assembly (clang, -O0):
<readline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1153 <readline+0x23>
mov    -0x8(%rbp),%rdi
call   1040 <__get_array_size@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1171 <readline+0x41>
jmp    116c <readline+0x3c>
jmp    116c <readline+0x3c>
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readline>:
push   %rax
test   %rdi,%rdi
je     113b <readline+0xb>
call   1040 <__get_array_size@plt>
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
test   %eax,%eax
js     1160 <readline+0x30>
mov    $0x4,%edi
pop    %rax
jmp    1050 <malloc@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
jmp    1160 <readline+0x30>

LLVM IR (-O0):
define i8* @readline(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @__get_array_size(i8* %9)
store i32 %10, i32* %3
br label %11
11: ; preds = %8, %1
%12 = call i32 (...) @__infer_nondet_int()
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
br label %16
16: ; preds = %15, %16
br label %16
17: ; preds = %11
%18 = call i8* @malloc(i32 4)
store i8* %18, i8** %4
%19 = load i8*, i8** %4
ret i8* %19
}

LLVM IR (-O2):
define noalias i8* @readline(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @__get_array_size(i8* %0)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 (...) @__infer_nondet_int()
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5, %8
br label %8
9: ; preds = %5
%10 = tail call dereferenceable_or_null(4) i8* @malloc(i32 4)
ret i8* %10
}
void INT_Excep_RIIC3_RXI3(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_RIIC3_RXI3() {
ret void
}
void rop3_79_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~S;
  stk2 = *D | stk3;
  stk1 = T & stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_79_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 -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%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_79_1_0>:
mov    (%rdi),%r8b
mov    %r8d,%ecx
and    %sil,%r8b
mov    %esi,%eax
not    %al
or     %al,%cl
and    %dl,%cl
not    %cl
and    %al,%cl
or     %r8b,%cl
mov    %cl,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_79_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, -1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = and i8 %6, %2
%8 = xor i8 %7, -1
%9 = and i8 %5, %1
%10 = and i8 %8, %4
%11 = or i8 %10, %9
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char const *);
int toupper(int /*<<< orphan*/);
int ask_yn(const char *prompt) {
  printf("\n%s ", prompt);
  fflush(NULL);
  getchar();
  switch (toupper(getchar())) {
  case 'N':
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<ask_yn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
mov    %eax,-0x18(%rbp)
mov    %eax,%edi
call   1060 <fflush@plt>
mov    -0x18(%rbp),%eax
mov    %al,-0x11(%rbp)
call   1050 <getchar@plt>
mov    -0x11(%rbp),%al
call   1050 <getchar@plt>
mov    %eax,%edi
call   1030 <toupper@plt>
sub    $0x4e,%eax
jne    119c <ask_yn+0x5c>
jmp    1190 <ask_yn+0x50>
movl   $0x0,-0x4(%rbp)
jmp    11a3 <ask_yn+0x63>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ask_yn>:
push   %rax
mov    %rdi,%rsi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <fflush@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%edi
call   1030 <toupper@plt>
xor    %ecx,%ecx
cmp    $0x4e,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"\0A%s \00"
define i32 @ask_yn(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @fflush(i32* null)
%7 = call i32 (...) @getchar()
%8 = call i32 (...) @getchar()
%9 = call i32 @toupper(i32 %8)
switch i32 %9, label %11 [
i32 78, label %10
]
10: ; preds = %1
store i32 0, i32* %2
br label %12
11: ; preds = %1
store i32 1, i32* %2
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"\0A%s \00"
define i32 @ask_yn(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @fflush(i32* null)
%4 = tail call i32 (...) @getchar()
%5 = tail call i32 (...) @getchar()
%6 = tail call i32 @toupper(i32 %5)
%7 = icmp ne i32 %6, 78
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int strcmp(char const *, char const *);
int qstrcmp(void const *a, void const *b) {
  return strcmp(*(char const **)a, *(char const **)b);
}


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

x86 assembly (clang, -O2):
<qstrcmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @qstrcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @qstrcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
int mls_context_cpy(struct context *dst, struct context *src) { return 0; }


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

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

LLVM IR (-O0):
%struct.context = type opaque
define i32 @mls_context_cpy(%struct.context* %0, %struct.context* %1) {
%3 = alloca %struct.context*
%4 = alloca %struct.context*
store %struct.context* %0, %struct.context** %3
store %struct.context* %1, %struct.context** %4
ret i32 0
}

LLVM IR (-O2):
%struct.context = type opaque
define i32 @mls_context_cpy(%struct.context* nocapture readnone %0, %struct.context* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int tcpsocket(void) { return socket(AF_INET, SOCK_STREAM, 0); }


x86 assembly (clang, -O0):
<tcpsocket>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcpsocket>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <socket@plt>

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @tcpsocket() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @tcpsocket() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}
/* Type definitions */
struct itimerspec {
  int /*<<< orphan*/ it_interval;
  int /*<<< orphan*/ it_value;
};

/* Variables and functions */
scalar_t__ zero_timespec(int /*<<< orphan*/ *);
int zero_itimerspec(const struct itimerspec *its) {
  return zero_timespec(&its->it_value) && zero_timespec(&its->it_interval);
}


x86 assembly (clang, -O0):
<zero_itimerspec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
call   1030 <zero_timespec@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     114e <zero_itimerspec+0x3e>
mov    -0x8(%rbp),%rdi
call   1030 <zero_timespec@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero_itimerspec>:
push   %rbx
mov    %rdi,%rbx
add    $0x4,%rdi
call   1030 <zero_timespec@plt>
test   %rax,%rax
je     1137 <zero_itimerspec+0x27>
mov    %rbx,%rdi
call   1030 <zero_timespec@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.itimerspec = type { i32, i32 }
define i32 @zero_itimerspec(%struct.itimerspec* %0) {
%2 = alloca %struct.itimerspec*
store %struct.itimerspec* %0, %struct.itimerspec** %2
%3 = load %struct.itimerspec*, %struct.itimerspec** %2
%4 = getelementptr inbounds %struct.itimerspec, %struct.itimerspec* %3, i32 0, i32 1
%5 = call i64 @zero_timespec(i32* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load %struct.itimerspec*, %struct.itimerspec** %2
%9 = getelementptr inbounds %struct.itimerspec, %struct.itimerspec* %8, i32 0, i32 0
%10 = call i64 @zero_timespec(i32* %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.itimerspec = type { i32, i32 }
define i32 @zero_itimerspec(%struct.itimerspec* %0) {
%2 = getelementptr inbounds %struct.itimerspec, %struct.itimerspec* %0, i64 0, i32 1
%3 = tail call i64 @zero_timespec(i32* %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = getelementptr inbounds %struct.itimerspec, %struct.itimerspec* %0, i64 0, i32 0
%7 = tail call i64 @zero_timespec(i32* %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ 0, %1 ], [ %9, %5 ]
ret i32 %11
}
int main() {
  int a[3] = {1, 2, 3};
  return a == &a[0];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0xeee(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeec(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x10(%rbp),%rax
lea    -0x10(%rbp),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.a = [3 x i32] [i32 1, i32 2, i32 3]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
store i32 0, i32* %1
%3 = bitcast [3 x i32]* %2 to i8*
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%6 = icmp eq i32* %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ ispunct(int);
void t_ispunct_0x26() {
  Assert_real((ispunct(38)),
              "/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_ispunct.c",
              195, ("ispunct should be 1 for &"));
}


x86 assembly (clang, -O0):
<t_ispunct_0x26>:
push   %rbp
mov    %rsp,%rbp
mov    $0x26,%edi
call   1030 <ispunct@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xc3,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0x26>:
push   %rax
mov    $0x26,%edi
call   1030 <ispunct@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xc3,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for &\00"
define void @t_ispunct_0x26() {
%1 = call i32 @ispunct(i32 38)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 195, 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for &\00"
define void @t_ispunct_0x26() {
%1 = tail call i32 @ispunct(i32 38)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 195, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int asus_bat_report_phone_capacity(int phone_bat_capacity) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @asus_bat_report_phone_capacity(i32 %0) {
ret i32 0
}
void a_crash() {}


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

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

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

LLVM IR (-O2):
define void @a_crash() {
ret void
}
float bump_out(float v0, float v1, float t) {
  float ts, tc;
  t /= 1;
  ts = t * t;
  tc = ts * t;
  return v0 + v1 * (4 * tc + -9 * ts + 6 * t);
}


x86 assembly (clang, -O0):
<bump_out>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xeec(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm3
movss  0xeaa(%rip),%xmm2
mulss  -0x10(%rbp),%xmm2
movss  0xe99(%rip),%xmm4
mulss  %xmm4,%xmm3
addss  %xmm2,%xmm3
movss  -0xc(%rbp),%xmm2
movss  0xe80(%rip),%xmm4
mulss  %xmm4,%xmm2
addss  %xmm3,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bump_out>:
movaps %xmm2,%xmm3
mulss  %xmm2,%xmm3
movaps %xmm3,%xmm4
mulss  %xmm2,%xmm4
mulss  0xeea(%rip),%xmm3
mulss  0xee6(%rip),%xmm4
mulss  0xee2(%rip),%xmm2
addss  %xmm3,%xmm4
addss  %xmm2,%xmm4
mulss  %xmm1,%xmm4
addss  %xmm4,%xmm0
ret

LLVM IR (-O0):
define float @bump_out(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%9 = load float, float* %6
%10 = fdiv float %9, 1.000000e+00
store float %10, float* %6
%11 = load float, float* %6
%12 = load float, float* %6
%13 = fmul float %11, %12
store float %13, float* %7
%14 = load float, float* %7
%15 = load float, float* %6
%16 = fmul float %14, %15
store float %16, float* %8
%17 = load float, float* %4
%18 = load float, float* %5
%19 = load float, float* %8
%20 = load float, float* %7
%21 = fmul float -9.000000e+00, %20
%22 = call float @llvm.fmuladd.f32(float 4.000000e+00, float %19, float %21)
%23 = load float, float* %6
%24 = call float @llvm.fmuladd.f32(float 6.000000e+00, float %23, float %22)
%25 = call float @llvm.fmuladd.f32(float %18, float %24, float %17)
ret float %25
}

LLVM IR (-O2):
define float @bump_out(float %0, float %1, float %2) {
%4 = fmul float %2, %2
%5 = fmul float %4, %2
%6 = fmul float %4, -9.000000e+00
%7 = tail call float @llvm.fmuladd.f32(float %5, float 4.000000e+00, float %6)
%8 = tail call float @llvm.fmuladd.f32(float %2, float 6.000000e+00, float %7)
%9 = tail call float @llvm.fmuladd.f32(float %1, float %8, float %0)
ret float %9
}
unsigned char inb(unsigned short port) {
  unsigned char data;
  __asm volatile("inb %w1, %0" : "=a"(data) : "Nd"(port));
  return (data);
}


x86 assembly (clang, -O0):
<inb>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%al
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inb>:
mov    %edi,%edx
in     (%dx),%al
ret

LLVM IR (-O0):
define zeroext i8 @inb(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i8 asm sideeffect "inb ${1:w}, $0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @inb(i16 zeroext %0) {
%2 = tail call i8 asm sideeffect "inb ${1:w}, $0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i8 %2
}
/* Variables and functions */
scalar_t__ memcmp(char *, char *, int);
void memcmp4(char *input) {
  char a[] = {1, 2, 3, 4};
  if (memcmp(a, input, 4))
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<memcmp4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xede(%rip),%eax
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
je     1141 <memcmp4+0x31>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcmp4>:
push   %rax
mov    %rdi,%rsi
movl   $0x4030201,0x4(%rsp)
04
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcmp@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.memcmp4.a = [4 x i8] c"\01\02\03\04"
define void @memcmp4(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i8]
store i8* %0, i8** %2
%4 = bitcast [4 x i8]* %3 to i8*
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i64 @memcmp(i8* %5, i8* %6, i32 4)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i8, i8* null
br label %11
11: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
define void @memcmp4(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 67305985, i32* %2
%4 = call i64 @memcmp(i8* %3, i8* %0, i32 4)
ret void
}
/* Variables and functions */
__attribute__((visibility("default"))) void *
sd_resolve_get_event(void *resolve) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @sd_resolve_get_event(i8* nocapture readnone %0) {
ret i8* null
}