xunge/DecIR huggingface dataset:
void blkfree(av0) char **av0;
{
  register char **av = av0;
  while (*av) {
    extern char argbuf[200];
    char *p = *av++;
    if ((p < argbuf) || (p > (argbuf + 200)))
      free(p);
  }
}


x86 assembly (clang, -O0):
<blkfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     117e <blkfree+0x6e>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e99(%rip),%rax
cmp    %rax,-0x18(%rbp)
jb     1170 <blkfree+0x60>
mov    0x2e88(%rip),%rax
add    $0xc8,%rax
cmp    %rax,-0x18(%rbp)
jbe    1179 <blkfree+0x69>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
jmp    1124 <blkfree+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blkfree>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     115d <blkfree+0x4d>
add    $0x8,%rbx
mov    0x2ebd(%rip),%r14
mov    $0xc8,%r15d
add    0x2eb0(%rip),%r15
jmp    1151 <blkfree+0x41>
nopw   0x0(%rax,%rax,1)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
je     115d <blkfree+0x4d>
cmp    %r14,%rdi
jb     1140 <blkfree+0x30>
cmp    %r15,%rdi
jbe    1145 <blkfree+0x35>
jmp    1140 <blkfree+0x30>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@argbuf = external global [200 x i8]
define void @blkfree(i8** %0) {
%2 = alloca i8**
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %2
%5 = load i8**, i8*** %2
store i8** %5, i8*** %3
br label %6
6: ; preds = %21, %1
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %7
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %22
10: ; preds = %6
%11 = load i8**, i8*** %3
%12 = getelementptr inbounds i8*, i8** %11, i32 1
store i8** %12, i8*** %3
%13 = load i8*, i8** %11
store i8* %13, i8** %4
%14 = load i8*, i8** %4
%15 = icmp ult i8* %14, getelementptr inbounds ([200 x i8], [200 x i8]* @argbuf, i64 0, i64 0)
br i1 %15, label %19, label %16
16: ; preds = %10
%17 = load i8*, i8** %4
%18 = icmp ugt i8* %17, getelementptr inbounds ([200 x i8], [200 x i8]* @argbuf, i64 1, i64 0)
br i1 %18, label %19, label %21
19: ; preds = %16, %10
%20 = load i8*, i8** %4
br label %21
21: ; preds = %19, %16
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
@argbuf = external global [200 x i8]
define void @blkfree(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %15, label %4
4: ; preds = %1, %12
%5 = phi i8* [ %13, %12 ], [ %2, %1 ]
%6 = phi i8** [ %7, %12 ], [ %0, %1 ]
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = icmp ult i8* %5, getelementptr inbounds ([200 x i8], [200 x i8]* @argbuf, i64 0, i64 0)
%9 = icmp ugt i8* %5, getelementptr inbounds ([200 x i8], [200 x i8]* @argbuf, i64 1, i64 0)
%10 = select i1 %8, i1 true, i1 %9
br i1 %10, label %11, label %12
11: ; preds = %4
tail call void @free(i8* %5)
br label %12
12: ; preds = %4, %11
%13 = load i8*, i8** %7
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %4
15: ; preds = %12, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void set_file_name(char *title, char *filename) {
  strcpy(filename, title);
  strcat(filename, ".txt");
}


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

x86 assembly (clang, -O2):
<set_file_name>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xeca(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strcat@plt>

LLVM IR (-O0):
@.str = [5 x i8] c".txt\00"
define void @set_file_name(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @strcpy(i8* %5, i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c".txt\00"
define void @set_file_name(i8* %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %1, i8* %0)
%4 = tail call i32 @strcat(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reset_cdf();
void Reset_CDF() { reset_cdf(); }


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

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

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

LLVM IR (-O2):
define void @Reset_CDF() {
%1 = tail call i32 (...) @reset_cdf()
ret void
}
/* Variables and functions */
scalar_t__ cursor_visible;
int /*<<< orphan*/ min_putp(scalar_t__);
int min_showcur() {
  if (cursor_visible) {
    min_putp(cursor_visible);
    return 0;
  } else
    return 1;
}


x86 assembly (clang, -O0):
<min_showcur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
cmpq   $0x0,(%rax)
je     1144 <min_showcur+0x34>
mov    0x2eb8(%rip),%rax
mov    (%rax),%rdi
call   1030 <min_putp@plt>
movl   $0x0,-0x4(%rbp)
jmp    114b <min_showcur+0x3b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_showcur>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%rdi
test   %rdi,%rdi
je     1129 <min_showcur+0x19>
call   1030 <min_putp@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@cursor_visible = global i64 0
define i32 @min_showcur() {
%1 = alloca i32
%2 = load i64, i64* @cursor_visible
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i64, i64* @cursor_visible
%6 = call i32 @min_putp(i64 %5)
store i32 0, i32* %1
br label %8
7: ; preds = %0
store i32 1, i32* %1
br label %8
8: ; preds = %7, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@cursor_visible = global i64 0
define i32 @min_showcur() {
%1 = load i64, i64* @cursor_visible
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @min_putp(i64 %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ 0, %3 ], [ 1, %0 ]
ret i32 %6
}
void TimerOC1FastConfigure(unsigned long ulBase, unsigned long ulOCFast) {
  unsigned long ulTempccmr1 = 0;

  ;

  ;
  ulTempccmr1 = (*((volatile unsigned long *)(ulBase + 0x00000018)));
  ulTempccmr1 &= ~0x00000004;
  ulTempccmr1 |= ulOCFast;
  (*((volatile unsigned long *)(ulBase + 0x00000018))) = ulTempccmr1;
}


x86 assembly (clang, -O0):
<TimerOC1FastConfigure>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0xfffffffffffffffb,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerOC1FastConfigure>:
mov    0x18(%rdi),%rax
and    $0xfffffffffffffffb,%rax
or     %rsi,%rax
mov    %rax,0x18(%rdi)
ret

LLVM IR (-O0):
define void @TimerOC1FastConfigure(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
store i64 0, i64* %5
%6 = load i64, i64* %3
%7 = add i64 %6, 24
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = and i64 %10, -5
store i64 %11, i64* %5
%12 = load i64, i64* %4
%13 = load i64, i64* %5
%14 = or i64 %13, %12
store i64 %14, i64* %5
%15 = load i64, i64* %5
%16 = load i64, i64* %3
%17 = add i64 %16, 24
%18 = inttoptr i64 %17 to i64*
store volatile i64 %15, i64* %18
ret void
}

LLVM IR (-O2):
define void @TimerOC1FastConfigure(i64 %0, i64 %1) {
%3 = add i64 %0, 24
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -5
%7 = or i64 %6, %1
store volatile i64 %7, i64* %4
ret void
}
/* Variables and functions */
double DBL_EPSILON;
int iszero(double x) { return (x < DBL_EPSILON) && (-x > -DBL_EPSILON); }


x86 assembly (clang, -O0):
<iszero>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
mov    0x2ed3(%rip),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jbe    1170 <iszero+0x70>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x2e9d(%rip),%rax
movsd  (%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iszero>:
mov    0x2ee1(%rip),%rax
movsd  (%rax),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
@DBL_EPSILON = global double 0.000000e+00
define i32 @iszero(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* @DBL_EPSILON
%5 = fcmp olt double %3, %4
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load double, double* %2
%8 = fneg double %7
%9 = load double, double* @DBL_EPSILON
%10 = fneg double %9
%11 = fcmp ogt double %8, %10
br label %12
12: ; preds = %6, %1
%13 = phi i1 [ false, %1 ], [ %11, %6 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
@DBL_EPSILON = global double 0.000000e+00
define i32 @iszero(double %0) {
%2 = load double, double* @DBL_EPSILON
%3 = fcmp ogt double %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int __ctype_isupper(int);
int isupper(int c) { return __ctype_isupper(c); }


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

x86 assembly (clang, -O2):
<isupper>:
jmp    1030 <__ctype_isupper@plt>

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

LLVM IR (-O2):
define i32 @isupper(i32 %0) {
%2 = tail call i32 @__ctype_isupper(i32 %0)
ret i32 %2
}
_Inxch() {
  extern int _Isfil, (*_Igetc)();
  int ch;
  while ((ch = (*_Igetc)(_Isfil)) > 0 && _Ispce(ch))
    ;
  if (ch > 0)
    return (ch);
  return (-1);
}


x86 assembly (clang, -O0):
<_Inxch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%rcx
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
mov    $0x0,%al
call   *%rcx
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jle    1155 <_Inxch+0x45>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <_Ispce@plt>
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1165 <_Inxch+0x55>
jmp    116a <_Inxch+0x5a>
jmp    1118 <_Inxch+0x8>
cmpl   $0x0,-0x8(%rbp)
jle    117f <_Inxch+0x6f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1186 <_Inxch+0x76>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Inxch>:
push   %r15
push   %r14
push   %rbx
mov    0x2eb4(%rip),%r14
mov    0x2ebd(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r15),%edi
xor    %eax,%eax
call   *(%r14)
test   %eax,%eax
jle    114d <_Inxch+0x3d>
mov    %eax,%ebx
mov    %eax,%edi
xor    %eax,%eax
call   1030 <_Ispce@plt>
test   %eax,%eax
jne    1130 <_Inxch+0x20>
jmp    1152 <_Inxch+0x42>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@_Igetc = external global i32 (...)*
@_Isfil = external global i32
define i32 @_Inxch() {
%1 = alloca i32
%2 = alloca i32
br label %3
3: ; preds = %15, %0
%4 = load i32 (...)*, i32 (...)** @_Igetc
%5 = load i32, i32* @_Isfil
%6 = bitcast i32 (...)* %4 to i32 (i32, ...)*
%7 = call i32 (i32, ...) %6(i32 %5)
store i32 %7, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i32, i32* %2
%11 = call i32 (i32, ...) bitcast (i32 (...)* @_Ispce to i32 (i32, ...)*)(i32 %10)
%12 = icmp ne i32 %11, 0
br label %13
13: ; preds = %9, %3
%14 = phi i1 [ false, %3 ], [ %12, %9 ]
br i1 %14, label %15, label %16
15: ; preds = %13
br label %3
16: ; preds = %13
%17 = load i32, i32* %2
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = load i32, i32* %2
store i32 %20, i32* %1
br label %22
21: ; preds = %16
store i32 -1, i32* %1
br label %22
22: ; preds = %21, %19
%23 = load i32, i32* %1
ret i32 %23
}

LLVM IR (-O2):
@_Igetc = external global i32 (...)*
@_Isfil = external global i32
define i32 @_Inxch() {
br label %1
1: ; preds = %6, %0
%2 = load i32 (i32, ...)*, i32 (i32, ...)** bitcast (i32 (...)** @_Igetc to i32 (i32, ...)**)
%3 = load i32, i32* @_Isfil
%4 = tail call i32 (i32, ...) %2(i32 %3)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @_Ispce to i32 (i32, ...)*)(i32 %4)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %1
9: ; preds = %1, %6
%10 = phi i32 [ -1, %1 ], [ %4, %6 ]
ret i32 %10
}
void test_ar_1_UINT(void *d, unsigned n) {
  if (n == (0x7fffffff * 2U + 1) - 1)
    n = (0x7fffffff * 2U + 1) - 2;
  __builtin_memset(d, 0, n);
}


x86 assembly (clang, -O0):
<test_ar_1_UINT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0xfffffffe,-0xc(%rbp)
jne    1130 <test_ar_1_UINT+0x20>
movl   $0xfffffffd,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ar_1_UINT>:
cmp    $0xfffffffe,%esi
mov    $0xfffffffd,%edx
cmovne %esi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @test_ar_1_UINT(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, -2
br i1 %6, label %7, label %8
7: ; preds = %2
store i32 -3, i32* %4
br label %8
8: ; preds = %7, %2
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
ret void
}

LLVM IR (-O2):
define void @test_ar_1_UINT(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, -2
%4 = select i1 %3, i32 -3, i32 %1
%5 = zext i32 %4 to i64
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 %5, i1 false)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ display;
};
struct TYPE_4__ {
  TYPE_1__ xcolormap;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void *get_XEvent_xcolormap_display(void *_p) {
  return (void *)((XEvent *)_p)->xcolormap.display;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xcolormap_display>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i8* @get_XEvent_xcolormap_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @get_XEvent_xcolormap_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
scalar_t__ ft_memalloc(int);
char *ft_strnew(size_t size) {
  char *new;
  if ((new = (char *)ft_memalloc(sizeof(char) * size)) == NULL)
    return (NULL);
  return (new);
}


x86 assembly (clang, -O0):
<ft_strnew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <ft_memalloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1146 <ft_strnew+0x36>
movq   $0x0,-0x8(%rbp)
jmp    114e <ft_strnew+0x3e>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strnew>:
jmp    1030 <ft_memalloc@plt>

LLVM IR (-O0):
define i8* @ft_strnew(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = mul i64 1, %5
%7 = trunc i64 %6 to i32
%8 = call i64 @ft_memalloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %4
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %12
11: ; preds = %1
store i8* null, i8** %2
br label %14
12: ; preds = %1
%13 = load i8*, i8** %4
store i8* %13, i8** %2
br label %14
14: ; preds = %12, %11
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
define i8* @ft_strnew(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i64 @ft_memalloc(i32 %2)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
void *obs_encoder_get_ref(void *);
void *obs_encoder_addref_safe_(void *ref) { return obs_encoder_get_ref(ref); }


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

x86 assembly (clang, -O2):
<obs_encoder_addref_safe_>:
jmp    1030 <obs_encoder_get_ref@plt>

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

LLVM IR (-O2):
define i8* @obs_encoder_addref_safe_(i8* %0) {
%2 = tail call i8* @obs_encoder_get_ref(i8* %0)
ret i8* %2
}
/* Variables and functions */
double strtod(char const *, char **);
double c_strtod(const char *arg0, char **arg1) { return strtod(arg0, arg1); }


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

x86 assembly (clang, -O2):
<c_strtod>:
jmp    1030 <strtod@plt>

LLVM IR (-O0):
define double @c_strtod(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 = load i8**, i8*** %4
%7 = call double @strtod(i8* %5, i8** %6)
ret double %7
}

LLVM IR (-O2):
define double @c_strtod(i8* %0, i8** nocapture %1) {
%3 = tail call double @strtod(i8* %0, i8** %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ test(int *, int *, int *, int, int);
int main() {
  int a[(1 << 19)], b[(1 << 19)], c[(1 << 19)];
  test(a, b, c, (1 << 19), 1000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x600010,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x200010(%rbp),%rdi
lea    -0x400010(%rbp),%rsi
lea    -0x600010(%rbp),%rdx
mov    $0x80000,%ecx
mov    $0x3e8,%r8d
call   1030 <test@plt>
xor    %eax,%eax
add    $0x600010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x600008,%rsp
lea    0x400000(%rsp),%rdi
lea    0x200000(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x80000,%ecx
mov    $0x3e8,%r8d
call   1030 <test@plt>
xor    %eax,%eax
add    $0x600008,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [524288 x i32]
%3 = alloca [524288 x i32]
%4 = alloca [524288 x i32]
store i32 0, i32* %1
%5 = getelementptr inbounds [524288 x i32], [524288 x i32]* %2, i64 0, i64 0
%6 = getelementptr inbounds [524288 x i32], [524288 x i32]* %3, i64 0, i64 0
%7 = getelementptr inbounds [524288 x i32], [524288 x i32]* %4, i64 0, i64 0
%8 = call i32 @test(i32* %5, i32* %6, i32* %7, i32 524288, i32 1000)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [524288 x i32]
%2 = alloca [524288 x i32]
%3 = alloca [524288 x i32]
%4 = bitcast [524288 x i32]* %1 to i8*
%5 = bitcast [524288 x i32]* %2 to i8*
%6 = bitcast [524288 x i32]* %3 to i8*
%7 = getelementptr inbounds [524288 x i32], [524288 x i32]* %1, i64 0, i64 0
%8 = getelementptr inbounds [524288 x i32], [524288 x i32]* %2, i64 0, i64 0
%9 = getelementptr inbounds [524288 x i32], [524288 x i32]* %3, i64 0, i64 0
%10 = call i32 @test(i32* %7, i32* %8, i32* %9, i32 524288, i32 1000)
ret i32 0
}
/* Variables and functions */
int ioHasFileAccess();
int secHasFileAccess(void) { return ioHasFileAccess(); }


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

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

LLVM IR (-O0):
define i32 @secHasFileAccess() {
%1 = call i32 (...) @ioHasFileAccess()
ret i32 %1
}

LLVM IR (-O2):
define i32 @secHasFileAccess() {
%1 = tail call i32 (...) @ioHasFileAccess()
ret i32 %1
}
unsigned xrop3_208_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = S | stk3;
  stk1 = T & stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_208_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_208_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
lea    0xff00(%rdi),%edx
and    %eax,%edx
and    %ecx,%edx
not    %eax
and    %esi,%eax
or     %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_208_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %3, 65280
%8 = and i32 %4, %7
%9 = and i32 %8, %6
%10 = xor i32 %4, -1
%11 = and i32 %10, %5
%12 = or i32 %9, %11
ret i32 %12
}
void inclass_element2BEL() {}


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

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

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

LLVM IR (-O2):
define void @inclass_element2BEL() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ malloc(int);
void oops() { (void)malloc(4711); }


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

x86 assembly (clang, -O2):
<oops>:
mov    $0x1267,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define void @oops() {
%1 = call i32 @malloc(i32 4711)
ret void
}

LLVM IR (-O2):
define void @oops() {
%1 = tail call i32 @malloc(i32 4711)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ msgErro(char *);
void ocorreuErro() { msgErro("Ocorreu um erro"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Ocorreu um erro\00"
define void @ocorreuErro() {
%1 = call i32 @msgErro(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Ocorreu um erro\00"
define void @ocorreuErro() {
%1 = tail call i32 @msgErro(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ COND_VC();
int /*<<< orphan*/ EA_AY_PI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_svc_8_pi(void) {
  m68ki_write_8(EA_AY_PI_8(), COND_VC() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_svc_8_pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_AY_PI_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_VC@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_svc_8_pi>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_AY_PI_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_VC@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_svc_8_pi() {
%1 = call i32 (...) @EA_AY_PI_8()
%2 = call i64 (...) @COND_VC()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_svc_8_pi() {
%1 = tail call i32 (...) @EA_AY_PI_8()
%2 = tail call i64 (...) @COND_VC()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
int bioseq_protein_verifychar(char x) {
  switch (x) {
  case 'A':
  case 'C':
  case 'D':
  case 'E':
  case 'F':
  case 'G':
  case 'H':
  case 'I':
  case 'L':
  case 'K':
  case 'M':
  case 'N':
  case 'Q':
  case 'P':
  case 'R':
  case 'S':
  case 'T':
  case 'V':
  case 'W':
  case 'Y':
  case 'X':
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<bioseq_protein_verifychar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x41,%eax
je     116f <bioseq_protein_verifychar+0x6f>
jmp    111f <bioseq_protein_verifychar+0x1f>
mov    -0xc(%rbp),%eax
add    $0xffffffbd,%eax
sub    $0x7,%eax
jb     116f <bioseq_protein_verifychar+0x6f>
jmp    1133 <bioseq_protein_verifychar+0x33>
mov    -0xc(%rbp),%eax
add    $0xffffffb5,%eax
sub    $0x4,%eax
jb     116f <bioseq_protein_verifychar+0x6f>
jmp    1147 <bioseq_protein_verifychar+0x47>
mov    -0xc(%rbp),%eax
add    $0xffffffb0,%eax
sub    $0x5,%eax
jb     116f <bioseq_protein_verifychar+0x6f>
jmp    115b <bioseq_protein_verifychar+0x5b>
mov    -0xc(%rbp),%eax
add    $0xffffffaa,%eax
sub    $0x3,%eax
ja     117b <bioseq_protein_verifychar+0x7b>
jmp    116f <bioseq_protein_verifychar+0x6f>
movl   $0x1,-0x4(%rbp)
jmp    1182 <bioseq_protein_verifychar+0x82>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bioseq_protein_verifychar>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x18,%edi
ja     1117 <bioseq_protein_verifychar+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @bioseq_protein_verifychar(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 65, label %6
i32 67, label %6
i32 68, label %6
i32 69, label %6
i32 70, label %6
i32 71, label %6
i32 72, label %6
i32 73, label %6
i32 76, label %6
i32 75, label %6
i32 77, label %6
i32 78, label %6
i32 81, label %6
i32 80, label %6
i32 82, label %6
i32 83, label %6
i32 84, label %6
i32 86, label %6
i32 87, label %6
i32 89, label %6
i32 88, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@switch.table.bioseq_protein_verifychar = [25 x i32] [i32 1, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0, i32 1, i32 1, i32 1, i32 1, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0, i32 1, i32 1, i32 1, i32 1]
define i32 @bioseq_protein_verifychar(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -65
%4 = icmp ult i32 %3, 25
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [25 x i32], [25 x i32]* @switch.table.bioseq_protein_verifychar, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ %8, %5 ], [ 0, %1 ]
ret i32 %10
}
int foo() {
  volatile int a;
  a = 32;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x20,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x20,-0x4(%rsp)
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = alloca i32
store volatile i32 32, i32* %2
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @foo() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 32, i32* %1
ret i32 undef
}
/* Variables and functions */
size_t nextchunksiz(size_t, int);
int /*<<< orphan*/ skipchunk(int, size_t);
void skipfile(int n, size_t size) {
  while (size > 0) {
    size_t chunksiz = nextchunksiz(size, 64 * 1024);
    skipchunk(n, chunksiz);
    size -= chunksiz;
  }
}


x86 assembly (clang, -O0):
<skipfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jbe    116c <skipfile+0x4c>
mov    -0x10(%rbp),%rdi
mov    $0x10000,%esi
call   1030 <nextchunksiz@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1040 <skipchunk@plt>
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    112f <skipfile+0xf>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipfile>:
push   %rbp
push   %r14
push   %rbx
test   %rsi,%rsi
je     1150 <skipfile+0x30>
mov    %rsi,%rbx
mov    %edi,%r14d
nop
mov    %rbx,%rdi
mov    $0x10000,%esi
call   1030 <nextchunksiz@plt>
mov    %rax,%rbp
mov    %r14d,%edi
mov    %rax,%rsi
call   1040 <skipchunk@plt>
sub    %rbp,%rbx
jne    1130 <skipfile+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @skipfile(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
br label %6
6: ; preds = %9, %2
%7 = load i64, i64* %4
%8 = icmp ugt i64 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i64, i64* %4
%11 = call i64 @nextchunksiz(i64 %10, i32 65536)
store i64 %11, i64* %5
%12 = load i32, i32* %3
%13 = load i64, i64* %5
%14 = call i32 @skipchunk(i32 %12, i64 %13)
%15 = load i64, i64* %5
%16 = load i64, i64* %4
%17 = sub i64 %16, %15
store i64 %17, i64* %4
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @skipfile(i32 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %8, %4 ], [ %1, %2 ]
%6 = tail call i64 @nextchunksiz(i64 %5, i32 65536)
%7 = tail call i32 @skipchunk(i32 %0, i64 %6)
%8 = sub i64 %5, %6
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) {
  ;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @pthread_sigmask(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @pthread_sigmask(i32 %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 0
}
void assert_fail(msg, expr, file, line, fn) const char *msg;
const char *expr;
const char *file;
int line;
const char *fn;
{
  printf("\n%s: %s:%d (%s): Assertion `%s' failed.\n", msg, file, line, fn,
         expr);
  exit(1);
}


x86 assembly (clang, -O0):
<assert_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x10(%rbp),%r9
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<assert_fail>:
push   %rax
mov    %rsi,%r9
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"\0A%s: %s:%d (%s): Assertion `%s' failed.\0A\00"
define void @assert_fail(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %8
%13 = load i32, i32* %9
%14 = load i8*, i8** %10
%15 = load i8*, i8** %7
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12, i32 %13, i8* %14, i8* %15)
unreachable
}

LLVM IR (-O2):
@.str = [41 x i8] c"\0A%s: %s:%d (%s): Assertion `%s' failed.\0A\00"
define void @assert_fail(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4) {
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %2, i32 %3, i8* %4, i8* %1)
tail call void @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
scalar_t__ shmctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
void delete_shm(int shm) {
  if ((shmctl(shm, IPC_RMID, 0)) < 0) {
    perror("[shmctl -- delete]");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<delete_shm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <shmctl@plt>
cmp    $0x0,%rax
jge    116e <delete_shm+0x3e>
lea    0xea1(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_shm>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <shmctl@plt>
test   %rax,%rax
js     1148 <delete_shm+0x18>
pop    %rax
ret
lea    0xeb1(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@IPC_RMID = global i32 0
@.str = [19 x i8] c"[shmctl -- delete]\00"
define void @delete_shm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @IPC_RMID
%5 = call i64 @shmctl(i32 %3, i32 %4, i32 0)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 -1)
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
@IPC_RMID = global i32 0
@.str = [19 x i8] c"[shmctl -- delete]\00"
define void @delete_shm(i32 %0) {
%2 = load i32, i32* @IPC_RMID
%3 = tail call i64 @shmctl(i32 %0, i32 %2, i32 0)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ set_pin(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int, int);
void invert_pin(uint8_t address, uint8_t pin, uint8_t polarity) {
  set_pin(address, pin, polarity, 0x02, 0x03);
}


x86 assembly (clang, -O0):
<invert_pin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0x2,%ecx
mov    $0x3,%r8d
call   1030 <set_pin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert_pin>:
mov    $0x2,%ecx
mov    $0x3,%r8d
jmp    1030 <set_pin@plt>

LLVM IR (-O0):
define void @invert_pin(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @set_pin(i32 %7, i32 %8, i32 %9, i32 2, i32 3)
ret void
}

LLVM IR (-O2):
define void @invert_pin(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @set_pin(i32 %0, i32 %1, i32 %2, i32 2, i32 3)
ret void
}
void multidim_arr4_Bad() {
  int a[3][2];
  int *p = a;
  *(p + 6) = 0;
}


x86 assembly (clang, -O0):
<multidim_arr4_Bad>:
push   %rbp
mov    %rsp,%rbp
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x0,0x18(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @multidim_arr4_Bad() {
%1 = alloca [3 x [2 x i32]]
%2 = alloca i32*
%3 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* %1, i64 0, i64 0
%4 = bitcast [2 x i32]* %3 to i32*
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 6
store i32 0, i32* %6
ret void
}

LLVM IR (-O2):
define void @multidim_arr4_Bad() {
ret void
}
/* Variables and functions */
int load_src(char *);
int load_core_lib() {
  return load_src("/usr/share/asc/"
                  "lib/core.scm");
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"/usr/share/asc/lib/core.scm\00"
define i32 @load_core_lib() {
%1 = call i32 @load_src(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [28 x i8] c"/usr/share/asc/lib/core.scm\00"
define i32 @load_core_lib() {
%1 = tail call i32 @load_src(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void diep(char *s) {
  perror(s);
  exit(1);
}


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

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

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

LLVM IR (-O2):
define void @diep(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
main() {
  int c;
  while (c = getchar() != EOF)
    printf("%d", c);
  printf("%d\n", c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x8(%rbp)
test   $0x1,%al
jne    115b <main+0x3b>
jmp    116f <main+0x4f>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
mov    -0x8(%rbp),%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%rax
je     1159 <main+0x39>
lea    0xec2(%rip),%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%rax
jne    1140 <main+0x20>
lea    0xea3(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i64 0
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp eq i64 %1, %2
br i1 %3, label %9, label %4
4: ; preds = %0, %4
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = tail call i64 (...) @getchar()
%7 = load i64, i64* @EOF
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %4
9: ; preds = %4, %0
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret i32 0
}
int is_between(unsigned x, unsigned y, unsigned z) { return x <= y && y <= z; }


x86 assembly (clang, -O0):
<is_between>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0xd(%rbp)
ja     112a <is_between+0x2a>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setbe  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_between>:
cmp    %esi,%edi
setbe  %al
cmp    %edx,%esi
setbe  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_between(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp ule i32 %7, %8
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = icmp ule i32 %11, %12
br label %14
14: ; preds = %10, %3
%15 = phi i1 [ false, %3 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @is_between(i32 %0, i32 %1, i32 %2) {
%4 = icmp ule i32 %0, %1
%5 = icmp ule i32 %1, %2
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ BN_CTX;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ BN_add(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int /*<<< orphan*/ const *);
int BN_nnmod(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
             int /*<<< orphan*/ const *, int /*<<< orphan*/ *);
int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
               BN_CTX *ctx) {
  if (!BN_add(r, a, b))
    return 0;
  return BN_nnmod(r, r, m, ctx);
}


x86 assembly (clang, -O0):
<BN_mod_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <BN_add@plt>
cmp    $0x0,%eax
jne    1162 <BN_mod_add+0x42>
movl   $0x0,-0x4(%rbp)
jmp    117a <BN_mod_add+0x5a>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   1040 <BN_nnmod@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BN_mod_add>:
push   %r15
push   %r14
push   %rbx
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdi,%rbx
call   1030 <BN_add@plt>
test   %eax,%eax
je     114d <BN_mod_add+0x2d>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <BN_nnmod@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

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

/* Variables and functions */
int fileno(int /*<<< orphan*/ *);
int read(int, char *, int);
int autosar_fgets(char *str, int n, FILE *file) {
  int fd;
  fd = fileno(file);
  return read(fd, str, n);
}


x86 assembly (clang, -O0):
<autosar_fgets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <fileno@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autosar_fgets>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rdx,%rdi
call   1040 <fileno@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <read@plt>

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

LLVM IR (-O2):
define i32 @autosar_fgets(i8* nocapture %0, i32 %1, i32* nocapture %2) {
%4 = tail call i32 @fileno(i32* %2)
%5 = tail call i32 @read(i32 %4, i8* %0, i32 %1)
ret i32 %5
}