xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void badvpn_write_le16(uint16_t x, char *c_ptr) {
  uint8_t *ptr = (uint8_t *)c_ptr;
  ptr[1] = x >> 8;
  ptr[0] = x >> 0;
}


x86 assembly (clang, -O0):
<badvpn_write_le16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x0,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<badvpn_write_le16>:
mov    %edi,%eax
sar    $0x8,%eax
mov    %eax,0x4(%rsi)
mov    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define void @badvpn_write_le16(i32 %0, i8* nocapture writeonly %1) {
%3 = bitcast i8* %1 to i32*
%4 = ashr i32 %0, 8
%5 = getelementptr inbounds i8, i8* %1, i64 4
%6 = bitcast i8* %5 to i32*
store i32 %4, i32* %6
store i32 %0, i32* %3
ret void
}
int computeSurfaceArea(int a, int b, int c) {
  return (a * b + b * c + a * c) << 1;
}


x86 assembly (clang, -O0):
<computeSurfaceArea>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    %ecx,%eax
mov    -0x4(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    %ecx,%eax
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeSurfaceArea>:
lea    (%rdx,%rdi,1),%eax
imul   %esi,%eax
imul   %edi,%edx
add    %edx,%eax
add    %eax,%eax
ret

LLVM IR (-O0):
define i32 @computeSurfaceArea(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = mul nsw i32 %10, %11
%13 = add nsw i32 %9, %12
%14 = load i32, i32* %4
%15 = load i32, i32* %6
%16 = mul nsw i32 %14, %15
%17 = add nsw i32 %13, %16
%18 = shl i32 %17, 1
ret i32 %18
}

LLVM IR (-O2):
define i32 @computeSurfaceArea(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %2, %0
%5 = mul i32 %4, %1
%6 = mul nsw i32 %2, %0
%7 = add nsw i32 %5, %6
%8 = shl i32 %7, 1
ret i32 %8
}
/* Variables and functions */
long gcd(long, long);
long lcm(long a, long b) {
  return (long)(a * b) /
         gcd((((a) > (b)) ? (a) : (b)), (((a) < (b)) ? (a) : (b)));
}


x86 assembly (clang, -O0):
<lcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1148 <lcm+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1150 <lcm+0x40>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1173 <lcm+0x63>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    117b <lcm+0x6b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <gcd@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cqto
idiv   %rcx
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm>:
push   %rbx
mov    %rsi,%rbx
imul   %rdi,%rbx
cmp    %rsi,%rdi
mov    %rsi,%rax
cmovg  %rdi,%rax
cmovl  %rdi,%rsi
mov    %rax,%rdi
call   1030 <gcd@plt>
mov    %rax,%rcx
or     %rbx,%rax
shr    $0x20,%rax
je     1144 <lcm+0x34>
mov    %rbx,%rax
cqto
idiv   %rcx
pop    %rbx
ret
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i64 @lcm(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = mul nsw i64 %5, %6
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = icmp sgt i64 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i64, i64* %3
br label %15
13: ; preds = %2
%14 = load i64, i64* %4
br label %15
15: ; preds = %13, %11
%16 = phi i64 [ %12, %11 ], [ %14, %13 ]
%17 = load i64, i64* %3
%18 = load i64, i64* %4
%19 = icmp slt i64 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %15
%21 = load i64, i64* %3
br label %24
22: ; preds = %15
%23 = load i64, i64* %4
br label %24
24: ; preds = %22, %20
%25 = phi i64 [ %21, %20 ], [ %23, %22 ]
%26 = call i64 @gcd(i64 %16, i64 %25)
%27 = sdiv i64 %7, %26
ret i64 %27
}

LLVM IR (-O2):
define i64 @lcm(i64 %0, i64 %1) {
%3 = mul nsw i64 %1, %0
%4 = icmp sgt i64 %0, %1
%5 = select i1 %4, i64 %0, i64 %1
%6 = icmp slt i64 %0, %1
%7 = select i1 %6, i64 %0, i64 %1
%8 = tail call i64 @gcd(i64 %5, i64 %7)
%9 = sdiv i64 %3, %8
ret i64 %9
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t EMACNumAddrGet(uint32_t ui32Base) { return (4); }


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

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

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

LLVM IR (-O2):
define i32 @EMACNumAddrGet(i32 %0) {
ret i32 4
}
/* Variables and functions */
scalar_t__ atan2(double, double);
float atan2f(float s, float s2) { return (float)atan2((double)s, (double)s2); }


x86 assembly (clang, -O0):
<atan2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
call   1030 <atan2@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan2f>:
push   %rax
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
call   1030 <atan2@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @atan2f(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 = fpext float %5 to double
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = call i64 @atan2(double %6, double %8)
%10 = sitofp i64 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @atan2f(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fpext float %1 to double
%5 = tail call i64 @atan2(double %3, double %4)
%6 = sitofp i64 %5 to float
ret float %6
}
/* Variables and functions */
float pow(double, double);
float powf(float x, float y) { return pow((double)x, (double)(y)); }


x86 assembly (clang, -O0):
<powf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<powf>:
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define float @powf(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 = fpext float %5 to double
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = call float @pow(double %6, double %8)
ret float %9
}

LLVM IR (-O2):
define float @powf(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fpext float %1 to double
%5 = tail call float @pow(double %3, double %4)
ret float %5
}
/* Variables and functions */
int strlen(char *);
char *StringNthTail(char *s, int n) {
  int len;
  len = strlen(s);
  if (n >= len)
    return (s);
  else
    return (s + len - n);
}


x86 assembly (clang, -O0):
<StringNthTail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jl     1144 <StringNthTail+0x34>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115f <StringNthTail+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringNthTail>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rcx
lea    (%rbx,%rcx,1),%rax
movslq %ebp,%rdx
sub    %rdx,%rax
cmp    %edx,%ecx
cmovle %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @StringNthTail(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp sgt i32 %3, %1
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = sext i32 %1 to i64
%8 = sub nsw i64 0, %7
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = select i1 %4, i8* %9, i8* %0
ret i8* %10
}
/* Variables and functions */
scalar_t__ RAND_MAX;
int rand();
float get_unit_random_number() {
  int random_value = rand();
  float unit_random = random_value / (float)RAND_MAX;
  return unit_random;
}


x86 assembly (clang, -O0):
<get_unit_random_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x4(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
mov    0x2eba(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_unit_random_number>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %eax,%xmm0
mov    0x2ec5(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @get_unit_random_number() {
%1 = alloca i32
%2 = alloca float
%3 = call i32 (...) @rand()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = sitofp i32 %4 to float
%6 = load i64, i64* @RAND_MAX
%7 = sitofp i64 %6 to float
%8 = fdiv float %5, %7
store float %8, float* %2
%9 = load float, float* %2
ret float %9
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @get_unit_random_number() {
%1 = tail call i32 (...) @rand()
%2 = sitofp i32 %1 to float
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ init_td_api();
void cs_api_init() { init_td_api(); }


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

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

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

LLVM IR (-O2):
define void @cs_api_init() {
%1 = tail call i32 (...) @init_td_api()
ret void
}
/* Type definitions */
struct TCP_STREAM {
  int dummy;
};
struct TCPRECORD {
  int dummy;
};
struct NetFrame {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ parse_aim_oscar(struct TCP_STREAM *, struct NetFrame *,
                                   unsigned char const *, unsigned int);
void parse_aim_oscar_from_server(struct TCPRECORD *sess,
                                 struct TCP_STREAM *stream,
                                 struct NetFrame *frame,
                                 const unsigned char *px, unsigned length) {
  parse_aim_oscar(stream, frame, px, length);
}


x86 assembly (clang, -O0):
<parse_aim_oscar_from_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
call   1030 <parse_aim_oscar@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_aim_oscar_from_server>:
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8d,%ecx
jmp    1030 <parse_aim_oscar@plt>

LLVM IR (-O0):
%struct.TCPRECORD = type { i32 }
%struct.TCP_STREAM = type { i32 }
%struct.NetFrame = type { i32 }
define void @parse_aim_oscar_from_server(%struct.TCPRECORD* %0, %struct.TCP_STREAM* %1, %struct.NetFrame* %2, i8* %3, i32 %4) {
%6 = alloca %struct.TCPRECORD*
%7 = alloca %struct.TCP_STREAM*
%8 = alloca %struct.NetFrame*
%9 = alloca i8*
%10 = alloca i32
store %struct.TCPRECORD* %0, %struct.TCPRECORD** %6
store %struct.TCP_STREAM* %1, %struct.TCP_STREAM** %7
store %struct.NetFrame* %2, %struct.NetFrame** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load %struct.TCP_STREAM*, %struct.TCP_STREAM** %7
%12 = load %struct.NetFrame*, %struct.NetFrame** %8
%13 = load i8*, i8** %9
%14 = load i32, i32* %10
%15 = call i32 @parse_aim_oscar(%struct.TCP_STREAM* %11, %struct.NetFrame* %12, i8* %13, i32 %14)
ret void
}

LLVM IR (-O2):
%struct.TCPRECORD = type { i32 }
%struct.TCP_STREAM = type { i32 }
%struct.NetFrame = type { i32 }
define void @parse_aim_oscar_from_server(%struct.TCPRECORD* nocapture readnone %0, %struct.TCP_STREAM* %1, %struct.NetFrame* %2, i8* %3, i32 %4) {
%6 = tail call i32 @parse_aim_oscar(%struct.TCP_STREAM* %1, %struct.NetFrame* %2, i8* %3, i32 %4)
ret void
}
int uniphier_cache_l2_is_enabled(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @uniphier_cache_l2_is_enabled() {
ret i32 0
}
TCpDoc() {}


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

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

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

LLVM IR (-O2):
define i32 @TCpDoc() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ device_send(int, int /*<<< orphan*/, int);
int /*<<< orphan*/ free_vm();
int /*<<< orphan*/ init_vm();
int /*<<< orphan*/ install_device(char *);
int main(int argc, char **argv) {
  init_vm();
  install_device("console");
  device_send(1, 0, 5);
  free_vm();
  return 0;
}


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    $0x0,%al
call   1030 <init_vm@plt>
lea    0xe9c(%rip),%rdi
call   1040 <install_device@plt>
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x5,%edx
call   1060 <device_send@plt>
mov    $0x0,%al
call   1050 <free_vm@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <init_vm@plt>
lea    0xeb1(%rip),%rdi
call   1040 <install_device@plt>
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x5,%edx
call   1060 <device_send@plt>
xor    %eax,%eax
call   1050 <free_vm@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"console\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @init_vm()
%7 = call i32 @install_device(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @device_send(i32 1, i32 0, i32 5)
%9 = call i32 (...) @free_vm()
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"console\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init_vm()
%4 = tail call i32 @install_device(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @device_send(i32 1, i32 0, i32 5)
%6 = tail call i32 (...) @free_vm()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ msg(char *, char const *, char const *, int);
__attribute__((noreturn)) void assertion_failed(const char *expr,
                                                const char *file, int line) {
  msg("Assertion failed: %s at %s:%d", expr, file, line);
  abort();
}


x86 assembly (clang, -O0):
<assertion_failed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xebb(%rip),%rdi
call   1040 <msg@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<assertion_failed>:
push   %rax
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed0(%rip),%rdi
call   1040 <msg@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Assertion failed: %s at %s:%d\00"
define void @assertion_failed(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @msg(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i32 %9)
%11 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [30 x i8] c"Assertion failed: %s at %s:%d\00"
define void @assertion_failed(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @msg(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
%5 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int __builtin_wasm_trunc_u_i32_f64(double);
int trunc_u_i32_f64(double f) { return __builtin_wasm_trunc_u_i32_f64(f); }


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

x86 assembly (clang, -O2):
<trunc_u_i32_f64>:
jmp    1030 <__builtin_wasm_trunc_u_i32_f64@plt>

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

LLVM IR (-O2):
define i32 @trunc_u_i32_f64(double %0) {
%2 = tail call i32 @__builtin_wasm_trunc_u_i32_f64(double %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Clear164();
void clear() { Clear164(); }


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

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

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

LLVM IR (-O2):
define void @clear() {
%1 = tail call i32 (...) @Clear164()
ret void
}
void safe_free(p) char *p;
{ free(p); }


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

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

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

LLVM IR (-O2):
define void @safe_free(i8* nocapture %0) {
tail call void @free(i8* %0)
ret void
}
int test_imm_5Auint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x5A << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_5Auint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 90
%6 = icmp ne i64 %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_5Auint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 90
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void gt() {
  asm volatile("popq %%rax\n\t"
               "popq %%rbx\n\t"
               "cmpq %%rax, %%rbx\n\t"
               "jg _gt\n\t"
               "pushq $0x0\n\t"
               "jmp _gtn\n\t"
               "_gt:pushq $0x1\n\t"
               "_gtn:\n\t" ::
                   :);
}


x86 assembly (clang, -O0):
<gt>:
push   %rbp
mov    %rsp,%rbp
pop    %rax
pop    %rbx
cmp    %rax,%rbx
jg     1116 <_gt>
push   $0x0
jmp    1118 <_gtn>

x86 assembly (clang, -O2):
<gt>:
pop    %rax
pop    %rbx
cmp    %rax,%rbx
jg     110b <_gt>
push   $0x0
jmp    110d <_gtn>

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

LLVM IR (-O2):
define void @gt() {
tail call void asm sideeffect "popq %rax\0A\09popq %rbx\0A\09cmpq %rax, %rbx\0A\09jg _gt\0A\09pushq $$0x0\0A\09jmp _gtn\0A\09_gt:pushq $$0x1\0A\09_gtn:\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
char *ip_service_name(void *);
void print_udp(FILE *f, void *packet, ssize_t psize) {
  fprintf(f, "|%s", ip_service_name(packet));
}


x86 assembly (clang, -O0):
<print_udp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ip_service_name@plt>
mov    -0x20(%rbp),%rdi
mov    %rax,%rdx
lea    0xeae(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_udp>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <ip_service_name@plt>
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"|%s\00"
define void @print_udp(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = call i8* @ip_service_name(i8* %8)
%10 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"|%s\00"
define void @print_udp(i32* nocapture %0, i8* %1, i32 %2) {
%4 = tail call i8* @ip_service_name(i8* %1)
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
void readFromFile() {}


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

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

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

LLVM IR (-O2):
define void @readFromFile() {
ret void
}
void yydestruct(const char *yymsg, int yytype, char *yyvaluep) {
  ((void)(yyvaluep));
  if (!yymsg)
    yymsg = "Deleting";
  ;

#pragma GCC diagnostic push

#pragma GCC diagnostic ignored "-Wuninitialized"

#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"

  ((void)(yytype));

#pragma GCC diagnostic pop
}


x86 assembly (clang, -O0):
<yydestruct>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1125 <yydestruct+0x25>
lea    0xedf(%rip),%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"Deleting\00"
define void @yydestruct(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %11, label %10
10: ; preds = %3
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %4
br label %11
11: ; preds = %10, %3
%12 = load i32, i32* %5
ret void
}

LLVM IR (-O2):
define void @yydestruct(i8* nocapture %0, i32 %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRF8_get(void) { return U_WMRCORENONE_get("U_WMRF8"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRF8\00"
define i32 @U_WMRF8_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRF8\00"
define i32 @U_WMRF8_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
void output(int n) {
  fprintf(stdout, "%d\n", n);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output>:
push   %rbx
mov    %edi,%edx
mov    0x2eb6(%rip),%rbx
mov    (%rbx),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define void @output(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define void @output(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
ret void
}
/* Variables and functions */
char *my_getline(char *, int);
char *getline_wipe(char *prompt) { return (my_getline(prompt, 1)); }


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

x86 assembly (clang, -O2):
<getline_wipe>:
mov    $0x1,%esi
jmp    1030 <my_getline@plt>

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

LLVM IR (-O2):
define i8* @getline_wipe(i8* %0) {
%2 = tail call i8* @my_getline(i8* %0, i32 1)
ret i8* %2
}
/* Variables and functions */
double _log2(double);
double log2(double vx) { return _log2(vx); }


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

x86 assembly (clang, -O2):
<log2>:
jmp    1030 <_log2@plt>

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

LLVM IR (-O2):
define double @log2(double %0) {
%2 = tail call double @_log2(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
int /*<<< orphan*/ _SC_PHYS_PAGES;
long sysconf(int /*<<< orphan*/);
unsigned long long os_phys_mem(void) {
  long pagesize, pages;
  pagesize = sysconf(_SC_PAGESIZE);
  pages = sysconf(_SC_PHYS_PAGES);
  if (pages == -1 || pagesize == -1)
    return 0;
  return (unsigned long long)pages * (unsigned long long)pagesize;
}


x86 assembly (clang, -O0):
<os_phys_mem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0xffffffffffffffff,-0x18(%rbp)
je     1152 <os_phys_mem+0x42>
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jne    115f <os_phys_mem+0x4f>
movq   $0x0,-0x8(%rbp)
jmp    116c <os_phys_mem+0x5c>
mov    -0x18(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_phys_mem>:
push   %rbx
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
mov    %rax,%rbx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
mov    %rax,%rcx
imul   %rbx,%rcx
xor    %edx,%edx
cmp    $0xffffffffffffffff,%rbx
cmove  %rdx,%rcx
cmp    $0xffffffffffffffff,%rax
cmove  %rdx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@_SC_PAGESIZE = global i32 0
@_SC_PHYS_PAGES = global i32 0
define i64 @os_phys_mem() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = tail call i64 @sysconf(i32 %1)
%3 = load i32, i32* @_SC_PHYS_PAGES
%4 = tail call i64 @sysconf(i32 %3)
%5 = icmp eq i64 %4, -1
%6 = icmp eq i64 %2, -1
%7 = select i1 %5, i1 true, i1 %6
%8 = mul i64 %4, %2
%9 = select i1 %7, i64 0, i64 %8
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ testEcaFd();
int /*<<< orphan*/ testEcaGsl();
int /*<<< orphan*/ testEcaSu();
int /*<<< orphan*/ testFdns();
int /*<<< orphan*/ testTimcount();
int /*<<< orphan*/ testWct();
int main(void) {
  testEcaFd();
  testEcaSu();
  testEcaGsl();
  testFdns();
  testTimcount();
  testWct();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <testEcaFd@plt>
mov    $0x0,%al
call   1070 <testEcaSu@plt>
mov    $0x0,%al
call   1040 <testEcaGsl@plt>
mov    $0x0,%al
call   1060 <testFdns@plt>
mov    $0x0,%al
call   1080 <testTimcount@plt>
mov    $0x0,%al
call   1030 <testWct@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <testEcaFd@plt>
xor    %eax,%eax
call   1070 <testEcaSu@plt>
xor    %eax,%eax
call   1040 <testEcaGsl@plt>
xor    %eax,%eax
call   1060 <testFdns@plt>
xor    %eax,%eax
call   1080 <testTimcount@plt>
xor    %eax,%eax
call   1030 <testWct@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @testEcaFd()
%3 = call i32 (...) @testEcaSu()
%4 = call i32 (...) @testEcaGsl()
%5 = call i32 (...) @testFdns()
%6 = call i32 (...) @testTimcount()
%7 = call i32 (...) @testWct()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testEcaFd()
%2 = tail call i32 (...) @testEcaSu()
%3 = tail call i32 (...) @testEcaGsl()
%4 = tail call i32 (...) @testFdns()
%5 = tail call i32 (...) @testTimcount()
%6 = tail call i32 (...) @testWct()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void smallAdjustmentGT(unsigned a) {
  if (a + 2 > 1)
    clang_analyzer_eval(a < (~0U) - 1);
  else
    clang_analyzer_eval(a == (~0U) - 1 || a == (~0U));
}


x86 assembly (clang, -O0):
<smallAdjustmentGT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    $0x1,%eax
jbe    1140 <smallAdjustmentGT+0x30>
cmpl   $0xfffffffe,-0x4(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
jmp    1166 <smallAdjustmentGT+0x56>
mov    $0x1,%al
cmpl   $0xfffffffe,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1159 <smallAdjustmentGT+0x49>
cmpl   $0xffffffff,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smallAdjustmentGT>:
mov    $0x1,%edi
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @smallAdjustmentGT(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 2
%5 = icmp ugt i32 %4, 1
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ult i32 %7, -2
%9 = zext i1 %8 to i32
%10 = call i32 @clang_analyzer_eval(i32 %9)
br label %21
11: ; preds = %1
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, -2
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, -1
br label %17
17: ; preds = %14, %11
%18 = phi i1 [ true, %11 ], [ %16, %14 ]
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
br label %21
21: ; preds = %17, %6
ret void
}

LLVM IR (-O2):
define void @smallAdjustmentGT(i32 %0) {
%2 = tail call i32 @clang_analyzer_eval(i32 1)
ret void
}
void md_tstpsignal() {}


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

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

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

LLVM IR (-O2):
define void @md_tstpsignal() {
ret void
}
void fn145C() { return; }


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

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

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

LLVM IR (-O2):
define void @fn145C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ simuHald(int, double, int *);
void simuHald_R_wrapper(int *gen, double *mu, int *mut) {
  simuHald(*gen, *mu, mut);
}


x86 assembly (clang, -O0):
<simuHald_R_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rsi
call   1030 <simuHald@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simuHald_R_wrapper>:
mov    (%rdi),%edi
movsd  (%rsi),%xmm0
mov    %rdx,%rsi
jmp    1030 <simuHald@plt>

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

LLVM IR (-O2):
define void @simuHald_R_wrapper(i32* nocapture %0, double* nocapture %1, i32* %2) {
%4 = load i32, i32* %0
%5 = load double, double* %1
%6 = tail call i32 @simuHald(i32 %4, double %5, i32* %2)
ret void
}
void gtk_tree_view_get_search_column() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_get_search_column() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i2c_init();
void at24cxx_init(void) { i2c_init(); }


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

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

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

LLVM IR (-O2):
define void @at24cxx_init() {
%1 = tail call i32 (...) @i2c_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_SECTION_1();
int main() {
  test_SECTION_1();
  printf("All Ok!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"All Ok!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_SECTION_1()
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [8 x i8] c"All Ok!\00"
define i32 @main() {
%1 = tail call i32 (...) @test_SECTION_1()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned long pa2la(unsigned long pa) {
  unsigned long la;
  la = (pa / 32) * 24 + ((pa % 32) / 5) * 4;
  return la;
}


x86 assembly (clang, -O0):
<pa2la>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x5,%rax
imul   $0x18,%rax,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1f,%rax
mov    $0x5,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pa2la>:
mov    %rdi,%rax
shr    $0x5,%rax
lea    (%rax,%rax,2),%rax
and    $0x1f,%edi
imul   $0xcd,%edi,%ecx
shr    $0x8,%ecx
and    $0xfffffffc,%ecx
lea    (%rcx,%rax,8),%rax
ret

LLVM IR (-O0):
define i64 @pa2la(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = udiv i64 %4, 32
%6 = mul i64 %5, 24
%7 = load i64, i64* %2
%8 = urem i64 %7, 32
%9 = udiv i64 %8, 5
%10 = mul i64 %9, 4
%11 = add i64 %6, %10
store i64 %11, i64* %3
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
define i64 @pa2la(i64 %0) {
%2 = lshr i64 %0, 5
%3 = mul nuw i64 %2, 24
%4 = trunc i64 %0 to i8
%5 = and i8 %4, 31
%6 = udiv i8 %5, 5
%7 = shl nuw nsw i8 %6, 2
%8 = zext i8 %7 to i64
%9 = add nuw i64 %3, %8
ret i64 %9
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int8_t x = 76;
  printf("%d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4c,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 76)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ failure(char *, int);
int /*<<< orphan*/ respond(int /*<<< orphan*/, char *, int);
scalar_t__ unlink(char *);
void deletef(char *uri, int socketfd) {
  if (unlink(uri))
    failure("500 Delete failed", socketfd);
  else
    respond(0, "text", socketfd);
}


x86 assembly (clang, -O0):
<deletef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <unlink@plt>
cmp    $0x0,%rax
je     1166 <deletef+0x36>
mov    -0xc(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1050 <failure@plt>
jmp    1177 <deletef+0x47>
mov    -0xc(%rbp),%edx
xor    %edi,%edi
lea    0xea0(%rip),%rsi
call   1040 <respond@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deletef>:
push   %rbx
mov    %esi,%ebx
call   1030 <unlink@plt>
test   %rax,%rax
je     114c <deletef+0x1c>
lea    0xebc(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1050 <failure@plt>
lea    0xebf(%rip),%rsi
xor    %edi,%edi
mov    %ebx,%edx
pop    %rbx
jmp    1040 <respond@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"500 Delete failed\00"
@.str.1 = [5 x i8] c"text\00"
define void @deletef(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 = call i64 @unlink(i8* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %4
%10 = call i32 @failure(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %14
11: ; preds = %2
%12 = load i32, i32* %4
%13 = call i32 @respond(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %11, %8
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"500 Delete failed\00"
@.str.1 = [5 x i8] c"text\00"
define void @deletef(i8* nocapture %0, i32 %1) {
%3 = tail call i64 @unlink(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @failure(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @respond(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %1)
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *strdup(char const *);
extern char __attribute__((warn_unused_result)) * safe_strdup(const char *str) {
  char *ret;
  if (!str)
    return NULL;
  ret = strdup(str);
  if (!ret) {
    fprintf(stderr, "Memory allocation failure\n");
    exit(1);
  }
  return ret;
}


x86 assembly (clang, -O0):
<safe_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <safe_strdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1193 <safe_strdup+0x63>
mov    -0x10(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    118b <safe_strdup+0x5b>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
lea    0xe84(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_strdup>:
push   %rax
test   %rdi,%rdi
je     1142 <safe_strdup+0x12>
call   1050 <strdup@plt>
test   %rax,%rax
je     1146 <safe_strdup+0x16>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Memory allocation failure\0A\00"
define i8* @safe_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* null, i8** %2
br label %19
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @strdup(i8* %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %17, label %13
13: ; preds = %8
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %8
%18 = load i8*, i8** %4
store i8* %18, i8** %2
br label %19
19: ; preds = %17, %7
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Memory allocation failure\0A\00"
define noalias i8* @safe_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i8* @strdup(i8* %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %3, %1
%11 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %11
}
int isAscii(char c) {
  int v = (int)c;
  if (v >= 32 && v <= 126)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isAscii>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jl     1131 <isAscii+0x31>
cmpl   $0x7e,-0xc(%rbp)
jg     1131 <isAscii+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1138 <isAscii+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAscii>:
add    $0xe0,%dil
xor    %eax,%eax
cmp    $0x5f,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isAscii(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 32
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* %4
%11 = icmp sle i32 %10, 126
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 1, i32* %2
br label %14
13: ; preds = %9, %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @isAscii(i8 signext %0) {
%2 = add i8 %0, -32
%3 = icmp ult i8 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
void *cl_read_packet();
int /*<<< orphan*/ free(void *);
void cl_read_ack() {
  void *data;
  data = cl_read_packet();
  if (data) {
    free(data);
  }
}


x86 assembly (clang, -O0):
<cl_read_ack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <cl_read_packet@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1147 <cl_read_ack+0x27>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cl_read_ack>:
push   %rax
xor    %eax,%eax
call   1040 <cl_read_packet@plt>
test   %rax,%rax
je     1136 <cl_read_ack+0x16>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @cl_read_ack() {
%1 = tail call i8* (...) @cl_read_packet()
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @free(i8* %1)
br label %5
5: ; preds = %3, %0
ret void
}