xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ mp_isalpha(char);
scalar_t__ mp_isdigit(char);
int mp_isalnum(char c) { return mp_isalpha(c) || mp_isdigit(c); }


x86 assembly (clang, -O0):
<mp_isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <mp_isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <mp_isalnum+0x3c>
movsbl -0x1(%rbp),%edi
call   1040 <mp_isdigit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_isalnum>:
push   %rbx
mov    %edi,%ebx
call   1030 <mp_isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <mp_isalnum+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1040 <mp_isdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mp_isalnum(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @mp_isalpha(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @mp_isdigit(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @mp_isalnum(i8 signext %0) {
%2 = tail call i64 @mp_isalpha(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @mp_isdigit(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
float gpu_dot3(const float *v1, const float *v2) {
  return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
}


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

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

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

LLVM IR (-O2):
define float @gpu_dot3(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fmul float %6, %8
%10 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %9)
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = tail call float @llvm.fmuladd.f32(float %12, float %14, float %10)
ret float %15
}
int addinitrec(const char *name, const char *rlvl, char *cmd, int exe) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @addinitrec(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @addinitrec(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i32 0
}
/* Type definitions */
struct yamc_sub_args_info {
  int dummy;
};

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ yamc_sub_cmd_parser_required2(struct yamc_sub_args_info *,
                                         char const *, int /*<<< orphan*/);
int yamc_sub_cmd_parser_required(struct yamc_sub_args_info *args_info,
                                 const char *prog_name) {
  int result = EXIT_SUCCESS;
  if (yamc_sub_cmd_parser_required2(args_info, prog_name, 0) > 0)
    result = EXIT_FAILURE;
  return result;
}


x86 assembly (clang, -O0):
<yamc_sub_cmd_parser_required>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <yamc_sub_cmd_parser_required2@plt>
cmp    $0x0,%rax
jle    1151 <yamc_sub_cmd_parser_required+0x41>
mov    0x2e94(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yamc_sub_cmd_parser_required>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%ebx
xor    %edx,%edx
call   1030 <yamc_sub_cmd_parser_required2@plt>
test   %rax,%rax
jle    112f <yamc_sub_cmd_parser_required+0x1f>
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.yamc_sub_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @yamc_sub_cmd_parser_required(%struct.yamc_sub_args_info* %0, i8* %1) {
%3 = alloca %struct.yamc_sub_args_info*
%4 = alloca i8*
%5 = alloca i32
store %struct.yamc_sub_args_info* %0, %struct.yamc_sub_args_info** %3
store i8* %1, i8** %4
%6 = load i32, i32* @EXIT_SUCCESS
store i32 %6, i32* %5
%7 = load %struct.yamc_sub_args_info*, %struct.yamc_sub_args_info** %3
%8 = load i8*, i8** %4
%9 = call i64 @yamc_sub_cmd_parser_required2(%struct.yamc_sub_args_info* %7, i8* %8, i32 0)
%10 = icmp sgt i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32, i32* @EXIT_FAILURE
store i32 %12, i32* %5
br label %13
13: ; preds = %11, %2
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
%struct.yamc_sub_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @yamc_sub_cmd_parser_required(%struct.yamc_sub_args_info* %0, i8* %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i64 @yamc_sub_cmd_parser_required2(%struct.yamc_sub_args_info* %0, i8* %1, i32 0)
%5 = icmp sgt i64 %4, 0
%6 = load i32, i32* @EXIT_FAILURE
%7 = select i1 %5, i32 %6, i32 %3
ret i32 %7
}
/* Variables and functions */
double fabs(double);
int isDifferentPeriodsDontCheckHarmonics(double period1, double period2,
                                         double T) {
  if (T * fabs(period2 - period1) < period2 * period1)
    return (0);
  else
    return (1);
}


x86 assembly (clang, -O0):
<isDifferentPeriodsDontCheckHarmonics>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movaps 0xed7(%rip),%xmm2
pand   %xmm2,%xmm0
mulsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1151 <isDifferentPeriodsDontCheckHarmonics+0x51>
movl   $0x0,-0x4(%rbp)
jmp    1158 <isDifferentPeriodsDontCheckHarmonics+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isDifferentPeriodsDontCheckHarmonics>:
movapd %xmm1,%xmm3
subsd  %xmm0,%xmm3
andpd  0xef0(%rip),%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm1,%xmm0
xor    %eax,%eax
ucomisd %xmm3,%xmm0
setbe  %al
ret

LLVM IR (-O0):
define i32 @isDifferentPeriodsDontCheckHarmonics(double %0, double %1, double %2) {
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %7
%9 = load double, double* %6
%10 = load double, double* %5
%11 = fsub double %9, %10
%12 = call double @llvm.fabs.f64(double %11)
%13 = fmul double %8, %12
%14 = load double, double* %6
%15 = load double, double* %5
%16 = fmul double %14, %15
%17 = fcmp olt double %13, %16
br i1 %17, label %18, label %19
18: ; preds = %3
store i32 0, i32* %4
br label %20
19: ; preds = %3
store i32 1, i32* %4
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @isDifferentPeriodsDontCheckHarmonics(double %0, double %1, double %2) {
%4 = fsub double %1, %0
%5 = tail call double @llvm.fabs.f64(double %4)
%6 = fmul double %5, %2
%7 = fmul double %0, %1
%8 = fcmp uge double %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
double RAND_MAX;
double random();
int /*<<< orphan*/ seedRNG();
size_t SHA_salt_size(void) {
  double rand_size;
  seedRNG();
  rand_size = (double)9.0 * random() / RAND_MAX;
  return (size_t)(8 + rand_size);
}


x86 assembly (clang, -O0):
<SHA_salt_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %al,-0x9(%rbp)
call   1030 <seedRNG@plt>
mov    -0x9(%rbp),%al
call   1040 <random@plt>
movsd  0xebe(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2e9b(%rip),%rax
movsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xea1(%rip),%xmm1
addsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
movsd  0xe8e(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rcx
and    %rdx,%rcx
or     %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHA_salt_size>:
push   %rax
xor    %eax,%eax
call   1030 <seedRNG@plt>
xor    %eax,%eax
call   1040 <random@plt>
mulsd  0xec9(%rip),%xmm0
mov    0x2eaa(%rip),%rax
divsd  (%rax),%xmm0
addsd  0xebe(%rip),%xmm0
cvttsd2si %xmm0,%rcx
mov    %rcx,%rdx
sar    $0x3f,%rdx
subsd  0xeb2(%rip),%xmm0
cvttsd2si %xmm0,%rax
and    %rdx,%rax
or     %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define i64 @SHA_salt_size() {
%1 = alloca double
%2 = call i32 (...) @seedRNG()
%3 = call double (...) @random()
%4 = fmul double 9.000000e+00, %3
%5 = load double, double* @RAND_MAX
%6 = fdiv double %4, %5
store double %6, double* %1
%7 = load double, double* %1
%8 = fadd double 8.000000e+00, %7
%9 = fptoui double %8 to i64
ret i64 %9
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define i64 @SHA_salt_size() {
%1 = tail call i32 (...) @seedRNG()
%2 = tail call double (...) @random()
%3 = fmul double %2, 9.000000e+00
%4 = load double, double* @RAND_MAX
%5 = fdiv double %3, %4
%6 = fadd double %5, 8.000000e+00
%7 = fptoui double %6 to i64
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  if (argc > 1)
    printf("Hello, %s!\n", argv[1]);
  else
    printf("Hello, world!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    114b <main+0x3b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1159 <main+0x49>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     113a <main+0x1a>
mov    0x8(%rsi),%rsi
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1146 <main+0x26>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Hello, %s!\0A\00"
@.str.1 = [15 x i8] c"Hello, world!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %15
13: ; preds = %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello, %s!\0A\00"
@str = [14 x i8] c"Hello, world!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %10
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_reverse(int n, int *arr) {
  for (int i = n - 1; i >= 0; i--) {
    printf("%d ", arr[i]);
  }
}


x86 assembly (clang, -O0):
<print_reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1157 <print_reverse+0x47>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1128 <print_reverse+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_reverse>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    1149 <print_reverse+0x39>
mov    %rsi,%r15
mov    %edi,%ebx
add    $0x1,%rbx
lea    0xed7(%rip),%r14
nopl   0x0(%rax)
lea    -0x2(%rbx),%eax
mov    (%r15,%rax,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1130 <print_reverse+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @print_reverse(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 = sub nsw i32 %6, 1
store i32 %7, i32* %5
br label %8
8: ; preds = %18, %2
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %8
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = add nsw i32 %19, -1
store i32 %20, i32* %5
br label %8
21: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_reverse(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ %5, %4 ], [ %9, %7 ]
%9 = add nsw i64 %8, -1
%10 = and i64 %9, 4294967295
%11 = getelementptr inbounds i32, i32* %1, i64 %10
%12 = load i32, i32* %11
%13 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = icmp ugt i64 %8, 1
br i1 %14, label %7, label %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void msg(const char *s, const char *arg) {
  fprintf(stderr, "%s %s\n", s, arg);
  return;
}


x86 assembly (clang, -O0):
<msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg>:
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%s %s\0A\00"
define void @msg(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_panic__();
void myfatal(void) { __coverity_panic__(); }


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

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

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

LLVM IR (-O2):
define void @myfatal() {
%1 = tail call i32 (...) @__coverity_panic__()
ret void
}
/* Variables and functions */
scalar_t__ isnan(float);
int __ocl_isequal_float(float src1, float src2) {
  return (isnan(src1) || isnan(src2)) ? 0 : src1 == src2;
}


x86 assembly (clang, -O0):
<__ocl_isequal_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
jne    114a <__ocl_isequal_float+0x3a>
movss  -0x8(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
je     1154 <__ocl_isequal_float+0x44>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    116d <__ocl_isequal_float+0x5d>
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_isequal_float>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0xc(%rsp)
call   1030 <isnan@plt>
xor    %ebx,%ebx
test   %rax,%rax
jne    1151 <__ocl_isequal_float+0x41>
movss  0x8(%rsp),%xmm0
call   1030 <isnan@plt>
test   %rax,%rax
jne    1151 <__ocl_isequal_float+0x41>
movss  0xc(%rsp),%xmm0
cmpeqss 0x8(%rsp),%xmm0
movd   %xmm0,%ebx
and    $0x1,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @__ocl_isequal_float(float %0, float %1) {
%3 = tail call i64 @isnan(float %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = tail call i64 @isnan(float %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = fcmp oeq float %0, %1
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %2, %5, %8
%12 = phi i32 [ %10, %8 ], [ 0, %5 ], [ 0, %2 ]
ret i32 %12
}
void ff_hevc_put_hevc_uni_epel_v24_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_v24_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ print_build_env();
int /*<<< orphan*/ print_build_time();
int /*<<< orphan*/ print_gcc_version();
int /*<<< orphan*/ print_intro();
int /*<<< orphan*/ print_so_version();
int /*<<< orphan*/ print_svn_revision();
int /*<<< orphan*/ printf(char *);
int so_main() {
  print_intro();
  print_so_version();
  print_svn_revision();
  print_build_time();
  print_gcc_version();
  print_build_env();
  printf("\n");
  exit(0);
}


x86 assembly (clang, -O0):
<so_main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <print_intro@plt>
mov    $0x0,%al
call   1070 <print_so_version@plt>
mov    $0x0,%al
call   1040 <print_svn_revision@plt>
mov    $0x0,%al
call   10a0 <print_build_time@plt>
mov    $0x0,%al
call   1060 <print_gcc_version@plt>
mov    $0x0,%al
call   1080 <print_build_env@plt>
lea    0xe4b(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<so_main>:
push   %rax
xor    %eax,%eax
call   1040 <print_intro@plt>
xor    %eax,%eax
call   1070 <print_so_version@plt>
xor    %eax,%eax
call   1050 <print_svn_revision@plt>
xor    %eax,%eax
call   10a0 <print_build_time@plt>
xor    %eax,%eax
call   1060 <print_gcc_version@plt>
xor    %eax,%eax
call   1080 <print_build_env@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @so_main() {
%1 = call i32 (...) @print_intro()
%2 = call i32 (...) @print_so_version()
%3 = call i32 (...) @print_svn_revision()
%4 = call i32 (...) @print_build_time()
%5 = call i32 (...) @print_gcc_version()
%6 = call i32 (...) @print_build_env()
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @so_main() {
%1 = tail call i32 (...) @print_intro()
%2 = tail call i32 (...) @print_so_version()
%3 = tail call i32 (...) @print_svn_revision()
%4 = tail call i32 (...) @print_build_time()
%5 = tail call i32 (...) @print_gcc_version()
%6 = tail call i32 (...) @print_build_env()
%7 = tail call i32 @putchar(i32 10)
%8 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ AbsoluteIndexedXX0(int);
int /*<<< orphan*/ STZ16(int /*<<< orphan*/, int);
void Op9EM0X0(void) { STZ16(AbsoluteIndexedXX0(2), 0xFFFFFF); }


x86 assembly (clang, -O0):
<Op9EM0X0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <AbsoluteIndexedXX0@plt>
mov    %eax,%edi
mov    $0xffffff,%esi
call   1040 <STZ16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op9EM0X0>:
push   %rax
mov    $0x2,%edi
call   1030 <AbsoluteIndexedXX0@plt>
mov    %eax,%edi
mov    $0xffffff,%esi
pop    %rax
jmp    1040 <STZ16@plt>

LLVM IR (-O0):
define void @Op9EM0X0() {
%1 = call i32 @AbsoluteIndexedXX0(i32 2)
%2 = call i32 @STZ16(i32 %1, i32 16777215)
ret void
}

LLVM IR (-O2):
define void @Op9EM0X0() {
%1 = tail call i32 @AbsoluteIndexedXX0(i32 2)
%2 = tail call i32 @STZ16(i32 %1, i32 16777215)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ argdevider(char const);
int getarglen(const char *str) {
  int i = 0;
  while (!argdevider(str[i]))
    i++;
  return i;
}


x86 assembly (clang, -O0):
<getarglen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <argdevider@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1149 <getarglen+0x39>
jmp    1157 <getarglen+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <getarglen+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getarglen>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0xffffffff,%ebp
nopl   0x0(%rax,%rax,1)
movsbl (%rbx),%edi
call   1030 <argdevider@plt>
add    $0x1,%ebp
add    $0x1,%rbx
test   %eax,%eax
je     1120 <getarglen+0x10>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @getarglen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %8, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = tail call i32 @argdevider(i8 signext %5)
%7 = icmp eq i32 %6, 0
%8 = add nuw i64 %3, 1
br i1 %7, label %2, label %9
9: ; preds = %2
%10 = trunc i64 %3 to i32
ret i32 %10
}
void ADC_get() {}


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

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

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

LLVM IR (-O2):
define void @ADC_get() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void rdp_zero(char *buffer, int buffer_size) { memset(buffer, 0, buffer_size); }


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

x86 assembly (clang, -O2):
<rdp_zero>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @rdp_zero(i8* %0, i32 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i32 %1)
ret void
}
int test04(int a) { return ((a & 0x55) == 0) ? 0x7FFFFFFF : 0x80000000; }


x86 assembly (clang, -O0):
<test04>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x55,%edx
mov    $0x80000000,%eax
mov    $0x7fffffff,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test04>:
and    $0x55,%edi
cmp    $0x1,%edi
mov    $0x80000000,%eax
sbb    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @test04(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 85
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 2147483647, i32 -2147483648
ret i32 %7
}

LLVM IR (-O2):
define i32 @test04(i32 %0) {
%2 = and i32 %0, 85
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 2147483647, i32 -2147483648
ret i32 %4
}
unsigned char getBitCheckCount(unsigned char UID[4]) {
  short i = 0;
  unsigned char bcc = *UID;
  for (i = 1; i < 4; i++) {
    bcc = bcc ^ *(UID + i);
  }
  return bcc;
}


x86 assembly (clang, -O0):
<getBitCheckCount>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xb(%rbp)
movw   $0x1,-0xa(%rbp)
movswl -0xa(%rbp),%eax
cmp    $0x4,%eax
jge    1153 <getBitCheckCount+0x53>
movzbl -0xb(%rbp),%eax
mov    -0x8(%rbp),%rcx
movswl -0xa(%rbp),%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xa(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xa(%rbp)
jmp    111d <getBitCheckCount+0x1d>
movzbl -0xb(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBitCheckCount>:
movd   (%rdi),%xmm0
movdqa %xmm0,%xmm1
psrld  $0x10,%xmm1
pxor   %xmm0,%xmm1
movdqa %xmm1,%xmm0
psrlw  $0x8,%xmm0
pxor   %xmm1,%xmm0
movd   %xmm0,%eax
ret

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

LLVM IR (-O2):
define zeroext i8 @getBitCheckCount(i8* nocapture %0) {
%2 = bitcast i8* %0 to <4 x i8>*
%3 = load <4 x i8>, <4 x i8>* %2
%4 = call i8 @llvm.vector.reduce.xor.v4i8(<4 x i8> %3)
ret i8 %4
}
/* Type definitions */
struct FormatType {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ FreeF(struct FormatType *);
void GetDataClose(struct FormatType *F) { FreeF(F); }


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

x86 assembly (clang, -O2):
<GetDataClose>:
jmp    1030 <FreeF@plt>

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

LLVM IR (-O2):
%struct.FormatType = type { i32 }
define void @GetDataClose(%struct.FormatType* %0) {
%2 = tail call i32 @FreeF(%struct.FormatType* %0)
ret void
}
void gtk_paint_expander() {}


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

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

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

LLVM IR (-O2):
define void @gtk_paint_expander() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *xgzopen(char const *, char *);
void *output_gzfile_open(const char *path, const char *filter_prog,
                         const char *filter_prog_args) {
  assert(filter_prog == NULL);
  return xgzopen(path, "wb");
}


x86 assembly (clang, -O0):
<output_gzfile_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1040 <xgzopen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_gzfile_open>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rsi,%rsi
sete   %dil
call   1030 <assert@plt>
lea    0xec7(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <xgzopen@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"wb\00"
define i8* @output_gzfile_open(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = icmp eq i8* %7, null
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i8*, i8** %4
%12 = call i8* @xgzopen(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i8* %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"wb\00"
define i8* @output_gzfile_open(i8* %0, i8* readnone %1, i8* nocapture readnone %2) {
%4 = icmp eq i8* %1, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i8* @xgzopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i8* %7
}
void delay_us(unsigned short ns) {
  unsigned long tmp;
  tmp = (unsigned long)ns * (72000000 / 4000000);
  while (tmp > 20)
    tmp--;
}


x86 assembly (clang, -O0):
<delay_us>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
imul   $0x12,%rax,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x14,-0x10(%rbp)
jbe    1133 <delay_us+0x33>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1117 <delay_us+0x17>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @delay_us(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i64
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = zext i16 %4 to i64
%6 = mul i64 %5, 18
store i64 %6, i64* %3
br label %7
7: ; preds = %10, %1
%8 = load i64, i64* %3
%9 = icmp ugt i64 %8, 20
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i64, i64* %3
%12 = add i64 %11, -1
store i64 %12, i64* %3
br label %7
13: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @delay_us(i16 zeroext %0) {
ret void
}
int network_resources_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @network_resources_init() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ waitpid(int, int *, int /*<<< orphan*/);
void sig_child_handler(int sig) {
  int status;
  pid_t pid;
  while ((pid = waitpid(-1, &status, WNOHANG)) > 0) {
  }
}


x86 assembly (clang, -O0):
<sig_child_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0x8(%rbp),%rsi
call   1030 <waitpid@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jle    1143 <sig_child_handler+0x33>
jmp    111b <sig_child_handler+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_child_handler>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%r14
lea    0x4(%rsp),%rbx
mov    (%r14),%edx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1030 <waitpid@plt>
test   %eax,%eax
jg     1120 <sig_child_handler+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @sig_child_handler(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* @WNOHANG
%7 = call i32 @waitpid(i32 -1, i32* %3, i32 %6)
store i32 %7, i32* %4
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @sig_child_handler(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %4, %1
%5 = load i32, i32* @WNOHANG
%6 = call i32 @waitpid(i32 -1, i32* %2, i32 %5)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %4, label %8
8: ; preds = %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BPF_MAP_TYPE_HASH;
int bpf_create_map(int /*<<< orphan*/, int, size_t, int, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *, char *);
char *strerror(int /*<<< orphan*/);
int create_map(size_t val_size, int num) {
  int map_fd;
  map_fd =
      bpf_create_map(BPF_MAP_TYPE_HASH, sizeof(long long), val_size, num, 0);
  if (map_fd < 0)
    printf("failed to create map '%s'\n", strerror(errno));
  return map_fd;
}


x86 assembly (clang, -O0):
<create_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    $0x8,%esi
xor    %r8d,%r8d
call   1040 <bpf_create_map@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    1186 <create_map+0x56>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    %rax,%rsi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_map>:
push   %rbx
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
mov    $0x8,%esi
xor    %r8d,%r8d
call   1040 <bpf_create_map@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    116f <create_map+0x3f>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xe99(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@BPF_MAP_TYPE_HASH = global i32 0
@.str = [27 x i8] c"failed to create map '%s'\0A\00"
@errno = global i32 0
define i32 @create_map(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%6 = load i32, i32* @BPF_MAP_TYPE_HASH
%7 = load i64, i64* %3
%8 = load i32, i32* %4
%9 = call i32 @bpf_create_map(i32 %6, i32 8, i64 %7, i32 %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i32, i32* @errno
%14 = call i8* @strerror(i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %14)
br label %16
16: ; preds = %12, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@BPF_MAP_TYPE_HASH = global i32 0
@.str = [27 x i8] c"failed to create map '%s'\0A\00"
@errno = global i32 0
define i32 @create_map(i64 %0, i32 %1) {
%3 = load i32, i32* @BPF_MAP_TYPE_HASH
%4 = tail call i32 @bpf_create_map(i32 %3, i32 8, i64 %0, i32 %1, i32 0)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = load i32, i32* @errno
%8 = tail call i8* @strerror(i32 %7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %6, %2
ret i32 %4
}
int test_imm_6Buint8_mem(unsigned char *val) {
  return ((*val) & (-0x6B << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_6Buint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -107
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ generate_rectangle_holes_balanced(int);
int /*<<< orphan*/ read_pls_in_squarecolor(char *);
int /*<<< orphan*/ srandom(unsigned long);
int /*<<< orphan*/ test_validity_squarecolor();
int /*<<< orphan*/ write_pls(char *);
void poke_rectangle(char *infile, int numcols, char *plsname,
                    unsigned long seed) {
  srandom(seed);
  read_pls_in_squarecolor(infile);
  test_validity_squarecolor();
  generate_rectangle_holes_balanced(numcols);
  write_pls(plsname);
}


x86 assembly (clang, -O0):
<poke_rectangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <srandom@plt>
mov    -0x8(%rbp),%rdi
call   1050 <read_pls_in_squarecolor@plt>
mov    $0x0,%al
call   1070 <test_validity_squarecolor@plt>
mov    -0xc(%rbp),%edi
call   1060 <generate_rectangle_holes_balanced@plt>
mov    -0x18(%rbp),%rdi
call   1040 <write_pls@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poke_rectangle>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rcx,%rdi
call   1030 <srandom@plt>
mov    %rbx,%rdi
call   1050 <read_pls_in_squarecolor@plt>
xor    %eax,%eax
call   1070 <test_validity_squarecolor@plt>
mov    %ebp,%edi
call   1060 <generate_rectangle_holes_balanced@plt>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <write_pls@plt>

LLVM IR (-O0):
define void @poke_rectangle(i8* %0, i32 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i64, i64* %8
%10 = call i32 @srandom(i64 %9)
%11 = load i8*, i8** %5
%12 = call i32 @read_pls_in_squarecolor(i8* %11)
%13 = call i32 (...) @test_validity_squarecolor()
%14 = load i32, i32* %6
%15 = call i32 @generate_rectangle_holes_balanced(i32 %14)
%16 = load i8*, i8** %7
%17 = call i32 @write_pls(i8* %16)
ret void
}

LLVM IR (-O2):
define void @poke_rectangle(i8* %0, i32 %1, i8* %2, i64 %3) {
%5 = tail call i32 @srandom(i64 %3)
%6 = tail call i32 @read_pls_in_squarecolor(i8* %0)
%7 = tail call i32 (...) @test_validity_squarecolor()
%8 = tail call i32 @generate_rectangle_holes_balanced(i32 %1)
%9 = tail call i32 @write_pls(i8* %2)
ret void
}
/* Variables and functions */
scalar_t__ has_valid_chars(char const *, char *);
int strlen(char const *);
int semver_is_valid(const char *s) {
  char tokens[] = "0123456789"
                  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
                  "."
                  "-"
                  "+";
  return strlen(s) <= sizeof(char) * 255 && has_valid_chars(s, tokens);
}


x86 assembly (clang, -O0):
<semver_is_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x42,%edx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
movslq %eax,%rcx
xor    %eax,%eax
cmp    $0xff,%rcx
mov    %al,-0x51(%rbp)
ja     1186 <semver_is_valid+0x56>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <has_valid_chars@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<semver_is_valid>:
push   %rbx
sub    $0x50,%rsp
mov    %rdi,%rbx
movaps 0xf01(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xead(%rip),%xmm0
movaps %xmm0,(%rsp)
movw   $0x2b,0x40(%rsp)
call   1040 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xff,%ecx
ja     1185 <semver_is_valid+0x65>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <has_valid_chars@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.semver_is_valid.tokens = [66 x i8] c"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-+\00"
define i32 @semver_is_valid(i8* %0) {
%2 = alloca i8*
%3 = alloca [66 x i8]
store i8* %0, i8** %2
%4 = bitcast [66 x i8]* %3 to i8*
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = sext i32 %6 to i64
%8 = icmp ule i64 %7, 255
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = getelementptr inbounds [66 x i8], [66 x i8]* %3, i64 0, i64 0
%12 = call i64 @has_valid_chars(i8* %10, i8* %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %9, %1
%15 = phi i1 [ false, %1 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
@__const.semver_is_valid.tokens = [66 x i8] c"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-+\00"
define i32 @semver_is_valid(i8* %0) {
%2 = alloca [66 x i8]
%3 = getelementptr inbounds [66 x i8], [66 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp ult i32 %4, 256
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i64 @has_valid_chars(i8* %0, i8* %3)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %1
%11 = phi i32 [ 0, %1 ], [ %9, %6 ]
ret i32 %11
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};

/* Variables and functions */
void handle_to_outer_data(char *rcv_buf, int len,
                          struct sockaddr_in remote_addr) {}


x86 assembly (clang, -O0):
<handle_to_outer_data>:
push   %rbp
mov    %rsp,%rbp
mov    %edx,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
define void @handle_to_outer_data(i8* %0, i32 %1, i32 %2) {
%4 = alloca %struct.sockaddr_in
%5 = alloca i8*
%6 = alloca i32
%7 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 0
store i32 %2, i32* %7
store i8* %0, i8** %5
store i32 %1, i32* %6
ret void
}

LLVM IR (-O2):
define void @handle_to_outer_data(i8* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void i386_init(void) {
  extern char edata[], end[];
  memset(edata, 0, end - edata);
}


x86 assembly (clang, -O0):
<i386_init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rdi
mov    %edi,%eax
mov    0x2ebd(%rip),%edx
sub    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i386_init>:
mov    0x2eb9(%rip),%rdi
mov    0x2ec3(%rip),%edx
sub    %edi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
@edata = external global [0 x i8]
@end = external global [0 x i8]
define void @i386_init() {
%1 = call i32 @memset(i8* getelementptr inbounds ([0 x i8], [0 x i8]* @edata, i64 0, i64 0), i32 0, i32 trunc (i64 sub (i64 ptrtoint ([0 x i8]* @end to i64), i64 ptrtoint ([0 x i8]* @edata to i64)) to i32))
ret void
}

LLVM IR (-O2):
@edata = external global [0 x i8]
@end = external global [0 x i8]
define void @i386_init() {
%1 = tail call i32 @memset(i8* getelementptr inbounds ([0 x i8], [0 x i8]* @edata, i64 0, i64 0), i32 0, i32 trunc (i64 sub (i64 ptrtoint ([0 x i8]* @end to i64), i64 ptrtoint ([0 x i8]* @edata to i64)) to i32))
ret void
}
long getValue2(long x, long y) { return x + y; }


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

x86 assembly (clang, -O2):
<getValue2>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @getValue2(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 = add nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @getValue2(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int menuPrincipal() {
  printf("1 - Ingreso\n");
  printf("2 - Salir\n");
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"1 - Ingreso\0A\00"
@.str.1 = [11 x i8] c"2 - Salir\0A\00"
define i32 @menuPrincipal() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@str = [12 x i8] c"1 - Ingreso\00"
@str.2 = [10 x i8] c"2 - Salir\00"
define i32 @menuPrincipal() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.2, i64 0, i64 0))
ret i32 undef
}