xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ parallel_clr_dav(int);
int /*<<< orphan*/ parallel_set_dav(int);
void parallel_drv1_set_dav(unsigned char val) {
  if (val) {
    parallel_set_dav(0x08);
  } else {
    parallel_clr_dav(~0x08);
  }
}


x86 assembly (clang, -O0):
<parallel_drv1_set_dav>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     1147 <parallel_drv1_set_dav+0x27>
mov    $0x8,%edi
call   1040 <parallel_set_dav@plt>
jmp    1151 <parallel_drv1_set_dav+0x31>
mov    $0xfffffff7,%edi
call   1030 <parallel_clr_dav@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parallel_drv1_set_dav>:
test   %edi,%edi
je     112e <parallel_drv1_set_dav+0xe>
mov    $0x8,%edi
jmp    1040 <parallel_set_dav@plt>
mov    $0xfffffff7,%edi
jmp    1030 <parallel_clr_dav@plt>

LLVM IR (-O0):
define void @parallel_drv1_set_dav(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @parallel_set_dav(i32 8)
br label %9
7: ; preds = %1
%8 = call i32 @parallel_clr_dav(i32 -9)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @parallel_drv1_set_dav(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @parallel_set_dav(i32 8)
br label %7
5: ; preds = %1
%6 = tail call i32 @parallel_clr_dav(i32 -9)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pinsetup();
void setup() { pinsetup(); }


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

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

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

LLVM IR (-O2):
define void @setup() {
%1 = tail call i32 (...) @pinsetup()
ret void
}
void jump_space(char **p_p) {
  for (; **p_p == ' ' || **p_p == '\t' || **p_p == '\n'; (*p_p)++)
    ;
  return;
}


x86 assembly (clang, -O0):
<jump_space>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     114b <jump_space+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x9(%rbp)
je     114b <jump_space+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115b <jump_space+0x5b>
jmp    1173 <jump_space+0x73>
jmp    1160 <jump_space+0x60>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1108 <jump_space+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<jump_space>:
mov    (%rdi),%rax
add    $0x1,%rax
movabs $0x100000600,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl -0x1(%rax),%edx
cmp    $0x20,%rdx
ja     1139 <jump_space+0x39>
bt     %rdx,%rcx
jae    1139 <jump_space+0x39>
mov    %rax,(%rdi)
add    $0x1,%rax
jmp    1120 <jump_space+0x20>
ret

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

LLVM IR (-O2):
define void @jump_space(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %6, %1
%4 = phi i8* [ %7, %6 ], [ %2, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 32, label %6
i8 9, label %6
i8 10, label %6
]
6: ; preds = %3, %3, %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %7, i8** %0
br label %3
8: ; preds = %3
ret void
}
int Operand_tp7_encode(unsigned int *valp) {
  unsigned t_0, tp7_0;
  tp7_0 = *valp;
  t_0 = (tp7_0 - 0x7) & 0xf;
  *valp = t_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_tp7_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x7,%eax
and    $0xf,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_tp7_encode>:
mov    (%rdi),%eax
add    $0x9,%eax
and    $0xf,%eax
mov    %eax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_tp7_encode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = sub i32 %7, 7
%9 = and i32 %8, 15
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = load i32*, i32** %2
store i32 %10, i32* %11
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_tp7_encode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add i32 %2, 9
%4 = and i32 %3, 15
store i32 %4, i32* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ valid_bo(long, int, int);
long extract_bo(unsigned long insn, int dialect, int *invalid) {
  long value;
  value = (insn >> 21) & 0x1f;
  if (!valid_bo(value, dialect, 1))
    *invalid = 1;
  return value;
}


x86 assembly (clang, -O0):
<extract_bo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x15,%rax
and    $0x1f,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
call   1030 <valid_bo@plt>
cmp    $0x0,%eax
jne    1157 <extract_bo+0x47>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_bo>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
shr    $0x15,%ebx
and    $0x1f,%ebx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1030 <valid_bo@plt>
test   %eax,%eax
jne    1138 <extract_bo+0x28>
movl   $0x1,(%r14)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @extract_bo(i64 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = lshr i64 %0, 21
%5 = and i64 %4, 31
%6 = tail call i32 @valid_bo(i64 %5, i32 %1, i32 1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %3
store i32 1, i32* %2
br label %9
9: ; preds = %8, %3
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
long double __expm1l(long double x) {
  fputs("__expm1l not implemented\n", stderr);
  __set_errno(ENOSYS);
  return 0.0;
}


x86 assembly (clang, -O0):
<__expm1l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__expm1l>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
pop    %rax
ret

LLVM IR (-O0):
@.str = [26 x i8] c"__expm1l not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__expm1l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret x86_fp80 0xK00000000000000000000
}

LLVM IR (-O2):
@.str = [26 x i8] c"__expm1l not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__expm1l(x86_fp80 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret x86_fp80 0xK00000000000000000000
}
/* Variables and functions */
void *_brk(void *);
int brk(void *addr) {
  void *current;
  current = _brk(0);
  if (current == _brk(addr) && addr != current)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<brk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <_brk@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_brk@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
jne    1164 <brk+0x54>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     1164 <brk+0x54>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <brk+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brk>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
call   1030 <_brk@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <_brk@plt>
cmp    %rax,%rbx
sete   %al
cmp    %r14,%rbx
setne  %cl
and    %al,%cl
movzbl %cl,%eax
neg    %eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @brk(i8* %0) {
%2 = tail call i8* @_brk(i8* null)
%3 = tail call i8* @_brk(i8* %0)
%4 = icmp eq i8* %2, %3
%5 = icmp ne i8* %2, %0
%6 = and i1 %5, %4
%7 = sext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void TimerIntClear(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000024))) = ui32IntFlags;
}


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

x86 assembly (clang, -O2):
<TimerIntClear>:
mov    %rsi,0x24(%rdi)
ret

LLVM IR (-O0):
define void @TimerIntClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 36
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @TimerIntClear(i64 %0, i64 %1) {
%3 = add i64 %0, 36
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRF8_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRF8_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

LLVM IR (-O0):
define void @U_WMRF8_swap(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 = call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_WMRF8_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_and_print(int, int);
int main() {
  test_and_print(16, 1);
  test_and_print(32, 1);
  test_and_print(64, 1);
  test_and_print(128, 1);
  test_and_print(256, 1);
  test_and_print(512, 1);
  test_and_print(1024, 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x10,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
mov    $0x20,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
mov    $0x40,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
mov    $0x80,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
mov    $0x100,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
mov    $0x200,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
mov    $0x400,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x10,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
mov    $0x20,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
mov    $0x40,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
mov    $0x80,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
mov    $0x100,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
mov    $0x200,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
mov    $0x400,%edi
mov    $0x1,%esi
call   1030 <test_and_print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test_and_print(i32 16, i32 1)
%3 = call i32 @test_and_print(i32 32, i32 1)
%4 = call i32 @test_and_print(i32 64, i32 1)
%5 = call i32 @test_and_print(i32 128, i32 1)
%6 = call i32 @test_and_print(i32 256, i32 1)
%7 = call i32 @test_and_print(i32 512, i32 1)
%8 = call i32 @test_and_print(i32 1024, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_and_print(i32 16, i32 1)
%2 = tail call i32 @test_and_print(i32 32, i32 1)
%3 = tail call i32 @test_and_print(i32 64, i32 1)
%4 = tail call i32 @test_and_print(i32 128, i32 1)
%5 = tail call i32 @test_and_print(i32 256, i32 1)
%6 = tail call i32 @test_and_print(i32 512, i32 1)
%7 = tail call i32 @test_and_print(i32 1024, i32 1)
ret i32 0
}
void EC_POINT_point2oct(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_POINT_point2oct() {
ret void
}
int test_57_4(int *mem) { return __atomic_xor_fetch(mem + 0, 1, 4); }


x86 assembly (clang, -O0):
<test_57_4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%esi
mov    %eax,%edx
xor    %esi,%edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x24(%rbp)
test   $0x1,%cl
mov    %eax,-0x14(%rbp)
jne    114b <test_57_4+0x4b>
jmp    1122 <test_57_4+0x22>
mov    -0x18(%rbp),%ecx
mov    -0x24(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_57_4>:
mov    (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
xor    $0x1,%ecx
lock cmpxchg %ecx,(%rdi)
jne    1110 <test_57_4+0x10>
xor    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @test_57_4(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 0
store i32 1, i32* %3
%7 = load i32, i32* %3
%8 = atomicrmw xor i32* %6, i32 %7 acq_rel
%9 = xor i32 %8, %7
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @test_57_4(i32* nocapture %0) {
%2 = atomicrmw xor i32* %0, i32 1 acq_rel
%3 = xor i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void _nsntrace_usage() {
  fprintf(
      stderr,
      "usage: nsntrace [options] program [arguments]\n"
      "Perform network trace of a single process by using "
      "network namespaces.\n\n"
      "Options:\n"
      "-o file\t\t\tsend trace output to file (default nsntrace.pcap), use '-' "
      "for stdout\n"
      "-d device\t\tthe network device to trace\n"
      "-f filter\t\tan optional capture filter\n"
      "-u username\t\trun PROG as username/uid\n"
      "--use-public-dns\toverride resolv.conf to use public nameservers from\n"
      "\t\t\tQuad9, Cloudflare, Google and OpenDNS\n");
}


x86 assembly (clang, -O0):
<_nsntrace_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nsntrace_usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [433 x i8] c"usage: nsntrace [options] program [arguments]\0APerform network trace of a single process by using network namespaces.\0A\0AOptions:\0A-o file\09\09\09send trace output to file (default nsntrace.pcap), use '-' for stdout\0A-d device\09\09the network device to trace\0A-f filter\09\09an optional capture filter\0A-u username\09\09run PROG as username/uid\0A--use-public-dns\09override resolv.conf to use public nameservers from\0A\09\09\09Quad9, Cloudflare, Google and OpenDNS\0A\00"
define void @_nsntrace_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([433 x i8], [433 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [433 x i8] c"usage: nsntrace [options] program [arguments]\0APerform network trace of a single process by using network namespaces.\0A\0AOptions:\0A-o file\09\09\09send trace output to file (default nsntrace.pcap), use '-' for stdout\0A-d device\09\09the network device to trace\0A-f filter\09\09an optional capture filter\0A-u username\09\09run PROG as username/uid\0A--use-public-dns\09override resolv.conf to use public nameservers from\0A\09\09\09Quad9, Cloudflare, Google and OpenDNS\0A\00"
define void @_nsntrace_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([433 x i8], [433 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int is_dir(const char *dpath) {
  struct stat buf;
  if (stat(dpath, &buf) == 0 && S_ISDIR(buf.st_mode)) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<is_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jne    1161 <is_dir+0x41>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
je     1161 <is_dir+0x41>
movl   $0x0,-0x4(%rbp)
jmp    1168 <is_dir+0x48>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
test   %rax,%rax
jne    1142 <is_dir+0x22>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1142 <is_dir+0x22>
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i64 @S_ISDIR(i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 0, i32* %2
br label %15
14: ; preds = %8, %1
store i32 1, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISDIR(i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %6, %1
br label %12
12: ; preds = %6, %11
%13 = phi i32 [ 1, %11 ], [ 0, %6 ]
ret i32 %13
}
swapr(int *x, int *y) {
  int temp;
  temp = *x;
  *x = *y;
  *y = temp;
}


x86 assembly (clang, -O0):
<swapr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapr>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define i32 @swapr(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
store i32 %8, i32* %6
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load i32*, i32** %4
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = load i32*, i32** %5
store i32 %12, i32* %13
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @swapr(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret i32 undef
}
void RTAvloGCPhysDoWithAll(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvloGCPhysDoWithAll() {
ret void
}
void mdea_number_node_destroy(void *p) {}


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

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

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

LLVM IR (-O2):
define void @mdea_number_node_destroy(i8* nocapture %0) {
ret void
}
int recupererDirectionJoueurCasSpecial(const unsigned int direction) {
  static const int baseDirectionJoueurCasSpecial[4] = {0, 0, -1, 1};
  return baseDirectionJoueurCasSpecial[direction];
}


x86 assembly (clang, -O0):
<recupererDirectionJoueurCasSpecial>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
lea    0xeed(%rip),%rax
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<recupererDirectionJoueurCasSpecial>:
mov    %edi,%eax
lea    0xef7(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
@recupererDirectionJoueurCasSpecial.baseDirectionJoueurCasSpecial = internal constant [4 x i32] [i32 0, i32 0, i32 -1, i32 1]
define i32 @recupererDirectionJoueurCasSpecial(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [4 x i32], [4 x i32]* @recupererDirectionJoueurCasSpecial.baseDirectionJoueurCasSpecial, i64 0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
@recupererDirectionJoueurCasSpecial.baseDirectionJoueurCasSpecial = internal unnamed_addr constant [4 x i32] [i32 0, i32 0, i32 -1, i32 1]
define i32 @recupererDirectionJoueurCasSpecial(i32 %0) {
%2 = zext i32 %0 to i64
%3 = getelementptr inbounds [4 x i32], [4 x i32]* @recupererDirectionJoueurCasSpecial.baseDirectionJoueurCasSpecial, i64 0, i64 %2
%4 = load i32, i32* %3
ret i32 %4
}
int fn1(p1) {
lbl_549:
  if (p1)
    goto lbl_549;
  return 0;
}


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1116 <fn1+0x16>
jmp    1107 <fn1+0x7>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
test   %edi,%edi
je     1112 <fn1+0x12>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1110 <fn1+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @fn1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %6, %1
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %3
br label %3
7: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @fn1(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %1, %3
br label %3
4: ; preds = %1
ret i32 0
}
int StrLen(char *str) {
  int len = 0;
  while (str[len] != 0) {
    len++;
  }
  return len;
}


x86 assembly (clang, -O0):
<StrLen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <StrLen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <StrLen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrLen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <StrLen+0x10>
ret

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

LLVM IR (-O2):
define i32 @StrLen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
void swap(int *num1, int *num2) {
  int temp = *num1;
  *num1 = *num2;
  *num2 = temp;
}


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

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  goto MAMA;
  printf("OPA 1\n\n");
MAMA:;
  printf("OPA 2\n\n");
}


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"OPA 2\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
br label %5
5: ; preds = %2
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"OPA 2\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_cmake_comments() {
  test_parser_verify_parse(test_parser_sourcefile("cmake", " #comment"),
                           "cmake", "", "#comment", 0);
}


x86 assembly (clang, -O0):
<test_cmake_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xebe(%rip),%rdx
lea    0xeb9(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cmake_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xec7(%rip),%rdx
lea    0xec2(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"cmake\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [9 x i8] c"#comment\00"
define void @test_cmake_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"cmake\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [9 x i8] c"#comment\00"
define void @test_cmake_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn74() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn74");
  return result;
}


x86 assembly (clang, -O0):
<fn74>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn74>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn74\00"
define i8* @fn74() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn74\00"
define i8* @fn74() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
int in(flgs, c)
char *flgs;
char c;
{
  while (*flgs)
    if (c == *flgs++)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<in>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <in+0x4a>
movsbl -0x11(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1145 <in+0x45>
movl   $0x1,-0x4(%rbp)
jmp    1151 <in+0x51>
jmp    110e <in+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in>:
movsbl %sil,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rdi),%ecx
test   %ecx,%ecx
je     1125 <in+0x25>
add    $0x1,%rdi
cmp    %ecx,%eax
jne    1110 <in+0x10>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @in(i8* nocapture %0, i32 %1) {
%3 = shl i32 %1, 24
%4 = ashr exact i32 %3, 24
br label %5
5: ; preds = %9, %2
%6 = phi i8* [ %0, %2 ], [ %10, %9 ]
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = sext i8 %7 to i32
%12 = icmp eq i32 %4, %11
br i1 %12, label %13, label %5
13: ; preds = %5, %9
%14 = phi i32 [ 1, %9 ], [ 0, %5 ]
ret i32 %14
}
unsigned long ffs(unsigned long value) {
  __asm__("bsf %1, %0" : "=r"(value) : "rm"(value) : "cc");
  return value;
}


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

x86 assembly (clang, -O2):
<ffs>:
mov    %rdi,-0x8(%rsp)
bsf    -0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @ffs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 asm "bsf $1, $0", "=r,rm,~{cc},~{dirflag},~{fpsr},~{flags}"(i64 %3)
store i64 %4, i64* %2
%5 = load i64, i64* %2
ret i64 %5
}

LLVM IR (-O2):
define i64 @ffs(i64 %0) {
%2 = tail call i64 asm "bsf $1, $0", "=r,rm,~{cc},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i64 %2
}
/* Variables and functions */
scalar_t__ GetUniform(int, int);
void GetKUniform(int K, int from, int to, int *randomArr) {
  int i = 0;
  for (i = 0; i < K; i++) {
    randomArr[i] = (int)GetUniform(from, to);
  }
}


x86 assembly (clang, -O0):
<GetKUniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1165 <GetKUniform+0x55>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <GetUniform@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1133 <GetKUniform+0x23>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetKUniform>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %edi,%edi
jle    1148 <GetKUniform+0x38>
mov    %rcx,%r14
mov    %edx,%r15d
mov    %esi,%r12d
mov    %edi,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    %r12d,%edi
mov    %r15d,%esi
call   1030 <GetUniform@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1130 <GetKUniform+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @GetKUniform(i32 %0, i32 %1, i32 %2, i32* nocapture writeonly %3) {
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %15
6: ; preds = %4
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %13, %8 ]
%10 = tail call i64 @GetUniform(i32 %1, i32 %2)
%11 = trunc i64 %10 to i32
%12 = getelementptr inbounds i32, i32* %3, i64 %9
store i32 %11, i32* %12
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %15, label %8
15: ; preds = %8, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
void cbconde(long a) {
  if (a == 0)
    foo();
  bar();
}


x86 assembly (clang, -O0):
<cbconde>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <cbconde+0x1e>
mov    $0x0,%al
call   1040 <foo@plt>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbconde>:
test   %rdi,%rdi
je     112c <cbconde+0xc>
xor    %eax,%eax
jmp    1030 <bar@plt>
push   %rax
xor    %eax,%eax
call   1040 <foo@plt>
add    $0x8,%rsp
xor    %eax,%eax
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @cbconde(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @foo()
br label %7
7: ; preds = %5, %1
%8 = call i32 (...) @bar()
ret void
}

LLVM IR (-O2):
define void @cbconde(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @foo()
br label %5
5: ; preds = %3, %1
%6 = tail call i32 (...) @bar()
ret void
}
/* Type definitions */
struct timer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ timer_init(struct timer *);
void timer_cleanup(struct timer *t) { timer_init(t); }


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

x86 assembly (clang, -O2):
<timer_cleanup>:
jmp    1030 <timer_init@plt>

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

LLVM IR (-O2):
%struct.timer = type { i32 }
define void @timer_cleanup(%struct.timer* %0) {
%2 = tail call i32 @timer_init(%struct.timer* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpgt_pi32(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 __attribute__((no, unused)) test(__m64 s1, __m64 s2) {
  return _mm_cmpgt_pi32(s1, s2);
}


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

x86 assembly (clang, -O2):
<test>:
jmp    1030 <_mm_cmpgt_pi32@plt>

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

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpgt_pi32(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void vInitModul1(void) {
  printf("Init Moudl1");
  printf("2.Variante");
}


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

x86 assembly (clang, -O2):
<vInitModul1>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Init Moudl1\00"
@.str.1 = [11 x i8] c"2.Variante\00"
define void @vInitModul1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Init Moudl1\00"
@.str.1 = [11 x i8] c"2.Variante\00"
define void @vInitModul1() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ checkInput(int *);
int /*<<< orphan*/ isDevideByFiveAndSeven(int);
int /*<<< orphan*/ printf(char *);
int main() {
  int number;
  printf("Enter number: ");
  checkInput(&number);
  isDevideByFiveAndSeven(number);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
call   1050 <checkInput@plt>
mov    -0x8(%rbp),%edi
call   1040 <isDevideByFiveAndSeven@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0x4(%rsp),%rdi
call   1050 <checkInput@plt>
mov    0x4(%rsp),%edi
call   1040 <isDevideByFiveAndSeven@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter number: \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @checkInput(i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @isDevideByFiveAndSeven(i32 %5)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter number: \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @checkInput(i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @isDevideByFiveAndSeven(i32 %5)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ errFlush(int *);
void err_flbel_(int *const STATUS) {
  int status;
  errFlush(&status);
  *STATUS = status;
}


x86 assembly (clang, -O0):
<err_flbel_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <errFlush@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_flbel_>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
call   1030 <errFlush@plt>
mov    0xc(%rsp),%eax
mov    %eax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @err_flbel_(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = call i32 @errFlush(i32* %3)
%5 = load i32, i32* %3
%6 = load i32*, i32** %2
store i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @err_flbel_(i32* nocapture writeonly %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @errFlush(i32* %2)
%5 = load i32, i32* %2
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
scalar_t__ isdigit(char);
int NPisnumber(char c) {
  if (isdigit(c))
    return 1;
  if (c == '+')
    return 1;
  if (c == '-')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<NPisnumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     113d <NPisnumber+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    1176 <NPisnumber+0x66>
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
jne    1156 <NPisnumber+0x46>
movl   $0x1,-0x4(%rbp)
jmp    1176 <NPisnumber+0x66>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
jne    116f <NPisnumber+0x5f>
movl   $0x1,-0x4(%rbp)
jmp    1176 <NPisnumber+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NPisnumber>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
lea    -0x2b(%rbx),%ecx
test   $0xfd,%cl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @NPisnumber(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 43
%5 = icmp eq i8 %0, 45
%6 = or i1 %4, %5
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}