xunge/DecIR huggingface dataset:
/* Variables and functions */
char tolower(char const);
int EthernetMatch(const char *name, const char *arg) {
  if (0)
    arg = arg;
  if (name == NULL)
    return -1;
  if (tolower(name[0]) != 'e' || name[1] != '=')
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<EthernetMatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <EthernetMatch+0x27>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <EthernetMatch+0x63>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
movsbl %al,%eax
cmp    $0x65,%eax
jne    1160 <EthernetMatch+0x50>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x3d,%eax
je     116c <EthernetMatch+0x5c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <EthernetMatch+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EthernetMatch>:
push   %rbp
push   %rbx
push   %rax
mov    $0xffffffff,%ebp
test   %rdi,%rdi
je     1138 <EthernetMatch+0x28>
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <tolower@plt>
cmp    $0x65,%al
jne    1138 <EthernetMatch+0x28>
xor    %ebp,%ebp
cmpb   $0x3d,0x1(%rbx)
setne  %bpl
neg    %ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @EthernetMatch(i8* %0, i8* nocapture readnone %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = tail call signext i8 @tolower(i8 signext %5)
%7 = icmp eq i8 %6, 101
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %0, i64 1
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 61
%12 = sext i1 %11 to i32
br label %13
13: ; preds = %8, %4, %2
%14 = phi i32 [ -1, %2 ], [ -1, %4 ], [ %12, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
unsigned int i386_cpuid();
void bail_if_no_sse(void) {
  unsigned int edx;
  edx = i386_cpuid();
  if (!(edx & (1 << 25)))
    exit(0);
}


x86 assembly (clang, -O0):
<bail_if_no_sse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <i386_cpuid@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x2000000,%eax
cmp    $0x0,%eax
jne    114a <bail_if_no_sse+0x2a>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bail_if_no_sse>:
push   %rax
xor    %eax,%eax
call   1030 <i386_cpuid@plt>
test   $0x2000000,%eax
je     1131 <bail_if_no_sse+0x11>
pop    %rax
ret
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @bail_if_no_sse() {
%1 = alloca i32
%2 = call i32 (...) @i386_cpuid()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = and i32 %3, 33554432
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
8: ; preds = %0
ret void
}

LLVM IR (-O2):
define void @bail_if_no_sse() {
%1 = tail call i32 (...) @i386_cpuid()
%2 = and i32 %1, 33554432
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int return_1() {
  printf("This function always returns 1.\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"This function always returns 1.\0A\00"
define i32 @return_1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [32 x i8] c"This function always returns 1.\00"
define i32 @return_1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 1
}
void adis16251_unconfigure_ring(struct iio_dev *indio_dev) {}


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define void @adis16251_unconfigure_ring(%struct.iio_dev* nocapture %0) {
ret void
}
void xen_setup_cpu_clockevents(void) {}


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

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

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

LLVM IR (-O2):
define void @xen_setup_cpu_clockevents() {
ret void
}
/* Variables and functions */
int f84(int *);
int f85(int *p) { return f84(p); }


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

x86 assembly (clang, -O2):
<f85>:
jmp    1030 <f84@plt>

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

LLVM IR (-O2):
define i32 @f85(i32* %0) {
%2 = tail call i32 @f84(i32* %0)
ret i32 %2
}
/* Type definitions */
struct stack_st_OPENSSL_CSTRING {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
scalar_t__ OPENSSL_sk_delete(int /*<<< orphan*/ *, int);
const char *sk_OPENSSL_CSTRING_delete(struct stack_st_OPENSSL_CSTRING *sk,
                                      int i) {
  return (const char *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i);
}


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

x86 assembly (clang, -O2):
<sk_OPENSSL_CSTRING_delete>:
jmp    1030 <OPENSSL_sk_delete@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_CSTRING = type { i32 }
define i8* @sk_OPENSSL_CSTRING_delete(%struct.stack_st_OPENSSL_CSTRING* %0, i32 %1) {
%3 = alloca %struct.stack_st_OPENSSL_CSTRING*
%4 = alloca i32
store %struct.stack_st_OPENSSL_CSTRING* %0, %struct.stack_st_OPENSSL_CSTRING** %3
store i32 %1, i32* %4
%5 = load %struct.stack_st_OPENSSL_CSTRING*, %struct.stack_st_OPENSSL_CSTRING** %3
%6 = bitcast %struct.stack_st_OPENSSL_CSTRING* %5 to i32*
%7 = load i32, i32* %4
%8 = call i64 @OPENSSL_sk_delete(i32* %6, i32 %7)
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_CSTRING = type { i32 }
define i8* @sk_OPENSSL_CSTRING_delete(%struct.stack_st_OPENSSL_CSTRING* %0, i32 %1) {
%3 = getelementptr %struct.stack_st_OPENSSL_CSTRING, %struct.stack_st_OPENSSL_CSTRING* %0, i64 0, i32 0
%4 = tail call i64 @OPENSSL_sk_delete(i32* %3, i32 %1)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void DMA1_Channel2_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @DMA1_Channel2_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @DMA1_Channel2_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int tan(double);
int italic(double th) {
  int theta = 256 * tan(th * (3.141592653589793 / 180.0));
  if (theta > 4000)
    return (1);
  printf("I%d\n", theta);
  return (0);
}


x86 assembly (clang, -O0):
<italic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xecb(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <tan@plt>
shl    $0x8,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0xfa0,-0x14(%rbp)
jle    115e <italic+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1174 <italic+0x54>
mov    -0x14(%rbp),%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<italic>:
push   %rax
mulsd  0xed7(%rip),%xmm0
call   1040 <tan@plt>
mov    $0x1,%ecx
cmp    $0xf,%eax
jg     114b <italic+0x2b>
shl    $0x8,%eax
lea    0xec6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %ecx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"I%d\0A\00"
define i32 @italic(double %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
%5 = load double, double* %3
%6 = fmul double %5, 0x3F91DF46A2529D39
%7 = call i32 @tan(double %6)
%8 = mul nsw i32 256, %7
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 4000
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 1, i32* %2
br label %15
12: ; preds = %1
%13 = load i32, i32* %4
%14 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %13)
store i32 0, i32* %2
br label %15
15: ; preds = %12, %11
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@.str = [5 x i8] c"I%d\0A\00"
define i32 @italic(double %0) {
%2 = fmul double %0, 0x3F91DF46A2529D39
%3 = tail call i32 @tan(double %2)
%4 = icmp sgt i32 %3, 15
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = shl nsw i32 %3, 8
%7 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ 0, %5 ], [ 1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
void someFunction(const int b[], int size) {
  if (size > 0) {
    someFunction(&b[1], size - 1);
    printf("%d  ", b[0]);
  }
}


x86 assembly (clang, -O0):
<someFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    115e <someFunction+0x3e>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1040 <someFunction@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<someFunction>:
test   %esi,%esi
jle    1143 <someFunction+0x23>
push   %rbx
mov    %rdi,%rbx
add    $0x4,%rdi
add    $0xffffffff,%esi
call   1040 <someFunction@plt>
mov    (%rbx),%esi
lea    0xec3(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d \00"
define void @someFunction(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2, %5
ret void
5: ; preds = %2
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = add nsw i32 %1, -1
tail call void @someFunction(i32* %6, i32 %7)
%8 = load i32, i32* %0
%9 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %4
}
/* Variables and functions */
scalar_t__ strtol(char const *, char **, int);
int parseInteger(const char *astring) {
  int returnval;
  char *endptr;
  if (astring == NULL) {
    returnval = 0;
  } else {
    returnval = (int)strtol(astring, &endptr, 10);
  }
  return returnval;
}


x86 assembly (clang, -O0):
<parseInteger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1133 <parseInteger+0x23>
movl   $0x0,-0xc(%rbp)
jmp    1148 <parseInteger+0x38>
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseInteger>:
test   %rdi,%rdi
je     1128 <parseInteger+0x18>
push   %rax
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @parseInteger(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = icmp eq i8* %0, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = call i64 @strtol(i8* %0, i8** %2, i32 10)
%7 = trunc i64 %6 to i32
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ %7, %5 ], [ 0, %1 ]
ret i32 %9
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void LCDRasterDisable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000028))) &= ~0x00000001;
}


x86 assembly (clang, -O0):
<LCDRasterDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x28(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDRasterDisable>:
andq   $0xfffffffffffffffe,0x28(%rdi)
ret

LLVM IR (-O0):
define void @LCDRasterDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 40
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -2
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @LCDRasterDisable(i64 %0) {
%2 = add nsw i64 %0, 40
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, -2
store volatile i64 %5, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void pic_acknowledge(unsigned int interrupt) {
  if (interrupt < 0x20 || interrupt > 0x28 + 7) {
    return;
  }
  if (interrupt < 0x28) {
    outb(0x20, 0x20);
  } else {
    outb(0xA0, 0x20);
  }
}


x86 assembly (clang, -O0):
<pic_acknowledge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jb     112f <pic_acknowledge+0x1f>
cmpl   $0x2f,-0x4(%rbp)
jbe    1134 <pic_acknowledge+0x24>
jmp    115e <pic_acknowledge+0x4e>
cmpl   $0x28,-0x4(%rbp)
jae    114f <pic_acknowledge+0x3f>
mov    $0x20,%esi
mov    %esi,%edi
call   1030 <outb@plt>
jmp    115e <pic_acknowledge+0x4e>
mov    $0xa0,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic_acknowledge>:
lea    -0x30(%rdi),%eax
cmp    $0xfffffff0,%eax
jae    1119 <pic_acknowledge+0x9>
ret
xor    %eax,%eax
cmp    $0x28,%edi
setae  %al
shl    $0x7,%eax
or     $0x20,%eax
mov    %eax,%edi
mov    $0x20,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @pic_acknowledge(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 32
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ugt i32 %6, 47
br i1 %7, label %8, label %9
8: ; preds = %5, %1
br label %16
9: ; preds = %5
%10 = load i32, i32* %2
%11 = icmp ult i32 %10, 40
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @outb(i32 32, i32 32)
br label %16
14: ; preds = %9
%15 = call i32 @outb(i32 160, i32 32)
br label %16
16: ; preds = %8, %14, %12
ret void
}

LLVM IR (-O2):
define void @pic_acknowledge(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, -16
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = icmp ult i32 %0, 40
%6 = select i1 %5, i32 32, i32 160
%7 = tail call i32 @outb(i32 %6, i32 32)
br label %8
8: ; preds = %4, %1
ret void
}
void example_5(int A, int B, int C) {
  int S0 = 0;
  int S1 = 0;
  if (A == B) {
    S0 = S0;
  }
  if (A == C) {
    S1 = S1;
  }
}


x86 assembly (clang, -O0):
<example_5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    112d <example_5+0x2d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    113f <example_5+0x3f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @example_5(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
char *strerror(long);
char *string___Int_strerror_ext___impl(long recv) { return strerror(recv); }


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

x86 assembly (clang, -O2):
<string___Int_strerror_ext___impl>:
jmp    1030 <strerror@plt>

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

LLVM IR (-O2):
define i8* @string___Int_strerror_ext___impl(i64 %0) {
%2 = tail call i8* @strerror(i64 %0)
ret i8* %2
}
int dev_add_param_fixed(struct device_d *dev, char *name, char *value) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.device_d = type opaque
define i32 @dev_add_param_fixed(%struct.device_d* %0, i8* %1, i8* %2) {
%4 = alloca %struct.device_d*
%5 = alloca i8*
%6 = alloca i8*
store %struct.device_d* %0, %struct.device_d** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
%struct.device_d = type opaque
define i32 @dev_add_param_fixed(%struct.device_d* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
float float_max(float a, float b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<float_max>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <float_max+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <float_max+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_max>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @float_max(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @float_max(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t hash_f1(uint64_t t) { return t % 8193; }


x86 assembly (clang, -O0):
<hash_f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2001,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_f1>:
movslq %edi,%rax
imul   $0x3ffe001,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x27,%rcx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0xd,%edx
add    %ecx,%edx
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @hash_f1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 8193
ret i32 %4
}

LLVM IR (-O2):
define i32 @hash_f1(i32 %0) {
%2 = srem i32 %0, 8193
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ l;

/* Variables and functions */
int fls64(unsigned long);
int fls_xfs(unsigned long);
unsigned fls_long(unsigned long l) {
  if (sizeof(l) == 4)
    return fls_xfs(l);
  return fls64(l);
}


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

x86 assembly (clang, -O2):
<fls_long>:
jmp    1030 <fls64@plt>

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

LLVM IR (-O2):
define i32 @fls_long(i64 %0) {
%2 = tail call i32 @fls64(i64 %0)
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t recv_diag_get_len(uint8_t *data) { return (data[2] << 8) | data[3]; }


x86 assembly (clang, -O0):
<recv_diag_get_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0xc(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<recv_diag_get_len>:
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     0xc(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @recv_diag_get_len(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = getelementptr inbounds i32, i32* %0, i64 3
%6 = load i32, i32* %5
%7 = or i32 %4, %6
ret i32 %7
}
long double fabsl(long double x) {}


x86 assembly (clang, -O0):
<fabsl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define x86_fp80 @fabsl(x86_fp80 %0) {
ret x86_fp80 undef
}
void RTTlsGet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTlsGet() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO(int);
int BNC_6() {
  int ii, stat = 99;
  char com1, data;
  BNCIO(6);
  return (stat);
}


x86 assembly (clang, -O0):
<BNC_6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x63,-0x8(%rbp)
mov    $0x6,%edi
call   1030 <BNCIO@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BNC_6>:
push   %rax
mov    $0x6,%edi
call   1030 <BNCIO@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @BNC_6() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
store i32 99, i32* %2
%5 = call i32 @BNCIO(i32 6)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @BNC_6() {
%1 = tail call i32 @BNCIO(i32 6)
ret i32 99
}
int is_98(int elem) { return (98 == elem); }


x86 assembly (clang, -O0):
<is_98>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x62,%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_98>:
xor    %eax,%eax
cmp    $0x62,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_98(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 98, %3
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @is_98(i32 %0) {
%2 = icmp eq i32 %0, 98
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct __sk_buff {
  int dummy;
};

/* Variables and functions */
int TC_ACT_OK;
int /*<<< orphan*/ log_nth_level(struct __sk_buff *, int);
__attribute__((section("cgroup_id_logger"), used)) int
log_cgroup_id(struct __sk_buff *skb) {
  log_nth_level(skb, 0);
  log_nth_level(skb, 1);
  log_nth_level(skb, 2);
  log_nth_level(skb, 3);
  return TC_ACT_OK;
}


x86 assembly (clang, -O0):
<log_cgroup_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <log_nth_level@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <log_nth_level@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <log_nth_level@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1030 <log_nth_level@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_cgroup_id>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <log_nth_level@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <log_nth_level@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <log_nth_level@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <log_nth_level@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.__sk_buff = type { i32 }
@TC_ACT_OK = global i32 0
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.__sk_buff*)* @log_cgroup_id to i8*)], section "llvm.metadata"
define i32 @log_cgroup_id(%struct.__sk_buff* %0) section "cgroup_id_logger" {
%2 = alloca %struct.__sk_buff*
store %struct.__sk_buff* %0, %struct.__sk_buff** %2
%3 = load %struct.__sk_buff*, %struct.__sk_buff** %2
%4 = call i32 @log_nth_level(%struct.__sk_buff* %3, i32 0)
%5 = load %struct.__sk_buff*, %struct.__sk_buff** %2
%6 = call i32 @log_nth_level(%struct.__sk_buff* %5, i32 1)
%7 = load %struct.__sk_buff*, %struct.__sk_buff** %2
%8 = call i32 @log_nth_level(%struct.__sk_buff* %7, i32 2)
%9 = load %struct.__sk_buff*, %struct.__sk_buff** %2
%10 = call i32 @log_nth_level(%struct.__sk_buff* %9, i32 3)
%11 = load i32, i32* @TC_ACT_OK
ret i32 %11
}

LLVM IR (-O2):
%struct.__sk_buff = type { i32 }
@TC_ACT_OK = global i32 0
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.__sk_buff*)* @log_cgroup_id to i8*)], section "llvm.metadata"
define i32 @log_cgroup_id(%struct.__sk_buff* %0) section "cgroup_id_logger" {
%2 = tail call i32 @log_nth_level(%struct.__sk_buff* %0, i32 0)
%3 = tail call i32 @log_nth_level(%struct.__sk_buff* %0, i32 1)
%4 = tail call i32 @log_nth_level(%struct.__sk_buff* %0, i32 2)
%5 = tail call i32 @log_nth_level(%struct.__sk_buff* %0, i32 3)
%6 = load i32, i32* @TC_ACT_OK
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void CheckArgc(int argc) {
  if (argc < 2) {
    printf("Program needs at least 1 input text file to run.\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<CheckArgc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    114b <CheckArgc+0x2b>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckArgc>:
cmp    $0x1,%edi
jle    1126 <CheckArgc+0x6>
ret
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"Program needs at least 1 input text file to run.\0A\00"
define void @CheckArgc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 2
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
@str = [49 x i8] c"Program needs at least 1 input text file to run.\00"
define void @CheckArgc(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
bool nullp(void *p) {
  void **pp = (void **)p;
  if (*pp == NULL)
    return false;
  free(*pp);
  *pp = NULL;
  return true;
}


x86 assembly (clang, -O0):
<nullp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
jne    113e <nullp+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    115c <nullp+0x4c>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nullp>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     112f <nullp+0x1f>
call   1030 <free@plt>
movq   $0x0,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @nullp(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @free(i8* %3)
store i8* null, i8** %2
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ 1, %5 ], [ 0, %1 ]
ret i32 %8
}
unsigned int ntob32(char *data) {
  unsigned int val;
  unsigned char *c = (unsigned char *)data;
  val = (c[0] << 24) | (c[1] << 16) | c[2] << 8 | c[3];
  return val;
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @_Jv_JVMPI_Notify_OBJECT_ALLOC() {
ret void
}
/* Variables and functions */
scalar_t__ Offset();
scalar_t__ Size();
int Eof() { return (Offset() >= Size()); }


x86 assembly (clang, -O0):
<Eof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <Offset@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <Size@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
cmp    %rcx,%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Eof>:
push   %rbx
xor    %eax,%eax
call   1030 <Offset@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <Size@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
setge  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Eof() {
%1 = call i64 (...) @Offset()
%2 = call i64 (...) @Size()
%3 = icmp sge i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @Eof() {
%1 = tail call i64 (...) @Offset()
%2 = tail call i64 (...) @Size()
%3 = icmp sge i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}
int exe_two_times_then_combine_the_result() {}


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

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

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

LLVM IR (-O2):
define i32 @exe_two_times_then_combine_the_result() {
ret i32 undef
}
void call_m64abs(unsigned long long *m64) {
  if ((long)m64 & 0xFFFFFFFF80000000LL) {
    printf("Error: destination %lx not in lower 2GB for call_m64abs()\n",
           (long)m64);
    asm(" int $3; ");
  }
  put8(0xFF);
  put8(0x14);
  put8(0x25);
  put32((int)(unsigned long)m64);
}


x86 assembly (clang, -O0):
<call_m64abs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffffffff80000000,%rax
cmp    $0x0,%rax
je     1163 <call_m64abs+0x33>
mov    -0x8(%rbp),%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
int3
mov    $0xff,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    $0x14,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    $0x25,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    $0x0,%al
call   1050 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_m64abs>:
push   %rbx
mov    %rdi,%rbx
test   $0xffffffff80000000,%rdi
je     114f <call_m64abs+0x1f>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
int3
mov    $0xff,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    $0x14,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    $0x25,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1050 <put32@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"Error: destination %lx not in lower 2GB for call_m64abs()\0A\00"
define void @call_m64abs(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = ptrtoint i64* %3 to i64
%5 = and i64 %4, -2147483648
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i64*, i64** %2
%9 = ptrtoint i64* %8 to i64
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i64 %9)
br label %11
11: ; preds = %7, %1
%12 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 255)
%13 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 20)
%14 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 37)
%15 = load i64*, i64** %2
%16 = ptrtoint i64* %15 to i64
%17 = trunc i64 %16 to i32
%18 = call i32 (i32, ...) bitcast (i32 (...)* @put32 to i32 (i32, ...)*)(i32 %17)
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"Error: destination %lx not in lower 2GB for call_m64abs()\0A\00"
define void @call_m64abs(i64* %0) {
%2 = ptrtoint i64* %0 to i64
%3 = icmp ult i64* %0, inttoptr (i64 2147483648 to i64*)
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i64 %2)
tail call void asm sideeffect " int $$3; ", "~{dirflag},~{fpsr},~{flags}"()
br label %6
6: ; preds = %4, %1
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 255)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 20)
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 37)
%10 = trunc i64 %2 to i32
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @put32 to i32 (i32, ...)*)(i32 %10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void size(int arr[10]) { printf("size of array is:%d\n", sizeof(arr)); }


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

x86 assembly (clang, -O2):
<size>:
lea    0xee9(%rip),%rdi
mov    $0x8,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"size of array is:%d\0A\00"
define void @size(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 8)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"size of array is:%d\0A\00"
define void @size(i32* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 8)
ret void
}
/* Variables and functions */
void *mem_mt_malloc(size_t size) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @mem_mt_malloc(i64 %0) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar_fd(char, int);
int /*<<< orphan*/ ft_putstr_fd(char const *, int);
void ft_putendl_fd(char const *s, int fd) {
  if (!s || !(*s)) {
    ft_putchar_fd('\n', fd);
    return;
  }
  ft_putstr_fd(s, fd);
  ft_putchar_fd('\n', fd);
  return;
}


x86 assembly (clang, -O0):
<ft_putendl_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1147 <ft_putendl_fd+0x27>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1159 <ft_putendl_fd+0x39>
mov    -0xc(%rbp),%esi
mov    $0xa,%edi
call   1040 <ft_putchar_fd@plt>
jmp    1172 <ft_putendl_fd+0x52>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <ft_putstr_fd@plt>
mov    -0xc(%rbp),%esi
mov    $0xa,%edi
call   1040 <ft_putchar_fd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putendl_fd>:
push   %rbx
mov    %esi,%ebx
test   %rdi,%rdi
je     1134 <ft_putendl_fd+0x14>
cmpb   $0x0,(%rdi)
je     1134 <ft_putendl_fd+0x14>
mov    %ebx,%esi
call   1030 <ft_putstr_fd@plt>
mov    $0xa,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <ft_putchar_fd@plt>

LLVM IR (-O0):
define void @ft_putendl_fd(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %7, %2
%12 = load i32, i32* %4
%13 = call i32 @ft_putchar_fd(i8 signext 10, i32 %12)
br label %20
14: ; preds = %7
%15 = load i8*, i8** %3
%16 = load i32, i32* %4
%17 = call i32 @ft_putstr_fd(i8* %15, i32 %16)
%18 = load i32, i32* %4
%19 = call i32 @ft_putchar_fd(i8 signext 10, i32 %18)
br label %20
20: ; preds = %14, %11
ret void
}

LLVM IR (-O2):
define void @ft_putendl_fd(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @ft_putstr_fd(i8* %0, i32 %1)
br label %9
9: ; preds = %2, %4, %7
%10 = tail call i32 @ft_putchar_fd(i8 signext 10, i32 %1)
ret void
}
/* Variables and functions */
int DoMatch(char const *, char const *);
int tr_wildmat(const char *text, const char *p) {
  if (p[0] == '*' && p[1] == '\0')
    return 1;
  return DoMatch(text, p) == 1;
}


x86 assembly (clang, -O0):
<tr_wildmat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
jne    114d <tr_wildmat+0x3d>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    114d <tr_wildmat+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1168 <tr_wildmat+0x58>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <DoMatch@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tr_wildmat>:
push   %rax
cmpb   $0x2a,(%rsi)
jne    111c <tr_wildmat+0xc>
cmpb   $0x0,0x1(%rsi)
je     112d <tr_wildmat+0x1d>
call   1030 <DoMatch@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @tr_wildmat(i8* %0, i8* %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 42
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %1, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %5, %2
%10 = tail call i32 @DoMatch(i8* %0, i8* %1)
%11 = icmp eq i32 %10, 1
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %5, %9
%14 = phi i32 [ %12, %9 ], [ 1, %5 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
void rws_socket_check_info(const char *info) {
  assert(info);
  (void)info;
}


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

x86 assembly (clang, -O2):
<rws_socket_check_info>:
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define void @rws_socket_check_info(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t UInt16GetBE(const void *b2) {
  return (((uint16_t)((const uint8_t *)b2)[0] << 8) |
          ((uint16_t)((const uint8_t *)b2)[1]));
}


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

x86 assembly (clang, -O2):
<UInt16GetBE>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @UInt16GetBE(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i64*
%5 = getelementptr inbounds i64, i64* %4, i64 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 8
%9 = load i8*, i8** %2
%10 = bitcast i8* %9 to i64*
%11 = getelementptr inbounds i64, i64* %10, i64 1
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = or i32 %8, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @UInt16GetBE(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 8
%6 = getelementptr inbounds i8, i8* %0, i64 8
%7 = bitcast i8* %6 to i64*
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = or i32 %5, %9
ret i32 %10
}
void foo181(int p) {}


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

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

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

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