xunge/DecIR huggingface dataset:
/* Variables and functions */
short IFF_UP;
int set_if_flags(char *, short);
int set_if_down(char *ifname, short flags) {
  return set_if_flags(ifname, flags & ~IFF_UP);
}


x86 assembly (clang, -O0):
<set_if_down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
movswl -0xa(%rbp),%eax
mov    0x2eb6(%rip),%rcx
movswl (%rcx),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movswl %ax,%esi
call   1030 <set_if_flags@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_if_down>:
mov    0x2ed1(%rip),%rax
movzwl (%rax),%eax
not    %eax
and    %esi,%eax
movswl %ax,%esi
jmp    1030 <set_if_flags@plt>

LLVM IR (-O0):
@IFF_UP = global i16 0
define i32 @set_if_down(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i8*, i8** %3
%6 = load i16, i16* %4
%7 = sext i16 %6 to i32
%8 = load i16, i16* @IFF_UP
%9 = sext i16 %8 to i32
%10 = xor i32 %9, -1
%11 = and i32 %7, %10
%12 = trunc i32 %11 to i16
%13 = call i32 @set_if_flags(i8* %5, i16 signext %12)
ret i32 %13
}

LLVM IR (-O2):
@IFF_UP = global i16 0
define i32 @set_if_down(i8* %0, i16 signext %1) {
%3 = load i16, i16* @IFF_UP
%4 = xor i16 %3, -1
%5 = and i16 %4, %1
%6 = tail call i32 @set_if_flags(i8* %0, i16 signext %5)
ret i32 %6
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
scalar_t__ readEeprom(int /*<<< orphan*/, int *);
uint8_t eeprom_read_byte(uint8_t *index) {
  uint8_t val = 0;
  if (readEeprom((uint32_t)index, &val)) {
    return val;
  }
  return 0xFF;
}


x86 assembly (clang, -O0):
<eeprom_read_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%edi
lea    -0x14(%rbp),%rsi
call   1030 <readEeprom@plt>
cmp    $0x0,%rax
je     1147 <eeprom_read_byte+0x37>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114e <eeprom_read_byte+0x3e>
movl   $0xff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eeprom_read_byte>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <readEeprom@plt>
mov    %rax,%rcx
mov    $0xff,%eax
test   %rcx,%rcx
je     1134 <eeprom_read_byte+0x24>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @eeprom_read_byte(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 0, i32* %4
%5 = load i32*, i32** %3
%6 = ptrtoint i32* %5 to i32
%7 = call i64 @readEeprom(i32 %6, i32* %4)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %4
store i32 %10, i32* %2
br label %12
11: ; preds = %1
store i32 255, i32* %2
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @eeprom_read_byte(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = ptrtoint i32* %0 to i64
%5 = trunc i64 %4 to i32
%6 = call i64 @readEeprom(i32 %5, i32* %2)
%7 = icmp eq i64 %6, 0
%8 = load i32, i32* %2
%9 = select i1 %7, i32 255, i32 %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xc7() {
  Assert_real((isgraph(199) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              1000, ("isgraph should be 0 for 0xc7"));
}


x86 assembly (clang, -O0):
<t_isgraph_0xc7>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc7,%edi
call   1040 <isgraph@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3e8,%edx
lea    0xf5b(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0xc7>:
push   %rax
mov    $0xc7,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3e8,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xc7\00"
define void @t_isgraph_0xc7() {
%1 = call i64 @isgraph(i32 199)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1000, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xc7\00"
define void @t_isgraph_0xc7() {
%1 = tail call i64 @isgraph(i32 199)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1000, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int close(int);
int rc_gpio_fd_close(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<rc_gpio_fd_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @rc_gpio_fd_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef unsigned long uint8_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
void bit_clear16(volatile uint16_t *ptr, uint8_t bit) {
  *((volatile uint16_t *)(((uintptr_t)ptr) | (1 << 26))) =
      (uint16_t)(~(1ul << bit));
}


x86 assembly (clang, -O0):
<bit_clear16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,%rcx
xor    $0xffffffffffffffff,%rcx
mov    -0x8(%rbp),%rax
or     $0x4000000,%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_clear16>:
mov    %rsi,%rcx
mov    $0xfffffffffffffffe,%rax
rol    %cl,%rax
or     $0x4000000,%rdi
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @bit_clear16(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = shl i64 1, %5
%7 = xor i64 %6, -1
%8 = load i64*, i64** %3
%9 = ptrtoint i64* %8 to i64
%10 = or i64 %9, 67108864
%11 = inttoptr i64 %10 to i64*
store volatile i64 %7, i64* %11
ret void
}

LLVM IR (-O2):
define void @bit_clear16(i64* %0, i64 %1) {
%3 = shl nuw i64 1, %1
%4 = xor i64 %3, -1
%5 = ptrtoint i64* %0 to i64
%6 = or i64 %5, 67108864
%7 = inttoptr i64 %6 to i64*
store volatile i64 %4, i64* %7
ret void
}
struct inet_sock *inet_sk(const struct sock *sk) {
  return (struct inet_sock *)sk;
}


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

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

LLVM IR (-O0):
%struct.inet_sock = type opaque
%struct.sock = type opaque
define %struct.inet_sock* @inet_sk(%struct.sock* %0) {
%2 = alloca %struct.sock*
store %struct.sock* %0, %struct.sock** %2
%3 = load %struct.sock*, %struct.sock** %2
%4 = bitcast %struct.sock* %3 to %struct.inet_sock*
ret %struct.inet_sock* %4
}

LLVM IR (-O2):
%struct.inet_sock = type opaque
%struct.sock = type opaque
define %struct.inet_sock* @inet_sk(%struct.sock* readnone %0) {
%2 = bitcast %struct.sock* %0 to %struct.inet_sock*
ret %struct.inet_sock* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_4_le(unsigned long long const,
                                        int /*<<< orphan*/ *);
void __put_unaligned_8_le(const unsigned long long __v, register __u8 *__p) {
  __put_unaligned_4_le(__v >> 32, __p + 4);
  __put_unaligned_4_le(__v, __p);
}


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

x86 assembly (clang, -O2):
<__put_unaligned_8_le>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
shr    $0x20,%rdi
add    $0x10,%rsi
call   1030 <__put_unaligned_4_le@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <__put_unaligned_4_le@plt>

LLVM IR (-O0):
define void @__put_unaligned_8_le(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
store i64 %0, i64* %3
store i32* %1, i32** %4
%5 = load i64, i64* %3
%6 = lshr i64 %5, 32
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 4
%9 = call i32 @__put_unaligned_4_le(i64 %6, i32* %8)
%10 = load i64, i64* %3
%11 = load i32*, i32** %4
%12 = call i32 @__put_unaligned_4_le(i64 %10, i32* %11)
ret void
}

LLVM IR (-O2):
define void @__put_unaligned_8_le(i64 %0, i32* %1) {
%3 = lshr i64 %0, 32
%4 = getelementptr inbounds i32, i32* %1, i64 4
%5 = tail call i32 @__put_unaligned_4_le(i64 %3, i32* %4)
%6 = tail call i32 @__put_unaligned_4_le(i64 %0, i32* %1)
ret void
}
void P_entityclose() {}


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

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

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

LLVM IR (-O2):
define void @P_entityclose() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hl_cache_free();
void hl_global_free() { hl_cache_free(); }


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

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

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

LLVM IR (-O2):
define void @hl_global_free() {
%1 = tail call i32 (...) @hl_cache_free()
ret void
}
long long clearBit_fun_llong(long long x, unsigned i) { return x & ~(1 << i); }


x86 assembly (clang, -O0):
<clearBit_fun_llong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
movslq %ecx,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearBit_fun_llong>:
mov    %esi,%ecx
mov    $0xfffffffe,%eax
rol    %cl,%eax
cltq
and    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @clearBit_fun_llong(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = sext i32 %8 to i64
%10 = and i64 %5, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @clearBit_fun_llong(i64 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = sext i32 %4 to i64
%6 = and i64 %5, %0
ret i64 %6
}
unsigned int my_itoa_buffer_size(unsigned int number, unsigned char base) {
  unsigned int end, pow;
  end = 1;
  pow = 1;
  while (pow * base <= number) {
    end++;
    pow = pow * base;
  }
  return end + 1;
}


x86 assembly (clang, -O0):
<my_itoa_buffer_size>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
movzbl -0x5(%rbp),%ecx
imul   %ecx,%eax
cmp    -0x4(%rbp),%eax
ja     1149 <my_itoa_buffer_size+0x49>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
movzbl -0x5(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    111b <my_itoa_buffer_size+0x1b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_itoa_buffer_size>:
mov    $0x1,%eax
mov    $0x1,%ecx
nopw   0x0(%rax,%rax,1)
imul   %esi,%ecx
add    $0x1,%eax
cmp    %edi,%ecx
jbe    1110 <my_itoa_buffer_size+0x10>
ret

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

LLVM IR (-O2):
define i32 @my_itoa_buffer_size(i32 %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
br label %4
4: ; preds = %4, %2
%5 = phi i32 [ 2, %2 ], [ %9, %4 ]
%6 = phi i32 [ 1, %2 ], [ %7, %4 ]
%7 = mul i32 %6, %3
%8 = icmp ugt i32 %7, %0
%9 = add i32 %5, 1
br i1 %8, label %10, label %4
10: ; preds = %4
ret i32 %5
}
/* Variables and functions */
int jac_jacobi_zeros(double *, int const, double, double);
int jac_zeros_glj(double *z, const int Q, double alpha, double beta) {
  z[0] = -1.0;
  z[Q - 1] = 1.0;
  return jac_jacobi_zeros(z + 1, Q - 2, alpha + 1.0, beta + 1.0);
}


x86 assembly (clang, -O0):
<jac_zeros_glj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xeb2(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
mov    -0xc(%rbp),%esi
sub    $0x2,%esi
movsd  0xe97(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xe8a(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
call   1030 <jac_jacobi_zeros@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_zeros_glj>:
movabs $0xbff0000000000000,%rax
mov    %rax,(%rdi)
movslq %esi,%rsi
movabs $0x3ff0000000000000,%rax
mov    %rax,-0x8(%rdi,%rsi,8)
add    $0x8,%rdi
add    $0xfffffffe,%esi
movsd  0xec2(%rip),%xmm2
addsd  %xmm2,%xmm0
addsd  %xmm2,%xmm1
jmp    1030 <jac_jacobi_zeros@plt>

LLVM IR (-O0):
define i32 @jac_zeros_glj(double* %0, i32 %1, double %2, double %3) {
%5 = alloca double*
%6 = alloca i32
%7 = alloca double
%8 = alloca double
store double* %0, double** %5
store i32 %1, i32* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double*, double** %5
%10 = getelementptr inbounds double, double* %9, i64 0
store double -1.000000e+00, double* %10
%11 = load double*, double** %5
%12 = load i32, i32* %6
%13 = sub nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %11, i64 %14
store double 1.000000e+00, double* %15
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load i32, i32* %6
%19 = sub nsw i32 %18, 2
%20 = load double, double* %7
%21 = fadd double %20, 1.000000e+00
%22 = load double, double* %8
%23 = fadd double %22, 1.000000e+00
%24 = call i32 @jac_jacobi_zeros(double* %17, i32 %19, double %21, double %23)
ret i32 %24
}

LLVM IR (-O2):
define i32 @jac_zeros_glj(double* %0, i32 %1, double %2, double %3) {
store double -1.000000e+00, double* %0
%5 = add nsw i32 %1, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds double, double* %0, i64 %6
store double 1.000000e+00, double* %7
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = add nsw i32 %1, -2
%10 = fadd double %2, 1.000000e+00
%11 = fadd double %3, 1.000000e+00
%12 = tail call i32 @jac_jacobi_zeros(double* %8, i32 %9, double %10, double %11)
ret i32 %12
}
int isPositive(int x) { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @isPositive(i32 %0) {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ record_linux_param_description(char *, char *, char *);
void module_param_desc_beta(void) {
  record_linux_param_description(
      "tcp_naive_reno.c", "beta",
      "MD decrement portion of window: every loss the window is reduced by a "
      "proportion of 1/beta");
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"tcp_naive_reno.c\00"
@.str.1 = [5 x i8] c"beta\00"
@.str.2 = [91 x i8] c"MD decrement portion of window: every loss the window is reduced by a proportion of 1/beta\00"
define void @module_param_desc_beta() {
%1 = call i32 @record_linux_param_description(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"tcp_naive_reno.c\00"
@.str.1 = [5 x i8] c"beta\00"
@.str.2 = [91 x i8] c"MD decrement portion of window: every loss the window is reduced by a proportion of 1/beta\00"
define void @module_param_desc_beta() {
%1 = tail call i32 @record_linux_param_description(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int test_imm_5Duint8_mem(unsigned char *val) {
  return ((*val) & (-0x5D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Duint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffffa3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Duint8_mem>:
testb  $0xa3,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_5Duint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -93
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct vec3 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec3_floor(float *, float *);
__attribute__((always_)) struct vec3 *psvec3_floor(struct vec3 *result,
                                                   struct vec3 *a) {
  vec3_floor((float *)result, (float *)a);
  return result;
}


x86 assembly (clang, -O0):
<psvec3_floor>:
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 <vec3_floor@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec3_floor>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3_floor@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_floor(%struct.vec3* %0, %struct.vec3* %1) {
%3 = alloca %struct.vec3*
%4 = alloca %struct.vec3*
store %struct.vec3* %0, %struct.vec3** %3
store %struct.vec3* %1, %struct.vec3** %4
%5 = load %struct.vec3*, %struct.vec3** %3
%6 = bitcast %struct.vec3* %5 to float*
%7 = load %struct.vec3*, %struct.vec3** %4
%8 = bitcast %struct.vec3* %7 to float*
%9 = call i32 @vec3_floor(float* %6, float* %8)
%10 = load %struct.vec3*, %struct.vec3** %3
ret %struct.vec3* %10
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_floor(%struct.vec3* returned %0, %struct.vec3* %1) {
%3 = bitcast %struct.vec3* %0 to float*
%4 = bitcast %struct.vec3* %1 to float*
%5 = tail call i32 @vec3_floor(float* %3, float* %4)
ret %struct.vec3* %0
}
/* Variables and functions */
int /*<<< orphan*/ file_write(unsigned int, char *);
void put_socket(unsigned int i) { file_write(i, "socket.resp"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"socket.resp\00"
define void @put_socket(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @file_write(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"socket.resp\00"
define void @put_socket(i32 %0) {
%2 = tail call i32 @file_write(i32 %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_ssum(int, float *, int);
int main() {
  float x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  float v = stdlib_strided_ssum(N, x, stride);
  printf("sum: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
call   1030 <stdlib_strided_ssum@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1030 <stdlib_strided_ssum@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [9 x i8] c"sum: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_ssum(i32 %6, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [9 x i8] c"sum: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_ssum(i32 4, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
float menorValor(float peso1, float peso2) {
  if (peso1 < peso2) {
    return peso1;
  } else {
    return peso2;
  }
}


x86 assembly (clang, -O0):
<menorValor>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <menorValor+0x30>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113a <menorValor+0x3a>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<menorValor>:
minss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @menorValor(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
void soru_0() {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<soru_0>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <soru_0+0x9>
jmp    1109 <soru_0+0x9>

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

LLVM IR (-O0):
define void @soru_0() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @soru_0() {
br label %1
1: ; preds = %0, %1
br label %1
}
int fun(int a, int b) {
  int r;
  r = a % b;
  while (r) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1139 <fun+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
jmp    1114 <fun+0x14>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1120 <fun+0x20>
nopl   0x0(%rax)
mov    %edx,%ecx
mov    %esi,%eax
cltd
idiv   %ecx
mov    %ecx,%esi
test   %edx,%edx
jne    1110 <fun+0x10>
mov    %ecx,%eax
ret
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @fun(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ %3, %2 ]
%7 = phi i32 [ %6, %5 ], [ %1, %2 ]
%8 = srem i32 %7, %6
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
%11 = phi i32 [ %1, %2 ], [ %6, %5 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
void closeWithErrorSocket(char *error) {
  char errMsj[50];
  sprintf(errMsj,
          "\x1B[31m"
          "%s"
          "\033[0m",
          error);
  perror(errMsj);
  exit(1);
}


x86 assembly (clang, -O0):
<closeWithErrorSocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeb5(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x40(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<closeWithErrorSocket>:
push   %rbx
sub    $0x40,%rsp
mov    %rdi,%rdx
lea    0xec1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"\1B[31m%s\1B[0m\00"
define void @closeWithErrorSocket(i8* %0) {
%2 = alloca i8*
%3 = alloca [50 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%8 = call i32 @perror(i8* %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [12 x i8] c"\1B[31m%s\1B[0m\00"
define void @closeWithErrorSocket(i8* %0) {
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @perror(i8* %3)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ putchar(char);
void print_arr(int arr[], int length) {
  for (int i = 0; i < length; i++) {
    printf("%d ", arr[i]);
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<print_arr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1167 <print_arr+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <print_arr+0x16>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_arr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1155 <print_arr+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_arr+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_arr(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i8 signext 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Variables and functions */
int filter_by_abba(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  int count = filter_by_abba(stdin, stdout);
  if (0)
    fprintf(stderr, "%d matching lines in input\n", count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
call   1030 <filter_by_abba@plt>
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
call   1030 <filter_by_abba@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdin = global i32 0
@stdout = global i32 0
@stderr = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @stdin
%8 = load i32, i32* @stdout
%9 = call i32 @filter_by_abba(i32 %7, i32 %8)
store i32 %9, i32* %6
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@stdout = global i32 0
@stderr = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdin
%4 = load i32, i32* @stdout
%5 = tail call i32 @filter_by_abba(i32 %3, i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void fprint_jmp_DPTR(FILE *stream) {
  fprintf(stream, "JMP   @A+DPTR                   ");
}


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

x86 assembly (clang, -O2):
<fprint_jmp_DPTR>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"JMP @A+DPTR \00"
define void @fprint_jmp_DPTR(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"JMP @A+DPTR \00"
define void @fprint_jmp_DPTR(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 32, i64 1, i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ isLittleEndian();
short little2bigs(short);
short little2hosts(short num) {
  if (isLittleEndian())
    return num;
  return little2bigs(num);
}


x86 assembly (clang, -O0):
<little2hosts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <isLittleEndian@plt>
cmp    $0x0,%rax
je     114d <little2hosts+0x2d>
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    115a <little2hosts+0x3a>
movswl -0x4(%rbp),%edi
call   1030 <little2bigs@plt>
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<little2hosts>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <isLittleEndian@plt>
test   %rax,%rax
je     1133 <little2hosts+0x13>
mov    %ebx,%eax
pop    %rbx
ret
movswl %bx,%edi
pop    %rbx
jmp    1030 <little2bigs@plt>

LLVM IR (-O0):
define signext i16 @little2hosts(i16 signext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %3
%4 = call i64 (...) @isLittleEndian()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i16, i16* %3
store i16 %7, i16* %2
br label %11
8: ; preds = %1
%9 = load i16, i16* %3
%10 = call signext i16 @little2bigs(i16 signext %9)
store i16 %10, i16* %2
br label %11
11: ; preds = %8, %6
%12 = load i16, i16* %2
ret i16 %12
}

LLVM IR (-O2):
define signext i16 @little2hosts(i16 signext %0) {
%2 = tail call i64 (...) @isLittleEndian()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call signext i16 @little2bigs(i16 signext %0)
br label %6
6: ; preds = %1, %4
%7 = phi i16 [ %5, %4 ], [ %0, %1 ]
ret i16 %7
}
/* Variables and functions */
char *basename(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int usage(char *name) {
  fprintf(stderr, "Usage: %s <replay_filename>\n", basename(name));
  return 1;
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
call   1040 <basename@plt>
lea    0xeca(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Usage: %s <replay_filename>\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* @basename(i8* %0)
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 1
}
int hs_socks4(int sockfd, const char *user, const char *pass) { return 0; }


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

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

LLVM IR (-O0):
define i32 @hs_socks4(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @hs_socks4(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int jmlist_benchmark(int, char **);
int main(int argc, char *argv[]) { return jmlist_benchmark(argc, argv); }


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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <jmlist_benchmark@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <jmlist_benchmark@plt>

LLVM IR (-O0):
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 = load i8**, i8*** %5
%8 = call i32 @jmlist_benchmark(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @jmlist_benchmark(i32 %0, i8** %1)
ret i32 %3
}
int test_imm_8Duint8_reg(unsigned char val) {
  return ((val) & (-0x8D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_8Duint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 115
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void src_iomux_config() {}


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

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

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

LLVM IR (-O2):
define void @src_iomux_config() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sync();
int sync_system(int sync_it) {
  if (sync_it) {
    sync();
    sync();
  }
  return (0);
}


x86 assembly (clang, -O0):
<sync_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1133 <sync_system+0x23>
mov    $0x0,%al
call   1030 <sync@plt>
mov    $0x0,%al
call   1030 <sync@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync_system>:
test   %edi,%edi
je     1127 <sync_system+0x17>
push   %rax
xor    %eax,%eax
call   1030 <sync@plt>
xor    %eax,%eax
call   1030 <sync@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @sync_system(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 (...) @sync()
%5 = tail call i32 (...) @sync()
br label %6
6: ; preds = %3, %1
ret i32 0
}
int GetPreference(char ch) {
  switch (ch) {
  case ';':
    return 6;
  case ')':
    return 5;
  case '^':
    return 4;
  case '*':
  case '/':
  case '%':
    return 3;
  case '+':
  case '-':
    return 2;
  case '(':
    return 1;
  }
}


x86 assembly (clang, -O0):
<GetPreference>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffdb,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x39,%eax
ja     1177 <GetPreference+0x77>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x6,-0x4(%rbp)
jmp    1177 <GetPreference+0x77>
movl   $0x5,-0x4(%rbp)
jmp    1177 <GetPreference+0x77>
movl   $0x4,-0x4(%rbp)
jmp    1177 <GetPreference+0x77>
movl   $0x3,-0x4(%rbp)
jmp    1177 <GetPreference+0x77>
movl   $0x2,-0x4(%rbp)
jmp    1177 <GetPreference+0x77>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetPreference>:
mov    $0x6,%eax
add    $0xffffffdb,%edi
cmp    $0x39,%edi
ja     112e <GetPreference+0x2e>
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x3,%eax
ret
mov    $0x2,%eax
ret
mov    $0x1,%eax
ret
mov    $0x5,%eax
ret
mov    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @GetPreference(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %12 [
i32 59, label %6
i32 41, label %7
i32 94, label %8
i32 42, label %9
i32 47, label %9
i32 37, label %9
i32 43, label %10
i32 45, label %10
i32 40, label %11
]
6: ; preds = %1
store i32 6, i32* %2
br label %12
7: ; preds = %1
store i32 5, i32* %2
br label %12
8: ; preds = %1
store i32 4, i32* %2
br label %12
9: ; preds = %1, %1, %1
store i32 3, i32* %2
br label %12
10: ; preds = %1, %1
store i32 2, i32* %2
br label %12
11: ; preds = %1
store i32 1, i32* %2
br label %12
12: ; preds = %6, %7, %8, %9, %10, %11, %1
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @GetPreference(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %8 [
i32 40, label %7
i32 41, label %3
i32 94, label %4
i32 42, label %5
i32 47, label %5
i32 37, label %5
i32 43, label %6
i32 45, label %6
]
3: ; preds = %1
br label %8
4: ; preds = %1
br label %8
5: ; preds = %1, %1, %1
br label %8
6: ; preds = %1, %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %3, %4, %5, %6, %7, %1
%9 = phi i32 [ 1, %7 ], [ 2, %6 ], [ 3, %5 ], [ 4, %4 ], [ 5, %3 ], [ 6, %1 ]
ret i32 %9
}
int Find(int *parent, int f) {
  while (parent[f] > 0)
    f = parent[f];
  return f;
}


x86 assembly (clang, -O0):
<Find>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    1130 <Find+0x30>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc(%rbp)
jmp    110b <Find+0xb>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Find>:
mov    %esi,%eax
movslq %esi,%rcx
mov    (%rdi,%rcx,4),%esi
test   %esi,%esi
jg     1100 <Find>
ret

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

LLVM IR (-O2):
define i32 @Find(i32* nocapture %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %1, %2 ], [ %7, %3 ]
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = icmp sgt i32 %7, 0
br i1 %8, label %3, label %9
9: ; preds = %3
ret i32 %4
}
/* Variables and functions */
scalar_t__ WIFSTOPPED(int);
int WSTOPSIG(int);
int getWaitStopSig(int *statp) {
  if (WIFSTOPPED(*statp))
    return WSTOPSIG(*statp);
  else
    return -1;
}


x86 assembly (clang, -O0):
<getWaitStopSig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <WIFSTOPPED@plt>
cmp    $0x0,%rax
je     1154 <getWaitStopSig+0x34>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <WSTOPSIG@plt>
mov    %eax,-0x4(%rbp)
jmp    115b <getWaitStopSig+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getWaitStopSig>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <WIFSTOPPED@plt>
test   %rax,%rax
je     1138 <getWaitStopSig+0x18>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <WSTOPSIG@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @getWaitStopSig(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i64 @WIFSTOPPED(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %0
%7 = tail call i32 @WSTOPSIG(i32 %6)
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ %7, %5 ], [ -1, %1 ]
ret i32 %9
}
int kexec_should_crash(struct task_struct *p) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define i32 @kexec_should_crash(%struct.task_struct* nocapture readnone %0) {
ret i32 0
}