xunge/DecIR huggingface dataset:
char *strchr(const char *p, int c) {
  if (!p)
    return (0);
  for (; *p; p++)
    if (*p == c)
      return ((char *)p);
  return (0);
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1123 <strchr+0x23>
movq   $0x0,-0x8(%rbp)
jmp    1170 <strchr+0x70>
jmp    1128 <strchr+0x28>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1168 <strchr+0x68>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    1152 <strchr+0x52>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1170 <strchr+0x70>
jmp    1157 <strchr+0x57>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1128 <strchr+0x28>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
test   %rdi,%rdi
je     1123 <strchr+0x23>
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     1123 <strchr+0x23>
xchg   %ax,%ax
movsbl %cl,%ecx
cmp    %esi,%ecx
je     1125 <strchr+0x25>
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %16, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %4, %12
%8 = phi i8 [ %14, %12 ], [ %5, %4 ]
%9 = phi i8* [ %13, %12 ], [ %0, %4 ]
%10 = sext i8 %8 to i32
%11 = icmp eq i32 %10, %1
br i1 %11, label %16, label %12
12: ; preds = %7
%13 = getelementptr inbounds i8, i8* %9, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %7
16: ; preds = %7, %12, %4, %2
%17 = phi i8* [ null, %2 ], [ null, %4 ], [ %9, %7 ], [ null, %12 ]
ret i8* %17
}
/* Variables and functions */
char *calloc(int, int);
char randchar();
char *randstring(int len) {
  char *salt;
  salt = calloc(1, len + 1);
  while (len-- > 0) {
    salt[len] = randchar();
  }
  return salt;
}


x86 assembly (clang, -O0):
<randstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
add    $0x1,%esi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    116c <randstring+0x4c>
mov    $0x0,%al
call   1040 <randchar@plt>
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
jmp    113f <randstring+0x1f>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randstring>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%r14d
lea    0x1(%r14),%esi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,%r15
test   %r14d,%r14d
jle    1169 <randstring+0x49>
mov    %r14d,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x2(%rbx),%r14d
xor    %eax,%eax
call   1040 <randchar@plt>
mov    %al,(%r15,%r14,1)
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1150 <randstring+0x30>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define noalias i8* @randstring(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i8* @calloc(i32 1, i32 %2)
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %6, %5 ], [ %9, %7 ]
%9 = add nsw i64 %8, -1
%10 = tail call signext i8 (...) @randchar()
%11 = and i64 %9, 4294967295
%12 = getelementptr inbounds i8, i8* %3, i64 %11
store i8 %10, i8* %12
%13 = icmp ugt i64 %8, 1
br i1 %13, label %7, label %14
14: ; preds = %7, %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_133() {
  Assert_real((isqrt(133) == 11),
              "/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/stdlib/isqrt.c",
              670, ("Integer square root of 133 should be 11"));
}


x86 assembly (clang, -O0):
<t_sqrt_133>:
push   %rbp
mov    %rsp,%rbp
mov    $0x85,%edi
call   1030 <isqrt@plt>
cmp    $0xb,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x29e,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_133>:
push   %rax
mov    $0x85,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xb,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x29e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 133 should be 11\00"
define void @t_sqrt_133() {
%1 = call i32 @isqrt(i32 133)
%2 = icmp eq i32 %1, 11
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 670, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 133 should be 11\00"
define void @t_sqrt_133() {
%1 = tail call i32 @isqrt(i32 133)
%2 = icmp eq i32 %1, 11
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 670, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int randint(int);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void generateMap(int *width, int *height) {
  srand(time(NULL));
  *width = randint(12) + 3;
  *height = randint(12) + 3;
  return;
}


x86 assembly (clang, -O0):
<generateMap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0xc,%edi
call   1050 <randint@plt>
mov    %eax,%ecx
add    $0x3,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0xc,%edi
call   1050 <randint@plt>
mov    %eax,%ecx
add    $0x3,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateMap>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0xc,%edi
call   1050 <randint@plt>
add    $0x3,%eax
mov    %eax,(%rbx)
mov    $0xc,%edi
call   1050 <randint@plt>
add    $0x3,%eax
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @generateMap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = call i32 @time(i32* null)
%6 = call i32 @srand(i32 %5)
%7 = call i32 @randint(i32 12)
%8 = add nsw i32 %7, 3
%9 = load i32*, i32** %3
store i32 %8, i32* %9
%10 = call i32 @randint(i32 12)
%11 = add nsw i32 %10, 3
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @generateMap(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
%5 = tail call i32 @randint(i32 12)
%6 = add nsw i32 %5, 3
store i32 %6, i32* %0
%7 = tail call i32 @randint(i32 12)
%8 = add nsw i32 %7, 3
store i32 %8, i32* %1
ret void
}
int test_imm_43int8_reg(signed char val) {
  return ((val) & (0x43 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_43int8_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, 67
%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_43int8_reg(i8 signext %0) {
%2 = and i8 %0, 67
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ e_xxxra(int, void *, int, int);
void e_movra(int rd, void *addr) { e_xxxra(rd, addr, 0xA1, 0x8B); }


x86 assembly (clang, -O0):
<e_movra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0xa1,%edx
mov    $0x8b,%ecx
call   1030 <e_xxxra@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_movra>:
mov    $0xa1,%edx
mov    $0x8b,%ecx
jmp    1030 <e_xxxra@plt>

LLVM IR (-O0):
define void @e_movra(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @e_xxxra(i32 %5, i8* %6, i32 161, i32 139)
ret void
}

LLVM IR (-O2):
define void @e_movra(i32 %0, i8* %1) {
%3 = tail call i32 @e_xxxra(i32 %0, i8* %1, i32 161, i32 139)
ret void
}
/* Variables and functions */
int __infer_nondet_int();
long double __infer_nondet_long_double();
long double frexpl(long double value, int *exp) {
  *exp = __infer_nondet_int();
  return __infer_nondet_long_double();
}


x86 assembly (clang, -O0):
<frexpl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
xor    %eax,%eax
mov    %al,-0x19(%rbp)
call   1030 <__infer_nondet_int@plt>
mov    %eax,%edx
mov    -0x19(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    %edx,(%rcx)
call   1040 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frexpl>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
mov    %eax,(%rbx)
xor    %eax,%eax
pop    %rbx
jmp    1040 <__infer_nondet_long_double@plt>

LLVM IR (-O0):
define x86_fp80 @frexpl(x86_fp80 %0, i32* %1) {
%3 = alloca x86_fp80
%4 = alloca i32*
store x86_fp80 %0, x86_fp80* %3
store i32* %1, i32** %4
%5 = call i32 (...) @__infer_nondet_int()
%6 = load i32*, i32** %4
store i32 %5, i32* %6
%7 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @frexpl(x86_fp80 %0, i32* nocapture writeonly %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
store i32 %3, i32* %1
%4 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %4
}
__attribute__((no, noclone)) int foo(int i) {
  if (i < 5)
    __builtin_abort();
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    112a <foo+0x1a>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x4,%edi
jle    1118 <foo+0x8>
xor    %eax,%eax
ret
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 5
br i1 %4, label %5, label %6
5: ; preds = %1
unreachable
6: ; preds = %1
ret i32 0
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp slt i32 %0, 5
br i1 %2, label %3, label %4
3: ; preds = %1
tail call void @abort()
unreachable
4: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ board_init();
int /*<<< orphan*/ rt_application_init();
int /*<<< orphan*/ rt_hw_interrupt_init();
int /*<<< orphan*/ rt_show_version();
int /*<<< orphan*/ rt_system_scheduler_init();
int /*<<< orphan*/ rt_system_scheduler_start();
int /*<<< orphan*/ rt_system_timer_init();
int /*<<< orphan*/ rt_thread_idle_init();
void ht_startup(void) {
  rt_hw_interrupt_init();
  board_init();
  rt_show_version();
  rt_system_timer_init();
  rt_system_scheduler_init();
  rt_application_init();
  rt_thread_idle_init();
  rt_system_scheduler_start();
  return;
}


x86 assembly (clang, -O0):
<ht_startup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <rt_hw_interrupt_init@plt>
mov    $0x0,%al
call   1070 <board_init@plt>
mov    $0x0,%al
call   1090 <rt_show_version@plt>
mov    $0x0,%al
call   1060 <rt_system_timer_init@plt>
mov    $0x0,%al
call   1080 <rt_system_scheduler_init@plt>
mov    $0x0,%al
call   1050 <rt_application_init@plt>
mov    $0x0,%al
call   10a0 <rt_thread_idle_init@plt>
mov    $0x0,%al
call   1030 <rt_system_scheduler_start@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_startup>:
push   %rax
xor    %eax,%eax
call   1040 <rt_hw_interrupt_init@plt>
xor    %eax,%eax
call   1070 <board_init@plt>
xor    %eax,%eax
call   1090 <rt_show_version@plt>
xor    %eax,%eax
call   1060 <rt_system_timer_init@plt>
xor    %eax,%eax
call   1080 <rt_system_scheduler_init@plt>
xor    %eax,%eax
call   1050 <rt_application_init@plt>
xor    %eax,%eax
call   10a0 <rt_thread_idle_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <rt_system_scheduler_start@plt>

LLVM IR (-O0):
define void @ht_startup() {
%1 = call i32 (...) @rt_hw_interrupt_init()
%2 = call i32 (...) @board_init()
%3 = call i32 (...) @rt_show_version()
%4 = call i32 (...) @rt_system_timer_init()
%5 = call i32 (...) @rt_system_scheduler_init()
%6 = call i32 (...) @rt_application_init()
%7 = call i32 (...) @rt_thread_idle_init()
%8 = call i32 (...) @rt_system_scheduler_start()
ret void
}

LLVM IR (-O2):
define void @ht_startup() {
%1 = tail call i32 (...) @rt_hw_interrupt_init()
%2 = tail call i32 (...) @board_init()
%3 = tail call i32 (...) @rt_show_version()
%4 = tail call i32 (...) @rt_system_timer_init()
%5 = tail call i32 (...) @rt_system_scheduler_init()
%6 = tail call i32 (...) @rt_application_init()
%7 = tail call i32 (...) @rt_thread_idle_init()
%8 = tail call i32 (...) @rt_system_scheduler_start()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void SysCtlPeripheralPowerOn(uint32_t ui32Peripheral) {
  ;
  (*((volatile unsigned long
          *)(((unsigned long)(0x400fe900 + ((ui32Peripheral & 0xff00) >> 8)) &
              0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x400fe900 + ((ui32Peripheral & 0xff00) >> 8)) &
               0x000FFFFF)
              << 5) |
             ((ui32Peripheral & 0xff) << 2)))) = 1;
}


x86 assembly (clang, -O0):
<SysCtlPeripheralPowerOn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
add    $0x400fe900,%eax
cltq
movabs $0xf0000000,%rcx
and    %rcx,%rax
or     $0x2000000,%rax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
add    $0x400fe900,%ecx
movslq %ecx,%rcx
and    $0xfffff,%rcx
shl    $0x5,%rcx
or     %rcx,%rax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlPeripheralPowerOn>:
movzbl %dil,%eax
shr    $0x3,%edi
and    $0x1fe0,%edi
shl    $0x2,%eax
or     %edi,%eax
movq   $0x1,0x43fd2000(%rax)
ret

LLVM IR (-O0):
define void @SysCtlPeripheralPowerOn(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = ashr i32 %4, 8
%6 = add nsw i32 1074784512, %5
%7 = sext i32 %6 to i64
%8 = and i64 %7, 4026531840
%9 = or i64 %8, 33554432
%10 = load i32, i32* %2
%11 = and i32 %10, 65280
%12 = ashr i32 %11, 8
%13 = add nsw i32 1074784512, %12
%14 = sext i32 %13 to i64
%15 = and i64 %14, 1048575
%16 = shl i64 %15, 5
%17 = or i64 %9, %16
%18 = load i32, i32* %2
%19 = and i32 %18, 255
%20 = shl i32 %19, 2
%21 = sext i32 %20 to i64
%22 = or i64 %17, %21
%23 = inttoptr i64 %22 to i64*
store volatile i64 1, i64* %23
ret void
}

LLVM IR (-O2):
define void @SysCtlPeripheralPowerOn(i32 %0) {
%2 = lshr i32 %0, 3
%3 = and i32 %2, 8160
%4 = shl i32 %0, 2
%5 = and i32 %4, 1020
%6 = or i32 %5, %3
%7 = or i32 %6, 1140662272
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i64*
store volatile i64 1, i64* %9
ret void
}
double __pow_fi(double a, int n) {
  double r = 1.0;
  while (n-- > 0)
    r *= a;
  return r;
}


x86 assembly (clang, -O0):
<__pow_fi>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  0xeec(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    1141 <__pow_fi+0x41>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1119 <__pow_fi+0x19>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__pow_fi>:
test   %edi,%edi
jle    1134 <__pow_fi+0x34>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
je     113d <__pow_fi+0x3d>
xor    %edx,%edx
movsd  0xee8(%rip),%xmm1
nopl   0x0(%rax,%rax,1)
mulsd  %xmm0,%xmm1
add    $0x1,%edx
cmp    %edx,%ecx
jne    1120 <__pow_fi+0x20>
sub    %edx,%edi
cmp    $0x7,%eax
jae    114a <__pow_fi+0x4a>
jmp    1178 <__pow_fi+0x78>
movsd  0xec4(%rip),%xmm0
ret
movsd  0xebb(%rip),%xmm1
cmp    $0x7,%eax
jb     1178 <__pow_fi+0x78>
add    $0xffffffff,%edi
nopl   (%rax)
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
add    $0xfffffff8,%edi
cmp    $0xfffffffe,%edi
jb     1150 <__pow_fi+0x50>
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @__pow_fi(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
store double 1.000000e+00, double* %5
br label %6
6: ; preds = %10, %2
%7 = load i32, i32* %4
%8 = add nsw i32 %7, -1
store i32 %8, i32* %4
%9 = icmp sgt i32 %7, 0
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load double, double* %3
%12 = load double, double* %5
%13 = fmul double %12, %11
store double %13, double* %5
br label %6
14: ; preds = %6
%15 = load double, double* %5
ret double %15
}

LLVM IR (-O2):
define double @__pow_fi(double %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %35
4: ; preds = %2
%5 = add i32 %1, -1
%6 = and i32 %1, 7
%7 = icmp eq i32 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %4, %8
%9 = phi double [ %13, %8 ], [ 1.000000e+00, %4 ]
%10 = phi i32 [ %12, %8 ], [ %1, %4 ]
%11 = phi i32 [ %14, %8 ], [ 0, %4 ]
%12 = add nsw i32 %10, -1
%13 = fmul double %9, %0
%14 = add i32 %11, 1
%15 = icmp eq i32 %14, %6
br i1 %15, label %16, label %8
16: ; preds = %8, %4
%17 = phi double [ 1.000000e+00, %4 ], [ %13, %8 ]
%18 = phi i32 [ %1, %4 ], [ %12, %8 ]
%19 = phi double [ undef, %4 ], [ %13, %8 ]
%20 = icmp ult i32 %5, 7
br i1 %20, label %35, label %21
21: ; preds = %16, %21
%22 = phi double [ %32, %21 ], [ %17, %16 ]
%23 = phi i32 [ %31, %21 ], [ %18, %16 ]
%24 = fmul double %22, %0
%25 = fmul double %24, %0
%26 = fmul double %25, %0
%27 = fmul double %26, %0
%28 = fmul double %27, %0
%29 = fmul double %28, %0
%30 = fmul double %29, %0
%31 = add nsw i32 %23, -8
%32 = fmul double %30, %0
%33 = add i32 %23, -9
%34 = icmp ult i32 %33, -2
br i1 %34, label %21, label %35
35: ; preds = %16, %21, %2
%36 = phi double [ 1.000000e+00, %2 ], [ %19, %16 ], [ %32, %21 ]
ret double %36
}
void cbor_null_indef_break_callback(void *_ctx) {}


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

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

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

LLVM IR (-O2):
define void @cbor_null_indef_break_callback(i8* nocapture %0) {
ret void
}
int level_to_syslog_level(int level) { return level; }


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

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

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

LLVM IR (-O2):
define i32 @level_to_syslog_level(i32 returned %0) {
ret i32 %0
}
int DRV_NV_FILE_SEC_CHECK(char *pnvFilePath) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DRV_NV_FILE_SEC_CHECK(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int LINUX_REBOOT_CMD_POWER_OFF;
int LINUX_REBOOT_CMD_RESTART;
int reboot(int);
int ueld_os_reboot(int cmd) {
  int linux_cmd = 0;
  switch (cmd) {
  case 1:
    linux_cmd = LINUX_REBOOT_CMD_POWER_OFF;
    break;
  case 2:
    linux_cmd = LINUX_REBOOT_CMD_RESTART;
    break;
  default:
    break;
  }
  return reboot(linux_cmd);
}


x86 assembly (clang, -O0):
<ueld_os_reboot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     1147 <ueld_os_reboot+0x37>
jmp    1136 <ueld_os_reboot+0x26>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1158 <ueld_os_reboot+0x48>
jmp    1169 <ueld_os_reboot+0x59>
mov    0x2e8a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    116e <ueld_os_reboot+0x5e>
mov    0x2e89(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    116e <ueld_os_reboot+0x5e>
jmp    116e <ueld_os_reboot+0x5e>
mov    -0x8(%rbp),%edi
call   1030 <reboot@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ueld_os_reboot>:
cmp    $0x2,%edi
je     1127 <ueld_os_reboot+0x17>
mov    %edi,%eax
xor    %edi,%edi
cmp    $0x1,%eax
jne    1130 <ueld_os_reboot+0x20>
mov    0x2eb3(%rip),%rax
jmp    112e <ueld_os_reboot+0x1e>
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
jmp    1030 <reboot@plt>

LLVM IR (-O0):
@LINUX_REBOOT_CMD_POWER_OFF = global i32 0
@LINUX_REBOOT_CMD_RESTART = global i32 0
define i32 @ueld_os_reboot(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %9 [
i32 1, label %5
i32 2, label %7
]
5: ; preds = %1
%6 = load i32, i32* @LINUX_REBOOT_CMD_POWER_OFF
store i32 %6, i32* %3
br label %10
7: ; preds = %1
%8 = load i32, i32* @LINUX_REBOOT_CMD_RESTART
store i32 %8, i32* %3
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %7, %5
%11 = load i32, i32* %3
%12 = call i32 @reboot(i32 %11)
ret i32 %12
}

LLVM IR (-O2):
@LINUX_REBOOT_CMD_POWER_OFF = global i32 0
@LINUX_REBOOT_CMD_RESTART = global i32 0
define i32 @ueld_os_reboot(i32 %0) {
switch i32 %0, label %6 [
i32 1, label %2
i32 2, label %4
]
2: ; preds = %1
%3 = load i32, i32* @LINUX_REBOOT_CMD_POWER_OFF
br label %6
4: ; preds = %1
%5 = load i32, i32* @LINUX_REBOOT_CMD_RESTART
br label %6
6: ; preds = %1, %4, %2
%7 = phi i32 [ 0, %1 ], [ %5, %4 ], [ %3, %2 ]
%8 = tail call i32 @reboot(i32 %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xf4() {
  Assert_real((isupper(244) == 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_isupper.c",
              1225, ("isupper should be 0 for 0xf4"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0xf4>:
push   %rax
mov    $0xf4,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4c9,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xf4\00"
define void @t_isupper_0xf4() {
%1 = call i64 @isupper(i32 244)
%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 1225, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xf4\00"
define void @t_isupper_0xf4() {
%1 = tail call i64 @isupper(i32 244)
%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 1225, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void RTMemEfDupEx(void) {}


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

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

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

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

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_ENVELOPE_it;
int i2d_PKCS7_ENVELOPE(PKCS7_ENVELOPE *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_ENVELOPE_it);
}


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

x86 assembly (clang, -O2):
<i2d_PKCS7_ENVELOPE>:
mov    0x2ed1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

LLVM IR (-O0):
@PKCS7_ENVELOPE_it = global i32 0
define i32 @i2d_PKCS7_ENVELOPE(i32* %0, i8** %1) {
%3 = alloca i32*
%4 = alloca i8**
store i32* %0, i32** %3
store i8** %1, i8*** %4
%5 = load i32*, i32** %3
%6 = load i8**, i8*** %4
%7 = call i32 @ASN1_item_i2d(i32* %5, i8** %6, i32* @PKCS7_ENVELOPE_it)
ret i32 %7
}

LLVM IR (-O2):
@PKCS7_ENVELOPE_it = global i32 0
define i32 @i2d_PKCS7_ENVELOPE(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @PKCS7_ENVELOPE_it)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ WSramAddr(int);
int /*<<< orphan*/ Wreg(int);
int /*<<< orphan*/ Ws(char *);
int WinstE(int i, int code) {
  int reg = ((code >> 4) & 0xf) + 16;
  int val = ((code >> 4) & 0xf0) | (code & 0xf);
  Ws("ldi   ");
  Wreg(reg);
  Ws(", ");
  WSramAddr(val);
  return 0;
}


x86 assembly (clang, -O0):
<WinstE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x4,%eax
and    $0xf,%eax
add    $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x4,%eax
and    $0xf0,%eax
mov    -0x8(%rbp),%ecx
and    $0xf,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
lea    0xe96(%rip),%rdi
call   1030 <Ws@plt>
mov    -0xc(%rbp),%edi
call   1050 <Wreg@plt>
lea    0xe89(%rip),%rdi
call   1030 <Ws@plt>
mov    -0x10(%rbp),%edi
call   1040 <WSramAddr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WinstE>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
sar    $0x4,%ebx
mov    %ebx,%ebp
and    $0xf,%ebp
or     $0x10,%ebp
and    $0xf0,%ebx
and    $0xf,%esi
or     %esi,%ebx
lea    0xeae(%rip),%rdi
call   1030 <Ws@plt>
mov    %ebp,%edi
call   1050 <Wreg@plt>
lea    0xea2(%rip),%rdi
call   1030 <Ws@plt>
mov    %ebx,%edi
call   1040 <WSramAddr@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"ldi \00"
@.str.1 = [3 x i8] c", \00"
define i32 @WinstE(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = ashr i32 %7, 4
%9 = and i32 %8, 15
%10 = add nsw i32 %9, 16
store i32 %10, i32* %5
%11 = load i32, i32* %4
%12 = ashr i32 %11, 4
%13 = and i32 %12, 240
%14 = load i32, i32* %4
%15 = and i32 %14, 15
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = call i32 @Ws(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%18 = load i32, i32* %5
%19 = call i32 @Wreg(i32 %18)
%20 = call i32 @Ws(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%21 = load i32, i32* %6
%22 = call i32 @WSramAddr(i32 %21)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"ldi \00"
@.str.1 = [3 x i8] c", \00"
define i32 @WinstE(i32 %0, i32 %1) {
%3 = ashr i32 %1, 4
%4 = and i32 %3, 15
%5 = or i32 %4, 16
%6 = and i32 %3, 240
%7 = and i32 %1, 15
%8 = or i32 %6, %7
%9 = tail call i32 @Ws(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @Wreg(i32 %5)
%11 = tail call i32 @Ws(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32 @WSramAddr(i32 %8)
ret i32 0
}
int main(void) {
  unsigned y;
  do {
    if ((1) > 1) {
      y = 3;
    } else {
      y = 0;
    }
  } while (0);
  ;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0
store i32 0, i32* %2
br label %4
4: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void sub_eax_imm32(unsigned long imm32) {
  put8(0x2D);
  put32(imm32);
}


x86 assembly (clang, -O0):
<sub_eax_imm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2d,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rdi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_eax_imm32>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2d,%edi
call   1030 <put8@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @sub_eax_imm32(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @put8(i32 45)
%4 = load i64, i64* %2
%5 = call i32 @put32(i64 %4)
ret void
}

LLVM IR (-O2):
define void @sub_eax_imm32(i64 %0) {
%2 = tail call i32 @put8(i32 45)
%3 = tail call i32 @put32(i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int main() {
  const int gridSize = 20;
  long paths = 1;
  int i;
  for (i = 0; i < gridSize; i++) {
    paths *= (2 * gridSize) - i;
    paths /= i + 1;
  }
  printf("%li paths\n", paths);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x14,-0x14(%rbp)
jge    1176 <main+0x66>
mov    $0x28,%eax
sub    -0x14(%rbp),%eax
cltq
imul   -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1135 <main+0x25>
mov    -0x10(%rbp),%rsi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"%li paths\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 137846528820)
ret i32 0
}
int sum(short int digits[10]) {
  short int s = 0;
  char j;
  for (j = 0; j < 10; j++)
    s += digits[(int)j];
  return s;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
movb   $0x0,-0xb(%rbp)
movsbl -0xb(%rbp),%eax
cmp    $0xa,%eax
jge    1145 <sum+0x45>
mov    -0x8(%rbp),%rax
movsbl -0xb(%rbp),%ecx
movslq %ecx,%rcx
movswl (%rax,%rcx,2),%ecx
movswl -0xa(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0xa(%rbp)
mov    -0xb(%rbp),%al
add    $0x1,%al
mov    %al,-0xb(%rbp)
jmp    1112 <sum+0x12>
movswl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
movdqu (%rdi),%xmm0
pxor   %xmm1,%xmm1
movdqa %xmm0,%xmm2
punpckhwd %xmm1,%xmm2
punpcklwd %xmm1,%xmm0
paddd  %xmm2,%xmm0
movzwl 0x10(%rdi),%eax
movzwl 0x12(%rdi),%ecx
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%edx
add    %eax,%edx
add    %ecx,%edx
movswl %dx,%eax
ret

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

LLVM IR (-O2):
define i32 @sum(i16* nocapture %0) {
%2 = bitcast i16* %0 to <8 x i16>*
%3 = load <8 x i16>, <8 x i16>* %2
%4 = zext <8 x i16> %3 to <8 x i32>
%5 = getelementptr inbounds i16, i16* %0, i64 8
%6 = load i16, i16* %5
%7 = zext i16 %6 to i32
%8 = getelementptr inbounds i16, i16* %0, i64 9
%9 = load i16, i16* %8
%10 = zext i16 %9 to i32
%11 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %4)
%12 = add nuw nsw i32 %11, %7
%13 = add nuw nsw i32 %12, %10
%14 = shl i32 %13, 16
%15 = ashr exact i32 %14, 16
ret i32 %15
}
/* Type definitions */
struct sspm_header {
  int dummy;
};

/* Variables and functions */
void sspm_default_add_line(void *part, struct sspm_header *header, char *line,
                           size_t size) {}


x86 assembly (clang, -O0):
<sspm_default_add_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.sspm_header = type { i32 }
define void @sspm_default_add_line(i8* nocapture %0, %struct.sspm_header* nocapture %1, i8* nocapture %2, i64 %3) {
ret void
}
/* Type definitions */
struct v4l2_format {
  int dummy;
};

/* Variables and functions */
unsigned int V4L2_HSV_ENC_180;
unsigned int v4l_format_g_ycbcr_enc(struct v4l2_format const *);
unsigned v4l_format_g_hsv_enc(const struct v4l2_format *fmt) {
  unsigned hsv_enc = v4l_format_g_ycbcr_enc(fmt);
  if (hsv_enc == V4L2_HSV_ENC_180)
    return V4L2_HSV_ENC_180;
  return hsv_enc;
}


x86 assembly (clang, -O0):
<v4l_format_g_hsv_enc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <v4l_format_g_ycbcr_enc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2eb6(%rip),%rcx
cmp    (%rcx),%eax
jne    114b <v4l_format_g_hsv_enc+0x3b>
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1151 <v4l_format_g_hsv_enc+0x41>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v4l_format_g_hsv_enc>:
jmp    1030 <v4l_format_g_ycbcr_enc@plt>

LLVM IR (-O0):
%struct.v4l2_format = type { i32 }
@V4L2_HSV_ENC_180 = global i32 0
define i32 @v4l_format_g_hsv_enc(%struct.v4l2_format* %0) {
%2 = alloca i32
%3 = alloca %struct.v4l2_format*
%4 = alloca i32
store %struct.v4l2_format* %0, %struct.v4l2_format** %3
%5 = load %struct.v4l2_format*, %struct.v4l2_format** %3
%6 = call i32 @v4l_format_g_ycbcr_enc(%struct.v4l2_format* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* @V4L2_HSV_ENC_180
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i32, i32* @V4L2_HSV_ENC_180
store i32 %11, i32* %2
br label %14
12: ; preds = %1
%13 = load i32, i32* %4
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.v4l2_format = type { i32 }
@V4L2_HSV_ENC_180 = global i32 0
define i32 @v4l_format_g_hsv_enc(%struct.v4l2_format* %0) {
%2 = tail call i32 @v4l_format_g_ycbcr_enc(%struct.v4l2_format* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  const int N = 100;
  int sum = 0;
  int n;
  for (n = 0; n < N; n++)
    sum += n;
  printf("Sum = %d\n", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x64,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    114e <main+0x3e>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0x1356,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"Sum = %d\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 4950)
ret void
}
char *hash_plugin_detailed(void) {
  return ("grub2 - GRUB2 plugin\n"
          "------------------------\n"
          "Use this module to crack GRUB2 passwords\n"
          "Input should be in form:  \'hash\'\n"
          "Known software that uses this password hashing method:\n"
          "GRUB2\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


x86 assembly (clang, -O0):
<hash_plugin_detailed>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_detailed>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [227 x i8] c"grub2 - GRUB2 plugin\0A------------------------\0AUse this module to crack GRUB2 passwords\0AInput should be in form: 'hash'\0AKnown software that uses this password hashing method:\0AGRUB2\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([227 x i8], [227 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [227 x i8] c"grub2 - GRUB2 plugin\0A------------------------\0AUse this module to crack GRUB2 passwords\0AInput should be in form: 'hash'\0AKnown software that uses this password hashing method:\0AGRUB2\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([227 x i8], [227 x i8]* @.str, i64 0, i64 0)
}
int main() {
  __asm__("movl $10, %eax;"
          "movl $20, %ebx;"
          "addl %ebx, %eax;");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%eax
mov    $0x14,%ebx
add    %ebx,%eax
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xa,%eax
mov    $0x14,%ebx
add    %ebx,%eax
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main() {
tail call void asm sideeffect "movl $$10, %eax;movl $$20, %ebx;addl %ebx, %eax;", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int reverse(int);
int main(int argc, char const *argv[]) {
  int value = 1534236469;
  int result = reverse(value);
  printf("result:%d \n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x5b729735,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <reverse@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"result:%d \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1534236469, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @reverse(i32 %8)
store i32 %9, i32* %7
%10 = load i32, i32* %7
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"result:%d \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @reverse(i32 1534236469)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solve_system(int *root_count, int nbtasks) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(77, root_count, &nbtasks, c);
  return fail;
}


x86 assembly (clang, -O0):
<solve_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    $0x4d,%edi
lea    -0xc(%rbp),%rdx
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_system>:
push   %rax
mov    %rdi,%rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    $0x4d,%edi
mov    %rax,%rsi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solve_system(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32*, i32** %3
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 77, i32* %7, i32* %4, double* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @solve_system(i32* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 77, i32* %0, i32* %3, double* undef)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void dotconf_wild_card_cleanup(char *path, char *pre) {
  if (path != NULL) {
    free(path);
  }
  if (pre != NULL) {
    free(pre);
  }
}


x86 assembly (clang, -O0):
<dotconf_wild_card_cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <dotconf_wild_card_cleanup+0x24>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x10(%rbp)
je     1148 <dotconf_wild_card_cleanup+0x38>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dotconf_wild_card_cleanup>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
je     111e <dotconf_wild_card_cleanup+0xe>
call   1030 <free@plt>
test   %rbx,%rbx
je     112c <dotconf_wild_card_cleanup+0x1c>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @dotconf_wild_card_cleanup(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @free(i8* %8)
br label %10
10: ; preds = %7, %2
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i8*, i8** %4
%15 = call i32 @free(i8* %14)
br label %16
16: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
define void @dotconf_wild_card_cleanup(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @free(i8* %0)
br label %6
6: ; preds = %4, %2
%7 = icmp eq i8* %1, null
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @free(i8* %1)
br label %10
10: ; preds = %8, %6
ret void
}