xunge/DecIR huggingface dataset:
/* Variables and functions */
void stub1(float, long long);
void testClosureFLLrV(void (*closure)(float, long long), float a1,
                      long long a2) {
  if (closure != NULL)
    (*closure)(a1, a2);
}


x86 assembly (clang, -O0):
<testClosureFLLrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     112f <testClosureFLLrV+0x2f>
mov    -0x8(%rbp),%rax
movss  -0xc(%rbp),%xmm0
mov    -0x18(%rbp),%rdi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureFLLrV>:
test   %rdi,%rdi
je     110d <testClosureFLLrV+0xd>
mov    %rdi,%rax
mov    %rsi,%rdi
jmp    *%rax
ret

LLVM IR (-O0):
define void @testClosureFLLrV(void (float, i64)* %0, float %1, i64 %2) {
%4 = alloca void (float, i64)*
%5 = alloca float
%6 = alloca i64
store void (float, i64)* %0, void (float, i64)** %4
store float %1, float* %5
store i64 %2, i64* %6
%7 = load void (float, i64)*, void (float, i64)** %4
%8 = icmp ne void (float, i64)* %7, null
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load void (float, i64)*, void (float, i64)** %4
%11 = load float, float* %5
%12 = load i64, i64* %6
br label %13
13: ; preds = %9, %3
ret void
}

LLVM IR (-O2):
define void @testClosureFLLrV(void (float, i64)* %0, float %1, i64 %2) {
%4 = icmp eq void (float, i64)* %0, null
br i1 %4, label %6, label %5
5: ; preds = %3
tail call void %0(float %1, i64 %2)
br label %6
6: ; preds = %5, %3
ret void
}
void MSP430TimerM$CompareB2$fired(void) {
  MSP430TimerM$CompareB2$default$fired();
}


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

x86 assembly (clang, -O2):
<MSP430TimerM$CompareB2$fired>:
xor    %eax,%eax
jmp    1030 <MSP430TimerM$CompareB2$default$fired@plt>

LLVM IR (-O0):
define void @"MSP430TimerM$CompareB2$fired"() {
%1 = call i32 (...) @"MSP430TimerM$CompareB2$default$fired"()
ret void
}

LLVM IR (-O2):
define void @"MSP430TimerM$CompareB2$fired"() {
%1 = tail call i32 (...) @"MSP430TimerM$CompareB2$default$fired"()
ret void
}
int returnme() { return 42; }


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

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

LLVM IR (-O0):
define i32 @returnme() {
ret i32 42
}

LLVM IR (-O2):
define i32 @returnme() {
ret i32 42
}
/* Variables and functions */
int shmdt(void *);
int /*<<< orphan*/ show_memory_error(char *);
int detach_shared_memory(void *shmptr) {
  int tmp;
  tmp = shmdt(shmptr);
  if (tmp == -1) {
    show_memory_error("detaching shared memory segment failed");
    return -2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<detach_shared_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <shmdt@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    115a <detach_shared_memory+0x3a>
lea    0xeb7(%rip),%rdi
call   1040 <show_memory_error@plt>
movl   $0xfffffffe,-0x4(%rbp)
jmp    1161 <detach_shared_memory+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<detach_shared_memory>:
push   %rax
call   1030 <shmdt@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     1131 <detach_shared_memory+0x11>
pop    %rcx
ret
lea    0xec8(%rip),%rdi
call   1040 <show_memory_error@plt>
mov    $0xfffffffe,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"detaching shared memory segment failed\00"
define i32 @detach_shared_memory(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @shmdt(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @show_memory_error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
store i32 -2, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@.str = [39 x i8] c"detaching shared memory segment failed\00"
define i32 @detach_shared_memory(i8* %0) {
%2 = tail call i32 @shmdt(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @show_memory_error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ -2, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ es3(int *, int);
int main() {
  int array[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  es3(array, sizeof(array) / sizeof(array[0]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x28,%edx
call   1030 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <es3@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xf05(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1030 <es3@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.array = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @es3(i32* %3, i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @es3(i32* %3, i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
char *test_failure_str(int);
void test_unknown_failure(int reason) {
  printf("\r\n"
         "Unknown test failure (type: %s), cannot continue :("
         "\r\n",
         test_failure_str(reason));
  exit(1);
}


x86 assembly (clang, -O0):
<test_unknown_failure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <test_failure_str@plt>
mov    %rax,%rsi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<test_unknown_failure>:
push   %rax
call   1040 <test_failure_str@plt>
lea    0xec3(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"\0D\0AUnknown test failure (type: %s), cannot continue :(\0D\0A\00"
define void @test_unknown_failure(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i8* @test_failure_str(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [56 x i8] c"\0D\0AUnknown test failure (type: %s), cannot continue :(\0D\0A\00"
define void @test_unknown_failure(i32 %0) {
%2 = tail call i8* @test_failure_str(i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
unsigned xrop3_174_1_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;
  stk3 = ~T;
  stk2 = S & stk3;
  stk1 = D | stk2;
  return (stk1 & (~S)) | (D & S);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_174_1_0(i8 zeroext %0, i8 zeroext %1) {
ret i32 255
}
/* Type definitions */
typedef int /*<<< orphan*/ x;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int search(int *, int, int);
int main(void) {
  int x[] = {1, 3, 5};
  printf("%d\n", search(x, sizeof(x) / sizeof(int), 1));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
call   1040 <search@plt>
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
call   1040 <search@plt>
lea    0xeb7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.x = [3 x i32] [i32 1, i32 3, i32 5]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%4 = call i32 @search(i32* %3, i32 3, i32 1)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int utf8_strlen(char const *, size_t);
int is_utf8_str(const char *str, size_t len) {
  return utf8_strlen(str, len) != -1;
}


x86 assembly (clang, -O0):
<is_utf8_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <utf8_strlen@plt>
cmp    $0xffffffff,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_utf8_str>:
push   %rax
call   1030 <utf8_strlen@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_utf8_str(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @utf8_strlen(i8* %5, i64 %6)
%8 = icmp ne i32 %7, -1
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_utf8_str(i8* %0, i64 %1) {
%3 = tail call i32 @utf8_strlen(i8* %0, i64 %1)
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
void McASPTxClkCheckConfig(unsigned int baseAddr, unsigned int clkDiv,
                           unsigned char boundMin, unsigned char boundMax) {
  (*((volatile unsigned int *)(baseAddr + (0xC8)))) =
      clkDiv | boundMin << (0x00000008u) | boundMax << (0x00000010u);
}


x86 assembly (clang, -O0):
<McASPTxClkCheckConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dl,%cl
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%ecx
movzbl -0x9(%rbp),%eax
shl    $0x8,%eax
or     %eax,%ecx
movzbl -0xa(%rbp),%eax
shl    $0x10,%eax
or     %eax,%ecx
mov    -0x4(%rbp),%eax
add    $0xc8,%eax
mov    %eax,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<McASPTxClkCheckConfig>:
shl    $0x8,%edx
or     %esi,%edx
shl    $0x10,%ecx
or     %edx,%ecx
add    $0xc8,%edi
mov    %ecx,(%rdi)
ret

LLVM IR (-O0):
define void @McASPTxClkCheckConfig(i32 %0, i32 %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
%8 = alloca i8
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%9 = load i32, i32* %6
%10 = load i8, i8* %7
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = or i32 %9, %12
%14 = load i8, i8* %8
%15 = zext i8 %14 to i32
%16 = shl i32 %15, 16
%17 = or i32 %13, %16
%18 = load i32, i32* %5
%19 = add i32 %18, 200
%20 = zext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
store volatile i32 %17, i32* %21
ret void
}

LLVM IR (-O2):
define void @McASPTxClkCheckConfig(i32 %0, i32 %1, i8 zeroext %2, i8 zeroext %3) {
%5 = zext i8 %2 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = or i32 %6, %1
%8 = zext i8 %3 to i32
%9 = shl nuw nsw i32 %8, 16
%10 = or i32 %7, %9
%11 = add i32 %0, 200
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 %10, i32* %13
ret void
}
/* Type definitions */
struct ArrowSchema {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ArrowSchema **);
void free_malloced_schemas(struct ArrowSchema **schemas) { free(schemas); }


x86 assembly (clang, -O0):
<free_malloced_schemas>:
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):
<free_malloced_schemas>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.ArrowSchema = type { i32 }
define void @free_malloced_schemas(%struct.ArrowSchema** %0) {
%2 = alloca %struct.ArrowSchema**
store %struct.ArrowSchema** %0, %struct.ArrowSchema*** %2
%3 = load %struct.ArrowSchema**, %struct.ArrowSchema*** %2
%4 = call i32 @free(%struct.ArrowSchema** %3)
ret void
}

LLVM IR (-O2):
%struct.ArrowSchema = type { i32 }
define void @free_malloced_schemas(%struct.ArrowSchema** nocapture %0) {
%2 = tail call i32 @free(%struct.ArrowSchema** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ simputc(int);
void simputs(char *str) {
  int i;
  for (i = 0; str[i] != '\0'; i++) {
    simputc((int)(str[i]));
  }
}


x86 assembly (clang, -O0):
<simputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1157 <simputs+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <simputc@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <simputs+0x13>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @simputs(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %20, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %23
12: ; preds = %4
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%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 = call i32 @simputc(i32 %18)
br label %20
20: ; preds = %12
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %4
23: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @simputs(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = phi i8 [ %11, %4 ], [ %2, %1 ]
%7 = sext i8 %6 to i32
%8 = tail call i32 @simputc(i32 %7)
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
/* Variables and functions */
int strlen(char *);
void my_strcat(char *s, char *t) {
  s = s + strlen(s);
  while ((*s++ = *t++) != '\0') {
    ;
  }
}


x86 assembly (clang, -O0):
<my_strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1174 <my_strcat+0x64>
jmp    1141 <my_strcat+0x31>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
cltq
add    %r14,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
movzbl (%rbx,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1130 <my_strcat+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @my_strcat(i8* %0, i8* nocapture %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
br label %6
6: ; preds = %6, %2
%7 = phi i8* [ %5, %2 ], [ %11, %6 ]
%8 = phi i8* [ %1, %2 ], [ %9, %6 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %10, i8* %7
%12 = icmp eq i8 %10, 0
br i1 %12, label %13, label %6
13: ; preds = %6
ret void
}
unsigned int GPMCPrefetchEngineStatusGet(unsigned int baseAddr) {
  unsigned int status;
  status = ((*((volatile unsigned int *)(baseAddr + (0x1EC)))) & (0x00000001u));
  return (status);
}


x86 assembly (clang, -O0):
<GPMCPrefetchEngineStatusGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1ec,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPMCPrefetchEngineStatusGet>:
add    $0x1ec,%edi
mov    (%rdi),%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @GPMCPrefetchEngineStatusGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add i32 %4, 492
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, 1
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @GPMCPrefetchEngineStatusGet(i32 %0) {
%2 = add i32 %0, 492
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, 1
ret i32 %6
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int read_byte_data(int, int);
uint8_t get_port(uint8_t port, uint8_t a_register, uint8_t b_register) {
  if (port == 0) {
    return (read_byte_data(0x20, a_register));
  } else if (port == 1) {
    return (read_byte_data(0x20, b_register));
  } else {
    printf("port out of range: 0 or 1");
    return (0);
  }
}


x86 assembly (clang, -O0):
<get_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1150 <get_port+0x30>
mov    -0xc(%rbp),%esi
mov    $0x20,%edi
call   1030 <read_byte_data@plt>
mov    %eax,-0x4(%rbp)
jmp    1182 <get_port+0x62>
cmpl   $0x1,-0x8(%rbp)
jne    116f <get_port+0x4f>
mov    -0x10(%rbp),%esi
mov    $0x20,%edi
call   1030 <read_byte_data@plt>
mov    %eax,-0x4(%rbp)
jmp    1182 <get_port+0x62>
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_port>:
cmp    $0x1,%edi
je     1133 <get_port+0x13>
test   %edi,%edi
jne    113f <get_port+0x1f>
mov    $0x20,%edi
jmp    1030 <read_byte_data@plt>
mov    $0x20,%edi
mov    %edx,%esi
jmp    1030 <read_byte_data@plt>
push   %rax
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"port out of range: 0 or 1\00"
define i32 @get_port(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i32, i32* %6
%12 = call i32 @read_byte_data(i32 32, i32 %11)
store i32 %12, i32* %4
br label %21
13: ; preds = %3
%14 = load i32, i32* %5
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i32, i32* %7
%18 = call i32 @read_byte_data(i32 32, i32 %17)
store i32 %18, i32* %4
br label %21
19: ; preds = %13
%20 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %4
br label %21
21: ; preds = %19, %16, %10
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
@.str = [26 x i8] c"port out of range: 0 or 1\00"
define i32 @get_port(i32 %0, i32 %1, i32 %2) {
switch i32 %0, label %8 [
i32 0, label %4
i32 1, label %6
]
4: ; preds = %3
%5 = tail call i32 @read_byte_data(i32 32, i32 %1)
br label %10
6: ; preds = %3
%7 = tail call i32 @read_byte_data(i32 32, i32 %2)
br label %10
8: ; preds = %3
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %6, %4
%11 = phi i32 [ %5, %4 ], [ %7, %6 ], [ 0, %8 ]
ret i32 %11
}
long long llabs(long long val) {
  if (val < 0) {
    val = -val;
  }
  return val;
}


x86 assembly (clang, -O0):
<llabs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    111d <llabs+0x1d>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @llabs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 0, %6
store i64 %7, i64* %2
br label %8
8: ; preds = %5, %1
%9 = load i64, i64* %2
ret i64 %9
}

LLVM IR (-O2):
define i64 @llabs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
char *CCutil_strrchr(char *s, int c) {
  char *l = (char *)(0);
  while (*s) {
    if (*s == c)
      l = s;
    s++;
  }
  return l;
}


x86 assembly (clang, -O0):
<CCutil_strrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1149 <CCutil_strrchr+0x49>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    1138 <CCutil_strrchr+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <CCutil_strrchr+0x13>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CCutil_strrchr>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1125 <CCutil_strrchr+0x25>
nopl   0x0(%rax,%rax,1)
movsbl %cl,%ecx
cmp    %esi,%ecx
cmove  %rdi,%rax
movzbl 0x1(%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <CCutil_strrchr+0x10>
ret

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

LLVM IR (-O2):
define i8* @CCutil_strrchr(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %11, %5 ], [ null, %2 ]
%8 = phi i8* [ %12, %5 ], [ %0, %2 ]
%9 = sext i8 %6 to i32
%10 = icmp eq i32 %9, %1
%11 = select i1 %10, i8* %8, i8* %7
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i8* [ null, %2 ], [ %11, %5 ]
ret i8* %16
}
int scard_function_reconnect_return(void *user_data, struct stream *in_s,
                                    int len, int status) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.stream = type opaque
define i32 @scard_function_reconnect_return(i8* %0, %struct.stream* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca %struct.stream*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store %struct.stream* %1, %struct.stream** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
%struct.stream = type opaque
define i32 @scard_function_reconnect_return(i8* nocapture readnone %0, %struct.stream* nocapture readnone %1, i32 %2, i32 %3) {
ret i32 0
}
/* Variables and functions */
int fn_sq_ch_83_ch_117_ch_98_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_79_ch_102(
    char const *);
int fn_al_sq_ch_83_ch_117_ch_98_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_79_ch_102(
    const char *text) {
  int pos = 0;
  pos =
      fn_sq_ch_83_ch_117_ch_98_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_79_ch_102(
          text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_al_sq_ch_83_ch_117_ch_98_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_79_ch_102>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_83_ch_117_ch_98_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_79_ch_102@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_83_ch_117_ch_98_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_79_ch_102+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_83_ch_117_ch_98_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_79_ch_102+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_al_sq_ch_83_ch_117_ch_98_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_79_ch_102>:
jmp    1030 <fn_sq_ch_83_ch_117_ch_98_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_79_ch_102@plt>

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

LLVM IR (-O2):
define i32 @fn_al_sq_ch_83_ch_117_ch_98_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_79_ch_102(i8* %0) {
%2 = tail call i32 @fn_sq_ch_83_ch_117_ch_98_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_79_ch_102(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ init_corner_ori();
int /*<<< orphan*/ init_identity_cube();
int /*<<< orphan*/ init_move_table();
int /*<<< orphan*/ initalize_Singmaster_data();
void init_data_structs() {
  init_corner_ori();
  init_identity_cube();
  init_move_table();
  initalize_Singmaster_data();
  return;
}


x86 assembly (clang, -O0):
<init_data_structs>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <init_corner_ori@plt>
mov    $0x0,%al
call   1030 <init_identity_cube@plt>
mov    $0x0,%al
call   1040 <init_move_table@plt>
mov    $0x0,%al
call   1050 <initalize_Singmaster_data@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_data_structs>:
push   %rax
xor    %eax,%eax
call   1060 <init_corner_ori@plt>
xor    %eax,%eax
call   1030 <init_identity_cube@plt>
xor    %eax,%eax
call   1040 <init_move_table@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <initalize_Singmaster_data@plt>

LLVM IR (-O0):
define void @init_data_structs() {
%1 = call i32 (...) @init_corner_ori()
%2 = call i32 (...) @init_identity_cube()
%3 = call i32 (...) @init_move_table()
%4 = call i32 (...) @initalize_Singmaster_data()
ret void
}

LLVM IR (-O2):
define void @init_data_structs() {
%1 = tail call i32 (...) @init_corner_ori()
%2 = tail call i32 (...) @init_identity_cube()
%3 = tail call i32 (...) @init_move_table()
%4 = tail call i32 (...) @initalize_Singmaster_data()
ret void
}
/* Variables and functions */
int get_sp();
int /*<<< orphan*/ printf(char *, int);
void print_esp() { printf("Stack pointer (ESP): 0x%x\n", get_sp()); }


x86 assembly (clang, -O0):
<print_esp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <get_sp@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_esp>:
push   %rax
xor    %eax,%eax
call   1040 <get_sp@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Stack pointer (ESP): 0x%x\0A\00"
define void @print_esp() {
%1 = call i32 (...) @get_sp()
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Stack pointer (ESP): 0x%x\0A\00"
define void @print_esp() {
%1 = tail call i32 (...) @get_sp()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void iptree_create_final(void *data __attribute__((unused)),
                         unsigned int flags __attribute__((unused))) {}


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

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

LLVM IR (-O0):
define void @iptree_create_final(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @iptree_create_final(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int del(double, double);
int udb(double, double);
double dbar(double xx, double Q2) { return (del(xx, Q2) + udb(xx, Q2)) / 2; }


x86 assembly (clang, -O0):
<dbar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <del@plt>
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <udb@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbar>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
call   1040 <del@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <udb@plt>
add    %ebx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @dbar(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i32 @del(double %5, double %6)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call i32 @udb(double %8, double %9)
%11 = add nsw i32 %7, %10
%12 = sdiv i32 %11, 2
%13 = sitofp i32 %12 to double
ret double %13
}

LLVM IR (-O2):
define double @dbar(double %0, double %1) {
%3 = tail call i32 @del(double %0, double %1)
%4 = tail call i32 @udb(double %0, double %1)
%5 = add nsw i32 %4, %3
%6 = sdiv i32 %5, 2
%7 = sitofp i32 %6 to double
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
void erreur_zoom(int zoom) {
  printf("Le facteur de zoom %d n'est pas compris dans l'intervalle ]0,100]\n",
         zoom);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<erreur_zoom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<erreur_zoom>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [67 x i8] c"Le facteur de zoom %d n'est pas compris dans l'intervalle ]0,100]\0A\00"
@EXIT_FAILURE = global i32 0
define void @erreur_zoom(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [67 x i8] c"Le facteur de zoom %d n'est pas compris dans l'intervalle ]0,100]\0A\00"
@EXIT_FAILURE = global i32 0
define void @erreur_zoom(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
char *CatStr(char *, char const *);
char *CopyStr(char *Dest, const char *Src) {
  int len;
  char *ptr;
  if (Dest)
    *Dest = 0;
  return (CatStr(Dest, Src));
}


x86 assembly (clang, -O0):
<CopyStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1132 <CopyStr+0x22>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <CatStr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopyStr>:
test   %rdi,%rdi
je     1118 <CopyStr+0x8>
movb   $0x0,(%rdi)
jmp    1030 <CatStr@plt>

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

LLVM IR (-O2):
define i8* @CopyStr(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %5, label %4
4: ; preds = %2
store i8 0, i8* %0
br label %5
5: ; preds = %4, %2
%6 = tail call i8* @CatStr(i8* %0, i8* %1)
ret i8* %6
}
/* Type definitions */
struct rlimit {
  int dummy;
};

/* Variables and functions */
scalar_t__ setrlimit(int, struct rlimit *);
int /*<<< orphan*/ shutdown(int, char *, int);
void setr(int type, struct rlimit *rlim) {
  if (setrlimit(type, rlim))
    shutdown(7, "setrlimit()", 147 - 1);
}


x86 assembly (clang, -O0):
<setr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <setrlimit@plt>
cmp    $0x0,%rax
je     115b <setr+0x3b>
mov    $0x7,%edi
lea    0xeaf(%rip),%rsi
mov    $0x92,%edx
call   1030 <shutdown@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setr>:
push   %rax
call   1040 <setrlimit@plt>
test   %rax,%rax
je     1142 <setr+0x22>
lea    0xece(%rip),%rsi
mov    $0x7,%edi
mov    $0x92,%edx
pop    %rax
jmp    1030 <shutdown@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.rlimit = type { i32 }
@.str = [12 x i8] c"setrlimit()\00"
define void @setr(i32 %0, %struct.rlimit* %1) {
%3 = alloca i32
%4 = alloca %struct.rlimit*
store i32 %0, i32* %3
store %struct.rlimit* %1, %struct.rlimit** %4
%5 = load i32, i32* %3
%6 = load %struct.rlimit*, %struct.rlimit** %4
%7 = call i64 @setrlimit(i32 %5, %struct.rlimit* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @shutdown(i32 7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 146)
br label %11
11: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
%struct.rlimit = type { i32 }
@.str = [12 x i8] c"setrlimit()\00"
define void @setr(i32 %0, %struct.rlimit* %1) {
%3 = tail call i64 @setrlimit(i32 %0, %struct.rlimit* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @shutdown(i32 7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 146)
br label %7
7: ; preds = %5, %2
ret void
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

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


x86 assembly (clang, -O0):
<RNDResponseSink_RenderingControl_GetBlueVideoGain>:
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_GetBlueVideoGain>:
lea    0xee9(%rip),%rdi
mov    %ecx,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [75 x i8] c"RND Invoke Response: RenderingControl/GetBlueVideoGain[ErrorCode:%d](%u)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetBlueVideoGain(%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 ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i32 %9, i16 zeroext %10)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [75 x i8] c"RND Invoke Response: RenderingControl/GetBlueVideoGain[ErrorCode:%d](%u)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetBlueVideoGain(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i16 zeroext %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i32 %1, i16 zeroext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ readfile(char const *, int *, int const *, char *, int *,
                            int *);
void sreadfile(const char *filename, const int *m, const int *n, float *A,
               const int *ldA, int *info) {
  int cm = *m * (int)(sizeof(float) / sizeof(char));
  int cldA = *ldA * (int)(sizeof(float) / sizeof(char));
  readfile(filename, &cm, n, (char *)A, &cldA, info);
}


x86 assembly (clang, -O0):
<sreadfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
shl    $0x2,%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
shl    $0x2,%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r9
lea    -0x34(%rbp),%rsi
lea    -0x38(%rbp),%r8
call   1030 <readfile@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sreadfile>:
push   %rax
mov    (%rsi),%eax
shl    $0x2,%eax
mov    %eax,0x4(%rsp)
mov    (%r8),%eax
shl    $0x2,%eax
mov    %eax,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%r8
call   1030 <readfile@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @sreadfile(i8* %0, i32* %1, i32* %2, float* %3, i32* %4, i32* %5) {
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca float*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store float* %3, float** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%15 = load i32*, i32** %8
%16 = load i32, i32* %15
%17 = mul nsw i32 %16, 4
store i32 %17, i32* %13
%18 = load i32*, i32** %11
%19 = load i32, i32* %18
%20 = mul nsw i32 %19, 4
store i32 %20, i32* %14
%21 = load i8*, i8** %7
%22 = load i32*, i32** %9
%23 = load float*, float** %10
%24 = bitcast float* %23 to i8*
%25 = load i32*, i32** %12
%26 = call i32 @readfile(i8* %21, i32* %13, i32* %22, i8* %24, i32* %14, i32* %25)
ret void
}

LLVM IR (-O2):
define void @sreadfile(i8* %0, i32* nocapture %1, i32* %2, float* %3, i32* nocapture %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = bitcast i32* %7 to i8*
%10 = load i32, i32* %1
%11 = shl nsw i32 %10, 2
store i32 %11, i32* %7
%12 = bitcast i32* %8 to i8*
%13 = load i32, i32* %4
%14 = shl nsw i32 %13, 2
store i32 %14, i32* %8
%15 = bitcast float* %3 to i8*
%16 = call i32 @readfile(i8* %0, i32* %7, i32* %2, i8* %15, i32* %8, i32* %5)
ret void
}
void gtk_tree_view_column_set_title() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_set_title() {
ret void
}
/* Variables and functions */
int myFunc();
int main(int argc, char *argv[]) {
  if (myFunc() == 55)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <myFunc@plt>
cmp    $0x37,%eax
jne    1142 <main+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1149 <main+0x39>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <myFunc@plt>
xor    %ecx,%ecx
cmp    $0x37,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @myFunc()
%4 = icmp ne i32 %3, 55
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ interrupt(int, int, char *, int /*<<< orphan*/,
                             int /*<<< orphan*/);
void clearCommand(char *args[]) {
  int i = 0;
  while (i < 25) {
    interrupt(0x21, 0x0, "\n", 0, 0);
    i++;
  }
}


x86 assembly (clang, -O0):
<clearCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x19,-0xc(%rbp)
jge    1155 <clearCommand+0x45>
mov    $0x21,%edi
xor    %r8d,%r8d
lea    0xec4(%rip),%rdx
mov    %r8d,%esi
mov    %r8d,%ecx
call   1030 <interrupt@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <clearCommand+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearCommand>:
push   %rbp
push   %rbx
push   %rax
mov    $0x19,%ebp
lea    0xee1(%rip),%rbx
nop
mov    $0x21,%edi
xor    %esi,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <interrupt@plt>
add    $0xffffffff,%ebp
jne    1120 <clearCommand+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @clearCommand(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 25
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = call i32 @interrupt(i32 33, i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
br label %4
11: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @clearCommand(i8** nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %5, %2 ]
%4 = tail call i32 @interrupt(i32 33, i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 25
br i1 %6, label %7, label %2
7: ; preds = %2
ret void
}