xunge/DecIR huggingface dataset:
unsigned long long string_hash(void *string) {
  unsigned long long result = 5381;
  unsigned char *p;
  p = (unsigned char *)string;
  while (*p != '\0') {
    result = ((result << 5) ^ result) ^ (*p);
    ++p;
  }
  return result;
}


x86 assembly (clang, -O0):
<string_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     1153 <string_hash+0x53>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
xor    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <string_hash+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <string_hash+0x2c>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
xor    %rax,%rdx
movzbl %cl,%eax
xor    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <string_hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @string_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i8* [ %12, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = shl i64 %7, 5
%9 = xor i64 %8, %7
%10 = zext i8 %5 to i64
%11 = xor i64 %9, %10
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %16
}
int stmt_expr(int x, int y) {
  return ({
    int _a = x, _b = y;
    _a > _b ? _a : _b;
  });
}


x86 assembly (clang, -O0):
<stmt_expr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    112d <stmt_expr+0x2d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1133 <stmt_expr+0x33>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stmt_expr>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @stmt_expr(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int lock_acquire(int *var, int newval) {
  int oldval = -1;
  return __sync_bool_compare_and_swap(var, oldval, newval);
}


x86 assembly (clang, -O0):
<lock_acquire>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%edx
lock cmpxchg %edx,(%rcx)
mov    %eax,%ecx
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock_acquire>:
xor    %ecx,%ecx
mov    $0xffffffff,%eax
lock cmpxchg %esi,(%rdi)
sete   %cl
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @lock_acquire(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 -1, i32* %5
%6 = load i32*, i32** %3
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = cmpxchg i32* %6, i32 %7, i32 %8 seq_cst seq_cst
%10 = extractvalue { i32, i1 } %9, 1
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @lock_acquire(i32* nocapture %0, i32 %1) {
%3 = cmpxchg i32* %0, i32 -1, i32 %1 seq_cst seq_cst
%4 = extractvalue { i32, i1 } %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
void sigchld() {}


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

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

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

LLVM IR (-O2):
define void @sigchld() {
ret void
}
void mod_tcp_is_GPL_compatible() {}


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

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

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

LLVM IR (-O2):
define void @mod_tcp_is_GPL_compatible() {
ret void
}
void caller_2_2_2_2_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_2_2_2_1_1_1() {
ret void
}
void rop3_195_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = T ^ S;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_195_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_195_0_0>:
xor    %edx,%esi
not    %sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_195_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %6
%9 = zext i8 %8 to i32
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = xor i32 %9, %11
%13 = trunc i32 %12 to i8
store i8 %13, i8* %7
%14 = load i8, i8* %7
%15 = zext i8 %14 to i32
%16 = xor i32 %15, -1
%17 = trunc i32 %16 to i8
store i8 %17, i8* %7
%18 = load i8, i8* %7
%19 = load i8*, i8** %4
store i8 %18, i8* %19
ret void
}

LLVM IR (-O2):
define void @rop3_195_0_0(i8* nocapture writeonly %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, %2
%5 = xor i8 %4, -1
store i8 %5, i8* %0
ret void
}
void t(void) {
  int i;
  float temp = 0.0;
  for (i = 0; i < 10000; i++)
    temp += 1.0;
}


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x2710,-0x4(%rbp)
jge    114c <t+0x4c>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xecf(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1113 <t+0x13>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @t() {
%1 = alloca i32
%2 = alloca float
store float 0.000000e+00, float* %2
store i32 0, i32* %1
br label %3
3: ; preds = %11, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 10000
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fadd double %8, 1.000000e+00
%10 = fptrunc double %9 to float
store float %10, float* %2
br label %11
11: ; preds = %6
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @t() {
ret void
}
/* Type definitions */
struct can_frame {
  int *data;
};

/* Variables and functions */
int s(struct can_frame frame) { return frame.data[0] >> 0 & 0x1; }


x86 assembly (clang, -O0):

:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sar    $0x0,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):

:
mov    (%rdi),%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
%struct.can_frame = type { i32* }
define i32 @s(i32* %0) {
%2 = alloca %struct.can_frame
%3 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %2, i32 0, i32 0
store i32* %0, i32** %3
%4 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %2, i32 0, i32 0
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = ashr i32 %7, 0
%9 = and i32 %8, 1
ret i32 %9
}

LLVM IR (-O2):
define i32 @s(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int load_bmp_rgb24(void *, unsigned int, int, int, int);
int /*<<< orphan*/ load_header(void *, unsigned int, int *, int *, int *);
int load_bmp(void *p, unsigned int size_B) {
  int w, h, pad_B;
  if (!load_header(p, size_B, &w, &h, &pad_B)) {
    return (-1);
  }
  return load_bmp_rgb24(p, size_B, w, h, pad_B);
}


x86 assembly (clang, -O0):
<load_bmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
lea    -0x20(%rbp),%r8
call   1030 <load_header@plt>
cmp    $0x0,%eax
jne    115c <load_bmp+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1175 <load_bmp+0x55>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
call   1040 <load_bmp_rgb24@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_bmp>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
call   1030 <load_header@plt>
test   %eax,%eax
je     115c <load_bmp+0x3c>
mov    0x14(%rsp),%edx
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%r8d
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <load_bmp_rgb24@plt>
jmp    1161 <load_bmp+0x41>
mov    $0xffffffff,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @load_bmp(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = call i32 @load_header(i8* %0, i32 %1, i32* %3, i32* %4, i32* %5)
%10 = icmp eq i32 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = call i32 @load_bmp_rgb24(i8* %0, i32 %1, i32 %12, i32 %13, i32 %14)
br label %16
16: ; preds = %2, %11
%17 = phi i32 [ %15, %11 ], [ -1, %2 ]
ret i32 %17
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int open(char const *, int, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int xopenx(const char *pathname, int flags, mode_t mode) {
  int status = open(pathname, flags, mode);
  if (status < 0) {
    perror("xopenx");
  }
  return status;
}


x86 assembly (clang, -O0):
<xopenx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    115a <xopenx+0x3a>
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xopenx>:
push   %rbx
call   1030 <open@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1130 <xopenx+0x10>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xec9(%rip),%rdi
call   1040 <perror@plt>
jmp    112c <xopenx+0xc>

LLVM IR (-O0):
@.str = [7 x i8] c"xopenx\00"
define i32 @xopenx(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 i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @open(i8* %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %3
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
@.str = [7 x i8] c"xopenx\00"
define i32 @xopenx(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @open(i8* %0, i32 %1, i32 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ terminal_writestring(char *);
void new_input(void) { terminal_writestring("input>"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"input>\00"
define void @new_input() {
%1 = call i32 @terminal_writestring(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"input>\00"
define void @new_input() {
%1 = tail call i32 @terminal_writestring(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_E7int64_lowword_reg(long long val) {
  return ((val) & (0xE7 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E7int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 231
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char *argv[]) { write(1, "Hello\n", 6); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
lea    0xed5(%rip),%rsi
mov    $0x6,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
mov    $0x6,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"Hello\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void writeGpxStartTrack(FILE *OUT) { fprintf(OUT, "<trk>\n<trkseg>\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"<trk>\0A<trkseg>\0A\00"
define void @writeGpxStartTrack(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"<trk>\0A<trkseg>\0A\00"
define void @writeGpxStartTrack(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 15, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int rom_present(char *);
int rivatnt_available(void) {
  return rom_present(L"roms/video/nv_riva128/NV4_diamond_revB.rom");
}


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

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

LLVM IR (-O0):
@.str = [43 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 110, i32 118, i32 95, i32 114, i32 105, i32 118, i32 97, i32 49, i32 50, i32 56, i32 47, i32 78, i32 86, i32 52, i32 95, i32 100, i32 105, i32 97, i32 109, i32 111, i32 110, i32 100, i32 95, i32 114, i32 101, i32 118, i32 66, i32 46, i32 114, i32 111, i32 109, i32 0]
define i32 @rivatnt_available() {
%1 = call i32 @rom_present(i8* bitcast ([43 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [43 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 110, i32 118, i32 95, i32 114, i32 105, i32 118, i32 97, i32 49, i32 50, i32 56, i32 47, i32 78, i32 86, i32 52, i32 95, i32 100, i32 105, i32 97, i32 109, i32 111, i32 110, i32 100, i32 95, i32 114, i32 101, i32 118, i32 66, i32 46, i32 114, i32 111, i32 109, i32 0]
define i32 @rivatnt_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([43 x i32]* @.str to i8*))
ret i32 %1
}
/* Type definitions */
struct timeval {
  long tv_sec;
  long tv_usec;
};

/* Variables and functions */
long diff_usec(struct timeval before, struct timeval after) {
  return (after.tv_sec * 1000000L + after.tv_usec) -
         (before.tv_sec * 1000000L + before.tv_usec);
}


x86 assembly (clang, -O0):
<diff_usec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x18(%rbp)
imul   $0xf4240,-0x20(%rbp),%rax
add    -0x18(%rbp),%rax
imul   $0xf4240,-0x10(%rbp),%rcx
add    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<diff_usec>:
sub    %rdi,%rdx
imul   $0xf4240,%rdx,%rax
sub    %rsi,%rcx
add    %rcx,%rax
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @diff_usec(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca %struct.timeval
%6 = alloca %struct.timeval
%7 = bitcast %struct.timeval* %5 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = bitcast %struct.timeval* %6 to { i64, i64 }*
%11 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %10, i32 0, i32 0
store i64 %2, i64* %11
%12 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %10, i32 0, i32 1
store i64 %3, i64* %12
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%14 = load i64, i64* %13
%15 = mul nsw i64 %14, 1000000
%16 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 1
%17 = load i64, i64* %16
%18 = add nsw i64 %15, %17
%19 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%20 = load i64, i64* %19
%21 = mul nsw i64 %20, 1000000
%22 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
%23 = load i64, i64* %22
%24 = add nsw i64 %21, %23
%25 = sub nsw i64 %18, %24
ret i64 %25
}

LLVM IR (-O2):
define i64 @diff_usec(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = sub i64 %2, %0
%6 = mul i64 %5, 1000000
%7 = sub i64 %3, %1
%8 = add i64 %7, %6
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xb0() {
  Assert_real((isupper(176) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              885, ("isupper should be 0 for 0xb0"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xb0\00"
define void @t_isupper_0xb0() {
%1 = tail call i64 @isupper(i32 176)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 885, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i2cslave_EnableACK(int /*<<< orphan*/);
void i2c0slave_EnableACK(void) { i2cslave_EnableACK(0); }


x86 assembly (clang, -O0):
<i2c0slave_EnableACK>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <i2cslave_EnableACK@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c0slave_EnableACK>:
xor    %edi,%edi
jmp    1030 <i2cslave_EnableACK@plt>

LLVM IR (-O0):
define void @i2c0slave_EnableACK() {
%1 = call i32 @i2cslave_EnableACK(i32 0)
ret void
}

LLVM IR (-O2):
define void @i2c0slave_EnableACK() {
%1 = tail call i32 @i2cslave_EnableACK(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char const *, char const *);
int /*<<< orphan*/ perror(char const *);
FILE *efopen(const char *path, const char *mode) {
  FILE *temp = 0;
  if (0 == (temp = fopen(path, mode))) {
    perror(path);
    exit(EXIT_FAILURE);
  }
  return temp;
}


x86 assembly (clang, -O0):
<efopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fopen@plt>
mov    %rax,%rcx
mov    %rcx,-0x18(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    117e <efopen+0x4e>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<efopen>:
push   %rbx
mov    %rdi,%rbx
call   1030 <fopen@plt>
test   %rax,%rax
je     1140 <efopen+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i32* @efopen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32* null, i32** %5
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = icmp eq i32* null, %8
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = call i32 @perror(i8* %11)
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %2
%16 = load i32*, i32** %5
ret i32* %16
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define noalias i32* @efopen(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @perror(i8* %0)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
ret i32* %3
}
void *test_anti_range_106(unsigned long n) {
  extern void *alloc_anti_range_106(unsigned long)
      __attribute__((alloc_size(1)));
  if (0 <= n && n <= 2)
    n = 0 - 1;
  return alloc_anti_range_106(n);
}


x86 assembly (clang, -O0):
<test_anti_range_106>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
ja     113b <test_anti_range_106+0x2b>
cmpq   $0x2,-0x8(%rbp)
ja     113b <test_anti_range_106+0x2b>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rdi
call   1030 <alloc_anti_range_106@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_106>:
cmp    $0x3,%rdi
mov    $0xffffffffffffffff,%rax
cmovb  %rax,%rdi
jmp    1030 <alloc_anti_range_106@plt>

LLVM IR (-O0):
define i8* @test_anti_range_106(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ule i64 0, %3
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp ule i64 %6, 2
br i1 %7, label %8, label %9
8: ; preds = %5
store i64 -1, i64* %2
br label %9
9: ; preds = %8, %5, %1
%10 = load i64, i64* %2
%11 = call i8* @alloc_anti_range_106(i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @test_anti_range_106(i64 %0) {
%2 = icmp ult i64 %0, 3
%3 = select i1 %2, i64 -1, i64 %0
%4 = tail call i8* @alloc_anti_range_106(i64 %3)
ret i8* %4
}
void XdbeEndIdiom() {}


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

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

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

LLVM IR (-O2):
define void @XdbeEndIdiom() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  double sum, atof(char[]);
  char line[100];
  int getlinev2(char s[], int lim);
  sum = 0;
  while (getlinev2(line, 100) > 0)
    printf("\t%g\n", sum += atof(line));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
mov    $0x64,%esi
call   1050 <getlinev2@plt>
cmp    $0x0,%eax
jle    1185 <main+0x55>
lea    -0x80(%rbp),%rdi
call   1030 <atof@plt>
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
jmp    114a <main+0x1a>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x78,%rsp
lea    0x10(%rsp),%rdi
mov    $0x64,%esi
call   1050 <getlinev2@plt>
test   %eax,%eax
jle    1195 <main+0x65>
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x10(%rsp),%rbx
lea    0xea0(%rip),%r14
mov    %rbx,%rdi
call   1030 <atof@plt>
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
mov    %r14,%rdi
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
call   1050 <getlinev2@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"\09%g\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca [100 x i8]
store i32 0, i32* %1
store double 0.000000e+00, double* %2
br label %4
4: ; preds = %8, %0
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%6 = call i32 @getlinev2(i8* %5, i32 100)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%10 = call double @atof(i8* %9)
%11 = load double, double* %2
%12 = fadd double %11, %10
store double %12, double* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %12)
br label %4
14: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"\09%g\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @getlinev2(i8* %2, i32 100)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %0, %5
%6 = phi double [ %8, %5 ], [ 0.000000e+00, %0 ]
%7 = call double @atof(i8* %2)
%8 = fadd double %6, %7
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %8)
%10 = call i32 @getlinev2(i8* %2, i32 100)
%11 = icmp sgt i32 %10, 0
br i1 %11, label %5, label %12
12: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int sodium_crit_enter(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sodium_crit_enter() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char c;
  c = -1;
  printf("-1=%x\n", (unsigned char)c);
  printf("-1=%d\n", (unsigned char)c);
  printf("-1 Memory Adress=%p\n", &c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0xff,-0x5(%rbp)
movzbl -0x5(%rbp),%esi
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movzbl -0x5(%rbp),%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
lea    -0x5(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0xff,0x7(%rsp)
lea    0xee3(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"-1=%x\0A\00"
@.str.1 = [7 x i8] c"-1=%d\0A\00"
@.str.2 = [21 x i8] c"-1 Memory Adress=%p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 -1, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"-1=%x\0A\00"
@.str.1 = [7 x i8] c"-1=%d\0A\00"
@.str.2 = [21 x i8] c"-1 Memory Adress=%p\0A\00"
define i32 @main() {
%1 = alloca i8
store i8 -1, i8* %1
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 255)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 255)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %1)
ret i32 0
}
void swap_ptr(double **a, double **b) {
  double *temp;
  temp = *a;
  *a = *b;
  *b = temp;
}


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

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

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

LLVM IR (-O2):
define void @swap_ptr(double** nocapture %0, double** nocapture %1) {
%3 = load double*, double** %0
%4 = load double*, double** %1
store double* %4, double** %0
store double* %3, double** %1
ret void
}
/* Variables and functions */
void _exit(void) {
  for (;;)
    continue;
}


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

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

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

LLVM IR (-O2):
define void @_exit() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ _free(void *);
void free(void *p) { _free(p); }


x86 assembly (clang, -O0):
<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):
<free>:
jmp    1030 <_free@plt>

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

LLVM IR (-O2):
define void @free(i8* %0) {
%2 = tail call i32 @_free(i8* %0)
ret void
}
char *append_flag(char *flags, char * or, char *flag) {
  flags = strcat(flags, or);
  flags = strcat(flags, flag);
  return flags;
}


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

x86 assembly (clang, -O2):
<append_flag>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcat@plt>

LLVM IR (-O0):
define i8* @append_flag(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i8* @strcat(i8* %7, i8* %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %6
%12 = call i8* @strcat(i8* %10, i8* %11)
store i8* %12, i8** %4
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
define i8* @append_flag(i8* returned %0, i8* nocapture %1, i8* nocapture %2) {
%4 = tail call i8* @strcat(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%5 = tail call i8* @strcat(i8* dereferenceable(1) %0, i8* dereferenceable(1) %2)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ assert_context_process();
int nondet_int();
int put_user(int size, void *ptr) {
  int tmp;
  {
    assert_context_process();
    tmp = nondet_int();
    return (tmp);
  }
}


x86 assembly (clang, -O0):
<put_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <assert_context_process@plt>
mov    $0x0,%al
call   1030 <nondet_int@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_user>:
push   %rax
xor    %eax,%eax
call   1040 <assert_context_process@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <nondet_int@plt>

LLVM IR (-O0):
define i32 @put_user(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = call i32 (...) @assert_context_process()
%7 = call i32 (...) @nondet_int()
store i32 %7, i32* %5
%8 = load i32, i32* %5
ret i32 %8
}

LLVM IR (-O2):
define i32 @put_user(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @assert_context_process()
%4 = tail call i32 (...) @nondet_int()
ret i32 %4
}
void fn0000000140001ABC() { return; }


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @fn0000000140001ABC() {
ret void
}
void writel(l) const char *l;
{
  while (*l)
    writec(*l++);
}


x86 assembly (clang, -O0):
<writel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1147 <writel+0x37>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
mov    $0x0,%al
call   1030 <writec@plt>
jmp    111c <writel+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writel>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1135 <writel+0x25>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
xor    %eax,%eax
call   1030 <writec@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <writel+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @writel(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
%12 = call i32 (i32, ...) bitcast (i32 (...)* @writec to i32 (i32, ...)*)(i32 %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @writel(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @writec to i32 (i32, ...)*)(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
int g(char a, int b, float c, int *d, float **e) { return 0; }


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @g(i8 signext %0, i32 %1, float %2, i32* %3, float** %4) {
%6 = alloca i8
%7 = alloca i32
%8 = alloca float
%9 = alloca i32*
%10 = alloca float**
store i8 %0, i8* %6
store i32 %1, i32* %7
store float %2, float* %8
store i32* %3, i32** %9
store float** %4, float*** %10
ret i32 0
}

LLVM IR (-O2):
define i32 @g(i8 signext %0, i32 %1, float %2, i32* nocapture readnone %3, float** nocapture readnone %4) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Helloworld Bitches\n");
  printf("I'm coding bitches...\n");
  printf("Modificacion solo para dev...testing\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
lea    0xeed(%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
call   1030 <puts@plt>
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Helloworld Bitches\0A\00"
@.str.1 = [23 x i8] c"I'm coding bitches...\0A\00"
@.str.2 = [38 x i8] c"Modificacion solo para dev...testing\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"Helloworld Bitches\00"
@str.3 = [22 x i8] c"I'm coding bitches...\00"
@str.4 = [37 x i8] c"Modificacion solo para dev...testing\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int my_sort_int_tab_exec(int *, int);
void my_sort_int_tab(int *tab, int size) {
  int e;
  e = -1;
  while (e != 0) {
    e = my_sort_int_tab_exec(tab, size);
  }
}


x86 assembly (clang, -O0):
<my_sort_int_tab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1144 <my_sort_int_tab+0x34>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <my_sort_int_tab_exec@plt>
mov    %eax,-0x10(%rbp)
jmp    1126 <my_sort_int_tab+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_sort_int_tab>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <my_sort_int_tab_exec@plt>
test   %eax,%eax
jne    1120 <my_sort_int_tab+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @my_sort_int_tab(i32* %0, i32 %1) {
br label %3
3: ; preds = %2, %3
%4 = tail call i32 @my_sort_int_tab_exec(i32* %0, i32 %1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3
ret void
}
int xmlUCSIsNumberForms(int code) {
  return (((code >= 0x2150) && (code <= 0x218F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsNumberForms>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x2150,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsNumberForms+0x26>
cmpl   $0x218f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsNumberForms>:
add    $0xffffdeb0,%edi
xor    %eax,%eax
cmp    $0x40,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @xmlUCSIsNumberForms(i32 %0) {
%2 = add i32 %0, -8528
%3 = icmp ult i32 %2, 64
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ enter_scheduler();
void sigalrm_handler(int sig, siginfo_t *info, void *ctx) { enter_scheduler(); }


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

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

LLVM IR (-O0):
define void @sigalrm_handler(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = call i32 (...) @enter_scheduler()
ret void
}

LLVM IR (-O2):
define void @sigalrm_handler(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 (...) @enter_scheduler()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glMaterialfv_size(int /*<<< orphan*/);
__attribute__((visibility("internal"))) __attribute__((pure)) GLint
__glMaterialiv_size(GLenum e) {
  return __glMaterialfv_size(e);
}


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

x86 assembly (clang, -O2):
<__glMaterialiv_size>:
jmp    1030 <__glMaterialfv_size@plt>

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

LLVM IR (-O2):
define hidden i32 @__glMaterialiv_size(i32 %0) {
%2 = tail call i32 @__glMaterialfv_size(i32 %0)
ret i32 %2
}