xunge/DecIR huggingface dataset:
void fd221(int n) {
a : {
  typedef int(*b)[n];
P01A:
  goto P01A;
  {
    typedef int(*c)[n];
  P012A:
    goto P012A;
    0;
  }
P01B:
  goto P01B;
  {
    typedef int(*d)[n];
  P013A:
    goto P013A;
    0;
  }
P01C:
  goto P01C;
  ;
  typedef int(*e)[n];
P014A:
  goto P014A;
  0;
};
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  p026A:
    goto p026A;
    goto a;
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd221>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd221+0x7>

x86 assembly (clang, -O2):
<fd221>:
jmp    1100 <fd221>

LLVM IR (-O0):
define void @fd221(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
br label %6
6: ; preds = %6, %3
br label %6
7: ; No predecessors!
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
br label %10
10: ; preds = %10, %7
br label %10
11: ; preds = %11
br label %11
12: ; No predecessors!
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
br label %15
15: ; preds = %15, %12
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
br label %20
20: ; preds = %20, %17
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
br label %25
25: ; preds = %25, %22
br label %25
26: ; No predecessors!
%27 = load i32, i32* %2
%28 = zext i32 %27 to i64
br label %29
29: ; preds = %29, %26
br label %29
30: ; preds = %30
br label %30
31: ; No predecessors!
%32 = load i32, i32* %2
%33 = zext i32 %32 to i64
br label %34
34: ; preds = %34, %31
br label %34
35: ; preds = %35
br label %35
36: ; No predecessors!
%37 = load i32, i32* %2
%38 = zext i32 %37 to i64
br label %39
39: ; preds = %39, %36
br label %39
40: ; preds = %40
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd221(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
double mysqrt(int);
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  printf("%f\n", mysqrt(2));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call double @mysqrt(i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
void debug_object_activate(void *addr, struct debug_obj_descr *descr) {}


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

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

LLVM IR (-O0):
%struct.debug_obj_descr = type opaque
define void @debug_object_activate(i8* %0, %struct.debug_obj_descr* %1) {
%3 = alloca i8*
%4 = alloca %struct.debug_obj_descr*
store i8* %0, i8** %3
store %struct.debug_obj_descr* %1, %struct.debug_obj_descr** %4
ret void
}

LLVM IR (-O2):
%struct.debug_obj_descr = type opaque
define void @debug_object_activate(i8* nocapture %0, %struct.debug_obj_descr* nocapture %1) {
ret void
}
/* Variables and functions */
void usb_ep0_stall();
void usb_ep0_standard_interface_tx() { return usb_ep0_stall(); }


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

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

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

LLVM IR (-O2):
define void @usb_ep0_standard_interface_tx() {
tail call void (...) @usb_ep0_stall()
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int remove(char const *);
int rmfile(const char *fpath, const struct stat *st, int flags) {
  (void)st;
  (void)flags;
  return remove(fpath);
}


x86 assembly (clang, -O0):
<rmfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <remove@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rmfile>:
jmp    1030 <remove@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @rmfile(i8* %0, %struct.stat* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca %struct.stat*
%6 = alloca i32
store i8* %0, i8** %4
store %struct.stat* %1, %struct.stat** %5
store i32 %2, i32* %6
%7 = load %struct.stat*, %struct.stat** %5
%8 = load i32, i32* %6
%9 = load i8*, i8** %4
%10 = call i32 @remove(i8* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @rmfile(i8* nocapture %0, %struct.stat* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @remove(i8* %0)
ret i32 %4
}
/* Variables and functions */
int ge(int, int);
main() { return ge(3, 5); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x5,%esi
call   1030 <ge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x3,%edi
mov    $0x5,%esi
jmp    1030 <ge@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @ge(i32 3, i32 5)
ret i32 %1
}
long long max(long long a, long long b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <max+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @max(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void signed_char_shl_signed_char(signed char *LHS, signed char RHS) {
  (*LHS) <<= RHS;
}


x86 assembly (clang, -O0):
<signed_char_shl_signed_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%ecx
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
shl    %cl,%edx
mov    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_char_shl_signed_char>:
mov    %esi,%ecx
movzbl (%rdi),%eax
shl    %cl,%eax
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @signed_char_shl_signed_char(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = shl i32 %9, %6
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
ret void
}

LLVM IR (-O2):
define void @signed_char_shl_signed_char(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = zext i8 %1 to i32
%6 = shl i32 %4, %5
%7 = trunc i32 %6 to i8
store i8 %7, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int NSIG;
int /*<<< orphan*/ __sigaddset(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ errno;
int sigaddset(sigset_t *set, int signo) {
  if (signo <= 0 || signo >= NSIG) {
    errno = EINVAL;
    return -1;
  }
  __sigaddset(set, signo);
  return (0);
}


x86 assembly (clang, -O0):
<sigaddset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    113b <sigaddset+0x2b>
mov    -0x14(%rbp),%eax
mov    0x2e9d(%rip),%rcx
cmp    (%rcx),%eax
jl     1159 <sigaddset+0x49>
mov    0x2e96(%rip),%rax
mov    (%rax),%ecx
mov    0x2e95(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <sigaddset+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <__sigaddset@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigaddset>:
push   %rax
test   %esi,%esi
jle    1129 <sigaddset+0x19>
mov    0x2eb4(%rip),%rax
cmp    %esi,(%rax)
jle    1129 <sigaddset+0x19>
call   1030 <__sigaddset@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
mov    0x2ea7(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@NSIG = global i32 0
@EINVAL = global i32 0
@errno = global i32 0
define i32 @sigaddset(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp sle i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load i32, i32* %5
%10 = load i32, i32* @NSIG
%11 = icmp sge i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8, %2
%13 = load i32, i32* @EINVAL
store i32 %13, i32* @errno
store i32 -1, i32* %3
br label %18
14: ; preds = %8
%15 = load i32*, i32** %4
%16 = load i32, i32* %5
%17 = call i32 @__sigaddset(i32* %15, i32 %16)
store i32 0, i32* %3
br label %18
18: ; preds = %14, %12
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@NSIG = global i32 0
@EINVAL = global i32 0
@errno = global i32 0
define i32 @sigaddset(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
%4 = load i32, i32* @NSIG
%5 = icmp sgt i32 %4, %1
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = load i32, i32* @EINVAL
store i32 %8, i32* @errno
br label %11
9: ; preds = %2
%10 = tail call i32 @__sigaddset(i32* %0, i32 %1)
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ -1, %7 ], [ 0, %9 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ snmp_event_done();
void transport_stop(void) { snmp_event_done(); }


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

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

LLVM IR (-O0):
define void @transport_stop() {
%1 = call i32 (...) @snmp_event_done()
ret void
}

LLVM IR (-O2):
define void @transport_stop() {
%1 = tail call i32 (...) @snmp_event_done()
ret void
}
/* Variables and functions */
int athTxStart(char *);
int athTx99Start() { return athTxStart("tx99"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"tx99\00"
define i32 @athTx99Start() {
%1 = call i32 @athTxStart(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [5 x i8] c"tx99\00"
define i32 @athTx99Start() {
%1 = tail call i32 @athTxStart(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
char *_strcpy(char *dest, char *src) {
  int i = 0;
  while ((dest[i] = src[i]))
    i++;
  return (dest);
}


x86 assembly (clang, -O0):
<_strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    %al,(%rcx,%rdx,1)
cmp    $0x0,%al
je     113f <_strcpy+0x3f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <_strcpy+0x13>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <_strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @_strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %9, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %6, i8* %7
%8 = icmp eq i8 %6, 0
%9 = add nuw i64 %4, 1
br i1 %8, label %10, label %3
10: ; preds = %3
ret i8* %0
}
void finn_vec3_up(float *vec) {
  vec[0] = 0;
  vec[1] = 1;
  vec[2] = 0;
}


x86 assembly (clang, -O0):
<finn_vec3_up>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0xee1(%rip),%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<finn_vec3_up>:
movabs $0x3f80000000000000,%rax
mov    %rax,(%rdi)
movl   $0x0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @finn_vec3_up(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
store float 0.000000e+00, float* %4
%5 = load float*, float** %2
%6 = getelementptr inbounds float, float* %5, i64 1
store float 1.000000e+00, float* %6
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 2
store float 0.000000e+00, float* %8
ret void
}

LLVM IR (-O2):
define void @finn_vec3_up(float* nocapture writeonly %0) {
store float 0.000000e+00, float* %0
%2 = getelementptr inbounds float, float* %0, i64 1
store float 1.000000e+00, float* %2
%3 = getelementptr inbounds float, float* %0, i64 2
store float 0.000000e+00, float* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CX4_immediate_reg(int);
void CX4_op68(void) { CX4_immediate_reg(15); }


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

x86 assembly (clang, -O2):
<CX4_op68>:
mov    $0xf,%edi
jmp    1030 <CX4_immediate_reg@plt>

LLVM IR (-O0):
define void @CX4_op68() {
%1 = call i32 @CX4_immediate_reg(i32 15)
ret void
}

LLVM IR (-O2):
define void @CX4_op68() {
%1 = tail call i32 @CX4_immediate_reg(i32 15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gpio_clr(int);
int /*<<< orphan*/ gpio_set(int);
void LCD_Reverse(short rev) {
  if (rev) {
    gpio_clr(1 << 14);
  } else {
    gpio_set(1 << 14);
  }
}


x86 assembly (clang, -O0):
<LCD_Reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
cmpw   $0x0,-0x2(%rbp)
je     1149 <LCD_Reverse+0x29>
mov    $0x4000,%edi
call   1030 <gpio_clr@plt>
jmp    1153 <LCD_Reverse+0x33>
mov    $0x4000,%edi
call   1040 <gpio_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_Reverse>:
test   %di,%di
je     112f <LCD_Reverse+0xf>
mov    $0x4000,%edi
jmp    1030 <gpio_clr@plt>
mov    $0x4000,%edi
jmp    1040 <gpio_set@plt>

LLVM IR (-O0):
define void @LCD_Reverse(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = icmp ne i16 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @gpio_clr(i32 16384)
br label %9
7: ; preds = %1
%8 = call i32 @gpio_set(i32 16384)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @LCD_Reverse(i16 signext %0) {
%2 = icmp eq i16 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @gpio_clr(i32 16384)
br label %7
5: ; preds = %1
%6 = tail call i32 @gpio_set(i32 16384)
br label %7
7: ; preds = %5, %3
ret void
}
char *strchr(const char *str, int c) {
  char *ptr;
  ptr = (char *)str;
  while (*ptr != c) {
    ptr++;
  }
  return ptr;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
je     1134 <strchr+0x34>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1113 <strchr+0x13>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%rax),%ecx
add    $0x1,%rax
cmp    %esi,%ecx
jne    1110 <strchr+0x10>
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, %1
%8 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %7, label %9, label %3
9: ; preds = %3
ret i8* %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
size_t sdnv_encoding_len(uint64_t val) {
  size_t val_len = 0;
  uint64_t tmp = val;
  do {
    tmp = tmp >> 7;
    val_len++;
  } while (tmp != 0);
  return val_len;
}


x86 assembly (clang, -O0):
<sdnv_encoding_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x7,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1115 <sdnv_encoding_len+0x15>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdnv_encoding_len>:
xor    %eax,%eax
mov    %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
sar    $0x7,%ecx
add    $0x1,%rax
cmp    $0x7f,%edi
mov    %ecx,%edi
ja     1110 <sdnv_encoding_len+0x10>
ret

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

LLVM IR (-O2):
define i64 @sdnv_encoding_len(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %6, %2 ]
%4 = phi i32 [ %0, %1 ], [ %5, %2 ]
%5 = ashr i32 %4, 7
%6 = add i64 %3, 1
%7 = icmp ult i32 %4, 128
br i1 %7, label %8, label %2
8: ; preds = %2
ret i64 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ keygen_cleanBuffer(int /*<<< orphan*/ *, size_t);
void keygen_cleanAndFreeBuffer(uint8_t *buffer, size_t length) {
  keygen_cleanBuffer(buffer, length);
  free(buffer);
}


x86 assembly (clang, -O0):
<keygen_cleanAndFreeBuffer>:
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   1040 <keygen_cleanBuffer@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @keygen_cleanAndFreeBuffer(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i64, i64* %4
%7 = call i32 @keygen_cleanBuffer(i32* %5, i64 %6)
%8 = load i32*, i32** %3
%9 = call i32 @free(i32* %8)
ret void
}

LLVM IR (-O2):
define void @keygen_cleanAndFreeBuffer(i32* %0, i64 %1) {
%3 = tail call i32 @keygen_cleanBuffer(i32* %0, i64 %1)
%4 = tail call i32 @free(i32* %0)
ret void
}
main() {
  int i = 0;
  do {
    printf(i);
    i++;
  } while (i < 5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movslq -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jl     1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x2,%edi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x3,%edi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x4,%edi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = call i32 (i8*, ...) @printf(i8* %6)
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %10
10: ; preds = %3
%11 = load i32, i32* %2
%12 = icmp slt i32 %11, 5
br i1 %12, label %3, label %13
13: ; preds = %10
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) null)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) inttoptr (i64 1 to i8*))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) inttoptr (i64 2 to i8*))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) inttoptr (i64 3 to i8*))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) inttoptr (i64 4 to i8*))
ret i32 0
}
void RAND_pseudo_bytes(void) {}


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

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

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

LLVM IR (-O2):
define void @RAND_pseudo_bytes() {
ret void
}
/* Variables and functions */
int get_input();
int /*<<< orphan*/ hip2_2(void (*)());
int /*<<< orphan*/ stuff(int);
void hip1_2(void (*g)()) {
  int i;
  hip2_2(g);
  for (i = 0; i < get_input(); i++) {
    stuff(2);
    stuff(2 + 2);
  }
}


x86 assembly (clang, -O0):
<hip1_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <hip2_2@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <get_input@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    1188 <hip1_2+0x58>
mov    $0x2,%edi
call   1030 <stuff@plt>
mov    $0x4,%edi
call   1030 <stuff@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114c <hip1_2+0x1c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hip1_2>:
push   %rbx
call   1040 <hip2_2@plt>
xor    %eax,%eax
call   1050 <get_input@plt>
test   %eax,%eax
jle    1172 <hip1_2+0x42>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2,%edi
call   1030 <stuff@plt>
mov    $0x4,%edi
call   1030 <stuff@plt>
add    $0x1,%ebx
xor    %eax,%eax
call   1050 <get_input@plt>
cmp    %eax,%ebx
jl     1150 <hip1_2+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define void @hip1_2(void (...)* %0) {
%2 = alloca void (...)*
%3 = alloca i32
store void (...)* %0, void (...)** %2
%4 = load void (...)*, void (...)** %2
%5 = call i32 @hip2_2(void (...)* %4)
store i32 0, i32* %3
br label %6
6: ; preds = %13, %1
%7 = load i32, i32* %3
%8 = call i32 (...) @get_input()
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = call i32 @stuff(i32 2)
%12 = call i32 @stuff(i32 4)
br label %13
13: ; preds = %10
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %6
16: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @hip1_2(void (...)* %0) {
%2 = tail call i32 @hip2_2(void (...)* %0)
%3 = tail call i32 (...) @get_input()
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %1, %5
%6 = phi i32 [ %9, %5 ], [ 0, %1 ]
%7 = tail call i32 @stuff(i32 2)
%8 = tail call i32 @stuff(i32 4)
%9 = add nuw nsw i32 %6, 1
%10 = tail call i32 (...) @get_input()
%11 = icmp slt i32 %9, %10
br i1 %11, label %5, label %12
12: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void zero_fill(void *obj, int size) { memset(obj, 0, size); }


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

x86 assembly (clang, -O2):
<zero_fill>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @zero_fill(i8* %0, i32 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i32 %1)
ret void
}
int is_rCRG(int id) { return ((id == 137) || (id == 139) || (id == 140)); }


x86 assembly (clang, -O0):
<is_rCRG>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x89,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1138 <is_rCRG+0x38>
mov    $0x1,%al
cmpl   $0x8b,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1138 <is_rCRG+0x38>
cmpl   $0x8c,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_rCRG>:
mov    %edi,%eax
and    $0xfffffffd,%eax
cmp    $0x89,%eax
sete   %al
cmp    $0x8c,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_rCRG(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 137
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 139
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 140
br label %11
11: ; preds = %8, %5, %1
%12 = phi i1 [ true, %5 ], [ true, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @is_rCRG(i32 %0) {
%2 = and i32 %0, -3
%3 = icmp eq i32 %2, 137
%4 = icmp eq i32 %0, 140
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
unsigned int str_nlen(const char *s, unsigned int limit) {
  unsigned int i;
  i = 0;
  while (limit-- > 0) {
    if (s[i] == '\0') {
      break;
    }
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<str_nlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jbe    114d <str_nlen+0x4d>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    113f <str_nlen+0x3f>
jmp    114d <str_nlen+0x4d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <str_nlen+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_nlen>:
xor    %eax,%eax
test   %esi,%esi
je     1121 <str_nlen+0x21>
cs nopw 0x0(%rax,%rax,1)
mov    %eax,%ecx
cmpb   $0x0,(%rdi,%rcx,1)
je     1121 <str_nlen+0x21>
add    $0x1,%eax
cmp    %eax,%esi
jne    1110 <str_nlen+0x10>
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @str_nlen(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %15, label %4
4: ; preds = %2, %12
%5 = phi i32 [ %7, %12 ], [ %1, %2 ]
%6 = phi i32 [ %13, %12 ], [ 0, %2 ]
%7 = add i32 %5, -1
%8 = zext i32 %6 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %4
%13 = add i32 %6, 1
%14 = icmp eq i32 %7, 0
br i1 %14, label %15, label %4
15: ; preds = %12, %4, %2
%16 = phi i32 [ 0, %2 ], [ %6, %4 ], [ %1, %12 ]
ret i32 %16
}
unsigned normal2x_width_generic_input_fmts(void) { return (1 << 1) | (1 << 0); }


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

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

LLVM IR (-O0):
define i32 @normal2x_width_generic_input_fmts() {
ret i32 3
}

LLVM IR (-O2):
define i32 @normal2x_width_generic_input_fmts() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ button_init();
int /*<<< orphan*/ irq_init();
int /*<<< orphan*/ led_init();
int gboot_main() {
  led_init();
  button_init();
  irq_init();
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<gboot_main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <led_init@plt>
mov    $0x0,%al
call   1030 <button_init@plt>
mov    $0x0,%al
call   1050 <irq_init@plt>
jmp    1149 <gboot_main+0x19>

x86 assembly (clang, -O2):
<gboot_main>:
push   %rax
xor    %eax,%eax
call   1040 <led_init@plt>
xor    %eax,%eax
call   1030 <button_init@plt>
xor    %eax,%eax
call   1050 <irq_init@plt>
cs nopw 0x0(%rax,%rax,1)
jmp    1150 <gboot_main+0x20>

LLVM IR (-O0):
define i32 @gboot_main() {
%1 = call i32 (...) @led_init()
%2 = call i32 (...) @button_init()
%3 = call i32 (...) @irq_init()
br label %4
4: ; preds = %0, %4
br label %4
}

LLVM IR (-O2):
define i32 @gboot_main() {
%1 = tail call i32 (...) @led_init()
%2 = tail call i32 (...) @button_init()
%3 = tail call i32 (...) @irq_init()
br label %4
4: ; preds = %0, %4
br label %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t mp2vseqx_get_framerated(const uint8_t *p_mp2vseqx) {
  return (p_mp2vseqx[9] & 0x1f);
}


x86 assembly (clang, -O0):
<mp2vseqx_get_framerated>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%eax
and    $0x1f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vseqx_get_framerated>:
mov    0x24(%rdi),%eax
and    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @mp2vseqx_get_framerated(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 9
%5 = load i32, i32* %4
%6 = and i32 %5, 31
ret i32 %6
}

LLVM IR (-O2):
define i32 @mp2vseqx_get_framerated(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 9
%3 = load i32, i32* %2
%4 = and i32 %3, 31
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ LCD_command(short);
int /*<<< orphan*/ LCD_data(int);
void LCD_command_2D(short command, int data) {
  LCD_data(data & 0xFF);
  LCD_data((data >> 8) & 0xFF);
  LCD_command(command);
}


x86 assembly (clang, -O0):
<LCD_command_2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0xff,%edi
call   1030 <LCD_data@plt>
mov    -0x8(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <LCD_data@plt>
movswl -0x2(%rbp),%edi
call   1040 <LCD_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_command_2D>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movzbl %bl,%edi
call   1030 <LCD_data@plt>
movzbl %bh,%edi
call   1030 <LCD_data@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <LCD_command@plt>

LLVM IR (-O0):
define void @LCD_command_2D(i16 signext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = call i32 @LCD_data(i32 %6)
%8 = load i32, i32* %4
%9 = ashr i32 %8, 8
%10 = and i32 %9, 255
%11 = call i32 @LCD_data(i32 %10)
%12 = load i16, i16* %3
%13 = call i32 @LCD_command(i16 signext %12)
ret void
}

LLVM IR (-O2):
define void @LCD_command_2D(i16 signext %0, i32 %1) {
%3 = and i32 %1, 255
%4 = tail call i32 @LCD_data(i32 %3)
%5 = lshr i32 %1, 8
%6 = and i32 %5, 255
%7 = tail call i32 @LCD_data(i32 %6)
%8 = tail call i32 @LCD_command(i16 signext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tzset();
void rust_time_tzset() { tzset(); }


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

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

LLVM IR (-O0):
define void @rust_time_tzset() {
%1 = call i32 (...) @tzset()
ret void
}

LLVM IR (-O2):
define void @rust_time_tzset() {
%1 = tail call i32 (...) @tzset()
ret void
}
char *strcpy(char *d, const char *s) {
  char *r = d;
  while ((*d++ = *s++))
    ;
  return r;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1143 <strcpy+0x43>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
double HCalendarToJD(int yh, int mh, int dh) {
  double md, yd;
  md = (mh - 1.0) * 29.530589;
  yd = (yh - 1.0) * 354.367068 + md + dh - 1.0;
  yd = yd + 1948439.0;
  return (yd);
}


x86 assembly (clang, -O0):
<HCalendarToJD>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xeee(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xef2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xecc(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xec3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  0xea2(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe89(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<HCalendarToJD>:
cvtsi2sd %esi,%xmm0
movsd  0xef4(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  0xef0(%rip),%xmm0
cvtsi2sd %edi,%xmm2
addsd  %xmm1,%xmm2
mulsd  0xee8(%rip),%xmm2
addsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  0xed5(%rip),%xmm0
ret

LLVM IR (-O0):
define double @HCalendarToJD(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
%10 = sitofp i32 %9 to double
%11 = fsub double %10, 1.000000e+00
%12 = fmul double %11, 0x403D87D4AE429E0A
store double %12, double* %7
%13 = load i32, i32* %4
%14 = sitofp i32 %13 to double
%15 = fsub double %14, 1.000000e+00
%16 = load double, double* %7
%17 = call double @llvm.fmuladd.f64(double %15, double 0x407625DF82B1F688, double %16)
%18 = load i32, i32* %6
%19 = sitofp i32 %18 to double
%20 = fadd double %17, %19
%21 = fsub double %20, 1.000000e+00
store double %21, double* %8
%22 = load double, double* %8
%23 = fadd double %22, 0x413DBB1700000000
store double %23, double* %8
%24 = load double, double* %8
ret double %24
}

LLVM IR (-O2):
define double @HCalendarToJD(i32 %0, i32 %1, i32 %2) {
%4 = sitofp i32 %1 to double
%5 = fadd double %4, -1.000000e+00
%6 = fmul double %5, 0x403D87D4AE429E0A
%7 = sitofp i32 %0 to double
%8 = fadd double %7, -1.000000e+00
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x407625DF82B1F688, double %6)
%10 = sitofp i32 %2 to double
%11 = fadd double %9, %10
%12 = fadd double %11, -1.000000e+00
%13 = fadd double %12, 0x413DBB1700000000
ret double %13
}
int fun_0(int *a) {
  return *((int *)__builtin_assume_aligned((int *)((unsigned int)a * 2), 4));
}


x86 assembly (clang, -O0):
<fun_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x1,%eax
mov    %eax,%eax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun_0(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i32
%5 = mul i32 %4, 2
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = bitcast i32* %7 to i8*
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @fun_0(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = shl i64 %2, 1
%4 = and i64 %3, 4294967294
%5 = inttoptr i64 %4 to i32*
%6 = inttoptr i64 %4 to i8*
%7 = load i32, i32* %5
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int *mempcpy(int *, int *, int);
void mempcpy14() {
  int src[] = {1, 2, 3, 4};
  int dst[5] = {0};
  int *p;
  p = mempcpy(dst, src, 4 * sizeof(int));
  clang_analyzer_eval(p == &dst[4]);
}


x86 assembly (clang, -O0):
<mempcpy14>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1030 <memset@plt>
lea    -0x30(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x10,%edx
call   1040 <mempcpy@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
lea    -0x30(%rbp),%rcx
add    $0x10,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <clang_analyzer_eval@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mempcpy14>:
push   %rbx
sub    $0x30,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
lea    0x10(%rsp),%rbx
mov    %rsp,%rdi
lea    0x20(%rsp),%rsi
mov    $0x10,%edx
call   1030 <mempcpy@plt>
xor    %edi,%edi
cmp    %rbx,%rax
sete   %dil
call   1040 <clang_analyzer_eval@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.mempcpy14.src = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
define void @mempcpy14() {
%1 = alloca [4 x i32]
%2 = alloca [5 x i32]
%3 = alloca i32*
%4 = bitcast [4 x i32]* %1 to i8*
%5 = bitcast [5 x i32]* %2 to i8*
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%8 = call i32* @mempcpy(i32* %6, i32* %7, i32 16)
store i32* %8, i32** %3
%9 = load i32*, i32** %3
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 4
%11 = icmp eq i32* %9, %10
%12 = zext i1 %11 to i32
%13 = call i32 @clang_analyzer_eval(i32 %12)
ret void
}

LLVM IR (-O2):
@__const.mempcpy14.src = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
define void @mempcpy14() {
%1 = alloca [4 x i32]
%2 = alloca [5 x i32]
%3 = bitcast [4 x i32]* %1 to i8*
%4 = bitcast [5 x i32]* %2 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%7 = call i32* @mempcpy(i32* %5, i32* %6, i32 16)
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 4
%9 = icmp eq i32* %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 @clang_analyzer_eval(i32 %10)
ret void
}
const char *hithere_LTX_get_salutation() { return "Hi there"; }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"Hi there\00"
define i8* @hithere_LTX_get_salutation() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"Hi there\00"
define i8* @hithere_LTX_get_salutation() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
unsigned long IO_ConvertUnsigned(int c) { return ((unsigned long)c) & 0xff; }


x86 assembly (clang, -O0):
<IO_ConvertUnsigned>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
and    $0xff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IO_ConvertUnsigned>:
movzbl %dil,%eax
ret

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

LLVM IR (-O2):
define i64 @IO_ConvertUnsigned(i32 %0) {
%2 = and i32 %0, 255
%3 = zext i32 %2 to i64
ret i64 %3
}
void ff_hevc_put_hevc_uni_epel_h24_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_h24_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  int i = 1;
  unsigned int ui = 2;
  short s = 3;
  unsigned short us = 4;
  char c = 5;
  unsigned char uc = 6;
  void xixi_funcao(int, unsigned int, short, unsigned short, char,
                   unsigned char);
  xixi_funcao(i, ui, s, us, c, uc);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movw   $0x3,-0xe(%rbp)
movw   $0x4,-0x10(%rbp)
movb   $0x5,-0x11(%rbp)
movb   $0x6,-0x12(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0xe(%rbp),%dx
mov    -0x10(%rbp),%cx
mov    -0x11(%rbp),%al
movswl %dx,%edx
movzwl %cx,%ecx
movsbl %al,%r8d
movzbl -0x12(%rbp),%r9d
call   1030 <xixi_funcao@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
call   1030 <xixi_funcao@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i16
%5 = alloca i16
%6 = alloca i8
%7 = alloca i8
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
store i16 3, i16* %4
store i16 4, i16* %5
store i8 5, i8* %6
store i8 6, i8* %7
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = load i16, i16* %4
%11 = load i16, i16* %5
%12 = load i8, i8* %6
%13 = load i8, i8* %7
%14 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
tail call void @xixi_funcao(i32 1, i32 2, i16 signext 3, i16 zeroext 4, i8 signext 5, i8 zeroext 6)
%1 = tail call i32 @exit(i32 0)
unreachable
}
int g_sck_vsock_socket(void) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @g_sck_vsock_socket() {
ret i32 -1
}
void null_dtor_func(const void *v) {}


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

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

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

LLVM IR (-O2):
define void @null_dtor_func(i8* nocapture %0) {
ret void
}
long __ashlsi3(long a, int b) { return a << b; }


x86 assembly (clang, -O0):
<__ashlsi3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shl    %cl,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ashlsi3>:
mov    %esi,%ecx
mov    %rdi,%rax
shl    %cl,%rax
ret

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

LLVM IR (-O2):
define i64 @__ashlsi3(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = shl i64 %0, %3
ret i64 %4
}
char and_gate(char a, char b) {
  if (a == '0' || b == '0') {
    return '0';
  } else {
    return '1';
  }
}


x86 assembly (clang, -O0):
<and_gate>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x30,%eax
je     112a <and_gate+0x2a>
movsbl -0x3(%rbp),%eax
cmp    $0x30,%eax
jne    1133 <and_gate+0x33>
movb   $0x30,-0x1(%rbp)
jmp    1137 <and_gate+0x37>
movb   $0x31,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<and_gate>:
cmp    $0x30,%dil
sete   %cl
cmp    $0x30,%sil
sete   %al
or     %cl,%al
xor    $0x31,%al
ret

LLVM IR (-O0):
define signext i8 @and_gate(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 = icmp eq i32 %7, 48
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i8, i8* %5
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 48
br i1 %12, label %13, label %14
13: ; preds = %9, %2
store i8 48, i8* %3
br label %15
14: ; preds = %9
store i8 49, i8* %3
br label %15
15: ; preds = %14, %13
%16 = load i8, i8* %3
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @and_gate(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, 48
%4 = icmp eq i8 %1, 48
%5 = or i1 %3, %4
%6 = select i1 %5, i8 48, i8 49
ret i8 %6
}