xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int bar() {
  printf("This is bar()!\n");
  return 34;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x22,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"This is bar()!\0A\00"
define i32 @bar() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 34
}

LLVM IR (-O2):
@str = [15 x i8] c"This is bar()!\00"
define i32 @bar() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 34
}
int p3_add_seq(seq, add)
int seq;
int add;
{ return (seq - 0x10 + add) % (0x7f - 0x10 + 1) + 0x10; }


x86 assembly (clang, -O0):
<p3_add_seq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x10,%eax
add    -0x8(%rbp),%eax
mov    $0x70,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<p3_add_seq>:
lea    (%rdi,%rsi,1),%ecx
lea    (%rdi,%rsi,1),%eax
add    $0xfffffff0,%eax
cltq
imul   $0xffffffff92492493,%rax,%rdx
shr    $0x20,%rdx
add    %edx,%ecx
add    $0xfffffff0,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
imul   $0x70,%ecx,%ecx
sub    %ecx,%eax
add    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @p3_add_seq(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = sub nsw i32 %5, 16
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
%9 = srem i32 %8, 112
%10 = add nsw i32 %9, 16
ret i32 %10
}

LLVM IR (-O2):
define i32 @p3_add_seq(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -16
%4 = add nsw i32 %3, %1
%5 = srem i32 %4, 112
%6 = add nsw i32 %5, 16
ret i32 %6
}
/* Type definitions */
struct sx_prefix {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct sx_prefix *);
void sx_prefix_destroy(struct sx_prefix *p) {
  if (p)
    free(p);
}


x86 assembly (clang, -O0):
<sx_prefix_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <sx_prefix_destroy+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sx_prefix_destroy>:
test   %rdi,%rdi
je     111a <sx_prefix_destroy+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.sx_prefix = type { i32 }
define void @sx_prefix_destroy(%struct.sx_prefix* %0) {
%2 = alloca %struct.sx_prefix*
store %struct.sx_prefix* %0, %struct.sx_prefix** %2
%3 = load %struct.sx_prefix*, %struct.sx_prefix** %2
%4 = icmp ne %struct.sx_prefix* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.sx_prefix*, %struct.sx_prefix** %2
%7 = call i32 @free(%struct.sx_prefix* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.sx_prefix = type { i32 }
define void @sx_prefix_destroy(%struct.sx_prefix* %0) {
%2 = icmp eq %struct.sx_prefix* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.sx_prefix* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void xvp_free(void *p) { free(p); }


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

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

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

LLVM IR (-O2):
define void @xvp_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
char *malloc(size_t);
size_t strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, size_t);
char *getInfo() {
  char *name;
  size_t size;
  size = strlen("Stir (C) 2004 Panayotis Katsaloulis http://www.panayotis.com "
                "under GNU GPL");
  name = malloc(size + 1);
  strncpy(name,
          ("Stir (C) 2004 Panayotis Katsaloulis http://www.panayotis.com under "
           "GNU GPL"),
          size + 1);
  return name;
}


x86 assembly (clang, -O0):
<getInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
add    $0x1,%rdx
lea    0xe94(%rip),%rsi
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getInfo>:
push   %rbx
mov    $0x4b,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rsi
mov    $0x4b,%edx
mov    %rax,%rdi
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [75 x i8] c"Stir (C) 2004 Panayotis Katsaloulis http://www.panayotis.com under GNU GPL\00"
define i8* @getInfo() {
%1 = alloca i8*
%2 = alloca i64
%3 = call i64 @strlen(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = add i64 %4, 1
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %1
%7 = load i8*, i8** %1
%8 = load i64, i64* %2
%9 = add i64 %8, 1
%10 = call i32 @strncpy(i8* %7, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
@.str = [75 x i8] c"Stir (C) 2004 Panayotis Katsaloulis http://www.panayotis.com under GNU GPL\00"
define i8* @getInfo() {
%1 = tail call dereferenceable_or_null(75) i8* @malloc(i64 75)
%2 = tail call i32 @strncpy(i8* %1, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i64 75)
ret i8* %1
}
int test_imm_C5int8_reg(signed char val) {
  return ((val) & (0xC5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C5int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xc5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C5int8_reg>:
test   $0xc5,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C5int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 197
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_C5int8_reg(i8 signext %0) {
%2 = and i8 %0, -59
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int cmp(const void *a, const void *b) {
  return *(unsigned *)a - *(unsigned *)b;
}


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

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

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

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub i32 %4, %6
ret i32 %7
}
void setlight(int *lights, int x, int y, int val) {
  if (val) {
    lights[x * 1000 + y] += 1;
  } else if (lights[x * 1000 + y] > 0) {
    lights[x * 1000 + y] -= 1;
  }
}


x86 assembly (clang, -O0):
<setlight>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     113a <setlight+0x3a>
mov    -0x8(%rbp),%rax
imul   $0x3e8,-0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
jmp    1174 <setlight+0x74>
mov    -0x8(%rbp),%rax
imul   $0x3e8,-0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    116f <setlight+0x6f>
mov    -0x8(%rbp),%rax
imul   $0x3e8,-0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
jmp    1174 <setlight+0x74>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setlight>:
imul   $0x3e8,%esi,%eax
add    %edx,%eax
cltq
mov    (%rdi,%rax,4),%edx
mov    $0x1,%esi
test   %ecx,%ecx
jne    111f <setlight+0x1f>
mov    $0xffffffff,%esi
test   %edx,%edx
jle    1124 <setlight+0x24>
add    %esi,%edx
mov    %edx,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @setlight(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* %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %4
%12 = load i32*, i32** %5
%13 = load i32, i32* %6
%14 = mul nsw i32 %13, 1000
%15 = load i32, i32* %7
%16 = add nsw i32 %14, %15
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %12, i64 %17
%19 = load i32, i32* %18
%20 = add nsw i32 %19, 1
store i32 %20, i32* %18
br label %42
21: ; preds = %4
%22 = load i32*, i32** %5
%23 = load i32, i32* %6
%24 = mul nsw i32 %23, 1000
%25 = load i32, i32* %7
%26 = add nsw i32 %24, %25
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %22, i64 %27
%29 = load i32, i32* %28
%30 = icmp sgt i32 %29, 0
br i1 %30, label %31, label %41
31: ; preds = %21
%32 = load i32*, i32** %5
%33 = load i32, i32* %6
%34 = mul nsw i32 %33, 1000
%35 = load i32, i32* %7
%36 = add nsw i32 %34, %35
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i32, i32* %32, i64 %37
%39 = load i32, i32* %38
%40 = sub nsw i32 %39, 1
store i32 %40, i32* %38
br label %41
41: ; preds = %31, %21
br label %42
42: ; preds = %41, %11
ret void
}

LLVM IR (-O2):
define void @setlight(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %3, 0
%6 = mul nsw i32 %1, 1000
%7 = add nsw i32 %6, %2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
br i1 %5, label %11, label %13
11: ; preds = %4
%12 = icmp sgt i32 %10, 0
br i1 %12, label %13, label %16
13: ; preds = %11, %4
%14 = phi i32 [ 1, %4 ], [ -1, %11 ]
%15 = add nsw i32 %10, %14
store i32 %15, i32* %9
br label %16
16: ; preds = %13, %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setB();
void setA(void) { setB(); }


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

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

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

LLVM IR (-O2):
define void @setA() {
%1 = tail call i32 (...) @setB()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage: varload [-t time] [-n numcpu] [LOAD | MINLOAD "
                  "MAXLOAD INCREASE]\n");
  fprintf(stderr, "LOAD, MINLOAD and MAXLOAD need to be between 1 and 100.\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xf0f(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf19(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [72 x i8] c"Usage: varload [-t time] [-n numcpu] [LOAD | MINLOAD MAXLOAD INCREASE]\0A\00"
@.str.1 = [57 x i8] c"LOAD, MINLOAD and MAXLOAD need to be between 1 and 100.\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [72 x i8] c"Usage: varload [-t time] [-n numcpu] [LOAD | MINLOAD MAXLOAD INCREASE]\0A\00"
@.str.1 = [57 x i8] c"LOAD, MINLOAD and MAXLOAD need to be between 1 and 100.\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *ft_strplace(char *dst, const char *src) {
  size_t i;
  i = 0;
  while (src[i]) {
    (dst)[i] = (src)[i];
    i++;
  }
  return (&(dst[i - 1]));
}


x86 assembly (clang, -O0):
<ft_strplace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     114d <ft_strplace+0x4d>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <ft_strplace+0x14>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strplace>:
mov    %rdi,%rax
mov    (%rsi),%dl
mov    $0xffffffffffffffff,%rcx
test   %dl,%dl
je     1121 <ft_strplace+0x21>
mov    %dl,0x1(%rax,%rcx,1)
movzbl 0x2(%rsi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <ft_strplace+0x10>
add    %rcx,%rax
ret

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

LLVM IR (-O2):
define i8* @ft_strplace(i8* writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i64 [ %9, %5 ], [ 0, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %6, i8* %8
%9 = add i64 %7, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i64 [ -1, %2 ], [ %7, %5 ]
%15 = getelementptr inbounds i8, i8* %0, i64 %14
ret i8* %15
}
/* Variables and functions */
int /*<<< orphan*/ kprint(char *, char const *);
void puts(const char *str) { kprint("%s\n", str); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @puts(i8* %0) {
%2 = tail call i32 @kprint(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void gtk_icon_view_get_row_spacing() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_view_get_row_spacing() {
ret void
}
/* Variables and functions */
char lowercase(int);
bool is_octsym(int c) {
  if (lowercase(c) == 'o') {
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<is_octsym>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <lowercase@plt>
movsbl %al,%eax
cmp    $0x6f,%eax
jne    113b <is_octsym+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <is_octsym+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_octsym>:
push   %rax
call   1030 <lowercase@plt>
xor    %ecx,%ecx
cmp    $0x6f,%al
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @is_octsym(i32 %0) {
%2 = tail call signext i8 @lowercase(i32 %0)
%3 = icmp eq i8 %2, 111
%4 = zext i1 %3 to i32
ret i32 %4
}
int my_strlen(char *str) { return ((*str) ? 1 + my_strlen(++str) : 0); }


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1148 <my_strlen+0x38>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    %rdi,-0x8(%rbp)
call   1030 <my_strlen@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1152 <my_strlen+0x42>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1152 <my_strlen+0x42>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strlen>:
cmpb   $0x0,(%rdi)
je     111c <my_strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <my_strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @my_strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %0, %1 ]
%6 = phi i32 [ %8, %4 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = add nuw nsw i32 %6, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char const *, ...);
int /*<<< orphan*/ stderr;
void fatal(const char *s, const char *p) {
  fprintf(stderr, "Deroff: ");
  fprintf(stderr, s, p);
  exit(1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    0xec0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eae(%rip),%r15
mov    (%r15),%edi
lea    0xec4(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [9 x i8] c"Deroff: \00"
define void @fatal(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* %8, i8* %9)
%11 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c"Deroff: \00"
define void @fatal(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* %0, i8* %1)
%7 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
long long pre_eval_cond_expr();
long long pre_eval_expr(void) { return pre_eval_cond_expr(); }


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

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

LLVM IR (-O0):
define i64 @pre_eval_expr() {
%1 = call i64 (...) @pre_eval_cond_expr()
ret i64 %1
}

LLVM IR (-O2):
define i64 @pre_eval_expr() {
%1 = tail call i64 (...) @pre_eval_cond_expr()
ret i64 %1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void sprint_xch_direct(char *str, uint8_t direct) {
  sprintf(str,
          "XCH   A, "
          "0x%02X"
          "                   ",
          direct);
}


x86 assembly (clang, -O0):
<sprint_xch_direct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprint_xch_direct>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"XCH A, 0x%02X \00"
define void @sprint_xch_direct(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"XCH A, 0x%02X \00"
define void @sprint_xch_direct(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x41() {
  Assert_real((isspace(65) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              330, ("isspace should be 0 for A"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x41>:
push   %rax
mov    $0x41,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x14a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for A\00"
define void @t_isspace_0x41() {
%1 = call i64 @isspace(i32 65)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 330, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for A\00"
define void @t_isspace_0x41() {
%1 = tail call i64 @isspace(i32 65)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 330, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __NR_pipe2;
int syscall(int /*<<< orphan*/, int *, int /*<<< orphan*/);
__attribute__((always_)) int _syscall_pipe(int pipefd[2]) {
  return syscall(__NR_pipe2, pipefd, 0);
}


x86 assembly (clang, -O0):
<_syscall_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
xor    %edx,%edx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_pipe>:
mov    %rdi,%rsi
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_pipe2 = global i32 0
define i32 @_syscall_pipe(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @__NR_pipe2
%4 = load i32*, i32** %2
%5 = call i32 @syscall(i32 %3, i32* %4, i32 0)
ret i32 %5
}

LLVM IR (-O2):
@__NR_pipe2 = global i32 0
define i32 @_syscall_pipe(i32* %0) {
%2 = load i32, i32* @__NR_pipe2
%3 = tail call i32 @syscall(i32 %2, i32* %0, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ pushNarray(char *, unsigned int);
void pushreal16array_(char *x, unsigned int *n) { pushNarray(x, (*n * 16)); }


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

x86 assembly (clang, -O2):
<pushreal16array_>:
mov    (%rsi),%esi
shl    $0x4,%esi
jmp    1030 <pushNarray@plt>

LLVM IR (-O0):
define void @pushreal16array_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = mul i32 %7, 16
%9 = call i32 @pushNarray(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @pushreal16array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 4
%5 = tail call i32 @pushNarray(i8* %0, i32 %4)
ret void
}
int mik_islower(int c) { return (c >= 'a' && c <= 'z'); }


x86 assembly (clang, -O0):
<mik_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <mik_islower+0x20>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mik_islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @mik_islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @mik_islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("\nusage:  storepasswd <password> <filename>\n\n");
  printf("Stores a password in encrypted format.\n");
  printf("The resulting file can be used with the -rfbauth argument to "
         "OSXvnc.\n\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
call   1030 <printf@plt>
lea    0xf12(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf13(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"\0Ausage: storepasswd <password> <filename>\0A\0A\00"
@.str.1 = [40 x i8] c"Stores a password in encrypted format.\0A\00"
@.str.2 = [71 x i8] c"The resulting file can be used with the -rfbauth argument to OSXvnc.\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [44 x i8] c"\0Ausage: storepasswd <password> <filename>\0A\00"
@str.3 = [39 x i8] c"Stores a password in encrypted format.\00"
@str.4 = [70 x i8] c"The resulting file can be used with the -rfbauth argument to OSXvnc.\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char *strdup(char *);
char *prompt(void) { return strdup("custom prompt> "); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"custom prompt> \00"
define i8* @prompt() {
%1 = call i8* @strdup(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [16 x i8] c"custom prompt> \00"
define noalias i8* @prompt() {
%1 = tail call dereferenceable_or_null(16) i8* @strdup(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
scalar_t__ unaligned_read_be16(int /*<<< orphan*/ const *);
uint32_t unaligned_read_be32(const void *_u) {
  const uint8_t *u = _u;
  return (((uint32_t)unaligned_read_be16(u)) << 16) |
         ((uint32_t)unaligned_read_be16(u + 2));
}


x86 assembly (clang, -O0):
<unaligned_read_be32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <unaligned_read_be16@plt>
shl    $0x10,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1030 <unaligned_read_be16@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unaligned_read_be32>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <unaligned_read_be16@plt>
mov    %rax,%r14
shl    $0x10,%r14d
add    $0x8,%rbx
mov    %rbx,%rdi
call   1030 <unaligned_read_be16@plt>
or     %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @unaligned_read_be32(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i64 @unaligned_read_be16(i32* %6)
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 16
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 2
%12 = call i64 @unaligned_read_be16(i32* %11)
%13 = trunc i64 %12 to i32
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @unaligned_read_be32(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i64 @unaligned_read_be16(i32* %2)
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 16
%6 = getelementptr inbounds i8, i8* %0, i64 8
%7 = bitcast i8* %6 to i32*
%8 = tail call i64 @unaligned_read_be16(i32* %7)
%9 = trunc i64 %8 to i32
%10 = or i32 %5, %9
ret i32 %10
}
/* Variables and functions */
int check_shm_id(int, size_t);
int get_shm_seg(int, size_t, int /*<<< orphan*/);
int check_shm_key(int key, size_t size) {
  int id;
  id = get_shm_seg(key, size, 0);
  if (id < 0)
    return -1;
  return check_shm_id(id, size);
}


x86 assembly (clang, -O0):
<check_shm_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1040 <get_shm_seg@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1156 <check_shm_key+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1165 <check_shm_key+0x45>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <check_shm_id@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_shm_key>:
push   %rbx
mov    %rsi,%rbx
xor    %edx,%edx
call   1040 <get_shm_seg@plt>
test   %eax,%eax
js     113a <check_shm_key+0x1a>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <check_shm_id@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @check_shm_key(i32 %0, i64 %1) {
%3 = tail call i32 @get_shm_seg(i32 %0, i64 %1, i32 0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @check_shm_id(i32 %3, i64 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ TabletInfoHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void TabletInfoUpdated() { UAVObjUpdated(TabletInfoHandle()); }


x86 assembly (clang, -O0):
<TabletInfoUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <TabletInfoHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TabletInfoUpdated>:
push   %rax
xor    %eax,%eax
call   1040 <TabletInfoHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @TabletInfoUpdated() {
%1 = call i32 (...) @TabletInfoHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @TabletInfoUpdated() {
%1 = tail call i32 (...) @TabletInfoHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
int comparefun(void *int_a, void *int_b) {
  int a = *(int *)int_a, b = *(int *)int_b;
  if (a > b)
    return 1;
  else if (a < b)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<comparefun>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    1136 <comparefun+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1155 <comparefun+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    114e <comparefun+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <comparefun+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparefun>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setl   %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @comparefun(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
int Swap(int *a) {
  int temp;
  temp = *a;
  *a = *(a + 1);
  *(a + 1) = temp;
  return (0);
}


x86 assembly (clang, -O0):
<Swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Swap>:
rolq   $0x20,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @Swap(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
store i32 %4, i32* %0
store i32 %2, i32* %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f();
main() {
  int j;
  f();
  j = 2;
  int i = j;
  return i;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
ret i32 2
}
int no_setup() { return 0; }


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

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

LLVM IR (-O0):
define i32 @no_setup() {
ret i32 0
}

LLVM IR (-O2):
define i32 @no_setup() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printarray(int a[8], int n) {
  int lcv;
  for (lcv = 0; lcv < n; lcv++) {
    printf("   %d", a[lcv]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printarray>:
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 <printarray+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 <printarray+0x16>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printarray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printarray+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 <printarray+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [6 x i8] c" %d\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printarray(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 ([6 x i8], [6 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 = [6 x i8] c" %d\00"
define void @printarray(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 ([6 x i8], [6 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
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ getpid();
pid_t c_getpid_() { return getpid(); }


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

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

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

LLVM IR (-O2):
define i32 @c_getpid_() {
%1 = tail call i32 (...) @getpid()
ret i32 %1
}
void gdk_display_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_display_get_type() {
ret void
}
/* Type definitions */
typedef scalar_t__ RAND_MAX;

/* Variables and functions */
scalar_t__ rand();
double randbl() {
  return ((double)rand() / ((double)(RAND_MAX) + (double)(1)));
}


x86 assembly (clang, -O0):
<randbl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
movsd  0xed8(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<randbl>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @randbl() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = fdiv double %2, 1.000000e+00
ret double %3
}

LLVM IR (-O2):
define double @randbl() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
ret double %2
}
double sqrt(double x __attribute__((unused))) { return 0.0; }


x86 assembly (clang, -O0):
<sqrt>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @sqrt(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @sqrt(double %0) {
ret double 0.000000e+00
}
/* Type definitions */
struct t_list {
  int dummy;
};

/* Variables and functions */
struct t_list *add_front_list(struct t_list *plist, struct t_list *other) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
%struct.t_list = type { i32 }
define noalias %struct.t_list* @add_front_list(%struct.t_list* nocapture readnone %0, %struct.t_list* nocapture readnone %1) {
ret %struct.t_list* null
}
/* Variables and functions */
scalar_t__ test_sat_parser_should_fail(char *);
int test17(void) {
  return test_sat_parser_should_fail("(") || test_sat_parser_should_fail("(  ");
}


x86 assembly (clang, -O0):
<test17>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    114c <test17+0x3c>
lea    0xec5(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test17>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112c <test17+0x1c>
pop    %rcx
ret
lea    0xecf(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"(\00"
@.str.1 = [4 x i8] c"( \00"
define i32 @test17() {
%1 = call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ true, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [2 x i8] c"(\00"
@.str.1 = [4 x i8] c"( \00"
define i32 @test17() {
%1 = tail call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 1, %0 ], [ %6, %3 ]
ret i32 %8
}
void RTSha1Update(void) {}


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

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

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

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