xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prog_name) {
  fprintf(stderr, "Usage: %s <Server IP> <Echo Word> [<Echo Port>]\n",
          prog_name);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [49 x i8] c"Usage: %s <Server IP> <Echo Word> [<Echo Port>]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [49 x i8] c"Usage: %s <Server IP> <Echo Word> [<Echo Port>]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
double exp(int /*<<< orphan*/);
int /*<<< orphan*/ norm_sample(double, double);
double lognorm_sample(double mu, double sigma) {
  return exp(norm_sample(mu, sigma));
}


x86 assembly (clang, -O0):
<lognorm_sample>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <norm_sample@plt>
mov    %eax,%edi
call   1040 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @lognorm_sample(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i32 @norm_sample(double %5, double %6)
%8 = call double @exp(i32 %7)
ret double %8
}

LLVM IR (-O2):
define double @lognorm_sample(double %0, double %1) {
%3 = tail call i32 @norm_sample(double %0, double %1)
%4 = tail call double @exp(i32 %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ usl_timer_tick();
void usl_sigalrm(int sig) { usl_timer_tick(); }


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

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

LLVM IR (-O0):
define void @usl_sigalrm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @usl_timer_tick()
ret void
}

LLVM IR (-O2):
define void @usl_sigalrm(i32 %0) {
%2 = tail call i32 (...) @usl_timer_tick()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x80() {
  Assert_real((isgraph(128) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              645, ("isgraph should be 0 for 0x80"));
}


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

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

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

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


x86 assembly (clang, -O0):
<terminate_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <terminate_socket_noacl@plt>
mov    $0x0,%al
call   1030 <compute_acl_limits@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @terminate_socket(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @terminate_socket_noacl(i32 %3)
%5 = call i32 (...) @compute_acl_limits()
ret void
}

LLVM IR (-O2):
define void @terminate_socket(i32 %0) {
%2 = tail call i32 @terminate_socket_noacl(i32 %0)
%3 = tail call i32 (...) @compute_acl_limits()
ret void
}
unsigned float_neg(unsigned uf) {
  if (((uf & 0x7f800000) == 0x7f800000) && ((uf & 0x007fffff) != 0))
    return uf;
  return uf ^ 0x80000000;
}


x86 assembly (clang, -O0):
<float_neg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x7f800000,%eax
cmp    $0x7f800000,%eax
jne    1136 <float_neg+0x36>
mov    -0x8(%rbp),%eax
and    $0x7fffff,%eax
cmp    $0x0,%eax
je     1136 <float_neg+0x36>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <float_neg+0x41>
mov    -0x8(%rbp),%eax
xor    $0x80000000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_neg>:
mov    %edi,%ecx
mov    %edi,%eax
xor    $0x80000000,%eax
test   $0x7fffff,%edi
cmove  %eax,%edi
not    %ecx
test   $0x7f800000,%ecx
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @float_neg(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 2139095040
%6 = icmp eq i32 %5, 2139095040
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = and i32 %8, 8388607
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = load i32, i32* %3
store i32 %12, i32* %2
br label %16
13: ; preds = %7, %1
%14 = load i32, i32* %3
%15 = xor i32 %14, -2147483648
store i32 %15, i32* %2
br label %16
16: ; preds = %13, %11
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @float_neg(i32 %0) {
%2 = and i32 %0, 2139095040
%3 = icmp ne i32 %2, 2139095040
%4 = and i32 %0, 8388607
%5 = icmp eq i32 %4, 0
%6 = or i1 %3, %5
%7 = xor i32 %0, -2147483648
%8 = select i1 %6, i32 %7, i32 %0
ret i32 %8
}
void gdk_selection_send_notify() {}


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

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

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

LLVM IR (-O2):
define void @gdk_selection_send_notify() {
ret void
}
float test_tanf(float x) { return __builtin_tanf(x); }


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

x86 assembly (clang, -O2):
<test_tanf>:
jmp    1030 <tanf@plt>

LLVM IR (-O0):
define float @test_tanf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @tanf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @test_tanf(float %0) {
%2 = tail call float @tanf(float %0)
ret float %2
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int pmh7_register_read(int /*<<< orphan*/);
int /*<<< orphan*/ pmh7_register_write(int /*<<< orphan*/, int);
void pmh7_register_clear_bit(uint16_t reg, uint8_t bit) {
  uint8_t val;
  val = pmh7_register_read(reg);
  pmh7_register_write(reg, val & ~(1 << bit));
}


x86 assembly (clang, -O0):
<pmh7_register_clear_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <pmh7_register_read@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
and    %eax,%esi
call   1030 <pmh7_register_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmh7_register_clear_bit>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <pmh7_register_read@plt>
btr    %ebx,%eax
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <pmh7_register_write@plt>

LLVM IR (-O0):
define void @pmh7_register_clear_bit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @pmh7_register_read(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %3
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = shl i32 1, %10
%12 = xor i32 %11, -1
%13 = and i32 %9, %12
%14 = call i32 @pmh7_register_write(i32 %8, i32 %13)
ret void
}

LLVM IR (-O2):
define void @pmh7_register_clear_bit(i32 %0, i32 %1) {
%3 = tail call i32 @pmh7_register_read(i32 %0)
%4 = shl nuw i32 1, %1
%5 = xor i32 %4, -1
%6 = and i32 %3, %5
%7 = tail call i32 @pmh7_register_write(i32 %0, i32 %6)
ret void
}
int f2i(float x) { return x + 0.5f; }


x86 assembly (clang, -O0):
<f2i>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2i>:
addss  0xef8(%rip),%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @f2i(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fadd float %3, 5.000000e-01
%5 = fptosi float %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @f2i(float %0) {
%2 = fadd float %0, 5.000000e-01
%3 = fptosi float %2 to i32
ret i32 %3
}
void debugfs_dma_buf_deinit(void) {}


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

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

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

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

/* Variables and functions */
pthread_t pthread_self(void) {
  pthread_t x = 0;
  return x;
}


x86 assembly (clang, -O0):
<pthread_self>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @pthread_self() {
ret i32 0
}
/* Variables and functions */
int __pthread_compare_and_swap(long *, long, long, int *);
int compare_and_swap(long *ptr, long oldval, long newval, int *spinlock) {
  return __pthread_compare_and_swap(ptr, oldval, newval, spinlock);
}


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

x86 assembly (clang, -O2):
<compare_and_swap>:
jmp    1030 <__pthread_compare_and_swap@plt>

LLVM IR (-O0):
define i32 @compare_and_swap(i64* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i64* %0, i64** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load i64*, i64** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32*, i32** %8
%13 = call i32 @__pthread_compare_and_swap(i64* %9, i64 %10, i64 %11, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @compare_and_swap(i64* %0, i64 %1, i64 %2, i32* %3) {
%5 = tail call i32 @__pthread_compare_and_swap(i64* %0, i64 %1, i64 %2, i32* %3)
ret i32 %5
}
void gdk_device_get_axis() {}


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

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

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

LLVM IR (-O2):
define void @gdk_device_get_axis() {
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

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


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

x86 assembly (clang, -O2):
<italian_UTF_8_close_env>:
xor    %esi,%esi
jmp    1030 <SN_close_env@plt>

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

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @italian_UTF_8_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void spaceballButtonCB(int button, int state) {
  printf("spaceballButtonCB: button %d, state %d\n", button, state);
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"spaceballButtonCB: button %d, state %d\0A\00"
define void @spaceballButtonCB(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 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"spaceballButtonCB: button %d, state %d\0A\00"
define void @spaceballButtonCB(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
void finn_vec3_mul_scalar(float *result, float *lhs, float scalar) {
  result[0] = lhs[0] * scalar;
  result[1] = lhs[1] * scalar;
  result[2] = lhs[2] * scalar;
}


x86 assembly (clang, -O0):
<finn_vec3_mul_scalar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<finn_vec3_mul_scalar>:
movss  (%rsi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
movss  0x4(%rsi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x4(%rdi)
mulss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @finn_vec3_mul_scalar(float* %0, float* %1, float %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float
store float* %0, float** %4
store float* %1, float** %5
store float %2, float* %6
%7 = load float*, float** %5
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float, float* %6
%11 = fmul float %9, %10
%12 = load float*, float** %4
%13 = getelementptr inbounds float, float* %12, i64 0
store float %11, float* %13
%14 = load float*, float** %5
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = load float, float* %6
%18 = fmul float %16, %17
%19 = load float*, float** %4
%20 = getelementptr inbounds float, float* %19, i64 1
store float %18, float* %20
%21 = load float*, float** %5
%22 = getelementptr inbounds float, float* %21, i64 2
%23 = load float, float* %22
%24 = load float, float* %6
%25 = fmul float %23, %24
%26 = load float*, float** %4
%27 = getelementptr inbounds float, float* %26, i64 2
store float %25, float* %27
ret void
}

LLVM IR (-O2):
define void @finn_vec3_mul_scalar(float* nocapture writeonly %0, float* nocapture %1, float %2) {
%4 = load float, float* %1
%5 = fmul float %4, %2
store float %5, float* %0
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = fmul float %7, %2
%9 = getelementptr inbounds float, float* %0, i64 1
store float %8, float* %9
%10 = getelementptr inbounds float, float* %1, i64 2
%11 = load float, float* %10
%12 = fmul float %11, %2
%13 = getelementptr inbounds float, float* %0, i64 2
store float %12, float* %13
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ FD_SET(int, int /*<<< orphan*/ *);
void add_fd(fd_set *fds, int *maxfd, int fd) {
  if (fd < 0)
    return;
  if (fd > *maxfd)
    *maxfd = fd;
  FD_SET(fd, fds);
}


x86 assembly (clang, -O0):
<add_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1132 <add_fd+0x22>
jmp    1156 <add_fd+0x46>
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    114a <add_fd+0x3a>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <FD_SET@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_fd>:
test   %edx,%edx
js     1127 <add_fd+0x17>
mov    %rdi,%rax
cmp    %edx,(%rsi)
jge    111d <add_fd+0xd>
mov    %edx,(%rsi)
mov    %edx,%edi
mov    %rax,%rsi
jmp    1030 <FD_SET@plt>
ret

LLVM IR (-O0):
define void @add_fd(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 slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %3
br label %22
10: ; preds = %3
%11 = load i32, i32* %6
%12 = load i32*, i32** %5
%13 = load i32, i32* %12
%14 = icmp sgt i32 %11, %13
br i1 %14, label %15, label %18
15: ; preds = %10
%16 = load i32, i32* %6
%17 = load i32*, i32** %5
store i32 %16, i32* %17
br label %18
18: ; preds = %15, %10
%19 = load i32, i32* %6
%20 = load i32*, i32** %4
%21 = call i32 @FD_SET(i32 %19, i32* %20)
br label %22
22: ; preds = %18, %9
ret void
}

LLVM IR (-O2):
define void @add_fd(i32* %0, i32* nocapture %1, i32 %2) {
%4 = icmp slt i32 %2, 0
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, %2
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 %2, i32* %1
br label %9
9: ; preds = %8, %5
%10 = tail call i32 @FD_SET(i32 %2, i32* %0)
br label %11
11: ; preds = %3, %9
ret void
}
/* Variables and functions */
unsigned long *malloc(unsigned long);
unsigned long p(unsigned long, unsigned long);
unsigned long *p_list(unsigned long n, unsigned long d) {
  unsigned long i;
  unsigned long *ret = malloc((n + 1) * sizeof(unsigned long));
  for (i = 0; i <= n; i++)
    ret[i] = p(i, d);
  return ret;
}


x86 assembly (clang, -O0):
<p_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
ja     1188 <p_list+0x68>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <p@plt>
mov    %rax,%rdx
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    114d <p_list+0x2d>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_list>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x8(,%rdi,8),%rdi
call   1040 <malloc@plt>
mov    %rax,%r12
xor    %ebx,%ebx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <p@plt>
mov    %rax,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %r15,%rbx
jbe    1140 <p_list+0x20>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64* @p_list(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64*
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = add i64 %7, 1
%9 = mul i64 %8, 8
%10 = call i64* @malloc(i64 %9)
store i64* %10, i64** %6
store i64 0, i64* %5
br label %11
11: ; preds = %22, %2
%12 = load i64, i64* %5
%13 = load i64, i64* %3
%14 = icmp ule i64 %12, %13
br i1 %14, label %15, label %25
15: ; preds = %11
%16 = load i64, i64* %5
%17 = load i64, i64* %4
%18 = call i64 @p(i64 %16, i64 %17)
%19 = load i64*, i64** %6
%20 = load i64, i64* %5
%21 = getelementptr inbounds i64, i64* %19, i64 %20
store i64 %18, i64* %21
br label %22
22: ; preds = %15
%23 = load i64, i64* %5
%24 = add i64 %23, 1
store i64 %24, i64* %5
br label %11
25: ; preds = %11
%26 = load i64*, i64** %6
ret i64* %26
}

LLVM IR (-O2):
define noalias i64* @p_list(i64 %0, i64 %1) {
%3 = shl i64 %0, 3
%4 = add i64 %3, 8
%5 = tail call i64* @malloc(i64 %4)
br label %6
6: ; preds = %2, %6
%7 = phi i64 [ 0, %2 ], [ %10, %6 ]
%8 = tail call i64 @p(i64 %7, i64 %1)
%9 = getelementptr inbounds i64, i64* %5, i64 %7
store i64 %8, i64* %9
%10 = add i64 %7, 1
%11 = icmp ugt i64 %10, %0
br i1 %11, label %12, label %6
12: ; preds = %6
ret i64* %5
}
int returnIntSum(int a, int *b) {
  static int static_local_array[1000];
  return a + *b;
}


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

x86 assembly (clang, -O2):
<returnIntSum>:
mov    %edi,%eax
add    (%rsi),%eax
ret

LLVM IR (-O0):
@returnIntSum.static_local_array = internal global [1000 x i32] zeroinitializer
define i32 @returnIntSum(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 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = add nsw i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @returnIntSum(i32 %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = add nsw i32 %3, %0
ret i32 %4
}
/* Variables and functions */
double VR();
double UC() {
  double i = 0, d;
  while ((i += d = VR()) < 1.0)
    ;
  return d;
}


x86 assembly (clang, -O0):
<UC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <VR@plt>
movaps %xmm0,%xmm1
movsd  %xmm1,-0x10(%rbp)
addsd  -0x8(%rbp),%xmm1
movsd  %xmm1,-0x8(%rbp)
movsd  0xebf(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1150 <UC+0x40>
jmp    1120 <UC+0x10>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UC>:
push   %rax
xorpd  %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
nop
movsd  %xmm1,(%rsp)
xor    %eax,%eax
call   1030 <VR@plt>
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  0xec3(%rip),%xmm2
ucomisd %xmm1,%xmm2
ja     1120 <UC+0x10>
pop    %rax
ret

LLVM IR (-O0):
define double @UC() {
%1 = alloca double
%2 = alloca double
store double 0.000000e+00, double* %1
br label %3
3: ; preds = %8, %0
%4 = call double (...) @VR()
store double %4, double* %2
%5 = load double, double* %1
%6 = fadd double %5, %4
store double %6, double* %1
%7 = fcmp olt double %6, 1.000000e+00
br i1 %7, label %8, label %9
8: ; preds = %3
br label %3
9: ; preds = %3
%10 = load double, double* %2
ret double %10
}

LLVM IR (-O2):
define double @UC() {
br label %1
1: ; preds = %1, %0
%2 = phi double [ 0.000000e+00, %0 ], [ %4, %1 ]
%3 = tail call double (...) @VR()
%4 = fadd double %2, %3
%5 = fcmp olt double %4, 1.000000e+00
br i1 %5, label %1, label %6
6: ; preds = %1
ret double %3
}
void ASN1_UTF8STRING_free(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_UTF8STRING_free() {
ret void
}
void ab5cdefghijklmnopqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @ab5cdefghijklmnopqrstuvwxzy() {
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int is_prime(uint64_t p) {
  uint64_t i;
  for (i = 2; i < (p / 2); i++) {
    if (!(p % i)) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    115b <is_prime+0x5b>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1148 <is_prime+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1162 <is_prime+0x62>
jmp    114d <is_prime+0x4d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <is_prime+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prime>:
mov    $0x1,%r8d
cmp    $0x6,%edi
jl     1130 <is_prime+0x30>
mov    %edi,%esi
shr    %esi
mov    $0x2,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%eax
cltd
idiv   %ecx
test   %edx,%edx
je     1134 <is_prime+0x34>
add    $0x1,%ecx
cmp    %ecx,%esi
jne    1120 <is_prime+0x20>
mov    %r8d,%eax
ret
xor    %r8d,%r8d
mov    %r8d,%eax
ret

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

LLVM IR (-O2):
define i32 @is_prime(i32 %0) {
%2 = icmp sgt i32 %0, 5
br i1 %2, label %3, label %12
3: ; preds = %1
%4 = lshr i32 %0, 1
br label %7
5: ; preds = %7
%6 = icmp eq i32 %11, %4
br i1 %6, label %12, label %7
7: ; preds = %3, %5
%8 = phi i32 [ %11, %5 ], [ 2, %3 ]
%9 = srem i32 %0, %8
%10 = icmp eq i32 %9, 0
%11 = add nuw nsw i32 %8, 1
br i1 %10, label %12, label %5
12: ; preds = %7, %5, %1
%13 = phi i32 [ 1, %1 ], [ 1, %5 ], [ 0, %7 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xc6() {
  Assert_real((ispunct(198) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              995, ("ispunct should be 0 for 0xc6"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xc6\00"
define void @t_ispunct_0xc6() {
%1 = tail call i64 @ispunct(i32 198)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 995, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int round_up_4bytes(int p) {
  if (p & 0x3) {
    p = ((p >> 2) + 1) << 2;
  }
  return p;
}


x86 assembly (clang, -O0):
<round_up_4bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3,%eax
cmp    $0x0,%eax
je     1125 <round_up_4bytes+0x25>
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
add    $0x1,%eax
shl    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_up_4bytes>:
lea    0x4(%rdi),%eax
and    $0xfffffffc,%eax
test   $0x3,%dil
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @round_up_4bytes(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
%4 = add i32 %0, 4
%5 = and i32 %4, -4
%6 = select i1 %3, i32 %0, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ input_clear(int);
void input_reset() {
  input_clear(0);
  input_clear(1);
  input_clear(2);
  input_clear(3);
  input_clear(4);
  input_clear(5);
  input_clear(6);
  input_clear(7);
}


x86 assembly (clang, -O0):
<input_reset>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <input_clear@plt>
mov    $0x1,%edi
call   1030 <input_clear@plt>
mov    $0x2,%edi
call   1030 <input_clear@plt>
mov    $0x3,%edi
call   1030 <input_clear@plt>
mov    $0x4,%edi
call   1030 <input_clear@plt>
mov    $0x5,%edi
call   1030 <input_clear@plt>
mov    $0x6,%edi
call   1030 <input_clear@plt>
mov    $0x7,%edi
call   1030 <input_clear@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<input_reset>:
push   %rax
xor    %edi,%edi
call   1030 <input_clear@plt>
mov    $0x1,%edi
call   1030 <input_clear@plt>
mov    $0x2,%edi
call   1030 <input_clear@plt>
mov    $0x3,%edi
call   1030 <input_clear@plt>
mov    $0x4,%edi
call   1030 <input_clear@plt>
mov    $0x5,%edi
call   1030 <input_clear@plt>
mov    $0x6,%edi
call   1030 <input_clear@plt>
mov    $0x7,%edi
pop    %rax
jmp    1030 <input_clear@plt>

LLVM IR (-O0):
define void @input_reset() {
%1 = call i32 @input_clear(i32 0)
%2 = call i32 @input_clear(i32 1)
%3 = call i32 @input_clear(i32 2)
%4 = call i32 @input_clear(i32 3)
%5 = call i32 @input_clear(i32 4)
%6 = call i32 @input_clear(i32 5)
%7 = call i32 @input_clear(i32 6)
%8 = call i32 @input_clear(i32 7)
ret void
}

LLVM IR (-O2):
define void @input_reset() {
%1 = tail call i32 @input_clear(i32 0)
%2 = tail call i32 @input_clear(i32 1)
%3 = tail call i32 @input_clear(i32 2)
%4 = tail call i32 @input_clear(i32 3)
%5 = tail call i32 @input_clear(i32 4)
%6 = tail call i32 @input_clear(i32 5)
%7 = tail call i32 @input_clear(i32 6)
%8 = tail call i32 @input_clear(i32 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ libB_func();
void libA_func(void) { libB_func(); }


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

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

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

LLVM IR (-O2):
define void @libA_func() {
%1 = tail call i32 (...) @libB_func()
ret void
}
/* Type definitions */
struct nlattr {
  int dummy;
};
typedef int /*<<< orphan*/ __be32;

/* Variables and functions */
scalar_t__ nla_data(struct nlattr *);
__be32 nla_get_be32(struct nlattr *nla) { return *(__be32 *)nla_data(nla); }


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

x86 assembly (clang, -O2):
<nla_get_be32>:
push   %rax
call   1030 <nla_data@plt>
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.nlattr = type { i32 }
define i32 @nla_get_be32(%struct.nlattr* %0) {
%2 = alloca %struct.nlattr*
store %struct.nlattr* %0, %struct.nlattr** %2
%3 = load %struct.nlattr*, %struct.nlattr** %2
%4 = call i64 @nla_data(%struct.nlattr* %3)
%5 = inttoptr i64 %4 to i32*
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.nlattr = type { i32 }
define i32 @nla_get_be32(%struct.nlattr* %0) {
%2 = tail call i64 @nla_data(%struct.nlattr* %0)
%3 = inttoptr i64 %2 to i32*
%4 = load i32, i32* %3
ret i32 %4
}
/* Type definitions */
struct stack_st_OPENSSL_STRING {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
int OPENSSL_sk_find(int /*<<< orphan*/ *, void const *);
int sk_OPENSSL_STRING_find(struct stack_st_OPENSSL_STRING *sk, char *ptr) {
  return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr);
}


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

x86 assembly (clang, -O2):
<sk_OPENSSL_STRING_find>:
jmp    1030 <OPENSSL_sk_find@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_STRING = type { i32 }
define i32 @sk_OPENSSL_STRING_find(%struct.stack_st_OPENSSL_STRING* %0, i8* %1) {
%3 = alloca %struct.stack_st_OPENSSL_STRING*
%4 = alloca i8*
store %struct.stack_st_OPENSSL_STRING* %0, %struct.stack_st_OPENSSL_STRING** %3
store i8* %1, i8** %4
%5 = load %struct.stack_st_OPENSSL_STRING*, %struct.stack_st_OPENSSL_STRING** %3
%6 = bitcast %struct.stack_st_OPENSSL_STRING* %5 to i32*
%7 = load i8*, i8** %4
%8 = call i32 @OPENSSL_sk_find(i32* %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_STRING = type { i32 }
define i32 @sk_OPENSSL_STRING_find(%struct.stack_st_OPENSSL_STRING* %0, i8* %1) {
%3 = getelementptr %struct.stack_st_OPENSSL_STRING, %struct.stack_st_OPENSSL_STRING* %0, i64 0, i32 0
%4 = tail call i32 @OPENSSL_sk_find(i32* %3, i8* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ reset_bg_color();
void clr_scr() {
  reset_bg_color();
  printf("%c[2J", 0x1B);
}


x86 assembly (clang, -O0):
<clr_scr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <reset_bg_color@plt>
lea    0xece(%rip),%rdi
mov    $0x1b,%esi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clr_scr>:
push   %rax
xor    %eax,%eax
call   1040 <reset_bg_color@plt>
lea    0xed1(%rip),%rdi
mov    $0x1b,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%c[2J\00"
define void @clr_scr() {
%1 = call i32 (...) @reset_bg_color()
%2 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 27)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%c[2J\00"
define void @clr_scr() {
%1 = tail call i32 (...) @reset_bg_color()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 27)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, int);
void strncpy0(char *dest, const char *source, int size) {
  if (source != NULL) {
    strncpy(dest, source, size);
    dest[size - 1] = 0;
  }
}


x86 assembly (clang, -O0):
<strncpy0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114f <strncpy0+0x3f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy0>:
test   %rsi,%rsi
je     1130 <strncpy0+0x20>
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <strncpy@plt>
movslq %ebp,%rax
movb   $0x0,-0x1(%rax,%rbx,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @strncpy0(i8* %0, i8* %1, i32 %2) {
%4 = icmp eq i8* %1, null
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = tail call i32 @strncpy(i8* %0, i8* %1, i32 %2)
%7 = add nsw i32 %2, -1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 0, i8* %9
br label %10
10: ; preds = %5, %3
ret void
}
void gtk_menu_popup() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_popup() {
ret void
}
int test_imm_7Dint64_highword_reg(long long val) {
  return ((val >> 32) & (0x7D << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_7Dint64_highword_reg>:
movabs $0x7d00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_7Dint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 125
%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_7Dint64_highword_reg(i64 %0) {
%2 = and i64 %0, 536870912000
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void INT_Excep_SCI8_TXI8(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCI8_TXI8() {
ret void
}
void sys_checkdir(char *path, int wr) {}


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

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

LLVM IR (-O0):
define void @sys_checkdir(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @sys_checkdir(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ flag_add(char *, int);
int /*<<< orphan*/ gph_drwgame();
int /*<<< orphan*/ gph_printcenter(char *);
int /*<<< orphan*/ snk_reset();
void snk_dead() {
  snk_reset();
  flag_add("dead", 1);
  gph_drwgame();
  gph_printcenter("** DEAD **");
}


x86 assembly (clang, -O0):
<snk_dead>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <snk_reset@plt>
lea    0xeae(%rip),%rdi
mov    $0x1,%esi
call   1050 <flag_add@plt>
mov    $0x0,%al
call   1030 <gph_drwgame@plt>
lea    0xe9b(%rip),%rdi
call   1060 <gph_printcenter@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<snk_dead>:
push   %rax
xor    %eax,%eax
call   1040 <snk_reset@plt>
lea    0xeb1(%rip),%rdi
mov    $0x1,%esi
call   1050 <flag_add@plt>
xor    %eax,%eax
call   1030 <gph_drwgame@plt>
lea    0xe9e(%rip),%rdi
pop    %rax
jmp    1060 <gph_printcenter@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"dead\00"
@.str.1 = [11 x i8] c"** DEAD **\00"
define void @snk_dead() {
%1 = call i32 (...) @snk_reset()
%2 = call i32 @flag_add(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = call i32 (...) @gph_drwgame()
%4 = call i32 @gph_printcenter(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"dead\00"
@.str.1 = [11 x i8] c"** DEAD **\00"
define void @snk_dead() {
%1 = tail call i32 (...) @snk_reset()
%2 = tail call i32 @flag_add(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 (...) @gph_drwgame()
%4 = tail call i32 @gph_printcenter(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f1();
void main() { f1(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @f1()
ret void
}
/* Variables and functions */
char *scm_c_oldfmt(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
char *scm_c_oldfmt0(char *s) { return scm_c_oldfmt(s, strlen(s)); }


x86 assembly (clang, -O0):
<scm_c_oldfmt0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <scm_c_oldfmt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scm_c_oldfmt0>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <scm_c_oldfmt@plt>

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

LLVM IR (-O2):
define i8* @scm_c_oldfmt0(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @scm_c_oldfmt(i8* %0, i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "-n|--name        get my name\n"
                  "-b|--birthday    get my birthday\n"
                  "-w|--weather     set today weather,and print\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [108 x i8] c"-n|--name get my name\0A-b|--birthday get my birthday\0A-w|--weather set today weather,and print\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [108 x i8] c"-n|--name get my name\0A-b|--birthday get my birthday\0A-w|--weather set today weather,and print\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ spx_fft(void *, float *, float *);
void spx_fft_float(void *table, float *in, float *out) {
  spx_fft(table, in, out);
}


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

x86 assembly (clang, -O2):
<spx_fft_float>:
jmp    1030 <spx_fft@plt>

LLVM IR (-O0):
define void @spx_fft_float(i8* %0, float* %1, float* %2) {
%4 = alloca i8*
%5 = alloca float*
%6 = alloca float*
store i8* %0, i8** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load i8*, i8** %4
%8 = load float*, float** %5
%9 = load float*, float** %6
%10 = call i32 @spx_fft(i8* %7, float* %8, float* %9)
ret void
}

LLVM IR (-O2):
define void @spx_fft_float(i8* %0, float* %1, float* %2) {
%4 = tail call i32 @spx_fft(i8* %0, float* %1, float* %2)
ret void
}