xunge/DecIR huggingface dataset:
void rop3_110_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = ~S;
  stk3 = T | stk4;
  stk2 = *D & stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_110_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,-0xe(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xe(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @rop3_110_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
ret void
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
char *strndup(const char *s, size_t n) {
  char *result = malloc(n + 1);
  memcpy(result, s, n);
  result[n] = '\0';
  return result;
}


x86 assembly (clang, -O0):
<strndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strndup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
lea    0x1(%rsi),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @strndup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = add i64 %6, 1
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %3
%11 = load i64, i64* %4
%12 = call i32 @memcpy(i8* %9, i8* %10, i64 %11)
%13 = load i8*, i8** %5
%14 = load i64, i64* %4
%15 = getelementptr inbounds i8, i8* %13, i64 %14
store i8 0, i8* %15
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @strndup(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %1)
%6 = getelementptr inbounds i8, i8* %4, i64 %1
store i8 0, i8* %6
ret i8* %4
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int IoRegisterDeviceInterface(int PhysicalDeviceObject, int InterfaceClassGuid,
                              int ReferenceString, int SymbolicLinkName) {
  {
    int tmp_ndt_5;
    tmp_ndt_5 = __VERIFIER_nondet_int();
    if (tmp_ndt_5 == 0) {
      goto switch_6_0;
    } else {
      goto switch_6_default;
      if (0) {
      switch_6_0:
        return (0);
      switch_6_default:;
        return (-1073741808);
      } else {
      }
    }
  }
}


x86 assembly (clang, -O0):
<IoRegisterDeviceInterface>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    113d <IoRegisterDeviceInterface+0x2d>
jmp    1142 <IoRegisterDeviceInterface+0x32>
jmp    114e <IoRegisterDeviceInterface+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    1155 <IoRegisterDeviceInterface+0x45>
movl   $0xc0000010,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IoRegisterDeviceInterface>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
mov    $0xc0000010,%ecx
cmovne %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @IoRegisterDeviceInterface(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%11 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %11, i32* %10
%12 = load i32, i32* %10
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %4
br label %18
15: ; preds = %4
br label %19
16: ; No predecessors!
br i1 false, label %17, label %20
17: ; preds = %16
br label %18
18: ; preds = %17, %14
store i32 0, i32* %5
br label %22
19: ; preds = %15
store i32 -1073741808, i32* %5
br label %22
20: ; preds = %16
br label %21
21: ; preds = %20
br label %22
22: ; preds = %18, %19, %21
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
define i32 @IoRegisterDeviceInterface(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (...) @__VERIFIER_nondet_int()
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 0, i32 -1073741808
ret i32 %7
}
void RTMemPoolRelease(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemPoolRelease() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ build_fa_table();
void init_tokenizer() { build_fa_table(); }


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

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

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

LLVM IR (-O2):
define void @init_tokenizer() {
%1 = tail call i32 (...) @build_fa_table()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(long *, int, int, int /*<<< orphan*/ *);
long int randomNumberPls() {
  long int num;
  FILE *random_file;
  random_file = fopen("/dev/urandom", "r");
  fread(&num, sizeof(long int), 1, random_file);
  fclose(random_file);
  return num;
}


x86 assembly (clang, -O0):
<randomNumberPls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xec7(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x8(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomNumberPls>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xeca(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0x8(%rsp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1030 <fread@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"/dev/urandom\00"
@.str.1 = [2 x i8] c"r\00"
define i64 @randomNumberPls() {
%1 = alloca i64
%2 = alloca i32*
%3 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fread(i64* %1, i32 8, i32 1, i32* %4)
%6 = load i32*, i32** %2
%7 = call i32 @fclose(i32* %6)
%8 = load i64, i64* %1
ret i64 %8
}

LLVM IR (-O2):
@.str = [13 x i8] c"/dev/urandom\00"
@.str.1 = [2 x i8] c"r\00"
define i64 @randomNumberPls() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @fread(i64* %1, i32 8, i32 1, i32* %3)
%5 = tail call i32 @fclose(i32* %3)
%6 = load i64, i64* %1
ret i64 %6
}
char *nextstr(p)
char *p;
{
  p = strchr(p, '\0');
  return *++p ? p : 0;
}


x86 assembly (clang, -O0):
<nextstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <strchr@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
je     1154 <nextstr+0x44>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    115f <nextstr+0x4f>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    115f <nextstr+0x4f>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextstr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    (%rbx,%rax,1),%rdx
add    $0x1,%rdx
xor    %ecx,%ecx
cmpb   $0x0,0x1(%rbx,%rax,1)
cmovne %rdx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @nextstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strchr(i8* %3, i32 0)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %2
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i8*, i8** %2
br label %13
12: ; preds = %1
br label %13
13: ; preds = %12, %10
%14 = phi i8* [ %11, %10 ], [ null, %12 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @nextstr(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = getelementptr i8, i8* %0, i64 %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = select i1 %6, i8* null, i8* %4
ret i8* %7
}
/* Variables and functions */
scalar_t__ ceil(size_t);
size_t SCAVENGEREstimateBas64DecodedDataSize(size_t inDataSize) {
  size_t theDecodedDataSize = (int)ceil(inDataSize / 4.0) * 3;
  return (theDecodedDataSize);
}


x86 assembly (clang, -O0):
<SCAVENGEREstimateBas64DecodedDataSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movaps 0xedd(%rip),%xmm1
movq   -0x8(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xedc(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rdi
mov    %rdi,%rcx
sar    $0x3f,%rcx
movsd  0xec2(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
and    %rcx,%rax
or     %rax,%rdi
call   1030 <ceil@plt>
imul   $0x3,%eax,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SCAVENGEREstimateBas64DecodedDataSize>:
push   %rax
movq   %rdi,%xmm0
punpckldq 0xee2(%rip),%xmm0
subpd  0xeea(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
mulsd  0xee6(%rip),%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rcx
sar    $0x3f,%rcx
subsd  0xeda(%rip),%xmm1
cvttsd2si %xmm1,%rdi
and    %rcx,%rdi
or     %rax,%rdi
call   1030 <ceil@plt>
shl    $0x20,%rax
lea    (%rax,%rax,2),%rax
sar    $0x20,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @SCAVENGEREstimateBas64DecodedDataSize(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = uitofp i64 %4 to double
%6 = fdiv double %5, 4.000000e+00
%7 = fptoui double %6 to i64
%8 = call i64 @ceil(i64 %7)
%9 = trunc i64 %8 to i32
%10 = mul nsw i32 %9, 3
%11 = sext i32 %10 to i64
store i64 %11, i64* %3
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
define i64 @SCAVENGEREstimateBas64DecodedDataSize(i64 %0) {
%2 = uitofp i64 %0 to double
%3 = fmul double %2, 2.500000e-01
%4 = fptoui double %3 to i64
%5 = tail call i64 @ceil(i64 %4)
%6 = mul i64 %5, 12884901888
%7 = ashr exact i64 %6, 32
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
void testTortureExecute(void) {
  int n = 1000;
  int i;
  f(n);
  for (i = 0; i < 1; ++i) {
    f(n);
    n = 666;
    &n;
  }
  return;
}


x86 assembly (clang, -O0):
<testTortureExecute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3e8,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <f@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1155 <testTortureExecute+0x45>
mov    -0x4(%rbp),%edi
call   1030 <f@plt>
movl   $0x29a,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112e <testTortureExecute+0x1e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testTortureExecute>:
push   %rax
mov    $0x3e8,%edi
call   1030 <f@plt>
mov    $0x3e8,%edi
pop    %rax
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define void @testTortureExecute() {
%1 = tail call i32 @f(i32 1000)
%2 = tail call i32 @f(i32 1000)
ret void
}
__attribute__((always_)) int unregister_trace_mm_page_alloc_extfrag(
    void (*probe)(void *__data, struct page *page, int alloc_order,
                  int fallback_order, int alloc_migratetype,
                  int fallback_migratetype),
    void *data) {
  return -38;
}


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

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

LLVM IR (-O0):
%struct.page = type opaque
define i32 @unregister_trace_mm_page_alloc_extfrag(void (i8*, %struct.page*, i32, i32, i32, i32)* %0, i8* %1) {
%3 = alloca void (i8*, %struct.page*, i32, i32, i32, i32)*
%4 = alloca i8*
store void (i8*, %struct.page*, i32, i32, i32, i32)* %0, void (i8*, %struct.page*, i32, i32, i32, i32)** %3
store i8* %1, i8** %4
ret i32 -38
}

LLVM IR (-O2):
%struct.page = type opaque
define i32 @unregister_trace_mm_page_alloc_extfrag(void (i8*, %struct.page*, i32, i32, i32, i32)* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -38
}
/* Variables and functions */
int /*<<< orphan*/ i2c_write_reg(int, int);
void i2c_write_tx_data(int d) { i2c_write_reg(3, d); }


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

x86 assembly (clang, -O2):
<i2c_write_tx_data>:
mov    %edi,%esi
mov    $0x3,%edi
jmp    1030 <i2c_write_reg@plt>

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

LLVM IR (-O2):
define void @i2c_write_tx_data(i32 %0) {
%2 = tail call i32 @i2c_write_reg(i32 3, i32 %0)
ret void
}
void sigpipe(int p) {}


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

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

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

LLVM IR (-O2):
define void @sigpipe(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lcd_putchar(char);
void PrintChar(char c) { lcd_putchar(c); }


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

x86 assembly (clang, -O2):
<PrintChar>:
jmp    1030 <lcd_putchar@plt>

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

LLVM IR (-O2):
define void @PrintChar(i8 signext %0) {
%2 = tail call i32 @lcd_putchar(i8 signext %0)
ret void
}
unsigned long long __atomic_fetch_sub_8(volatile void *atom,
                                        unsigned long long value,
                                        int memorder) {
  unsigned long long xchg;
  unsigned long long cmp;
  __atomic_load((unsigned long long *)atom, (unsigned long long *)&cmp, 0);
  do {
    xchg = ((cmp - value));
  } while (!__atomic_compare_exchange((unsigned long long *)atom, &cmp, &xchg,
                                      1, 5, 5));
  return cmp;
}


x86 assembly (clang, -O0):
<__atomic_fetch_sub_8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rdx
lock cmpxchg %rdx,(%rcx)
mov    %rax,%rcx
sete   %al
mov    %al,-0x39(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1154 <__atomic_fetch_sub_8+0x54>
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x39(%rbp),%al
and    $0x1,%al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
xor    $0xff,%al
test   $0x1,%al
jne    111a <__atomic_fetch_sub_8+0x1a>
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__atomic_fetch_sub_8>:
mov    (%rdi),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rax,%rcx
mov    %rax,%rdx
sub    %rsi,%rdx
lock cmpxchg %rdx,(%rdi)
jne    1110 <__atomic_fetch_sub_8+0x10>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @__atomic_fetch_sub_8(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
%9 = alloca i8
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load atomic i64, i64* %11 monotonic
store i64 %12, i64* %8
br label %13
13: ; preds = %26, %3
%14 = load i64, i64* %8
%15 = load i64, i64* %5
%16 = sub i64 %14, %15
store i64 %16, i64* %7
br label %17
17: ; preds = %13
%18 = load i8*, i8** %4
%19 = bitcast i8* %18 to i64*
%20 = load i64, i64* %8
%21 = load i64, i64* %7
%22 = cmpxchg weak i64* %19, i64 %20, i64 %21 seq_cst seq_cst
%23 = extractvalue { i64, i1 } %22, 0
%24 = extractvalue { i64, i1 } %22, 1
br i1 %24, label %26, label %25
25: ; preds = %17
store i64 %23, i64* %8
br label %26
26: ; preds = %25, %17
%27 = zext i1 %24 to i8
store i8 %27, i8* %9
%28 = load i8, i8* %9
%29 = trunc i8 %28 to i1
%30 = xor i1 %29, true
br i1 %30, label %13, label %31
31: ; preds = %26
%32 = load i64, i64* %8
ret i64 %32
}

LLVM IR (-O2):
define i64 @__atomic_fetch_sub_8(i8* nocapture %0, i64 %1, i32 %2) {
%4 = bitcast i8* %0 to i64*
%5 = load atomic i64, i64* %4 monotonic
br label %6
6: ; preds = %6, %3
%7 = phi i64 [ %5, %3 ], [ %11, %6 ]
%8 = sub i64 %7, %1
%9 = cmpxchg weak i64* %4, i64 %7, i64 %8 seq_cst seq_cst
%10 = extractvalue { i64, i1 } %9, 1
%11 = extractvalue { i64, i1 } %9, 0
br i1 %10, label %12, label %6
12: ; preds = %6
ret i64 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
scalar_t__ wcore_attrib_list_get(int /*<<< orphan*/ const *, int /*<<< orphan*/,
                                 int /*<<< orphan*/ *);
bool wcore_attrib_list_get_with_default(const int32_t attrib_list[],
                                        int32_t key, int32_t *value,
                                        int32_t default_value) {
  if (wcore_attrib_list_get(attrib_list, key, value)) {
    return true;
  } else {
    *value = default_value;
    return false;
  }
}


x86 assembly (clang, -O0):
<wcore_attrib_list_get_with_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1030 <wcore_attrib_list_get@plt>
cmp    $0x0,%rax
je     114c <wcore_attrib_list_get_with_default+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    115c <wcore_attrib_list_get_with_default+0x4c>
mov    -0x24(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcore_attrib_list_get_with_default>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%rbx
call   1030 <wcore_attrib_list_get@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    112e <wcore_attrib_list_get_with_default+0x1e>
mov    %ebp,(%rbx)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @wcore_attrib_list_get_with_default(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i64 @wcore_attrib_list_get(i32* %0, i32 %1, i32* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4
store i32 %3, i32* %2
br label %8
8: ; preds = %4, %7
%9 = phi i32 [ 0, %7 ], [ 1, %4 ]
ret i32 %9
}
/* Variables and functions */
double __daylen__(int, int, int, double, double, double, int /*<<< orphan*/);
double day_nautical_twilight_length(int year, int month, int day, double lon,
                                    double lat) {
  return __daylen__(year, month, day, lon, lat, -12.0, 0);
}


x86 assembly (clang, -O0):
<day_nautical_twilight_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xeba(%rip),%xmm2
xor    %ecx,%ecx
call   1030 <__daylen__@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<day_nautical_twilight_length>:
movsd  0xee8(%rip),%xmm2
xor    %ecx,%ecx
jmp    1030 <__daylen__@plt>

LLVM IR (-O0):
define double @day_nautical_twilight_length(i32 %0, i32 %1, i32 %2, double %3, double %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca double
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store double %3, double* %9
store double %4, double* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load double, double* %9
%15 = load double, double* %10
%16 = call double @__daylen__(i32 %11, i32 %12, i32 %13, double %14, double %15, double -1.200000e+01, i32 0)
ret double %16
}

LLVM IR (-O2):
define double @day_nautical_twilight_length(i32 %0, i32 %1, i32 %2, double %3, double %4) {
%6 = tail call double @__daylen__(i32 %0, i32 %1, i32 %2, double %3, double %4, double -1.200000e+01, i32 0)
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int _mm_extract_pi16(int /*<<< orphan*/, int);
int __mm_extract_pi16(__m64 A, int const I) { return _mm_extract_pi16(A, 1); }


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

x86 assembly (clang, -O2):
<__mm_extract_pi16>:
mov    $0x1,%esi
jmp    1030 <_mm_extract_pi16@plt>

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

LLVM IR (-O2):
define i32 @__mm_extract_pi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_extract_pi16(i32 %0, i32 1)
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
uint32_t EPIIntStatus(uint32_t ui32Base, bool bMasked) {
  ASSERT(ui32Base == 0x400D0000);
  if (bMasked) {
    return ((*((volatile uint32_t *)(ui32Base + 0x00000218))));
  } else {
    return ((*((volatile uint32_t *)(ui32Base + 0x00000214))));
  }
}


x86 assembly (clang, -O0):
<EPIIntStatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x400d0000,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x0,-0xc(%rbp)
je     1150 <EPIIntStatus+0x40>
mov    -0x8(%rbp),%eax
add    $0x218,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    115f <EPIIntStatus+0x4f>
mov    -0x8(%rbp),%eax
add    $0x214,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPIIntStatus>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x400d0000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
xor    %eax,%eax
test   %ebx,%ebx
setne  %al
lea    0x214(,%rax,4),%eax
movslq %ebp,%rcx
mov    (%rax,%rcx,1),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @EPIIntStatus(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 1074593792
%8 = zext i1 %7 to i32
%9 = call i32 @ASSERT(i32 %8)
%10 = load i32, i32* %5
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 536
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
%17 = load volatile i32, i32* %16
store i32 %17, i32* %3
br label %24
18: ; preds = %2
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 532
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to i32*
%23 = load volatile i32, i32* %22
store i32 %23, i32* %3
br label %24
24: ; preds = %18, %12
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @EPIIntStatus(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1074593792
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = icmp eq i32 %1, 0
%7 = select i1 %6, i32 532, i32 536
%8 = add nsw i32 %7, %0
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
ret i32 %11
}
/* Variables and functions */
int lps331_read_reg(int, int);
int who_am_i(int fd) {
  int byte = lps331_read_reg(fd, 0x0f);
  if (byte < 0)
    return byte;
  if (byte != 0xbb)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<who_am_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0xf,%esi
call   1030 <lps331_read_reg@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1140 <who_am_i+0x30>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <who_am_i+0x50>
cmpl   $0xbb,-0xc(%rbp)
je     1159 <who_am_i+0x49>
movl   $0x0,-0x4(%rbp)
jmp    1160 <who_am_i+0x50>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<who_am_i>:
push   %rax
mov    $0xf,%esi
call   1030 <lps331_read_reg@plt>
xor    %ecx,%ecx
cmp    $0xbb,%eax
sete   %cl
test   %eax,%eax
cmovns %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @who_am_i(i32 %0) {
%2 = tail call i32 @lps331_read_reg(i32 %0, i32 15)
%3 = icmp slt i32 %2, 0
%4 = icmp eq i32 %2, 187
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 %2, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ pmfBartzero(double, double, int, double *);
void pmfBartzero_R_wrapper(double *A, double *k, int *n, double *prob) {
  pmfBartzero(*A, *k, *n, prob);
}


x86 assembly (clang, -O0):
<pmfBartzero_R_wrapper>:
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    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rsi
call   1030 <pmfBartzero@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmfBartzero_R_wrapper>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
mov    (%rdx),%edi
mov    %rcx,%rsi
jmp    1030 <pmfBartzero@plt>

LLVM IR (-O0):
define void @pmfBartzero_R_wrapper(double* %0, double* %1, i32* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32*
%8 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store i32* %2, i32** %7
store double* %3, double** %8
%9 = load double*, double** %5
%10 = load double, double* %9
%11 = load double*, double** %6
%12 = load double, double* %11
%13 = load i32*, i32** %7
%14 = load i32, i32* %13
%15 = load double*, double** %8
%16 = call i32 @pmfBartzero(double %10, double %12, i32 %14, double* %15)
ret void
}

LLVM IR (-O2):
define void @pmfBartzero_R_wrapper(double* nocapture %0, double* nocapture %1, i32* nocapture %2, double* %3) {
%5 = load double, double* %0
%6 = load double, double* %1
%7 = load i32, i32* %2
%8 = tail call i32 @pmfBartzero(double %5, double %6, i32 %7, double* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xe1() {
  Assert_real((isgraph(225) == 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_isgraph.c",
              1130, ("isgraph should be 0 for 0xe1"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xe1>:
push   %rax
mov    $0xe1,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x46a,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xe1\00"
define void @t_isgraph_0xe1() {
%1 = call i64 @isgraph(i32 225)
%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 1130, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xe1\00"
define void @t_isgraph_0xe1() {
%1 = tail call i64 @isgraph(i32 225)
%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 1130, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long);
int main(void) {
  printf("%lld\n", (long long int)(7));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 7)
ret i32 0
}
int __syscall3(int call, unsigned long arg0, unsigned long arg1,
               unsigned long arg2) {
  int rc;
  __asm__ volatile("movl %[call], %%eax	\n"
                   "movl %[arg0], %%ebx	\n"
                   "movl %[arg1], %%ecx	\n"
                   "movl %[arg2], %%edx	\n"
                   "int  %[xnum]		\n"
                   "movl %%eax, %[rc]	\n"
                   : [rc] "=g"(rc)
                   : [call] "g"(call), [arg0] "g"(arg0), [arg1] "g"(arg1),
                     [arg2] "g"(arg2), [xnum] "i"(0x80)
                   : "%eax", "%ebx", "%ecx", "%edx", "memory");
  return rc;
}


x86 assembly (clang, -O0):
<__syscall3>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %esi,-0x30(%rbp)
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
mov    %rax,-0x48(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x38(%rbp),%ebx
mov    -0x40(%rbp),%ecx
mov    -0x48(%rbp),%edx
int    $0x80
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @__syscall3(i32 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
store i32 %0, i32* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%10 = load i32, i32* %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = load i32, i32* %9
ret i32 %14
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main() {
  int i, sn = 0;
  for (i = 1; i <= 8; i++) {
    sn = sn + (1);
  }
  __VERIFIER_assert(sn == 8 * (1) || sn == 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jg     114e <main+0x3e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    $0x1,%al
cmpl   $0x8,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     1167 <main+0x57>
cmpl   $0x0,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ prove1(int);
int /*<<< orphan*/ prove2(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("input your number:n=");
  scanf("%d", &n);
  printf("\n");
  prove1(n);
  printf("\n");
  prove2(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1060 <prove1@plt>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <prove2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%edi
call   1070 <prove1@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%edi
call   1050 <prove2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"input your number:n=\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 @prove1(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = call i32 @prove2(i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"input your number:n=\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 @putchar(i32 10)
%6 = load i32, i32* %1
%7 = call i32 @prove1(i32 %6)
%8 = call i32 @putchar(i32 10)
%9 = load i32, i32* %1
%10 = call i32 @prove2(i32 %9)
ret i32 0
}
/* Variables and functions */
int strcmp(char const *, char const *);
int lenient_strcmp(const char *a, const char *b) {
  if (a == b) {
    return 0;
  } else if (!a) {
    return -1;
  } else if (!b) {
    return 1;
  } else {
    return strcmp(a, b);
  }
}


x86 assembly (clang, -O0):
<lenient_strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    113a <lenient_strcmp+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1178 <lenient_strcmp+0x68>
cmpq   $0x0,-0x10(%rbp)
jne    1151 <lenient_strcmp+0x41>
movl   $0xffffffff,-0x4(%rbp)
jmp    1178 <lenient_strcmp+0x68>
cmpq   $0x0,-0x18(%rbp)
jne    1168 <lenient_strcmp+0x58>
movl   $0x1,-0x4(%rbp)
jmp    1178 <lenient_strcmp+0x68>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lenient_strcmp>:
cmp    %rsi,%rdi
je     1124 <lenient_strcmp+0x14>
test   %rdi,%rdi
je     1127 <lenient_strcmp+0x17>
test   %rsi,%rsi
je     112d <lenient_strcmp+0x1d>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @lenient_strcmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %5
%8 = icmp eq i8* %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 0, i32* %3
br label %22
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %14, label %13
13: ; preds = %10
store i32 -1, i32* %3
br label %22
14: ; preds = %10
%15 = load i8*, i8** %5
%16 = icmp ne i8* %15, null
br i1 %16, label %18, label %17
17: ; preds = %14
store i32 1, i32* %3
br label %22
18: ; preds = %14
%19 = load i8*, i8** %4
%20 = load i8*, i8** %5
%21 = call i32 @strcmp(i8* %19, i8* %20)
store i32 %21, i32* %3
br label %22
22: ; preds = %18, %17, %13, %9
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @lenient_strcmp(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp eq i8* %0, null
br i1 %5, label %10, label %6
6: ; preds = %4
%7 = icmp eq i8* %1, null
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @strcmp(i8* %0, i8* %1)
br label %10
10: ; preds = %6, %4, %2, %8
%11 = phi i32 [ %9, %8 ], [ 0, %2 ], [ -1, %4 ], [ 1, %6 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
long filesize(FILE *fp) {
  long curpos, length;
  curpos = ftell(fp);
  fseek(fp, 0L, SEEK_END);
  length = ftell(fp);
  fseek(fp, curpos, SEEK_SET);
  return length;
}


x86 assembly (clang, -O0):
<filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e6d(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filesize>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r15
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @filesize(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @ftell(i32* %5)
store i64 %6, i64* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i64 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %4
%12 = load i32*, i32** %2
%13 = load i64, i64* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i64 %13, i32 %14)
%16 = load i64, i64* %4
ret i64 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @filesize(i32* nocapture %0) {
%2 = tail call i64 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i64 %2, i32 %6)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ memset(double *, int /*<<< orphan*/, int);
void nil_dmat(int nx, int ny, double **p) {
  memset(*p, 0, sizeof(double) * nx * ny);
}


x86 assembly (clang, -O0):
<nil_dmat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
movslq -0x8(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nil_dmat>:
mov    (%rdx),%rax
imul   %esi,%edi
lea    0x0(,%rdi,8),%edx
mov    %rax,%rdi
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @nil_dmat(i32 %0, i32 %1, double** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double**
store i32 %0, i32* %4
store i32 %1, i32* %5
store double** %2, double*** %6
%7 = load double**, double*** %6
%8 = load double*, double** %7
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = mul i64 8, %10
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = mul i64 %11, %13
%15 = trunc i64 %14 to i32
%16 = call i32 @memset(double* %8, i32 0, i32 %15)
ret void
}

LLVM IR (-O2):
define void @nil_dmat(i32 %0, i32 %1, double** nocapture %2) {
%4 = load double*, double** %2
%5 = shl i32 %0, 3
%6 = mul i32 %5, %1
%7 = tail call i32 @memset(double* %4, i32 0, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void greet(const char *name) { printf("Hello %s\n", name); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"Hello %s\0A\00"
define void @greet(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
double tan(double);
double tan_wrapper(double *arg_list) { return (tan(arg_list[0])); }


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

x86 assembly (clang, -O2):
<tan_wrapper>:
movsd  (%rdi),%xmm0
jmp    1030 <tan@plt>

LLVM IR (-O0):
define double @tan_wrapper(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 = call double @tan(double %5)
ret double %6
}

LLVM IR (-O2):
define double @tan_wrapper(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call double @tan(double %2)
ret double %3
}
f() { extern char good; }


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

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @f() {
ret i32 undef
}