xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ipv6head(int osvers, int osrel, int ossub) {
  printf("inrecv/s outreq/s inmc/s outmc/s indeliv/s "
         "reasmok/s fragcre/s _ipv6_");
}


x86 assembly (clang, -O0):
<ipv6head>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [70 x i8] c"inrecv/s outreq/s inmc/s outmc/s indeliv/s reasmok/s fragcre/s _ipv6_\00"
define void @ipv6head(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 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [70 x i8] c"inrecv/s outreq/s inmc/s outmc/s indeliv/s reasmok/s fragcre/s _ipv6_\00"
define void @ipv6head(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned long get_unsigned_long_max() {
  unsigned long max = ~0;
  return (max);
}


x86 assembly (clang, -O0):
<get_unsigned_long_max>:
push   %rbp
mov    %rsp,%rbp
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_unsigned_long_max>:
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @get_unsigned_long_max() {
%1 = alloca i64
store i64 -1, i64* %1
%2 = load i64, i64* %1
ret i64 %2
}

LLVM IR (-O2):
define i64 @get_unsigned_long_max() {
ret i64 -1
}
/* Variables and functions */
int /*<<< orphan*/ dirname(char *);
int /*<<< orphan*/ free(char *);
char *get_executable_path();
char *path_join(int /*<<< orphan*/, char *);
char *get_base_path(void) {
  char *exe_path = get_executable_path();
  char *base_path = path_join(dirname(exe_path), "../");
  free(exe_path);
  return base_path;
}


x86 assembly (clang, -O0):
<get_base_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <get_executable_path@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <dirname@plt>
mov    %eax,%edi
lea    0xe9b(%rip),%rsi
call   1050 <path_join@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_base_path>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <get_executable_path@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <dirname@plt>
lea    0xea3(%rip),%rsi
mov    %eax,%edi
call   1050 <path_join@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"../\00"
define i8* @get_base_path() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* (...) @get_executable_path()
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 @dirname(i8* %4)
%6 = call i8* @path_join(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %2
%7 = load i8*, i8** %1
%8 = call i32 @free(i8* %7)
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [4 x i8] c"../\00"
define i8* @get_base_path() {
%1 = tail call i8* (...) @get_executable_path()
%2 = tail call i32 @dirname(i8* %1)
%3 = tail call i8* @path_join(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @free(i8* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
__attribute__((__weak__, __always___)) void
softboundmpx_srand(unsigned int seed) {
  srand(seed);
}


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

x86 assembly (clang, -O2):
<softboundmpx_srand>:
jmp    1030 <srand@plt>

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

LLVM IR (-O2):
define weak void @softboundmpx_srand(i32 %0) {
%2 = tail call i32 @srand(i32 %0)
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
struct timeval isaac_tvnow(void) {
  struct timeval t;
  gettimeofday(&t, NULL);
  return t;
}


x86 assembly (clang, -O0):
<isaac_tvnow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isaac_tvnow>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @isaac_tvnow() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @isaac_tvnow() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ putbyte(unsigned char);
void putdword(unsigned long d) {
  putbyte((unsigned char)((d >> 24) & 0xff));
  putbyte((unsigned char)((d >> 16) & 0xff));
  putbyte((unsigned char)((d >> 8) & 0xff));
  putbyte((unsigned char)(d & 0xff));
}


x86 assembly (clang, -O0):
<putdword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
movzbl %al,%edi
call   1030 <putbyte@plt>
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
movzbl %al,%edi
call   1030 <putbyte@plt>
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
movzbl %al,%edi
call   1030 <putbyte@plt>
mov    -0x8(%rbp),%rax
and    $0xff,%rax
movzbl %al,%edi
call   1030 <putbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putdword>:
push   %rbx
mov    %rdi,%rbx
mov    %ebx,%eax
shr    $0x18,%eax
mov    %eax,%edi
call   1030 <putbyte@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
call   1030 <putbyte@plt>
movzbl %bh,%edi
call   1030 <putbyte@plt>
movzbl %bl,%edi
pop    %rbx
jmp    1030 <putbyte@plt>

LLVM IR (-O0):
define void @putdword(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 24
%5 = and i64 %4, 255
%6 = trunc i64 %5 to i8
%7 = call i32 @putbyte(i8 zeroext %6)
%8 = load i64, i64* %2
%9 = lshr i64 %8, 16
%10 = and i64 %9, 255
%11 = trunc i64 %10 to i8
%12 = call i32 @putbyte(i8 zeroext %11)
%13 = load i64, i64* %2
%14 = lshr i64 %13, 8
%15 = and i64 %14, 255
%16 = trunc i64 %15 to i8
%17 = call i32 @putbyte(i8 zeroext %16)
%18 = load i64, i64* %2
%19 = and i64 %18, 255
%20 = trunc i64 %19 to i8
%21 = call i32 @putbyte(i8 zeroext %20)
ret void
}

LLVM IR (-O2):
define void @putdword(i64 %0) {
%2 = lshr i64 %0, 24
%3 = trunc i64 %2 to i8
%4 = tail call i32 @putbyte(i8 zeroext %3)
%5 = lshr i64 %0, 16
%6 = trunc i64 %5 to i8
%7 = tail call i32 @putbyte(i8 zeroext %6)
%8 = lshr i64 %0, 8
%9 = trunc i64 %8 to i8
%10 = tail call i32 @putbyte(i8 zeroext %9)
%11 = trunc i64 %0 to i8
%12 = tail call i32 @putbyte(i8 zeroext %11)
ret void
}
int io_data_ready(int fd, int ms) { int ret; }


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

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

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

LLVM IR (-O2):
define i32 @io_data_ready(i32 %0, i32 %1) {
ret i32 undef
}
void special_exit(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ do_res(int);
uint8_t flash_read_sign(int fd) { return do_res(fd); }


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

x86 assembly (clang, -O2):
<flash_read_sign>:
jmp    1030 <do_res@plt>

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

LLVM IR (-O2):
define i32 @flash_read_sign(i32 %0) {
%2 = tail call i32 @do_res(i32 %0)
ret i32 %2
}
void gftp_gtk_platform_specific_init(void) {}


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

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

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

LLVM IR (-O2):
define void @gftp_gtk_platform_specific_init() {
ret void
}
/* Type definitions */
struct linked_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *linked_list_pop(struct linked_list *);
void pop_token_off_stack(struct linked_list *stack) {
  void *ptr;
  ptr = linked_list_pop(stack);
  free(ptr);
  ptr = NULL;
}


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

x86 assembly (clang, -O2):
<pop_token_off_stack>:
push   %rax
call   1040 <linked_list_pop@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.linked_list = type { i32 }
define void @pop_token_off_stack(%struct.linked_list* %0) {
%2 = alloca %struct.linked_list*
%3 = alloca i8*
store %struct.linked_list* %0, %struct.linked_list** %2
%4 = load %struct.linked_list*, %struct.linked_list** %2
%5 = call i8* @linked_list_pop(%struct.linked_list* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @free(i8* %6)
store i8* null, i8** %3
ret void
}

LLVM IR (-O2):
%struct.linked_list = type { i32 }
define void @pop_token_off_stack(%struct.linked_list* %0) {
%2 = tail call i8* @linked_list_pop(%struct.linked_list* %0)
%3 = tail call i32 @free(i8* %2)
ret void
}
unsigned char InetProtocol_hash(int protocol) { return (protocol) & (256 - 1); }


x86 assembly (clang, -O0):
<InetProtocol_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @InetProtocol_hash(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = trunc i32 %4 to i8
ret i8 %5
}

LLVM IR (-O2):
define zeroext i8 @InetProtocol_hash(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
/* Type definitions */
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
struct Cyc_Absyn_Exp *Cyc_Absyn_prim2_exp(unsigned int, struct Cyc_Absyn_Exp *,
                                          struct Cyc_Absyn_Exp *, unsigned int);
struct Cyc_Absyn_Exp *Cyc_Absyn_gt_exp(struct Cyc_Absyn_Exp *e1,
                                       struct Cyc_Absyn_Exp *e2, unsigned loc) {
  struct Cyc_Absyn_Exp *_T0;
  _T0 = Cyc_Absyn_prim2_exp(7U, e1, e2, loc);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Absyn_gt_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x7,%edi
call   1030 <Cyc_Absyn_prim2_exp@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_gt_exp>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x7,%edi
jmp    1030 <Cyc_Absyn_prim2_exp@plt>

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_gt_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2) {
%4 = alloca %struct.Cyc_Absyn_Exp*
%5 = alloca %struct.Cyc_Absyn_Exp*
%6 = alloca i32
%7 = alloca %struct.Cyc_Absyn_Exp*
store %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp** %4
store %struct.Cyc_Absyn_Exp* %1, %struct.Cyc_Absyn_Exp** %5
store i32 %2, i32* %6
%8 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %4
%9 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %5
%10 = load i32, i32* %6
%11 = call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_prim2_exp(i32 7, %struct.Cyc_Absyn_Exp* %8, %struct.Cyc_Absyn_Exp* %9, i32 %10)
store %struct.Cyc_Absyn_Exp* %11, %struct.Cyc_Absyn_Exp** %7
%12 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %7
ret %struct.Cyc_Absyn_Exp* %12
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_gt_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2) {
%4 = tail call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_prim2_exp(i32 7, %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2)
ret %struct.Cyc_Absyn_Exp* %4
}
void free_bitmap(unsigned char **p) {
  assert(p);
  free(p[0]);
  free(p);
}


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

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

LLVM IR (-O0):
define void @free_bitmap(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i32 (i8**, ...) bitcast (i32 (...)* @assert to i32 (i8**, ...)*)(i8** %3)
%5 = load i8**, i8*** %2
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = load i8**, i8*** %2
%9 = bitcast i8** %8 to i8*
ret void
}

LLVM IR (-O2):
define void @free_bitmap(i8** %0) {
%2 = tail call i32 (i8**, ...) bitcast (i32 (...)* @assert to i32 (i8**, ...)*)(i8** %0)
%3 = load i8*, i8** %0
tail call void @free(i8* %3)
%4 = bitcast i8** %0 to i8*
tail call void @free(i8* %4)
ret void
}
int ft_isdigit(int c) {
  if ((unsigned char)c >= '0' && (unsigned char)c <= '9')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0x30,%eax
jl     1131 <ft_isdigit+0x31>
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0x39,%eax
jg     1131 <ft_isdigit+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1138 <ft_isdigit+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isdigit>:
movzbl %dil,%ecx
add    $0xffffffd0,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = trunc i32 %4 to i8
%6 = zext i8 %5 to i32
%7 = icmp sge i32 %6, 48
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i32, i32* %3
%10 = trunc i32 %9 to i8
%11 = zext i8 %10 to i32
%12 = icmp sle i32 %11, 57
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 1, i32* %2
br label %15
14: ; preds = %8, %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @ft_isdigit(i32 %0) {
%2 = and i32 %0, 255
%3 = add nsw i32 %2, -48
%4 = icmp ult i32 %3, 10
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int daemon(int, int /*<<< orphan*/);
int /*<<< orphan*/ dns_error(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int daemonrize(int dm) {
  if (dm == 1)
    if (daemon(1, 0) == -1)
      dns_error(0, "daemonrize");
    else
      printf("daemon!!!\n");
  return 0;
}


x86 assembly (clang, -O0):
<daemonrize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    117e <daemonrize+0x4e>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <daemon@plt>
cmp    $0xffffffff,%eax
jne    116d <daemonrize+0x3d>
xor    %edi,%edi
lea    0xe9d(%rip),%rsi
call   1050 <dns_error@plt>
jmp    1179 <daemonrize+0x49>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
jmp    117e <daemonrize+0x4e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<daemonrize>:
push   %rax
cmp    $0x1,%edi
jne    1163 <daemonrize+0x33>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <daemon@plt>
cmp    $0xffffffff,%eax
je     1155 <daemonrize+0x25>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
jmp    1163 <daemonrize+0x33>
lea    0xea4(%rip),%rsi
xor    %edi,%edi
call   1050 <dns_error@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"daemonrize\00"
@.str.1 = [11 x i8] c"daemon!!!\0A\00"
define i32 @daemonrize(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %13
5: ; preds = %1
%6 = call i32 @daemon(i32 1, i32 0)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @dns_error(i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %12
10: ; preds = %5
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
br label %13
13: ; preds = %12, %1
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"daemonrize\00"
@str = [10 x i8] c"daemon!!!\00"
define i32 @daemonrize(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %3, label %10
3: ; preds = %1
%4 = tail call i32 @daemon(i32 1, i32 0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @dns_error(i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %3
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %6, %8, %1
ret i32 0
}
/* Variables and functions */
int win32_kbhit(int /*<<< orphan*/);
bool PDC_check_bios_key(void) { return (win32_kbhit(0)); }


x86 assembly (clang, -O0):
<PDC_check_bios_key>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <win32_kbhit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PDC_check_bios_key>:
xor    %edi,%edi
jmp    1030 <win32_kbhit@plt>

LLVM IR (-O0):
define i32 @PDC_check_bios_key() {
%1 = call i32 @win32_kbhit(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @PDC_check_bios_key() {
%1 = tail call i32 @win32_kbhit(i32 0)
ret i32 %1
}
int overflow_crash() {
  int a[512];
  int i;
  for (i = 0; i < 1024; i++) {
    a[i] = i;
  }
}


x86 assembly (clang, -O0):
<overflow_crash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7a0,%rsp
movl   $0x0,-0x814(%rbp)
cmpl   $0x400,-0x814(%rbp)
jge    114d <overflow_crash+0x4d>
mov    -0x814(%rbp),%ecx
movslq -0x814(%rbp),%rax
mov    %ecx,-0x810(%rbp,%rax,4)
mov    -0x814(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x814(%rbp)
jmp    1115 <overflow_crash+0x15>
mov    -0x4(%rbp),%eax
add    $0x7a0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @overflow_crash() {
%1 = alloca i32
%2 = alloca [512 x i32]
%3 = alloca i32
store i32 0, i32* %3
br label %4
4: ; preds = %12, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1024
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [512 x i32], [512 x i32]* %2, i64 0, i64 %10
store i32 %8, i32* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @overflow_crash() {
ret i32 undef
}
/* Variables and functions */
int strlen(char *);
char *strndup(char *, int);
char *athame_copy_w_space(char *text) {
  int len = strlen(text);
  text[len] = ' ';
  char *ret = strndup(text, len + 1);
  text[len] = '\0';
  return ret;
}


x86 assembly (clang, -O0):
<athame_copy_w_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
call   1040 <strndup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<athame_copy_w_space>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%r14
movb   $0x20,(%rbx,%r14,1)
lea    0x1(%r14),%esi
mov    %rbx,%rdi
call   1040 <strndup@plt>
movb   $0x0,(%rbx,%r14,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @athame_copy_w_space(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i8*, i8** %2
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
store i8 32, i8* %10
%11 = load i8*, i8** %2
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
%14 = call i8* @strndup(i8* %11, i32 %13)
store i8* %14, i8** %4
%15 = load i8*, i8** %2
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
store i8 0, i8* %18
%19 = load i8*, i8** %4
ret i8* %19
}

LLVM IR (-O2):
define noalias i8* @athame_copy_w_space(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
store i8 32, i8* %4
%5 = add nsw i32 %2, 1
%6 = tail call i8* @strndup(i8* %0, i32 %5)
store i8 0, i8* %4
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ syscall_cp(int, int, void *, size_t, int /*<<< orphan*/);
ssize_t pread(int fd, void *buf, size_t size, off_t ofs) {
  return syscall_cp(17, fd, buf, size, (ofs));
}


x86 assembly (clang, -O0):
<pread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    $0x11,%edi
call   1030 <syscall_cp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pread>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x11,%edi
jmp    1030 <syscall_cp@plt>

LLVM IR (-O0):
define i32 @pread(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i32, i32* %8
%13 = call i32 @syscall_cp(i32 17, i32 %9, i8* %10, i64 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @pread(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @syscall_cp(i32 17, i32 %0, i8* %1, i64 %2, i32 %3)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ TRUE;
scalar_t__ xdr_string(int /*<<< orphan*/ *, char **, unsigned int);
bool_t xdr_wrapstring(XDR *xdrs, char **cpp) {
  if (xdr_string(xdrs, cpp, ((unsigned int)0 - 1))) {
    return (TRUE);
  }
  return (FALSE);
}


x86 assembly (clang, -O0):
<xdr_wrapstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0xffffffff,%edx
call   1030 <xdr_string@plt>
cmp    $0x0,%rax
je     114d <xdr_wrapstring+0x3d>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <xdr_wrapstring+0x49>
mov    0x2e84(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_wrapstring>:
push   %rax
mov    $0xffffffff,%edx
call   1030 <xdr_string@plt>
test   %rax,%rax
jne    1129 <xdr_wrapstring+0x19>
mov    0x2eb1(%rip),%rax
jmp    1130 <xdr_wrapstring+0x20>
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@TRUE = global i32 0
@FALSE = global i32 0
define i32 @xdr_wrapstring(i32* %0, i8** %1) {
%3 = tail call i64 @xdr_string(i32* %0, i8** %1, i32 -1)
%4 = icmp eq i64 %3, 0
%5 = load i32, i32* @FALSE
%6 = load i32, i32* @TRUE
%7 = select i1 %4, i32 %5, i32 %6
ret i32 %7
}
unsigned char foo_uchar(void) {
  _Complex unsigned char a = 123 + 45I;
  return __real__ a;
}


x86 assembly (clang, -O0):
<foo_uchar>:
push   %rbp
mov    %rsp,%rbp
movb   $0x7b,-0x8(%rbp)
movb   $0x2d,-0x7(%rbp)
movzbl -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_uchar>:
mov    $0x7b,%al
ret

LLVM IR (-O0):
define zeroext i8 @foo_uchar() {
%1 = alloca { i8, i8 }
%2 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %1, i32 0, i32 0
%3 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %1, i32 0, i32 1
store i8 123, i8* %2
store i8 45, i8* %3
%4 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %1, i32 0, i32 0
%5 = load i8, i8* %4
ret i8 %5
}

LLVM IR (-O2):
define zeroext i8 @foo_uchar() {
ret i8 123
}
/* Variables and functions */
int getnext(int);
int /*<<< orphan*/ printbits(int);
void main() {
  int i = 9;
  printbits(i);
  i = getnext(i);
  printbits(i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x9,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <printbits@plt>
mov    -0x4(%rbp),%edi
call   1040 <getnext@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <printbits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x9,%edi
call   1030 <printbits@plt>
mov    $0x9,%edi
call   1040 <getnext@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <printbits@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 9, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printbits(i32 %2)
%4 = load i32, i32* %1
%5 = call i32 @getnext(i32 %4)
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = call i32 @printbits(i32 %6)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @printbits(i32 9)
%2 = tail call i32 @getnext(i32 9)
%3 = tail call i32 @printbits(i32 %2)
ret void
}
int get_cof(int fid, int did, int family) {
  int t = 0x10;
  if (family == 0x10)
    t = 0x10;
  else
    t = 0x8;
  return (100 * (fid + t) >> did);
}


x86 assembly (clang, -O0):
<get_cof>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x10,-0x10(%rbp)
cmpl   $0x10,-0xc(%rbp)
jne    112a <get_cof+0x2a>
movl   $0x10,-0x10(%rbp)
jmp    1131 <get_cof+0x31>
movl   $0x8,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x10(%rbp),%eax
imul   $0x64,%eax,%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cof>:
mov    %esi,%ecx
xor    %eax,%eax
cmp    $0x10,%edx
sete   %al
lea    (%rdi,%rax,8),%eax
imul   $0x64,%eax,%eax
add    $0x320,%eax
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @get_cof(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 16, i32* %7
%8 = load i32, i32* %6
%9 = icmp eq i32 %8, 16
br i1 %9, label %10, label %11
10: ; preds = %3
store i32 16, i32* %7
br label %12
11: ; preds = %3
store i32 8, i32* %7
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %4
%14 = load i32, i32* %7
%15 = add nsw i32 %13, %14
%16 = mul nsw i32 100, %15
%17 = load i32, i32* %5
%18 = ashr i32 %16, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @get_cof(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 16
%5 = select i1 %4, i32 16, i32 8
%6 = add nsw i32 %5, %0
%7 = mul nsw i32 %6, 100
%8 = ashr i32 %7, %1
ret i32 %8
}
void sizeof_char_good(int i) {
  char b[10];
  b[sizeof(b) - 1] = 123;
}


x86 assembly (clang, -O0):
<sizeof_char_good>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movb   $0x7b,-0x5(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @sizeof_char_good(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 9
store i8 123, i8* %4
ret void
}

LLVM IR (-O2):
define void @sizeof_char_good(i32 %0) {
ret void
}
int clog2(unsigned int x) {
  int i;
  for (i = -1; x != 0; i++)
    x >>= 1;
  return i;
}


x86 assembly (clang, -O0):
<clog2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <clog2+0x2f>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <clog2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clog2>:
mov    $0xffffffff,%eax
test   %edi,%edi
je     111c <clog2+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <clog2+0x10>
ret

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

LLVM IR (-O2):
define i32 @clog2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ -1, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nsw i32 %4, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ -1, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int encode_voltage(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int main(int argc, char **argv) {
  int val;
  sscanf(argv[1], "%d", &val);
  printf("Votage: %04x\n", encode_voltage(val));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
lea    0xec4(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1050 <sscanf@plt>
mov    0x4(%rsp),%edi
call   1040 <encode_voltage@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [14 x i8] c"Votage: %04x\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = load i32, i32* %3
%9 = call i32 @encode_voltage(i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ system(char *);
void main() {
  int i, product, sum;
  sum = 0;
  product = 1;
  i = 0;
  while (i < 5) {
    product = product * 3;
    sum = sum + 3;
    i++;
  }
  printf("%d\n", product);
  printf("%d\n", sum);
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1165 <main+0x45>
imul   $0x3,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe82(%rip),%rdi
call   1040 <printf@plt>
lea    0xe7a(%rip),%rdi
call   1030 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xf3,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
call   1040 <printf@plt>
lea    0xebb(%rip),%rdi
pop    %rbx
jmp    1030 <system@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [6 x i8] c"pause\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 243)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 15)
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int rlxs_size(void) { return (105); }


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

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

LLVM IR (-O0):
define i32 @rlxs_size() {
ret i32 105
}

LLVM IR (-O2):
define i32 @rlxs_size() {
ret i32 105
}
/* Variables and functions */
int __WORDSIZE;
int /*<<< orphan*/ printf(char *, int);
int hlp_wordsize(void) {
  printf("%d\n", __WORDSIZE);
  return 0;
}


x86 assembly (clang, -O0):
<hlp_wordsize>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@__WORDSIZE = global i32 0
define i32 @hlp_wordsize() {
%1 = load i32, i32* @__WORDSIZE
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@__WORDSIZE = global i32 0
define i32 @hlp_wordsize() {
%1 = load i32, i32* @__WORDSIZE
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ handle_VTALRM(int /*<<< orphan*/);
int gen_VTALRM() {
  handle_VTALRM(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_VTALRM>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_VTALRM@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_VTALRM>:
push   %rax
xor    %edi,%edi
call   1030 <handle_VTALRM@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gen_VTALRM() {
%1 = call i32 @handle_VTALRM(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_VTALRM() {
%1 = tail call i32 @handle_VTALRM(i32 0)
ret i32 0
}
int close(int file) {}


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

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

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

LLVM IR (-O2):
define i32 @close(i32 %0) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ ossl_uintmax_t;

/* Variables and functions */
int /*<<< orphan*/ OPENSSL_free(void *);
void sa_free_leaf(ossl_uintmax_t n, void *p, void *arg) { OPENSSL_free(p); }


x86 assembly (clang, -O0):
<sa_free_leaf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <OPENSSL_free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sa_free_leaf>:
mov    %rsi,%rdi
jmp    1030 <OPENSSL_free@plt>

LLVM IR (-O0):
define void @sa_free_leaf(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** %5
%8 = call i32 @OPENSSL_free(i8* %7)
ret void
}

LLVM IR (-O2):
define void @sa_free_leaf(i32 %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @OPENSSL_free(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ doubles_mat44_identity(double *);
void doubles_mat44_scale(const double sxyz[3], double out[16]) {
  doubles_mat44_identity(out);
  for (int i = 0; i < 3; i++)
    out[4 * i + i] = sxyz[i];
}


x86 assembly (clang, -O0):
<doubles_mat44_scale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <doubles_mat44_identity@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    116a <doubles_mat44_scale+0x5a>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1130 <doubles_mat44_scale+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubles_mat44_scale>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <doubles_mat44_identity@plt>
movsd  (%r14),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x8(%r14),%xmm0
movsd  %xmm0,0x28(%rbx)
movsd  0x10(%r14),%xmm0
movsd  %xmm0,0x50(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @doubles_mat44_scale(double* nocapture %0, double* %1) {
%3 = tail call i32 @doubles_mat44_identity(double* %1)
%4 = load double, double* %0
store double %4, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 5
store double %6, double* %7
%8 = getelementptr inbounds double, double* %0, i64 2
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %1, i64 10
store double %9, double* %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
main() {
  int f, c;
  int lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  f = lower;
  while (f <= upper) {
    c = 5 * (f - 32) / 9;
    printf("%d\t%d\n", f, c);
    f = f + step;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x12c,-0x14(%rbp)
movl   $0x14,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     117a <main+0x6a>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
imul   $0x5,%eax,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    113a <main+0x2a>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0xffffffec,%ebx
mov    $0xff60,%r15w
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
add    $0x14,%ebx
movswl %r15w,%eax
imul   $0x1c72,%eax,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
shr    $0x10,%eax
add    %ecx,%eax
movswl %ax,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x64,%r15d
cmp    $0x119,%ebx
jb     1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d\09%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %9, %1 ]
%3 = trunc i32 %2 to i16
%4 = mul nuw nsw i16 %3, 5
%5 = add nsw i16 %4, -160
%6 = sdiv i16 %5, 9
%7 = sext i16 %6 to i32
%8 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %7)
%9 = add nuw nsw i32 %2, 20
%10 = icmp ult i32 %2, 281
br i1 %10, label %1, label %11
11: ; preds = %1
ret i32 0
}
void *f3_1(int a, void *b) { return (a += b); }


x86 assembly (clang, -O0):
<f3_1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3_1>:
add    %edi,%esi
movslq %esi,%rax
ret

LLVM IR (-O0):
define i8* @f3_1(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr i8, i8* %5, i64 %7
%9 = ptrtoint i8* %8 to i32
store i32 %9, i32* %3
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
define i8* @f3_1(i32 %0, i8* %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr i8, i8* %1, i64 %3
%5 = ptrtoint i8* %4 to i64
%6 = shl i64 %5, 32
%7 = ashr exact i64 %6, 32
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}
/* Variables and functions */
int getTIssue(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  scanf("%d", &a);
  a = getTIssue(a);
  return a;
}


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 <getTIssue@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%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 <getTIssue@plt>
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 @getTIssue(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
ret i32 %6
}

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 @getTIssue(i32 %4)
ret i32 %5
}
/* Variables and functions */
void hs_typed_free(void *, int /*<<< orphan*/);
void free(void *p) { return hs_typed_free(p, 0); }


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

x86 assembly (clang, -O2):
<free>:
xor    %esi,%esi
jmp    1030 <hs_typed_free@plt>

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

LLVM IR (-O2):
define void @free(i8* %0) {
tail call void @hs_typed_free(i8* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kfree(void *);
void free(void *addr) { kfree(addr); }


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

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

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

LLVM IR (-O2):
define void @free(i8* %0) {
%2 = tail call i32 @kfree(i8* %0)
ret void
}