xunge/DecIR huggingface dataset:
unsigned xrop3_145_0_0(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;
  unsigned stk4;
  stk4 = ~S;
  stk3 = T | stk4;
  stk2 = D & stk3;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_145_0_0>:
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    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_145_0_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
xor    $0xff,%edi
or     %esi,%edi
xor    %edi,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @xrop3_145_0_0(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
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %6
%25 = xor i32 %24, -1
store i32 %25, i32* %11
%26 = load i32, i32* %7
%27 = load i32, i32* %11
%28 = or i32 %26, %27
store i32 %28, i32* %10
%29 = load i32, i32* %5
%30 = load i32, i32* %10
%31 = and i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %6
%33 = load i32, i32* %9
%34 = xor i32 %32, %33
store i32 %34, i32* %8
%35 = load i32, i32* %8
%36 = xor i32 %35, -1
store i32 %36, i32* %8
%37 = load i32, i32* %8
ret i32 %37
}

LLVM IR (-O2):
define i32 @xrop3_145_0_0(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 = xor i32 %3, 255
%7 = or i32 %6, %5
%8 = xor i32 %7, %4
%9 = xor i32 %8, -1
ret i32 %9
}
int SUB_ASSIGN(int x, int y) { return x -= y; }


x86 assembly (clang, -O0):
<SUB_ASSIGN>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SUB_ASSIGN(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = sub nsw i32 %6, %5
store i32 %7, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @SUB_ASSIGN(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
bool revert(bool e) { return e; }


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

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

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

LLVM IR (-O2):
define i32 @revert(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ reverse(int *, int *);
int main() {
  int seq[] = {1, 2, 3, 4, 5, 6, 7, 8};
  reverse(seq, seq + 8);
  if (seq[3] != 5 || seq[4] != 4)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x30(%rbp),%rsi
add    $0x20,%rsi
call   1030 <reverse@plt>
cmpl   $0x5,-0x24(%rbp)
jne    1180 <main+0x60>
cmpl   $0x4,-0x20(%rbp)
je     1187 <main+0x67>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%rsi
mov    %rsp,%rdi
call   1030 <reverse@plt>
cmpl   $0x5,0xc(%rsp)
jne    115d <main+0x3d>
cmpl   $0x4,0x10(%rsp)
jne    115d <main+0x3d>
xor    %eax,%eax
add    $0x28,%rsp
ret
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
@__const.main.seq = [8 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8]
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i32]
store i32 0, i32* %1
%3 = bitcast [8 x i32]* %2 to i8*
%4 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%6 = getelementptr inbounds i32, i32* %5, i64 8
%7 = call i32 @reverse(i32* %4, i32* %6)
%8 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 3
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 5
br i1 %10, label %15, label %11
11: ; preds = %0
%12 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 4
%13 = load i32, i32* %12
%14 = icmp ne i32 %13, 4
br i1 %14, label %15, label %17
15: ; preds = %11, %0
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@__const.main.seq = [8 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8]
define i32 @main() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%4 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 8
%5 = call i32 @reverse(i32* %3, i32* %4)
%6 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 3
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 5
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 4
%10 = load i32, i32* %9
%11 = icmp ne i32 %10, 4
%12 = select i1 %8, i1 true, i1 %11
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
char *malloc(int);
char *mymalloc(int len) {
  char *ptr;
  if ((ptr = malloc(len)) == 0)
    error("Insufficient memory: %m");
  return (ptr);
}


x86 assembly (clang, -O0):
<mymalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    114d <mymalloc+0x2d>
lea    0xeb8(%rip),%rdi
call   1040 <error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <mymalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Insufficient memory: %m\00"
define i8* @mymalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [24 x i8] c"Insufficient memory: %m\00"
define noalias i8* @mymalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
int is_left_paren(char c) { return c == '('; }


x86 assembly (clang, -O0):
<is_left_paren>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x28,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_left_paren>:
xor    %eax,%eax
cmp    $0x28,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_left_paren(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 40
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_left_paren(i8 signext %0) {
%2 = icmp eq i8 %0, 40
%3 = zext i1 %2 to i32
ret i32 %3
}
double sgn(double a) { return (a < 0 ? -1 : 1); }


x86 assembly (clang, -O0):
<sgn>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
xorps  %xmm0,%xmm0
mov    $0x1,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgn>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
lea    0xeec(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @sgn(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 -1, i32 1
%7 = sitofp i32 %6 to double
ret double %7
}

LLVM IR (-O2):
define double @sgn(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = select i1 %2, double -1.000000e+00, double 1.000000e+00
ret double %3
}
int lua_parser_fn(void __attribute__((__unused__)) * L,
                  const char __attribute__((__unused__)) * fcn,
                  struct img_type __attribute__((__unused__)) * img) {
  return -1;
}


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

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

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

LLVM IR (-O2):
%struct.img_type = type opaque
define i32 @lua_parser_fn(i8* nocapture readnone %0, i8* nocapture readnone %1, %struct.img_type* nocapture readnone %2) {
ret i32 -1
}
int isPower2(int x) {}


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

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

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

LLVM IR (-O2):
define i32 @isPower2(i32 %0) {
ret i32 undef
}
const char *simple_name(const char *full) {
  const char *start = full;
  for (const char *p = full; *p != '\0'; p++) {
    if (*p == '.' || *p == '-')
      start = p + 1;
  }
  return start;
}


x86 assembly (clang, -O0):
<simple_name>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116a <simple_name+0x6a>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     1148 <simple_name+0x48>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1154 <simple_name+0x54>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1159 <simple_name+0x59>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <simple_name+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple_name>:
mov    %rdi,%rax
lea    0x1(%rdi),%rcx
jmp    1117 <simple_name+0x17>
nopl   0x0(%rax)
mov    %rcx,%rax
add    $0x1,%rcx
movzbl -0x1(%rcx),%edx
lea    -0x2d(%rdx),%esi
cmp    $0x2,%sil
jb     1110 <simple_name+0x10>
test   %dl,%dl
jne    1113 <simple_name+0x13>
ret

LLVM IR (-O0):
define i8* @simple_name(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
%6 = load i8*, i8** %2
store i8* %6, i8** %4
br label %7
7: ; preds = %26, %1
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %29
12: ; preds = %7
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 46
br i1 %16, label %22, label %17
17: ; preds = %12
%18 = load i8*, i8** %4
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 45
br i1 %21, label %22, label %25
22: ; preds = %17, %12
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i64 1
store i8* %24, i8** %3
br label %25
25: ; preds = %22, %17
br label %26
26: ; preds = %25
%27 = load i8*, i8** %4
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %4
br label %7
29: ; preds = %7
%30 = load i8*, i8** %3
ret i8* %30
}

LLVM IR (-O2):
define i8* @simple_name(i8* %0) {
br label %2
2: ; preds = %9, %1
%3 = phi i8* [ %0, %1 ], [ %10, %9 ]
%4 = phi i8* [ %0, %1 ], [ %11, %9 ]
%5 = load i8, i8* %4
switch i8 %5, label %9 [
i8 0, label %6
i8 46, label %7
i8 45, label %7
]
6: ; preds = %2
ret i8* %3
7: ; preds = %2, %2
%8 = getelementptr inbounds i8, i8* %4, i64 1
br label %9
9: ; preds = %2, %7
%10 = phi i8* [ %8, %7 ], [ %3, %2 ]
%11 = getelementptr inbounds i8, i8* %4, i64 1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
void fail(void) {
ERROR:
  __VERIFIER_error();
}


x86 assembly (clang, -O0):
<fail>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <fail+0x9>
mov    $0x0,%al
call   1030 <__VERIFIER_error@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @fail() {
br label %1
1: ; preds = %0
%2 = call i32 (...) @__VERIFIER_error()
ret void
}

LLVM IR (-O2):
define void @fail() {
%1 = tail call i32 (...) @__VERIFIER_error()
ret void
}
void after_sleep(void) { return; }


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

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

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

LLVM IR (-O2):
define void @after_sleep() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ asprintf(char **, char *, int /*<<< orphan*/, char const *);
int /*<<< orphan*/ get_extractors_dir();
char *get_full_path(const char *extractor_file) {
  char *full_path;
  if (!asprintf(&full_path, "%s/%s", get_extractors_dir(), extractor_file))
    return NULL;
  return full_path;
}


x86 assembly (clang, -O0):
<get_full_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <get_extractors_dir@plt>
mov    %eax,%edx
mov    -0x10(%rbp),%rcx
lea    -0x18(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1040 <asprintf@plt>
cmp    $0x0,%eax
jne    115f <get_full_path+0x3f>
movq   $0x0,-0x8(%rbp)
jmp    1167 <get_full_path+0x47>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_full_path>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %r14d,%r14d
xor    %eax,%eax
call   1030 <get_extractors_dir@plt>
lea    0xec8(%rip),%rsi
mov    %rsp,%rdi
mov    %eax,%edx
mov    %rbx,%rcx
call   1040 <asprintf@plt>
test   %eax,%eax
je     114d <get_full_path+0x2d>
mov    (%rsp),%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
define i8* @get_full_path(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = tail call i32 (...) @get_extractors_dir()
%5 = call i32 @asprintf(i8** %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %4, i8* %0)
%6 = icmp eq i32 %5, 0
%7 = load i8*, i8** %2
%8 = select i1 %6, i8* null, i8* %7
ret i8* %8
}
void check_reverse(int *Array, int start, int end, int incr, int value) {
  int ii = 0;
  for (ii = start; ii >= end; ii = ii - incr)
    if (Array[ii] != value)
      __builtin_abort();
}


x86 assembly (clang, -O0):
<check_reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     116e <check_reverse+0x5e>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
je     115b <check_reverse+0x4b>
call   1030 <abort@plt>
jmp    1160 <check_reverse+0x50>
mov    -0x1c(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1136 <check_reverse+0x26>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_reverse>:
push   %rax
cmp    %edx,%esi
jl     112f <check_reverse+0x1f>
cs nopw 0x0(%rax,%rax,1)
nop
movslq %esi,%rax
cmp    %r8d,(%rdi,%rax,4)
jne    1131 <check_reverse+0x21>
sub    %ecx,%esi
cmp    %edx,%esi
jge    1120 <check_reverse+0x10>
pop    %rax
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define void @check_reverse(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** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
store i32 0, i32* %11
%12 = load i32, i32* %7
store i32 %12, i32* %11
br label %13
13: ; preds = %27, %5
%14 = load i32, i32* %11
%15 = load i32, i32* %8
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %31
17: ; preds = %13
%18 = load i32*, i32** %6
%19 = load i32, i32* %11
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = load i32, i32* %21
%23 = load i32, i32* %10
%24 = icmp ne i32 %22, %23
br i1 %24, label %25, label %26
25: ; preds = %17
unreachable
26: ; preds = %17
br label %27
27: ; preds = %26
%28 = load i32, i32* %11
%29 = load i32, i32* %9
%30 = sub nsw i32 %28, %29
store i32 %30, i32* %11
br label %13
31: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @check_reverse(i32* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = icmp slt i32 %1, %2
br i1 %6, label %17, label %9
7: ; preds = %9
%8 = icmp slt i32 %15, %2
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i32 [ %15, %7 ], [ %1, %5 ]
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = icmp eq i32 %13, %4
%15 = sub nsw i32 %10, %3
br i1 %14, label %7, label %16
16: ; preds = %9
tail call void @abort()
unreachable
17: ; preds = %7, %5
ret void
}
int ft_str_is_lowercase(char *str) {
  int x;
  x = 0;
  while (str[x]) {
    if ((str[x] < 97) || (str[x] > 122))
      return (0);
    x++;
  }
  return (1);
}


x86 assembly (clang, -O0):
<ft_str_is_lowercase>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1165 <ft_str_is_lowercase+0x65>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x61,%eax
jl     114b <ft_str_is_lowercase+0x4b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7a,%eax
jle    1157 <ft_str_is_lowercase+0x57>
movl   $0x0,-0x4(%rbp)
jmp    116c <ft_str_is_lowercase+0x6c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <ft_str_is_lowercase+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_str_is_lowercase>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <ft_str_is_lowercase+0x23>
add    $0x1,%rdi
nop
add    $0x85,%cl
cmp    $0xe5,%cl
jbe    1124 <ft_str_is_lowercase+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ft_str_is_lowercase+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ft_str_is_lowercase(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %29, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %32
12: ; preds = %5
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp slt i32 %18, 97
br i1 %19, label %28, label %20
20: ; preds = %12
%21 = load i8*, i8** %3
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp sgt i32 %26, 122
br i1 %27, label %28, label %29
28: ; preds = %20, %12
store i32 0, i32* %2
br label %33
29: ; preds = %20
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %5
32: ; preds = %5
store i32 1, i32* %2
br label %33
33: ; preds = %32, %28
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @ft_str_is_lowercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -123
%12 = icmp ult i8 %11, -26
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
VPutString(str) register char *str;
{
  while (*str)
    VPutChar(*str++);
}


x86 assembly (clang, -O0):
<VPutString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1147 <VPutString+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
mov    $0x0,%al
call   1030 <VPutChar@plt>
jmp    111c <VPutString+0xc>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VPutString>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1135 <VPutString+0x25>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
xor    %eax,%eax
call   1030 <VPutChar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <VPutString+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @VPutString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @VPutChar to i32 (i32, ...)*)(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret i32 undef
}
/* Type definitions */
typedef int uint32_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
uint32_t utf16_surrogate_pair_to_unichar(uint16_t lead, uint16_t trail) {
  return ((((uint32_t)lead - 0xd800U) << 10) + ((uint32_t)trail - 0xdc00U) +
          0x10000U);
}


x86 assembly (clang, -O0):
<utf16_surrogate_pair_to_unichar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    $0xd800,%eax
shl    $0xa,%eax
mov    -0x10(%rbp),%rcx
sub    $0xdc00,%ecx
add    %ecx,%eax
add    $0x10000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf16_surrogate_pair_to_unichar>:
shl    $0xa,%edi
lea    (%rsi,%rdi,1),%eax
add    $0xfca02400,%eax
ret

LLVM IR (-O0):
define i32 @utf16_surrogate_pair_to_unichar(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i32
%7 = sub i32 %6, 55296
%8 = shl i32 %7, 10
%9 = load i64, i64* %4
%10 = trunc i64 %9 to i32
%11 = sub i32 %10, 56320
%12 = add i32 %8, %11
%13 = add i32 %12, 65536
ret i32 %13
}

LLVM IR (-O2):
define i32 @utf16_surrogate_pair_to_unichar(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = shl i32 %3, 10
%5 = trunc i64 %1 to i32
%6 = add i32 %5, -56613888
%7 = add i32 %6, %4
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ gui_x();
int /*<<< orphan*/ gui_y();
int /*<<< orphan*/ mark_set(int, int /*<<< orphan*/, int /*<<< orphan*/);
void mark_cur(int c) { mark_set(c, gui_y(), gui_x()); }


x86 assembly (clang, -O0):
<mark_cur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <gui_y@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <gui_x@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    %eax,%edx
call   1040 <mark_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mark_cur>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <gui_y@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <gui_x@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <mark_set@plt>

LLVM IR (-O0):
define void @mark_cur(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @gui_y()
%5 = call i32 (...) @gui_x()
%6 = call i32 @mark_set(i32 %3, i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
define void @mark_cur(i32 %0) {
%2 = tail call i32 (...) @gui_y()
%3 = tail call i32 (...) @gui_x()
%4 = tail call i32 @mark_set(i32 %0, i32 %2, i32 %3)
ret void
}
void subprint(char *c) {
  char *tmp, *ttmp;
  tmp = c;
  ttmp = tmp;
  while (*ttmp != '\0') {
    printf("length of empty pointer = [%d]\n", slength(ttmp));
    printf("pointer = [%s]\n", ttmp);
    exit(0);
  }
}


x86 assembly (clang, -O0):
<subprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1190 <subprint+0x60>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1050 <slength@plt>
mov    %eax,%esi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subprint>:
push   %rbx
cmpb   $0x0,(%rdi)
jne    1138 <subprint+0x8>
pop    %rbx
ret
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <slength@plt>
lea    0xeb7(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"length of empty pointer = [%d]\0A\00"
@.str.1 = [16 x i8] c"pointer = [%s]\0A\00"
define void @subprint(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
%6 = load i8*, i8** %3
store i8* %6, i8** %4
br label %7
7: ; preds = %1
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %7
%13 = load i8*, i8** %4
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @slength to i32 (i8*, ...)*)(i8* %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i8*, i8** %4
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %16)
unreachable
18: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"length of empty pointer = [%d]\0A\00"
@.str.1 = [16 x i8] c"pointer = [%s]\0A\00"
define void @subprint(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @slength to i32 (i8*, ...)*)(i8* %0)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %0)
tail call void @exit(i32 0)
unreachable
8: ; preds = %1
ret void
}
int will_overrun(int read_pos, int write_pos, int first_len, int second_len) {
  return (((read_pos > write_pos) && (write_pos + first_len >= read_pos)) ||
          ((read_pos < write_pos) && (second_len >= read_pos)));
}


x86 assembly (clang, -O0):
<will_overrun>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1130 <will_overrun+0x30>
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
mov    $0x1,%al
cmp    -0x4(%rbp),%ecx
mov    %al,-0x11(%rbp)
jge    1153 <will_overrun+0x53>
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x12(%rbp)
jge    114d <will_overrun+0x4d>
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
setge  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<will_overrun>:
add    %esi,%edx
cmp    %edi,%edx
setge  %al
cmp    %esi,%edi
setg   %dl
setl   %sil
and    %al,%dl
cmp    %edi,%ecx
setge  %al
and    %sil,%al
or     %dl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @will_overrun(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %0, %1
%6 = add nsw i32 %2, %1
%7 = icmp sge i32 %6, %0
%8 = select i1 %5, i1 %7, i1 false
%9 = icmp slt i32 %0, %1
%10 = icmp sge i32 %3, %0
%11 = and i1 %9, %10
%12 = or i1 %8, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ stpncpy(char *, char *, int);
void overlappingWriteFunction_stpncpy(char *src, char *dest, ssize_t n) {
  (void)stpncpy(dest, src, n);
  (void)stpncpy(src, src + 3, 4);
}


x86 assembly (clang, -O0):
<overlappingWriteFunction_stpncpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <stpncpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x3,%rsi
mov    $0x4,%edx
call   1030 <stpncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<overlappingWriteFunction_stpncpy>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1030 <stpncpy@plt>
lea    0x3(%rbx),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
pop    %rbx
jmp    1030 <stpncpy@plt>

LLVM IR (-O0):
define void @overlappingWriteFunction_stpncpy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = call i32 @stpncpy(i8* %7, i8* %8, i32 %9)
%11 = load i8*, i8** %4
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i64 3
%14 = call i32 @stpncpy(i8* %11, i8* %13, i32 4)
ret void
}

LLVM IR (-O2):
define void @overlappingWriteFunction_stpncpy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @stpncpy(i8* %1, i8* %0, i32 %2)
%5 = getelementptr inbounds i8, i8* %0, i64 3
%6 = tail call i32 @stpncpy(i8* %0, i8* %5, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(int a[], int len) {
  int i;
  for (i = 0; i < len; i++)
    printf("%d, ", a[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print_array+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_array+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%d, \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_array(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d, \00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func_a();
int main() {
  func_a();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <func_a@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @func_a()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func_a()
ret i32 0
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, unsigned short);
void RNDResponseSink_RenderingControl_GetBrightness(
    struct UPnPService *Service, int ErrorCode, void *User,
    unsigned short CurrentBrightness) {
  printf("RND Invoke Response: "
         "RenderingControl/GetBrightness[ErrorCode:%d](%u)\r\n",
         ErrorCode, CurrentBrightness);
}


x86 assembly (clang, -O0):
<RNDResponseSink_RenderingControl_GetBrightness>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ax,-0x1a(%rbp)
mov    -0xc(%rbp),%esi
lea    0xecc(%rip),%rdi
movzwl -0x1a(%rbp),%edx
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNDResponseSink_RenderingControl_GetBrightness>:
lea    0xee9(%rip),%rdi
mov    %ecx,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [72 x i8] c"RND Invoke Response: RenderingControl/GetBrightness[ErrorCode:%d](%u)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetBrightness(%struct.UPnPService* %0, i32 %1, i8* %2, i16 zeroext %3) {
%5 = alloca %struct.UPnPService*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i16
store %struct.UPnPService* %0, %struct.UPnPService** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i16 %3, i16* %8
%9 = load i32, i32* %6
%10 = load i16, i16* %8
%11 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0), i32 %9, i16 zeroext %10)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [72 x i8] c"RND Invoke Response: RenderingControl/GetBrightness[ErrorCode:%d](%u)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetBrightness(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i16 zeroext %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0), i32 %1, i16 zeroext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_message(char *);
void empty_setup_fixture() {
  print_message("empty hashset\n");
  print_message("-------------\n");
}


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

x86 assembly (clang, -O2):
<empty_setup_fixture>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print_message@plt>
lea    0xeeb(%rip),%rdi
pop    %rax
jmp    1030 <print_message@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"empty hashset\0A\00"
@.str.1 = [15 x i8] c"-------------\0A\00"
define void @empty_setup_fixture() {
%1 = call i32 @print_message(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @print_message(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"empty hashset\0A\00"
@.str.1 = [15 x i8] c"-------------\0A\00"
define void @empty_setup_fixture() {
%1 = tail call i32 @print_message(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_message(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned long long bsts(unsigned n) {
  if (n <= 1) {
    return 1;
  }
  unsigned long long res = 0;
  unsigned i;
  for (i = 0; i < n; i++) {
    res += bsts(i) * bsts(n - i - 1);
  }
  return res;
}


x86 assembly (clang, -O0):
<bsts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
ja     1132 <bsts+0x22>
movq   $0x1,-0x8(%rbp)
jmp    1190 <bsts+0x80>
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1188 <bsts+0x78>
mov    -0x1c(%rbp),%edi
call   1030 <bsts@plt>
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%edi
sub    -0x1c(%rbp),%edi
sub    $0x1,%edi
call   1030 <bsts@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
imul   %rcx,%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1141 <bsts+0x31>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bsts>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%r14d
cmp    $0x2,%edi
jb     1150 <bsts+0x40>
mov    %edi,%ebp
add    $0xffffffff,%ebp
xor    %ebx,%ebx
xor    %r14d,%r14d
nopl   0x0(%rax)
mov    %ebx,%edi
call   1030 <bsts@plt>
mov    %rax,%r15
mov    %ebp,%edi
call   1030 <bsts@plt>
imul   %r15,%rax
add    %rax,%r14
add    $0x1,%ebx
add    $0xffffffff,%ebp
jb     1130 <bsts+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i64 @bsts(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %12, %3 ], [ 0, %1 ]
%5 = phi i64 [ %11, %3 ], [ 0, %1 ]
%6 = tail call i64 @bsts(i32 %4)
%7 = xor i32 %4, -1
%8 = add i32 %7, %0
%9 = tail call i64 @bsts(i32 %8)
%10 = mul i64 %9, %6
%11 = add i64 %10, %5
%12 = add nuw i32 %4, 1
%13 = icmp eq i32 %12, %0
br i1 %13, label %14, label %3
14: ; preds = %3, %1
%15 = phi i64 [ 1, %1 ], [ %11, %3 ]
ret i64 %15
}
int compare_floats_asc(const float *a, const float *b) {
  if (*a > *b)
    return 1;
  else if (*a < *b)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<compare_floats_asc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss (%rax),%xmm0
jbe    112d <compare_floats_asc+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    1159 <compare_floats_asc+0x59>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    1152 <compare_floats_asc+0x52>
movl   $0xffffffff,-0x4(%rbp)
jmp    1159 <compare_floats_asc+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_floats_asc>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomiss %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_floats_asc(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fcmp ogt float %3, %4
%6 = fcmp olt float %3, %4
%7 = sext i1 %6 to i32
%8 = select i1 %5, i32 1, i32 %7
ret i32 %8
}
/* Variables and functions */
double secs2days(double);
void ctime2jd(double ctime, double jd[2]) {
  jd[0] = 2440587.5;
  jd[1] = secs2days(ctime);
}


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

x86 assembly (clang, -O2):
<ctime2jd>:
push   %rbx
mov    %rdi,%rbx
movabs $0x41429ec5c0000000,%rax
9e 42 41
mov    %rax,(%rdi)
call   1030 <secs2days@plt>
movsd  %xmm0,0x8(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @ctime2jd(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 0
store double 0x41429EC5C0000000, double* %6
%7 = load double, double* %3
%8 = call double @secs2days(double %7)
%9 = load double*, double** %4
%10 = getelementptr inbounds double, double* %9, i64 1
store double %8, double* %10
ret void
}

LLVM IR (-O2):
define void @ctime2jd(double %0, double* nocapture writeonly %1) {
store double 0x41429EC5C0000000, double* %1
%3 = tail call double @secs2days(double %0)
%4 = getelementptr inbounds double, double* %1, i64 1
store double %3, double* %4
ret void
}
void xshowmem() {}


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

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

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

LLVM IR (-O2):
define void @xshowmem() {
ret void
}
void sdi_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @sdi_exit() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ pthread_join(int /*<<< orphan*/, int /*<<< orphan*/ *);
void *tf2(void *arg) {
  pthread_join((pthread_t)arg, NULL);
  exit(43);
}


x86 assembly (clang, -O0):
<tf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pthread_join@plt>
mov    $0x2b,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<tf2>:
push   %rax
xor    %esi,%esi
call   1040 <pthread_join@plt>
mov    $0x2b,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i8* @tf2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i32
%5 = call i32 @pthread_join(i32 %4, i32* null)
%6 = call i32 @exit(i32 43)
unreachable
}

LLVM IR (-O2):
define noalias i8* @tf2(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @pthread_join(i32 %3, i32* null)
%5 = tail call i32 @exit(i32 43)
unreachable
}
void gfc_global_init() {}


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

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

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

LLVM IR (-O2):
define void @gfc_global_init() {
ret void
}
void gtk_notebook_remove_page() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_remove_page() {
ret void
}