xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ u_int;
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int /*<<< orphan*/ NS_GET16(int /*<<< orphan*/, int /*<<< orphan*/ const *);
u_int ns_get16(const u_char *src) {
  u_int dst;
  NS_GET16(dst, src);
  return (dst);
}


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

x86 assembly (clang, -O2):
<ns_get16>:
mov    %rdi,%rsi
jmp    1030 <NS_GET16@plt>

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

LLVM IR (-O2):
define i32 @ns_get16(i32* %0) {
%2 = tail call i32 @NS_GET16(i32 undef, i32* %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void fcomp_preg64_dword(int reg64) {
  put8(0xD8);
  put8(0x18 + reg64);
}


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

x86 assembly (clang, -O2):
<fcomp_preg64_dword>:
push   %rbx
mov    %edi,%ebx
mov    $0xd8,%edi
call   1030 <put8@plt>
add    $0x18,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @fcomp_preg64_dword(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 216)
%4 = load i32, i32* %2
%5 = add nsw i32 24, %4
%6 = call i32 @put8(i32 %5)
ret void
}

LLVM IR (-O2):
define void @fcomp_preg64_dword(i32 %0) {
%2 = tail call i32 @put8(i32 216)
%3 = add nsw i32 %0, 24
%4 = tail call i32 @put8(i32 %3)
ret void
}
int ipc_stop_listening(char *addr) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ipc_stop_listening(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void die() { _exit(111); }


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6f,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    $0x6f,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @die() {
%1 = call i32 @_exit(i32 111)
unreachable
}

LLVM IR (-O2):
define void @die() {
%1 = tail call i32 @_exit(i32 111)
unreachable
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t convertBase(uint8_t a, uint8_t b, uint8_t c, uint8_t d) {
  return ((a << 24) | (b << 16) | (c << 8) | (d));
}


x86 assembly (clang, -O0):
<convertBase>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
or     -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertBase>:
mov    %edx,%eax
shl    $0x18,%edi
shl    $0x10,%esi
or     %edi,%esi
shl    $0x8,%eax
or     %ecx,%eax
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @convertBase(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %0, 24
%6 = shl i32 %1, 16
%7 = or i32 %6, %5
%8 = shl i32 %2, 8
%9 = or i32 %7, %8
%10 = or i32 %9, %3
ret i32 %10
}
int compute_index(int real_index, int channel, int sign) {
  return real_index + (channel + (sign > 0 ? 1 : 0) * 3) * 64 * 64;
}


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

x86 assembly (clang, -O2):
<compute_index>:
xor    %eax,%eax
test   %edx,%edx
setg   %al
lea    (%rax,%rax,2),%eax
add    %esi,%eax
shl    $0xc,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @compute_index(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp sgt i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 1, i32 0
%13 = mul nsw i32 %12, 3
%14 = add nsw i32 %8, %13
%15 = mul nsw i32 %14, 64
%16 = mul nsw i32 %15, 64
%17 = add nsw i32 %7, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @compute_index(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
%5 = select i1 %4, i32 3, i32 0
%6 = add nsw i32 %5, %1
%7 = shl nsw i32 %6, 12
%8 = add nsw i32 %7, %0
ret i32 %8
}
void wlan_hdd_change_tdls_mode(void *hdd_ctx) {}


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

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

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

LLVM IR (-O2):
define void @wlan_hdd_change_tdls_mode(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
void sighandler(int sig) { bar(sig); }


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

x86 assembly (clang, -O2):
<sighandler>:
jmp    1030 <bar@plt>

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

LLVM IR (-O2):
define void @sighandler(i32 %0) {
%2 = tail call i32 @bar(i32 %0)
ret void
}
void dummyvideo_FBGetFrameBufferInfo(void *p) {}


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

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

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

LLVM IR (-O2):
define void @dummyvideo_FBGetFrameBufferInfo(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void mem_err() { exit(2); }


x86 assembly (clang, -O0):
<mem_err>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<mem_err>:
push   %rax
mov    $0x2,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @mem_err() {
%1 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
define void @mem_err() {
%1 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void kill_server(int sig) {
  printf("\n\nCaught Ctrl-C (%i), shutting down!\n\n", sig);
  exit(sig);
}


x86 assembly (clang, -O0):
<kill_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<kill_server>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"\0A\0ACaught Ctrl-C (%i), shutting down!\0A\0A\00"
define void @kill_server(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [39 x i8] c"\0A\0ACaught Ctrl-C (%i), shutting down!\0A\0A\00"
define void @kill_server(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 %0)
unreachable
}
float f(float x) { return x * x + 1; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xee1(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mulss  %xmm0,%xmm0
addss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = call float @llvm.fmuladd.f32(float %3, float %4, float 1.000000e+00)
ret float %5
}

LLVM IR (-O2):
define float @f(float %0) {
%2 = tail call float @llvm.fmuladd.f32(float %0, float %0, float 1.000000e+00)
ret float %2
}
/* Variables and functions */
int strlen(char *);
void stripNewline(char *str) {
  int len = strlen(str);
  if (len > 0 && str[len - 1] == '\n')
    str[len - 1] = '\0';
}


x86 assembly (clang, -O0):
<stripNewline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    115d <stripNewline+0x4d>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    115d <stripNewline+0x4d>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stripNewline>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %eax,%eax
jle    112a <stripNewline+0x1a>
add    $0xffffffff,%eax
cmpb   $0xa,(%rbx,%rax,1)
jne    112a <stripNewline+0x1a>
movb   $0x0,(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @stripNewline(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = add nsw i32 %2, -1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 10
br i1 %9, label %10, label %11
10: ; preds = %4
store i8 0, i8* %7
br label %11
11: ; preds = %10, %4, %1
ret void
}
int unix_fcntl_o_path() { return -1; }


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

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

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

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

/* Variables and functions */
int cap_ptrace(struct task_struct *, struct task_struct *);
int security_ptrace(struct task_struct *parent, struct task_struct *child) {
  return cap_ptrace(parent, child);
}


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

x86 assembly (clang, -O2):
<security_ptrace>:
jmp    1030 <cap_ptrace@plt>

LLVM IR (-O0):
%struct.task_struct = type { i32 }
define i32 @security_ptrace(%struct.task_struct* %0, %struct.task_struct* %1) {
%3 = alloca %struct.task_struct*
%4 = alloca %struct.task_struct*
store %struct.task_struct* %0, %struct.task_struct** %3
store %struct.task_struct* %1, %struct.task_struct** %4
%5 = load %struct.task_struct*, %struct.task_struct** %3
%6 = load %struct.task_struct*, %struct.task_struct** %4
%7 = call i32 @cap_ptrace(%struct.task_struct* %5, %struct.task_struct* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.task_struct = type { i32 }
define i32 @security_ptrace(%struct.task_struct* %0, %struct.task_struct* %1) {
%3 = tail call i32 @cap_ptrace(%struct.task_struct* %0, %struct.task_struct* %1)
ret i32 %3
}
int Xallexpose(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Xallexpose() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _parser_begin(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Start test...\n");
  _parser_begin("test.txt");
  printf("End test...\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Start test...\0A\00"
@.str.1 = [9 x i8] c"test.txt\00"
@.str.2 = [13 x i8] c"End test...\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @_parser_begin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"test.txt\00"
@str = [14 x i8] c"Start test...\00"
@str.3 = [12 x i8] c"End test...\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @_parser_begin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}
int bcd2num(unsigned char bcd) { return (bcd >> 4) * 10 + (bcd & 0xF); }


x86 assembly (clang, -O0):
<bcd2num>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x4,%eax
imul   $0xa,%eax,%eax
movzbl -0x1(%rbp),%ecx
and    $0xf,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcd2num>:
mov    %edi,%eax
shr    $0x4,%eax
lea    (%rax,%rax,4),%eax
and    $0xf,%edi
lea    (%rdi,%rax,2),%eax
ret

LLVM IR (-O0):
define i32 @bcd2num(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = ashr i32 %4, 4
%6 = mul nsw i32 %5, 10
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = and i32 %8, 15
%10 = add nsw i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @bcd2num(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = lshr i32 %2, 4
%4 = mul nuw nsw i32 %3, 10
%5 = and i32 %2, 15
%6 = add nuw nsw i32 %4, %5
ret i32 %6
}
void posix_class2P_LOWER() {}


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

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

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

LLVM IR (-O2):
define void @posix_class2P_LOWER() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _s2priv_funab(float (*)(float *, float *), int, int, float,
                                 float, float, float, int /*<<< orphan*/, int,
                                 int, float, float);
void s2funxzr(float (*fxz)(float *, float *), int nx, int nz, float xmin,
              float xmax, float zmin, float zmax, int ctl, float rmin,
              float rmax) {
  _s2priv_funab(fxz, nx, nz, xmin, xmax, zmin, zmax, 0, 2, ctl, rmin, rmax);
}


x86 assembly (clang, -O0):
<s2funxzr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  %xmm1,-0x18(%rbp)
movss  %xmm2,-0x1c(%rbp)
movss  %xmm3,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movss  %xmm4,-0x28(%rbp)
movss  %xmm5,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movss  -0x20(%rbp),%xmm3
mov    -0x24(%rbp),%r9d
movss  -0x28(%rbp),%xmm4
movss  -0x2c(%rbp),%xmm5
xor    %ecx,%ecx
mov    $0x2,%r8d
call   1030 <_s2priv_funab@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2funxzr>:
mov    %ecx,%r9d
xor    %ecx,%ecx
mov    $0x2,%r8d
jmp    1030 <_s2priv_funab@plt>

LLVM IR (-O0):
define void @s2funxzr(float (float*, float*)* %0, i32 %1, i32 %2, float %3, float %4, float %5, float %6, i32 %7, float %8, float %9) {
%11 = alloca float (float*, float*)*
%12 = alloca i32
%13 = alloca i32
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca i32
%19 = alloca float
%20 = alloca float
store float (float*, float*)* %0, float (float*, float*)** %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store float %3, float* %14
store float %4, float* %15
store float %5, float* %16
store float %6, float* %17
store i32 %7, i32* %18
store float %8, float* %19
store float %9, float* %20
%21 = load float (float*, float*)*, float (float*, float*)** %11
%22 = load i32, i32* %12
%23 = load i32, i32* %13
%24 = load float, float* %14
%25 = load float, float* %15
%26 = load float, float* %16
%27 = load float, float* %17
%28 = load i32, i32* %18
%29 = load float, float* %19
%30 = load float, float* %20
%31 = call i32 @_s2priv_funab(float (float*, float*)* %21, i32 %22, i32 %23, float %24, float %25, float %26, float %27, i32 0, i32 2, i32 %28, float %29, float %30)
ret void
}

LLVM IR (-O2):
define void @s2funxzr(float (float*, float*)* %0, i32 %1, i32 %2, float %3, float %4, float %5, float %6, i32 %7, float %8, float %9) {
%11 = tail call i32 @_s2priv_funab(float (float*, float*)* %0, i32 %1, i32 %2, float %3, float %4, float %5, float %6, i32 0, i32 2, i32 %7, float %8, float %9)
ret void
}
/* Variables and functions */
int __is_protected_atpath(int, char const *, int);
int __is_protected_atfile(int dirfd, const char *path) {
  return __is_protected_atpath(dirfd, path, 1);
}


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

x86 assembly (clang, -O2):
<__is_protected_atfile>:
mov    $0x1,%edx
jmp    1030 <__is_protected_atpath@plt>

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

LLVM IR (-O2):
define i32 @__is_protected_atfile(i32 %0, i8* %1) {
%3 = tail call i32 @__is_protected_atpath(i32 %0, i8* %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ error();
void gl_write(int i) {
  switch (i) {
  case 0:
    i = 1;
  case 1:
    break;
  default:
    error();
  }
}


x86 assembly (clang, -O0):
<gl_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     113f <gl_write+0x2f>
jmp    112e <gl_write+0x1e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     1146 <gl_write+0x36>
jmp    114b <gl_write+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1152 <gl_write+0x42>
mov    $0x0,%al
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gl_write>:
cmp    $0x2,%edi
jae    1116 <gl_write+0x6>
ret
xor    %eax,%eax
jmp    1030 <error@plt>

LLVM IR (-O0):
define void @gl_write(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %6 [
i32 0, label %4
i32 1, label %5
]
4: ; preds = %1
store i32 1, i32* %2
br label %5
5: ; preds = %1, %4
br label %8
6: ; preds = %1
%7 = call i32 (...) @error()
br label %8
8: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @gl_write(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @error()
br label %5
5: ; preds = %1, %3
ret void
}
int test_imm_4Buint16_mem(unsigned short *val) {
  return ((*val) & (0x4B << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_4Buint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 75
%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_4Buint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 75
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void liberar(int *p) { free(p); }


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

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

LLVM IR (-O2):
define void @liberar(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *);
char *h2o_strerror_r(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void h2o_perror(const char *msg) {
  char buf[128];
  fprintf(stderr, "%s: %s\n", msg, h2o_strerror_r(errno, buf, sizeof(buf)));
}


x86 assembly (clang, -O0):
<h2o_perror>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
lea    -0x90(%rbp),%rsi
mov    $0x80,%edx
call   1030 <h2o_strerror_r@plt>
mov    -0x9c(%rbp),%edi
mov    -0x98(%rbp),%rdx
mov    %rax,%rcx
lea    0xe86(%rip),%rsi
call   1040 <fprintf@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_perror>:
push   %rbp
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%rbx
mov    0x2ead(%rip),%rax
mov    (%rax),%ebp
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
mov    $0x80,%edx
call   1030 <h2o_strerror_r@plt>
lea    0xeae(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1040 <fprintf@plt>
add    $0x88,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
define void @h2o_perror(i8* %0) {
%2 = alloca i8*
%3 = alloca [128 x i8]
store i8* %0, i8** %2
%4 = load i32, i32* @stderr
%5 = load i8*, i8** %2
%6 = load i32, i32* @errno
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%8 = call i8* @h2o_strerror_r(i32 %6, i8* %7, i32 128)
%9 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %8)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
define void @h2o_perror(i8* %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @stderr
%5 = load i32, i32* @errno
%6 = call i8* @h2o_strerror_r(i32 %5, i8* %3, i32 128)
%7 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %6)
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *);
extern void german_ISO_8859_1_close_env(struct SN_env *z) { SN_close_env(z); }


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

x86 assembly (clang, -O2):
<german_ISO_8859_1_close_env>:
jmp    1030 <SN_close_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define void @german_ISO_8859_1_close_env(%struct.SN_env* %0) {
%2 = alloca %struct.SN_env*
store %struct.SN_env* %0, %struct.SN_env** %2
%3 = load %struct.SN_env*, %struct.SN_env** %2
%4 = call i32 @SN_close_env(%struct.SN_env* %3)
ret void
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @german_ISO_8859_1_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0)
ret void
}
int is_invalid(const int *y, int k, int r) {
  for (int i = 0; i < r; i++)
    if (y[i + k * r] < 0)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_invalid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    115d <is_invalid+0x5d>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x18(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
jge    114a <is_invalid+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1164 <is_invalid+0x64>
jmp    114f <is_invalid+0x4f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <is_invalid+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_invalid>:
test   %edx,%edx
jle    113b <is_invalid+0x3b>
imul   %edx,%esi
movslq %esi,%rax
cmpl   $0x0,(%rdi,%rax,4)
js     113e <is_invalid+0x3e>
mov    %edx,%ecx
lea    (%rdi,%rax,4),%rax
mov    $0x1,%esi
nopl   0x0(%rax,%rax,1)
mov    %rsi,%rdx
cmp    %rsi,%rcx
je     1132 <is_invalid+0x32>
lea    0x1(%rdx),%rsi
cmpl   $0x0,(%rax,%rdx,4)
jns    1120 <is_invalid+0x20>
xor    %eax,%eax
cmp    %rcx,%rdx
setb   %al
ret
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_invalid(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %25
5: ; preds = %3
%6 = mul nsw i32 %2, %1
%7 = sext i32 %6 to i64
%8 = zext i32 %2 to i64
%9 = zext i32 %2 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %7
%11 = load i32, i32* %10
%12 = icmp slt i32 %11, 0
br i1 %12, label %25, label %13
13: ; preds = %5, %16
%14 = phi i64 [ %21, %16 ], [ 1, %5 ]
%15 = icmp eq i64 %14, %9
br i1 %15, label %22, label %16
16: ; preds = %13
%17 = add nsw i64 %14, %7
%18 = getelementptr inbounds i32, i32* %0, i64 %17
%19 = load i32, i32* %18
%20 = icmp slt i32 %19, 0
%21 = add nuw nsw i64 %14, 1
br i1 %20, label %22, label %13
22: ; preds = %13, %16
%23 = icmp ult i64 %14, %8
%24 = zext i1 %23 to i32
br label %25
25: ; preds = %22, %5, %3
%26 = phi i32 [ 0, %3 ], [ 1, %5 ], [ %24, %22 ]
ret i32 %26
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void r_set_nan_real_(double *val) {
  int64_t x = 0x7FF0000000000000LL;
  memcpy((void *)val, (void *)&x, 8);
}


x86 assembly (clang, -O0):
<r_set_nan_real_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_set_nan_real_>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @r_set_nan_real_(double* %0) {
%2 = alloca double*
%3 = alloca i32
store double* %0, double** %2
store i32 0, i32* %3
%4 = load double*, double** %2
%5 = bitcast double* %4 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @memcpy(i8* %5, i8* %6, i32 8)
ret void
}

LLVM IR (-O2):
define void @r_set_nan_real_(double* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = bitcast double* %0 to i8*
%5 = call i32 @memcpy(i8* %4, i8* %3, i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ inc_IP(int *);
void Jmn(int adr1, int op2, int *ip) {
  if ((op2) != 0)
    *ip = adr1;
  else
    inc_IP(ip);
}


x86 assembly (clang, -O0):
<Jmn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     113a <Jmn+0x2a>
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1143 <Jmn+0x33>
mov    -0x10(%rbp),%rdi
call   1030 <inc_IP@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Jmn>:
test   %esi,%esi
je     1117 <Jmn+0x7>
mov    %edi,(%rdx)
ret
mov    %rdx,%rdi
jmp    1030 <inc_IP@plt>

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

LLVM IR (-O2):
define void @Jmn(i32 %0, i32 %1, i32* %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %6, label %5
5: ; preds = %3
store i32 %0, i32* %2
br label %8
6: ; preds = %3
%7 = tail call i32 @inc_IP(i32* %2)
br label %8
8: ; preds = %6, %5
ret void
}
int Cyc_PP_max(int x, int y) {
  int _T0;
  int _T1;
  if (x < y)
    goto _TL4D;
  _T0 = x;
  return _T0;
_TL4D:
  _T1 = y;
  return _T1;
}


x86 assembly (clang, -O0):
<Cyc_PP_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    111b <Cyc_PP_max+0x1b>
jmp    112c <Cyc_PP_max+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1138 <Cyc_PP_max+0x38>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @Cyc_PP_max(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
void gtk_dialog_set_default_response() {}


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

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

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

LLVM IR (-O2):
define void @gtk_dialog_set_default_response() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void check_ptr_eq(void *p1, void *p2) {
  if (p1 != p2)
    abort();
}


x86 assembly (clang, -O0):
<check_ptr_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1135 <check_ptr_eq+0x25>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_ptr_eq>:
cmp    %rsi,%rdi
jne    1116 <check_ptr_eq+0x6>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @check_ptr_eq(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
ret void
}
float test_03(int val) {
  union {
    int i;
    float f;
  } tmp;
  tmp.i = val;
  return tmp.f;
}


x86 assembly (clang, -O0):
<test_03>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_03>:
movd   %edi,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define float @test_03(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = bitcast %union.anon* %3 to i32*
store i32 %4, i32* %5
%6 = bitcast %union.anon* %3 to float*
%7 = load float, float* %6
ret float %7
}

LLVM IR (-O2):
define float @test_03(i32 %0) {
%2 = bitcast i32 %0 to float
ret float %2
}
unsigned simple_hash(const char *key) {
  unsigned hashval;
  for (hashval = 0; *key != '\0'; key++)
    hashval = *key + 31 * hashval;
  return hashval;
}


x86 assembly (clang, -O0):
<simple_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1140 <simple_hash+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
imul   $0x1f,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <simple_hash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <simple_hash+0x28>
add    $0x1,%rdi
xor    %edx,%edx
mov    %edx,%eax
xchg   %ax,%ax
movsbl %cl,%ecx
shl    $0x5,%eax
sub    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1110 <simple_hash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @simple_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul i32 %6, 31
%10 = add i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %10, %4 ]
ret i32 %15
}
void UARTEchoSet(unsigned char b) {}


x86 assembly (clang, -O0):
<UARTEchoSet>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @UARTEchoSet(i8 zeroext %0) {
ret void
}
__attribute__((always_)) struct mempolicy *
mpol_cond_copy(struct mempolicy *to, struct mempolicy *from) {
  return from;
}


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

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

LLVM IR (-O0):
%struct.mempolicy = type opaque
define %struct.mempolicy* @mpol_cond_copy(%struct.mempolicy* %0, %struct.mempolicy* %1) {
%3 = alloca %struct.mempolicy*
%4 = alloca %struct.mempolicy*
store %struct.mempolicy* %0, %struct.mempolicy** %3
store %struct.mempolicy* %1, %struct.mempolicy** %4
%5 = load %struct.mempolicy*, %struct.mempolicy** %4
ret %struct.mempolicy* %5
}

LLVM IR (-O2):
%struct.mempolicy = type opaque
define %struct.mempolicy* @mpol_cond_copy(%struct.mempolicy* nocapture readnone %0, %struct.mempolicy* readnone returned %1) {
ret %struct.mempolicy* %1
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int initialize_standard_sampler(int dim) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(42, &dim, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<initialize_standard_sampler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2a,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_standard_sampler>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x2a,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @initialize_standard_sampler(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 42, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @initialize_standard_sampler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 42, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Type definitions */
struct radix_tree_root {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rst_delete(struct radix_tree_root *, unsigned long);
void radix_tree_delete(struct radix_tree_root *tree, unsigned long index) {
  rst_delete(tree, index);
  return;
}


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

x86 assembly (clang, -O2):
<radix_tree_delete>:
jmp    1030 <rst_delete@plt>

LLVM IR (-O0):
%struct.radix_tree_root = type { i32 }
define void @radix_tree_delete(%struct.radix_tree_root* %0, i64 %1) {
%3 = alloca %struct.radix_tree_root*
%4 = alloca i64
store %struct.radix_tree_root* %0, %struct.radix_tree_root** %3
store i64 %1, i64* %4
%5 = load %struct.radix_tree_root*, %struct.radix_tree_root** %3
%6 = load i64, i64* %4
%7 = call i32 @rst_delete(%struct.radix_tree_root* %5, i64 %6)
ret void
}

LLVM IR (-O2):
%struct.radix_tree_root = type { i32 }
define void @radix_tree_delete(%struct.radix_tree_root* %0, i64 %1) {
%3 = tail call i32 @rst_delete(%struct.radix_tree_root* %0, i64 %1)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x >= 0 && y > 0) {
    y = 1;
    while (x > y && y > 0) {
      y = 2 * y;
    }
    x = x - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jl     114c <main+0x3c>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    115c <main+0x4c>
jmp    11aa <main+0x9a>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0xe(%rbp)
jle    117e <main+0x6e>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
test   $0x1,%al
jne    118e <main+0x7e>
jmp    119c <main+0x8c>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1163 <main+0x53>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Type definitions */
struct img_str {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ img_str_push_back(struct img_str *, char const);
void img_str_load_native(struct img_str *str, const char *input) {
  while (*input) {
    img_str_push_back(str, *input);
    input++;
  }
}


x86 assembly (clang, -O0):
<img_str_load_native>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <img_str_load_native+0x3e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
call   1030 <img_str_push_back@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <img_str_load_native+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<img_str_load_native>:
push   %r14
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1146 <img_str_load_native+0x36>
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <img_str_push_back@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <img_str_load_native+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.img_str = type { i32 }
define void @img_str_load_native(%struct.img_str* %0, i8* %1) {
%3 = alloca %struct.img_str*
%4 = alloca i8*
store %struct.img_str* %0, %struct.img_str** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %9, %2
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = load %struct.img_str*, %struct.img_str** %3
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = call i32 @img_str_push_back(%struct.img_str* %10, i8 signext %12)
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %4
br label %5
16: ; preds = %5
ret void
}

LLVM IR (-O2):
%struct.img_str = type { i32 }
define void @img_str_load_native(%struct.img_str* %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %10, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = tail call i32 @img_str_push_back(%struct.img_str* %0, i8 signext %6)
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printNum(int num) {
  ;
  printf("%d\n", num);
  ;
  return;
}


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

x86 assembly (clang, -O2):
<printNum>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @printNum(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}