xunge/DecIR huggingface dataset:
void foo_open() {}


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

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

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

LLVM IR (-O2):
define void @foo_open() {
ret void
}
/* Variables and functions */
int parse(int, char **);
int options_parse(int argc, char *argv[]) { return parse(argc, argv); }


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

x86 assembly (clang, -O2):
<options_parse>:
jmp    1030 <parse@plt>

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

LLVM IR (-O2):
define i32 @options_parse(i32 %0, i8** %1) {
%3 = tail call i32 @parse(i32 %0, i8** %1)
ret i32 %3
}
unsigned int GetPredictionPeriodOfG729(const void *pIvrPlay) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @GetPredictionPeriodOfG729(i8* nocapture readnone %0) {
ret i32 0
}
int wpas_dbus_unregister_network(struct wpa_supplicant *wpa_s, int nid) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.wpa_supplicant = type opaque
define i32 @wpas_dbus_unregister_network(%struct.wpa_supplicant* %0, i32 %1) {
%3 = alloca %struct.wpa_supplicant*
%4 = alloca i32
store %struct.wpa_supplicant* %0, %struct.wpa_supplicant** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
define i32 @wpas_dbus_unregister_network(%struct.wpa_supplicant* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ mcb_is_last(int);
int mcb_size(int);
int mcb_next(int mcb) {
  if (mcb <= 0 || mcb_is_last(mcb))
    return 0;
  return mcb + mcb_size(mcb) + 1;
}


x86 assembly (clang, -O0):
<mcb_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1147 <mcb_next+0x27>
mov    -0x8(%rbp),%edi
call   1040 <mcb_is_last@plt>
cmp    $0x0,%rax
je     1153 <mcb_next+0x33>
movl   $0x0,-0x4(%rbp)
jmp    116e <mcb_next+0x4e>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <mcb_size@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcb_next>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
test   %edi,%edi
jle    1142 <mcb_next+0x22>
mov    %edi,%ebx
call   1040 <mcb_is_last@plt>
test   %rax,%rax
jne    1142 <mcb_next+0x22>
mov    %ebx,%edi
call   1030 <mcb_size@plt>
lea    (%rbx,%rax,1),%ebp
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @mcb_next(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i64 @mcb_is_last(i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i32 @mcb_size(i32 %0)
%8 = add nuw i32 %0, 1
%9 = add i32 %8, %7
br label %10
10: ; preds = %1, %3, %6
%11 = phi i32 [ %9, %6 ], [ 0, %3 ], [ 0, %1 ]
ret i32 %11
}
/* Type definitions */
typedef unsigned long long uint64_t;

/* Variables and functions */
uint64_t node_unsafe(uint64_t i) { return (i & (1ull << 63)); }


x86 assembly (clang, -O0):
<node_unsafe>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0x8000000000000000,%rax
and    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<node_unsafe>:
movabs $0x8000000000000000,%rax
and    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @node_unsafe(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, -9223372036854775808
ret i64 %4
}

LLVM IR (-O2):
define i64 @node_unsafe(i64 %0) {
%2 = and i64 %0, -9223372036854775808
ret i64 %2
}
/* Variables and functions */
scalar_t__ isdigit(char);
int is_number(void *dado) {
  char *string = (char *)dado;
  if (isdigit(string[0]))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1146 <is_number+0x36>
movl   $0x1,-0x4(%rbp)
jmp    114d <is_number+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_number>:
push   %rax
movsbl (%rdi),%edi
call   1030 <isdigit@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @is_number(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @isdigit(i8 signext %2)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ chroot(char *);
int main() {
  chroot("chroot-breakout-dir");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"chroot-breakout-dir\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @chroot(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"chroot-breakout-dir\00"
define i32 @main() {
%1 = tail call i32 @chroot(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int packet_byte(int nr, char *packet) {
  if (nr == 0) {
    return packet[0];
  } else {
    return ((packet[nr] << 1) | ((packet[nr + 1] & 0x80) >> 7)) & 0xff;
  }
}


x86 assembly (clang, -O0):
<packet_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1124 <packet_byte+0x24>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <packet_byte+0x57>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
shl    $0x1,%eax
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
and    $0x80,%ecx
sar    $0x7,%ecx
or     %ecx,%eax
and    $0xff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<packet_byte>:
test   %edi,%edi
je     111a <packet_byte+0x1a>
movslq %edi,%rax
movzbl (%rsi,%rax,1),%ecx
movzbl 0x1(%rsi,%rax,1),%eax
shr    $0x7,%eax
and    $0x7f,%ecx
lea    (%rax,%rcx,2),%eax
ret
movsbl (%rsi),%eax
ret

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

LLVM IR (-O2):
define i32 @packet_byte(i32 %0, i8* nocapture %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
br label %21
7: ; preds = %2
%8 = sext i32 %0 to i64
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = shl nsw i32 %11, 1
%13 = add nsw i32 %0, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %1, i64 %14
%16 = load i8, i8* %15
%17 = lshr i8 %16, 7
%18 = zext i8 %17 to i32
%19 = and i32 %12, 254
%20 = or i32 %19, %18
br label %21
21: ; preds = %7, %4
%22 = phi i32 [ %6, %4 ], [ %20, %7 ]
ret i32 %22
}
/* Variables and functions */
void *calloc(size_t, size_t);
void *c_calloc(size_t count, size_t size) {
  if (size == 0 || count == 0) {
    return NULL;
  }
  return calloc(count, size);
}


x86 assembly (clang, -O0):
<c_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1136 <c_calloc+0x26>
cmpq   $0x0,-0x10(%rbp)
jne    1143 <c_calloc+0x33>
movq   $0x0,-0x8(%rbp)
jmp    1154 <c_calloc+0x44>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @c_calloc(i64 %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %5
%7 = icmp eq i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i64, i64* %4
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8, %2
store i8* null, i8** %3
br label %16
12: ; preds = %8
%13 = load i64, i64* %4
%14 = load i64, i64* %5
%15 = call i8* @calloc(i64 %13, i64 %14)
store i8* %15, i8** %3
br label %16
16: ; preds = %12, %11
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
define noalias i8* @c_calloc(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
%4 = icmp eq i64 %0, 0
%5 = or i1 %4, %3
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i8* @calloc(i64 %0, i64 %1)
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ null, %2 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ lookNarray(char *, unsigned int);
void lookbooleanarray(char *x, int n) { lookNarray(x, (unsigned int)(n * 4)); }


x86 assembly (clang, -O0):
<lookbooleanarray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x2,%esi
call   1030 <lookNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookbooleanarray>:
shl    $0x2,%esi
jmp    1030 <lookNarray@plt>

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

LLVM IR (-O2):
define void @lookbooleanarray(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 2
%4 = tail call i32 @lookNarray(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ debug(char const *);
int /*<<< orphan*/ errno;
int __unimplemented_syscall(const char *name) {
  debug("syscall ");
  debug(name);
  debug("\n");
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<__unimplemented_syscall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <debug@plt>
mov    -0x8(%rbp),%rdi
call   1030 <debug@plt>
lea    0xed1(%rip),%rdi
call   1030 <debug@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%ecx
mov    0x2e8b(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__unimplemented_syscall>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
call   1030 <debug@plt>
mov    %rbx,%rdi
call   1030 <debug@plt>
lea    0xeda(%rip),%rdi
call   1030 <debug@plt>
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    0x2e94(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"syscall \00"
@.str.1 = [2 x i8] c"\0A\00"
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @__unimplemented_syscall(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @debug(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @debug(i8* %4)
%6 = call i32 @debug(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@.str = [9 x i8] c"syscall \00"
@.str.1 = [2 x i8] c"\0A\00"
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @__unimplemented_syscall(i8* %0) {
%2 = tail call i32 @debug(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @debug(i8* %0)
%4 = tail call i32 @debug(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}
int execute_ftruncate64() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_ftruncate64() {
ret i32 0
}
void ADCReferenceSet(unsigned long ulBase, unsigned long ulRef) {
  ;
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000038))) =
      ((*((volatile unsigned long *)(ulBase + 0x00000038))) & ~0x00000001) |
      ulRef;
}


x86 assembly (clang, -O0):
<ADCReferenceSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%rcx
and    $0xfffffffffffffffe,%rcx
or     -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x38(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCReferenceSet>:
mov    0x38(%rdi),%rax
and    $0xfffffffffffffffe,%rax
or     %rsi,%rax
mov    %rax,0x38(%rdi)
ret

LLVM IR (-O0):
define void @ADCReferenceSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = add i64 %5, 56
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = and i64 %8, -2
%10 = load i64, i64* %4
%11 = or i64 %9, %10
%12 = load i64, i64* %3
%13 = add i64 %12, 56
%14 = inttoptr i64 %13 to i64*
store volatile i64 %11, i64* %14
ret void
}

LLVM IR (-O2):
define void @ADCReferenceSet(i64 %0, i64 %1) {
%3 = add i64 %0, 56
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -2
%7 = or i64 %6, %1
store volatile i64 %7, i64* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int __rsyscall(int, int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
               int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int setreuid(uid_t ruid, uid_t euid) {
  return __rsyscall(203, ruid, euid, 0, 0, 0, 0);
}


x86 assembly (clang, -O0):
<setreuid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    $0xcb,%edi
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <__rsyscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setreuid>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
movl   $0x0,(%rsp)
mov    $0xcb,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <__rsyscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @setreuid(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 @__rsyscall(i32 203, i32 %5, i32 %6, i32 0, i32 0, i32 0, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @setreuid(i32 %0, i32 %1) {
%3 = tail call i32 @__rsyscall(i32 203, i32 %0, i32 %1, i32 0, i32 0, i32 0, i32 0)
ret i32 %3
}
/* Variables and functions */
char *mlr_malloc_or_die(int);
int snprintf(int /*<<< orphan*/ *, int /*<<< orphan*/, char *, long long);
int /*<<< orphan*/ sprintf(char *, char *, long long);
char *mlr_alloc_string_from_ll_and_format(long long value, char *fmt) {
  int n = snprintf(NULL, 0, fmt, value);
  char *string = mlr_malloc_or_die(n + 1);
  sprintf(string, fmt, value);
  return string;
}


x86 assembly (clang, -O0):
<mlr_alloc_string_from_ll_and_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <snprintf@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1040 <mlr_malloc_or_die@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1050 <sprintf@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlr_alloc_string_from_ll_and_format>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
xor    %edi,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <snprintf@plt>
lea    0x1(%rax),%edi
call   1040 <mlr_malloc_or_die@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @mlr_alloc_string_from_ll_and_format(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = load i64, i64* %3
%9 = call i32 @snprintf(i32* null, i32 0, i8* %7, i64 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = add nsw i32 %10, 1
%12 = call i8* @mlr_malloc_or_die(i32 %11)
store i8* %12, i8** %6
%13 = load i8*, i8** %6
%14 = load i8*, i8** %4
%15 = load i64, i64* %3
%16 = call i32 @sprintf(i8* %13, i8* %14, i64 %15)
%17 = load i8*, i8** %6
ret i8* %17
}

LLVM IR (-O2):
define i8* @mlr_alloc_string_from_ll_and_format(i64 %0, i8* %1) {
%3 = tail call i32 @snprintf(i32* null, i32 0, i8* %1, i64 %0)
%4 = add nsw i32 %3, 1
%5 = tail call i8* @mlr_malloc_or_die(i32 %4)
%6 = tail call i32 @sprintf(i8* dereferenceable(1) %5, i8* dereferenceable(1) %1, i64 %0)
ret i8* %5
}
int trans_7_x(int x, int y) { return x; }


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

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

LLVM IR (-O0):
define i32 @trans_7_x(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
ret i32 %5
}

LLVM IR (-O2):
define i32 @trans_7_x(i32 returned %0, i32 %1) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ ass_tk(int);
int /*<<< orphan*/ pr_token(int);
int /*<<< orphan*/ sendtype(int);
void pr_npag() {
  ass_tk(18);
  sendtype(6);
  pr_token(18);
}


x86 assembly (clang, -O0):
<pr_npag>:
push   %rbp
mov    %rsp,%rbp
mov    $0x12,%edi
call   1030 <ass_tk@plt>
mov    $0x6,%edi
call   1050 <sendtype@plt>
mov    $0x12,%edi
call   1040 <pr_token@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_npag>:
push   %rax
mov    $0x12,%edi
call   1030 <ass_tk@plt>
mov    $0x6,%edi
call   1050 <sendtype@plt>
mov    $0x12,%edi
pop    %rax
jmp    1040 <pr_token@plt>

LLVM IR (-O0):
define void @pr_npag() {
%1 = call i32 @ass_tk(i32 18)
%2 = call i32 @sendtype(i32 6)
%3 = call i32 @pr_token(i32 18)
ret void
}

LLVM IR (-O2):
define void @pr_npag() {
%1 = tail call i32 @ass_tk(i32 18)
%2 = tail call i32 @sendtype(i32 6)
%3 = tail call i32 @pr_token(i32 18)
ret void
}
int test_imm_36uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x36 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_36uint64_lowword_reg>:
test   $0x36,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_36uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 54
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ PressStart_confirm();
void press_any_shift() { PressStart_confirm(); }


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

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

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

LLVM IR (-O2):
define void @press_any_shift() {
%1 = tail call i32 (...) @PressStart_confirm()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stdout;
void usrError(const char *msg) {
  fprintf(stdout, "%s\n\n", msg);
  exit(0);
}


x86 assembly (clang, -O0):
<usrError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usrError>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [5 x i8] c"%s\0A\0A\00"
define void @usrError(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
void ft_strclr(char *s) {
  if (s)
    while (*s)
      *s++ = 0;
}


x86 assembly (clang, -O0):
<ft_strclr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1141 <ft_strclr+0x41>
jmp    1118 <ft_strclr+0x18>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113c <ft_strclr+0x3c>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
jmp    1118 <ft_strclr+0x18>
jmp    1141 <ft_strclr+0x41>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strclr>:
test   %rdi,%rdi
je     111d <ft_strclr+0x1d>
cmpb   $0x0,(%rdi)
je     111d <ft_strclr+0x1d>
add    $0x1,%rdi
xchg   %ax,%ax
movb   $0x0,-0x1(%rdi)
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <ft_strclr+0x10>
ret

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

LLVM IR (-O2):
define void @ft_strclr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %8, %6 ], [ %0, %3 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 0, i8* %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %3, %1
ret void
}
void restorer(int unused) {
  __asm__("movl 0x8(%ebp),%edx\n\t");
  __asm__("movl 0xc(%ebp),%ecx\n\t");
  __asm__("movl 0x10(%ebp),%eax\n\t");
  __asm__("add $0x14,%ebp\n\t");
  __asm__("movl %ebp,%esp\n\t");
}


x86 assembly (clang, -O0):
<restorer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x8(%ebp),%edx
mov    0xc(%ebp),%ecx
mov    0x10(%ebp),%eax
add    $0x14,%ebp
mov    %ebp,%esp
pop    %rbp
ret

x86 assembly (clang, -O2):
<restorer>:
mov    0x8(%ebp),%edx
mov    0xc(%ebp),%ecx
mov    0x10(%ebp),%eax
add    $0x14,%ebp
mov    %ebp,%esp
ret

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

LLVM IR (-O2):
define void @restorer(i32 %0) {
tail call void asm sideeffect "movl 0x8(%ebp),%edx\0A\09", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "movl 0xc(%ebp),%ecx\0A\09", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "movl 0x10(%ebp),%eax\0A\09", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "add $$0x14,%ebp\0A\09", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "movl %ebp,%esp\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
char *RCSid() {
  return RCSid("$Id: dynarray.c,v 1.11 2004/07/01 17:10:04 broeker Exp $");
}


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

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

LLVM IR (-O0):
@.str = [57 x i8] c"$Id: dynarray.c,v 1.11 2004/07/01 17:10:04 broeker Exp $\00"
define i8* @RCSid() {
%1 = call i8* (i8*, ...) bitcast (i8* ()* @RCSid to i8* (i8*, ...)*)(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @RCSid() {
br label %1
1: ; preds = %1, %0
br label %1
}
int test_imm_A9uint8_reg(unsigned char val) {
  return ((val) & (0xA9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A9uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xa9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A9uint8_reg>:
test   $0xa9,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A9uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 169
%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_A9uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -87
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ whilst(char *);
int main() {
  char *c;
  whilst(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <whilst@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @whilst(i8* undef)
ret i32 0
}
/* Variables and functions */
int DoVprintf(char const *, void *);
int /*<<< orphan*/ Fail(char *, int, int);
int strlen(char const *);
void DoPointerTest(const char *formatstr, void *param, char *paramstr,
                   const char *checkstr1) {
  int ret;
  ret = DoVprintf(formatstr, param);
  if (ret != strlen(checkstr1)) {
    Fail("Expected vprintf to return %d, got %d.\n", strlen(checkstr1), ret);
  }
}


x86 assembly (clang, -O0):
<DoPointerTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <DoVprintf@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
cmp    %ecx,%eax
je     118e <DoPointerTest+0x5e>
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    -0x24(%rbp),%edx
lea    0xe77(%rip),%rdi
call   1050 <Fail@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoPointerTest>:
push   %rbp
push   %rbx
push   %rax
mov    %rcx,%rbx
call   1040 <DoVprintf@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    %eax,%ebp
jne    1150 <DoPointerTest+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <Fail@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Expected vprintf to return %d, got %d.\0A\00"
define void @DoPointerTest(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = call i32 @DoVprintf(i8* %10, i8* %11)
store i32 %12, i32* %9
%13 = load i32, i32* %9
%14 = load i8*, i8** %8
%15 = call i32 @strlen(i8* %14)
%16 = icmp ne i32 %13, %15
br i1 %16, label %17, label %22
17: ; preds = %4
%18 = load i8*, i8** %8
%19 = call i32 @strlen(i8* %18)
%20 = load i32, i32* %9
%21 = call i32 @Fail(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %19, i32 %20)
br label %22
22: ; preds = %17, %4
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"Expected vprintf to return %d, got %d.\0A\00"
define void @DoPointerTest(i8* %0, i8* %1, i8* nocapture readnone %2, i8* %3) {
%5 = tail call i32 @DoVprintf(i8* %0, i8* %1)
%6 = tail call i32 @strlen(i8* %3)
%7 = icmp eq i32 %5, %6
br i1 %7, label %11, label %8
8: ; preds = %4
%9 = tail call i32 @strlen(i8* %3)
%10 = tail call i32 @Fail(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %5)
br label %11
11: ; preds = %8, %4
ret void
}
int stage_getUp(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @stage_getUp() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Msp430ClockP__Msp430ClockInit__defaultInitTimerA();
void Msp430ClockP__Msp430ClockInit__default__initTimerA(void) {
  Msp430ClockP__Msp430ClockInit__defaultInitTimerA();
}


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

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

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

LLVM IR (-O2):
define void @Msp430ClockP__Msp430ClockInit__default__initTimerA() {
%1 = tail call i32 (...) @Msp430ClockP__Msp430ClockInit__defaultInitTimerA()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display_at(char *, int, int);
void display(char *message) { display_at(message, -1, -1); }


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

x86 assembly (clang, -O2):
<display>:
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
jmp    1030 <display_at@plt>

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

LLVM IR (-O2):
define void @display(i8* %0) {
%2 = tail call i32 @display_at(i8* %0, i32 -1, i32 -1)
ret void
}
int ui_mouse_grab(int startup) {
  (void)startup;
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @ui_mouse_grab(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int ubaci5(int, int, int);
int main() {
  int n, a, b;
  printf("Unesite elemente n, a i b: ");
  scanf("%d %d %d", &n, &a, &b);
  printf("%d", ubaci5(n, a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <ubaci5@plt>
mov    %eax,%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
call   1040 <ubaci5@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Unesite elemente n, a i b: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @ubaci5(i32 %7, i32 %8, i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Unesite elemente n, a i b: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @ubaci5(i32 %9, i32 %10, i32 %11)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ colorRGB(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/);
int /*<<< orphan*/ drawBox(int /*<<< orphan*/, int /*<<< orphan*/, int, int,
                           int /*<<< orphan*/);
void clearColorBuf() { drawBox(0, 0, 320, 240, colorRGB(0, 0, 0)); }


x86 assembly (clang, -O0):
<clearColorBuf>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1030 <colorRGB@plt>
mov    %eax,%r8d
xor    %esi,%esi
mov    $0x140,%edx
mov    $0xf0,%ecx
mov    %esi,%edi
call   1040 <drawBox@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearColorBuf>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <colorRGB@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x140,%edx
mov    $0xf0,%ecx
mov    %eax,%r8d
pop    %rax
jmp    1040 <drawBox@plt>

LLVM IR (-O0):
define void @clearColorBuf() {
%1 = call i32 @colorRGB(i32 0, i32 0, i32 0)
%2 = call i32 @drawBox(i32 0, i32 0, i32 320, i32 240, i32 %1)
ret void
}

LLVM IR (-O2):
define void @clearColorBuf() {
%1 = tail call i32 @colorRGB(i32 0, i32 0, i32 0)
%2 = tail call i32 @drawBox(i32 0, i32 0, i32 320, i32 240, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void traceCallback(void *NotUsed, const char *zSql) { printf("%s;\n", zSql); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s;\0A\00"
define void @traceCallback(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void SysCtlBrownOutConfigSet(unsigned long ulConfig, unsigned long ulDelay) {
  DEBUG_ASSERT(!(ulConfig & ~(0x00000002 | 0x00000001)));
  DEBUG_ASSERT(ulDelay < 8192);
  (*((volatile unsigned long *)(0x400FE030))) = (ulDelay << 2) | ulConfig;
}


x86 assembly (clang, -O0):
<SysCtlBrownOutConfigSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    $0xfffffffffffffffc,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
cmpq   $0x2000,-0x10(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rcx
shl    $0x2,%rcx
or     -0x8(%rbp),%rcx
mov    $0x400fe030,%eax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlBrownOutConfigSet>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %edi,%edi
cmp    $0x4,%r14
setb   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
cmp    $0x2000,%rbx
setb   %dil
call   1030 <DEBUG_ASSERT@plt>
shl    $0x2,%rbx
or     %r14,%rbx
mov    %rbx,0x400fe030
40
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @SysCtlBrownOutConfigSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = and i64 %5, -4
%7 = icmp ne i64 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
%10 = call i32 @DEBUG_ASSERT(i32 %9)
%11 = load i64, i64* %4
%12 = icmp ult i64 %11, 8192
%13 = zext i1 %12 to i32
%14 = call i32 @DEBUG_ASSERT(i32 %13)
%15 = load i64, i64* %4
%16 = shl i64 %15, 2
%17 = load i64, i64* %3
%18 = or i64 %16, %17
store volatile i64 %18, i64* inttoptr (i64 1074782256 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlBrownOutConfigSet(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, 4
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = icmp ult i64 %1, 8192
%7 = zext i1 %6 to i32
%8 = tail call i32 @DEBUG_ASSERT(i32 %7)
%9 = shl i64 %1, 2
%10 = or i64 %9, %0
store volatile i64 %10, i64* inttoptr (i64 1074782256 to i64*)
ret void
}
/* Variables and functions */
scalar_t__ read_input(int /*<<< orphan*/, int);
int /*<<< orphan*/ save_with_output();
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ wprintf(char *);
void input_new_data(void) {
  wprintf(L"inputting new data, Control-D to stop\n");
  while (read_input(stdin, true) == 0)
    ;
  save_with_output();
}


x86 assembly (clang, -O0):
<input_new_data>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <wprintf@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1050 <read_input@plt>
cmp    $0x0,%rax
jne    1162 <input_new_data+0x32>
jmp    1140 <input_new_data+0x10>
mov    $0x0,%al
call   1030 <save_with_output@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<input_new_data>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <wprintf@plt>
mov    0x2ea4(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rbx),%edi
mov    $0x1,%esi
call   1050 <read_input@plt>
test   %rax,%rax
je     1150 <input_new_data+0x20>
xor    %eax,%eax
pop    %rbx
jmp    1030 <save_with_output@plt>

LLVM IR (-O0):
@.str = [39 x i32] [i32 105, i32 110, i32 112, i32 117, i32 116, i32 116, i32 105, i32 110, i32 103, i32 32, i32 110, i32 101, i32 119, i32 32, i32 100, i32 97, i32 116, i32 97, i32 44, i32 32, i32 67, i32 111, i32 110, i32 116, i32 114, i32 111, i32 108, i32 45, i32 68, i32 32, i32 116, i32 111, i32 32, i32 115, i32 116, i32 111, i32 112, i32 10, i32 0]
@stdin = global i32 0
define void @input_new_data() {
%1 = call i32 @wprintf(i8* bitcast ([39 x i32]* @.str to i8*))
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* @stdin
%4 = call i64 @read_input(i32 %3, i32 1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
%8 = call i32 (...) @save_with_output()
ret void
}

LLVM IR (-O2):
@.str = [39 x i32] [i32 105, i32 110, i32 112, i32 117, i32 116, i32 116, i32 105, i32 110, i32 103, i32 32, i32 110, i32 101, i32 119, i32 32, i32 100, i32 97, i32 116, i32 97, i32 44, i32 32, i32 67, i32 111, i32 110, i32 116, i32 114, i32 111, i32 108, i32 45, i32 68, i32 32, i32 116, i32 111, i32 32, i32 115, i32 116, i32 111, i32 112, i32 10, i32 0]
@stdin = global i32 0
define void @input_new_data() {
%1 = tail call i32 @wprintf(i8* bitcast ([39 x i32]* @.str to i8*))
br label %2
2: ; preds = %2, %0
%3 = load i32, i32* @stdin
%4 = tail call i64 @read_input(i32 %3, i32 1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = tail call i32 (...) @save_with_output()
ret void
}
/* Type definitions */
struct sr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ update_sr(struct sr *);
void next_codeword(struct sr *s) {
  size_t i;
  for (i = 0; i < 256; i++) {
    update_sr(s);
  }
}


x86 assembly (clang, -O0):
<next_codeword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x100,-0x10(%rbp)
jae    114c <next_codeword+0x3c>
mov    -0x8(%rbp),%rdi
call   1030 <update_sr@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <next_codeword+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_codeword>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x100,%ebx
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <update_sr@plt>
add    $0xffffffffffffffff,%rbx
jne    1120 <next_codeword+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.sr = type { i32 }
define void @next_codeword(%struct.sr* %0) {
%2 = alloca %struct.sr*
%3 = alloca i64
store %struct.sr* %0, %struct.sr** %2
store i64 0, i64* %3
br label %4
4: ; preds = %10, %1
%5 = load i64, i64* %3
%6 = icmp ult i64 %5, 256
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load %struct.sr*, %struct.sr** %2
%9 = call i32 @update_sr(%struct.sr* %8)
br label %10
10: ; preds = %7
%11 = load i64, i64* %3
%12 = add i64 %11, 1
store i64 %12, i64* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
%struct.sr = type { i32 }
define void @next_codeword(%struct.sr* %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %5, %2 ]
%4 = tail call i32 @update_sr(%struct.sr* %0)
%5 = add nuw nsw i64 %3, 1
%6 = icmp eq i64 %5, 256
br i1 %6, label %7, label %2
7: ; preds = %2
ret void
}
int min(int x, int y) { return (x <= y) ? x : y; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1121 <min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

LLVM IR (-O0):
define i32 @min(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 = icmp sle i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
scalar_t__ getpid();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int init_rand() {
  unsigned int now = (unsigned int)time(NULL);
  srand(now ^ (unsigned int)getpid());
  return 0;
}


x86 assembly (clang, -O0):
<init_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x8(%rbp),%edi
xor    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_rand>:
push   %rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
xor    %eax,%ebx
mov    %ebx,%edi
call   1040 <srand@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @init_rand() {
%1 = alloca i32
%2 = call i64 @time(i32* null)
%3 = trunc i64 %2 to i32
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i64 (...) @getpid()
%6 = trunc i64 %5 to i32
%7 = xor i32 %4, %6
%8 = call i32 @srand(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @init_rand() {
%1 = tail call i64 @time(i32* null)
%2 = tail call i64 (...) @getpid()
%3 = xor i64 %2, %1
%4 = trunc i64 %3 to i32
%5 = tail call i32 @srand(i32 %4)
ret i32 0
}