xunge/DecIR huggingface dataset:
char or (char a, char b) {
  assert(is_binary(a) && is_binary(b));
  if (a == '1' || b == '1')
    return '1';
  else
    return '0';
}


x86 assembly (clang, -O0):
<or>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movsbl -0x2(%rbp),%edi
mov    $0x0,%al
call   1040 <is_binary@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x4(%rbp)
je     1163 <or+0x43>
movsbl -0x3(%rbp),%edi
mov    $0x0,%al
call   1040 <is_binary@plt>
cmp    $0x0,%eax
setne  %al
mov    %al,-0x4(%rbp)
mov    -0x4(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsbl -0x2(%rbp),%eax
cmp    $0x31,%eax
je     118c <or+0x6c>
movsbl -0x3(%rbp),%eax
cmp    $0x31,%eax
jne    1195 <or+0x75>
movb   $0x31,-0x1(%rbp)
jmp    1199 <or+0x79>
movb   $0x30,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<or>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <is_binary@plt>
test   %eax,%eax
je     1148 <or+0x28>
movsbl %r14b,%edi
xor    %eax,%eax
call   1040 <is_binary@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <assert@plt>
cmp    $0x31,%bpl
sete   %cl
cmp    $0x31,%r14b
sete   %al
or     %cl,%al
or     $0x30,%al
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define signext i8 @or(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = call i32 (i32, ...) bitcast (i32 (...)* @is_binary to i32 (i32, ...)*)(i32 %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8, i8* %5
%12 = sext i8 %11 to i32
%13 = call i32 (i32, ...) bitcast (i32 (...)* @is_binary to i32 (i32, ...)*)(i32 %12)
%14 = icmp ne i32 %13, 0
br label %15
15: ; preds = %10, %2
%16 = phi i1 [ false, %2 ], [ %14, %10 ]
%17 = zext i1 %16 to i32
%18 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %17)
%19 = load i8, i8* %4
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 49
br i1 %21, label %26, label %22
22: ; preds = %15
%23 = load i8, i8* %5
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 49
br i1 %25, label %26, label %27
26: ; preds = %22, %15
store i8 49, i8* %3
br label %28
27: ; preds = %22
store i8 48, i8* %3
br label %28
28: ; preds = %27, %26
%29 = load i8, i8* %3
ret i8 %29
}

LLVM IR (-O2):
define signext i8 @or(i8 signext %0, i8 signext %1) {
%3 = sext i8 %0 to i32
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @is_binary to i32 (i32, ...)*)(i32 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = sext i8 %1 to i32
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @is_binary to i32 (i32, ...)*)(i32 %7)
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %6, %2
%12 = phi i32 [ 0, %2 ], [ %10, %6 ]
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %12)
%14 = icmp eq i8 %0, 49
%15 = icmp eq i8 %1, 49
%16 = or i1 %14, %15
%17 = select i1 %16, i8 49, i8 48
ret i8 %17
}
int Calculator_sub(int a, int b) { return a - b; }


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

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

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

LLVM IR (-O2):
define i32 @Calculator_sub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
void *test_anti_range_112(short n) {
  extern void *alloc_anti_range_112(short) __attribute__((alloc_size(1)));
  if ((-0x7fff - 1) + 2 <= n && n <= -1)
    n = (-0x7fff - 1) + 2 - 1;
  return alloc_anti_range_112(n);
}


x86 assembly (clang, -O0):
<test_anti_range_112>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%ecx
mov    $0xffff8002,%eax
cmp    %ecx,%eax
jg     1143 <test_anti_range_112+0x33>
movswl -0x2(%rbp),%eax
cmp    $0xffffffff,%eax
jg     1143 <test_anti_range_112+0x33>
movw   $0x8001,-0x2(%rbp)
movswl -0x2(%rbp),%edi
call   1030 <alloc_anti_range_112@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_112>:
movzwl %di,%eax
cmp    $0x8001,%eax
mov    $0x8001,%eax
cmovb  %edi,%eax
movswl %ax,%edi
jmp    1030 <alloc_anti_range_112@plt>

LLVM IR (-O0):
define i8* @test_anti_range_112(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = icmp sle i32 -32766, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = icmp sle i32 %8, -1
br i1 %9, label %10, label %11
10: ; preds = %6
store i16 -32767, i16* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i16, i16* %2
%13 = call i8* @alloc_anti_range_112(i16 signext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_112(i16 signext %0) {
%2 = icmp ult i16 %0, -32767
%3 = select i1 %2, i16 %0, i16 -32767
%4 = tail call i8* @alloc_anti_range_112(i16 signext %3)
ret i8* %4
}
unsigned int remainingBytes(unsigned int idPackage, int buffer_size,
                            unsigned int size_file) {
  return (size_file - (idPackage * buffer_size));
}


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

x86 assembly (clang, -O2):
<remainingBytes>:
mov    %edx,%eax
imul   %esi,%edi
sub    %edi,%eax
ret

LLVM IR (-O0):
define i32 @remainingBytes(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = mul i32 %8, %9
%11 = sub i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @remainingBytes(i32 %0, i32 %1, i32 %2) {
%4 = mul i32 %1, %0
%5 = sub i32 %2, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("int = [%ld]\n", sizeof(int));
  printf("char = [%ld]\n", sizeof(char));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"int = [%ld]\0A\00"
@.str.1 = [14 x i8] c"char = [%ld]\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EA_PCDI_32();
int /*<<< orphan*/ m68ki_jump(int /*<<< orphan*/);
void m68k_op_jmp_32_pcdi(void) { m68ki_jump(EA_PCDI_32()); }


x86 assembly (clang, -O0):
<m68k_op_jmp_32_pcdi>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <EA_PCDI_32@plt>
mov    %eax,%edi
call   1030 <m68ki_jump@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_jmp_32_pcdi>:
push   %rax
xor    %eax,%eax
call   1040 <EA_PCDI_32@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <m68ki_jump@plt>

LLVM IR (-O0):
define void @m68k_op_jmp_32_pcdi() {
%1 = call i32 (...) @EA_PCDI_32()
%2 = call i32 @m68ki_jump(i32 %1)
ret void
}

LLVM IR (-O2):
define void @m68k_op_jmp_32_pcdi() {
%1 = tail call i32 (...) @EA_PCDI_32()
%2 = tail call i32 @m68ki_jump(i32 %1)
ret void
}
int right_child(int parent) { return parent * 2 + 2; }


x86 assembly (clang, -O0):
<right_child>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<right_child>:
lea    (%rdi,%rdi,1),%eax
add    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @right_child(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = add nsw i32 %2, 2
ret i32 %3
}
void g_spawn_close_pid() {}


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

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

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

LLVM IR (-O2):
define void @g_spawn_close_pid() {
ret void
}
/* Type definitions */
struct ibv_qp {
  int dummy;
};
struct ibv_flow_attr {
  int dummy;
};
struct ibv_flow {
  int dummy;
};

/* Variables and functions */
struct ibv_flow *ibv_create_flow(struct ibv_qp *, struct ibv_flow_attr *);
struct ibv_flow *mlx4_glue_create_flow(struct ibv_qp *qp,
                                       struct ibv_flow_attr *flow) {
  return ibv_create_flow(qp, flow);
}


x86 assembly (clang, -O0):
<mlx4_glue_create_flow>:
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 <ibv_create_flow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlx4_glue_create_flow>:
jmp    1030 <ibv_create_flow@plt>

LLVM IR (-O0):
%struct.ibv_flow = type { i32 }
%struct.ibv_qp = type { i32 }
%struct.ibv_flow_attr = type { i32 }
define %struct.ibv_flow* @mlx4_glue_create_flow(%struct.ibv_qp* %0, %struct.ibv_flow_attr* %1) {
%3 = alloca %struct.ibv_qp*
%4 = alloca %struct.ibv_flow_attr*
store %struct.ibv_qp* %0, %struct.ibv_qp** %3
store %struct.ibv_flow_attr* %1, %struct.ibv_flow_attr** %4
%5 = load %struct.ibv_qp*, %struct.ibv_qp** %3
%6 = load %struct.ibv_flow_attr*, %struct.ibv_flow_attr** %4
%7 = call %struct.ibv_flow* @ibv_create_flow(%struct.ibv_qp* %5, %struct.ibv_flow_attr* %6)
ret %struct.ibv_flow* %7
}

LLVM IR (-O2):
%struct.ibv_flow = type { i32 }
%struct.ibv_qp = type { i32 }
%struct.ibv_flow_attr = type { i32 }
define %struct.ibv_flow* @mlx4_glue_create_flow(%struct.ibv_qp* %0, %struct.ibv_flow_attr* %1) {
%3 = tail call %struct.ibv_flow* @ibv_create_flow(%struct.ibv_qp* %0, %struct.ibv_flow_attr* %1)
ret %struct.ibv_flow* %3
}
/* Variables and functions */
int /*<<< orphan*/ fb_move_cursor(unsigned short);
void fb_set_cursor(unsigned short row, unsigned short col) {
  unsigned short pos = row * 80;
  pos += col;
  fb_move_cursor(pos);
}


x86 assembly (clang, -O0):
<fb_set_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
imul   $0x50,%eax,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x4(%rbp),%ecx
movzwl -0x6(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%edi
call   1030 <fb_move_cursor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_set_cursor>:
lea    (%rdi,%rdi,4),%eax
shl    $0x4,%eax
add    %esi,%eax
movzwl %ax,%edi
jmp    1030 <fb_move_cursor@plt>

LLVM IR (-O0):
define void @fb_set_cursor(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = mul nsw i32 %7, 80
%9 = trunc i32 %8 to i16
store i16 %9, i16* %5
%10 = load i16, i16* %4
%11 = zext i16 %10 to i32
%12 = load i16, i16* %5
%13 = zext i16 %12 to i32
%14 = add nsw i32 %13, %11
%15 = trunc i32 %14 to i16
store i16 %15, i16* %5
%16 = load i16, i16* %5
%17 = call i32 @fb_move_cursor(i16 zeroext %16)
ret void
}

LLVM IR (-O2):
define void @fb_set_cursor(i16 zeroext %0, i16 zeroext %1) {
%3 = mul i16 %0, 80
%4 = add i16 %3, %1
%5 = tail call i32 @fb_move_cursor(i16 zeroext %4)
ret void
}
/* Type definitions */
typedef int u_int32_t;

/* Variables and functions */
int hash(void *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
u_int32_t hashkey(char *key) {
  if (key == NULL)
    return (-1);
  return (hash((void *)key, strlen(key)) & 0x000003FF);
}


x86 assembly (clang, -O0):
<hashkey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1143 <hashkey+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <hashkey+0x47>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <hash@plt>
and    $0x3ff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashkey>:
test   %rdi,%rdi
je     113f <hashkey+0x1f>
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <hash@plt>
and    $0x3ff,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @hashkey(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i32 @hash(i8* %0, i32 %4)
%6 = and i32 %5, 1023
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ uart0_write_hex(unsigned int);
void cc3_uart0_write_hex(unsigned int i) { uart0_write_hex(i); }


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

x86 assembly (clang, -O2):
<cc3_uart0_write_hex>:
jmp    1030 <uart0_write_hex@plt>

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

LLVM IR (-O2):
define void @cc3_uart0_write_hex(i32 %0) {
%2 = tail call i32 @uart0_write_hex(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void finalize_htm() {
  puts("</pre>");
  puts("</body>");
  puts("</html>");
}


x86 assembly (clang, -O0):
<finalize_htm>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<finalize_htm>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xedf(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"</pre>\00"
@.str.1 = [8 x i8] c"</body>\00"
@.str.2 = [8 x i8] c"</html>\00"
define void @finalize_htm() {
%1 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"</pre>\00"
@.str.1 = [8 x i8] c"</body>\00"
@.str.2 = [8 x i8] c"</html>\00"
define void @finalize_htm() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int inb(unsigned long i) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @inb(i64 %0) {
ret i32 0
}
void gdbmach_breakpoint(void) {}


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

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

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

LLVM IR (-O2):
define void @gdbmach_breakpoint() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __softboundmpx_store_return_metadata(struct tm *,
                                                        struct tm *);
struct tm *gmtime(int /*<<< orphan*/ const *);
__attribute__((__weak__, __always___)) struct tm *
softboundmpx_gmtime(const time_t *timep) {
  struct tm *temp = gmtime(timep);
  __softboundmpx_store_return_metadata(temp, temp + 1024);
  return temp;
}


x86 assembly (clang, -O0):
<softboundmpx_gmtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <gmtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x1000,%rsi
call   1040 <__softboundmpx_store_return_metadata@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_gmtime>:
push   %rbx
call   1030 <gmtime@plt>
mov    %rax,%rbx
lea    0x1000(%rax),%rsi
mov    %rax,%rdi
call   1040 <__softboundmpx_store_return_metadata@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define weak %struct.tm* @softboundmpx_gmtime(i32* %0) {
%2 = alloca i32*
%3 = alloca %struct.tm*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call %struct.tm* @gmtime(i32* %4)
store %struct.tm* %5, %struct.tm** %3
%6 = load %struct.tm*, %struct.tm** %3
%7 = load %struct.tm*, %struct.tm** %3
%8 = getelementptr inbounds %struct.tm, %struct.tm* %7, i64 1024
%9 = call i32 @__softboundmpx_store_return_metadata(%struct.tm* %6, %struct.tm* %8)
%10 = load %struct.tm*, %struct.tm** %3
ret %struct.tm* %10
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define weak %struct.tm* @softboundmpx_gmtime(i32* %0) {
%2 = tail call %struct.tm* @gmtime(i32* %0)
%3 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 1024
%4 = tail call i32 @__softboundmpx_store_return_metadata(%struct.tm* %2, %struct.tm* %3)
ret %struct.tm* %2
}
int readXacceleration() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @readXacceleration() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
void erreur(char *msg) {
  fflush(NULL);
  perror(msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<erreur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <fflush@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<erreur>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <fflush@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @erreur(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @fflush(i32* null)
%4 = load i8*, i8** %2
%5 = call i32 @perror(i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @erreur(i8* nocapture %0) {
%2 = tail call i32 @fflush(i32* null)
%3 = tail call i32 @perror(i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void add(int a, int b) { printf("\na=%d b=%d", a, b); }


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

x86 assembly (clang, -O2):
<add>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"\0Aa=%d b=%d\00"
define void @add(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\0Aa=%d b=%d\00"
define void @add(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, char *);
void function_est_date_end(char *est_end) {
  write("json-task.json", "\"estimated-end-date\":\"%s\", ", est_end);
}


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

x86 assembly (clang, -O2):
<function_est_date_end>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"json-task.json\00"
@.str.1 = [28 x i8] c"\22estimated-end-date\22:\22%s\22, \00"
define void @function_est_date_end(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @write(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"json-task.json\00"
@.str.1 = [28 x i8] c"\22estimated-end-date\22:\22%s\22, \00"
define void @function_est_date_end(i8* %0) {
%2 = tail call i32 @write(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
char const *strong_s1();
const char *call_strong_s1(void) { return strong_s1() + 1; }


x86 assembly (clang, -O0):
<call_strong_s1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <strong_s1@plt>
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_strong_s1>:
push   %rax
xor    %eax,%eax
call   1030 <strong_s1@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @call_strong_s1() {
%1 = call i8* (...) @strong_s1()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}

LLVM IR (-O2):
define i8* @call_strong_s1() {
%1 = tail call i8* (...) @strong_s1()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}
int bam_is_big_endian() {
  long int one;
  one = 1;
  return !(*((char *)(&one)));
}


x86 assembly (clang, -O0):
<bam_is_big_endian>:
push   %rbp
mov    %rsp,%rbp
movq   $0x1,-0x8(%rbp)
cmpb   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bam_is_big_endian() {
%1 = alloca i64
store i64 1, i64* %1
%2 = bitcast i64* %1 to i8*
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @bam_is_big_endian() {
ret i32 0
}
void Plain_LinkCheck() {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @Plain_LinkCheck() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bef_push(int);
int ins_nm7() {
  bef_push(7);
  return 1;
}


x86 assembly (clang, -O0):
<ins_nm7>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
call   1030 <bef_push@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ins_nm7>:
push   %rax
mov    $0x7,%edi
call   1030 <bef_push@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ins_nm7() {
%1 = call i32 @bef_push(i32 7)
ret i32 1
}

LLVM IR (-O2):
define i32 @ins_nm7() {
%1 = tail call i32 @bef_push(i32 7)
ret i32 1
}
/* Type definitions */
struct sigaction {
  void (*sa_handler)(int);
  int /*<<< orphan*/ sa_mask;
};
typedef int /*<<< orphan*/ sa;

/* Variables and functions */
int /*<<< orphan*/ memset(struct sigaction *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sigaction(int, struct sigaction *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
void sig_catch(int sig, void (*f)(int)) {
  struct sigaction sa;
  memset(&sa, 0, sizeof(sa));
  sa.sa_handler = f;
  sigemptyset(&sa.sa_mask);
  sigaction(sig, &sa, 0);
}


x86 assembly (clang, -O0):
<sig_catch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x20(%rbp),%rdi
add    $0x8,%rdi
call   1050 <sigemptyset@plt>
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_catch>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    %rbx,(%rsp)
lea    0x8(%rsp),%rdi
call   1050 <sigemptyset@plt>
mov    %ebp,%edi
mov    %r14,%rsi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.sigaction = type { void (i32)*, i32 }
define void @sig_catch(i32 %0, void (i32)* %1) {
%3 = alloca i32
%4 = alloca void (i32)*
%5 = alloca %struct.sigaction
store i32 %0, i32* %3
store void (i32)* %1, void (i32)** %4
%6 = call i32 @memset(%struct.sigaction* %5, i32 0, i32 16)
%7 = load void (i32)*, void (i32)** %4
%8 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 0
store void (i32)* %7, void (i32)** %8
%9 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 1
%10 = call i32 @sigemptyset(i32* %9)
%11 = load i32, i32* %3
%12 = call i32 @sigaction(i32 %11, %struct.sigaction* %5, i32 0)
ret void
}

LLVM IR (-O2):
%struct.sigaction = type { void (i32)*, i32 }
define void @sig_catch(i32 %0, void (i32)* %1) {
%3 = alloca %struct.sigaction
%4 = bitcast %struct.sigaction* %3 to i8*
%5 = call i32 @memset(%struct.sigaction* %3, i32 0, i32 16)
%6 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 0
store void (i32)* %1, void (i32)** %6
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 1
%8 = call i32 @sigemptyset(i32* %7)
%9 = call i32 @sigaction(i32 %0, %struct.sigaction* %3, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int _mm_ucomigt_ss(int /*<<< orphan*/, int /*<<< orphan*/);
int test_mm_ucomigt_ss(__m128 A, __m128 B) { return _mm_ucomigt_ss(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_ucomigt_ss>:
jmp    1030 <_mm_ucomigt_ss@plt>

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

LLVM IR (-O2):
define i32 @test_mm_ucomigt_ss(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_ucomigt_ss(i32 %0, i32 %1)
ret i32 %3
}
double myvariance(double *v) { return v[0] - v[1] * v[1]; }


x86 assembly (clang, -O0):
<myvariance>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<myvariance>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
mulsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @myvariance(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 1
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = fneg double %8
%13 = call double @llvm.fmuladd.f64(double %12, double %11, double %5)
ret double %13
}

LLVM IR (-O2):
define double @myvariance(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fneg double %4
%6 = tail call double @llvm.fmuladd.f64(double %5, double %4, double %2)
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct timespec {
  double tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
extern double getTimestamp() {
  struct timespec tp;
  uint32_t result;
  clock_gettime(CLOCK_MONOTONIC, &tp);
  return tp.tv_sec + (double)tp.tv_nsec * 1e-9;
}


x86 assembly (clang, -O0):
<getTimestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
movsd  -0x10(%rbp),%xmm1
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  0xec3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTimestamp>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
cvtsi2sdq 0x10(%rsp),%xmm0
mulsd  0xeca(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { double, i64 }
@CLOCK_MONOTONIC = global i32 0
define double @getTimestamp() {
%1 = alloca %struct.timespec
%2 = alloca i32
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = call double @llvm.fmuladd.f64(double %9, double 1.000000e-09, double %6)
ret double %10
}

LLVM IR (-O2):
%struct.timespec = type { double, i64 }
@CLOCK_MONOTONIC = global i32 0
define double @getTimestamp() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = call double @llvm.fmuladd.f64(double %9, double 1.000000e-09, double %6)
ret double %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ _start(int /*<<< orphan*/ *);
void _pnacl_wrapper_start(uint32_t *info) { _start(info); }


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

x86 assembly (clang, -O2):
<_pnacl_wrapper_start>:
jmp    1030 <_start@plt>

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

LLVM IR (-O2):
define void @_pnacl_wrapper_start(i32* %0) {
%2 = tail call i32 @_start(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i2c_sendAddress(int);
int /*<<< orphan*/ i2c_sendByte(char);
int /*<<< orphan*/ i2c_start();
int /*<<< orphan*/ i2c_stop();
void LCD_PrintChar(char ch) {
  i2c_start();
  i2c_sendAddress(0x74);
  i2c_sendByte(0b01000000);
  i2c_sendByte(ch + 128);
  i2c_stop();
}


x86 assembly (clang, -O0):
<LCD_PrintChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1050 <i2c_start@plt>
mov    $0x74,%edi
call   1030 <i2c_sendAddress@plt>
mov    $0x40,%edi
call   1060 <i2c_sendByte@plt>
movsbl -0x1(%rbp),%eax
add    $0x80,%eax
movsbl %al,%edi
call   1060 <i2c_sendByte@plt>
mov    $0x0,%al
call   1040 <i2c_stop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_PrintChar>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <i2c_start@plt>
mov    $0x74,%edi
call   1030 <i2c_sendAddress@plt>
mov    $0x40,%edi
call   1060 <i2c_sendByte@plt>
xor    $0x80,%bl
movsbl %bl,%edi
call   1060 <i2c_sendByte@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <i2c_stop@plt>

LLVM IR (-O0):
define void @LCD_PrintChar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 (...) @i2c_start()
%4 = call i32 @i2c_sendAddress(i32 116)
%5 = call i32 @i2c_sendByte(i8 signext 64)
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = add nsw i32 %7, 128
%9 = trunc i32 %8 to i8
%10 = call i32 @i2c_sendByte(i8 signext %9)
%11 = call i32 (...) @i2c_stop()
ret void
}

LLVM IR (-O2):
define void @LCD_PrintChar(i8 signext %0) {
%2 = tail call i32 (...) @i2c_start()
%3 = tail call i32 @i2c_sendAddress(i32 116)
%4 = tail call i32 @i2c_sendByte(i8 signext 64)
%5 = xor i8 %0, -128
%6 = tail call i32 @i2c_sendByte(i8 signext %5)
%7 = tail call i32 (...) @i2c_stop()
ret void
}
int val(char c) {
  if (c >= '0' && c <= '9') {
    return (int)c - '0';
  }
  return (int)c - 'A' + 10;
}


x86 assembly (clang, -O0):
<val>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1133 <val+0x33>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1133 <val+0x33>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1140 <val+0x40>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<val>:
lea    -0x30(%rdi),%ecx
lea    -0x37(%rdi),%edx
lea    -0x30(%rdi),%eax
cmp    $0xa,%cl
cmovae %edx,%eax
ret

LLVM IR (-O0):
define i32 @val(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 48
store i32 %14, i32* %2
br label %20
15: ; preds = %7, %1
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = sub nsw i32 %17, 65
%19 = add nsw i32 %18, 10
store i32 %19, i32* %2
br label %20
20: ; preds = %15, %11
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @val(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -48
%4 = icmp ult i8 %3, 10
%5 = select i1 %4, i32 -48, i32 -55
%6 = add nsw i32 %5, %2
ret i32 %6
}
void view_hotel_key_ir(void) {}


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

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

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

LLVM IR (-O2):
define void @view_hotel_key_ir() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("HTTP Insert"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"HTTP Insert\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"HTTP Insert\00"
define void @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
void rx_bzero(char *mem, int size) {
  while (size) {
    *mem = 0;
    ++mem;
    --size;
  }
}


x86 assembly (clang, -O0):
<rx_bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1136 <rx_bzero+0x36>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    110b <rx_bzero+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rx_bzero>:
test   %esi,%esi
je     1122 <rx_bzero+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @rx_bzero(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
int test_imm_B5int32_reg(int val) { return ((val) & (0xB5 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_B5int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xb5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_B5int32_reg(i32 %0) {
%2 = and i32 %0, 181
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ isdigit(char const);
bool parse_as_int(const char *str) {
  const char *current = str;
  while (isdigit(*current)) {
    current++;
  }
  if (*current == '.') {
    return false;
  } else {
    return true;
  }
}


x86 assembly (clang, -O0):
<parse_as_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     114b <parse_as_int+0x3b>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1124 <parse_as_int+0x14>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    1167 <parse_as_int+0x57>
movl   $0x0,-0x4(%rbp)
jmp    116e <parse_as_int+0x5e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_as_int>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1120 <parse_as_int+0x10>
xor    %eax,%eax
cmpb   $0x2e,-0x1(%rbx)
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @parse_as_int(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isdigit(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = load i8, i8* %3
%10 = icmp ne i8 %9, 46
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int lisp_futex(int *uaddr, int op, int val, void *timeout, int *uaddr2,
               int val3) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<lisp_futex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    0x2ec7(%rip),%rax
mov    (%rax),%ecx
mov    0x2eae(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lisp_futex>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @lisp_futex(i32* %0, i32 %1, i32 %2, i8* %3, i32* %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32*
%12 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i8* %3, i8** %10
store i32* %4, i32** %11
store i32 %5, i32* %12
%13 = load i32, i32* @ENOSYS
store i32 %13, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @lisp_futex(i32* nocapture readnone %0, i32 %1, i32 %2, i8* nocapture readnone %3, i32* nocapture readnone %4, i32 %5) {
%7 = load i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int usage(const char *prog) {
  fprintf(stderr, "%s conf_file\n", prog);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"%s conf_file\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 ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"%s conf_file\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int part(int *, int, int);
void qsort(int a[], int begin, int end) {
  int m;
  if (begin < end) {
    m = part(a, begin, end);
    qsort(a, begin, m - 1);
    qsort(a, m, end);
  }
}


x86 assembly (clang, -O0):
<qsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1171 <qsort+0x51>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <part@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1030 <qsort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <qsort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1163 <qsort+0x43>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <part@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <qsort@plt>
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <qsort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @qsort(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
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %23
11: ; preds = %3
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @part(i32* %12, i32 %13, i32 %14)
store i32 %15, i32* %7
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = sub nsw i32 %18, 1
%20 = load i32*, i32** %4
%21 = load i32, i32* %7
%22 = load i32, i32* %6
br label %23
23: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
define void @qsort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %10
5: ; preds = %3, %5
%6 = phi i32 [ %7, %5 ], [ %1, %3 ]
%7 = tail call i32 @part(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @qsort(i32* %0, i32 %6, i32 %8)
%9 = icmp slt i32 %7, %2
br i1 %9, label %5, label %10
10: ; preds = %5, %3
ret void
}