xunge/DecIR huggingface dataset:
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int c;
  int i = 1;
  while ((c = getchar()) != EOF) {
    if (c == '\n')
      i++;
  }
  printf("%d\n", i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1167 <main+0x47>
cmpl   $0xa,-0x8(%rbp)
jne    1162 <main+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
mov    $0x1,%ebx
cmp    (%r14),%eax
je     1166 <main+0x46>
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1150 <main+0x30>
lea    0xe93(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = phi i32 [ %9, %4 ], [ 1, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %6, %8
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
%14 = phi i32 [ 1, %0 ], [ %9, %4 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}
/* Type definitions */
struct packet {
  int dummy;
};

/* Variables and functions */
int packet_end(struct packet *);
int packet_payload(struct packet *);
int packet_payload_len(struct packet *packet) {
  return packet_end(packet) - packet_payload(packet);
}


x86 assembly (clang, -O0):
<packet_payload_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <packet_end@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <packet_payload@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<packet_payload_len>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <packet_end@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <packet_payload@plt>
sub    %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.packet = type { i32 }
define i32 @packet_payload_len(%struct.packet* %0) {
%2 = alloca %struct.packet*
store %struct.packet* %0, %struct.packet** %2
%3 = load %struct.packet*, %struct.packet** %2
%4 = call i32 @packet_end(%struct.packet* %3)
%5 = load %struct.packet*, %struct.packet** %2
%6 = call i32 @packet_payload(%struct.packet* %5)
%7 = sub nsw i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
%struct.packet = type { i32 }
define i32 @packet_payload_len(%struct.packet* %0) {
%2 = tail call i32 @packet_end(%struct.packet* %0)
%3 = tail call i32 @packet_payload(%struct.packet* %0)
%4 = sub nsw i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int ssds_send_len(int, char *, int, char *, int);
int strlen(char *);
int ssds_send(int fd, char *sbuf, char *rbuf) {
  int len;
  len = strlen(sbuf);
  return ssds_send_len(fd, sbuf, len, rbuf, 256);
}


x86 assembly (clang, -O0):
<ssds_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x100,%r8d
call   1040 <ssds_send_len@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssds_send>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
mov    %r14,%rcx
mov    $0x100,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <ssds_send_len@plt>

LLVM IR (-O0):
define i32 @ssds_send(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %5
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %7
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = load i32, i32* %7
%13 = load i8*, i8** %6
%14 = call i32 @ssds_send_len(i32 %10, i8* %11, i32 %12, i8* %13, i32 256)
ret i32 %14
}

LLVM IR (-O2):
define i32 @ssds_send(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @strlen(i8* %1)
%5 = tail call i32 @ssds_send_len(i32 %0, i8* %1, i32 %4, i8* %2, i32 256)
ret i32 %5
}
int func16() {
#pragma critTer : 62 :../../ test / resources / functionNumber.c:
  return 0;
#pragma critTer : 63 :../../ test / resources / functionNumber.c:
}


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

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

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

LLVM IR (-O2):
define i32 @func16() {
ret i32 0
}
unsigned hash(unsigned ip, unsigned port) {
  unsigned result = 0;
  result ^= ip;
  result ^= (ip >> 4);
  result ^= (ip << 3);
  result ^= (ip >> 12);
  result += (ip >> 20);
  result ^= (ip >> 28);
  result += port;
  result ^= (port >> 5);
  return result;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0xc,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x14,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1c,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x5,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    %edi,%eax
shr    $0x4,%eax
xor    %edi,%eax
lea    0x0(,%rdi,8),%ecx
mov    %edi,%edx
shr    $0xc,%edx
xor    %ecx,%edx
xor    %eax,%edx
mov    %edi,%eax
shr    $0x14,%eax
add    %edx,%eax
shr    $0x1c,%edi
xor    %edi,%eax
add    %esi,%eax
shr    $0x5,%esi
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @hash(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %3
%7 = load i32, i32* %5
%8 = xor i32 %7, %6
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = lshr i32 %9, 4
%11 = load i32, i32* %5
%12 = xor i32 %11, %10
store i32 %12, i32* %5
%13 = load i32, i32* %3
%14 = shl i32 %13, 3
%15 = load i32, i32* %5
%16 = xor i32 %15, %14
store i32 %16, i32* %5
%17 = load i32, i32* %3
%18 = lshr i32 %17, 12
%19 = load i32, i32* %5
%20 = xor i32 %19, %18
store i32 %20, i32* %5
%21 = load i32, i32* %3
%22 = lshr i32 %21, 20
%23 = load i32, i32* %5
%24 = add i32 %23, %22
store i32 %24, i32* %5
%25 = load i32, i32* %3
%26 = lshr i32 %25, 28
%27 = load i32, i32* %5
%28 = xor i32 %27, %26
store i32 %28, i32* %5
%29 = load i32, i32* %4
%30 = load i32, i32* %5
%31 = add i32 %30, %29
store i32 %31, i32* %5
%32 = load i32, i32* %4
%33 = lshr i32 %32, 5
%34 = load i32, i32* %5
%35 = xor i32 %34, %33
store i32 %35, i32* %5
%36 = load i32, i32* %5
ret i32 %36
}

LLVM IR (-O2):
define i32 @hash(i32 %0, i32 %1) {
%3 = lshr i32 %0, 4
%4 = xor i32 %3, %0
%5 = shl i32 %0, 3
%6 = xor i32 %4, %5
%7 = lshr i32 %0, 12
%8 = xor i32 %6, %7
%9 = lshr i32 %0, 20
%10 = add i32 %8, %9
%11 = lshr i32 %0, 28
%12 = xor i32 %10, %11
%13 = add i32 %12, %1
%14 = lshr i32 %1, 5
%15 = xor i32 %13, %14
ret i32 %15
}
/* Variables and functions */
int is_alphanumeric_char(char);
int is_path_char(char val) {
  if (val == '.' || val == '_' || val == '-' || val == '/') {
    return 1;
  }
  return is_alphanumeric_char(val);
}


x86 assembly (clang, -O0):
<is_path_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2e,%eax
je     1152 <is_path_char+0x42>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
je     1152 <is_path_char+0x42>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
je     1152 <is_path_char+0x42>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    115e <is_path_char+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    116a <is_path_char+0x5a>
movsbl -0x5(%rbp),%edi
call   1030 <is_alphanumeric_char@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_path_char>:
lea    -0x2d(%rdi),%eax
cmp    $0x32,%al
ja     1130 <is_path_char+0x20>
movzbl %al,%eax
movabs $0x4000000000007,%rcx
bt     %rax,%rcx
jae    1130 <is_path_char+0x20>
mov    $0x1,%eax
ret
movsbl %dil,%edi
jmp    1030 <is_alphanumeric_char@plt>

LLVM IR (-O0):
define i32 @is_path_char(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 eq i32 %5, 46
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 95
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 45
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 47
br i1 %18, label %19, label %20
19: ; preds = %15, %11, %7, %1
store i32 1, i32* %2
br label %23
20: ; preds = %15
%21 = load i8, i8* %3
%22 = call i32 @is_alphanumeric_char(i8 signext %21)
store i32 %22, i32* %2
br label %23
23: ; preds = %20, %19
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @is_path_char(i8 signext %0) {
switch i8 %0, label %2 [
i8 95, label %4
i8 47, label %4
i8 46, label %4
i8 45, label %4
]
2: ; preds = %1
%3 = tail call i32 @is_alphanumeric_char(i8 signext %0)
br label %4
4: ; preds = %1, %1, %1, %1, %2
%5 = phi i32 [ %3, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
void delenv(name) char *name;
{}


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

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

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

LLVM IR (-O2):
define void @delenv(i8* nocapture %0) {
ret void
}
/* Variables and functions */
double __infer_nondet_double();
double atan(double x) { return __infer_nondet_double(); }


x86 assembly (clang, -O0):
<atan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_double@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @atan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double (...) @__infer_nondet_double()
ret double %3
}

LLVM IR (-O2):
define double @atan(double %0) {
%2 = tail call double (...) @__infer_nondet_double()
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ one;
typedef int /*<<< orphan*/ evutil_socket_t;

/* Variables and functions */
int /*<<< orphan*/ IPPROTO_TCP;
int /*<<< orphan*/ TCP_NODELAY;
int /*<<< orphan*/ setsockopt(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/, int *, int);
void set_tcp_no_delay(evutil_socket_t fd) {
  int one = 1;
  setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
}


x86 assembly (clang, -O0):
<set_tcp_no_delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_tcp_no_delay>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2ebf(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rax
ret

LLVM IR (-O0):
@IPPROTO_TCP = global i32 0
@TCP_NODELAY = global i32 0
define void @set_tcp_no_delay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @IPPROTO_TCP
%6 = load i32, i32* @TCP_NODELAY
%7 = call i32 @setsockopt(i32 %4, i32 %5, i32 %6, i32* %3, i32 4)
ret void
}

LLVM IR (-O2):
@IPPROTO_TCP = global i32 0
@TCP_NODELAY = global i32 0
define void @set_tcp_no_delay(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @IPPROTO_TCP
%5 = load i32, i32* @TCP_NODELAY
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i32* %2, i32 4)
ret void
}
unsigned long get4l(const unsigned char *attr, int p) {
  int i;
  unsigned long v;
  v = 0;
  for (i = 0; i < 4; i++)
    v += (attr[p + i] & 255L) << (8 * i);
  return (v);
}


x86 assembly (clang, -O0):
<get4l>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    115c <get4l+0x5c>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%rax
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
mov    %ecx,%ecx
shl    %cl,%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111a <get4l+0x1a>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get4l>:
movslq %esi,%rax
mov    (%rdi,%rax,1),%eax
ret

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

LLVM IR (-O2):
define i64 @get4l(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = zext i8 %5 to i64
%7 = add nsw i64 %3, 1
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i64
%11 = shl nuw nsw i64 %10, 8
%12 = or i64 %11, %6
%13 = add nsw i64 %3, 2
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = zext i8 %15 to i64
%17 = shl nuw nsw i64 %16, 16
%18 = or i64 %17, %12
%19 = add nsw i64 %3, 3
%20 = getelementptr inbounds i8, i8* %0, i64 %19
%21 = load i8, i8* %20
%22 = zext i8 %21 to i64
%23 = shl nuw nsw i64 %22, 24
%24 = or i64 %23, %18
ret i64 %24
}
/* Variables and functions */
int /*<<< orphan*/ lcdDrawSolidFilledRect(int /*<<< orphan*/,
                                          int /*<<< orphan*/, int, int,
                                          int /*<<< orphan*/);
void lcdClear() { lcdDrawSolidFilledRect(0, 0, 480, 272, 0); }


x86 assembly (clang, -O0):
<lcdClear>:
push   %rbp
mov    %rsp,%rbp
xor    %r8d,%r8d
mov    $0x1e0,%edx
mov    $0x110,%ecx
mov    %r8d,%edi
mov    %r8d,%esi
call   1030 <lcdDrawSolidFilledRect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcdClear>:
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1e0,%edx
mov    $0x110,%ecx
xor    %r8d,%r8d
jmp    1030 <lcdDrawSolidFilledRect@plt>

LLVM IR (-O0):
define void @lcdClear() {
%1 = call i32 @lcdDrawSolidFilledRect(i32 0, i32 0, i32 480, i32 272, i32 0)
ret void
}

LLVM IR (-O2):
define void @lcdClear() {
%1 = tail call i32 @lcdDrawSolidFilledRect(i32 0, i32 0, i32 480, i32 272, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 6, b = 5, c;
  c = a > b;
  printf("%d", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
long double __cargl(__complex__ long double x) {
  return __atan2l(__imag__ x, __real__ x);
}


x86 assembly (clang, -O0):
<__cargl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0x10(%rbp),%rax
fldt   0x10(%rax)
fldt   (%rax)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
xor    %eax,%eax
call   1030 <__atan2l@plt>
mov    %eax,-0x4(%rbp)
fildl  -0x4(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cargl>:
sub    $0x28,%rsp
fldt   0x40(%rsp)
fldt   0x30(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
xor    %eax,%eax
call   1030 <__atan2l@plt>
mov    %eax,0x24(%rsp)
fildl  0x24(%rsp)
add    $0x28,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @__cargl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%3 = load x86_fp80, x86_fp80* %2
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%5 = load x86_fp80, x86_fp80* %4
%6 = call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @__atan2l to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %3, x86_fp80 %5)
%7 = sitofp i32 %6 to x86_fp80
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @__cargl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%3 = load x86_fp80, x86_fp80* %2
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%5 = load x86_fp80, x86_fp80* %4
%6 = tail call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @__atan2l to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %3, x86_fp80 %5)
%7 = sitofp i32 %6 to x86_fp80
ret x86_fp80 %7
}
void rotate_wrap(int *nums, int i, int j) {
  int temp;
  while (i < j) {
    temp = nums[i];
    nums[i] = nums[j];
    nums[j] = temp;
    ++i;
    --j;
  }
}


x86 assembly (clang, -O0):
<rotate_wrap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1163 <rotate_wrap+0x63>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    110e <rotate_wrap+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate_wrap>:
cmp    %edx,%esi
jge    112e <rotate_wrap+0x2e>
movslq %esi,%rax
movslq %edx,%rcx
add    $0x1,%rax
xchg   %ax,%ax
mov    -0x4(%rdi,%rax,4),%edx
mov    (%rdi,%rcx,4),%esi
mov    %esi,-0x4(%rdi,%rax,4)
mov    %edx,(%rdi,%rcx,4)
add    $0xffffffffffffffff,%rcx
lea    0x1(%rax),%rdx
cmp    %rcx,%rax
mov    %rdx,%rax
jl     1110 <rotate_wrap+0x10>
ret

LLVM IR (-O0):
define void @rotate_wrap(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
br label %8
8: ; preds = %12, %3
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %36
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
store i32 %17, i32* %7
%18 = load i32*, i32** %4
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = load i32, i32* %21
%23 = load i32*, i32** %4
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
%27 = load i32, i32* %7
%28 = load i32*, i32** %4
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %28, i64 %30
store i32 %27, i32* %31
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %5
%34 = load i32, i32* %6
%35 = add nsw i32 %34, -1
store i32 %35, i32* %6
br label %8
36: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @rotate_wrap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = sext i32 %2 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %7, %5 ], [ %16, %8 ]
%10 = phi i64 [ %6, %5 ], [ %15, %8 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %0, i64 %9
%14 = load i32, i32* %13
store i32 %14, i32* %11
store i32 %12, i32* %13
%15 = add nsw i64 %10, 1
%16 = add nsw i64 %9, -1
%17 = icmp slt i64 %15, %16
br i1 %17, label %8, label %18
18: ; preds = %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ r3adds(double *, double *, double);
double r3dot(double *, double *);
int /*<<< orphan*/ r3scal(double *, double);
void A_grad_z2r(double g[3], double z[3], double r1) {
  double s = r3dot(z, g);
  r3adds(g, z, -s);
  r3scal(g, r1);
  return;
}


x86 assembly (clang, -O0):
<A_grad_z2r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <r3dot@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1040 <r3adds@plt>
mov    -0x8(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
call   1050 <r3scal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<A_grad_z2r>:
push   %r14
push   %rbx
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1030 <r3dot@plt>
xorps  0xeaf(%rip),%xmm0
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <r3adds@plt>
mov    %rbx,%rdi
movsd  (%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <r3scal@plt>

LLVM IR (-O0):
define void @A_grad_z2r(double* %0, double* %1, double %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
%7 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double %2, double* %6
%8 = load double*, double** %5
%9 = load double*, double** %4
%10 = call double @r3dot(double* %8, double* %9)
store double %10, double* %7
%11 = load double*, double** %4
%12 = load double*, double** %5
%13 = load double, double* %7
%14 = fneg double %13
%15 = call i32 @r3adds(double* %11, double* %12, double %14)
%16 = load double*, double** %4
%17 = load double, double* %6
%18 = call i32 @r3scal(double* %16, double %17)
ret void
}

LLVM IR (-O2):
define void @A_grad_z2r(double* %0, double* %1, double %2) {
%4 = tail call double @r3dot(double* %1, double* %0)
%5 = fneg double %4
%6 = tail call i32 @r3adds(double* %0, double* %1, double %5)
%7 = tail call i32 @r3scal(double* %0, double %2)
ret void
}
void hostapd_ubus_add_bss(struct hostapd_data *hapd) {}


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

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

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

LLVM IR (-O2):
%struct.hostapd_data = type opaque
define void @hostapd_ubus_add_bss(%struct.hostapd_data* nocapture %0) {
ret void
}
int btic2f_log2d(int val) {
  int v, e;
  v = val;
  e = 0;
  while (v > 1) {
    v = v >> 1;
    e++;
  }
  return (e);
}


x86 assembly (clang, -O0):
<btic2f_log2d>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1135 <btic2f_log2d+0x35>
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1114 <btic2f_log2d+0x14>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<btic2f_log2d>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     111c <btic2f_log2d+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <btic2f_log2d+0x10>
ret

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

LLVM IR (-O2):
define i32 @btic2f_log2d(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ugt i32 %5, 3
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
char gettextcolor(unsigned char forecolor, unsigned char backcolor) {
  return (backcolor << 4) | (forecolor & 0x0F);
}


x86 assembly (clang, -O0):
<gettextcolor>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x4,%eax
movzbl -0x1(%rbp),%ecx
and    $0xf,%ecx
or     %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettextcolor>:
shl    $0x4,%sil
and    $0xf,%dil
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define signext i8 @gettextcolor(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 4
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = and i32 %9, 15
%11 = or i32 %7, %10
%12 = trunc i32 %11 to i8
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @gettextcolor(i8 zeroext %0, i8 zeroext %1) {
%3 = shl i8 %1, 4
%4 = and i8 %0, 15
%5 = or i8 %3, %4
ret i8 %5
}
/* Variables and functions */
unsigned char VIM_HIF_GetReg8(int);
unsigned char VIM_MARB_GetModeCtrl0(void) {
  return VIM_HIF_GetReg8((0x2400 + 0x002));
}


x86 assembly (clang, -O0):
<VIM_MARB_GetModeCtrl0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2402,%edi
call   1030 <VIM_HIF_GetReg8@plt>
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_MARB_GetModeCtrl0>:
mov    $0x2402,%edi
jmp    1030 <VIM_HIF_GetReg8@plt>

LLVM IR (-O0):
define zeroext i8 @VIM_MARB_GetModeCtrl0() {
%1 = call zeroext i8 @VIM_HIF_GetReg8(i32 9218)
ret i8 %1
}

LLVM IR (-O2):
define zeroext i8 @VIM_MARB_GetModeCtrl0() {
%1 = tail call zeroext i8 @VIM_HIF_GetReg8(i32 9218)
ret i8 %1
}
int test_imm_2Euint16_mem(unsigned short *val) {
  return ((*val) & (-0x2E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Euint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffffd2,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Euint16_mem>:
movzwl (%rdi),%eax
test   $0xffd2,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_2Euint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -46
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void foo323() {}


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

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

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

LLVM IR (-O2):
define void @foo323() {
ret void
}
void I2CDMARxEventDisable(unsigned int baseAdd) {
  (*((volatile unsigned int *)(baseAdd + (0x94)))) &= ~((0x00008000u));
  (*((volatile unsigned int *)(baseAdd + (0x40)))) = ((0x00000001u));
}


x86 assembly (clang, -O0):
<I2CDMARxEventDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x94,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xffff7fff,%ecx
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x40,%eax
mov    %eax,%eax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CDMARxEventDisable>:
lea    0x94(%rdi),%eax
andl   $0xffff7fff,(%rax)
add    $0x40,%edi
movl   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @I2CDMARxEventDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 148
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -32769
store volatile i32 %8, i32* %6
%9 = load i32, i32* %2
%10 = add i32 %9, 64
%11 = zext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
store volatile i32 1, i32* %12
ret void
}

LLVM IR (-O2):
define void @I2CDMARxEventDisable(i32 %0) {
%2 = add i32 %0, 148
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, -32769
store volatile i32 %6, i32* %4
%7 = add i32 %0, 64
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store volatile i32 1, i32* %9
ret void
}
int ph1_pro4_sbc_init(const struct uniphier_board_data *bd) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.uniphier_board_data = type opaque
define i32 @ph1_pro4_sbc_init(%struct.uniphier_board_data* nocapture readnone %0) {
ret i32 0
}
void hop_me(void) {}


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

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

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

LLVM IR (-O2):
define void @hop_me() {
ret void
}
void sys_yield(void) { asm volatile("int %0\n" : : "i"(50) : "cc", "memory"); }


x86 assembly (clang, -O0):
<sys_yield>:
push   %rbp
mov    %rsp,%rbp
int    $0x32
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_yield>:
int    $0x32
ret

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

LLVM IR (-O2):
define void @sys_yield() {
tail call void asm sideeffect "int $0\0A", "i,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 50)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(int argc, char *argv[]) {
  printf("usage:  bingham_lookup <z1> <z2> <z3>\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [39 x i8] c"usage: bingham_lookup <z1> <z2> <z3>\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [38 x i8] c"usage: bingham_lookup <z1> <z2> <z3>\00"
define void @usage(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t zip_bitrev(const uint32_t a) {
  uint32_t r, b = a;
  r = 0;
  for (int i = 0; i < 32; i++) {
    r = (r << 1) | (b & 1);
    b >>= 1;
  }
  return r;
}


x86 assembly (clang, -O0):
<zip_bitrev>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x20,-0x10(%rbp)
jge    114d <zip_bitrev+0x4d>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    -0xc(%rbp),%ecx
and    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111b <zip_bitrev+0x1b>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zip_bitrev>:
xor    %eax,%eax
mov    $0x20,%ecx
nopw   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
shl    $0x2,%edx
lea    (%rdx,%rax,8),%eax
mov    %edi,%edx
and    $0x2,%edx
or     %eax,%edx
mov    %edi,%eax
shr    $0x2,%eax
and    $0x1,%eax
or     %edx,%eax
mov    %edi,%edx
shr    $0x3,%edx
and    $0x1,%edx
lea    (%rdx,%rax,2),%eax
sar    $0x4,%edi
add    $0xfffffffc,%ecx
jne    1110 <zip_bitrev+0x10>
ret

LLVM IR (-O0):
define i32 @zip_bitrev(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
store i32 %6, i32* %4
store i32 0, i32* %3
store i32 0, i32* %5
br label %7
7: ; preds = %18, %1
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 32
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = load i32, i32* %3
%12 = shl i32 %11, 1
%13 = load i32, i32* %4
%14 = and i32 %13, 1
%15 = or i32 %12, %14
store i32 %15, i32* %3
%16 = load i32, i32* %4
%17 = ashr i32 %16, 1
store i32 %17, i32* %4
br label %18
18: ; preds = %10
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %7
21: ; preds = %7
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @zip_bitrev(i32 %0) {
br label %3
2: ; preds = %3
ret i32 %19
3: ; preds = %3, %1
%4 = phi i32 [ 0, %1 ], [ %21, %3 ]
%5 = phi i32 [ %0, %1 ], [ %20, %3 ]
%6 = phi i32 [ 0, %1 ], [ %19, %3 ]
%7 = shl i32 %6, 3
%8 = shl i32 %5, 2
%9 = and i32 %8, 4
%10 = or i32 %7, %9
%11 = and i32 %5, 2
%12 = or i32 %11, %10
%13 = lshr i32 %5, 2
%14 = and i32 %13, 1
%15 = or i32 %14, %12
%16 = lshr i32 %5, 3
%17 = shl i32 %15, 1
%18 = and i32 %16, 1
%19 = or i32 %18, %17
%20 = ashr i32 %5, 4
%21 = add nuw nsw i32 %4, 4
%22 = icmp eq i32 %21, 32
br i1 %22, label %2, label %3
}
/* Variables and functions */
void ext_status_read(char **buffer, size_t *buffer_size,
                     bool *needs_deallocation) {}


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

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

LLVM IR (-O0):
define void @ext_status_read(i8** %0, i64* %1, i32* %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i32*
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
define void @ext_status_read(i8** nocapture %0, i64* nocapture %1, i32* nocapture %2) {
ret void
}
/* Variables and functions */
double cos(double);
double fun(double x) { return cos(x / 2) - x; }


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <cos@plt>
subsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
push   %rax
movapd %xmm0,%xmm1
movsd  %xmm0,(%rsp)
movsd  0xede(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <cos@plt>
subsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @fun(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 2.000000e+00
%5 = call double @cos(double %4)
%6 = load double, double* %2
%7 = fsub double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @fun(double %0) {
%2 = fmul double %0, 5.000000e-01
%3 = tail call double @cos(double %2)
%4 = fsub double %3, %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
char *strtok(char *, char const *);
char *trio_tokenize(char *string, const char *delimiters) {
  assert(delimiters);
  return strtok(string, delimiters);
}


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

x86 assembly (clang, -O2):
<trio_tokenize>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <assert@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strtok@plt>

LLVM IR (-O0):
define i8* @trio_tokenize(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @assert(i8* %5)
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i8* @strtok(i8* %7, i8* %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @trio_tokenize(i8* %0, i8* %1) {
%3 = tail call i32 @assert(i8* %1)
%4 = tail call i8* @strtok(i8* %0, i8* %1)
ret i8* %4
}
/* Variables and functions */
size_t strlen(char const *string) {
  int length;
  for (length = 0; *string++ != '\0';)
    length += 1;
  return length;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1138 <strlen+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
movslq -0xc(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4
%12 = zext i32 %8 to i64
br label %13
13: ; preds = %11, %1
%14 = phi i64 [ 0, %1 ], [ %12, %11 ]
ret i64 %14
}
void rsync_patch_free(struct rsync_patch *rp) { rp = rp; }


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

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

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

LLVM IR (-O2):
%struct.rsync_patch = type opaque
define void @rsync_patch_free(%struct.rsync_patch* nocapture %0) {
ret void
}
void lgtd_lifx_wire_encode_light_color(
    struct lgtd_lifx_packet_light_color *pkt) {
  (void)pkt;
}


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

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

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

LLVM IR (-O2):
%struct.lgtd_lifx_packet_light_color = type opaque
define void @lgtd_lifx_wire_encode_light_color(%struct.lgtd_lifx_packet_light_color* nocapture %0) {
ret void
}
/* Variables and functions */
int fun(int *);
int /*<<< orphan*/ printf(char *, int, int);
void main() {
  int n;
  printf("%d %d", n, fun(&n));
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <fun@plt>
lea    0xece(%rip),%rdi
mov    %eax,%edx
call   1040 <printf@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @fun(i32* %1)
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 undef, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void fprintf() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


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

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

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

LLVM IR (-O2):
define void @fprintf() {
%1 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}
void DoCodeNop(void) {}


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

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

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

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

/* Variables and functions */
uint32_t s0(uint32_t w) {
  return (((w) >> (7)) | ((w) << (32 - (7)))) ^
         (((w) >> (18)) | ((w) << (32 - (18)))) ^ (w >> 3);
}


x86 assembly (clang, -O0):
<s0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x7,%eax
mov    -0x4(%rbp),%ecx
shl    $0x19,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x12,%ecx
mov    -0x4(%rbp),%edx
shl    $0xe,%edx
or     %edx,%ecx
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x3,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<s0>:
mov    %edi,%eax
sar    $0x7,%eax
mov    %edi,%ecx
shl    $0x19,%ecx
or     %eax,%ecx
mov    %edi,%edx
sar    $0x12,%edx
mov    %edi,%eax
shl    $0xe,%eax
or     %edx,%eax
sar    $0x3,%edi
xor    %edi,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @s0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 7
%5 = load i32, i32* %2
%6 = shl i32 %5, 25
%7 = or i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 18
%10 = load i32, i32* %2
%11 = shl i32 %10, 14
%12 = or i32 %9, %11
%13 = xor i32 %7, %12
%14 = load i32, i32* %2
%15 = ashr i32 %14, 3
%16 = xor i32 %13, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @s0(i32 %0) {
%2 = ashr i32 %0, 7
%3 = shl i32 %0, 25
%4 = or i32 %2, %3
%5 = ashr i32 %0, 18
%6 = shl i32 %0, 14
%7 = or i32 %5, %6
%8 = ashr i32 %0, 3
%9 = xor i32 %7, %8
%10 = xor i32 %9, %4
ret i32 %10
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_multprec_size_limit(int k, int *szl) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(603, &k, szl, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_multprec_size_limit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x25b,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_multprec_size_limit>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x25b,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_multprec_size_limit(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc4c(i32 603, i32* %3, i32* %7, double* %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @syscon_multprec_size_limit(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 603, i32* %3, i32* %1, double* undef, i32 0)
ret i32 %4
}