xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
uint64_t __udivdi3(uint64_t a, uint64_t b) {
  uint64_t ret = 0;
  if (b == 0)
    return (uint64_t)0;
  while (a > b) {
    a = a - b;
    ret++;
  }
  return ret;
}


x86 assembly (clang, -O0):
<__udivdi3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    112c <__udivdi3+0x2c>
movq   $0x0,-0x8(%rbp)
jmp    1164 <__udivdi3+0x64>
jmp    1131 <__udivdi3+0x31>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    115c <__udivdi3+0x5c>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1131 <__udivdi3+0x31>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__udivdi3>:
xor    %eax,%eax
test   %rsi,%rsi
je     111c <__udivdi3+0x1c>
cmp    %rsi,%rdi
jle    111c <__udivdi3+0x1c>
xor    %eax,%eax
xchg   %ax,%ax
sub    %rsi,%rdi
add    $0x1,%rax
cmp    %rsi,%rdi
jg     1110 <__udivdi3+0x10>
ret

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

LLVM IR (-O2):
define i64 @__udivdi3(i64 %0, i64 %1) {
%3 = icmp ne i64 %1, 0
%4 = icmp sgt i64 %0, %1
%5 = and i1 %3, %4
br i1 %5, label %6, label %12
6: ; preds = %2, %6
%7 = phi i64 [ %10, %6 ], [ 0, %2 ]
%8 = phi i64 [ %9, %6 ], [ %0, %2 ]
%9 = sub nsw i64 %8, %1
%10 = add nuw nsw i64 %7, 1
%11 = icmp sgt i64 %9, %1
br i1 %11, label %6, label %12
12: ; preds = %6, %2
%13 = phi i64 [ 0, %2 ], [ %10, %6 ]
ret i64 %13
}
int get_control() { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @get_control() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ writeBinaryFromChar(int);
int /*<<< orphan*/ writeBinaryFromShort(int /*<<< orphan*/);
int /*<<< orphan*/ writeBinaryFromText(char *, int);
void convertNewWordToBinary(int size, char *word) {
  writeBinaryFromShort(0);
  writeBinaryFromChar(size);
  writeBinaryFromText(word, size);
}


x86 assembly (clang, -O0):
<convertNewWordToBinary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1040 <writeBinaryFromShort@plt>
mov    -0x4(%rbp),%edi
call   1050 <writeBinaryFromChar@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <writeBinaryFromText@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertNewWordToBinary>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
call   1040 <writeBinaryFromShort@plt>
mov    %ebp,%edi
call   1050 <writeBinaryFromChar@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <writeBinaryFromText@plt>

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

LLVM IR (-O2):
define void @convertNewWordToBinary(i32 %0, i8* %1) {
%3 = tail call i32 @writeBinaryFromShort(i32 0)
%4 = tail call i32 @writeBinaryFromChar(i32 %0)
%5 = tail call i32 @writeBinaryFromText(i8* %1, i32 %0)
ret void
}
int do_807() { return 807; }


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

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

LLVM IR (-O0):
define i32 @do_807() {
ret i32 807
}

LLVM IR (-O2):
define i32 @do_807() {
ret i32 807
}
/* Variables and functions */
int /*<<< orphan*/ SER_PutChar(int /*<<< orphan*/);
int _write(int fd, char *ptr, int len) {
  int i;
  for (i = 0; i < len; i++)
    SER_PutChar(*ptr++);
  return (i);
}


x86 assembly (clang, -O0):
<_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115a <_write+0x4a>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1030 <SER_PutChar@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1129 <_write+0x19>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
jle    1144 <_write+0x34>
mov    %edx,%r14d
mov    %rsi,%r15
mov    %edx,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl (%r15,%rbx,1),%edi
call   1030 <SER_PutChar@plt>
add    $0x1,%rbx
cmp    %ebx,%ebp
jne    1130 <_write+0x20>
jmp    1147 <_write+0x37>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @_write(i32 %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3, %5
%6 = phi i32 [ %12, %5 ], [ 0, %3 ]
%7 = phi i8* [ %8, %5 ], [ %1, %3 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %7
%10 = sext i8 %9 to i32
%11 = tail call i32 @SER_PutChar(i32 %10)
%12 = add nuw nsw i32 %6, 1
%13 = icmp eq i32 %12, %2
br i1 %13, label %14, label %5
14: ; preds = %5, %3
%15 = phi i32 [ 0, %3 ], [ %2, %5 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ banIP(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(int argc, char **argv) {
  char *ipaddr = "10.10.10.10";
  banIP(ipaddr);
  exit(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    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <banIP@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <banIP@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"10.10.10.10\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @banIP(i8* %7)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [12 x i8] c"10.10.10.10\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @banIP(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
void f(int *a) {}


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

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

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

LLVM IR (-O2):
define void @f(i32* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ recv(int, void *, size_t, int);
ssize_t test(void) {
  int sockfd = 4;
  int buffer;
  void *buf = &buffer;
  size_t len = sizeof(buffer);
  int flags = 7;
  return recv(sockfd, buf, len, flags);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x4,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movq   $0x4,-0x18(%rbp)
movl   $0x7,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <recv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
mov    $0x4,%edi
mov    $0x7,%ecx
call   1030 <recv@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i32 4, i32* %1
%6 = bitcast i32* %2 to i8*
store i8* %6, i8** %3
store i64 4, i64* %4
store i32 7, i32* %5
%7 = load i32, i32* %1
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = load i32, i32* %5
%11 = call i32 @recv(i32 %7, i8* %8, i64 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @test() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @recv(i32 4, i8* %2, i64 4, i32 7)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/
posix_acl_get_data(void *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *);
void fs_getacl_data(void *custom, uint16_t *userperm, uint16_t *groupperm,
                    uint16_t *otherperm, uint16_t *mask, uint16_t *namedusers,
                    uint16_t *namedgroups, uint8_t *aclblob) {
  posix_acl_get_data(custom, userperm, groupperm, otherperm, mask, namedusers,
                     namedgroups, aclblob);
}


x86 assembly (clang, -O0):
<fs_getacl_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <posix_acl_get_data@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_getacl_data>:
jmp    1030 <posix_acl_get_data@plt>

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

LLVM IR (-O2):
define void @fs_getacl_data(i8* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7) {
%9 = tail call i32 @posix_acl_get_data(i8* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ msg_print(char *);
scalar_t__ target_set_interactive(int, int /*<<< orphan*/, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int /*<<< orphan*/,
                                  int /*<<< orphan*/);
void do_cmd_target(void) {
  if (target_set_interactive(0x0001, 0, 0, 0, 0, 0)) {
    msg_print("Target Selected.");
  } else {
    msg_print("Target Aborted.");
  }
}


x86 assembly (clang, -O0):
<do_cmd_target>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <target_set_interactive@plt>
cmp    $0x0,%rax
je     1158 <do_cmd_target+0x38>
lea    0xeb2(%rip),%rdi
call   1040 <msg_print@plt>
jmp    1164 <do_cmd_target+0x44>
lea    0xeb2(%rip),%rdi
call   1040 <msg_print@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_cmd_target>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <target_set_interactive@plt>
test   %rax,%rax
lea    0xed0(%rip),%rax
lea    0xeb8(%rip),%rdi
cmove  %rax,%rdi
pop    %rax
jmp    1040 <msg_print@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Target Selected.\00"
@.str.1 = [16 x i8] c"Target Aborted.\00"
define void @do_cmd_target() {
%1 = call i64 @target_set_interactive(i32 1, i32 0, i32 0, i32 0, i32 0, i32 0)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @msg_print(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = call i32 @msg_print(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Target Selected.\00"
@.str.1 = [16 x i8] c"Target Aborted.\00"
define void @do_cmd_target() {
%1 = tail call i64 @target_set_interactive(i32 1, i32 0, i32 0, i32 0, i32 0, i32 0)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @msg_print(i8* %3)
ret void
}
void pendfunc1(void) {
  int x = 0;
  int y = x + 4;
}


x86 assembly (clang, -O0):
<pendfunc1>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @pendfunc1() {
ret void
}
void init_FULL_SPIRAL() {}


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

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

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

LLVM IR (-O2):
define void @init_FULL_SPIRAL() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ is_in_menu_like_mode();
scalar_t__ ui_stat_job_bar_height();
int is_job_bar_visible(void) {
  return ui_stat_job_bar_height() != 0 && !is_in_menu_like_mode();
}


x86 assembly (clang, -O0):
<is_job_bar_visible>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <ui_stat_job_bar_height@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     1153 <is_job_bar_visible+0x33>
mov    $0x0,%al
call   1030 <is_in_menu_like_mode@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_job_bar_visible>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <ui_stat_job_bar_height@plt>
test   %rax,%rax
je     113d <is_job_bar_visible+0x1d>
xor    %eax,%eax
call   1030 <is_in_menu_like_mode@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_job_bar_visible() {
%1 = call i64 (...) @ui_stat_job_bar_height()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = call i32 (...) @is_in_menu_like_mode()
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br label %7
7: ; preds = %3, %0
%8 = phi i1 [ false, %0 ], [ %6, %3 ]
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_job_bar_visible() {
%1 = tail call i64 (...) @ui_stat_job_bar_height()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 (...) @is_in_menu_like_mode()
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ aes_encrypt(char *, char *, char *, int);
void aes_enc_key_fn(char *aes_enc_key, char *key, char *password) {
  aes_encrypt(key, aes_enc_key, password, 32);
}


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

x86 assembly (clang, -O2):
<aes_enc_key_fn>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x20,%ecx
jmp    1030 <aes_encrypt@plt>

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

LLVM IR (-O2):
define void @aes_enc_key_fn(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @aes_encrypt(i8* %1, i8* %0, i8* %2, i32 32)
ret void
}
/* Type definitions */
struct inthash {
  int dummy;
};
typedef scalar_t__ int64_t;

/* Variables and functions */
int /*<<< orphan*/ ih_setval(struct inthash *, scalar_t__, void *);
void ih_setint64(struct inthash *ih, int64_t key, int64_t value) {
  ih_setval(ih, key, (void *)value);
}


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

x86 assembly (clang, -O2):
<ih_setint64>:
jmp    1030 <ih_setval@plt>

LLVM IR (-O0):
%struct.inthash = type { i32 }
define void @ih_setint64(%struct.inthash* %0, i64 %1, i64 %2) {
%4 = alloca %struct.inthash*
%5 = alloca i64
%6 = alloca i64
store %struct.inthash* %0, %struct.inthash** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load %struct.inthash*, %struct.inthash** %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = inttoptr i64 %9 to i8*
%11 = call i32 @ih_setval(%struct.inthash* %7, i64 %8, i8* %10)
ret void
}

LLVM IR (-O2):
%struct.inthash = type { i32 }
define void @ih_setint64(%struct.inthash* %0, i64 %1, i64 %2) {
%4 = inttoptr i64 %2 to i8*
%5 = tail call i32 @ih_setval(%struct.inthash* %0, i64 %1, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PROT_NONE;
int /*<<< orphan*/ __NR_pkey_alloc;
int syscall(int /*<<< orphan*/, void *, int, int /*<<< orphan*/, int);
int main(void) {
  int ret;
  ret = syscall(__NR_pkey_alloc, (void *)0, 4096, PROT_NONE, -1);
  (void)ret;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    0x2ec1(%rip),%rax
mov    (%rax),%ecx
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1000,%edx
mov    $0xffffffff,%r8d
call   1030 <syscall@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2ecf(%rip),%rax
mov    (%rax),%ecx
xor    %esi,%esi
mov    $0x1000,%edx
mov    $0xffffffff,%r8d
call   1030 <syscall@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__NR_pkey_alloc = global i32 0
@PROT_NONE = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @__NR_pkey_alloc
%4 = load i32, i32* @PROT_NONE
%5 = call i32 @syscall(i32 %3, i8* null, i32 4096, i32 %4, i32 -1)
store i32 %5, i32* %2
%6 = load i32, i32* %2
ret i32 0
}

LLVM IR (-O2):
@__NR_pkey_alloc = global i32 0
@PROT_NONE = global i32 0
define i32 @main() {
%1 = load i32, i32* @__NR_pkey_alloc
%2 = load i32, i32* @PROT_NONE
%3 = tail call i32 @syscall(i32 %1, i8* null, i32 4096, i32 %2, i32 -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int f(int);
main() {
  if (f(2) != 5 * 2 * sizeof(int))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
call   1040 <f@plt>
cltq
cmp    $0x28,%rax
je     114c <main+0x2c>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1040 <f@plt>
cmp    $0x28,%eax
jne    1134 <main+0x14>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 2)
%3 = sext i32 %2 to i64
%4 = icmp ne i64 %3, 40
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 2)
%2 = icmp eq i32 %1, 40
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
int cmodel_has_alpha(int colormodel) {
  switch (colormodel) {
  case 22:
  case 23:
  case 31:
  case 10:
  case 12:
  case 14:
  case 16:
  case 30:
    return 1;
    break;
  default:
    return 0;
    break;
  }
}


x86 assembly (clang, -O0):
<cmodel_has_alpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xa,%eax
je     1176 <cmodel_has_alpha+0x76>
jmp    111b <cmodel_has_alpha+0x1b>
mov    -0xc(%rbp),%eax
sub    $0xc,%eax
je     1176 <cmodel_has_alpha+0x76>
jmp    112c <cmodel_has_alpha+0x2c>
mov    -0xc(%rbp),%eax
sub    $0xe,%eax
je     1176 <cmodel_has_alpha+0x76>
jmp    113d <cmodel_has_alpha+0x3d>
mov    -0xc(%rbp),%eax
sub    $0x10,%eax
je     1176 <cmodel_has_alpha+0x76>
jmp    114e <cmodel_has_alpha+0x4e>
mov    -0xc(%rbp),%eax
add    $0xffffffea,%eax
sub    $0x2,%eax
jb     1176 <cmodel_has_alpha+0x76>
jmp    1162 <cmodel_has_alpha+0x62>
mov    -0xc(%rbp),%eax
add    $0xffffffe2,%eax
sub    $0x1,%eax
ja     1182 <cmodel_has_alpha+0x82>
jmp    1176 <cmodel_has_alpha+0x76>
movl   $0x1,-0x4(%rbp)
jmp    1189 <cmodel_has_alpha+0x89>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmodel_has_alpha>:
cmp    $0x1f,%edi
ja     1115 <cmodel_has_alpha+0x15>
mov    $0x1,%eax
mov    $0xc0c15400,%ecx
bt     %edi,%ecx
jae    1115 <cmodel_has_alpha+0x15>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @cmodel_has_alpha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 22, label %5
i32 23, label %5
i32 31, label %5
i32 10, label %5
i32 12, label %5
i32 14, label %5
i32 16, label %5
i32 30, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @cmodel_has_alpha(i32 %0) {
switch i32 %0, label %2 [
i32 22, label %3
i32 23, label %3
i32 31, label %3
i32 10, label %3
i32 12, label %3
i32 14, label %3
i32 16, label %3
i32 30, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ i2d_of_void;
typedef int /*<<< orphan*/ PKCS8_PRIV_KEY_INFO;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int PEM_ASN1_write(int /*<<< orphan*/ *, int /*<<< orphan*/,
                   int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *);
int /*<<< orphan*/ PEM_STRING_PKCS8INF;
scalar_t__ i2d_PKCS8_PRIV_KEY_INFO;
int PEM_write_PKCS8_PRIV_KEY_INFO(FILE *fp, PKCS8_PRIV_KEY_INFO *x) {
  return PEM_ASN1_write((i2d_of_void *)i2d_PKCS8_PRIV_KEY_INFO,
                        PEM_STRING_PKCS8INF, fp, x, NULL, NULL, 0, NULL, NULL);
}


x86 assembly (clang, -O0):
<PEM_write_PKCS8_PRIV_KEY_INFO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%rdi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r9d
xor    %eax,%eax
mov    %r9,%r8
movl   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <PEM_ASN1_write@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_write_PKCS8_PRIV_KEY_INFO>:
sub    $0x18,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb7(%rip),%rax
mov    (%rax),%rdi
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
movl   $0x0,(%rsp)
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <PEM_ASN1_write@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@i2d_PKCS8_PRIV_KEY_INFO = global i64 0
@PEM_STRING_PKCS8INF = global i32 0
define i32 @PEM_write_PKCS8_PRIV_KEY_INFO(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i64, i64* @i2d_PKCS8_PRIV_KEY_INFO
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_PKCS8INF
%8 = load i32*, i32** %3
%9 = load i32*, i32** %4
%10 = call i32 @PEM_ASN1_write(i32* %6, i32 %7, i32* %8, i32* %9, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %10
}

LLVM IR (-O2):
@i2d_PKCS8_PRIV_KEY_INFO = global i64 0
@PEM_STRING_PKCS8INF = global i32 0
define i32 @PEM_write_PKCS8_PRIV_KEY_INFO(i32* %0, i32* %1) {
%3 = load i64, i64* @i2d_PKCS8_PRIV_KEY_INFO
%4 = inttoptr i64 %3 to i32*
%5 = load i32, i32* @PEM_STRING_PKCS8INF
%6 = tail call i32 @PEM_ASN1_write(i32* %4, i32 %5, i32* %0, i32* %1, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %6
}
int owProgramPulse(int portnum) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @owProgramPulse(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char *argv[]) {
  for (;;) {
    write(1, "权", 3);
    sleep(1);
  }
}


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    $0x1,%edi
lea    0xebe(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x3,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [4 x i8] c"\E6\9D\83\00"
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
br label %6
6: ; preds = %6, %2
%7 = call i32 @write(i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%8 = call i32 @sleep(i32 1)
br label %6
}

LLVM IR (-O2):
@.str = [4 x i8] c"\E6\9D\83\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = tail call i32 @sleep(i32 1)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a = 'A';
  int b = 'a';
  for (a = 'A', b = 'a'; a <= 'Z' && b <= 'z'; a++, b++) {
    printf("%c-%c\n", a, b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x41,-0x8(%rbp)
movl   $0x61,-0xc(%rbp)
movl   $0x41,-0x8(%rbp)
movl   $0x61,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x5a,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jg     1154 <main+0x44>
cmpl   $0x7a,-0xc(%rbp)
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1164 <main+0x54>
jmp    118d <main+0x7d>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113b <main+0x2b>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x41,%ebx
lea    0xee0(%rip),%r14
lea    0x20(%rbx),%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x5b,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%c-%c\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 97, %0 ], [ %6, %1 ]
%3 = phi i32 [ 65, %0 ], [ %5, %1 ]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %2)
%5 = add nuw nsw i32 %3, 1
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 123
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ floor(double);
int /*<<< orphan*/ floorf(float);
int /*<<< orphan*/ floorl(long double);
void uninitvar_floor(void) {
  float f;
  (void)floorf(f);
  double d;
  (void)floor(d);
  long double ld;
  (void)floorl(ld);
}


x86 assembly (clang, -O0):
<uninitvar_floor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  -0x4(%rbp),%xmm0
call   1030 <floorf@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <floor@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <floorl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_floor>:
sub    $0x18,%rsp
call   1030 <floorf@plt>
call   1050 <floor@plt>
call   1040 <floorl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @uninitvar_floor() {
%1 = alloca float
%2 = alloca double
%3 = alloca x86_fp80
%4 = load float, float* %1
%5 = call i32 @floorf(float %4)
%6 = load double, double* %2
%7 = call i32 @floor(double %6)
%8 = load x86_fp80, x86_fp80* %3
%9 = call i32 @floorl(x86_fp80 %8)
ret void
}

LLVM IR (-O2):
define void @uninitvar_floor() {
%1 = tail call i32 @floorf(float undef)
%2 = tail call i32 @floor(double undef)
%3 = tail call i32 @floorl(x86_fp80 undef)
ret void
}
/* Variables and functions */
int mult(int, int, int, int);
int exp3(int b, int g, int n) {
  int r = b;
  if (b == 0)
    return 0;
  b = mult(r, b, g, n);
  r = mult(r, b, g, n);
  return r;
}


x86 assembly (clang, -O0):
<exp3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    113d <exp3+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    116b <exp3+0x5b>
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <mult@plt>
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <mult@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp3>:
test   %edi,%edi
je     113d <exp3+0x2d>
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    %edi,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <mult@plt>
mov    %ebx,%edi
mov    %eax,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <mult@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @exp3(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = tail call i32 @mult(i32 %0, i32 %0, i32 %1, i32 %2)
%7 = tail call i32 @mult(i32 %0, i32 %6, i32 %1, i32 %2)
br label %8
8: ; preds = %3, %5
%9 = phi i32 [ %7, %5 ], [ 0, %3 ]
ret i32 %9
}
extern unsigned int __inl_p(unsigned short port) {
  unsigned int _v;
  __asm__ __volatile__("in"
                       "l"
                       " %"
                       "w"
                       "1,%"
                       ""
                       "0"
                       : "=a"(_v)
                       : "d"(port));
  __asm__ __volatile__("outb %al,$0x80");
  return _v;
}


x86 assembly (clang, -O0):
<__inl_p>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
mov    %eax,-0x8(%rbp)
out    %al,$0x80
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__inl_p>:
mov    %edi,%edx
in     (%dx),%eax
out    %al,$0x80
ret

LLVM IR (-O0):
define i32 @__inl_p(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i32 asm sideeffect "inl ${1:w},$0", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @__inl_p(i16 zeroext %0) {
%2 = tail call i32 asm sideeffect "inl ${1:w},$0", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
tail call void asm sideeffect "outb %al,$$0x80", "~{dirflag},~{fpsr},~{flags}"()
ret i32 %2
}
int fun806() { return 806; }


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

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

LLVM IR (-O0):
define i32 @fun806() {
ret i32 806
}

LLVM IR (-O2):
define i32 @fun806() {
ret i32 806
}
int all_lower(str)
char *str;
{
  while (*str) {
    if (!(((unsigned char)*str) <= 0177) || !islower((unsigned char)*str))
      return 0;
    ++str;
  }
  return 1;
}


x86 assembly (clang, -O0):
<all_lower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     116b <all_lower+0x5b>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x7f,%eax
jg     114e <all_lower+0x3e>
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1030 <islower@plt>
cmp    $0x0,%eax
jne    115a <all_lower+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1172 <all_lower+0x62>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <all_lower+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_lower>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     114b <all_lower+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %al,%al
js     1150 <all_lower+0x40>
movzbl %al,%edi
call   1030 <islower@plt>
test   %eax,%eax
je     1150 <all_lower+0x40>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <all_lower+0x20>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @all_lower(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %20, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %23
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = icmp sle i32 %11, 127
br i1 %12, label %13, label %19
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = call i32 @islower(i32 %16)
%18 = icmp ne i32 %17, 0
br i1 %18, label %20, label %19
19: ; preds = %13, %8
store i32 0, i32* %2
br label %24
20: ; preds = %13
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
br label %4
23: ; preds = %4
store i32 1, i32* %2
br label %24
24: ; preds = %23, %19
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @all_lower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %7
4: ; preds = %11
%5 = load i8, i8* %15
%6 = icmp eq i8 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %15, %4 ], [ %0, %1 ]
%10 = icmp sgt i8 %8, -1
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = zext i8 %8 to i32
%13 = tail call i32 @islower(i32 %12)
%14 = icmp eq i32 %13, 0
%15 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %14, label %16, label %4
16: ; preds = %11, %7, %4, %1
%17 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ], [ 0, %11 ]
ret i32 %17
}
int test_imm_6Euint32_mem(unsigned int *val) {
  return ((*val) & (0x6E << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_6Euint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 110
%6 = icmp ne i32 %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_6Euint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 110
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void nand_deselect(void) {
  (*(volatile unsigned long *)0x4E000004) |= (1 << 1);
}


x86 assembly (clang, -O0):
<nand_deselect>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4e000004,%eax
mov    (%rax),%rcx
or     $0x2,%rcx
mov    $0x4e000004,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nand_deselect>:
orq    $0x2,0x4e000004
4e 02
ret

LLVM IR (-O0):
define void @nand_deselect() {
%1 = load volatile i64, i64* inttoptr (i64 1308622852 to i64*)
%2 = or i64 %1, 2
store volatile i64 %2, i64* inttoptr (i64 1308622852 to i64*)
ret void
}

LLVM IR (-O2):
define void @nand_deselect() {
%1 = load volatile i64, i64* inttoptr (i64 1308622852 to i64*)
%2 = or i64 %1, 2
store volatile i64 %2, i64* inttoptr (i64 1308622852 to i64*)
ret void
}
int good(void) {
  int x = 5;
  int y = 0;
  const int *p = &x;
  return *p;
}


x86 assembly (clang, -O0):
<good>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @good() {
ret i32 5
}
void TransposeUVWx8_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @TransposeUVWx8_Any_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void nrerror(char error_text[]) {
  fprintf(stderr, "Run-time error...\n");
  fprintf(stderr, "%s\n", error_text);
  fprintf(stderr, "...now exiting to system...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<nrerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xebc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    0xea9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<nrerror>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xeca(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xeba(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Run-time error...\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [29 x i8] c"...now exiting to system...\0A\00"
define void @nrerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Run-time error...\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [29 x i8] c"...now exiting to system...\0A\00"
define void @nrerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
bool defaultPayloadComparator(void *a, void *b) { return a == b; }


x86 assembly (clang, -O0):
<defaultPayloadComparator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<defaultPayloadComparator>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @defaultPayloadComparator(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @defaultPayloadComparator(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
long long rdtsc(void) {
  unsigned long long tsc;
  __asm__ __volatile__("rdtsc" : "=A"(tsc));
  return tsc;
}


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

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

LLVM IR (-O0):
define i64 @rdtsc() {
%1 = alloca i64
%2 = call i64 asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @rdtsc() {
%1 = tail call i64 asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void print_two_int(int n, int m) { printf("%d%d", n, m); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
define void @print_two_int(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Type definitions */
struct object {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct object *);
void _object_free(struct object *this) { free(this); }


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

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

LLVM IR (-O0):
%struct.object = type { i32 }
define void @_object_free(%struct.object* %0) {
%2 = alloca %struct.object*
store %struct.object* %0, %struct.object** %2
%3 = load %struct.object*, %struct.object** %2
%4 = call i32 @free(%struct.object* %3)
ret void
}

LLVM IR (-O2):
%struct.object = type { i32 }
define void @_object_free(%struct.object* nocapture %0) {
%2 = tail call i32 @free(%struct.object* %0)
ret void
}