void process(struct crossover2 *xo2, int count, float *data0L, float *data0R,
             float *data1L, float *data1R, float *data2L, float *data2R) {
  int start;
  for (start = 0; start < count; start += 2048)
    crossover2_process(xo2, ({
                         __typeof__(2048) _a = (2048);
                         __typeof__(count - start) _b = (count - start);
                         _a < _b ? _a : _b;
                       }),
                       data0L + start, data0R + start, data1L + start,
                       data1R + start, data2L + start, data2R + start);
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1206 <process+0xf6>
mov    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
movl   $0x800,-0x38(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x34(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1179 <process+0x69>
mov    -0x38(%rbp),%eax
mov    %eax,-0x4c(%rbp)
jmp    117f <process+0x6f>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x4c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%esi
mov    -0x18(%rbp),%rdx
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    -0x20(%rbp),%rcx
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rcx
mov    -0x28(%rbp),%r8
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%r8
mov    -0x30(%rbp),%r9
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%r9
mov    0x10(%rbp),%r10
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%r10
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%r11
shl    $0x2,%r11
add    %r11,%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1030 <crossover2_process@plt>
mov    -0x34(%rbp),%eax
add    $0x800,%eax
mov    %eax,-0x34(%rbp)
jmp    113e <process+0x2e>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %esi,(%rsp)
test   %esi,%esi
jle    11cd <process+0xbd>
mov    %r9,%r12
mov    %r8,%r14
mov    %rcx,%r13
mov    0x58(%rsp),%rbp
mov    0x50(%rsp),%rbx
xor    %eax,%eax
mov    (%rsp),%r15d
mov    %rdi,0x10(%rsp)
nopw   0x0(%rax,%rax,1)
mov    %eax,0x4(%rsp)
mov    %rdx,0x8(%rsp)
cmp    $0x800,%r15d
mov    $0x800,%esi
cmovl  %r15d,%esi
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rdx
mov    %r13,%rcx
mov    %r14,%r8
mov    %r12,%r9
xor    %eax,%eax
push   %rbp
push   %rbx
call   1030 <crossover2_process@plt>
mov    0x14(%rsp),%eax
mov    0x18(%rsp),%rdx
add    $0x10,%rsp
add    $0xfffff800,%r15d
add    $0x2000,%rbp
add    $0x2000,%rbx
add    $0x2000,%r12
add    $0x2000,%r14
add    $0x2000,%r13
add    $0x2000,%rdx
add    $0x800,%eax
cmp    (%rsp),%eax
jl     1150 <process+0x40>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.crossover2 = type opaque
define void @process(%struct.crossover2* %0, i32 %1, float* %2, float* %3, float* %4, float* %5, float* %6, float* %7) {
%9 = alloca %struct.crossover2*
%10 = alloca i32
%11 = alloca float*
%12 = alloca float*
%13 = alloca float*
%14 = alloca float*
%15 = alloca float*
%16 = alloca float*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store %struct.crossover2* %0, %struct.crossover2** %9
store i32 %1, i32* %10
store float* %2, float** %11
store float* %3, float** %12
store float* %4, float** %13
store float* %5, float** %14
store float* %6, float** %15
store float* %7, float** %16
store i32 0, i32* %17
br label %21
21: ; preds = %65, %8
%22 = load i32, i32* %17
%23 = load i32, i32* %10
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %68
25: ; preds = %21
%26 = load %struct.crossover2*, %struct.crossover2** %9
store i32 2048, i32* %18
%27 = load i32, i32* %10
%28 = load i32, i32* %17
%29 = sub nsw i32 %27, %28
store i32 %29, i32* %19
%30 = load i32, i32* %18
%31 = load i32, i32* %19
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %35
33: ; preds = %25
%34 = load i32, i32* %18
br label %37
35: ; preds = %25
%36 = load i32, i32* %19
br label %37
37: ; preds = %35, %33
%38 = phi i32 [ %34, %33 ], [ %36, %35 ]
store i32 %38, i32* %20
%39 = load i32, i32* %20
%40 = load float*, float** %11
%41 = load i32, i32* %17
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds float, float* %40, i64 %42
%44 = load float*, float** %12
%45 = load i32, i32* %17
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds float, float* %44, i64 %46
%48 = load float*, float** %13
%49 = load i32, i32* %17
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds float, float* %48, i64 %50
%52 = load float*, float** %14
%53 = load i32, i32* %17
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds float, float* %52, i64 %54
%56 = load float*, float** %15
%57 = load i32, i32* %17
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds float, float* %56, i64 %58
%60 = load float*, float** %16
%61 = load i32, i32* %17
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds float, float* %60, i64 %62
%64 = call i32 (%struct.crossover2*, i32, float*, float*, float*, float*, float*, float*, ...) bitcast (i32 (...)* @crossover2_process to i32 (%struct.crossover2*, i32, float*, float*, float*, float*, float*, float*, ...)*)(%struct.crossover2* %26, i32 %39, float* %43, float* %47, float* %51, float* %55, float* %59, float* %63)
br label %65
65: ; preds = %37
%66 = load i32, i32* %17
%67 = add nsw i32 %66, 2048
store i32 %67, i32* %17
br label %21
68: ; preds = %21
ret void
}

LLVM IR (-O2):
%struct.crossover2 = type opaque
define void @process(%struct.crossover2* %0, i32 %1, float* %2, float* %3, float* %4, float* %5, float* %6, float* %7) {
%9 = icmp sgt i32 %1, 0
br i1 %9, label %10, label %26
10: ; preds = %8, %10
%11 = phi i64 [ %23, %10 ], [ 0, %8 ]
%12 = trunc i64 %11 to i32
%13 = sub nsw i32 %1, %12
%14 = icmp slt i32 %13, 2048
%15 = select i1 %14, i32 %13, i32 2048
%16 = getelementptr inbounds float, float* %2, i64 %11
%17 = getelementptr inbounds float, float* %3, i64 %11
%18 = getelementptr inbounds float, float* %4, i64 %11
%19 = getelementptr inbounds float, float* %5, i64 %11
%20 = getelementptr inbounds float, float* %6, i64 %11
%21 = getelementptr inbounds float, float* %7, i64 %11
%22 = tail call i32 (%struct.crossover2*, i32, float*, float*, float*, float*, float*, float*, ...) bitcast (i32 (...)* @crossover2_process to i32 (%struct.crossover2*, i32, float*, float*, float*, float*, float*, float*, ...)*)(%struct.crossover2* %0, i32 %15, float* %16, float* %17, float* %18, float* %19, float* %20, float* %21)
%23 = add nuw i64 %11, 2048
%24 = trunc i64 %23 to i32
%25 = icmp slt i32 %24, %1
br i1 %25, label %10, label %26
26: ; preds = %10, %8
ret void
}