xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int);
void xerr(const char *str) {
  write(2, str, strlen(str));
  write(2, "\n", 1);
  exit(1);
}


x86 assembly (clang, -O0):
<xerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    $0x2,%edi
lea    0xe97(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<xerr>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xeb1(%rip),%rsi
mov    $0x2,%edi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @xerr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @write(i32 2, i8* %3, i32 %5)
%7 = call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @xerr(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @write(i32 2, i8* %0, i32 %2)
%4 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _test_1(int *);
void soru_1() {
  int dizi[100] = {1, 2, 3, 4, 5};
  _test_1(dizi);
}


x86 assembly (clang, -O0):
<soru_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
lea    -0x190(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1040 <memset@plt>
movl   $0x1,-0x190(%rbp)
movl   $0x2,-0x18c(%rbp)
movl   $0x3,-0x188(%rbp)
movl   $0x4,-0x184(%rbp)
movl   $0x5,-0x180(%rbp)
lea    -0x190(%rbp),%rdi
call   1030 <_test_1@plt>
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<soru_1>:
sub    $0x198,%rsp
lea    0x10(%rsp),%rdi
mov    $0x180,%edx
xor    %esi,%esi
call   1040 <memset@plt>
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x5,0x10(%rsp)
mov    %rsp,%rdi
call   1030 <_test_1@plt>
add    $0x198,%rsp
ret

LLVM IR (-O0):
define void @soru_1() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to i8*
%3 = bitcast i8* %2 to <{ i32, i32, i32, i32, i32, [95 x i32] }>*
%4 = getelementptr inbounds <{ i32, i32, i32, i32, i32, [95 x i32] }>, <{ i32, i32, i32, i32, i32, [95 x i32] }>* %3, i32 0, i32 0
store i32 1, i32* %4
%5 = getelementptr inbounds <{ i32, i32, i32, i32, i32, [95 x i32] }>, <{ i32, i32, i32, i32, i32, [95 x i32] }>* %3, i32 0, i32 1
store i32 2, i32* %5
%6 = getelementptr inbounds <{ i32, i32, i32, i32, i32, [95 x i32] }>, <{ i32, i32, i32, i32, i32, [95 x i32] }>* %3, i32 0, i32 2
store i32 3, i32* %6
%7 = getelementptr inbounds <{ i32, i32, i32, i32, i32, [95 x i32] }>, <{ i32, i32, i32, i32, i32, [95 x i32] }>* %3, i32 0, i32 3
store i32 4, i32* %7
%8 = getelementptr inbounds <{ i32, i32, i32, i32, i32, [95 x i32] }>, <{ i32, i32, i32, i32, i32, [95 x i32] }>* %3, i32 0, i32 4
store i32 5, i32* %8
%9 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%10 = call i32 @_test_1(i32* %9)
ret void
}

LLVM IR (-O2):
define void @soru_1() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to i8*
%3 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 4
%4 = bitcast i32* %3 to i8*
%5 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%6 = bitcast [100 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %6
%7 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 4
store i32 5, i32* %7
%8 = call i32 @_test_1(i32* %5)
ret void
}
/* Type definitions */
union bpf_attr {
  int map_fd;
  void *value;
  void *key;
};
typedef int /*<<< orphan*/ attr;

/* Variables and functions */
int /*<<< orphan*/ BPF_MAP_LOOKUP_ELEM;
void *ptr_to_u64(void *);
int syscall(int, int /*<<< orphan*/, union bpf_attr *, int);
int bpf_lookup_elem(int fd, void *key, void *value) {
  union bpf_attr attr;
  attr.map_fd = fd;
  attr.key = ptr_to_u64(key);
  attr.value = ptr_to_u64(value);
  return syscall(321, BPF_MAP_LOOKUP_ELEM, &attr, sizeof(attr));
}


x86 assembly (clang, -O0):
<bpf_lookup_elem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ptr_to_u64@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <ptr_to_u64@plt>
mov    %rax,-0x20(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%esi
mov    $0x141,%edi
lea    -0x20(%rbp),%rdx
mov    $0x8,%ecx
call   1040 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_lookup_elem>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
mov    %rsi,%rdi
call   1030 <ptr_to_u64@plt>
mov    %rbx,%rdi
call   1030 <ptr_to_u64@plt>
mov    %rax,0x8(%rsp)
mov    0x2ea4(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
mov    $0x141,%edi
mov    $0x8,%ecx
call   1040 <syscall@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%union.bpf_attr = type { i8* }
@BPF_MAP_LOOKUP_ELEM = global i32 0
define i32 @bpf_lookup_elem(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca %union.bpf_attr
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i32, i32* %4
%9 = bitcast %union.bpf_attr* %7 to i32*
store i32 %8, i32* %9
%10 = load i8*, i8** %5
%11 = call i8* @ptr_to_u64(i8* %10)
%12 = bitcast %union.bpf_attr* %7 to i8**
store i8* %11, i8** %12
%13 = load i8*, i8** %6
%14 = call i8* @ptr_to_u64(i8* %13)
%15 = bitcast %union.bpf_attr* %7 to i8**
store i8* %14, i8** %15
%16 = load i32, i32* @BPF_MAP_LOOKUP_ELEM
%17 = call i32 @syscall(i32 321, i32 %16, %union.bpf_attr* %7, i32 8)
ret i32 %17
}

LLVM IR (-O2):
%union.bpf_attr = type { i8* }
@BPF_MAP_LOOKUP_ELEM = global i32 0
define i32 @bpf_lookup_elem(i32 %0, i8* %1, i8* %2) {
%4 = alloca %union.bpf_attr
%5 = bitcast %union.bpf_attr* %4 to i8*
%6 = tail call i8* @ptr_to_u64(i8* %1)
%7 = getelementptr inbounds %union.bpf_attr, %union.bpf_attr* %4, i64 0, i32 0
%8 = tail call i8* @ptr_to_u64(i8* %2)
store i8* %8, i8** %7
%9 = load i32, i32* @BPF_MAP_LOOKUP_ELEM
%10 = call i32 @syscall(i32 321, i32 %9, %union.bpf_attr* %4, i32 8)
ret i32 %10
}
int isspace(int c) { return (c == ' ' || (c >= '\t' || c <= '\r')); }


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1135 <isspace+0x35>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jge    112f <isspace+0x2f>
cmpl   $0xd,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %13, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 9
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp sle i32 %9, 13
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ true, %5 ], [ %10, %8 ]
br label %13
13: ; preds = %11, %1
%14 = phi i1 [ true, %1 ], [ %12, %11 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("hey , evan \n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"hey , evan \0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"hey , evan \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned char myseta(void) { return 0xab; }


x86 assembly (clang, -O0):
<myseta>:
push   %rbp
mov    %rsp,%rbp
mov    $0xab,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myseta>:
mov    $0xab,%al
ret

LLVM IR (-O0):
define zeroext i8 @myseta() {
ret i8 -85
}

LLVM IR (-O2):
define zeroext i8 @myseta() {
ret i8 -85
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int exponent;
};
union ieee754_float {
  float f;
  TYPE_1__ ieee;
};

/* Variables and functions */
int isbadf(float x) {
  union ieee754_float u;
  u.f = x;
  return u.ieee.exponent == 0xff;
}


x86 assembly (clang, -O0):
<isbadf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isbadf>:
movd   %xmm0,%ecx
xor    %eax,%eax
cmp    $0xff,%ecx
sete   %al
ret

LLVM IR (-O0):
%union.ieee754_float = type { float }
%struct.TYPE_2__ = type { i32 }
define i32 @isbadf(float %0) {
%2 = alloca float
%3 = alloca %union.ieee754_float
store float %0, float* %2
%4 = load float, float* %2
%5 = bitcast %union.ieee754_float* %3 to float*
store float %4, float* %5
%6 = bitcast %union.ieee754_float* %3 to %struct.TYPE_2__*
%7 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 255
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isbadf(float %0) {
%2 = bitcast float %0 to i32
%3 = icmp eq i32 %2, 255
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
void *nop(void *nil) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @nop(i8* nocapture readnone %0) {
ret i8* null
}
void Lut_Lut2Lab8(double *out, double *in) {
  out[0] = in[0] * 100.0;
  out[1] = (in[1] * 255.0) - 128.0;
  out[2] = (in[2] * 255.0) - 128.0;
}


x86 assembly (clang, -O0):
<Lut_Lut2Lab8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xef8(%rip),%xmm0
mulsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  0xecb(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec7(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  0xea1(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9d(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lut_Lut2Lab8>:
movsd  (%rsi),%xmm0
mulsd  0xef4(%rip),%xmm0
movsd  %xmm0,(%rdi)
movsd  0xef0(%rip),%xmm0
movsd  0x8(%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xee7(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rdi)
mulsd  0x10(%rsi),%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @Lut_Lut2Lab8(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = fmul double %7, 1.000000e+02
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
store double %8, double* %10
%11 = load double*, double** %4
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = call double @llvm.fmuladd.f64(double %13, double 2.550000e+02, double -1.280000e+02)
%15 = load double*, double** %3
%16 = getelementptr inbounds double, double* %15, i64 1
store double %14, double* %16
%17 = load double*, double** %4
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = call double @llvm.fmuladd.f64(double %19, double 2.550000e+02, double -1.280000e+02)
%21 = load double*, double** %3
%22 = getelementptr inbounds double, double* %21, i64 2
store double %20, double* %22
ret void
}

LLVM IR (-O2):
define void @Lut_Lut2Lab8(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fmul double %3, 1.000000e+02
store double %4, double* %0
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = tail call double @llvm.fmuladd.f64(double %6, double 2.550000e+02, double -1.280000e+02)
%8 = getelementptr inbounds double, double* %0, i64 1
store double %7, double* %8
%9 = getelementptr inbounds double, double* %1, i64 2
%10 = load double, double* %9
%11 = tail call double @llvm.fmuladd.f64(double %10, double 2.550000e+02, double -1.280000e+02)
%12 = getelementptr inbounds double, double* %0, i64 2
store double %11, double* %12
ret void
}
int test_imm_E9int8_mem(signed char *val) {
  return ((*val) & (-0xE9 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E9int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff17,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E9int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -233
%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_E9int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -233
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
int err_syntax11_lex(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @err_syntax11_lex() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @err_syntax11_lex() {
ret i32 -1
}
/* Type definitions */
struct bgp_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bgp_node_to_rnode(struct bgp_node *);
int /*<<< orphan*/ route_unlock_node(int /*<<< orphan*/);
void bgp_unlock_node(struct bgp_node *node) {
  route_unlock_node(bgp_node_to_rnode(node));
}


x86 assembly (clang, -O0):
<bgp_unlock_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bgp_node_to_rnode@plt>
mov    %eax,%edi
call   1040 <route_unlock_node@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.bgp_node = type { i32 }
define void @bgp_unlock_node(%struct.bgp_node* %0) {
%2 = alloca %struct.bgp_node*
store %struct.bgp_node* %0, %struct.bgp_node** %2
%3 = load %struct.bgp_node*, %struct.bgp_node** %2
%4 = call i32 @bgp_node_to_rnode(%struct.bgp_node* %3)
%5 = call i32 @route_unlock_node(i32 %4)
ret void
}

LLVM IR (-O2):
%struct.bgp_node = type { i32 }
define void @bgp_unlock_node(%struct.bgp_node* %0) {
%2 = tail call i32 @bgp_node_to_rnode(%struct.bgp_node* %0)
%3 = tail call i32 @route_unlock_node(i32 %2)
ret void
}
/* Variables and functions */
int read(int, void *, unsigned int);
int s_pipe_posix_read(int fd, void *buf, unsigned int count) {
  return read(fd, buf, count);
}


x86 assembly (clang, -O0):
<s_pipe_posix_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_pipe_posix_read>:
jmp    1030 <read@plt>

LLVM IR (-O0):
define i32 @s_pipe_posix_read(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 = load i32, i32* %6
%10 = call i32 @read(i32 %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @s_pipe_posix_read(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
int clamp(int x, int min, int max) {
  if (x < min) {
    return min;
  } else if (x > max) {
    return max;
  } else
    return x;
}


x86 assembly (clang, -O0):
<clamp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <clamp+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <clamp+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113b <clamp+0x3b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <clamp+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @clamp(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fool(double, double, double *);
double small() {
  double one, two, z, tsmall;
  one = 1.e0;
  two = 2.e0;
  tsmall = one;
  do {
    tsmall = tsmall / two;
    fool(tsmall, one, &z);
  } while (z > 1.e0);
  return tsmall * two * two;
}


x86 assembly (clang, -O0):
<small>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
lea    -0x18(%rbp),%rdi
call   1030 <fool@plt>
movsd  -0x18(%rbp),%xmm0
movsd  0xe9d(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     113c <small+0x2c>
movsd  -0x20(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<small>:
push   %rbx
sub    $0x10,%rsp
movsd  0xee3(%rip),%xmm0
lea    0x8(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mulsd  0xed0(%rip),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rsp),%xmm0
movsd  0xeb6(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <fool@plt>
movsd  0x8(%rsp),%xmm0
ucomisd 0xea0(%rip),%xmm0
movsd  (%rsp),%xmm0
ja     1130 <small+0x20>
addsd  %xmm0,%xmm0
addsd  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @small() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double 1.000000e+00, double* %1
store double 2.000000e+00, double* %2
%5 = load double, double* %1
store double %5, double* %4
br label %6
6: ; preds = %13, %0
%7 = load double, double* %4
%8 = load double, double* %2
%9 = fdiv double %7, %8
store double %9, double* %4
%10 = load double, double* %4
%11 = load double, double* %1
%12 = call i32 @fool(double %10, double %11, double* %3)
br label %13
13: ; preds = %6
%14 = load double, double* %3
%15 = fcmp ogt double %14, 1.000000e+00
br i1 %15, label %6, label %16
16: ; preds = %13
%17 = load double, double* %4
%18 = load double, double* %2
%19 = fmul double %17, %18
%20 = load double, double* %2
%21 = fmul double %19, %20
ret double %21
}

LLVM IR (-O2):
define double @small() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = phi double [ 1.000000e+00, %0 ], [ %5, %3 ]
%5 = fmul double %4, 5.000000e-01
%6 = call i32 @fool(double %5, double 1.000000e+00, double* %1)
%7 = load double, double* %1
%8 = fcmp ogt double %7, 1.000000e+00
br i1 %8, label %3, label %9
9: ; preds = %3
%10 = fmul double %5, 2.000000e+00
%11 = fmul double %10, 2.000000e+00
ret double %11
}
unsigned char *putx(c, val)
unsigned char *c;
unsigned long val;
{
  unsigned char tmp = val & 0xF;
  if (val >>= 4)
    c = putx(c, val);
  if (tmp > 9)
    tmp += 7;
  *c++ = tmp + '0';
  return c;
}


x86 assembly (clang, -O0):
<putx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xf,%rax
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x4,%rax
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1152 <putx+0x42>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <putx@plt>
mov    %rax,-0x8(%rbp)
movzbl -0x11(%rbp),%eax
cmp    $0x9,%eax
jle    1169 <putx+0x59>
movzbl -0x11(%rbp),%eax
add    $0x7,%eax
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
add    $0x30,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putx>:
push   %rbx
mov    %rdi,%rax
mov    %esi,%ebx
and    $0xf,%bl
cmp    $0x10,%rsi
jb     112b <putx+0x1b>
shr    $0x4,%rsi
mov    %rax,%rdi
call   1030 <putx@plt>
lea    0x7(%rbx),%ecx
cmp    $0xa,%bl
movzbl %bl,%edx
movzbl %cl,%ecx
cmovb  %edx,%ecx
add    $0x30,%cl
mov    %cl,(%rax)
add    $0x1,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @putx(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = and i64 %6, 15
%8 = trunc i64 %7 to i8
store i8 %8, i8* %5
%9 = load i64, i64* %4
%10 = lshr i64 %9, 4
store i64 %10, i64* %4
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = load i64, i64* %4
%15 = call i8* @putx(i8* %13, i64 %14)
store i8* %15, i8** %3
br label %16
16: ; preds = %12, %2
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = icmp sgt i32 %18, 9
br i1 %19, label %20, label %25
20: ; preds = %16
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = add nsw i32 %22, 7
%24 = trunc i32 %23 to i8
store i8 %24, i8* %5
br label %25
25: ; preds = %20, %16
%26 = load i8, i8* %5
%27 = zext i8 %26 to i32
%28 = add nsw i32 %27, 48
%29 = trunc i32 %28 to i8
%30 = load i8*, i8** %3
%31 = getelementptr inbounds i8, i8* %30, i32 1
store i8* %31, i8** %3
store i8 %29, i8* %30
%32 = load i8*, i8** %3
ret i8* %32
}

LLVM IR (-O2):
define i8* @putx(i8* %0, i64 %1) {
%3 = trunc i64 %1 to i8
%4 = and i8 %3, 15
%5 = icmp ult i64 %1, 16
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = lshr i64 %1, 4
%8 = tail call i8* @putx(i8* %0, i64 %7)
br label %9
9: ; preds = %6, %2
%10 = phi i8* [ %8, %6 ], [ %0, %2 ]
%11 = icmp ugt i8 %4, 9
%12 = add nuw nsw i8 %4, 7
%13 = select i1 %11, i8 %12, i8 %4
%14 = add nuw nsw i8 %13, 48
%15 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %14, i8* %10
ret i8* %15
}
/* Variables and functions */
int /*<<< orphan*/ Translation(char);
void A(void) {
  Translation('s');
  Translation('a');
  Translation('e');
  return;
}


x86 assembly (clang, -O0):
<A>:
push   %rbp
mov    %rsp,%rbp
mov    $0x73,%edi
call   1030 <Translation@plt>
mov    $0x61,%edi
call   1030 <Translation@plt>
mov    $0x65,%edi
call   1030 <Translation@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<A>:
push   %rax
mov    $0x73,%edi
call   1030 <Translation@plt>
mov    $0x61,%edi
call   1030 <Translation@plt>
mov    $0x65,%edi
pop    %rax
jmp    1030 <Translation@plt>

LLVM IR (-O0):
define void @A() {
%1 = call i32 @Translation(i8 signext 115)
%2 = call i32 @Translation(i8 signext 97)
%3 = call i32 @Translation(i8 signext 101)
ret void
}

LLVM IR (-O2):
define void @A() {
%1 = tail call i32 @Translation(i8 signext 115)
%2 = tail call i32 @Translation(i8 signext 97)
%3 = tail call i32 @Translation(i8 signext 101)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ byte2;
};
typedef TYPE_1__ XChar2b;

/* Variables and functions */
unsigned char get_XChar2b_byte2(void *_p) {
  return (unsigned char)((XChar2b *)_p)->byte2;
}


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

x86 assembly (clang, -O2):
<get_XChar2b_byte2>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define zeroext i8 @get_XChar2b_byte2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i8
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @get_XChar2b_byte2(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i8
ret i8 %4
}
int compare0(double **x, double **y) {
  if (x[0][0] < y[0][0])
    return -1;
  else if (x[0][0] > y[0][0])
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<compare0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1138 <compare0+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <compare0+0x67>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
ucomisd (%rax),%xmm0
jbe    1160 <compare0+0x60>
movl   $0x1,-0x4(%rbp)
jmp    1167 <compare0+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare0>:
mov    (%rdi),%rax
movsd  (%rax),%xmm0
mov    (%rsi),%rax
movsd  (%rax),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare0(double** nocapture %0, double** nocapture %1) {
%3 = load double*, double** %0
%4 = load double, double* %3
%5 = load double*, double** %1
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("locate only works on Microsoft Windows\n");
  return EXIT_SUCCESS;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [40 x i8] c"locate only works on Microsoft Windows\0A\00"
@EXIT_SUCCESS = global i32 0
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 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [39 x i8] c"locate only works on Microsoft Windows\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
double computarOperacao(char, double **);
int /*<<< orphan*/ preencherMatriz(double **);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char operacao;
  double matriz[12][12];
  scanf("%c", &operacao);
  preencherMatriz(matriz);
  printf("%.1f\n", computarOperacao(operacao, matriz));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x490,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1050 <scanf@plt>
lea    -0x490(%rbp),%rdi
call   1030 <preencherMatriz@plt>
mov    -0x5(%rbp),%al
lea    -0x490(%rbp),%rsi
movsbl %al,%edi
call   1060 <computarOperacao@plt>
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x490,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x490,%rsp
lea    0xeb1(%rip),%rdi
lea    0xf(%rsp),%rsi
call   1050 <scanf@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <preencherMatriz@plt>
movsbl 0xf(%rsp),%edi
mov    %rbx,%rsi
call   1060 <computarOperacao@plt>
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x490,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [6 x i8] c"%.1f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca [12 x [12 x double]]
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %3, i64 0, i64 0
%6 = bitcast [12 x double]* %5 to double**
%7 = call i32 @preencherMatriz(double** %6)
%8 = load i8, i8* %2
%9 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %3, i64 0, i64 0
%10 = bitcast [12 x double]* %9 to double**
%11 = call double @computarOperacao(i8 signext %8, double** %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [6 x i8] c"%.1f\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca [12 x [12 x double]]
%3 = bitcast [12 x [12 x double]]* %2 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = bitcast [12 x [12 x double]]* %2 to double**
%6 = call i32 @preencherMatriz(double** %5)
%7 = load i8, i8* %1
%8 = call double @computarOperacao(i8 signext %7, double** %5)
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %8)
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int /*<<< orphan*/ loop(int /*<<< orphan*/, int /*<<< orphan*/,
                        int /*<<< orphan*/);
int /*<<< orphan*/ random();
int main() {
  int x = __VERIFIER_nondet_int();
  int y = __VERIFIER_nondet_int();
  int z = __VERIFIER_nondet_int();
  loop(random(), random(), random());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <random@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <random@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <random@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    %eax,%edx
call   1030 <loop@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1050 <random@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <random@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <random@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <loop@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %2
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %3
%7 = call i32 (...) @random()
%8 = call i32 (...) @random()
%9 = call i32 (...) @random()
%10 = call i32 @loop(i32 %7, i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
%4 = tail call i32 (...) @random()
%5 = tail call i32 (...) @random()
%6 = tail call i32 (...) @random()
%7 = tail call i32 @loop(i32 %4, i32 %5, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _finite(double);
int isinf(double x) { return !_finite(x); }


x86 assembly (clang, -O0):
<isinf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <_finite@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isinf>:
push   %rax
call   1030 <_finite@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isinf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @_finite(double %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @isinf(double %0) {
%2 = tail call i32 @_finite(double %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int system(char *);
__attribute__((no)) int my_system(char *command) {
  int ret_slot;
  ret_slot = system(command);
  return (ret_slot);
}


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

x86 assembly (clang, -O2):
<my_system>:
jmp    1030 <system@plt>

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

LLVM IR (-O2):
define i32 @my_system(i8* nocapture %0) {
%2 = tail call i32 @system(i8* %0)
ret i32 %2
}
/* Variables and functions */
int options_get_maxname();
int strlen(char const *);
int check_filename_length(const char *filename) {
  int fnlen;
  int maxname = options_get_maxname();
  if (maxname == 0)
    return 1;
  fnlen = strlen(filename);
  if (fnlen > maxname) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<check_filename_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <options_get_maxname@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    114c <check_filename_length+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1177 <check_filename_length+0x57>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1170 <check_filename_length+0x50>
movl   $0x0,-0x4(%rbp)
jmp    1177 <check_filename_length+0x57>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_filename_length>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <options_get_maxname@plt>
test   %eax,%eax
je     1146 <check_filename_length+0x26>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ebp,%ecx
setle  %al
jmp    114b <check_filename_length+0x2b>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @check_filename_length(i8* %0) {
%2 = tail call i32 (...) @options_get_maxname()
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = icmp sle i32 %5, %2
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
void bitmap_clear(unsigned char *map, int n, int size) {
  if (n >= size)
    return;
  int s = 0x80;
  map[n / 8] &= ~(s >> (n % 8));
}


x86 assembly (clang, -O0):
<bitmap_clear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     111f <bitmap_clear+0x1f>
jmp    1160 <bitmap_clear+0x60>
movl   $0x80,-0x14(%rbp)
mov    -0x14(%rbp),%esi
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
sar    %cl,%esi
xor    $0xffffffff,%esi
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
and    %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_clear>:
cmp    %edx,%esi
jge    1121 <bitmap_clear+0x21>
mov    %esi,%ecx
and    $0x7,%cl
mov    $0xffffff7f,%eax
sar    %cl,%eax
lea    0x7(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
and    %al,(%rdi,%rcx,1)
ret

LLVM IR (-O0):
define void @bitmap_clear(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %3
br label %27
12: ; preds = %3
store i32 128, i32* %7
%13 = load i32, i32* %7
%14 = load i32, i32* %5
%15 = srem i32 %14, 8
%16 = ashr i32 %13, %15
%17 = xor i32 %16, -1
%18 = load i8*, i8** %4
%19 = load i32, i32* %5
%20 = sdiv i32 %19, 8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %18, i64 %21
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = and i32 %24, %17
%26 = trunc i32 %25 to i8
store i8 %26, i8* %22
br label %27
27: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @bitmap_clear(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = and i32 %1, 7
%7 = ashr i32 -129, %6
%8 = sdiv i32 %1, 8
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = trunc i32 %7 to i8
%13 = and i8 %11, %12
store i8 %13, i8* %10
br label %14
14: ; preds = %3, %5
ret void
}
char *Field_FindFirstSeparator(char *s) {
  int i;
  for (i = 0; i < strlen(s); i++) {
    if (s[i] == ';')
      return &s[i];
  }
  return ((void *)0);
}


x86 assembly (clang, -O0):
<Field_FindFirstSeparator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
jae    1180 <Field_FindFirstSeparator+0x70>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3b,%eax
jne    116d <Field_FindFirstSeparator+0x5d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1188 <Field_FindFirstSeparator+0x78>
jmp    1172 <Field_FindFirstSeparator+0x62>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <Field_FindFirstSeparator+0x13>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Field_FindFirstSeparator>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %rax,%rax
je     1141 <Field_FindFirstSeparator+0x31>
mov    %rax,%rcx
xor    %eax,%eax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x3b,(%rbx,%rdx,1)
je     1145 <Field_FindFirstSeparator+0x35>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1130 <Field_FindFirstSeparator+0x20>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret
mov    %edx,%eax
add    %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @Field_FindFirstSeparator(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %25, %1
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = load i8*, i8** %3
%9 = call i64 @strlen(i8* %8)
%10 = icmp ult i64 %7, %9
br i1 %10, label %11, label %28
11: ; preds = %5
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 59
br i1 %18, label %19, label %24
19: ; preds = %11
%20 = load i8*, i8** %3
%21 = load i32, i32* %4
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
store i8* %23, i8** %2
br label %29
24: ; preds = %11
br label %25
25: ; preds = %24
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %5
28: ; preds = %5
store i8* null, i8** %2
br label %29
29: ; preds = %28, %19
%30 = load i8*, i8** %2
ret i8* %30
}

LLVM IR (-O2):
define i8* @Field_FindFirstSeparator(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %9
%5 = phi i64 [ %10, %9 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 59
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = add nuw i64 %5, 1
%11 = icmp eq i64 %10, %2
br i1 %11, label %15, label %4
12: ; preds = %4
%13 = and i64 %5, 4294967295
%14 = getelementptr inbounds i8, i8* %0, i64 %13
br label %15
15: ; preds = %9, %1, %12
%16 = phi i8* [ %14, %12 ], [ null, %1 ], [ null, %9 ]
ret i8* %16
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *, char *);
char *strerror(int /*<<< orphan*/);
void exit_with_errno(const char *msg) {
  printf("%s: %s\n", msg, strerror(errno));
  exit(1);
}


x86 assembly (clang, -O0):
<exit_with_errno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x10(%rbp),%rsi
mov    %rax,%rdx
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_with_errno>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xeb7(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
define void @exit_with_errno(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @errno
%5 = call i8* @strerror(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
define void @exit_with_errno(i8* %0) {
%2 = load i32, i32* @errno
%3 = tail call i8* @strerror(i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ MEM_32bits();
int /*<<< orphan*/ MEM_readBE32(void const *);
int /*<<< orphan*/ MEM_readBE64(void const *);
__attribute__((unused)) size_t MEM_readBEST(const void *memPtr) {
  if (MEM_32bits())
    return (size_t)MEM_readBE32(memPtr);
  else
    return (size_t)MEM_readBE64(memPtr);
}


x86 assembly (clang, -O0):
<MEM_readBEST>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <MEM_32bits@plt>
cmp    $0x0,%rax
je     1161 <MEM_readBEST+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <MEM_readBE32@plt>
cltq
mov    %rax,-0x8(%rbp)
jmp    1170 <MEM_readBEST+0x40>
mov    -0x10(%rbp),%rdi
call   1040 <MEM_readBE64@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MEM_readBEST>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <MEM_32bits@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     114a <MEM_readBEST+0x1a>
call   1030 <MEM_readBE32@plt>
jmp    114f <MEM_readBEST+0x1f>
call   1040 <MEM_readBE64@plt>
cltq
pop    %rbx
ret

LLVM IR (-O0):
define i64 @MEM_readBEST(i8* %0) {
%2 = alloca i64
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i64 (...) @MEM_32bits()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i32 @MEM_readBE32(i8* %7)
%9 = sext i32 %8 to i64
store i64 %9, i64* %2
br label %14
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = call i32 @MEM_readBE64(i8* %11)
%13 = sext i32 %12 to i64
store i64 %13, i64* %2
br label %14
14: ; preds = %10, %6
%15 = load i64, i64* %2
ret i64 %15
}

LLVM IR (-O2):
define i64 @MEM_readBEST(i8* %0) {
%2 = tail call i64 (...) @MEM_32bits()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @MEM_readBE32(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @MEM_readBE64(i8* %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
%10 = sext i32 %9 to i64
ret i64 %10
}