xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ IPPROTO_IP;
int /*<<< orphan*/ IP_MULTICAST_TTL;
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, char *, int);
int socket_mcttl4(int s, char TTL) {
  return (setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &TTL, sizeof TTL));
}


x86 assembly (clang, -O0):
<socket_mcttl4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
lea    -0x5(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_mcttl4>:
push   %rax
mov    %sil,0x7(%rsp)
mov    0x2ecb(%rip),%rax
mov    (%rax),%esi
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
lea    0x7(%rsp),%rcx
mov    $0x1,%r8d
call   1030 <setsockopt@plt>
pop    %rcx
ret

LLVM IR (-O0):
@IPPROTO_IP = global i32 0
@IP_MULTICAST_TTL = global i32 0
define i32 @socket_mcttl4(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = load i32, i32* @IPPROTO_IP
%7 = load i32, i32* @IP_MULTICAST_TTL
%8 = call i32 @setsockopt(i32 %5, i32 %6, i32 %7, i8* %4, i32 1)
ret i32 %8
}

LLVM IR (-O2):
@IPPROTO_IP = global i32 0
@IP_MULTICAST_TTL = global i32 0
define i32 @socket_mcttl4(i32 %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = load i32, i32* @IPPROTO_IP
%5 = load i32, i32* @IP_MULTICAST_TTL
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i8* %3, i32 1)
ret i32 %6
}
unsigned int cidr_to_netmask(const unsigned int cidr) {
  return (cidr == 0) ? 0 : (0xFFFFFFFF - (1 << (32 - cidr)) + 1);
}


x86 assembly (clang, -O0):
<cidr_to_netmask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    111b <cidr_to_netmask+0x1b>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1139 <cidr_to_netmask+0x39>
mov    $0x20,%ecx
sub    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    $0xffffffff,%eax
sub    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cidr_to_netmask>:
mov    %edi,%ecx
neg    %cl
mov    $0xffffffff,%eax
shl    %cl,%eax
test   %edi,%edi
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @cidr_to_netmask(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = sub i32 32, %0
%4 = shl nsw i32 -1, %3
%5 = select i1 %2, i32 0, i32 %4
ret i32 %5
}
int test_imm_90uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x90 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_90uint64_lowword_mem>:
testb  $0x90,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_90uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 144
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int foo(int, int);
int loop_no_dep2(int k) {
  int p = 0;
  int t = foo(p, k);
  for (int i = 0; i < 100; i++) {
    p++;
  }
  return p;
}


x86 assembly (clang, -O0):
<loop_no_dep2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <foo@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x64,-0x10(%rbp)
jge    1158 <loop_no_dep2+0x48>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1137 <loop_no_dep2+0x27>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop_no_dep2>:
push   %rax
mov    %edi,%esi
xor    %edi,%edi
call   1030 <foo@plt>
mov    $0x64,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @loop_no_dep2(i32 %0) {
%2 = tail call i32 @foo(i32 0, i32 %0)
ret i32 100
}
/* Type definitions */
struct wpa_ctrl {
  int dummy;
};

/* Variables and functions */
int wpa_ctrl_command(struct wpa_ctrl *, char *);
int wpa_cli_cmd_logon(struct wpa_ctrl *ctrl, int argc, char *argv[]) {
  return wpa_ctrl_command(ctrl, "LOGON");
}


x86 assembly (clang, -O0):
<wpa_cli_cmd_logon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed2(%rip),%rsi
call   1030 <wpa_ctrl_command@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_cli_cmd_logon>:
lea    0xee9(%rip),%rsi
jmp    1030 <wpa_ctrl_command@plt>

LLVM IR (-O0):
%struct.wpa_ctrl = type { i32 }
@.str = [6 x i8] c"LOGON\00"
define i32 @wpa_cli_cmd_logon(%struct.wpa_ctrl* %0, i32 %1, i8** %2) {
%4 = alloca %struct.wpa_ctrl*
%5 = alloca i32
%6 = alloca i8**
store %struct.wpa_ctrl* %0, %struct.wpa_ctrl** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load %struct.wpa_ctrl*, %struct.wpa_ctrl** %4
%8 = call i32 @wpa_ctrl_command(%struct.wpa_ctrl* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %8
}

LLVM IR (-O2):
%struct.wpa_ctrl = type { i32 }
@.str = [6 x i8] c"LOGON\00"
define i32 @wpa_cli_cmd_logon(%struct.wpa_ctrl* %0, i32 %1, i8** nocapture readnone %2) {
%4 = tail call i32 @wpa_ctrl_command(%struct.wpa_ctrl* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
void __itt_enable_attach_init_3_0(void) {}


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

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

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

LLVM IR (-O2):
define void @__itt_enable_attach_init_3_0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testBoardColumn();
int /*<<< orphan*/ testBoardCoord();
int /*<<< orphan*/ testBoardCoordString();
int /*<<< orphan*/ testNeighbourhood();
void testboardcoord(void) {
  testBoardColumn();
  testBoardCoordString();
  testBoardCoord();
  testNeighbourhood();
}


x86 assembly (clang, -O0):
<testboardcoord>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <testBoardColumn@plt>
mov    $0x0,%al
call   1040 <testBoardCoordString@plt>
mov    $0x0,%al
call   1060 <testBoardCoord@plt>
mov    $0x0,%al
call   1050 <testNeighbourhood@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testboardcoord>:
push   %rax
xor    %eax,%eax
call   1030 <testBoardColumn@plt>
xor    %eax,%eax
call   1040 <testBoardCoordString@plt>
xor    %eax,%eax
call   1060 <testBoardCoord@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <testNeighbourhood@plt>

LLVM IR (-O0):
define void @testboardcoord() {
%1 = call i32 (...) @testBoardColumn()
%2 = call i32 (...) @testBoardCoordString()
%3 = call i32 (...) @testBoardCoord()
%4 = call i32 (...) @testNeighbourhood()
ret void
}

LLVM IR (-O2):
define void @testboardcoord() {
%1 = tail call i32 (...) @testBoardColumn()
%2 = tail call i32 (...) @testBoardCoordString()
%3 = tail call i32 (...) @testBoardCoord()
%4 = tail call i32 (...) @testNeighbourhood()
ret void
}
int abs(int a) { return a > 0 ? a : -a; }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    111c <abs+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int strcmp(char const *, char const *);
int nstrcmp(const char *a, const char *b) {
  if (a == NULL || b == NULL)
    return (a == NULL && b == NULL) ? 0 : 1;
  return strcmp(a, b);
}


x86 assembly (clang, -O0):
<nstrcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <nstrcmp+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1169 <nstrcmp+0x59>
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x19(%rbp)
jne    1151 <nstrcmp+0x41>
cmpq   $0x0,-0x18(%rbp)
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%dl
mov    $0x1,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1179 <nstrcmp+0x69>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nstrcmp>:
test   %rdi,%rdi
je     111f <nstrcmp+0xf>
test   %rsi,%rsi
je     111f <nstrcmp+0xf>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
or     %rsi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @nstrcmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %21
11: ; preds = %8, %2
%12 = load i8*, i8** %4
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i8*, i8** %5
%16 = icmp eq i8* %15, null
br label %17
17: ; preds = %14, %11
%18 = phi i1 [ false, %11 ], [ %16, %14 ]
%19 = zext i1 %18 to i64
%20 = select i1 %18, i32 0, i32 1
store i32 %20, i32* %3
br label %25
21: ; preds = %8
%22 = load i8*, i8** %4
%23 = load i8*, i8** %5
%24 = call i32 @strcmp(i8* %22, i8* %23)
store i32 %24, i32* %3
br label %25
25: ; preds = %21, %17
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @nstrcmp(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = and i1 %3, %4
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
br label %12
10: ; preds = %2
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
br label %12
12: ; preds = %10, %6
%13 = phi i32 [ %9, %6 ], [ %11, %10 ]
ret i32 %13
}
int c056(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c056() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pr(int /*<<< orphan*/);
int /*<<< orphan*/ runtime_stringValue(long);
void prStr(long s) { pr(runtime_stringValue(s)); }


x86 assembly (clang, -O0):
<prStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <runtime_stringValue@plt>
mov    %eax,%edi
call   1040 <pr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prStr>:
push   %rax
call   1030 <runtime_stringValue@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pr@plt>

LLVM IR (-O0):
define void @prStr(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @runtime_stringValue(i64 %3)
%5 = call i32 @pr(i32 %4)
ret void
}

LLVM IR (-O2):
define void @prStr(i64 %0) {
%2 = tail call i32 @runtime_stringValue(i64 %0)
%3 = tail call i32 @pr(i32 %2)
ret void
}
/* Variables and functions */
int randomizedPartition(int *, int, int);
void randomizedQuicksort(int *a, int p, int r) {
  int q;
  if (p < r) {
    q = randomizedPartition(a, p, r);
    randomizedQuicksort(a, p, q - 1);
    randomizedQuicksort(a, q + 1, r);
  }
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @g_get_screen_size(i32* nocapture %0, i32* nocapture %1) {
ret void
}
/* Variables and functions */
int I2C_Read(int, int, unsigned char *);
int STC3115_ReadBytes(unsigned char *data, int RegAddress, int nbr) {
  int res;
  res = I2C_Read(nbr, RegAddress, data);
  return (res);
}


x86 assembly (clang, -O0):
<STC3115_ReadBytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
call   1030 <I2C_Read@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<STC3115_ReadBytes>:
mov    %rdi,%rax
mov    %edx,%edi
mov    %rax,%rdx
jmp    1030 <I2C_Read@plt>

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

LLVM IR (-O2):
define i32 @STC3115_ReadBytes(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @I2C_Read(i32 %2, i32 %1, i8* %0)
ret i32 %4
}
int test_00(float val) {
  char valbytes[sizeof(float)];
  __builtin_memcpy(valbytes, &val, sizeof(float));
  int result;
  __builtin_memcpy(&result, valbytes, sizeof(int));
  return result;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
movd   %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @test_00(float %0) {
%2 = alloca float
%3 = alloca [4 x i8]
%4 = alloca i32
store float %0, float* %2
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%6 = bitcast float* %2 to i8*
%7 = bitcast i32* %4 to i8*
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_00(float %0) {
%2 = bitcast float %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void print_error(const char *message) { fprintf(stderr, "%s\n", message); }


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

x86 assembly (clang, -O2):
<print_error>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @print_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int ext_flags;
};
typedef TYPE_1__ X509V3_EXT_METHOD;

/* Variables and functions */
int /*<<< orphan*/ OPENSSL_free(TYPE_1__ *);
int X509V3_EXT_DYNAMIC;
void ext_list_free(X509V3_EXT_METHOD *ext) {
  if (ext->ext_flags & X509V3_EXT_DYNAMIC)
    OPENSSL_free(ext);
}


x86 assembly (clang, -O0):
<ext_list_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2eaf(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     113d <ext_list_free+0x2d>
mov    -0x8(%rbp),%rdi
call   1030 <OPENSSL_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext_list_free>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
test   %eax,(%rdi)
je     1122 <ext_list_free+0x12>
jmp    1030 <OPENSSL_free@plt>
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32 }
@X509V3_EXT_DYNAMIC = global i32 0
define void @ext_list_free(%struct.TYPE_4__* %0) {
%2 = alloca %struct.TYPE_4__*
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %2
%3 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%4 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = load i32, i32* @X509V3_EXT_DYNAMIC
%7 = and i32 %5, %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%11 = call i32 @OPENSSL_free(%struct.TYPE_4__* %10)
br label %12
12: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32 }
@X509V3_EXT_DYNAMIC = global i32 0
define void @ext_list_free(%struct.TYPE_4__* %0) {
%2 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = load i32, i32* @X509V3_EXT_DYNAMIC
%5 = and i32 %4, %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @OPENSSL_free(%struct.TYPE_4__* %0)
br label %9
9: ; preds = %7, %1
ret void
}
__attribute__((weak)) int _isatty(int file) {
  file = file;
  return -1;
}


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

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

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

LLVM IR (-O2):
define weak i32 @_isatty(i32 %0) {
ret i32 -1
}
/* Type definitions */
struct cpufreq_policy {
  int dummy;
};

/* Variables and functions */
int ENOSYS;
int sysfs_set_policy(unsigned int cpu, struct cpufreq_policy *policy) {
  return -ENOSYS;
}


x86 assembly (clang, -O0):
<sysfs_set_policy>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ed4(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysfs_set_policy>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
%struct.cpufreq_policy = type { i32 }
@ENOSYS = global i32 0
define i32 @sysfs_set_policy(i32 %0, %struct.cpufreq_policy* %1) {
%3 = alloca i32
%4 = alloca %struct.cpufreq_policy*
store i32 %0, i32* %3
store %struct.cpufreq_policy* %1, %struct.cpufreq_policy** %4
%5 = load i32, i32* @ENOSYS
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
%struct.cpufreq_policy = type { i32 }
@ENOSYS = global i32 0
define i32 @sysfs_set_policy(i32 %0, %struct.cpufreq_policy* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ sprintf(char *, char *, int);
int strlen(char *);
int get_int_len(int value) {
  char n_str[2048];
  memset(n_str, '\0', 2048);
  sprintf(n_str, "%d", value);
  return strlen(n_str);
}


x86 assembly (clang, -O0):
<get_int_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x810(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1040 <memset@plt>
lea    -0x810(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xe9e(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x810(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int_len>:
push   %r14
push   %rbx
sub    $0x808,%rsp
mov    %edi,%ebx
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1040 <memset@plt>
lea    0xeab(%rip),%rsi
mov    %r14,%rdi
mov    %ebx,%edx
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    $0x808,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @get_int_len(i32 %0) {
%2 = alloca i32
%3 = alloca [2048 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i8 signext 0, i32 2048)
%6 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%7 = load i32, i32* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%10 = call i32 @strlen(i8* %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @get_int_len(i32 %0) {
%2 = alloca [2048 x i8]
%3 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i8 signext 0, i32 2048)
%5 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = call i32 @strlen(i8* %3)
ret i32 %6
}
/* Type definitions */
struct pdeq {
  int dummy;
};
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *);
void pdeq_push_error(struct list_head *e, struct pdeq *d) {
  printf("pdeq_push_error()\n");
  abort();
}


x86 assembly (clang, -O0):
<pdeq_push_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<pdeq_push_error>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
%struct.pdeq = type { i32 }
@.str = [19 x i8] c"pdeq_push_error()\0A\00"
define void @pdeq_push_error(%struct.list_head* %0, %struct.pdeq* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.pdeq*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.pdeq* %1, %struct.pdeq** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
%struct.pdeq = type { i32 }
@str = [18 x i8] c"pdeq_push_error()\00"
define void @pdeq_push_error(%struct.list_head* nocapture readnone %0, %struct.pdeq* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ close(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  FILE *f = fopen("check_openpf2.c", "rb");
  if (f == NULL)
    abort();
  close(f);
  printf("pass\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rdi
lea    0xeac(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117f <main+0x3f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rdi
call   1050 <close@plt>
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1060 <fopen@plt>
test   %rax,%rax
je     1171 <main+0x31>
mov    %rax,%rdi
call   1050 <close@plt>
lea    0xeab(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"check_openpf2.c\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [6 x i8] c"pass\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %7, i32** %6
%8 = load i32*, i32** %6
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %2
%13 = load i32*, i32** %6
%14 = call i32 @close(i32* %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"check_openpf2.c\00"
@.str.1 = [3 x i8] c"rb\00"
@str = [5 x i8] c"pass\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
%8 = tail call i32 @close(i32* %3)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef unsigned long long uint16_t;

/* Variables and functions */
int hweight15(uint16_t a) {
  return ((a * 35185445863425ULL) & 76861433640456465ULL) % 15;
}


x86 assembly (clang, -O0):
<hweight15>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0x200040008001,%rax
imul   -0x8(%rbp),%rax
movabs $0x111111111111111,%rcx
11 11 01
and    %rcx,%rax
mov    $0xf,%ecx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hweight15>:
movabs $0x200040008001,%rax
imul   %rdi,%rax
movabs $0x111111111111111,%rcx
11 11 01
and    %rax,%rcx
movabs $0x8888888888888889,%rdx
88 88 88
mov    %rcx,%rax
mul    %rdx
shr    $0x3,%rdx
lea    (%rdx,%rdx,4),%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hweight15(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 %3, 35185445863425
%5 = and i64 %4, 76861433640456465
%6 = urem i64 %5, 15
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @hweight15(i64 %0) {
%2 = mul i64 %0, 35185445863425
%3 = and i64 %2, 76861433640456465
%4 = urem i64 %3, 15
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int _get_create_bumpdrop(float);
int get_create_lwheel(float lag) {
  int b = _get_create_bumpdrop(lag);
  if (b > 100000)
    return b;
  return ((b >> 3) & 0x1);
}


x86 assembly (clang, -O0):
<get_create_lwheel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <_get_create_bumpdrop@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x186a0,-0xc(%rbp)
jle    1142 <get_create_lwheel+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114e <get_create_lwheel+0x3e>
mov    -0xc(%rbp),%eax
sar    $0x3,%eax
and    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_create_lwheel>:
push   %rax
call   1030 <_get_create_bumpdrop@plt>
mov    %eax,%ecx
shr    $0x3,%ecx
and    $0x1,%ecx
cmp    $0x186a1,%eax
cmovl  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @get_create_lwheel(float %0) {
%2 = tail call i32 @_get_create_bumpdrop(float %0)
%3 = icmp sgt i32 %2, 100000
%4 = lshr i32 %2, 3
%5 = and i32 %4, 1
%6 = select i1 %3, i32 %2, i32 %5
ret i32 %6
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzUnaryFunc_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_REQDOWN(int);
void BrzUnaryFunc_reqdown(struct comp *comp, int port) {
  struct BrzUnaryFunc_ *c = (struct BrzUnaryFunc_ *)comp;
  SEND_REQDOWN(1);
}


x86 assembly (clang, -O0):
<BrzUnaryFunc_reqdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
call   1030 <SEND_REQDOWN@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzUnaryFunc_reqdown>:
mov    $0x1,%edi
jmp    1030 <SEND_REQDOWN@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzUnaryFunc_ = type { i32 }
define void @BrzUnaryFunc_reqdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzUnaryFunc_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzUnaryFunc_*
store %struct.BrzUnaryFunc_* %7, %struct.BrzUnaryFunc_** %5
%8 = call i32 @SEND_REQDOWN(i32 1)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzUnaryFunc_reqdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_REQDOWN(i32 1)
ret void
}
/* Type definitions */
struct stat64 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _STAT_VER;
int __lxstat64(int /*<<< orphan*/, char const *, struct stat64 *);
int lstat64(const char *file, struct stat64 *buf) {
  return __lxstat64(_STAT_VER, file, buf);
}


x86 assembly (clang, -O0):
<lstat64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <__lxstat64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lstat64>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
jmp    1030 <__lxstat64@plt>

LLVM IR (-O0):
%struct.stat64 = type { i32 }
@_STAT_VER = global i32 0
define i32 @lstat64(i8* %0, %struct.stat64* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat64*
store i8* %0, i8** %3
store %struct.stat64* %1, %struct.stat64** %4
%5 = load i32, i32* @_STAT_VER
%6 = load i8*, i8** %3
%7 = load %struct.stat64*, %struct.stat64** %4
%8 = call i32 @__lxstat64(i32 %5, i8* %6, %struct.stat64* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stat64 = type { i32 }
@_STAT_VER = global i32 0
define i32 @lstat64(i8* %0, %struct.stat64* %1) {
%3 = load i32, i32* @_STAT_VER
%4 = tail call i32 @__lxstat64(i32 %3, i8* %0, %struct.stat64* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ pool_vfy(int, char const *);
void pool_check(const char *tag) {
  int poolnum;
  for (poolnum = 0; poolnum < 7; ++poolnum) {
    pool_vfy(poolnum, tag);
  }
}


x86 assembly (clang, -O0):
<pool_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
jge    1147 <pool_check+0x37>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <pool_vfy@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <pool_check+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pool_check>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <pool_vfy@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
call   1030 <pool_vfy@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
call   1030 <pool_vfy@plt>
mov    $0x3,%edi
mov    %rbx,%rsi
call   1030 <pool_vfy@plt>
mov    $0x4,%edi
mov    %rbx,%rsi
call   1030 <pool_vfy@plt>
mov    $0x5,%edi
mov    %rbx,%rsi
call   1030 <pool_vfy@plt>
mov    $0x6,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <pool_vfy@plt>

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

LLVM IR (-O2):
define void @pool_check(i8* %0) {
%2 = tail call i32 @pool_vfy(i32 0, i8* %0)
%3 = tail call i32 @pool_vfy(i32 1, i8* %0)
%4 = tail call i32 @pool_vfy(i32 2, i8* %0)
%5 = tail call i32 @pool_vfy(i32 3, i8* %0)
%6 = tail call i32 @pool_vfy(i32 4, i8* %0)
%7 = tail call i32 @pool_vfy(i32 5, i8* %0)
%8 = tail call i32 @pool_vfy(i32 6, i8* %0)
ret void
}
void UT_main(void) {}


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

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

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

LLVM IR (-O2):
define void @UT_main() {
ret void
}
/* Variables and functions */
int McbDoDES2(unsigned char *, unsigned long, unsigned char *, unsigned char *,
              unsigned char *, unsigned long *, int, int, int,
              int /*<<< orphan*/);
int McbDoDES(unsigned char *lpIn, unsigned long cbIn, unsigned char Key1[8],
             unsigned char Key2[8], unsigned char *lpOut, unsigned long *pcbOut,
             int nEncrypt, int nPadding, int nEncNo) {
  return McbDoDES2(lpIn, cbIn, Key1, Key2, lpOut, pcbOut, nEncrypt, nPadding,
                   nEncNo, 0);
}


x86 assembly (clang, -O0):
<McbDoDES>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x58,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x38(%rbp),%r9
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
xor    %ebx,%ebx
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
movl   $0x0,0x18(%rsp)
call   1030 <McbDoDES2@plt>
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<McbDoDES>:
push   %rax
mov    0x10(%rsp),%r10d
mov    0x18(%rsp),%r11d
mov    0x20(%rsp),%eax
push   $0x0
push   %rax
push   %r11
push   %r10
call   1030 <McbDoDES2@plt>
add    $0x20,%rsp
pop    %rcx
ret

LLVM IR (-O0):
define i32 @McbDoDES(i8* %0, i64 %1, i8* %2, i8* %3, i8* %4, i64* %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i64*
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i8* %0, i8** %10
store i64 %1, i64* %11
store i8* %2, i8** %12
store i8* %3, i8** %13
store i8* %4, i8** %14
store i64* %5, i64** %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%19 = load i8*, i8** %10
%20 = load i64, i64* %11
%21 = load i8*, i8** %12
%22 = load i8*, i8** %13
%23 = load i8*, i8** %14
%24 = load i64*, i64** %15
%25 = load i32, i32* %16
%26 = load i32, i32* %17
%27 = load i32, i32* %18
%28 = call i32 @McbDoDES2(i8* %19, i64 %20, i8* %21, i8* %22, i8* %23, i64* %24, i32 %25, i32 %26, i32 %27, i32 0)
ret i32 %28
}

LLVM IR (-O2):
define i32 @McbDoDES(i8* %0, i64 %1, i8* %2, i8* %3, i8* %4, i64* %5, i32 %6, i32 %7, i32 %8) {
%10 = tail call i32 @McbDoDES2(i8* %0, i64 %1, i8* %2, i8* %3, i8* %4, i64* %5, i32 %6, i32 %7, i32 %8, i32 0)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Initialize();
int /*<<< orphan*/ Read_and_Write_data();
int main(int argc, char **argv) {
  Initialize();
  Read_and_Write_data();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <Initialize@plt>
mov    $0x0,%al
call   1040 <Read_and_Write_data@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <Initialize@plt>
xor    %eax,%eax
call   1040 <Read_and_Write_data@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @Initialize()
%7 = call i32 (...) @Read_and_Write_data()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @Initialize()
%4 = tail call i32 (...) @Read_and_Write_data()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_1_puts(char *);
void hc05_cmd(char *str) {
  uart_1_puts(str);
  return;
}


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

x86 assembly (clang, -O2):
<hc05_cmd>:
jmp    1030 <uart_1_puts@plt>

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

LLVM IR (-O2):
define void @hc05_cmd(i8* %0) {
%2 = tail call i32 @uart_1_puts(i8* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void enable(uint32_t *opts, char opt) { *opts |= (1 << (opt - 'a')); }


x86 assembly (clang, -O0):
<enable>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%ecx
sub    $0x61,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable>:
lea    -0x61(%rsi),%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @enable(i32* nocapture %0, i8 signext %1) {
%3 = sext i8 %1 to i32
%4 = add nsw i32 %3, -97
%5 = shl nuw nsw i32 1, %4
%6 = load i32, i32* %0
%7 = or i32 %6, %5
store i32 %7, i32* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ m154setParamsMirror(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ m88setParams8001(int /*<<< orphan*/, int /*<<< orphan*/);
void m154setParams8001(uint16_t addr, uint8_t val) {
  m88setParams8001(addr, val);
  m154setParamsMirror(addr, val);
}


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

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

LLVM IR (-O0):
define void @m154setParams8001(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @m88setParams8001(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @m154setParamsMirror(i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @m154setParams8001(i32 %0, i32 %1) {
%3 = tail call i32 @m88setParams8001(i32 %0, i32 %1)
%4 = tail call i32 @m154setParamsMirror(i32 %0, i32 %1)
ret void
}
int eqsf2(float a, float b) { return a == b; }


x86 assembly (clang, -O0):
<eqsf2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eqsf2>:
cmpeqss %xmm1,%xmm0
movd   %xmm0,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @eqsf2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp oeq float %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @eqsf2(float %0, float %1) {
%3 = fcmp oeq float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int detail;
};
typedef TYPE_1__ XFocusInEvent;

/* Variables and functions */
void set_XFocusInEvent_detail(void *_p, int _v) {
  ((XFocusInEvent *)_p)->detail = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XFocusInEvent_detail>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XFocusInEvent_detail(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XFocusInEvent_detail(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void EEPROM_clearBuffers() {}


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

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

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

LLVM IR (-O2):
define void @EEPROM_clearBuffers() {
ret void
}
/* Variables and functions */
int EOF;
int EXIT_SUCCESS;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(int argc, char **argv) {
  int c;
  while ((c = getchar()) != EOF) {
    putchar(c);
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     115c <main+0x3c>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
jmp    1136 <main+0x16>
mov    0x2e75(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
mov    0x2e7f(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %3, %2 ]
%8 = tail call i32 @putchar(i32 %7)
%9 = tail call i32 (...) @getchar()
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}
int YM2612_End(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @YM2612_End() {
ret i32 0
}