xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ UI_DEV_DESTROY;
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/);
void closeInputDevice(int fd) { ioctl(fd, UI_DEV_DESTROY); }


x86 assembly (clang, -O0):
<closeInputDevice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeInputDevice>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
@UI_DEV_DESTROY = global i32 0
define void @closeInputDevice(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @UI_DEV_DESTROY
%5 = call i32 @ioctl(i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@UI_DEV_DESTROY = global i32 0
define void @closeInputDevice(i32 %0) {
%2 = load i32, i32* @UI_DEV_DESTROY
%3 = tail call i32 @ioctl(i32 %0, i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ deserialize_int32(unsigned char *);
int verify_dynmessage_start(unsigned char *data, int data_len) {
  int verified = 0;
  if (data != NULL && data_len >= 4) {
    int dynmessage_start = (int)deserialize_int32(data);
    verified = dynmessage_start == 1044266557;
  }
  return verified;
}


x86 assembly (clang, -O0):
<verify_dynmessage_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1159 <verify_dynmessage_start+0x49>
cmpl   $0x4,-0xc(%rbp)
jl     1159 <verify_dynmessage_start+0x49>
mov    -0x8(%rbp),%rdi
call   1030 <deserialize_int32@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x3e3e3e3d,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_dynmessage_start>:
xor    %eax,%eax
test   %rdi,%rdi
je     1134 <verify_dynmessage_start+0x24>
cmp    $0x4,%esi
jl     1134 <verify_dynmessage_start+0x24>
push   %rax
call   1030 <deserialize_int32@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x3e3e3e3d,%ecx
sete   %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @verify_dynmessage_start(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %19
9: ; preds = %2
%10 = load i32, i32* %4
%11 = icmp sge i32 %10, 4
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i8*, i8** %3
%14 = call i64 @deserialize_int32(i8* %13)
%15 = trunc i64 %14 to i32
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = icmp eq i32 %16, 1044266557
%18 = zext i1 %17 to i32
store i32 %18, i32* %5
br label %19
19: ; preds = %12, %9, %2
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @verify_dynmessage_start(i8* %0, i32 %1) {
%3 = icmp ne i8* %0, null
%4 = icmp sgt i32 %1, 3
%5 = and i1 %3, %4
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = tail call i64 @deserialize_int32(i8* %0)
%8 = trunc i64 %7 to i32
%9 = icmp eq i32 %8, 1044266557
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %6, %2
%12 = phi i32 [ %10, %6 ], [ 0, %2 ]
ret i32 %12
}
unsigned long long __popcnt64(unsigned long long value) {
  return __builtin_popcountll(value);
}


x86 assembly (clang, -O0):
<__popcnt64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    %rcx,%rax
shr    %rax
movabs $0x5555555555555555,%rdx
55 55 55
and    %rdx,%rax
sub    %rax,%rcx
movabs $0x3333333333333333,%rdx
33 33 33
mov    %rcx,%rax
and    %rdx,%rax
shr    $0x2,%rcx
and    %rdx,%rcx
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rcx,%rax
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
movabs $0x101010101010101,%rcx
01 01 01
imul   %rcx,%rax
shr    $0x38,%rax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<__popcnt64>:
mov    %rdi,%rax
shr    %rax
movabs $0x5555555555555555,%rcx
55 55 55
and    %rax,%rcx
sub    %rcx,%rdi
movabs $0x3333333333333333,%rax
33 33 33
mov    %rdi,%rcx
and    %rax,%rcx
shr    $0x2,%rdi
and    %rdi,%rax
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rax,%rcx
movabs $0xf0f0f0f0f0f0f0f,%rdx
0f 0f 0f
and    %rcx,%rdx
movabs $0x101010101010101,%rax
01 01 01
imul   %rdx,%rax
shr    $0x38,%rax
ret

LLVM IR (-O0):
define i64 @__popcnt64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @llvm.ctpop.i64(i64 %3)
%5 = trunc i64 %4 to i32
%6 = sext i32 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @__popcnt64(i64 %0) {
%2 = tail call i64 @llvm.ctpop.i64(i64 %0)
ret i64 %2
}
void Sys_NET_Shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @Sys_NET_Shutdown() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __CrestInit();
void __globinit_uniform_test(void) {
  { __CrestInit(); }
}


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

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

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

LLVM IR (-O2):
define void @__globinit_uniform_test() {
%1 = tail call i32 (...) @__CrestInit()
ret void
}
/* Type definitions */
struct in_addr {
  int dummy;
};

/* Variables and functions */
scalar_t__ inet_aton(char *, struct in_addr *);
int IpAddr(char *s, struct in_addr *addr) {
  if (inet_aton(s, addr) == 0)
    return (-1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<IpAddr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <inet_aton@plt>
cmp    $0x0,%rax
jne    1143 <IpAddr+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    114a <IpAddr+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IpAddr>:
push   %rax
call   1030 <inet_aton@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
define i32 @IpAddr(i8* %0, %struct.in_addr* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.in_addr*
store i8* %0, i8** %4
store %struct.in_addr* %1, %struct.in_addr** %5
%6 = load i8*, i8** %4
%7 = load %struct.in_addr*, %struct.in_addr** %5
%8 = call i64 @inet_aton(i8* %6, %struct.in_addr* %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %12
11: ; preds = %2
store i32 0, i32* %3
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
define i32 @IpAddr(i8* %0, %struct.in_addr* %1) {
%3 = tail call i64 @inet_aton(i8* %0, %struct.in_addr* %1)
%4 = icmp eq i64 %3, 0
%5 = sext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct rpc_buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ buffer_write_char(struct rpc_buffer *, int);
int /*<<< orphan*/ buffer_write_data(struct rpc_buffer *, char const *, int);
int /*<<< orphan*/ buffer_write_pad(struct rpc_buffer *);
void buffer_write_string_tiny(struct rpc_buffer *buf, int len, const char *s) {
  assert(len <= 253);
  buffer_write_char(buf, len);
  buffer_write_data(buf, s, len);
  buffer_write_pad(buf);
}


x86 assembly (clang, -O0):
<buffer_write_string_tiny>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0xfd,-0xc(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <buffer_write_char@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1060 <buffer_write_data@plt>
mov    -0x8(%rbp),%rdi
call   1040 <buffer_write_pad@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_write_string_tiny>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0xfe,%esi
setl   %dil
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <buffer_write_char@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1060 <buffer_write_data@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <buffer_write_pad@plt>

LLVM IR (-O0):
%struct.rpc_buffer = type { i32 }
define void @buffer_write_string_tiny(%struct.rpc_buffer* %0, i32 %1, i8* %2) {
%4 = alloca %struct.rpc_buffer*
%5 = alloca i32
%6 = alloca i8*
store %struct.rpc_buffer* %0, %struct.rpc_buffer** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = icmp sle i32 %7, 253
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load %struct.rpc_buffer*, %struct.rpc_buffer** %4
%12 = load i32, i32* %5
%13 = call i32 @buffer_write_char(%struct.rpc_buffer* %11, i32 %12)
%14 = load %struct.rpc_buffer*, %struct.rpc_buffer** %4
%15 = load i8*, i8** %6
%16 = load i32, i32* %5
%17 = call i32 @buffer_write_data(%struct.rpc_buffer* %14, i8* %15, i32 %16)
%18 = load %struct.rpc_buffer*, %struct.rpc_buffer** %4
%19 = call i32 @buffer_write_pad(%struct.rpc_buffer* %18)
ret void
}

LLVM IR (-O2):
%struct.rpc_buffer = type { i32 }
define void @buffer_write_string_tiny(%struct.rpc_buffer* %0, i32 %1, i8* %2) {
%4 = icmp slt i32 %1, 254
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @buffer_write_char(%struct.rpc_buffer* %0, i32 %1)
%8 = tail call i32 @buffer_write_data(%struct.rpc_buffer* %0, i8* %2, i32 %1)
%9 = tail call i32 @buffer_write_pad(%struct.rpc_buffer* %0)
ret void
}
/* Variables and functions */
char *redirect_path_full(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
char *redirect_path(const char *pathname) {
  return redirect_path_full(pathname, 0, 0);
}


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

x86 assembly (clang, -O2):
<redirect_path>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <redirect_path_full@plt>

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

LLVM IR (-O2):
define i8* @redirect_path(i8* %0) {
%2 = tail call i8* @redirect_path_full(i8* %0, i32 0, i32 0)
ret i8* %2
}
char peek(char arg) { return arg; }


x86 assembly (clang, -O0):
<peek>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @peek(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
ret i8 %3
}

LLVM IR (-O2):
define signext i8 @peek(i8 returned signext %0) {
ret i8 %0
}
/* Variables and functions */
int getchar();
scalar_t__ isalpha(int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  int c;
  printf("c: ");
  c = getchar();
  if (isalpha(c)) {
    printf("Alphabet\n");
  } else {
    printf("Not Alphabet\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <isalpha@plt>
cmp    $0x0,%rax
je     1178 <main+0x48>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
jmp    1184 <main+0x54>
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%edi
call   1060 <isalpha@plt>
test   %rax,%rax
lea    0xe9f(%rip),%rax
lea    0xe9c(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"c: \00"
@str = [13 x i8] c"Not Alphabet\00"
@str.3 = [9 x i8] c"Alphabet\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
%3 = tail call i64 @isalpha(i32 %2)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.3, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int int32_t;

/* Variables and functions */
int32_t get_IP_header_length(uint8_t *ip_packet) {
  uint8_t ip_header_IHL = ip_packet[0];
  ip_header_IHL = ip_header_IHL << 4;
  ip_header_IHL = ip_header_IHL >> 4;
  return ip_header_IHL * 4;
}


x86 assembly (clang, -O0):
<get_IP_header_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_IP_header_length>:
mov    (%rdi),%eax
shl    $0x4,%eax
sar    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @get_IP_header_length(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = shl i32 %7, 4
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = ashr i32 %9, 4
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = mul nsw i32 %11, 4
ret i32 %12
}

LLVM IR (-O2):
define i32 @get_IP_header_length(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 4
%4 = ashr exact i32 %3, 2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void foo(void) { puts("Hello, I'am a shared libray"); }


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"Hello, I'am a shared libray\00"
define void @foo() {
%1 = call i32 @puts(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Hello, I'am a shared libray\00"
define void @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGWINCH;
void SIG_IGN(int);
int /*<<< orphan*/ clear();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
void handle_winch(int sig) {
  signal(SIGWINCH, SIG_IGN);
  endwin();
  initscr();
  refresh();
  clear();
  signal(SIGWINCH, handle_winch);
}


x86 assembly (clang, -O0):
<handle_winch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
mov    0x2e6d(%rip),%rsi
call   1040 <signal@plt>
mov    $0x0,%al
call   1060 <endwin@plt>
mov    $0x0,%al
call   1030 <initscr@plt>
mov    $0x0,%al
call   1050 <refresh@plt>
mov    $0x0,%al
call   1070 <clear@plt>
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
mov    0x2e5c(%rip),%rsi
call   1040 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_winch>:
push   %rbx
mov    0x2e88(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e77(%rip),%rsi
call   1040 <signal@plt>
xor    %eax,%eax
call   1060 <endwin@plt>
xor    %eax,%eax
call   1030 <initscr@plt>
xor    %eax,%eax
call   1050 <refresh@plt>
xor    %eax,%eax
call   1070 <clear@plt>
mov    (%rbx),%edi
mov    0x2e6d(%rip),%rsi
pop    %rbx
jmp    1040 <signal@plt>

LLVM IR (-O0):
@SIGWINCH = global i32 0
define void @handle_winch(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SIGWINCH
%4 = call i32 @signal(i32 %3, void (i32)* @SIG_IGN)
%5 = call i32 (...) @endwin()
%6 = call i32 (...) @initscr()
%7 = call i32 (...) @refresh()
%8 = call i32 (...) @clear()
%9 = load i32, i32* @SIGWINCH
%10 = call i32 @signal(i32 %9, void (i32)* @handle_winch)
ret void
}

LLVM IR (-O2):
@SIGWINCH = global i32 0
define void @handle_winch(i32 %0) {
%2 = load i32, i32* @SIGWINCH
%3 = tail call i32 @signal(i32 %2, void (i32)* @SIG_IGN)
%4 = tail call i32 (...) @endwin()
%5 = tail call i32 (...) @initscr()
%6 = tail call i32 (...) @refresh()
%7 = tail call i32 (...) @clear()
%8 = load i32, i32* @SIGWINCH
%9 = tail call i32 @signal(i32 %8, void (i32)* @handle_winch)
ret void
}
int cmp_char(const void *a, const void *b) {
  return (int)(*(char *)a) - (int)(*(char *)b);
}


x86 assembly (clang, -O0):
<cmp_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_char>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmp_char(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* %5
%7 = sext i8 %6 to i32
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmp_char(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
void getchar2() {
  int c;
  while ((c = getchar()) != EOF)
    putchar(c);
}


x86 assembly (clang, -O0):
<getchar2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    0x2eaf(%rip),%rcx
cmp    (%rcx),%eax
je     114e <getchar2+0x2e>
mov    -0x4(%rbp),%edi
call   1030 <putchar@plt>
jmp    1128 <getchar2+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getchar2>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <getchar2+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 <getchar2+0x20>
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @getchar2() {
%1 = alloca i32
br label %2
2: ; preds = %6, %0
%3 = call i32 (...) @getchar()
store i32 %3, i32* %1
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i32, i32* %1
%8 = call i32 @putchar(i32 %7)
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @getchar2() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %10, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %7, %4 ], [ %1, %0 ]
%6 = tail call i32 @putchar(i32 %5)
%7 = tail call i32 (...) @getchar()
%8 = load i32, i32* @EOF
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %4
10: ; preds = %4, %0
ret void
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ errsignal(int);
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
char *tempfilename() {
  char *cp;
  static int tempcnt = 0;
  cp = ((char *)calloc((10), 1));
  if (cp == NULL)
    errsignal(15);
  sprintf(cp, "LOG%05d", tempcnt++);
  return (cp);
}


x86 assembly (clang, -O0):
<tempfilename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1160 <tempfilename+0x30>
mov    $0xf,%edi
call   1040 <errsignal@plt>
mov    -0x8(%rbp),%rdi
mov    0x2ed2(%rip),%edx
mov    %edx,%eax
add    $0x1,%eax
mov    %eax,0x2ec7(%rip)
lea    0xe84(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tempfilename>:
push   %rbx
mov    $0xa,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1152 <tempfilename+0x22>
mov    $0xf,%edi
call   1040 <errsignal@plt>
mov    0x2ee4(%rip),%edx
lea    0x1(%rdx),%eax
mov    %eax,0x2edb(%rip)
lea    0xe98(%rip),%rsi
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@tempfilename.tempcnt = internal global i32 0
@.str = [8 x i8] c"LOG%05d\00"
define i8* @tempfilename() {
%1 = alloca i8*
%2 = call i64 @calloc(i32 10, i32 1)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @errsignal(i32 15)
br label %8
8: ; preds = %6, %0
%9 = load i8*, i8** %1
%10 = load i32, i32* @tempfilename.tempcnt
%11 = add nsw i32 %10, 1
store i32 %11, i32* @tempfilename.tempcnt
%12 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %10)
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@tempfilename.tempcnt = internal unnamed_addr global i32 0
@.str = [8 x i8] c"LOG%05d\00"
define i8* @tempfilename() {
%1 = tail call i64 @calloc(i32 10, i32 1)
%2 = inttoptr i64 %1 to i8*
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @errsignal(i32 15)
br label %6
6: ; preds = %4, %0
%7 = load i32, i32* @tempfilename.tempcnt
%8 = add nsw i32 %7, 1
store i32 %8, i32* @tempfilename.tempcnt
%9 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i8* %2
}
/* Variables and functions */
char *calloc(int, int);
char *make_char(char *str, int buff) {
  str = calloc(buff, sizeof(char));
  return str;
}


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

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

LLVM IR (-O0):
define i8* @make_char(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 = call i8* @calloc(i32 %5, i32 1)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @make_char(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i8* @calloc(i32 %1, i32 1)
ret i8* %3
}
void Swap_Init(void) {}


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

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

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

LLVM IR (-O2):
define void @Swap_Init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
void foo(int n) {
  int i;
#pragma omp for schedule(nonmonotonic : guided)
  for (i = 0; i < n; ++i)
    bar(i);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1144 <foo+0x34>
mov    -0x8(%rbp),%edi
call   1030 <bar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <foo+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    112e <foo+0x1e>
mov    %edi,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <bar@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1120 <foo+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = load i32, i32* %3
%10 = call i32 @bar(i32 %9)
br label %11
11: ; preds = %8
%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 @foo(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @bar(i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
void GPIOPortP7_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<GPIOPortP7_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <GPIOPortP7_Handler+0x9>
jmp    1109 <GPIOPortP7_Handler+0x9>

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

LLVM IR (-O0):
define void @GPIOPortP7_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @GPIOPortP7_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
scalar_t__ isunderscore(int);
scalar_t__ iswalnum(int);
int isident_end(int c) { return iswalnum(c) || isunderscore(c); }


x86 assembly (clang, -O0):
<isident_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <iswalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <isident_end+0x37>
mov    -0x4(%rbp),%edi
call   1040 <isunderscore@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isident_end>:
push   %rbx
mov    %edi,%ebx
call   1030 <iswalnum@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <isident_end+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <isunderscore@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isident_end(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @iswalnum(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @isunderscore(i32 %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isident_end(i32 %0) {
%2 = tail call i64 @iswalnum(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isunderscore(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
unsigned __ac_X31_hash_string(const char *s) {
  unsigned h = (unsigned)*s;
  if (h)
    for (++s; *s; ++s)
      h = (h << 5) - h + (unsigned)*s;
  return h;
}


x86 assembly (clang, -O0):
<__ac_X31_hash_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1160 <__ac_X31_hash_string+0x60>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115b <__ac_X31_hash_string+0x5b>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
sub    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1128 <__ac_X31_hash_string+0x28>
jmp    1160 <__ac_X31_hash_string+0x60>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ac_X31_hash_string>:
movsbl (%rdi),%eax
test   %eax,%eax
je     1138 <__ac_X31_hash_string+0x38>
mov    0x1(%rdi),%cl
test   %cl,%cl
je     1137 <__ac_X31_hash_string+0x37>
add    $0x2,%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1120 <__ac_X31_hash_string+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @__ac_X31_hash_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %19, label %4
4: ; preds = %1
%5 = sext i8 %2 to i32
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %19, label %9
9: ; preds = %4, %9
%10 = phi i8 [ %17, %9 ], [ %7, %4 ]
%11 = phi i8* [ %16, %9 ], [ %6, %4 ]
%12 = phi i32 [ %15, %9 ], [ %5, %4 ]
%13 = mul i32 %12, 31
%14 = sext i8 %10 to i32
%15 = add i32 %13, %14
%16 = getelementptr inbounds i8, i8* %11, i64 1
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %9
19: ; preds = %9, %4, %1
%20 = phi i32 [ 0, %1 ], [ %5, %4 ], [ %15, %9 ]
ret i32 %20
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *asctime(struct tm *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
struct tm *gmtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void print_time(FILE *contents) {
  time_t now;
  struct tm *tiempo;
  now = time(NULL);
  tiempo = gmtime(&now);
  fprintf(contents, "%s", asctime(tiempo));
}


x86 assembly (clang, -O0):
<print_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1060 <gmtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <asctime@plt>
mov    -0x20(%rbp),%rdi
mov    %rax,%rdx
lea    0xe7c(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_time>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1060 <gmtime@plt>
mov    %rax,%rdi
call   1030 <asctime@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
call   1040 <fputs@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @print_time(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca %struct.tm*
store i32* %0, i32** %2
%5 = call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call %struct.tm* @gmtime(i32* %3)
store %struct.tm* %6, %struct.tm** %4
%7 = load i32*, i32** %2
%8 = load %struct.tm*, %struct.tm** %4
%9 = call i8* @asctime(%struct.tm* %8)
%10 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define void @print_time(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = call %struct.tm* @gmtime(i32* %2)
%6 = call i8* @asctime(%struct.tm* %5)
%7 = call i32 @fputs(i8* %6, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
int main(void) {
  char str[] = "123";
  reverse(str);
  printf("%s", str);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x4(%rbp),%rsi
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x333231,0xc(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <reverse@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [4 x i8] c"123\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [4 x i8]
%2 = bitcast [4 x i8]* %1 to i8*
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%4 = call i32 @reverse(i8* %3)
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 3355185, i32* %1
%3 = call i32 @reverse(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
struct sched_param {
  int sched_priority;
};

/* Variables and functions */
int /*<<< orphan*/ SCHED_FIFO;
int /*<<< orphan*/ perror(char *);
int sched_setscheduler(int /*<<< orphan*/, int /*<<< orphan*/,
                       struct sched_param *);
void change_sched() {
  int ret;
  struct sched_param param;
  param.sched_priority = 1;
  ret = sched_setscheduler(0, SCHED_FIFO, &param);
  if (ret < 0) {
    perror("sched_setscheduler");
  }
}


x86 assembly (clang, -O0):
<change_sched>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x8(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setscheduler@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    115c <change_sched+0x3c>
lea    0xea9(%rip),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<change_sched>:
push   %rax
movl   $0x1,(%rsp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
xor    %edi,%edi
call   1030 <sched_setscheduler@plt>
test   %eax,%eax
js     1141 <change_sched+0x21>
pop    %rax
ret
lea    0xeb8(%rip),%rdi
call   1040 <perror@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.sched_param = type { i32 }
@SCHED_FIFO = global i32 0
@.str = [19 x i8] c"sched_setscheduler\00"
define void @change_sched() {
%1 = alloca i32
%2 = alloca %struct.sched_param
%3 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %2, i32 0, i32 0
store i32 1, i32* %3
%4 = load i32, i32* @SCHED_FIFO
%5 = call i32 @sched_setscheduler(i32 0, i32 %4, %struct.sched_param* %2)
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %0
ret void
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
@SCHED_FIFO = global i32 0
@.str = [19 x i8] c"sched_setscheduler\00"
define void @change_sched() {
%1 = alloca %struct.sched_param
%2 = bitcast %struct.sched_param* %1 to i8*
%3 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %1, i64 0, i32 0
store i32 1, i32* %3
%4 = load i32, i32* @SCHED_FIFO
%5 = call i32 @sched_setscheduler(i32 0, i32 %4, %struct.sched_param* %1)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
ret void
}
const char *I_NoAppServicesLobbyGetTeamAt(int idx) { return "Auto"; }


x86 assembly (clang, -O0):
<I_NoAppServicesLobbyGetTeamAt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"Auto\00"
define i8* @I_NoAppServicesLobbyGetTeamAt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"Auto\00"
define i8* @I_NoAppServicesLobbyGetTeamAt(i32 %0) {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ eFree(char *);
char *popString();
int /*<<< orphan*/ pushStringCopy(char *);
void basStrF() {
  char *string;
  string = popString();
  pushStringCopy(string);
  eFree(string);
}


x86 assembly (clang, -O0):
<basStrF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <popString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <pushStringCopy@plt>
mov    -0x8(%rbp),%rdi
call   1030 <eFree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basStrF>:
push   %rbx
xor    %eax,%eax
call   1040 <popString@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <pushStringCopy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <eFree@plt>

LLVM IR (-O0):
define void @basStrF() {
%1 = alloca i8*
%2 = call i8* (...) @popString()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @pushStringCopy(i8* %3)
%5 = load i8*, i8** %1
%6 = call i32 @eFree(i8* %5)
ret void
}

LLVM IR (-O2):
define void @basStrF() {
%1 = tail call i8* (...) @popString()
%2 = tail call i32 @pushStringCopy(i8* %1)
%3 = tail call i32 @eFree(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ writeResult(int, char *, int /*<<< orphan*/,
                               int /*<<< orphan*/, char *);
void showUsage() {
  writeResult(-1, "error while parsing arguments with '?' case", 0, 0, "null");
}


x86 assembly (clang, -O0):
<showUsage>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
lea    0xee0(%rip),%rsi
xor    %ecx,%ecx
lea    0xf03(%rip),%r8
mov    %ecx,%edx
call   1030 <writeResult@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<showUsage>:
lea    0xee9(%rip),%rsi
lea    0xf0e(%rip),%r8
mov    $0xffffffff,%edi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <writeResult@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"error while parsing arguments with '?' case\00"
@.str.1 = [5 x i8] c"null\00"
define void @showUsage() {
%1 = call i32 @writeResult(i32 -1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"error while parsing arguments with '?' case\00"
@.str.1 = [5 x i8] c"null\00"
define void @showUsage() {
%1 = tail call i32 @writeResult(i32 -1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ string;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int);
const char *myitoa(int val, char *string) {
  snprintf(string, sizeof(string), "%d", val);
  return string;
}


x86 assembly (clang, -O0):
<myitoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x8,%esi
lea    0xece(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myitoa>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ecx
lea    0xee3(%rip),%rdx
mov    %rsi,%rdi
mov    $0x8,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @myitoa(i32 %0, i8* returned %1) {
%3 = tail call i32 @snprintf(i8* %1, i32 8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ malloc(scalar_t__);
scalar_t__ zero_to_infty();
void alloc_may_be_big2_Silenced(int n) { malloc(n + zero_to_infty()); }


x86 assembly (clang, -O0):
<alloc_may_be_big2_Silenced>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <zero_to_infty@plt>
mov    -0x10(%rbp),%rdi
add    %rax,%rdi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_may_be_big2_Silenced>:
push   %rbx
movslq %edi,%rbx
xor    %eax,%eax
call   1040 <zero_to_infty@plt>
add    %rax,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define void @alloc_may_be_big2_Silenced(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = call i64 (...) @zero_to_infty()
%6 = add nsw i64 %4, %5
%7 = call i32 @malloc(i64 %6)
ret void
}

LLVM IR (-O2):
define void @alloc_may_be_big2_Silenced(i32 %0) {
%2 = sext i32 %0 to i64
%3 = tail call i64 (...) @zero_to_infty()
%4 = add nsw i64 %3, %2
%5 = tail call i32 @malloc(i64 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

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


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

x86 assembly (clang, -O2):
<test_mm_comile_ss>:
jmp    1030 <_mm_comile_ss@plt>

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

LLVM IR (-O2):
define i32 @test_mm_comile_ss(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_comile_ss(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ nodelay(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ stdscr;
void init_ncurses() {
  initscr();
  curs_set(0);
  cbreak();
  noecho();
  nodelay(stdscr, TRUE);
}


x86 assembly (clang, -O0):
<init_ncurses>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <initscr@plt>
xor    %edi,%edi
call   1070 <curs_set@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    $0x0,%al
call   1060 <noecho@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
mov    0x2e60(%rip),%rax
mov    (%rax),%esi
call   1050 <nodelay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_ncurses>:
push   %rax
xor    %eax,%eax
call   1040 <initscr@plt>
xor    %edi,%edi
call   1070 <curs_set@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
xor    %eax,%eax
call   1060 <noecho@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
mov    0x2e63(%rip),%rax
mov    (%rax),%esi
pop    %rax
jmp    1050 <nodelay@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = global i32 0
define void @init_ncurses() {
%1 = call i32 (...) @initscr()
%2 = call i32 @curs_set(i32 0)
%3 = call i32 (...) @cbreak()
%4 = call i32 (...) @noecho()
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @TRUE
%7 = call i32 @nodelay(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@TRUE = global i32 0
define void @init_ncurses() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 @curs_set(i32 0)
%3 = tail call i32 (...) @cbreak()
%4 = tail call i32 (...) @noecho()
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @TRUE
%7 = tail call i32 @nodelay(i32 %5, i32 %6)
ret void
}
int intpow(int x, int p) {
  int i = 0, y = 0;
  for (i = 0; i <= p; i++) {
    y *= x;
  }
  return y;
}


x86 assembly (clang, -O0):
<intpow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1143 <intpow+0x43>
mov    -0x4(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <intpow+0x1f>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @intpow(i32 %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ glorpline(int /*<<< orphan*/ *, int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void decryptagain(FILE *temp, FILE *out) {
  char rdtok[255];
  strcpy(rdtok, "RD");
  while (glorpline(temp, out, rdtok))
    ;
}


x86 assembly (clang, -O0):
<decryptagain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x110(%rbp),%rdx
call   1040 <glorpline@plt>
cmp    $0x0,%rax
je     1169 <decryptagain+0x49>
jmp    1146 <decryptagain+0x26>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decryptagain>:
push   %r15
push   %r14
push   %rbx
sub    $0x100,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xec7(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
call   1030 <strcpy@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <glorpline@plt>
test   %rax,%rax
jne    1150 <decryptagain+0x30>
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"RD\00"
define void @decryptagain(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [255 x i8]
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %14, %2
%9 = load i32*, i32** %3
%10 = load i32*, i32** %4
%11 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%12 = call i64 @glorpline(i32* %9, i32* %10, i8* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %8
br label %8
15: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"RD\00"
define void @decryptagain(i32* %0, i32* %1) {
%3 = alloca [255 x i8]
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %6, %2
%7 = call i64 @glorpline(i32* %0, i32* %1, i8* %4)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %6
9: ; preds = %6
ret void
}