xunge/DecIR huggingface dataset:
/* Type definitions */
struct solo5_block_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _assert_fail(char *, char *, char *);
void solo5_block_info(struct solo5_block_info *info __attribute__((unused))) {
  do {
    if (!(0))
      _assert_fail("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/djwillia/solo5/refs/"
                   "heads/master/kernel/muen/muen-block.c",
                   "39", "0");
  } while (0);
}


x86 assembly (clang, -O0):
<solo5_block_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0xf6a(%rip),%rsi
lea    0xf66(%rip),%rdx
call   1030 <_assert_fail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solo5_block_info>:
lea    0xee9(%rip),%rdi
lea    0xf76(%rip),%rsi
lea    0xf72(%rip),%rdx
jmp    1030 <_assert_fail@plt>

LLVM IR (-O0):
%struct.solo5_block_info = type { i32 }
@.str = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/djwillia/solo5/refs/heads/master/kernel/muen/muen-block.c\00"
@.str.1 = [3 x i8] c"39\00"
@.str.2 = [2 x i8] c"0\00"
define void @solo5_block_info(%struct.solo5_block_info* %0) {
%2 = alloca %struct.solo5_block_info*
store %struct.solo5_block_info* %0, %struct.solo5_block_info** %2
br label %3
3: ; preds = %1
%4 = call i32 @_assert_fail(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %3
ret void
}

LLVM IR (-O2):
%struct.solo5_block_info = type { i32 }
@.str = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/djwillia/solo5/refs/heads/master/kernel/muen/muen-block.c\00"
@.str.1 = [3 x i8] c"39\00"
@.str.2 = [2 x i8] c"0\00"
define void @solo5_block_info(%struct.solo5_block_info* nocapture readnone %0) {
%2 = tail call i32 @_assert_fail(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}
unsigned short from64to16(unsigned long x) {
  x = (x & 0xffffffff) + (x >> 32);
  x = (x & 0xffff) + (x >> 16);
  x = (x & 0xffff) + (x >> 16);
  x = (x & 0xffff) + (x >> 16);
  return x;
}


x86 assembly (clang, -O0):
<from64to16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xffffffff,%rax
and    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
shr    $0x20,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffff,%rax
mov    -0x8(%rbp),%rcx
shr    $0x10,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffff,%rax
mov    -0x8(%rbp),%rcx
shr    $0x10,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffff,%rax
mov    -0x8(%rbp),%rcx
shr    $0x10,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<from64to16>:
mov    %edi,%ecx
shr    $0x20,%rdi
add    %rdi,%rcx
movzwl %cx,%eax
shr    $0x10,%rcx
add    %rax,%rcx
movzwl %cx,%eax
shr    $0x10,%rcx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @from64to16(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 4294967295
%5 = load i64, i64* %2
%6 = lshr i64 %5, 32
%7 = add i64 %4, %6
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = and i64 %8, 65535
%10 = load i64, i64* %2
%11 = lshr i64 %10, 16
%12 = add i64 %9, %11
store i64 %12, i64* %2
%13 = load i64, i64* %2
%14 = and i64 %13, 65535
%15 = load i64, i64* %2
%16 = lshr i64 %15, 16
%17 = add i64 %14, %16
store i64 %17, i64* %2
%18 = load i64, i64* %2
%19 = and i64 %18, 65535
%20 = load i64, i64* %2
%21 = lshr i64 %20, 16
%22 = add i64 %19, %21
store i64 %22, i64* %2
%23 = load i64, i64* %2
%24 = trunc i64 %23 to i16
ret i16 %24
}

LLVM IR (-O2):
define zeroext i16 @from64to16(i64 %0) {
%2 = and i64 %0, 4294967295
%3 = lshr i64 %0, 32
%4 = add nuw nsw i64 %2, %3
%5 = and i64 %4, 65535
%6 = lshr i64 %4, 16
%7 = add nuw nsw i64 %5, %6
%8 = and i64 %7, 65535
%9 = lshr i64 %7, 16
%10 = add nuw nsw i64 %8, %9
%11 = lshr i64 %10, 16
%12 = add nuw nsw i64 %11, %10
%13 = trunc i64 %12 to i16
ret i16 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int try_parse_int_imp(char *, void *, int, int);
bool try_parse_uint8(char *str, uint8_t *value_ptr) {
  return try_parse_int_imp(str, (void *)value_ptr, sizeof(uint8_t), false);
}


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

x86 assembly (clang, -O2):
<try_parse_uint8>:
mov    $0x4,%edx
xor    %ecx,%ecx
jmp    1030 <try_parse_int_imp@plt>

LLVM IR (-O0):
define i32 @try_parse_uint8(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 = bitcast i32* %6 to i8*
%8 = call i32 @try_parse_int_imp(i8* %5, i8* %7, i32 4, i32 0)
ret i32 %8
}

LLVM IR (-O2):
define i32 @try_parse_uint8(i8* %0, i32* %1) {
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 @try_parse_int_imp(i8* %0, i8* %3, i32 4, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ warn(char const *, char const *);
void quit(const char msg1[], const char msg2[]) {
  warn(msg1, msg2);
  exit(-1);
}


x86 assembly (clang, -O0):
<quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <warn@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<quit>:
push   %rax
call   1030 <warn@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @quit(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @warn(i8* %5, i8* %6)
%8 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define void @quit(i8* %0, i8* %1) {
%3 = tail call i32 @warn(i8* %0, i8* %1)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Welcome to Born SHell --- your own created shell\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%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 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Welcome to Born SHell --- your own created shell\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [49 x i8] c"Welcome to Born SHell --- your own created shell\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret i32 0
}
float toRadians(float degrees) {
  return degrees * 3.14159265358979323846f / 180.0f;
}


x86 assembly (clang, -O0):
<toRadians>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xee2(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<toRadians>:
mulss  0xef8(%rip),%xmm0
divss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @toRadians(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x400921FB60000000
%5 = fdiv float %4, 1.800000e+02
ret float %5
}

LLVM IR (-O2):
define float @toRadians(float %0) {
%2 = fmul float %0, 0x400921FB60000000
%3 = fdiv float %2, 1.800000e+02
ret float %3
}
void ff_hevc_put_hevc_bi_w_epel_v6_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_v6_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int usage(const char *prog) {
  fprintf(stderr, "usage: %s [-a admin-socket] <command>\n", prog);
  return 1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"usage: %s [-a admin-socket] <command>\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"usage: %s [-a admin-socket] <command>\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Type definitions */
struct kowhai_node_t {
  int dummy;
};

/* Variables and functions */
int get_node_size(struct kowhai_node_t const *, int *, int *);
int kowhai_get_node_count(const struct kowhai_node_t *node, int *count) {
  int size, ret;
  ret = get_node_size(node, &size, count);
  (*count)++;
  return ret;
}


x86 assembly (clang, -O0):
<kowhai_get_node_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rsi
call   1030 <get_node_size@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kowhai_get_node_count>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdx
call   1030 <get_node_size@plt>
addl   $0x1,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.kowhai_node_t = type { i32 }
define i32 @kowhai_get_node_count(%struct.kowhai_node_t* %0, i32* %1) {
%3 = alloca %struct.kowhai_node_t*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store %struct.kowhai_node_t* %0, %struct.kowhai_node_t** %3
store i32* %1, i32** %4
%7 = load %struct.kowhai_node_t*, %struct.kowhai_node_t** %3
%8 = load i32*, i32** %4
%9 = call i32 @get_node_size(%struct.kowhai_node_t* %7, i32* %5, i32* %8)
store i32 %9, i32* %6
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = add nsw i32 %11, 1
store i32 %12, i32* %10
%13 = load i32, i32* %6
ret i32 %13
}

LLVM IR (-O2):
%struct.kowhai_node_t = type { i32 }
define i32 @kowhai_get_node_count(%struct.kowhai_node_t* %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @get_node_size(%struct.kowhai_node_t* %0, i32* %3, i32* %1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void halt_processor() {
  while (1) {
    sleep(10);
  }
}


x86 assembly (clang, -O0):
<halt_processor>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <halt_processor+0x9>
mov    $0xa,%edi
call   1030 <sleep@plt>
jmp    1119 <halt_processor+0x9>

x86 assembly (clang, -O2):
<halt_processor>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <sleep@plt>
jmp    1120 <halt_processor+0x10>

LLVM IR (-O0):
define void @halt_processor() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @sleep(i32 10)
br label %1
}

LLVM IR (-O2):
define void @halt_processor() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @sleep(i32 10)
br label %1
}
int process_csnd_init() {
  int ret;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @process_csnd_init() {
%1 = alloca i32
ret i32 0
}

LLVM IR (-O2):
define i32 @process_csnd_init() {
ret i32 0
}
long __ccaprice_syscall_args_5(long A0, long A1, long A2, long A3, long A4,
                               long A5) {
  unsigned long R;
  __asm__ __volatile__("int $0x80"
                       : "=a"(R)
                       : "a"(A0), "b"(A1), "c"(A2), "d"(A3), "S"(A4), "D"(A5)
                       : "memory");
  return R;
}


x86 assembly (clang, -O0):
<__ccaprice_syscall_args_5>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rbx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdi
int    $0x80
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ccaprice_syscall_args_5>:
push   %rbx
mov    %rcx,%r10
mov    %rdx,%rcx
mov    %rsi,%rbx
mov    %rdi,%rax
mov    %r9,%rdi
mov    %r8,%rsi
mov    %r10,%rdx
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i64 @__ccaprice_syscall_args_5(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
store i64 %0, i64* %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i64 %3, i64* %10
store i64 %4, i64* %11
store i64 %5, i64* %12
%14 = load i64, i64* %7
%15 = load i64, i64* %8
%16 = load i64, i64* %9
%17 = load i64, i64* %10
%18 = load i64, i64* %11
%19 = load i64, i64* %12
%20 = call i64 asm sideeffect "int $$0x80", "={ax},{ax},{bx},{cx},{dx},{si},{di},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %14, i64 %15, i64 %16, i64 %17, i64 %18, i64 %19)
store i64 %20, i64* %13
%21 = load i64, i64* %13
ret i64 %21
}

LLVM IR (-O2):
define i64 @__ccaprice_syscall_args_5(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = tail call i64 asm sideeffect "int $$0x80", "={ax},{ax},{bx},{cx},{dx},{si},{di},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5)
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ displayBits(int);
int power2(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int result, number = 6, pow = 4;
  result = power2(number, pow);
  printf("power2(6, 4) = %d\n", result);
  displayBits(result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0xc(%rbp)
movl   $0x4,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1040 <power2@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <displayBits@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x6,%edi
mov    $0x4,%esi
call   1040 <power2@plt>
mov    %eax,%ebx
lea    0xeb7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1050 <displayBits@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"power2(6, 4) = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @power2(i32 6, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @displayBits(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  if (sizeof(unsigned long) == 4) {
    printf("unsigned long\n");
  } else if (sizeof(unsigned int) == 4) {
    printf("unsigned int\n");
  } else if (sizeof(unsigned short) == 4) {
    printf("unsigned short\n");
  } else if (sizeof(unsigned char) == 4) {
    printf("unsigned char\n");
  } else {
    return 1;
  }
  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 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [13 x i8] c"unsigned int\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 literal_pool_jumpover(int n) {}


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

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

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

LLVM IR (-O2):
define void @literal_pool_jumpover(i32 %0) {
ret void
}
/* Variables and functions */
int compare_default(void const *, void const *);
int compare_name_search(void const *, void const *);
int compare_name_sort(const void *a, const void *b) {
  int r = compare_name_search(a, b);
  if (r == 0)
    return compare_default(a, b);
  else
    return r;
}


x86 assembly (clang, -O0):
<compare_name_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <compare_name_search@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    115f <compare_name_sort+0x3f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <compare_default@plt>
mov    %eax,-0x4(%rbp)
jmp    1165 <compare_name_sort+0x45>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_name_sort>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <compare_name_search@plt>
test   %eax,%eax
je     113b <compare_name_sort+0x1b>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <compare_default@plt>

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

LLVM IR (-O2):
define i32 @compare_name_sort(i8* %0, i8* %1) {
%3 = tail call i32 @compare_name_search(i8* %0, i8* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @compare_default(i8* %0, i8* %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ %3, %2 ]
ret i32 %8
}
int i2c_add_adapter(struct i2c_adapter *adap) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.i2c_adapter = type opaque
define i32 @i2c_add_adapter(%struct.i2c_adapter* nocapture readnone %0) {
ret i32 0
}
int is_comment(const char *line) {
  const char *ptr = line;
  int retval = 0;
  while (*ptr == ' ')
    ptr++;
  if (*ptr == '#')
    return !retval;
  return retval;
}


x86 assembly (clang, -O0):
<is_comment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1138 <is_comment+0x38>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1117 <is_comment+0x17>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    115e <is_comment+0x5e>
cmpl   $0x0,-0x1c(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <is_comment+0x64>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_comment>:
movzbl (%rdi),%eax
cmp    $0x20,%al
jne    110d <is_comment+0xd>
add    $0x1,%rdi
jmp    1100 <is_comment>
cmp    $0x23,%al
jne    1117 <is_comment+0x17>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_comment(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %8 [
i8 32, label %5
i8 35, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
br label %8
8: ; preds = %2, %7
%9 = phi i32 [ 1, %7 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ cgbrcond(char *, int);
void cgbrgt(int n) { cgbrcond("jg", n); }


x86 assembly (clang, -O0):
<cgbrgt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <cgbrcond@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgbrgt>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <cgbrcond@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"jg\00"
define void @cgbrgt(i32 %0) {
%2 = tail call i32 @cgbrcond(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int f() {
  long l2;
  unsigned short us;
  unsigned long ul;
  short s2;
  ul = us = l2 = s2 = -1;
  return ul;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movw   $0xffff,-0x1a(%rbp)
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
movw   $0xffff,-0xa(%rbp)
movq   $0xffff,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i64
%2 = alloca i16
%3 = alloca i64
%4 = alloca i16
store i16 -1, i16* %4
store i64 -1, i64* %1
store i16 -1, i16* %2
store i64 65535, i64* %3
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f() {
ret i32 65535
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_byte(unsigned char);
void __console_tx_string(int loglevel, const char *str) {
  if (8 > loglevel) {
    unsigned char ch;
    while ((ch = *str++) != '\0') {
      __console_tx_byte(ch);
    }
  }
}


x86 assembly (clang, -O0):
<__console_tx_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x8,%eax
cmp    -0x4(%rbp),%eax
jle    1165 <__console_tx_string+0x55>
jmp    1132 <__console_tx_string+0x22>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movzbl %al,%eax
cmp    $0x0,%eax
je     1160 <__console_tx_string+0x50>
movzbl -0x11(%rbp),%edi
call   1030 <__console_tx_byte@plt>
jmp    1132 <__console_tx_string+0x22>
jmp    1165 <__console_tx_string+0x55>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__console_tx_string>:
push   %rbx
cmp    $0x7,%edi
jg     1143 <__console_tx_string+0x33>
mov    %rsi,%rbx
mov    (%rsi),%al
test   %al,%al
je     1143 <__console_tx_string+0x33>
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl %al,%edi
call   1030 <__console_tx_byte@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <__console_tx_string+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @__console_tx_string(i32 %0, i8* nocapture %1) {
%3 = icmp slt i32 %0, 8
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = load i8, i8* %1
%6 = icmp eq i8 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %4, %7
%8 = phi i8 [ %12, %7 ], [ %5, %4 ]
%9 = phi i8* [ %10, %7 ], [ %1, %4 ]
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = tail call i32 @__console_tx_byte(i8 zeroext %8)
%12 = load i8, i8* %10
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
__attribute__((noreturn)) void my_abort() { _exit(123); }


x86 assembly (clang, -O0):
<my_abort>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7b,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<my_abort>:
push   %rax
mov    $0x7b,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @my_abort() {
%1 = call i32 @_exit(i32 123)
unreachable
}

LLVM IR (-O2):
define void @my_abort() {
%1 = tail call i32 @_exit(i32 123)
unreachable
}
int main(void) {
  _Alignas(32) int x;
  _Alignas(32) int *p;
  _Alignas(32) int y;
  int *q;
  p = &x;
  q = &y;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
and    $0xffffffffffffffe0,%rsp
sub    $0x80,%rsp
movl   $0x0,0x6c(%rsp)
lea    0x60(%rsp),%rax
mov    %rax,0x40(%rsp)
lea    0x20(%rsp),%rax
mov    %rax,0x18(%rsp)
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ is_prefix(char *, char *);
int is_substring(char *sub, char *test) {
  while (*test != '\0') {
    if (is_prefix(sub, test))
      return 1;
    test++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_substring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1164 <is_substring+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <is_prefix@plt>
cmp    $0x0,%rax
je     1153 <is_substring+0x43>
movl   $0x1,-0x4(%rbp)
jmp    116b <is_substring+0x5b>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1120 <is_substring+0x10>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_substring>:
push   %rbp
push   %r14
push   %rbx
xor    %r14d,%r14d
cmpb   $0x0,(%rsi)
je     1152 <is_substring+0x42>
mov    %rsi,%rbx
mov    %rdi,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1030 <is_prefix@plt>
test   %rax,%rax
jne    114c <is_substring+0x3c>
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1130 <is_substring+0x20>
jmp    1152 <is_substring+0x42>
mov    $0x1,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @is_substring(i8* %0, i8* %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %8
5: ; preds = %8
%6 = load i8, i8* %12
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %2, %5
%9 = phi i8* [ %12, %5 ], [ %1, %2 ]
%10 = tail call i64 @is_prefix(i8* %0, i8* %9)
%11 = icmp eq i64 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %5, label %13
13: ; preds = %8, %5, %2
%14 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %8 ]
ret i32 %14
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int _switch_to_slow_ext_crystal(void) {
  *((volatile uint32_t *)(((0x400e1410)))) = ((0xa5 << 24) | (1 << 3));
  while (!(*((volatile uint32_t *)((((0x400e1410) + 0x14)))) & (1 << 7)))
    ;
  return 0;
}


x86 assembly (clang, -O0):
<_switch_to_slow_ext_crystal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400e1410,%eax
movl   $0xa5000008,(%rax)
mov    $0x400e1424,%eax
mov    (%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1130 <_switch_to_slow_ext_crystal+0x30>
jmp    1135 <_switch_to_slow_ext_crystal+0x35>
jmp    110f <_switch_to_slow_ext_crystal+0xf>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_switch_to_slow_ext_crystal>:
movl   $0xa5000008,0x400e1410
nopl   0x0(%rax,%rax,1)
testl  $0x80,0x400e1424
je     1110 <_switch_to_slow_ext_crystal+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @_switch_to_slow_ext_crystal() {
store volatile i32 -1526726648, i32* inttoptr (i64 1074664464 to i32*)
br label %1
1: ; preds = %6, %0
%2 = load volatile i32, i32* inttoptr (i64 1074664484 to i32*)
%3 = and i32 %2, 128
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
br i1 %5, label %6, label %7
6: ; preds = %1
br label %1
7: ; preds = %1
ret i32 0
}

LLVM IR (-O2):
define i32 @_switch_to_slow_ext_crystal() {
store volatile i32 -1526726648, i32* inttoptr (i64 1074664464 to i32*)
br label %1
1: ; preds = %1, %0
%2 = load volatile i32, i32* inttoptr (i64 1074664484 to i32*)
%3 = and i32 %2, 128
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
ret i32 0
}
/* Variables and functions */
int _isspace(int);
int isspace(int c) { return _isspace(c); }


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_isspace@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
jmp    1030 <_isspace@plt>

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

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
%2 = tail call i32 @_isspace(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
int getopt(int argc, char *const argv[], const char *optstring) {
  printf("optstring: %s\n", optstring);
  exit(-1);
}


x86 assembly (clang, -O0):
<getopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<getopt>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rdx,%rsi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"optstring: %s\0A\00"
define i32 @getopt(i32 %0, i8** %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [15 x i8] c"optstring: %s\0A\00"
define i32 @getopt(i32 %0, i8** nocapture readnone %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
int strcspn(char *, char *);
void strcspnTest() {
  char str[] = "shaun73";
  char keys[] = "1234567890";
  int i;
  i = strcspn(str, keys);
  printf("The first number in '%s' is at position %d.\n", str, i);
}


x86 assembly (clang, -O0):
<strcspnTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x13(%rbp)
mov    0xecb(%rip),%ax
mov    %ax,-0xb(%rbp)
mov    0xec3(%rip),%al
mov    %al,-0x9(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x13(%rbp),%rsi
call   1040 <strcspn@plt>
mov    %eax,-0x18(%rbp)
lea    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%edx
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcspnTest>:
push   %rbx
sub    $0x10,%rsp
movabs $0x33376e75616873,%rax
mov    %rax,0x8(%rsp)
lea    0xec5(%rip),%rsi
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strcspn@plt>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.strcspnTest.str = [8 x i8] c"shaun73\00"
@__const.strcspnTest.keys = [11 x i8] c"1234567890\00"
@.str = [45 x i8] c"The first number in '%s' is at position %d.\0A\00"
define void @strcspnTest() {
%1 = alloca [8 x i8]
%2 = alloca [11 x i8]
%3 = alloca i32
%4 = bitcast [8 x i8]* %1 to i8*
%5 = bitcast [11 x i8]* %2 to i8*
%6 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%8 = call i32 @strcspn(i8* %6, i8* %7)
store i32 %8, i32* %3
%9 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %10)
ret void
}

LLVM IR (-O2):
@__const.strcspnTest.keys = [11 x i8] c"1234567890\00"
@.str = [45 x i8] c"The first number in '%s' is at position %d.\0A\00"
define void @strcspnTest() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 14416171367491699, i64* %1
%3 = call i32 @strcspn(i8* %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__const.strcspnTest.keys, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ utm_alt_zone(double *, double, double, int);
void utm_from_lonlat_and_zone(double xy[2], double lon, double lat, int zone) {
  utm_alt_zone(xy, lon, lat, zone);
}


x86 assembly (clang, -O0):
<utm_from_lonlat_and_zone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mov    -0x1c(%rbp),%esi
call   1030 <utm_alt_zone@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utm_from_lonlat_and_zone>:
jmp    1030 <utm_alt_zone@plt>

LLVM IR (-O0):
define void @utm_from_lonlat_and_zone(double* %0, double %1, double %2, i32 %3) {
%5 = alloca double*
%6 = alloca double
%7 = alloca double
%8 = alloca i32
store double* %0, double** %5
store double %1, double* %6
store double %2, double* %7
store i32 %3, i32* %8
%9 = load double*, double** %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load i32, i32* %8
%13 = call i32 @utm_alt_zone(double* %9, double %10, double %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @utm_from_lonlat_and_zone(double* %0, double %1, double %2, i32 %3) {
%5 = tail call i32 @utm_alt_zone(double* %0, double %1, double %2, i32 %3)
ret void
}
/* Type definitions */
typedef int fpu_control_t;

/* Variables and functions */
int FE_ALL_EXCEPT;
int /*<<< orphan*/ _FPU_GETCW(int);
int /*<<< orphan*/ _FPU_SETCW(int);
int fesetexcept(int excepts) {
  fpu_control_t temp;
  _FPU_GETCW(temp);
  temp |= (excepts & FE_ALL_EXCEPT);
  _FPU_SETCW(temp);
  return 0;
}


x86 assembly (clang, -O0):
<fesetexcept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <_FPU_GETCW@plt>
mov    -0x4(%rbp),%eax
mov    0x2ea3(%rip),%rcx
and    (%rcx),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <_FPU_SETCW@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fesetexcept>:
push   %rax
call   1030 <_FPU_GETCW@plt>
mov    $0xffffffff,%edi
call   1040 <_FPU_SETCW@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@FE_ALL_EXCEPT = global i32 0
define i32 @fesetexcept(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %3
%5 = call i32 @_FPU_GETCW(i32 %4)
%6 = load i32, i32* %2
%7 = load i32, i32* @FE_ALL_EXCEPT
%8 = and i32 %6, %7
%9 = load i32, i32* %3
%10 = or i32 %9, %8
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = call i32 @_FPU_SETCW(i32 %11)
ret i32 0
}

LLVM IR (-O2):
@FE_ALL_EXCEPT = global i32 0
define i32 @fesetexcept(i32 %0) {
%2 = tail call i32 @_FPU_GETCW(i32 undef)
%3 = tail call i32 @_FPU_SETCW(i32 -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Simple, right?\n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
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 = [16 x i8] c"Simple, right?\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"Simple, right?\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
char *hash_plugin_detailed(void) {
  return ("mediawiki - A md5(salt.'-'.md5(password)) module\n"
          "------------------------\n"
          "Use this module to crack Wikimedia type A and B hashes\n"
          "Both type A and B types of hashes are supported.\n"
          "Input should be in Wikimedia form: A:hash (or user:A:hash) or "
          "B:salt:hash (or user:B:salt:hash) '\n"
          "Software that uses that password hashing method:\n"
          "MediaWiki\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 = [381 x i8] c"mediawiki - A md5(salt.'-'.md5(password)) module\0A------------------------\0AUse this module to crack Wikimedia type A and B hashes\0ABoth type A and B types of hashes are supported.\0AInput should be in Wikimedia form: A:hash (or user:A:hash) or B:salt:hash (or user:B:salt:hash) '\0ASoftware that uses that password hashing method:\0AMediaWiki\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([381 x i8], [381 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [381 x i8] c"mediawiki - A md5(salt.'-'.md5(password)) module\0A------------------------\0AUse this module to crack Wikimedia type A and B hashes\0ABoth type A and B types of hashes are supported.\0AInput should be in Wikimedia form: A:hash (or user:A:hash) or B:salt:hash (or user:B:salt:hash) '\0ASoftware that uses that password hashing method:\0AMediaWiki\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([381 x i8], [381 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
void TPM_Free(unsigned char *buffer) {
  free(buffer);
  return;
}


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

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

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

LLVM IR (-O2):
define void @TPM_Free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putendl(char *);
void ft_putstrtab(char **tab) {
  int i;
  i = 0;
  while (tab && tab[i])
    ft_putendl(tab[i++]);
}


x86 assembly (clang, -O0):
<ft_putstrtab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     1146 <ft_putstrtab+0x36>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1156 <ft_putstrtab+0x46>
jmp    1176 <ft_putstrtab+0x66>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <ft_putendl@plt>
jmp    1123 <ft_putstrtab+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstrtab>:
push   %rbx
test   %rdi,%rdi
je     1141 <ft_putstrtab+0x31>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <ft_putstrtab+0x31>
add    $0x8,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
call   1030 <ft_putendl@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <ft_putstrtab+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define void @ft_putstrtab(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i8**, i8*** %2
%6 = icmp ne i8** %5, null
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i8**, i8*** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8*, i8** %8, i64 %10
%12 = load i8*, i8** %11
%13 = icmp ne i8* %12, null
br label %14
14: ; preds = %7, %4
%15 = phi i1 [ false, %4 ], [ %13, %7 ]
br i1 %15, label %16, label %24
16: ; preds = %14
%17 = load i8**, i8*** %2
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
%20 = sext i32 %18 to i64
%21 = getelementptr inbounds i8*, i8** %17, i64 %20
%22 = load i8*, i8** %21
%23 = call i32 @ft_putendl(i8* %22)
br label %4
24: ; preds = %14
ret void
}

LLVM IR (-O2):
define void @ft_putstrtab(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %14, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %12, %6 ], [ %4, %3 ]
%8 = phi i64 [ %9, %6 ], [ 0, %3 ]
%9 = add nuw i64 %8, 1
%10 = tail call i32 @ft_putendl(i8* %7)
%11 = getelementptr inbounds i8*, i8** %0, i64 %9
%12 = load i8*, i8** %11
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %6
14: ; preds = %6, %3, %1
ret void
}
void PodExit() {}


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

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

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

LLVM IR (-O2):
define void @PodExit() {
ret void
}
int main() {
  if (1.0L)
    2;
  if (3.0) {
    return 4;
  } else if (5) {
    return 6;
  } else {
    return 7;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    111a <main+0x1a>
jmp    111f <main+0x1f>
jmp    111f <main+0x1f>
mov    $0x1,%al
test   $0x1,%al
jne    112e <main+0x2e>
jmp    113a <main+0x3a>
movl   $0x4,-0x4(%rbp)
jmp    1141 <main+0x41>
movl   $0x6,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}