xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ R_ShutdownCoronas();
int /*<<< orphan*/ R_ShutdownCustomColors();
int /*<<< orphan*/ R_ShutdownOcclusionQueries();
int /*<<< orphan*/ R_ShutdownOutlines();
int /*<<< orphan*/ R_ShutdownShadows();
int /*<<< orphan*/ R_ShutdownSkeletalCache();
void R_DestroyVolatileAssets(void) {
  R_ShutdownCustomColors();
  R_ShutdownShadows();
  R_ShutdownOutlines();
  R_ShutdownCoronas();
  R_ShutdownOcclusionQueries();
  R_ShutdownSkeletalCache();
}


x86 assembly (clang, -O0):
<R_DestroyVolatileAssets>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <R_ShutdownCustomColors@plt>
mov    $0x0,%al
call   1040 <R_ShutdownShadows@plt>
mov    $0x0,%al
call   1050 <R_ShutdownOutlines@plt>
mov    $0x0,%al
call   1080 <R_ShutdownCoronas@plt>
mov    $0x0,%al
call   1060 <R_ShutdownOcclusionQueries@plt>
mov    $0x0,%al
call   1070 <R_ShutdownSkeletalCache@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<R_DestroyVolatileAssets>:
push   %rax
xor    %eax,%eax
call   1030 <R_ShutdownCustomColors@plt>
xor    %eax,%eax
call   1040 <R_ShutdownShadows@plt>
xor    %eax,%eax
call   1050 <R_ShutdownOutlines@plt>
xor    %eax,%eax
call   1080 <R_ShutdownCoronas@plt>
xor    %eax,%eax
call   1060 <R_ShutdownOcclusionQueries@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <R_ShutdownSkeletalCache@plt>

LLVM IR (-O0):
define void @R_DestroyVolatileAssets() {
%1 = call i32 (...) @R_ShutdownCustomColors()
%2 = call i32 (...) @R_ShutdownShadows()
%3 = call i32 (...) @R_ShutdownOutlines()
%4 = call i32 (...) @R_ShutdownCoronas()
%5 = call i32 (...) @R_ShutdownOcclusionQueries()
%6 = call i32 (...) @R_ShutdownSkeletalCache()
ret void
}

LLVM IR (-O2):
define void @R_DestroyVolatileAssets() {
%1 = tail call i32 (...) @R_ShutdownCustomColors()
%2 = tail call i32 (...) @R_ShutdownShadows()
%3 = tail call i32 (...) @R_ShutdownOutlines()
%4 = tail call i32 (...) @R_ShutdownCoronas()
%5 = tail call i32 (...) @R_ShutdownOcclusionQueries()
%6 = tail call i32 (...) @R_ShutdownSkeletalCache()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printApproximationHeader() {
  printf("Number\tApproximation1\t\tApproximation2\n");
  printf("------------------------------------------------------\n");
}


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

x86 assembly (clang, -O2):
<printApproximationHeader>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf02(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Number\09Approximation1\09\09Approximation2\0A\00"
@.str.1 = [56 x i8] c"------------------------------------------------------\0A\00"
define void @printApproximationHeader() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [38 x i8] c"Number\09Approximation1\09\09Approximation2\00"
@str.2 = [55 x i8] c"------------------------------------------------------\00"
define void @printApproximationHeader() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
void tg_destroy(unsigned char *mini_table) { free(mini_table); }


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

LLVM IR (-O0):
define void @tg_destroy(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 @tg_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ seq_ctrl_set_record_mode(int /*<<< orphan*/);
int /*<<< orphan*/ seq_ctrl_set_run_lockout(int /*<<< orphan*/);
int /*<<< orphan*/ seq_ctrl_set_run_state(int /*<<< orphan*/);
int /*<<< orphan*/ song_clear();
void seq_ctrl_clear_song(void) {
  seq_ctrl_set_record_mode(0);
  seq_ctrl_set_run_lockout(0);
  seq_ctrl_set_run_state(0);
  song_clear();
}


x86 assembly (clang, -O0):
<seq_ctrl_clear_song>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <seq_ctrl_set_record_mode@plt>
xor    %edi,%edi
call   1040 <seq_ctrl_set_run_lockout@plt>
xor    %edi,%edi
call   1060 <seq_ctrl_set_run_state@plt>
mov    $0x0,%al
call   1050 <song_clear@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_ctrl_clear_song>:
push   %rax
xor    %edi,%edi
call   1030 <seq_ctrl_set_record_mode@plt>
xor    %edi,%edi
call   1040 <seq_ctrl_set_run_lockout@plt>
xor    %edi,%edi
call   1060 <seq_ctrl_set_run_state@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <song_clear@plt>

LLVM IR (-O0):
define void @seq_ctrl_clear_song() {
%1 = call i32 @seq_ctrl_set_record_mode(i32 0)
%2 = call i32 @seq_ctrl_set_run_lockout(i32 0)
%3 = call i32 @seq_ctrl_set_run_state(i32 0)
%4 = call i32 (...) @song_clear()
ret void
}

LLVM IR (-O2):
define void @seq_ctrl_clear_song() {
%1 = tail call i32 @seq_ctrl_set_record_mode(i32 0)
%2 = tail call i32 @seq_ctrl_set_run_lockout(i32 0)
%3 = tail call i32 @seq_ctrl_set_run_state(i32 0)
%4 = tail call i32 (...) @song_clear()
ret void
}
int numbersCmp(const void *a, const void *b) {
  const int pa = *(const int *)a;
  const int pb = *(const int *)b;
  return (pa - pb);
}


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

x86 assembly (clang, -O2):
<numbersCmp>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

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

LLVM IR (-O2):
define i32 @numbersCmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
struct unw_frame_info {
  int dummy;
};

/* Variables and functions */
int unw_access_ar(struct unw_frame_info *, int, unsigned long *, int);
int unw_set_ar(struct unw_frame_info *i, int n, unsigned long v) {
  return unw_access_ar(i, n, &v, 1);
}


x86 assembly (clang, -O0):
<unw_set_ar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x18(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <unw_access_ar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unw_set_ar>:
push   %rax
mov    %rdx,(%rsp)
mov    %rsp,%rdx
mov    $0x1,%ecx
call   1030 <unw_access_ar@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.unw_frame_info = type { i32 }
define i32 @unw_set_ar(%struct.unw_frame_info* %0, i32 %1, i64 %2) {
%4 = alloca %struct.unw_frame_info*
%5 = alloca i32
%6 = alloca i64
store %struct.unw_frame_info* %0, %struct.unw_frame_info** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%7 = load %struct.unw_frame_info*, %struct.unw_frame_info** %4
%8 = load i32, i32* %5
%9 = call i32 @unw_access_ar(%struct.unw_frame_info* %7, i32 %8, i64* %6, i32 1)
ret i32 %9
}

LLVM IR (-O2):
%struct.unw_frame_info = type { i32 }
define i32 @unw_set_ar(%struct.unw_frame_info* %0, i32 %1, i64 %2) {
%4 = alloca i64
store i64 %2, i64* %4
%5 = call i32 @unw_access_ar(%struct.unw_frame_info* %0, i32 %1, i64* %4, i32 1)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;
typedef int __u32;

/* Variables and functions */
void gtx_out8(volatile __u8 *mmioaddr, __u32 reg, __u8 value) {
  *((volatile __u8 *)(mmioaddr + reg)) = value;
}


x86 assembly (clang, -O0):
<gtx_out8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtx_out8>:
movslq %esi,%rax
mov    %edx,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @gtx_out8(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* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
store volatile i32 %7, i32* %11
ret void
}

LLVM IR (-O2):
define void @gtx_out8(i32* %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store volatile i32 %2, i32* %5
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR3B_set(void) { return U_WMRCORENONE_set("U_WMR3B"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR3B\00"
define i8* @U_WMR3B_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
int HelpItem157(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem157() {
ret i32 0
}
main() {
  void show(float[], int);
  float rates[] = {6.5, 8.2, 8.5, 8.3, 8.6, 9.4, 9.6, 9.8, 10.0};
  show(rates, 9);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0x9,%esi
call   1030 <show@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xf06(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xeeb(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x9,%esi
call   1030 <show@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.rates = [9 x float] [float 6.500000e+00, float 0x4020666660000000, float 8.500000e+00, float 0x40209999A0000000, float 0x4021333340000000, float 0x4022CCCCC0000000, float 0x4023333340000000, float 0x40239999A0000000, float 1.000000e+01]
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x float]
store i32 0, i32* %1
%3 = bitcast [9 x float]* %2 to i8*
%4 = getelementptr inbounds [9 x float], [9 x float]* %2, i64 0, i64 0
ret i32 0
}

LLVM IR (-O2):
@__const.main.rates = [9 x float] [float 6.500000e+00, float 0x4020666660000000, float 8.500000e+00, float 0x40209999A0000000, float 0x4021333340000000, float 0x4022CCCCC0000000, float 0x4023333340000000, float 0x40239999A0000000, float 1.000000e+01]
define i32 @main() {
%1 = alloca [9 x float]
%2 = bitcast [9 x float]* %1 to i8*
%3 = getelementptr inbounds [9 x float], [9 x float]* %1, i64 0, i64 0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
void setAlarm(int N) { alarm(N); }


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

x86 assembly (clang, -O2):
<setAlarm>:
jmp    1030 <alarm@plt>

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

LLVM IR (-O2):
define void @setAlarm(i32 %0) {
%2 = tail call i32 @alarm(i32 %0)
ret void
}
/* Type definitions */
struct snd_kcontrol {
  int dummy;
};

/* Variables and functions */
int _snd_ctl_add_follower(struct snd_kcontrol *, struct snd_kcontrol *, int);
int snd_ctl_add_follower_uncached(struct snd_kcontrol *master,
                                  struct snd_kcontrol *follower) {
  return _snd_ctl_add_follower(master, follower, (1 << 0));
}


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

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

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

LLVM IR (-O2):
%struct.snd_kcontrol = type { i32 }
define i32 @snd_ctl_add_follower_uncached(%struct.snd_kcontrol* %0, %struct.snd_kcontrol* %1) {
%3 = tail call i32 @_snd_ctl_add_follower(%struct.snd_kcontrol* %0, %struct.snd_kcontrol* %1, i32 1)
ret i32 %3
}
void RTStrNICmp(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrNICmp() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint8_t u32_b3(uint32_t value) { return (uint8_t)((value & 0xFF000000) >> 24); }


x86 assembly (clang, -O0):
<u32_b3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff000000,%eax
shr    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<u32_b3>:
mov    %edi,%eax
shr    $0x18,%eax
ret

LLVM IR (-O0):
define i32 @u32_b3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -16777216
%5 = lshr i32 %4, 24
ret i32 %5
}

LLVM IR (-O2):
define i32 @u32_b3(i32 %0) {
%2 = lshr i32 %0, 24
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *ttyname(int fd) {
  static char buf[100];
  sprintf(buf, "/fd/%d", fd);
  return buf;
}


x86 assembly (clang, -O0):
<ttyname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0x2f1b(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f08(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ttyname>:
push   %rbx
mov    %edi,%edx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@ttyname.buf = internal global [100 x i8] zeroinitializer
@.str = [7 x i8] c"/fd/%d\00"
define i8* @ttyname(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @ttyname.buf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @ttyname.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@ttyname.buf = internal global [100 x i8] zeroinitializer
@.str = [7 x i8] c"/fd/%d\00"
define i8* @ttyname(i32 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @ttyname.buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @ttyname.buf, i64 0, i64 0)
}
void good_const(const int *p) {
  __builtin_prefetch(p, 0, 0);
  __builtin_prefetch(p, 0, 1);
  __builtin_prefetch(p, 0, 2);
  __builtin_prefetch(p, 0, 3);
  __builtin_prefetch(p, 1, 0);
  __builtin_prefetch(p, 1, 1);
  __builtin_prefetch(p, 1, 1);
  __builtin_prefetch(p, 1, 3);
}


x86 assembly (clang, -O0):
<good_const>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
prefetchnta (%rax)
mov    -0x8(%rbp),%rax
prefetcht2 (%rax)
mov    -0x8(%rbp),%rax
prefetcht1 (%rax)
mov    -0x8(%rbp),%rax
prefetcht0 (%rax)
mov    -0x8(%rbp),%rax
prefetchnta (%rax)
mov    -0x8(%rbp),%rax
prefetcht2 (%rax)
mov    -0x8(%rbp),%rax
prefetcht2 (%rax)
mov    -0x8(%rbp),%rax
prefetcht0 (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<good_const>:
prefetchnta (%rdi)
prefetcht2 (%rdi)
prefetcht1 (%rdi)
prefetcht0 (%rdi)
prefetchnta (%rdi)
prefetcht2 (%rdi)
prefetcht2 (%rdi)
prefetcht0 (%rdi)
ret

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

LLVM IR (-O2):
define void @good_const(i32* nocapture %0) {
%2 = bitcast i32* %0 to i8*
tail call void @llvm.prefetch.p0i8(i8* %2, i32 0, i32 0, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 0, i32 1, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 0, i32 2, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 0, i32 3, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 0, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 1, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 1, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 3, i32 1)
ret void
}
/* Variables and functions */
scalar_t__ isempty(char const *);
const char *strdash_if_empty(const char *str) {
  return isempty(str) ? "-" : str;
}


x86 assembly (clang, -O0):
<strdash_if_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <isempty@plt>
cmp    $0x0,%rax
je     113f <strdash_if_empty+0x2f>
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1147 <strdash_if_empty+0x37>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdash_if_empty>:
push   %rbx
mov    %rdi,%rbx
call   1030 <isempty@plt>
test   %rax,%rax
lea    0xedd(%rip),%rax
cmove  %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"-\00"
define i8* @strdash_if_empty(i8* %0) {
%2 = tail call i64 @isempty(i8* %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ ResetTachoCount(unsigned char);
void ResetBlockTachoCount(unsigned char Outputs) { ResetTachoCount(Outputs); }


x86 assembly (clang, -O0):
<ResetBlockTachoCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <ResetTachoCount@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ResetBlockTachoCount>:
jmp    1030 <ResetTachoCount@plt>

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

LLVM IR (-O2):
define void @ResetBlockTachoCount(i8 zeroext %0) {
%2 = tail call i32 @ResetTachoCount(i8 zeroext %0)
ret void
}
/* Variables and functions */
int atoi(char *);
int fib(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int n = atoi(argv[1]);
  int res = fib(n);
  printf("%d \n", res);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <fib@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1040 <fib@plt>
lea    0xeb8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @atoi(i8* %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = call i32 @fib(i32 %11)
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d \0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @fib(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
int setdirectory_null(const char *filename, const char *newdir) {
  (void)(filename);
  (void)(newdir);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @setdirectory_null(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
ret i32 0
}

LLVM IR (-O2):
define i32 @setdirectory_null(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int SQLITE_CANTOPEN;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
char *sqlite3_sourceid();
int /*<<< orphan*/ stderr;
int sqlite3CantopenError(int lineno) {
  fprintf(stderr, "myvfs.c: cannot open file at line %d of [%.10s]", lineno,
          20 + sqlite3_sourceid());
  return SQLITE_CANTOPEN;
}


x86 assembly (clang, -O0):
<sqlite3CantopenError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <sqlite3_sourceid@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    %rax,%rcx
add    $0x14,%rcx
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlite3CantopenError>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2eac(%rip),%rax
mov    (%rax),%ebp
xor    %eax,%eax
call   1030 <sqlite3_sourceid@plt>
lea    0x14(%rax),%rcx
lea    0xec0(%rip),%rsi
mov    %ebp,%edi
mov    %ebx,%edx
call   1040 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [48 x i8] c"myvfs.c: cannot open file at line %d of [%.10s]\00"
@SQLITE_CANTOPEN = global i32 0
define i32 @sqlite3CantopenError(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i8* (...) @sqlite3_sourceid()
%6 = getelementptr inbounds i8, i8* %5, i64 20
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %4, i8* %6)
%8 = load i32, i32* @SQLITE_CANTOPEN
ret i32 %8
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [48 x i8] c"myvfs.c: cannot open file at line %d of [%.10s]\00"
@SQLITE_CANTOPEN = global i32 0
define i32 @sqlite3CantopenError(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* (...) @sqlite3_sourceid()
%4 = getelementptr inbounds i8, i8* %3, i64 20
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %4)
%6 = load i32, i32* @SQLITE_CANTOPEN
ret i32 %6
}
void cmdShowAutoPvcTbl(int cmdType, struct cmd_arg *pCmdArg) {}


x86 assembly (clang, -O0):
<cmdShowAutoPvcTbl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.cmd_arg = type opaque
define void @cmdShowAutoPvcTbl(i32 %0, %struct.cmd_arg* %1) {
%3 = alloca i32
%4 = alloca %struct.cmd_arg*
store i32 %0, i32* %3
store %struct.cmd_arg* %1, %struct.cmd_arg** %4
ret void
}

LLVM IR (-O2):
%struct.cmd_arg = type opaque
define void @cmdShowAutoPvcTbl(i32 %0, %struct.cmd_arg* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint_fast32_t;
struct stat {
  int /*<<< orphan*/ st_size;
};

/* Variables and functions */
int /*<<< orphan*/ fstat(int, struct stat *);
uint_fast32_t file_size(int fd) {
  struct stat f_stat;
  fstat(fd, &f_stat);
  return f_stat.st_size;
}


x86 assembly (clang, -O0):
<file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1030 <fstat@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_size>:
push   %rax
mov    %rsp,%rsi
call   1030 <fstat@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @file_size(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.stat
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @fstat(i32 %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_size(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @fstat(i32 %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ n32016_reset_addr(int);
void copro_32016_reset() { n32016_reset_addr(0xF00000); }


x86 assembly (clang, -O0):
<copro_32016_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf00000,%edi
call   1030 <n32016_reset_addr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copro_32016_reset>:
mov    $0xf00000,%edi
jmp    1030 <n32016_reset_addr@plt>

LLVM IR (-O0):
define void @copro_32016_reset() {
%1 = call i32 @n32016_reset_addr(i32 15728640)
ret void
}

LLVM IR (-O2):
define void @copro_32016_reset() {
%1 = tail call i32 @n32016_reset_addr(i32 15728640)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void set_bit(uint32_t *reg, uint32_t bit_pos, int bit_val) {
  if (bit_val == 0) {
    *reg &= ~bit_pos;
  } else {
    *reg |= bit_pos;
  }
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    112b <set_bit+0x2b>
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
jmp    1136 <set_bit+0x36>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
test   %edx,%edx
je     1109 <set_bit+0x9>
or     (%rdi),%esi
mov    %esi,(%rdi)
ret
not    %esi
and    (%rdi),%esi
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_bit(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %5, label %9
5: ; preds = %3
%6 = xor i32 %1, -1
%7 = load i32, i32* %0
%8 = and i32 %7, %6
br label %12
9: ; preds = %3
%10 = load i32, i32* %0
%11 = or i32 %10, %1
br label %12
12: ; preds = %9, %5
%13 = phi i32 [ %11, %9 ], [ %8, %5 ]
store i32 %13, i32* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ pointer;

/* Variables and functions */
int /*<<< orphan*/ _mesa_hash_data(void const **, int);
uint32_t _mesa_hash_pointer(const void *pointer) {
  return _mesa_hash_data(&pointer, sizeof(pointer));
}


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

x86 assembly (clang, -O2):
<_mesa_hash_pointer>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
mov    $0x8,%esi
call   1030 <_mesa_hash_data@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_mesa_hash_pointer(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @_mesa_hash_data(i8** %2, i32 8)
ret i32 %3
}

LLVM IR (-O2):
define i32 @_mesa_hash_pointer(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @_mesa_hash_data(i8** %2, i32 8)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int arc, char **argv) { printf("Hello, world\n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%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>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world\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 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello, world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i;
  int w;
  i = __VERIFIER_nondet_int();
  w = 5;
  while (i != 0) {
    if (i < -w) {
      i = i - 1;
      i = i * (-1);
    } else {
      if (i > w) {
        i = i + 1;
        i = i * (-1);
      } else {
        i = 0;
      }
    }
  }
  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)
movl   $0x5,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1191 <main+0x81>
mov    -0x8(%rbp),%eax
xor    %ecx,%ecx
sub    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    115f <main+0x4f>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
imul   $0xffffffff,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    118c <main+0x7c>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1180 <main+0x70>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
imul   $0xffffffff,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1187 <main+0x77>
movl   $0x0,-0x8(%rbp)
jmp    118c <main+0x7c>
jmp    1130 <main+0x20>
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
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
store i32 5, i32* %3
br label %5
5: ; preds = %29, %0
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %30
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = sub nsw i32 0, %10
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = load i32, i32* %2
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = mul nsw i32 %16, -1
store i32 %17, i32* %2
br label %29
18: ; preds = %8
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %27
22: ; preds = %18
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
%25 = load i32, i32* %2
%26 = mul nsw i32 %25, -1
store i32 %26, i32* %2
br label %28
27: ; preds = %18
store i32 0, i32* %2
br label %28
28: ; preds = %27, %22
br label %29
29: ; preds = %28, %13
br label %5
30: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ closeobj();
void closeo_() { closeobj(); }


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

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

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

LLVM IR (-O2):
define void @closeo_() {
%1 = tail call i32 (...) @closeobj()
ret void
}
/* Type definitions */
struct CMD {
  int dummy;
};

/* Variables and functions */
int changer_de_chemin_courant(char *);
int /*<<< orphan*/ perreur(char *);
int /*<<< orphan*/ scanf(char *, char *);
void cd(struct CMD *c) {
  char arg[300];
  scanf("%s", arg);
  if (changer_de_chemin_courant(arg) == -1)
    perreur(arg);
}


x86 assembly (clang, -O0):
<cd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x140(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x140(%rbp),%rdi
call   1030 <changer_de_chemin_courant@plt>
cmp    $0xffffffff,%eax
jne    1173 <cd+0x43>
lea    -0x140(%rbp),%rdi
call   1050 <perreur@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cd>:
push   %rbx
sub    $0x130,%rsp
lea    0xec1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <changer_de_chemin_courant@plt>
cmp    $0xffffffff,%eax
jne    115f <cd+0x2f>
mov    %rsp,%rdi
call   1050 <perreur@plt>
add    $0x130,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.CMD = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @cd(%struct.CMD* %0) {
%2 = alloca %struct.CMD*
%3 = alloca [300 x i8]
store %struct.CMD* %0, %struct.CMD** %2
%4 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%7 = call i32 @changer_de_chemin_courant(i8* %6)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%11 = call i32 @perreur(i8* %10)
br label %12
12: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
%struct.CMD = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @cd(%struct.CMD* nocapture readnone %0) {
%2 = alloca [300 x i8]
%3 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @changer_de_chemin_courant(i8* %3)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @perreur(i8* %3)
br label %9
9: ; preds = %7, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sigabrt_hdlr(int x) { printf("Got aborted\n"); }


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Got aborted\00"
define void @sigabrt_hdlr(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Exit(char *, int);
void SigPipe(int dummy) {
  Exit("got SIGPIPE, it seems our remote data socket dissapered.\n", 103);
}


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

x86 assembly (clang, -O2):
<SigPipe>:
lea    0xee9(%rip),%rdi
mov    $0x67,%esi
jmp    1030 <Exit@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"got SIGPIPE, it seems our remote data socket dissapered.\0A\00"
define void @SigPipe(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @Exit(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i32 103)
ret void
}

LLVM IR (-O2):
@.str = [58 x i8] c"got SIGPIPE, it seems our remote data socket dissapered.\0A\00"
define void @SigPipe(i32 %0) {
%2 = tail call i32 @Exit(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i32 103)
ret void
}
/* Variables and functions */
void *rad50(char *, char **);
void rad50x2(char *cp, unsigned *rp) {
  *rp++ = rad50(cp, &cp);
  *rp = 0;
  if (*cp)
    *rp = rad50(cp, &cp);
}


x86 assembly (clang, -O0):
<rad50x2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <rad50@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     116c <rad50x2+0x5c>
mov    -0x8(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <rad50@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rad50x2>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,0x8(%rsp)
lea    0x8(%rsp),%rsi
call   1030 <rad50@plt>
mov    %eax,(%rbx)
movl   $0x0,0x4(%rbx)
mov    0x8(%rsp),%rdi
cmpb   $0x0,(%rdi)
je     1147 <rad50x2+0x37>
lea    0x8(%rsp),%rsi
call   1030 <rad50@plt>
mov    %eax,0x4(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @rad50x2(i8* %0, i32* nocapture writeonly %1) {
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i8* @rad50(i8* %0, i8** %3)
%5 = ptrtoint i8* %4 to i64
%6 = trunc i64 %5 to i32
%7 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %6, i32* %1
store i32 0, i32* %7
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = call i8* @rad50(i8* %8, i8** %3)
%13 = ptrtoint i8* %12 to i64
%14 = trunc i64 %13 to i32
store i32 %14, i32* %7
br label %15
15: ; preds = %11, %2
ret void
}
int compare_int(const void *i1, const void *i2) {
  int a, b;
  a = (long)i1;
  b = (long)i2;
  return (a > b) - (a < b);
}


x86 assembly (clang, -O0):
<compare_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x14(%rbp),%ecx
cmp    -0x18(%rbp),%ecx
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_int>:
xor    %eax,%eax
xor    %ecx,%ecx
cmp    %esi,%edi
setg   %al
setl   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_int(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = ptrtoint i8* %7 to i64
%9 = trunc i64 %8 to i32
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = ptrtoint i8* %10 to i64
%12 = trunc i64 %11 to i32
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = icmp sgt i32 %13, %14
%16 = zext i1 %15 to i32
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = icmp slt i32 %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @compare_int(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint i8* %1 to i64
%6 = trunc i64 %5 to i32
%7 = icmp sgt i32 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp slt i32 %4, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ SoftDlgProc();
long GPU_configure(void) {
  SoftDlgProc();
  return 0;
}


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

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

LLVM IR (-O0):
define i64 @GPU_configure() {
%1 = call i32 (...) @SoftDlgProc()
ret i64 0
}

LLVM IR (-O2):
define i64 @GPU_configure() {
%1 = tail call i32 (...) @SoftDlgProc()
ret i64 0
}
void init_canvas(int start, int end, char *canvas, char value) {
  int i;
  for (i = start; i < end; i++) {
    canvas[i] = value;
  }
}


x86 assembly (clang, -O0):
<init_canvas>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1141 <init_canvas+0x41>
mov    -0x11(%rbp),%dl
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1119 <init_canvas+0x19>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_canvas>:
cmp    %esi,%edi
jge    1137 <init_canvas+0x27>
push   %rax
mov    %edi,%eax
movslq %edi,%rdi
add    %rdi,%rdx
not    %eax
add    %esi,%eax
add    $0x1,%rax
movzbl %cl,%esi
mov    %rdx,%rdi
mov    %rax,%rdx
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @init_canvas(i32 %0, i32 %1, i8* nocapture writeonly %2, i8 signext %3) {
%5 = icmp slt i32 %0, %1
br i1 %5, label %6, label %13
6: ; preds = %4
%7 = sext i32 %0 to i64
%8 = getelementptr i8, i8* %2, i64 %7
%9 = xor i32 %0, -1
%10 = add i32 %9, %1
%11 = zext i32 %10 to i64
%12 = add nuw nsw i64 %11, 1
br label %13
13: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("USAGE: lru2aysis controlfile\n"); }


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"USAGE: lru2aysis controlfile\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [29 x i8] c"USAGE: lru2aysis controlfile\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct vnic_intr {
  int dummy;
};

/* Variables and functions */
unsigned int fnic_intr_credits(struct vnic_intr *);
int /*<<< orphan*/ fnic_intr_return_credits(struct vnic_intr *, unsigned int,
                                            int, int);
void fnic_intr_return_all_credits(struct vnic_intr *intr) {
  unsigned int credits = fnic_intr_credits(intr);
  int unmask = 1;
  int reset_timer = 1;
  fnic_intr_return_credits(intr, credits, unmask, reset_timer);
}


x86 assembly (clang, -O0):
<fnic_intr_return_all_credits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fnic_intr_credits@plt>
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <fnic_intr_return_credits@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnic_intr_return_all_credits>:
push   %rbx
mov    %rdi,%rbx
call   1040 <fnic_intr_credits@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
pop    %rbx
jmp    1030 <fnic_intr_return_credits@plt>

LLVM IR (-O0):
%struct.vnic_intr = type { i32 }
define void @fnic_intr_return_all_credits(%struct.vnic_intr* %0) {
%2 = alloca %struct.vnic_intr*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store %struct.vnic_intr* %0, %struct.vnic_intr** %2
%6 = load %struct.vnic_intr*, %struct.vnic_intr** %2
%7 = call i32 @fnic_intr_credits(%struct.vnic_intr* %6)
store i32 %7, i32* %3
store i32 1, i32* %4
store i32 1, i32* %5
%8 = load %struct.vnic_intr*, %struct.vnic_intr** %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @fnic_intr_return_credits(%struct.vnic_intr* %8, i32 %9, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.vnic_intr = type { i32 }
define void @fnic_intr_return_all_credits(%struct.vnic_intr* %0) {
%2 = tail call i32 @fnic_intr_credits(%struct.vnic_intr* %0)
%3 = tail call i32 @fnic_intr_return_credits(%struct.vnic_intr* %0, i32 %2, i32 1, i32 1)
ret void
}