xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ read(int, void *, int);
main() {
  int fd;
  ssize_t ret;
  char buf;
  fd = open("/proc/sys/net/ipv4/ip_forward", O_RDONLY);
  ret = read(fd, (void *)&buf, 1);
  printf("%c", buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
lea    0xeb1(%rip),%rdi
call   1050 <open@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0xd(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
mov    %eax,-0xc(%rbp)
lea    0xeac(%rip),%rdi
movsbl -0xd(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xebf(%rip),%rdi
call   1050 <open@plt>
lea    0x7(%rsp),%rsi
mov    %eax,%edi
mov    $0x1,%edx
call   1040 <read@plt>
movsbl 0x7(%rsp),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"/proc/sys/net/ipv4/ip_forward\00"
@O_RDONLY = global i32 0
@.str.1 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
store i32 0, i32* %1
%5 = load i32, i32* @O_RDONLY
%6 = call i32 @open(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @read(i32 %7, i8* %4, i32 1)
store i32 %8, i32* %3
%9 = load i8, i8* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"/proc/sys/net/ipv4/ip_forward\00"
@O_RDONLY = global i32 0
@.str.1 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i8
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @read(i32 %3, i8* %1, i32 1)
%5 = load i8, i8* %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(unsigned long, unsigned char, int);
int /*<<< orphan*/ GPIOPadConfigSet(unsigned long, unsigned char, int, int);
void GPIOPinTypeEthernetLED(unsigned long ulPort, unsigned char ucPins) {
  ;
  GPIODirModeSet(ulPort, ucPins, 0x00000002);
  GPIOPadConfigSet(ulPort, ucPins, 0x00000004, 0x00000008);
}


x86 assembly (clang, -O0):
<GPIOPinTypeEthernetLED>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%edx
movzbl -0x9(%rbp),%esi
call   1040 <GPIODirModeSet@plt>
mov    -0x8(%rbp),%rdi
mov    $0x4,%edx
mov    $0x8,%ecx
movzbl -0x9(%rbp),%esi
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypeEthernetLED>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x4,%edx
mov    $0x8,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

LLVM IR (-O0):
define void @GPIOPinTypeEthernetLED(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = load i64, i64* %3
%6 = load i8, i8* %4
%7 = call i32 @GPIODirModeSet(i64 %5, i8 zeroext %6, i32 2)
%8 = load i64, i64* %3
%9 = load i8, i8* %4
%10 = call i32 @GPIOPadConfigSet(i64 %8, i8 zeroext %9, i32 4, i32 8)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeEthernetLED(i64 %0, i8 zeroext %1) {
%3 = tail call i32 @GPIODirModeSet(i64 %0, i8 zeroext %1, i32 2)
%4 = tail call i32 @GPIOPadConfigSet(i64 %0, i8 zeroext %1, i32 4, i32 8)
ret void
}
void plat_init(void) {}


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

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

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

LLVM IR (-O2):
define void @plat_init() {
ret void
}
/* Variables and functions */
int arith_div(int, int);
int arith_floor(int x, int y) { return arith_div(x, y); }


x86 assembly (clang, -O0):
<arith_floor>:
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 <arith_div@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arith_floor>:
jmp    1030 <arith_div@plt>

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

LLVM IR (-O2):
define i32 @arith_floor(i32 %0, i32 %1) {
%3 = tail call i32 @arith_div(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int mover(int, char, char, char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int n_discos, movimientos;
  printf("Número de discos : ");
  scanf("%d", &n_discos);
  movimientos = mover(n_discos, 'A', 'B', 'C');
  printf("\nmovimientos efectuados: %d\n", movimientos);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    $0x41,%esi
mov    $0x42,%edx
mov    $0x43,%ecx
call   1050 <mover@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    $0x41,%esi
mov    $0x42,%edx
mov    $0x43,%ecx
call   1050 <mover@plt>
lea    0xea9(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"N\C3\BAmero de discos : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"\0Amovimientos efectuados: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @mover(i32 %5, i8 signext 65, i8 signext 66, i8 signext 67)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"N\C3\BAmero de discos : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"\0Amovimientos efectuados: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @mover(i32 %5, i8 signext 65, i8 signext 66, i8 signext 67)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int ENOSYS;
int hwconfig_subarg_cmp_f(const char *opt, const char *subopt,
                          const char *subarg, char *buf) {
  return -ENOSYS;
}


x86 assembly (clang, -O0):
<hwconfig_subarg_cmp_f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
mov    0x2ecb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hwconfig_subarg_cmp_f>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @hwconfig_subarg_cmp_f(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* @ENOSYS
%10 = sub nsw i32 0, %9
ret i32 %10
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @hwconfig_subarg_cmp_f(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
%5 = load i32, i32* @ENOSYS
%6 = sub nsw i32 0, %5
ret i32 %6
}
int ehnlc_isupper(int c) { return (c >= 'A' && c <= 'Z') ? 256 : 0; }


x86 assembly (clang, -O0):
<ehnlc_isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <ehnlc_isupper+0x20>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x100,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehnlc_isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
shl    $0x8,%eax
ret

LLVM IR (-O0):
define i32 @ehnlc_isupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 256, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @ehnlc_isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = select i1 %3, i32 256, i32 0
ret i32 %4
}
unsigned int collatz(unsigned int number) {
  if (number % 2 == 0) {
    return number / 2;
  }
  return (number * 3 + 1);
}


x86 assembly (clang, -O0):
<collatz>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1124 <collatz+0x24>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112e <collatz+0x2e>
imul   $0x3,-0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<collatz>:
mov    %edi,%ecx
shr    %ecx
test   $0x1,%dil
lea    0x1(%rdi,%rdi,2),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @collatz(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
%4 = lshr i32 %0, 1
%5 = mul i32 %0, 3
%6 = add i32 %5, 1
%7 = select i1 %3, i32 %4, i32 %6
ret i32 %7
}
void init_jis0201tab(tbl, fb_default) long *tbl;
long fb_default;
{
  int i;
  for (i = 0; i < 65536; i++)
    tbl[i] = -1;
}


x86 assembly (clang, -O0):
<init_jis0201tab>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x10000,-0x14(%rbp)
jge    113e <init_jis0201tab+0x3e>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movq   $0xffffffffffffffff,(%rax,%rcx,8)
ff
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <init_jis0201tab+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_jis0201tab>:
push   %rax
mov    $0x80000,%edx
mov    $0xff,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @init_jis0201tab(i64* nocapture writeonly %0, i64 %1) {
%3 = bitcast i64* %0 to i8*
ret void
}
int nr4between(a, b, c)
unsigned a, b, c;
{
  if ((a <= b && b < c) || (c < a && a <= b) || (b < c && c < a))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<nr4between>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
ja     1125 <nr4between+0x25>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jb     1155 <nr4between+0x55>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    113d <nr4between+0x3d>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jbe    1155 <nr4between+0x55>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    1161 <nr4between+0x61>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1161 <nr4between+0x61>
movl   $0x1,-0x4(%rbp)
jmp    1168 <nr4between+0x68>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nr4between>:
mov    $0x1,%eax
cmp    %edx,%esi
jae    110e <nr4between+0xe>
cmp    %esi,%edi
ja     110e <nr4between+0xe>
ret
cmp    %esi,%edi
ja     1116 <nr4between+0x16>
cmp    %edi,%edx
jb     110d <nr4between+0xd>
cmp    %edi,%edx
setb   %al
cmp    %edx,%esi
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @nr4between(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp ule i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %3
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = icmp ult i32 %12, %13
br i1 %14, label %31, label %15
15: ; preds = %11, %3
%16 = load i32, i32* %7
%17 = load i32, i32* %5
%18 = icmp ult i32 %16, %17
br i1 %18, label %19, label %23
19: ; preds = %15
%20 = load i32, i32* %5
%21 = load i32, i32* %6
%22 = icmp ule i32 %20, %21
br i1 %22, label %31, label %23
23: ; preds = %19, %15
%24 = load i32, i32* %6
%25 = load i32, i32* %7
%26 = icmp ult i32 %24, %25
br i1 %26, label %27, label %32
27: ; preds = %23
%28 = load i32, i32* %7
%29 = load i32, i32* %5
%30 = icmp ult i32 %28, %29
br i1 %30, label %31, label %32
31: ; preds = %27, %19, %11
store i32 1, i32* %4
br label %33
32: ; preds = %27, %23
store i32 0, i32* %4
br label %33
33: ; preds = %32, %31
%34 = load i32, i32* %4
ret i32 %34
}

LLVM IR (-O2):
define i32 @nr4between(i32 %0, i32 %1, i32 %2) {
%4 = icmp ugt i32 %0, %1
%5 = xor i1 %4, true
%6 = icmp ult i32 %1, %2
%7 = and i1 %6, %5
br i1 %7, label %15, label %8
8: ; preds = %3
%9 = icmp uge i32 %2, %0
%10 = or i1 %4, %9
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = xor i1 %9, true
%13 = and i1 %6, %12
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %11, %3, %8
%16 = phi i32 [ 1, %8 ], [ 1, %3 ], [ %14, %11 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prog) { fprintf(stderr, "Usage: %s <host> <port>\n", prog); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"Usage: %s <host> <port>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"Usage: %s <host> <port>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core3_swap(char *, int);
void U_EMRDELETECOLORSPACE_swap(char *record, int torev) {
  core3_swap(record, torev);
}


x86 assembly (clang, -O0):
<U_EMRDELETECOLORSPACE_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 <core3_swap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_EMRDELETECOLORSPACE_swap>:
jmp    1030 <core3_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRDELETECOLORSPACE_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core3_swap(i8* %0, i32 %1)
ret void
}
int X(int num1, int num2) { return num1 * num2; }


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

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

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

LLVM IR (-O2):
define i32 @X(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
void foo076(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo076(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atan(double);
double sin(int /*<<< orphan*/);
double __attribute__((no, optimize("Ofast"))) sinatan(double x) {
  return sin(atan(x));
}


x86 assembly (clang, -O0):
<sinatan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <atan@plt>
mov    %eax,%edi
call   1030 <sin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinatan>:
push   %rax
call   1040 <atan@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <sin@plt>

LLVM IR (-O0):
define double @sinatan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @atan(double %3)
%5 = call double @sin(i32 %4)
ret double %5
}

LLVM IR (-O2):
define double @sinatan(double %0) {
%2 = tail call i32 @atan(double %0)
%3 = tail call double @sin(i32 %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void DefFree(void *p, void *pUser) {
  (void)pUser;
  free(p);
}


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

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

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

LLVM IR (-O2):
define void @DefFree(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int __infer_nondet_int();
int dup(int fildes) {
  int n;
  n = __infer_nondet_int();
  if (n > 0)
    return fildes;
  else
    return -1;
}


x86 assembly (clang, -O0):
<dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    113a <dup+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <dup+0x31>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
test   %eax,%eax
mov    $0xffffffff,%eax
cmovg  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @dup(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = call i32 (...) @__infer_nondet_int()
store i32 %5, i32* %4
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %3
store i32 %9, i32* %2
br label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @dup(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
%3 = icmp sgt i32 %2, 0
%4 = select i1 %3, i32 %0, i32 -1
ret i32 %4
}
/* Type definitions */
struct szl_interp {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
ssize_t szl_null_read(struct szl_interp *interp, void *priv, unsigned char *buf,
                      const size_t len, int *more) {
  return 0;
}


x86 assembly (clang, -O0):
<szl_null_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.szl_interp = type { i32 }
define i32 @szl_null_read(%struct.szl_interp* %0, i8* %1, i8* %2, i64 %3, i32* %4) {
%6 = alloca %struct.szl_interp*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32*
store %struct.szl_interp* %0, %struct.szl_interp** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i32* %4, i32** %10
ret i32 0
}

LLVM IR (-O2):
%struct.szl_interp = type { i32 }
define i32 @szl_null_read(%struct.szl_interp* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i64 %3, i32* nocapture readnone %4) {
ret i32 0
}
unsigned int get_32(unsigned char const *p) {
  return ((unsigned int)p[3] | (((unsigned int)p[2]) << 8) |
          (((unsigned int)p[1]) << 16) | (((unsigned int)p[0]) << 24));
}


x86 assembly (clang, -O0):
<get_32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_32>:
mov    (%rdi),%eax
bswap  %eax
ret

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

LLVM IR (-O2):
define i32 @get_32(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 16
%14 = or i32 %9, %13
%15 = load i8, i8* %0
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %14, %17
ret i32 %18
}
int x31_process_syn(struct mypacket *packet) { return 0; }


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

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

LLVM IR (-O0):
%struct.mypacket = type opaque
define i32 @x31_process_syn(%struct.mypacket* %0) {
%2 = alloca %struct.mypacket*
store %struct.mypacket* %0, %struct.mypacket** %2
ret i32 0
}

LLVM IR (-O2):
%struct.mypacket = type opaque
define i32 @x31_process_syn(%struct.mypacket* nocapture readnone %0) {
ret i32 0
}
void *ptr_dup(const void *o) { return (void *)o; }


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

x86 assembly (clang, -O2):
<ptr_dup>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @ptr_dup(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ paint_it(char const *, char *);
void green(const char *string) { paint_it(string, "\x1b[0;32m"); }


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

x86 assembly (clang, -O2):
<green>:
lea    0xee9(%rip),%rsi
jmp    1030 <paint_it@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\1B[0;32m\00"
define void @green(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @paint_it(i8* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[0;32m\00"
define void @green(i8* %0) {
%2 = tail call i32 @paint_it(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getFmt(char const *);
int sscanf(char const *, int /*<<< orphan*/, int *);
scalar_t__ strchr(char const *, char);
int isOffset(const char *a) {
  int i = 0;
  if (strchr(a, '.'))
    return 0;
  return sscanf(a, getFmt(a), &i);
}


x86 assembly (clang, -O0):
<isOffset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1167 <isOffset+0x37>
movl   $0x0,-0x4(%rbp)
jmp    118a <isOffset+0x5a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <getFmt@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
lea    -0x14(%rbp),%rdx
call   1040 <sscanf@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOffset>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movl   $0x0,0xc(%rsp)
mov    $0x2e,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    116b <isOffset+0x3b>
mov    %rbx,%rdi
call   1050 <getFmt@plt>
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <sscanf@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isOffset(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = tail call i64 @strchr(i8* %0, i8 signext 46)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 @getFmt(i8* %0)
%8 = call i32 @sscanf(i8* %0, i32 %7, i32* %2)
br label %9
9: ; preds = %1, %6
%10 = phi i32 [ %8, %6 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fork();
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  if (argc > 1 && strcmp(argv[1], "danger") == 0) {
    while (1) {
      fork();
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    116f <main+0x4f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xeb1(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    116f <main+0x4f>
jmp    1163 <main+0x43>
mov    $0x0,%al
call   1040 <fork@plt>
jmp    1163 <main+0x43>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     113b <main+0x1b>
mov    0x8(%rsi),%rdi
lea    0xecf(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1140 <main+0x20>
xor    %eax,%eax
pop    %rcx
ret
nop
xor    %eax,%eax
call   1040 <fork@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
@.str = [7 x i8] c"danger\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %17
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %8
br label %15
15: ; preds = %14, %15
%16 = call i32 (...) @fork()
br label %15
17: ; preds = %8, %2
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@.str = [7 x i8] c"danger\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %4, %9
%10 = tail call i32 (...) @fork()
br label %9
11: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_reductions();
int main(void) {
  test_reductions();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_reductions@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_reductions()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_reductions()
ret i32 0
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int accept(int, struct sockaddr *, int /*<<< orphan*/ *);
int myaccept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {
  return accept(sockfd, addr, addrlen);
}


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

x86 assembly (clang, -O2):
<myaccept>:
jmp    1030 <accept@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @myaccept(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32*
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = load %struct.sockaddr*, %struct.sockaddr** %5
%9 = load i32*, i32** %6
%10 = call i32 @accept(i32 %7, %struct.sockaddr* %8, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @myaccept(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = tail call i32 @accept(i32 %0, %struct.sockaddr* %1, i32* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ http_log(char *);
void show_help_default(const char *opt, const char *arg) {
  http_log("dumpy default help\n");
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"dumpy default help\0A\00"
define void @show_help_default(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @http_log(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"dumpy default help\0A\00"
define void @show_help_default(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @http_log(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strlen(char *);
char *findEmailDomain(char *address) {
  char *start = address + strlen(address) - 1;
  while (*start != '@')
    start--;
  return start + 1;
}


x86 assembly (clang, -O0):
<findEmailDomain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
je     1162 <findEmailDomain+0x52>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1141 <findEmailDomain+0x31>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findEmailDomain>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
add    $0x1,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x40,-0x2(%rax)
lea    -0x1(%rax),%rax
jne    1130 <findEmailDomain+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @findEmailDomain(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
br label %5
5: ; preds = %5, %1
%6 = phi i8* [ %4, %1 ], [ %7, %5 ]
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 64
br i1 %9, label %10, label %5
10: ; preds = %5
ret i8* %6
}
/* Variables and functions */
int func14();
int func15() { return func14() + 1; }


x86 assembly (clang, -O0):
<func15>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <func14@plt>
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func15>:
push   %rax
xor    %eax,%eax
call   1030 <func14@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @func15() {
%1 = call i32 (...) @func14()
%2 = add nsw i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @func15() {
%1 = tail call i32 (...) @func14()
%2 = add nsw i32 %1, 1
ret i32 %2
}
int fun466() { return 466; }


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

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

LLVM IR (-O0):
define i32 @fun466() {
ret i32 466
}

LLVM IR (-O2):
define i32 @fun466() {
ret i32 466
}
int setiomode(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @setiomode() {
ret i32 0
}
int test_imm_46int32_reg(int val) { return ((val) & (0x46 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_46int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x46,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_46int32_reg(i32 %0) {
%2 = and i32 %0, 70
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fiftyoneDegreesFree(void *);
void fiftyoneDegreesCSVFree(void *csv) { fiftyoneDegreesFree(csv); }


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

x86 assembly (clang, -O2):
<fiftyoneDegreesCSVFree>:
jmp    1030 <fiftyoneDegreesFree@plt>

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

LLVM IR (-O2):
define void @fiftyoneDegreesCSVFree(i8* %0) {
%2 = tail call i32 @fiftyoneDegreesFree(i8* %0)
ret void
}
void fn0F9A() { return; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @XPlanesOfScreen() {
ret void
}
/* Type definitions */
struct wl_proxy {
  int dummy;
};
struct wl_keyboard {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_set_user_data(struct wl_proxy *, void *);
void wl_keyboard_set_user_data(struct wl_keyboard *wl_keyboard,
                               void *user_data) {
  wl_proxy_set_user_data((struct wl_proxy *)wl_keyboard, user_data);
}


x86 assembly (clang, -O0):
<wl_keyboard_set_user_data>:
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   1030 <wl_proxy_set_user_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_keyboard_set_user_data>:
jmp    1030 <wl_proxy_set_user_data@plt>

LLVM IR (-O0):
%struct.wl_keyboard = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_keyboard_set_user_data(%struct.wl_keyboard* %0, i8* %1) {
%3 = alloca %struct.wl_keyboard*
%4 = alloca i8*
store %struct.wl_keyboard* %0, %struct.wl_keyboard** %3
store i8* %1, i8** %4
%5 = load %struct.wl_keyboard*, %struct.wl_keyboard** %3
%6 = bitcast %struct.wl_keyboard* %5 to %struct.wl_proxy*
%7 = load i8*, i8** %4
%8 = call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %6, i8* %7)
ret void
}

LLVM IR (-O2):
%struct.wl_keyboard = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_keyboard_set_user_data(%struct.wl_keyboard* %0, i8* %1) {
%3 = bitcast %struct.wl_keyboard* %0 to %struct.wl_proxy*
%4 = tail call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %3, i8* %1)
ret void
}
/* Variables and functions */
char *c_memory_search(char const *, int /*<<< orphan*/, char const *,
                      int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *c_string_search(const char *haystack, const char *needle) {
  return c_memory_search(haystack, strlen(haystack), needle, strlen(needle));
}


x86 assembly (clang, -O0):
<c_string_search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    %eax,%ecx
call   1040 <c_memory_search@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_string_search>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <c_memory_search@plt>

LLVM IR (-O0):
define i8* @c_string_search(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = load i8*, i8** %4
%10 = call i32 @strlen(i8* %9)
%11 = call i8* @c_memory_search(i8* %5, i32 %7, i8* %8, i32 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @c_string_search(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = tail call i8* @c_memory_search(i8* %0, i32 %3, i8* %1, i32 %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ armRaiseInstant(int);
void armCompactInstant() { armRaiseInstant(180); }


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

x86 assembly (clang, -O2):
<armCompactInstant>:
mov    $0xb4,%edi
jmp    1030 <armRaiseInstant@plt>

LLVM IR (-O0):
define void @armCompactInstant() {
%1 = call i32 @armRaiseInstant(i32 180)
ret void
}

LLVM IR (-O2):
define void @armCompactInstant() {
%1 = tail call i32 @armRaiseInstant(i32 180)
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ volatile uint16_t;

/* Variables and functions */
uint16_t bar_read16(uint32_t bar, uint32_t offset) {
  volatile uint16_t *preg = (volatile uint16_t *)(bar | (offset & 0xFF));
  return (*preg);
}


x86 assembly (clang, -O0):
<bar_read16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
and    $0xff,%ecx
or     %ecx,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar_read16>:
movzbl %sil,%eax
or     %edi,%eax
cltq
mov    (%rax),%eax
ret

LLVM IR (-O0):
define i32 @bar_read16(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* %4
%8 = and i32 %7, 255
%9 = or i32 %6, %8
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
store i32* %11, i32** %5
%12 = load i32*, i32** %5
%13 = load volatile i32, i32* %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @bar_read16(i32 %0, i32 %1) {
%3 = and i32 %1, 255
%4 = or i32 %3, %0
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ nomem();
char *strdup(char *);
char *xstrdup(const char *s) {
  char *t;
  t = strdup((char *)s);
  if (!t)
    nomem();
  return t;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114b <xstrdup+0x2b>
mov    $0x0,%al
call   1030 <nomem@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <xstrdup+0x15>
xor    %eax,%eax
call   1030 <nomem@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 (...) @nomem()
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @nomem()
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void DRV_RF_LDODOWN(unsigned int enRfID) { return; }


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

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

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

LLVM IR (-O2):
define void @DRV_RF_LDODOWN(i32 %0) {
ret void
}
int f(VOID) {
  f();
  return 3;
}


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

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

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) bitcast (i32 (i32)* @f to i32 (...)*)()
ret i32 3
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}