xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ puthex(int, unsigned int);
void puthex8(unsigned char v) { puthex(2, (unsigned int)v); }


x86 assembly (clang, -O0):
<puthex8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%esi
mov    $0x2,%edi
call   1030 <puthex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puthex8>:
mov    %edi,%esi
mov    $0x2,%edi
jmp    1030 <puthex@plt>

LLVM IR (-O0):
define void @puthex8(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = call i32 @puthex(i32 2, i32 %4)
ret void
}

LLVM IR (-O2):
define void @puthex8(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = tail call i32 @puthex(i32 2, i32 %2)
ret void
}
void cat0(int a[0]) {}


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

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

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

LLVM IR (-O2):
define void @cat0(i32* nocapture %0) {
ret void
}
void XtCvtStringToFile() {}


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

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

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

LLVM IR (-O2):
define void @XtCvtStringToFile() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_string(char *);
char *l_askNbytes(int /*<<< orphan*/, char *, int /*<<< orphan*/,
                  int /*<<< orphan*/);
char *macrmjob(char *arg) { return l_askNbytes(get_string(arg), "65", 0, 0); }


x86 assembly (clang, -O0):
<macrmjob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_string@plt>
mov    %eax,%edi
lea    0xec2(%rip),%rsi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <l_askNbytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macrmjob>:
push   %rax
call   1040 <get_string@plt>
lea    0xed3(%rip),%rsi
mov    %eax,%edi
xor    %edx,%edx
xor    %ecx,%ecx
pop    %rax
jmp    1030 <l_askNbytes@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"65\00"
define i8* @macrmjob(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @get_string(i8* %3)
%5 = call i8* @l_askNbytes(i32 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
ret i8* %5
}

LLVM IR (-O2):
@.str = [3 x i8] c"65\00"
define i8* @macrmjob(i8* %0) {
%2 = tail call i32 @get_string(i8* %0)
%3 = tail call i8* @l_askNbytes(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
ret i8* %3
}
void RTStrToUtf16ExTag(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrToUtf16ExTag() {
ret void
}
void VMR3SetCpuExecutionCap(void) {}


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

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

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

LLVM IR (-O2):
define void @VMR3SetCpuExecutionCap() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
long double mxit() {
  exit(0);
  return (0.0L);
}


x86 assembly (clang, -O0):
<mxit>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<mxit>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define x86_fp80 @mxit() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define x86_fp80 @mxit() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct pollfd {
  int dummy;
};
typedef int /*<<< orphan*/ nfds_t;

/* Variables and functions */
int errno;
int poll(struct pollfd *, int /*<<< orphan*/, int);
int __sulong_posix_poll(struct pollfd *fds, nfds_t nfds, int timeout) {
  {
    int native_errno = errno;
    int result = poll(fds, nfds, timeout);
    if (result == (int)-1) {
      result = (int)(long)-errno;
    }
    errno = native_errno;
    return result;
  };
}


x86 assembly (clang, -O0):
<__sulong_posix_poll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <poll@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    115a <__sulong_posix_poll+0x4a>
xor    %eax,%eax
mov    0x2e8d(%rip),%rcx
sub    (%rcx),%eax
cltq
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
mov    0x2e7c(%rip),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sulong_posix_poll>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ec6(%rip),%rbx
mov    (%rbx),%ebp
call   1030 <poll@plt>
xor    %ecx,%ecx
sub    (%rbx),%ecx
cmp    $0xffffffff,%eax
cmove  %ecx,%eax
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pollfd = type { i32 }
@errno = global i32 0
define i32 @__sulong_posix_poll(%struct.pollfd* %0, i32 %1, i32 %2) {
%4 = alloca %struct.pollfd*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct.pollfd* %0, %struct.pollfd** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* @errno
store i32 %9, i32* %7
%10 = load %struct.pollfd*, %struct.pollfd** %4
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = call i32 @poll(%struct.pollfd* %10, i32 %11, i32 %12)
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %21
16: ; preds = %3
%17 = load i32, i32* @errno
%18 = sub nsw i32 0, %17
%19 = sext i32 %18 to i64
%20 = trunc i64 %19 to i32
store i32 %20, i32* %8
br label %21
21: ; preds = %16, %3
%22 = load i32, i32* %7
store i32 %22, i32* @errno
%23 = load i32, i32* %8
ret i32 %23
}

LLVM IR (-O2):
%struct.pollfd = type { i32 }
@errno = global i32 0
define i32 @__sulong_posix_poll(%struct.pollfd* %0, i32 %1, i32 %2) {
%4 = load i32, i32* @errno
%5 = tail call i32 @poll(%struct.pollfd* %0, i32 %1, i32 %2)
%6 = icmp eq i32 %5, -1
%7 = load i32, i32* @errno
%8 = sub nsw i32 0, %7
%9 = select i1 %6, i32 %8, i32 %5
store i32 %4, i32* @errno
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
uint32_t SysCtlResetBehaviorGet(void) {
  return ((*((volatile uint32_t *)(0x400FE1D8))));
}


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

x86 assembly (clang, -O2):
<SysCtlResetBehaviorGet>:
mov    0x400fe1d8,%eax
ret

LLVM IR (-O0):
define i32 @SysCtlResetBehaviorGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074782680 to i32*)
ret i32 %1
}

LLVM IR (-O2):
define i32 @SysCtlResetBehaviorGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074782680 to i32*)
ret i32 %1
}
/* Variables and functions */
scalar_t__ CallBack2(int, void *, void *);
int /*<<< orphan*/ CheckRunningInMainThread(char *);
int ResourceToActualItem(int igorMenuID, int resourceItemNumber) {
  if (!CheckRunningInMainThread("ResourceToActualItem"))
    return 0;
  return (int)CallBack2(63, (void *)igorMenuID, (void *)resourceItemNumber);
}


x86 assembly (clang, -O0):
<ResourceToActualItem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xecb(%rip),%rdi
call   1030 <CheckRunningInMainThread@plt>
cmp    $0x0,%eax
jne    114f <ResourceToActualItem+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1164 <ResourceToActualItem+0x44>
movslq -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x3f,%edi
call   1040 <CallBack2@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ResourceToActualItem>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
call   1030 <CheckRunningInMainThread@plt>
test   %eax,%eax
je     1149 <ResourceToActualItem+0x29>
movslq %ebp,%rsi
movslq %ebx,%rdx
mov    $0x3f,%edi
call   1040 <CallBack2@plt>
jmp    114b <ResourceToActualItem+0x2b>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"ResourceToActualItem\00"
define i32 @ResourceToActualItem(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 @CheckRunningInMainThread(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %2
store i32 0, i32* %3
br label %18
9: ; preds = %2
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i8*
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
%16 = call i64 @CallBack2(i32 63, i8* %12, i8* %15)
%17 = trunc i64 %16 to i32
store i32 %17, i32* %3
br label %18
18: ; preds = %9, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [21 x i8] c"ResourceToActualItem\00"
define i32 @ResourceToActualItem(i32 %0, i32 %1) {
%3 = tail call i32 @CheckRunningInMainThread(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = sext i32 %0 to i64
%7 = inttoptr i64 %6 to i8*
%8 = sext i32 %1 to i64
%9 = inttoptr i64 %8 to i8*
%10 = tail call i64 @CallBack2(i32 63, i8* %7, i8* %9)
%11 = trunc i64 %10 to i32
br label %12
12: ; preds = %2, %5
%13 = phi i32 [ %11, %5 ], [ 0, %2 ]
ret i32 %13
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ INIT_LIST_HEAD(struct list_head *);
int /*<<< orphan*/ clist_replace(struct list_head *, struct list_head *);
void clist_replace_init(struct list_head *old, struct list_head *elem) {
  clist_replace(old, elem);
  INIT_LIST_HEAD(old);
}


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

x86 assembly (clang, -O2):
<clist_replace_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <clist_replace@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <INIT_LIST_HEAD@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @clist_replace_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = load %struct.list_head*, %struct.list_head** %4
%7 = call i32 @clist_replace(%struct.list_head* %5, %struct.list_head* %6)
%8 = load %struct.list_head*, %struct.list_head** %3
%9 = call i32 @INIT_LIST_HEAD(%struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @clist_replace_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @clist_replace(%struct.list_head* %0, %struct.list_head* %1)
%4 = tail call i32 @INIT_LIST_HEAD(%struct.list_head* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ passem(int, int, int, int *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int res;
  passem(5, 10, 40, &res);
  printf("Fifty five is %d\n", res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
mov    $0xa,%esi
mov    $0x28,%edx
lea    -0x8(%rbp),%rcx
call   1040 <passem@plt>
mov    -0x8(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rcx
mov    $0x5,%edi
mov    $0xa,%esi
mov    $0x28,%edx
call   1040 <passem@plt>
mov    0x4(%rsp),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Fifty five is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @passem(i32 5, i32 10, i32 40, i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Fifty five is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @passem(i32 5, i32 10, i32 40, i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
unsigned prod(const unsigned *const v, unsigned n) {
  unsigned p = 1;
  const unsigned *c = v + n;
  while (c-- > v)
    p *= *c;
  return p;
}


x86 assembly (clang, -O0):
<prod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x18(%rbp)
cmp    -0x8(%rbp),%rax
jbe    114f <prod+0x4f>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <prod+0x24>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prod>:
test   %esi,%esi
je     111e <prod+0x1e>
mov    %esi,%eax
lea    (%rdi,%rax,4),%rcx
mov    $0x1,%eax
nop
imul   -0x4(%rcx),%eax
add    $0xfffffffffffffffc,%rcx
cmp    %rdi,%rcx
ja     1110 <prod+0x10>
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @prod(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 1, i32* %5
%7 = load i32*, i32** %3
%8 = load i32, i32* %4
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
store i32* %10, i32** %6
br label %11
11: ; preds = %16, %2
%12 = load i32*, i32** %6
%13 = getelementptr inbounds i32, i32* %12, i32 -1
store i32* %13, i32** %6
%14 = load i32*, i32** %3
%15 = icmp ugt i32* %12, %14
br i1 %15, label %16, label %21
16: ; preds = %11
%17 = load i32*, i32** %6
%18 = load i32, i32* %17
%19 = load i32, i32* %5
%20 = mul i32 %19, %18
store i32 %20, i32* %5
br label %11
21: ; preds = %11
%22 = load i32, i32* %5
ret i32 %22
}

LLVM IR (-O2):
define i32 @prod(i32* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
br label %7
7: ; preds = %4, %7
%8 = phi i32* [ %10, %7 ], [ %6, %4 ]
%9 = phi i32 [ %12, %7 ], [ 1, %4 ]
%10 = getelementptr inbounds i32, i32* %8, i64 -1
%11 = load i32, i32* %10
%12 = mul i32 %11, %9
%13 = icmp ugt i32* %10, %0
br i1 %13, label %7, label %14
14: ; preds = %7, %2
%15 = phi i32 [ 1, %2 ], [ %12, %7 ]
ret i32 %15
}
void SHA256_Final(void) {}


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

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

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

LLVM IR (-O2):
define void @SHA256_Final() {
ret void
}
int adjustLevel(const int level, const int maxLevel) {
  if (level >= 1000)
    return (level);
  if (level > maxLevel)
    return (maxLevel);
  return (level);
}


x86 assembly (clang, -O0):
<adjustLevel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jl     1122 <adjustLevel+0x22>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113f <adjustLevel+0x3f>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1139 <adjustLevel+0x39>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113f <adjustLevel+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adjustLevel>:
mov    %esi,%eax
cmp    %esi,%edi
cmovle %edi,%eax
cmp    $0x3e8,%edi
cmovge %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @adjustLevel(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 999
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %1, i32 %0
%6 = select i1 %3, i32 %0, i32 %5
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ CRYPTO_THREADID;

/* Variables and functions */
int /*<<< orphan*/ CRYPTO_THREADID_set_numeric(int /*<<< orphan*/ *,
                                               unsigned long);
scalar_t__ pthread_self();
void thread_id_cb(CRYPTO_THREADID *tid) {
  CRYPTO_THREADID_set_numeric(tid, (unsigned long)pthread_self());
}


x86 assembly (clang, -O0):
<thread_id_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    -0x10(%rbp),%rdi
mov    %rax,%rsi
call   1030 <CRYPTO_THREADID_set_numeric@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_id_cb>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <pthread_self@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <CRYPTO_THREADID_set_numeric@plt>

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

LLVM IR (-O2):
define void @thread_id_cb(i32* %0) {
%2 = tail call i64 (...) @pthread_self()
%3 = tail call i32 @CRYPTO_THREADID_set_numeric(i32* %0, i64 %2)
ret void
}
int smaller(int a, int b) { return a < b ? a : b; }


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

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

LLVM IR (-O0):
define i32 @smaller(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 slt 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 @smaller(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __rte_slub_free(void *);
void rte_free(void *ptr) { __rte_slub_free(ptr); }


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

x86 assembly (clang, -O2):
<rte_free>:
jmp    1030 <__rte_slub_free@plt>

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

LLVM IR (-O2):
define void @rte_free(i8* %0) {
%2 = tail call i32 @__rte_slub_free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ app_init(char *, int);
int dpdk_linux_tcpip_init(int, char **);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int ret = dpdk_linux_tcpip_init(argc, argv);
  if (ret < 0) {
    printf("Invalid arguments\n");
    return 1;
  }
  app_init("192.168.1.2", 7777);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <dpdk_linux_tcpip_init@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1177 <main+0x47>
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    118f <main+0x5f>
lea    0xe95(%rip),%rdi
mov    $0x1e61,%esi
call   1030 <app_init@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1050 <dpdk_linux_tcpip_init@plt>
test   %eax,%eax
js     114f <main+0x1f>
lea    0xebf(%rip),%rdi
mov    $0x1e61,%esi
call   1030 <app_init@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb6(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Invalid arguments\0A\00"
@.str.1 = [12 x i8] c"192.168.1.2\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @dpdk_linux_tcpip_init(i32 %7, i8** %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %16
14: ; preds = %2
%15 = call i32 @app_init(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 7777)
store i32 0, i32* %3
br label %16
16: ; preds = %14, %12
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"192.168.1.2\00"
@str = [18 x i8] c"Invalid arguments\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @dpdk_linux_tcpip_init(i32 %0, i8** %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %9
7: ; preds = %2
%8 = tail call i32 @app_init(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 7777)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ 1, %5 ], [ 0, %7 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Py_Finalize();
int /*<<< orphan*/ Py_Initialize();
int main(void) {
  Py_Initialize();
  Py_Finalize();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @Py_Initialize()
%3 = call i32 (...) @Py_Finalize()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Py_Initialize()
%2 = tail call i32 (...) @Py_Finalize()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ waitpid(int /*<<< orphan*/, int *, int /*<<< orphan*/);
pid_t wait(int *status) { return waitpid((pid_t)-1, status, 0); }


x86 assembly (clang, -O0):
<wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0xffffffff,%edi
xor    %edx,%edx
call   1030 <waitpid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait>:
mov    %rdi,%rsi
mov    $0xffffffff,%edi
xor    %edx,%edx
jmp    1030 <waitpid@plt>

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

LLVM IR (-O2):
define i32 @wait(i32* %0) {
%2 = tail call i32 @waitpid(i32 -1, i32* %0, i32 0)
ret i32 %2
}
void cvmx_debug_memory_change_core(int oldcore, int newcore) {}


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

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

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

LLVM IR (-O2):
define void @cvmx_debug_memory_change_core(i32 %0, i32 %1) {
ret void
}
void MergeUVRow_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @MergeUVRow_Any_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ restart(int);
void RST_08() { restart(0x08); }


x86 assembly (clang, -O0):
<RST_08>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
call   1030 <restart@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RST_08>:
mov    $0x8,%edi
jmp    1030 <restart@plt>

LLVM IR (-O0):
define void @RST_08() {
%1 = call i32 @restart(i32 8)
ret void
}

LLVM IR (-O2):
define void @RST_08() {
%1 = tail call i32 @restart(i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Drivers_SoundMusic_Uninit();
int /*<<< orphan*/ Drivers_Voice_Uninit();
void Drivers_All_Uninit(void) {
  Drivers_SoundMusic_Uninit();
  Drivers_Voice_Uninit();
}


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

x86 assembly (clang, -O2):
<Drivers_All_Uninit>:
push   %rax
xor    %eax,%eax
call   1040 <Drivers_SoundMusic_Uninit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <Drivers_Voice_Uninit@plt>

LLVM IR (-O0):
define void @Drivers_All_Uninit() {
%1 = call i32 (...) @Drivers_SoundMusic_Uninit()
%2 = call i32 (...) @Drivers_Voice_Uninit()
ret void
}

LLVM IR (-O2):
define void @Drivers_All_Uninit() {
%1 = tail call i32 (...) @Drivers_SoundMusic_Uninit()
%2 = tail call i32 (...) @Drivers_Voice_Uninit()
ret void
}
void flip_bit(void *p, int i) {
  char *tab = (char *)p;
  *(tab + i / 8) = (*(tab + i / 8)) ^ (1 << i % 8);
}


x86 assembly (clang, -O0):
<flip_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x28(%rbp),%eax
mov    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
mov    %al,-0x21(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x21(%rbp),%dl
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<flip_bit>:
mov    %esi,%ecx
lea    0x7(%rcx),%eax
test   %esi,%esi
cmovns %esi,%eax
sar    $0x3,%eax
and    $0x7,%cl
mov    $0x1,%edx
shl    %cl,%edx
cltq
xor    %dl,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @flip_bit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = load i32, i32* %4
%9 = sdiv i32 %8, 8
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %7, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = load i32, i32* %4
%15 = srem i32 %14, 8
%16 = shl i32 1, %15
%17 = xor i32 %13, %16
%18 = trunc i32 %17 to i8
%19 = load i8*, i8** %5
%20 = load i32, i32* %4
%21 = sdiv i32 %20, 8
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %19, i64 %22
store i8 %18, i8* %23
ret void
}

LLVM IR (-O2):
define void @flip_bit(i8* nocapture %0, i32 %1) {
%3 = sdiv i32 %1, 8
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = and i32 %1, 7
%8 = shl nuw nsw i32 1, %7
%9 = trunc i32 %8 to i8
%10 = xor i8 %6, %9
store i8 %10, i8* %5
ret void
}
unsigned xrop3_10_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = ~T;
  stk1 = D & stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_10_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
and    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_10_0_0>:
not    %sil
movzbl %sil,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_10_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = load i8, i8* %4
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = xor i32 %15, -1
store i32 %16, i32* %8
%17 = load i32, i32* %5
%18 = load i32, i32* %8
%19 = and i32 %17, %18
store i32 %19, i32* %7
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @xrop3_10_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = xor i8 %1, -1
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ C();
int F() { C(); }


x86 assembly (clang, -O0):
<F>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <C@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @F() {
%1 = alloca i32
%2 = call i32 (...) @C()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @F() {
%1 = tail call i32 (...) @C()
ret i32 undef
}
int isinff(float x) { return __builtin_isinf(x); }


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

x86 assembly (clang, -O2):
<isinff>:
andps  0xef9(%rip),%xmm0
xor    %eax,%eax
ucomiss 0xf00(%rip),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @isinff(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.fabs.f32(float %3)
%5 = fcmp oeq float %4, 0x7FF0000000000000
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @isinff(float %0) {
%2 = tail call float @llvm.fabs.f32(float %0)
%3 = fcmp oeq float %2, 0x7FF0000000000000
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned long long rdtsc(void) {
  unsigned int a, d;
  __asm__ __volatile__("rdtsc" : "=a"(a), "=d"(d));
  return ((unsigned long long)a) | (((unsigned long long)d) << 32);
}


x86 assembly (clang, -O0):
<rdtsc>:
push   %rbp
mov    %rsp,%rbp
rdtsc
mov    %eax,-0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdtsc>:
rdtsc
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @rdtsc() {
%1 = alloca i32
%2 = alloca i32
%3 = call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%4 = extractvalue { i32, i32 } %3, 0
%5 = extractvalue { i32, i32 } %3, 1
store i32 %4, i32* %1
store i32 %5, i32* %2
%6 = load i32, i32* %1
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = shl i64 %9, 32
%11 = or i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @rdtsc() {
%1 = tail call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = zext i32 %2 to i64
%5 = zext i32 %3 to i64
%6 = shl nuw i64 %5, 32
%7 = or i64 %6, %4
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int open(char *, int /*<<< orphan*/);
int main(void) {
  int fd;
  fd = open("/Users/aaa/cprograms/systemProgramming", O_RDONLY);
  if (fd == -1)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <open@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    114d <main+0x3d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1154 <main+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <open@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"/Users/aaa/cprograms/systemProgramming\00"
@O_RDONLY = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @O_RDONLY
%4 = call i32 @open(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 -1, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [39 x i8] c"/Users/aaa/cprograms/systemProgramming\00"
@O_RDONLY = global i32 0
define i32 @main() {
%1 = load i32, i32* @O_RDONLY
%2 = tail call i32 @open(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i32 %2, -1
%4 = sext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
double kth_element_copy(int, int, double *);
double median_copy(int n, double *arr) {
  return kth_element_copy(n, n / 2, arr);
}


x86 assembly (clang, -O0):
<median_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
call   1030 <kth_element_copy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<median_copy>:
mov    %rsi,%rdx
mov    %edi,%esi
shr    $0x1f,%esi
add    %edi,%esi
sar    %esi
jmp    1030 <kth_element_copy@plt>

LLVM IR (-O0):
define double @median_copy(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
store i32 %0, i32* %3
store double* %1, double** %4
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = sdiv i32 %6, 2
%8 = load double*, double** %4
%9 = call double @kth_element_copy(i32 %5, i32 %7, double* %8)
ret double %9
}

LLVM IR (-O2):
define double @median_copy(i32 %0, double* %1) {
%3 = sdiv i32 %0, 2
%4 = tail call double @kth_element_copy(i32 %0, i32 %3, double* %1)
ret double %4
}
void *run_shell(const char *cmd) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @run_shell(i8* nocapture readnone %0) {
ret i8* undef
}
int cli_is_assign(char *p) { return (*p == '='); }


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

x86 assembly (clang, -O2):
<cli_is_assign>:
xor    %eax,%eax
cmpb   $0x3d,(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @cli_is_assign(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 61
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ record_linux_param_description(char *, char *, char *);
void module_param_desc_fast_convergence(void) {
  record_linux_param_description("tcp_cubic.c", "fast_convergence",
                                 "turn on/off fast convergence");
}


x86 assembly (clang, -O0):
<module_param_desc_fast_convergence>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeea(%rip),%rsi
lea    0xef4(%rip),%rdx
call   1030 <record_linux_param_description@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_param_desc_fast_convergence>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
lea    0xef8(%rip),%rdx
jmp    1030 <record_linux_param_description@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"tcp_cubic.c\00"
@.str.1 = [17 x i8] c"fast_convergence\00"
@.str.2 = [29 x i8] c"turn on/off fast convergence\00"
define void @module_param_desc_fast_convergence() {
%1 = call i32 @record_linux_param_description(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"tcp_cubic.c\00"
@.str.1 = [17 x i8] c"fast_convergence\00"
@.str.2 = [29 x i8] c"turn on/off fast convergence\00"
define void @module_param_desc_fast_convergence() {
%1 = tail call i32 @record_linux_param_description(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stdout_print_strn(int /*<<< orphan*/, char *, int);
int putchar(int c) {
  char chr = c;
  stdout_print_strn(0, &chr, 1);
  return chr;
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
xor    %edi,%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <stdout_print_strn@plt>
movsbl -0x5(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <stdout_print_strn@plt>
movsbl 0x7(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @putchar(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
store i8 %5, i8* %3
%6 = call i32 @stdout_print_strn(i32 0, i8* %3, i32 1)
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @putchar(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = call i32 @stdout_print_strn(i32 0, i8* %2, i32 1)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
ret i32 %6
}
signed short is_ident_char(char c) {
  if ((c >= 'a') && (c <= 'z'))
    return 1;
  if ((c >= 'A') && (c <= 'Z'))
    return 1;
  if ((c >= '0') && (c <= '9'))
    return 1;
  if (c == '_')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_ident_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
cmp    $0x61,%eax
jl     112f <is_ident_char+0x2f>
movsbl -0x3(%rbp),%eax
cmp    $0x7a,%eax
jg     112f <is_ident_char+0x2f>
movw   $0x1,-0x2(%rbp)
jmp    1197 <is_ident_char+0x97>
movsbl -0x3(%rbp),%eax
cmp    $0x41,%eax
jl     1154 <is_ident_char+0x54>
movsbl -0x3(%rbp),%eax
cmp    $0x5a,%eax
jg     1154 <is_ident_char+0x54>
movw   $0x1,-0x2(%rbp)
jmp    1197 <is_ident_char+0x97>
movsbl -0x3(%rbp),%eax
cmp    $0x30,%eax
jl     1179 <is_ident_char+0x79>
movsbl -0x3(%rbp),%eax
cmp    $0x39,%eax
jg     1179 <is_ident_char+0x79>
movw   $0x1,-0x2(%rbp)
jmp    1197 <is_ident_char+0x97>
movsbl -0x3(%rbp),%eax
cmp    $0x5f,%eax
jne    1191 <is_ident_char+0x91>
movw   $0x1,-0x2(%rbp)
jmp    1197 <is_ident_char+0x97>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ident_char>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
lea    -0x30(%rdi),%ecx
cmp    $0xa,%cl
setb   %cl
cmp    $0x5f,%dil
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define signext i16 @is_ident_char(i8 signext %0) {
%2 = alloca i16
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %12
11: ; preds = %7
store i16 1, i16* %2
br label %36
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sge i32 %14, 65
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 90
br i1 %19, label %20, label %21
20: ; preds = %16
store i16 1, i16* %2
br label %36
21: ; preds = %16, %12
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp sge i32 %23, 48
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i8, i8* %3
%27 = sext i8 %26 to i32
%28 = icmp sle i32 %27, 57
br i1 %28, label %29, label %30
29: ; preds = %25
store i16 1, i16* %2
br label %36
30: ; preds = %25, %21
%31 = load i8, i8* %3
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 95
br i1 %33, label %34, label %35
34: ; preds = %30
store i16 1, i16* %2
br label %36
35: ; preds = %30
store i16 0, i16* %2
br label %36
36: ; preds = %35, %34, %29, %20, %11
%37 = load i16, i16* %2
ret i16 %37
}

LLVM IR (-O2):
define signext i16 @is_ident_char(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = add i8 %0, -48
%6 = icmp ult i8 %5, 10
%7 = or i1 %6, %4
%8 = icmp eq i8 %0, 95
%9 = or i1 %8, %7
%10 = zext i1 %9 to i16
ret i16 %10
}
/* Variables and functions */
int is_first_in_group_Logout(size_t __tag) {
  (void)__tag;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @is_first_in_group_Logout(i64 %0) {
ret i32 0
}
void foo220() {}


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

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

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

LLVM IR (-O2):
define void @foo220() {
ret void
}
/* Variables and functions */
int get_clcsbb2(int, int, int *);
int /*<<< orphan*/ printf(char *, int, int, int, int, int);
void print_clcsbb2(int a, int b, int mask) {
  int f, r;
  f = get_clcsbb2(a, b, &r);
  f &= mask;
  printf("clcsbb"
         " 2"
         " %08x %08x %08x %08x %08x\n",
         a, b, r, f, mask);
}


x86 assembly (clang, -O0):
<print_clcsbb2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    -0x14(%rbp),%rdx
call   1030 <get_clcsbb2@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0xc(%rbp),%r9d
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_clcsbb2>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xc(%rsp),%rdx
call   1030 <get_clcsbb2@plt>
and    %r14d,%eax
mov    0xc(%rsp),%ecx
lea    0xeb9(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%r8d
mov    %r14d,%r9d
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"clcsbb 2 %08x %08x %08x %08x %08x\0A\00"
define void @print_clcsbb2(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = call i32 @get_clcsbb2(i32 %9, i32 %10, i32* %8)
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = and i32 %13, %12
store i32 %14, i32* %7
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = load i32, i32* %8
%18 = load i32, i32* %7
%19 = load i32, i32* %6
%20 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16, i32 %17, i32 %18, i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"clcsbb 2 %08x %08x %08x %08x %08x\0A\00"
define void @print_clcsbb2(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i32 @get_clcsbb2(i32 %0, i32 %1, i32* %4)
%7 = and i32 %6, %2
%8 = load i32, i32* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %8, i32 %7, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ unlink(char *);
void bus_destroy(int fd, char *path) {
  close(fd);
  unlink(path);
}


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

x86 assembly (clang, -O2):
<bus_destroy>:
push   %rbx
mov    %rsi,%rbx
call   1040 <close@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <unlink@plt>

LLVM IR (-O0):
define void @bus_destroy(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 = call i32 @close(i32 %5)
%7 = load i8*, i8** %4
%8 = call i32 @unlink(i8* %7)
ret void
}

LLVM IR (-O2):
define void @bus_destroy(i32 %0, i8* nocapture %1) {
%3 = tail call i32 @close(i32 %0)
%4 = tail call i32 @unlink(i8* %1)
ret void
}
void INT_Excep_TMR0_CMI0B(void) {}


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

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

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

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