xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x8e() {
  Assert_real((isspace(142) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              715, ("isspace should be 0 for 0x8e"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x8e\00"
define void @t_isspace_0x8e() {
%1 = call i64 @isspace(i32 142)
%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 715, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x8e\00"
define void @t_isspace_0x8e() {
%1 = tail call i64 @isspace(i32 142)
%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 715, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int IsFileOrFolderHidden(char *fullPath) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @IsFileOrFolderHidden(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};
typedef int int32_t;

/* Variables and functions */
int nanosleep(struct timespec *, struct timespec *);
int sleep_usec(int32_t usec) {
  struct timespec tim, tim2;
  tim.tv_sec = usec / 1000000;
  tim.tv_nsec = (usec % 1000000) * 1000;
  return nanosleep(&tim, &tim2);
}


x86 assembly (clang, -O0):
<sleep_usec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
imul   $0x3e8,%edx,%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <nanosleep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep_usec>:
sub    $0x18,%rsp
movslq %edi,%rax
imul   $0x431bde83,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x32,%rcx
add    %edx,%ecx
mov    %ecx,0x8(%rsp)
imul   $0xf4240,%ecx,%ecx
sub    %ecx,%eax
imul   $0x3e8,%eax,%eax
mov    %eax,0xc(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define i32 @sleep_usec(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
%4 = alloca %struct.timespec
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 1000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %6, i32* %7
%8 = load i32, i32* %2
%9 = srem i32 %8, 1000000
%10 = mul nsw i32 %9, 1000
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i32 %10, i32* %11
%12 = call i32 @nanosleep(%struct.timespec* %3, %struct.timespec* %4)
ret i32 %12
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define i32 @sleep_usec(i32 %0) {
%2 = alloca %struct.timespec
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %2 to i8*
%5 = bitcast %struct.timespec* %3 to i8*
%6 = sdiv i32 %0, 1000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %6, i32* %7
%8 = srem i32 %0, 1000000
%9 = mul nsw i32 %8, 1000
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i32 %9, i32* %10
%11 = call i32 @nanosleep(%struct.timespec* %2, %struct.timespec* %3)
ret i32 %11
}
extern unsigned long readl(unsigned long addr) {
  return *(volatile unsigned int *)((addr << 7) +
                                    ((0xfffffc0000000000UL) + 0x200000000UL) +
                                    0x60);
}


x86 assembly (clang, -O0):
<readl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x7,%rax
movabs $0xfffffc0200000000,%rcx
fc ff ff
add    %rcx,%rax
mov    0x60(%rax),%eax
mov    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<readl>:
shl    $0x7,%rdi
movabs $0xfffffc0200000060,%rax
fc ff ff
mov    (%rdi,%rax,1),%eax
ret

LLVM IR (-O0):
define i64 @readl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = shl i64 %3, 7
%5 = add i64 %4, -4389456576512
%6 = add i64 %5, 96
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = zext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @readl(i64 %0) {
%2 = shl i64 %0, 7
%3 = add i64 %2, -4389456576416
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = zext i32 %5 to i64
ret i64 %6
}
/* Variables and functions */
int __BNF_flush();
int flush(void) { return __BNF_flush(); }


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

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

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

LLVM IR (-O2):
define i32 @flush() {
%1 = tail call i32 (...) @__BNF_flush()
ret i32 %1
}
void *memset7(void *s, int c) { return __builtin_memset(s, c, 515); }


x86 assembly (clang, -O0):
<memset7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    %rdi,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x203,%edx
movzbl %al,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memset7>:
mov    $0x203,%edx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define i8* @memset7(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = trunc i32 %6 to i8
ret i8* %5
}

LLVM IR (-O2):
define i8* @memset7(i8* returned writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
tail call void @llvm.memset.p0i8.i64(i8* align 1 dereferenceable(515) %0, i8 %3, i64 515, i1 false)
ret i8* %0
}
void foo_2_2_1_2_2_2_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_1_2_2_2_1_1_1() {
ret void
}
unsigned xrop3_157_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = T | D;
  stk2 = S & stk3;
  stk1 = D ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_157_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = mul nuw nsw i32 %4, 257
%6 = xor i32 %3, -1
%7 = shl nsw i32 %6, 8
%8 = xor i32 %5, -1
%9 = and i32 %7, %8
%10 = or i8 %1, %0
%11 = zext i8 %10 to i32
%12 = or i32 %9, %11
ret i32 %12
}
char const *stream_bit_fmt_help() {
  return "Recognized bit format are 8I, 16I, 24I, 32I, 32F, 64F, 12I, 10I";
}


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

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

LLVM IR (-O0):
@.str = [64 x i8] c"Recognized bit format are 8I, 16I, 24I, 32I, 32F, 64F, 12I, 10I\00"
define i8* @stream_bit_fmt_help() {
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [64 x i8] c"Recognized bit format are 8I, 16I, 24I, 32I, 32F, 64F, 12I, 10I\00"
define i8* @stream_bit_fmt_help() {
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ exact_square(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int sq;
  scanf("%d", &sq);
  exact_square(sq);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <exact_square@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <exact_square@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @exact_square(i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello sesc");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"hello sesc\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"hello sesc\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ init();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ quit();
int /*<<< orphan*/ toplevel();
void main(void) {
  init();
  printf("%cCAMPUS LIsP\nLemon version,\nz88dk variant\n", 12);
  toplevel();
  quit();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <init@plt>
lea    0xeae(%rip),%rdi
mov    $0xc,%esi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <toplevel@plt>
mov    $0x0,%al
call   1050 <quit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <init@plt>
lea    0xeb1(%rip),%rdi
mov    $0xc,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <toplevel@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <quit@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"%cCAMPUS LIsP\0ALemon version,\0Az88dk variant\0A\00"
define void @main() {
%1 = call i32 (...) @init()
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 12)
%3 = call i32 (...) @toplevel()
%4 = call i32 (...) @quit()
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"%cCAMPUS LIsP\0ALemon version,\0Az88dk variant\0A\00"
define void @main() {
%1 = tail call i32 (...) @init()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 12)
%3 = tail call i32 (...) @toplevel()
%4 = tail call i32 (...) @quit()
ret void
}
int test_imm_3Buint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x3B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Buint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x3b,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_3Buint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 59
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  char *mensaje = "Hola a todos\n";
  printf(mensaje);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hola a todos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* %3)
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hola a todos\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void nrf_802154_priority_drop_hfclk_stop_terminate(void) {}


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

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

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

LLVM IR (-O2):
define void @nrf_802154_priority_drop_hfclk_stop_terminate() {
ret void
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
int8_t c_ret_i8() { return -1; }


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

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

LLVM IR (-O0):
define i32 @c_ret_i8() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @c_ret_i8() {
ret i32 -1
}
int fun601() { return 601; }


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

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

LLVM IR (-O0):
define i32 @fun601() {
ret i32 601
}

LLVM IR (-O2):
define i32 @fun601() {
ret i32 601
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int smp_sio_seek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int smp_sio_seek_current_offset(FILE *fp, long offset) {
  return smp_sio_seek(fp, offset, SEEK_CUR);
}


x86 assembly (clang, -O0):
<smp_sio_seek_current_offset>:
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),%rax
mov    (%rax),%edx
call   1030 <smp_sio_seek@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smp_sio_seek_current_offset>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <smp_sio_seek@plt>

LLVM IR (-O0):
@SEEK_CUR = global i32 0
define i32 @smp_sio_seek_current_offset(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i64, i64* %4
%7 = load i32, i32* @SEEK_CUR
%8 = call i32 @smp_sio_seek(i32* %5, i64 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
define i32 @smp_sio_seek_current_offset(i32* %0, i64 %1) {
%3 = load i32, i32* @SEEK_CUR
%4 = tail call i32 @smp_sio_seek(i32* %0, i64 %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
char rand_char();
const char *gen_salt(void) {
  static char salt[3];
  int i;
  for (i = 0; i < 2; i++)
    salt[i] = rand_char();
  salt[2] = '\0';
  return salt;
}


x86 assembly (clang, -O0):
<gen_salt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    114e <gen_salt+0x3e>
mov    $0x0,%al
call   1030 <rand_char@plt>
mov    %al,%dl
movslq -0x4(%rbp),%rcx
lea    0x2eec(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <gen_salt+0xf>
movb   $0x0,0x2ed6(%rip)
lea    0x2ecd(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_salt>:
push   %rbx
xor    %eax,%eax
call   1030 <rand_char@plt>
mov    %al,0x2f0b(%rip)
lea    0x2f04(%rip),%rbx
xor    %eax,%eax
call   1030 <rand_char@plt>
mov    %al,0x2ef8(%rip)
movb   $0x0,0x2ef2(%rip)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@gen_salt.salt = internal global [3 x i8] zeroinitializer
define i8* @gen_salt() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %10, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 2
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = call signext i8 (...) @rand_char()
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [3 x i8], [3 x i8]* @gen_salt.salt, i64 0, i64 %8
store i8 %6, i8* %9
br label %10
10: ; preds = %5
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 1
store i32 %12, i32* %1
br label %2
13: ; preds = %2
store i8 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @gen_salt.salt, i64 0, i64 2)
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @gen_salt.salt, i64 0, i64 0)
}

LLVM IR (-O2):
@gen_salt.salt = internal global [3 x i8] zeroinitializer
define i8* @gen_salt() {
%1 = tail call signext i8 (...) @rand_char()
store i8 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @gen_salt.salt, i64 0, i64 0)
%2 = tail call signext i8 (...) @rand_char()
store i8 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @gen_salt.salt, i64 0, i64 1)
store i8 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @gen_salt.salt, i64 0, i64 2)
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @gen_salt.salt, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ baz();
int main(void) {
  bar();
  baz();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @bar()
%2 = tail call i32 (...) @baz()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, ...);
void Jump_If_Equal(char *label) {
  Inst_Printf("be", "%s", label);
  Inst_Printf("nop", "");
}


x86 assembly (clang, -O0):
<Jump_If_Equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
lea    0xeca(%rip),%rdi
lea    0xebf(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Jump_If_Equal>:
push   %rax
mov    %rdi,%rdx
lea    0xee5(%rip),%rdi
lea    0xee1(%rip),%rsi
xor    %eax,%eax
call   1030 <Inst_Printf@plt>
lea    0xed6(%rip),%rdi
lea    0xecb(%rip),%rsi
xor    %eax,%eax
pop    %rcx
jmp    1030 <Inst_Printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"be\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [4 x i8] c"nop\00"
@.str.3 = [1 x i8] zeroinitializer
define void @Jump_If_Equal(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
ret void
}
int Vec_PtrSortComparePtr(void **pp1, void **pp2) {
  if (*pp1 < *pp2)
    return -1;
  if (*pp1 > *pp2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<Vec_PtrSortComparePtr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jae    112c <Vec_PtrSortComparePtr+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1153 <Vec_PtrSortComparePtr+0x53>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jbe    114c <Vec_PtrSortComparePtr+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <Vec_PtrSortComparePtr+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vec_PtrSortComparePtr>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
seta   %cl
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @Vec_PtrSortComparePtr(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
%5 = icmp ult i8* %3, %4
%6 = icmp ugt i8* %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
int fun548() { return 548; }


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

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

LLVM IR (-O0):
define i32 @fun548() {
ret i32 548
}

LLVM IR (-O2):
define i32 @fun548() {
ret i32 548
}
int omap4_mpuss_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @omap4_mpuss_init() {
ret i32 0
}
translate_(x, y, z) float *x, *y, *z;
{ translate(*x, *y, *z); }


x86 assembly (clang, -O0):
<translate_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0x3,%al
call   1030 <translate@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<translate_>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rsi),%xmm1
cvtss2sd %xmm1,%xmm1
movss  (%rdx),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0x3,%al
jmp    1030 <translate@plt>

LLVM IR (-O0):
define i32 @translate_(float* %0, float* %1, float* %2) {
%4 = alloca i32
%5 = alloca float*
%6 = alloca float*
%7 = alloca float*
store float* %0, float** %5
store float* %1, float** %6
store float* %2, float** %7
%8 = load float*, float** %5
%9 = load float, float* %8
%10 = fpext float %9 to double
%11 = load float*, float** %6
%12 = load float, float* %11
%13 = fpext float %12 to double
%14 = load float*, float** %7
%15 = load float, float* %14
%16 = fpext float %15 to double
%17 = call i32 (double, double, double, ...) bitcast (i32 (...)* @translate to i32 (double, double, double, ...)*)(double %10, double %13, double %16)
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @translate_(float* nocapture %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %0
%5 = fpext float %4 to double
%6 = load float, float* %1
%7 = fpext float %6 to double
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @translate to i32 (double, double, double, ...)*)(double %5, double %7, double %9)
ret i32 undef
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int bind(int, struct sockaddr *, int);
int socket_bind(int sock, struct sockaddr_in *sa) {
  return bind(sock, (struct sockaddr *)sa, sizeof(struct sockaddr));
}


x86 assembly (clang, -O0):
<socket_bind>:
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    $0x4,%edx
call   1030 <bind@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_bind>:
mov    $0x4,%edx
jmp    1030 <bind@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @socket_bind(i32 %0, %struct.sockaddr_in* %1) {
%3 = alloca i32
%4 = alloca %struct.sockaddr_in*
store i32 %0, i32* %3
store %struct.sockaddr_in* %1, %struct.sockaddr_in** %4
%5 = load i32, i32* %3
%6 = load %struct.sockaddr_in*, %struct.sockaddr_in** %4
%7 = bitcast %struct.sockaddr_in* %6 to %struct.sockaddr*
%8 = call i32 @bind(i32 %5, %struct.sockaddr* %7, i32 4)
ret i32 %8
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @socket_bind(i32 %0, %struct.sockaddr_in* %1) {
%3 = bitcast %struct.sockaddr_in* %1 to %struct.sockaddr*
%4 = tail call i32 @bind(i32 %0, %struct.sockaddr* %3, i32 4)
ret i32 %4
}
/* Variables and functions */
scalar_t__ isspace(char);
char *SkipWS(char *string) {
  while (isspace(*string))
    string++;
  return string;
}


x86 assembly (clang, -O0):
<SkipWS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <SkipWS+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <SkipWS+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SkipWS>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <SkipWS+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @SkipWS(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int sscanf(char *, char *, int *);
void get_integer(char *prompt, int *value) {
  int valid_input = 0;
  char inbuf[133];
  while (valid_input < 1) {
    printf(prompt);
    gets(inbuf);
    valid_input = sscanf(inbuf, "%d", value);
  }
}


x86 assembly (clang, -O0):
<get_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jge    1188 <get_integer+0x58>
mov    -0x8(%rbp),%rdi
call   1030 <printf@plt>
lea    -0xa0(%rbp),%rdi
call   1040 <gets@plt>
lea    -0xa0(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe85(%rip),%rsi
call   1050 <sscanf@plt>
mov    %eax,-0x14(%rbp)
jmp    114a <get_integer+0x1a>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_integer>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsp,%rbx
lea    0xeb2(%rip),%r12
xchg   %ax,%ax
mov    %r15,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <gets@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r14,%rdx
call   1050 <sscanf@plt>
test   %eax,%eax
jle    1150 <get_integer+0x20>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @get_integer(i8* nocapture %0, i32* %1) {
%3 = alloca [133 x i8]
%4 = getelementptr inbounds [133 x i8], [133 x i8]* %3, i64 0, i64 0
br label %5
5: ; preds = %2, %5
%6 = call i32 @printf(i8* dereferenceable(1) %0)
%7 = call i32 @gets(i8* %4)
%8 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%9 = icmp slt i32 %8, 1
br i1 %9, label %5, label %10
10: ; preds = %5
ret void
}
/* Variables and functions */
void *malloc(int);
void *alloc_double() { return malloc(sizeof(long double)); }


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

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

LLVM IR (-O0):
define i8* @alloc_double() {
%1 = call i8* @malloc(i32 16)
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @alloc_double() {
%1 = tail call dereferenceable_or_null(16) i8* @malloc(i32 16)
ret i8* %1
}
void IO_readInput(struct IOcontext *ioc) {}


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

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

LLVM IR (-O0):
%struct.IOcontext = type opaque
define void @IO_readInput(%struct.IOcontext* %0) {
%2 = alloca %struct.IOcontext*
store %struct.IOcontext* %0, %struct.IOcontext** %2
ret void
}

LLVM IR (-O2):
%struct.IOcontext = type opaque
define void @IO_readInput(%struct.IOcontext* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int check_offset5(uint8_t *p1, uint8_t *p2) { return (p1 + 5) == p2 ? 1 : 0; }


x86 assembly (clang, -O0):
<check_offset5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
add    $0x14,%rdx
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_offset5>:
add    $0x14,%rdi
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @check_offset5(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 5
%7 = load i32*, i32** %4
%8 = icmp eq i32* %6, %7
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
ret i32 %10
}

LLVM IR (-O2):
define i32 @check_offset5(i32* readnone %0, i32* readnone %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 5
%4 = icmp eq i32* %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
void SysCtlNMIClear(uint32_t ui32Ints) {
  (*((volatile uint32_t *)(0x400FE064))) &= ~ui32Ints;
}


x86 assembly (clang, -O0):
<SysCtlNMIClear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    $0x400fe064,%ecx
mov    (%rcx),%ecx
and    %eax,%ecx
mov    $0x400fe064,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlNMIClear>:
mov    %edi,-0x4(%rsp)
mov    -0x4(%rsp),%eax
not    %eax
and    %eax,0x400fe064
ret

LLVM IR (-O0):
define void @SysCtlNMIClear(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
%4 = xor i32 %3, -1
%5 = load volatile i32, i32* inttoptr (i64 1074782308 to i32*)
%6 = and i32 %5, %4
store volatile i32 %6, i32* inttoptr (i64 1074782308 to i32*)
ret void
}

LLVM IR (-O2):
define void @SysCtlNMIClear(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
%4 = xor i32 %3, -1
%5 = load volatile i32, i32* inttoptr (i64 1074782308 to i32*)
%6 = and i32 %5, %4
store volatile i32 %6, i32* inttoptr (i64 1074782308 to i32*)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ ofl_port_status_reason_print(int /*<<< orphan*/ *,
                                                int /*<<< orphan*/);
int /*<<< orphan*/ *open_memstream(char **, size_t *);
char *ofl_port_status_reason_to_string(uint8_t reason) {
  char *str;
  size_t str_size;
  FILE *stream = open_memstream(&str, &str_size);
  ofl_port_status_reason_print(stream, reason);
  fclose(stream);
  return str;
}


x86 assembly (clang, -O0):
<ofl_port_status_reason_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <ofl_port_status_reason_print@plt>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofl_port_status_reason_to_string>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1040 <ofl_port_status_reason_print@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ofl_port_status_reason_to_string(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i32 %0, i32* %2
%6 = call i32* @open_memstream(i8** %3, i64* %4)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* %2
%9 = call i32 @ofl_port_status_reason_print(i32* %7, i32 %8)
%10 = load i32*, i32** %5
%11 = call i32 @fclose(i32* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @ofl_port_status_reason_to_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = bitcast i8** %2 to i8*
%5 = bitcast i64* %3 to i8*
%6 = call i32* @open_memstream(i8** %2, i64* %3)
%7 = call i32 @ofl_port_status_reason_print(i32* %6, i32 %0)
%8 = call i32 @fclose(i32* %6)
%9 = load i8*, i8** %2
ret i8* %9
}
/* Variables and functions */
short check_fixed(long);
short sub_fixed(short x, short y) { return check_fixed((long)x - (long)y); }


x86 assembly (clang, -O0):
<sub_fixed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswq -0x2(%rbp),%rdi
movswq -0x4(%rbp),%rax
sub    %rax,%rdi
call   1030 <check_fixed@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_fixed>:
movslq %edi,%rdi
movslq %esi,%rax
sub    %rax,%rdi
jmp    1030 <check_fixed@plt>

LLVM IR (-O0):
define signext i16 @sub_fixed(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i64
%7 = load i16, i16* %4
%8 = sext i16 %7 to i64
%9 = sub nsw i64 %6, %8
%10 = call signext i16 @check_fixed(i64 %9)
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @sub_fixed(i16 signext %0, i16 signext %1) {
%3 = sext i16 %0 to i64
%4 = sext i16 %1 to i64
%5 = sub nsw i64 %3, %4
%6 = tail call signext i16 @check_fixed(i64 %5)
ret i16 %6
}
/* Variables and functions */
int /*<<< orphan*/ execute_word(char *, int *);
scalar_t__ init_forth();
int /*<<< orphan*/ init_io();
main() {
  int *up;
  init_io();
  up = (int *)init_forth();
  execute_word("app", up);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <init_io@plt>
mov    $0x0,%al
call   1050 <init_forth@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1030 <execute_word@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <init_io@plt>
xor    %eax,%eax
call   1050 <init_forth@plt>
lea    0xeba(%rip),%rdi
mov    %rax,%rsi
call   1030 <execute_word@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"app\00"
define i32 @main() {
%1 = alloca i32*
%2 = call i32 (...) @init_io()
%3 = call i64 (...) @init_forth()
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %1
%5 = load i32*, i32** %1
%6 = call i32 @execute_word(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"app\00"
define i32 @main() {
%1 = tail call i32 (...) @init_io()
%2 = tail call i64 (...) @init_forth()
%3 = inttoptr i64 %2 to i32*
%4 = tail call i32 @execute_word(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
ret i32 0
}
int mixedsizes(int *a, long *b) {
  *a = 2;
  *b = 5;
  return *a;
}


x86 assembly (clang, -O0):
<mixedsizes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x10(%rbp),%rax
movq   $0x5,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixedsizes>:
movl   $0x2,(%rdi)
movq   $0x5,(%rsi)
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @mixedsizes(i32* %0, i64* %1) {
%3 = alloca i32*
%4 = alloca i64*
store i32* %0, i32** %3
store i64* %1, i64** %4
%5 = load i32*, i32** %3
store i32 2, i32* %5
%6 = load i64*, i64** %4
store i64 5, i64* %6
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @mixedsizes(i32* nocapture writeonly %0, i64* nocapture writeonly %1) {
store i32 2, i32* %0
store i64 5, i64* %1
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("dmesg -c");
  system("> /var/log/syslog");
  system("clear");
  system("clear");
  system("tail -f /var/log/syslog");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <system@plt>
lea    0xed7(%rip),%rdi
call   1030 <system@plt>
lea    0xedd(%rip),%rdi
call   1030 <system@plt>
lea    0xed1(%rip),%rdi
call   1030 <system@plt>
lea    0xecb(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
lea    0xee5(%rip),%rdi
call   1030 <system@plt>
lea    0xeeb(%rip),%rbx
mov    %rbx,%rdi
call   1030 <system@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
lea    0xeda(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"dmesg -c\00"
@.str.1 = [18 x i8] c"> /var/log/syslog\00"
@.str.2 = [6 x i8] c"clear\00"
@.str.3 = [24 x i8] c"tail -f /var/log/syslog\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"dmesg -c\00"
@.str.1 = [18 x i8] c"> /var/log/syslog\00"
@.str.2 = [6 x i8] c"clear\00"
@.str.3 = [24 x i8] c"tail -f /var/log/syslog\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
void kgsl_cffdump_hang(struct kgsl_device *device) { return; }


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

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

LLVM IR (-O0):
%struct.kgsl_device = type opaque
define void @kgsl_cffdump_hang(%struct.kgsl_device* %0) {
%2 = alloca %struct.kgsl_device*
store %struct.kgsl_device* %0, %struct.kgsl_device** %2
ret void
}

LLVM IR (-O2):
%struct.kgsl_device = type opaque
define void @kgsl_cffdump_hang(%struct.kgsl_device* nocapture %0) {
ret void
}
void scrittura_matrice(int *matrice, unsigned int numero_posizione,
                       int valore) {
  matrice[numero_posizione] = valore;
  return;
}


x86 assembly (clang, -O0):
<scrittura_matrice>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<scrittura_matrice>:
mov    %esi,%eax
mov    %edx,(%rdi,%rax,4)
ret

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

LLVM IR (-O2):
define void @scrittura_matrice(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = zext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %2, i32* %5
ret void
}
int __attribute__((target("sse4"))) panda(int a) { return 4; }


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

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

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

LLVM IR (-O2):
define i32 @panda(i32 %0) {
ret i32 4
}
/* Type definitions */
typedef int clock_t;

/* Variables and functions */
int clock();
int GetRandomSeed() {
  clock_t c = clock();
  return (int)(c % 0x7FFFFFFF);
}


x86 assembly (clang, -O0):
<GetRandomSeed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x7fffffff,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetRandomSeed>:
push   %rax
xor    %eax,%eax
call   1030 <clock@plt>
cltq
mov    %rax,%rcx
shl    $0x1e,%rcx
add    %rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x3d,%rcx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0x1f,%edx
sub    %edx,%ecx
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @GetRandomSeed() {
%1 = alloca i32
%2 = call i32 (...) @clock()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = srem i32 %3, 2147483647
ret i32 %4
}

LLVM IR (-O2):
define i32 @GetRandomSeed() {
%1 = tail call i32 (...) @clock()
%2 = srem i32 %1, 2147483647
ret i32 %2
}