xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: number [-l] [# ...]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"usage: number [-l] [# ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"usage: number [-l] [# ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef scalar_t__ uint64_t;
struct sysinfo {
  scalar_t__ totalram;
};

/* Variables and functions */
int /*<<< orphan*/ sysinfo(struct sysinfo *);
uint64_t get_total_ram() {
  static uint64_t total = 0;
  if (total == 0) {
    struct sysinfo si;
    sysinfo(&si);
    total = si.totalram;
  }
  return total;
}


x86 assembly (clang, -O0):
<get_total_ram>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpq   $0x0,0x2f10(%rip)
jne    113a <get_total_ram+0x2a>
lea    -0x8(%rbp),%rdi
call   1030 <sysinfo@plt>
mov    -0x8(%rbp),%rax
mov    %rax,0x2ef6(%rip)
mov    0x2eef(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_total_ram>:
push   %rax
mov    0x2f18(%rip),%rax
test   %rax,%rax
je     111f <get_total_ram+0xf>
pop    %rcx
ret
mov    %rsp,%rdi
call   1030 <sysinfo@plt>
mov    (%rsp),%rax
mov    %rax,0x2efe(%rip)
pop    %rcx
ret

LLVM IR (-O0):
%struct.sysinfo = type { i64 }
@get_total_ram.total = internal global i64 0
define i64 @get_total_ram() {
%1 = alloca %struct.sysinfo
%2 = load i64, i64* @get_total_ram.total
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = call i32 @sysinfo(%struct.sysinfo* %1)
%6 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %1, i32 0, i32 0
%7 = load i64, i64* %6
store i64 %7, i64* @get_total_ram.total
br label %8
8: ; preds = %4, %0
%9 = load i64, i64* @get_total_ram.total
ret i64 %9
}

LLVM IR (-O2):
%struct.sysinfo = type { i64 }
@get_total_ram.total = internal unnamed_addr global i64 0
define i64 @get_total_ram() {
%1 = alloca %struct.sysinfo
%2 = load i64, i64* @get_total_ram.total
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = bitcast %struct.sysinfo* %1 to i8*
%6 = call i32 @sysinfo(%struct.sysinfo* %1)
%7 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %1, i64 0, i32 0
%8 = load i64, i64* %7
store i64 %8, i64* @get_total_ram.total
br label %9
9: ; preds = %4, %0
%10 = phi i64 [ %8, %4 ], [ %2, %0 ]
ret i64 %10
}
float lab_f_inv(const float x) {
  const float epsilon = 0.20689655172413796;
  const float kappa = 24389.0f / 27.0f;
  if (x > epsilon)
    return x * x * x;
  else
    return (116.0f * x - 16.0f) / kappa;
}


x86 assembly (clang, -O0):
<lab_f_inv>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  0xeef(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xee6(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xed0(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1152 <lab_f_inv+0x52>
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1180 <lab_f_inv+0x80>
movss  -0x8(%rbp),%xmm0
movss  0xea9(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xea1(%rip),%xmm1
addss  %xmm1,%xmm0
movss  0xe8d(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<lab_f_inv>:
ucomiss 0xef9(%rip),%xmm0
jbe    1118 <lab_f_inv+0x18>
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret
mulss  0xee4(%rip),%xmm0
addss  0xee0(%rip),%xmm0
divss  0xedc(%rip),%xmm0
ret

LLVM IR (-O0):
define float @lab_f_inv(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float 0x3FCA7B9620000000, float* %4
store float 0x408C3A5EE0000000, float* %5
%6 = load float, float* %3
%7 = fcmp ogt float %6, 0x3FCA7B9620000000
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load float, float* %3
%10 = load float, float* %3
%11 = fmul float %9, %10
%12 = load float, float* %3
%13 = fmul float %11, %12
store float %13, float* %2
br label %18
14: ; preds = %1
%15 = load float, float* %3
%16 = call float @llvm.fmuladd.f32(float 1.160000e+02, float %15, float -1.600000e+01)
%17 = fdiv float %16, 0x408C3A5EE0000000
store float %17, float* %2
br label %18
18: ; preds = %14, %8
%19 = load float, float* %2
ret float %19
}

LLVM IR (-O2):
define float @lab_f_inv(float %0) {
%2 = fcmp ogt float %0, 0x3FCA7B9620000000
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = fmul float %0, %0
%5 = fmul float %4, %0
br label %9
6: ; preds = %1
%7 = tail call float @llvm.fmuladd.f32(float %0, float 1.160000e+02, float -1.600000e+01)
%8 = fdiv float %7, 0x408C3A5EE0000000
br label %9
9: ; preds = %6, %3
%10 = phi float [ %5, %3 ], [ %8, %6 ]
ret float %10
}
int test_imm_2Cint64_lowword_mem(long long *val) {
  return ((*val) & (0x2C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_2Cint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 44
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct color_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ set_color(struct color_state *, double, double, double);
void set_white(struct color_state *cstate) { set_color(cstate, 0.9, 0.9, 0.9); }


x86 assembly (clang, -O0):
<set_white>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
movsd  0xed8(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <set_color@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_white>:
movsd  0xee8(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
jmp    1030 <set_color@plt>

LLVM IR (-O0):
%struct.color_state = type { i32 }
define void @set_white(%struct.color_state* %0) {
%2 = alloca %struct.color_state*
store %struct.color_state* %0, %struct.color_state** %2
%3 = load %struct.color_state*, %struct.color_state** %2
%4 = call i32 @set_color(%struct.color_state* %3, double 9.000000e-01, double 9.000000e-01, double 9.000000e-01)
ret void
}

LLVM IR (-O2):
%struct.color_state = type { i32 }
define void @set_white(%struct.color_state* %0) {
%2 = tail call i32 @set_color(%struct.color_state* %0, double 9.000000e-01, double 9.000000e-01, double 9.000000e-01)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, char const *);
void emit(const char *fn, int n) {
  printf(" lua_dobuffer(L,(const char*)B%d,sizeof(B%d),\"%s\");\n", n, n, fn);
}


x86 assembly (clang, -O0):
<emit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rcx
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    %esi,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [53 x i8] c" lua_dobuffer(L,(const char*)B%d,sizeof(B%d),\22%s\22);\0A\00"
define void @emit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %4
%7 = load i8*, i8** %3
%8 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c" lua_dobuffer(L,(const char*)B%d,sizeof(B%d),\22%s\22);\0A\00"
define void @emit(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %1, i8* %0)
ret void
}
void av_opt_set_double() {}


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

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

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

LLVM IR (-O2):
define void @av_opt_set_double() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("AA = %d\n", 123);
  printf("BB = %d\n", 321 * 10);
  printf("CC = %d\n", 321);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x7b,%esi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0xc8a,%esi
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0x141,%esi
call   1030 <printf@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"AA = %d\0A\00"
@.str.1 = [9 x i8] c"BB = %d\0A\00"
@.str.2 = [9 x i8] c"CC = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 123)
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 3210)
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 321)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}

LLVM IR (-O2):
@.str = [9 x i8] c"AA = %d\0A\00"
@.str.1 = [9 x i8] c"BB = %d\0A\00"
@.str.2 = [9 x i8] c"CC = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 123)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 3210)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 321)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
void foo183(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo183(i32 %0) {
ret void
}
/* Type definitions */
struct menu {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ do_exit();
void handle_f9(int *key, struct menu *current_item) {
  do_exit();
  return;
}


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

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

LLVM IR (-O0):
%struct.menu = type { i32 }
define void @handle_f9(i32* %0, %struct.menu* %1) {
%3 = alloca i32*
%4 = alloca %struct.menu*
store i32* %0, i32** %3
store %struct.menu* %1, %struct.menu** %4
%5 = call i32 (...) @do_exit()
ret void
}

LLVM IR (-O2):
%struct.menu = type { i32 }
define void @handle_f9(i32* nocapture readnone %0, %struct.menu* nocapture readnone %1) {
%3 = tail call i32 (...) @do_exit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ find_track(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int main() {
  char search_for[80];
  printf("Search for: ");
  fgets(search_for, 80, stdin);
  find_track(search_for);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    0x2e92(%rip),%rax
mov    (%rax),%edx
mov    $0x50,%esi
call   1050 <fgets@plt>
lea    -0x60(%rbp),%rdi
call   1030 <find_track@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1030 <find_track@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Search for: \00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 80, i32 %5)
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%8 = call i32 @find_track(i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Search for: \00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %2, i32 80, i32 %4)
%6 = call i32 @find_track(i8* %2)
ret i32 0
}
/* Type definitions */
struct link_map {
  scalar_t__ l_addr;
};

/* Variables and functions */
int /*<<< orphan*/ RTLD_NOW;
scalar_t__ dlopen(char *, int /*<<< orphan*/);
void *find_lib_base(char *lib) {
  struct link_map *lm = (struct link_map *)dlopen(lib, RTLD_NOW);
  return (void *)lm->l_addr;
}


x86 assembly (clang, -O0):
<find_lib_base>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <dlopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_lib_base>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
call   1030 <dlopen@plt>
mov    (%rax),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.link_map = type { i64 }
@RTLD_NOW = global i32 0
define i8* @find_lib_base(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.link_map*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @RTLD_NOW
%6 = call i64 @dlopen(i8* %4, i32 %5)
%7 = inttoptr i64 %6 to %struct.link_map*
store %struct.link_map* %7, %struct.link_map** %3
%8 = load %struct.link_map*, %struct.link_map** %3
%9 = getelementptr inbounds %struct.link_map, %struct.link_map* %8, i32 0, i32 0
%10 = load i64, i64* %9
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
%struct.link_map = type { i64 }
@RTLD_NOW = global i32 0
define i8* @find_lib_base(i8* %0) {
%2 = load i32, i32* @RTLD_NOW
%3 = tail call i64 @dlopen(i8* %0, i32 %2)
%4 = inttoptr i64 %3 to %struct.link_map*
%5 = getelementptr inbounds %struct.link_map, %struct.link_map* %4, i64 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ arm_memio_immdh_op();
int /*<<< orphan*/ arm_memio_strd(int /*<<< orphan*/);
void arm_strd_imm() { arm_memio_strd(arm_memio_immdh_op()); }


x86 assembly (clang, -O0):
<arm_strd_imm>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <arm_memio_immdh_op@plt>
mov    %eax,%edi
call   1040 <arm_memio_strd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arm_strd_imm>:
push   %rax
xor    %eax,%eax
call   1030 <arm_memio_immdh_op@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <arm_memio_strd@plt>

LLVM IR (-O0):
define void @arm_strd_imm() {
%1 = call i32 (...) @arm_memio_immdh_op()
%2 = call i32 @arm_memio_strd(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_strd_imm() {
%1 = tail call i32 (...) @arm_memio_immdh_op()
%2 = tail call i32 @arm_memio_strd(i32 %1)
ret void
}
void delay(int amount) {
  int i;
  for (i = 0; i < amount; i++) {
  }
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    112d <delay+0x2d>
jmp    111f <delay+0x1f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <delay+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @delay(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *, double *);
void scan_for_n(double *n_h, double *n_g) {
  printf("Enter value of n for h(x), then g(x): \n");
  scanf("%lf %lf", n_h, n_g);
}


x86 assembly (clang, -O0):
<scan_for_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xedd(%rip),%rdi
call   1040 <scanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_for_n>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <scanf@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Enter value of n for h(x), then g(x): \0A\00"
@.str.1 = [8 x i8] c"%lf %lf\00"
define void @scan_for_n(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%6 = load double*, double** %3
%7 = load double*, double** %4
%8 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %6, double* %7)
ret void
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"%lf %lf\00"
@str = [39 x i8] c"Enter value of n for h(x), then g(x): \00"
define void @scan_for_n(double* %0, double* %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %0, double* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *execname) {
  printf("Usage: %s <file> <-e regexp>\n", execname);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Usage: %s <file> <-e regexp>\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_SUCCESS
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [30 x i8] c"Usage: %s <file> <-e regexp>\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
intptr_t inso_dispname_cb(intptr_t result, intptr_t arg) {
  *(const char **)arg = (const char *)result;
  return 0;
}


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

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

LLVM IR (-O0):
define i64 @inso_dispname_cb(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = inttoptr i64 %5 to i8*
%7 = load i64, i64* %4
%8 = inttoptr i64 %7 to i8**
store i8* %6, i8** %8
ret i64 0
}

LLVM IR (-O2):
define i64 @inso_dispname_cb(i64 %0, i64 %1) {
%3 = inttoptr i64 %0 to i8*
%4 = inttoptr i64 %1 to i8**
store i8* %3, i8** %4
ret i64 0
}
void salfph(char *phrase) {
  extern void phrtsd(char *phrase, long *seed1, long *seed2);
  extern void setall(long iseed1, long iseed2);
  static long iseed1, iseed2;
  phrtsd(phrase, &iseed1, &iseed2);
  setall(iseed1, iseed2);
}


x86 assembly (clang, -O0):
<salfph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x2f01(%rip),%rsi
lea    0x2f02(%rip),%rdx
call   1030 <phrtsd@plt>
mov    0x2eee(%rip),%rdi
mov    0x2eef(%rip),%rsi
call   1040 <setall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<salfph>:
push   %rax
lea    0x2f10(%rip),%rsi
lea    0x2f11(%rip),%rdx
call   1030 <phrtsd@plt>
mov    0x2efd(%rip),%rdi
mov    0x2efe(%rip),%rsi
pop    %rax
jmp    1040 <setall@plt>

LLVM IR (-O0):
@salfph.iseed1 = internal global i64 0
@salfph.iseed2 = internal global i64 0
define void @salfph(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i64, i64* @salfph.iseed1
%5 = load i64, i64* @salfph.iseed2
ret void
}

LLVM IR (-O2):
@salfph.iseed1 = internal global i64 0
@salfph.iseed2 = internal global i64 0
define void @salfph(i8* %0) {
tail call void @phrtsd(i8* %0, i64* @salfph.iseed1, i64* @salfph.iseed2)
%2 = load i64, i64* @salfph.iseed1
%3 = load i64, i64* @salfph.iseed2
tail call void @setall(i64 %2, i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void help(char *name) {
  fprintf(stderr,
          "Usage: %s [-N] [-m maxK] [-k minK] [-d dump_filename] [-n "
          "num_threads] [filename]\n",
          name);
  fprintf(stderr, "\nDefault is to read from - (stdin).\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xf0c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rbx
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rbx
mov    (%rbx),%edi
lea    0xedc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf1f(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [83 x i8] c"Usage: %s [-N] [-m maxK] [-k minK] [-d dump_filename] [-n num_threads] [filename]\0A\00"
@.str.1 = [37 x i8] c"\0ADefault is to read from - (stdin).\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [83 x i8] c"Usage: %s [-N] [-m maxK] [-k minK] [-d dump_filename] [-n num_threads] [filename]\0A\00"
@.str.1 = [37 x i8] c"\0ADefault is to read from - (stdin).\0A\00"
define void @help(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int lim(int);
double soft(double v, double max, double min) {
  double dv = v - min;
  double dm = max - min;
  return (lim(2 * dv / dm - 1) + 1) / 2 * dm + min;
}


x86 assembly (clang, -O0):
<soft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xebb(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  0xea1(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <lim@plt>
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<soft>:
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
subsd  %xmm2,%xmm0
subsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rsp)
addsd  %xmm0,%xmm0
divsd  %xmm1,%xmm0
addsd  0xec8(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <lim@plt>
mov    %eax,%ecx
add    $0x1,%ecx
shr    $0x1f,%ecx
add    %ecx,%eax
add    $0x1,%eax
sar    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @soft(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %4
%10 = load double, double* %6
%11 = fsub double %9, %10
store double %11, double* %7
%12 = load double, double* %5
%13 = load double, double* %6
%14 = fsub double %12, %13
store double %14, double* %8
%15 = load double, double* %7
%16 = fmul double 2.000000e+00, %15
%17 = load double, double* %8
%18 = fdiv double %16, %17
%19 = fsub double %18, 1.000000e+00
%20 = fptosi double %19 to i32
%21 = call i32 @lim(i32 %20)
%22 = add nsw i32 %21, 1
%23 = sdiv i32 %22, 2
%24 = sitofp i32 %23 to double
%25 = load double, double* %8
%26 = load double, double* %6
%27 = call double @llvm.fmuladd.f64(double %24, double %25, double %26)
ret double %27
}

LLVM IR (-O2):
define double @soft(double %0, double %1, double %2) {
%4 = fsub double %0, %2
%5 = fsub double %1, %2
%6 = fmul double %4, 2.000000e+00
%7 = fdiv double %6, %5
%8 = fadd double %7, -1.000000e+00
%9 = fptosi double %8 to i32
%10 = tail call i32 @lim(i32 %9)
%11 = add nsw i32 %10, 1
%12 = sdiv i32 %11, 2
%13 = sitofp i32 %12 to double
%14 = tail call double @llvm.fmuladd.f64(double %13, double %5, double %2)
ret double %14
}
void dbg_printf(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @dbg_printf(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void sigusr1_handler(int signo) {
  printf("catch SIGUSR1\n");
  sleep(5);
  printf("back to main\n");
}


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

x86 assembly (clang, -O2):
<sigusr1_handler>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
lea    0xed0(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"catch SIGUSR1\0A\00"
@.str.1 = [14 x i8] c"back to main\0A\00"
define void @sigusr1_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @sleep(i32 5)
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"catch SIGUSR1\00"
@str.2 = [13 x i8] c"back to main\00"
define void @sigusr1_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @sleep(i32 5)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_version(void) {
  printf("libdeflate compression benchmark program v"
         "0.8"
         "\n"
         "Copyright 2016 Eric Biggers\n"
         "\n"
         "This program is free software which may be modified and/or "
         "redistributed\n"
         "under the terms of the MIT license.  There is NO WARRANTY, to the "
         "extent\n"
         "permitted by law.  See the COPYING file for details.\n");
}


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

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

LLVM IR (-O0):
@.str = [275 x i8] c"libdeflate compression benchmark program v0.8\0ACopyright 2016 Eric Biggers\0A\0AThis program is free software which may be modified and/or redistributed\0Aunder the terms of the MIT license. There is NO WARRANTY, to the extent\0Apermitted by law. See the COPYING file for details.\0A\00"
define void @show_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([275 x i8], [275 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [274 x i8] c"libdeflate compression benchmark program v0.8\0ACopyright 2016 Eric Biggers\0A\0AThis program is free software which may be modified and/or redistributed\0Aunder the terms of the MIT license. There is NO WARRANTY, to the extent\0Apermitted by law. See the COPYING file for details.\00"
define void @show_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([274 x i8], [274 x i8]* @str, i64 0, i64 0))
ret void
}
void ExttTemplateTypeAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttTemplateTypeAuxTable() {
ret void
}
void ADC_SAR_Seq_1_RestoreConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @ADC_SAR_Seq_1_RestoreConfig() {
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t piece_min32(int32_t a, int32_t b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<piece_min32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <piece_min32+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <piece_min32+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<piece_min32>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @piece_min32(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @piece_min32(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void putchars(char *start, int count) {
  for (int i = 0; i < count; i++) {
    char c = *(start + i);
    putchar(c);
  }
}


x86 assembly (clang, -O0):
<putchars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <putchars+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <putchars+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchars>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1143 <putchars+0x33>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <putchars+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @putchars(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = tail call i32 @putchar(i8 signext %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
void ASN1_template_d2i(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_template_d2i() {
ret void
}
void pathcon_nm4_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @pathcon_nm4_incref() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
void bar() {
  int i;
  int array[5];
  int array1[5];
  printf("%p\n", array);
  printf("%p\n", array1);
  for (i = 0; i < 5; i++) {
    array[i] = i;
  }
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x20(%rbp),%rsi
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1162 <bar+0x52>
mov    -0x4(%rbp),%ecx
movslq -0x4(%rbp),%rax
mov    %ecx,-0x20(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <bar+0x2f>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rbx
sub    $0x40,%rsp
lea    0xee4(%rip),%rbx
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%p\0A\00"
define void @bar() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca [5 x i32]
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %4)
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %6)
store i32 0, i32* %1
br label %8
8: ; preds = %16, %0
%9 = load i32, i32* %1
%10 = icmp slt i32 %9, 5
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = load i32, i32* %1
%13 = load i32, i32* %1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %14
store i32 %12, i32* %15
br label %16
16: ; preds = %11
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 1
store i32 %18, i32* %1
br label %8
19: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
define void @bar() {
%1 = alloca [5 x i32]
%2 = alloca [5 x i32]
%3 = bitcast [5 x i32]* %1 to i8*
%4 = bitcast [5 x i32]* %2 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %5)
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %7)
ret void
}
/* Variables and functions */
int strlen(char *);
long b64length(char *pre_decode_STRING) {
  int addition = 0;
  if (strlen(pre_decode_STRING) % 6 > 0)
    addition = 4;
  return (long)strlen(pre_decode_STRING) / 6 * 4 + addition + 1;
}


x86 assembly (clang, -O0):
<b64length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jle    1144 <b64length+0x34>
movl   $0x4,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cltq
mov    $0x6,%ecx
cqto
idiv   %rcx
shl    $0x2,%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
add    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b64length>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
xor    %ebx,%ebx
test   %eax,%eax
setg   %bl
shl    $0x2,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
cltq
lea    (%rbx,%rax,4),%rax
add    $0x1,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @b64length(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = srem i32 %5, 6
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 4, i32* %3
br label %9
9: ; preds = %8, %1
%10 = load i8*, i8** %2
%11 = call i32 @strlen(i8* %10)
%12 = sext i32 %11 to i64
%13 = sdiv i64 %12, 6
%14 = mul nsw i64 %13, 4
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = add nsw i64 %14, %16
%18 = add nsw i64 %17, 1
ret i64 %18
}

LLVM IR (-O2):
define i64 @b64length(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = srem i32 %2, 6
%4 = icmp sgt i32 %3, 0
%5 = select i1 %4, i64 4, i64 0
%6 = tail call i32 @strlen(i8* %0)
%7 = sdiv i32 %6, 6
%8 = sext i32 %7 to i64
%9 = shl nsw i64 %8, 2
%10 = add nsw i64 %9, %5
%11 = or i64 %10, 1
ret i64 %11
}
/* Type definitions */
struct stat {
  scalar_t__ st_mtime;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int file_tstamp(char *filename) {
  struct stat buf;
  if (stat(filename, &buf) == 0) {
    if (buf.st_mtime != 0)
      return buf.st_mtime;
  }
  return -1;
}


x86 assembly (clang, -O0):
<file_tstamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jne    114f <file_tstamp+0x3f>
cmpq   $0x0,-0x18(%rbp)
je     114a <file_tstamp+0x3a>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    1156 <file_tstamp+0x46>
jmp    114f <file_tstamp+0x3f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_tstamp>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%rcx
cmp    $0x1,%rcx
sbb    %edx,%edx
neg    %rax
sbb    %eax,%eax
or     %ecx,%eax
or     %edx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i64 }
define i32 @file_tstamp(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i64, i64* %6
%8 = icmp ne i64 %7, 0
%9 = select i1 %5, i1 %8, i1 false
%10 = trunc i64 %7 to i32
%11 = select i1 %9, i32 %10, i32 -1
ret i32 %11
}
/* Variables and functions */
int isprint(int);
bool invalidFunctionArgBool_isprint(bool b, int c) {
  (void)isprint(b);
  return isprint(c != 0);
}


x86 assembly (clang, -O0):
<invalidFunctionArgBool_isprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <isprint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invalidFunctionArgBool_isprint>:
xor    %edi,%edi
test   %esi,%esi
setne  %dil
jmp    1030 <isprint@plt>

LLVM IR (-O0):
define i32 @invalidFunctionArgBool_isprint(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @isprint(i32 %5)
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @isprint(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @invalidFunctionArgBool_isprint(i32 %0, i32 %1) {
%3 = icmp ne i32 %1, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @isprint(i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void __psi_freea(void *ptr, size_t count, size_t align) { free(ptr); }


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

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

LLVM IR (-O0):
define void @__psi_freea(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = call i32 @free(i8* %7)
ret void
}

LLVM IR (-O2):
define void @__psi_freea(i8* nocapture %0, i64 %1, i64 %2) {
%4 = tail call i32 @free(i8* %0)
ret void
}
void ub_io_account_cancel(struct address_space *mapping) {}


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

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

LLVM IR (-O0):
%struct.address_space = type opaque
define void @ub_io_account_cancel(%struct.address_space* %0) {
%2 = alloca %struct.address_space*
store %struct.address_space* %0, %struct.address_space** %2
ret void
}

LLVM IR (-O2):
%struct.address_space = type opaque
define void @ub_io_account_cancel(%struct.address_space* nocapture %0) {
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRAE_get(void) { return U_WMRCORENONE_get("U_WMRAE"); }


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

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

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

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