#include <algorithm>
#include <chrono>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>

struct TItem {
    int price;
    int weight;
    bool operator<(const TItem& other) const {
        return (double)price / weight > (double)other.price / other.weight;
    }
};

const int THREADS_PER_BLOCK = 192;

void BranchCPU(ssize_t e, int* w, int* p, int* s, int* U_old, int k, int* weight, int* price) {
    int s_e = s[e];
    if (k < s_e) {
        w[e] -= weight[k];
        p[e] -= price[k];
    } else {
        ++s[e];
        U_old[e] = 0;
    }
}

__global__ void BranchGPU(int* w, int* p, int* s, int* U_old, int k, int* weight, int* price, ssize_t q) {
    ssize_t e = blockIdx.x * blockDim.x + threadIdx.x;
    if (e >= q) {
    	return;
    }
    int s_e = s[e];
    if (k < s_e) {
        w[e] -= weight[k];
        p[e] -= price[k];
    } else {
        ++s[e];
        U_old[e] = 0;
    }
}

void BoundCPU(ssize_t e, int* w, int* p, int* s, int* L, int* U, int k, int n, int W, int* weight, int* price) {
    int i = s[e], w_e = w[e], p_e = p[e], weight_i = 0, price_i = 0;
    for (; i <= n; ++i) {
        weight_i = weight[i];
        price_i = price[i];
        if (w_e + weight_i <= W) {
            w_e += weight_i;
            p_e += price_i;
        } else {
            break;
        }
    }
    U[e] = p_e + (weight_i ? (W - w_e) * price_i / weight_i : 0);
    w[e] = w_e;
    p[e] = p_e;
    s[e] = i;

    for (; i < n; ++i) {
        weight_i = weight[i];
        price_i = price[i];
        if (w_e + weight_i <= W) {
            w_e += weight_i;
            p_e += price_i;
        }
    }
    L[e] = p_e;
}

__global__ void BoundGPU(int* w, int* p, int* s, int* L, int* U, int k, int n, int W, int* weight, int* price, ssize_t q) {
    ssize_t e = blockIdx.x * blockDim.x + threadIdx.x;
    if (e >= q) {
    	return;
    }
    int i = s[e], w_e = w[e], p_e = p[e], weight_i = 0, price_i = 0;
    for (; i <= n; ++i) {
        weight_i = weight[i];
        price_i = price[i];
        if (w_e + weight_i <= W) {
            w_e += weight_i;
            p_e += price_i;
        } else {
            break;
        }
    }
    U[e] = p_e + (weight_i ? (W - w_e) * price_i / weight_i : 0);
    w[e] = w_e;
    p[e] = p_e;
    s[e] = i;

    for (; i < n; ++i) {
        weight_i = weight[i];
        price_i = price[i];
        if (w_e + weight_i <= W) {
            w_e += weight_i;
            p_e += price_i;
        }
    }
    L[e] = p_e;
}

int main(int argc, char* argv[]) {
    if (argc != 3) {
        std::cerr << "Usage: " << argv[0] << " input_file output_file" << std::endl;
        return 0;
    }
    std::ifstream fin(argv[1]);
    std::ofstream fout(argv[2]);
    int n, W;
    fin >> n >> W;
    std::vector<TItem> items(n);
    for (int i = 0; i < n; ++i) {
        fin >> items[i].price >> items[i].weight;
    }
    std::sort(items.begin(), items.end());

    int* weight = (int*)malloc((n + 1) * sizeof(*weight));
    int* price = (int*)malloc((n + 1) * sizeof(*price));
    for (int i = 0; i < n; ++i) {
        weight[i] = items[i].weight;
        price[i] = items[i].price;
    }
    weight[n] = price[n] = 0;

    std::chrono::high_resolution_clock::time_point total_start = std::chrono::high_resolution_clock::now();

    int *cuda_weight = nullptr, *cuda_price = nullptr;
    ssize_t q = 1;
    int* w = (int*)malloc(q * sizeof(*w));
    int* p = (int*)malloc(q * sizeof(*p));
    int* s = (int*)malloc(q * sizeof(*s));
    int* L = (int*)malloc(q * sizeof(*L));
    int* U = (int*)malloc(q * sizeof(*U));
    w[0] = p[0] = s[0]= 0;

    BoundCPU(0, w, p, s, L, U, 0, n, W, weight, price);
    int record = L[0];
    free(L);

    for (int k = 0; k < n; ++k) {
        std::cout << "Step " << k + 1 << ", q = " << q << std::endl;
        if (q > 5000000) {
            if (cuda_weight == nullptr) {
                cudaMalloc(&cuda_weight, (n + 1) * sizeof(*cuda_weight));
                cudaMalloc(&cuda_price, (n + 1) * sizeof(*cuda_price));
                cudaMemcpy(cuda_weight, weight, (n + 1) * sizeof(*cuda_weight), cudaMemcpyHostToDevice);
                cudaMemcpy(cuda_price, price, (n + 1) * sizeof(*cuda_price), cudaMemcpyHostToDevice);
            }
            int *w_new, *p_new, *s_new, *L_new, *U_new, *U_old;
            cudaMalloc(&w_new, q * sizeof(*w_new));
            cudaMalloc(&p_new, q * sizeof(*p_new));
            cudaMalloc(&s_new, q * sizeof(*s_new));
            cudaMalloc(&U_old, q * sizeof(*U_old));
            cudaMemcpy(w_new, w, q * sizeof(*w), cudaMemcpyHostToDevice);
            cudaMemcpy(p_new, p, q * sizeof(*p), cudaMemcpyHostToDevice);
            cudaMemcpy(s_new, s, q * sizeof(*s), cudaMemcpyHostToDevice);
            cudaMemcpy(U_old, U, q * sizeof(*U), cudaMemcpyHostToDevice);

            const ssize_t q_block = (q + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK;
            BranchGPU<<<q_block, THREADS_PER_BLOCK>>>(w_new, p_new, s_new, U_old, k, cuda_weight, cuda_price, q);
            cudaDeviceSynchronize();
            
            cudaMemcpy(U, U_old, q * sizeof(*U), cudaMemcpyDeviceToHost);
            cudaFree(U_old);
            cudaMalloc(&L_new, q * sizeof(*L_new));
            cudaMalloc(&U_new, q * sizeof(*U_new));

            BoundGPU<<<q_block, THREADS_PER_BLOCK>>>(w_new, p_new, s_new, L_new, U_new, k, n, W, cuda_weight, cuda_price, q);
            cudaDeviceSynchronize();

            int *L_new_CPU = (int*)malloc(q * sizeof(*L_new_CPU));
            cudaMemcpy(L_new_CPU, L_new, q * sizeof(*L_new), cudaMemcpyDeviceToHost);
            cudaFree(L_new);
            for (ssize_t e = 0; e < q; ++e) {
                record = std::max(record, L_new_CPU[e]);
            }
            free(L_new_CPU);

            w = (int*)realloc(w, 2 * q * sizeof(*w));
            p = (int*)realloc(p, 2 * q * sizeof(*p));
            s = (int*)realloc(s, 2 * q * sizeof(*s));
            U = (int*)realloc(U, 2 * q * sizeof(*U));
            cudaMemcpy(w + q, w_new, q * sizeof(*w), cudaMemcpyDeviceToHost);
            cudaMemcpy(p + q, p_new, q * sizeof(*p), cudaMemcpyDeviceToHost);
            cudaMemcpy(s + q, s_new, q * sizeof(*s), cudaMemcpyDeviceToHost);
            cudaMemcpy(U + q, U_new, q * sizeof(*U), cudaMemcpyDeviceToHost);
            cudaFree(w_new);
            cudaFree(p_new);
            cudaFree(s_new);
            cudaFree(U_new);

        } else {

            w = (int*)realloc(w, 2 * q * sizeof(*w));
            p = (int*)realloc(p, 2 * q * sizeof(*p));
            s = (int*)realloc(s, 2 * q * sizeof(*s));
            memcpy(w + q, w, q * sizeof(*w));
            memcpy(p + q, p, q * sizeof(*p));
            memcpy(s + q, s, q * sizeof(*s));
            for (ssize_t e = 0; e < q; ++e) {
                BranchCPU(e, w + q, p + q, s + q, U, k, weight, price);
            }

            U = (int*)realloc(U, 2 * q * sizeof(*U));
            int* L_new = (int*)malloc(q * sizeof(*L_new));
            for (ssize_t e = 0; e < q; ++e) {
                BoundCPU(e, w + q, p + q, s + q, L_new, U + q, k, n, W, weight, price);
                record = std::max(record, L_new[e]);
            }
            free(L_new);
        }

        for (ssize_t i = 0, j = 2 * q - 1; ;) {
            while (i < 2 * q && U[i] > record) {
                ++i;
            }
            while (j >= 0 && U[j] <= record) {
                --j;
            }
            if (i >= j) {
                q = j + 1;
                break;
            }
            w[i] = w[j];
            p[i] = p[j];
            s[i] = s[j];
            std::swap(U[i], U[j]);
        }
        if (q == 0) {
            break;
        }
    }

    free(w);
    free(p);
    free(s);
    free(U);
    free(weight);
    free(price);
    if (cuda_weight != nullptr) {
        cudaFree(cuda_weight);
        cudaFree(cuda_price);
    }

    std::chrono::high_resolution_clock::time_point total_end = std::chrono::high_resolution_clock::now();
    double total_time = std::chrono::duration_cast<std::chrono::duration<double>>(total_end - total_start).count();
    std::cout << "Total time: " << total_time << std::endl;
    fout << record << std::endl;

    return 0;
}

	.file	"tmpxft_00290f15_00000000-6_knapsack_gpu.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4491:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4491:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.type	_Z10cudaMallocIiE9cudaErrorPPT_m.isra.0, @function
_Z10cudaMallocIiE9cudaErrorPPT_m.isra.0:
.LFB5393:
	.cfi_startproc
	jmp	cudaMalloc@PLT
	.cfi_endproc
.LFE5393:
	.size	_Z10cudaMallocIiE9cudaErrorPPT_m.isra.0, .-_Z10cudaMallocIiE9cudaErrorPPT_m.isra.0
	.section	.text._ZNK5TItemltERKS_.isra.0,"axG",@progbits,_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_,comdat
	.align 2
	.type	_ZNK5TItemltERKS_.isra.0, @function
_ZNK5TItemltERKS_.isra.0:
.LFB5394:
	.cfi_startproc
	cvtsi2sdl	%esi, %xmm2
	cvtsi2sdl	%edi, %xmm1
	cvtsi2sdl	%edx, %xmm0
	divsd	%xmm2, %xmm1
	cvtsi2sdl	%ecx, %xmm2
	divsd	%xmm2, %xmm0
	comisd	%xmm0, %xmm1
	seta	%al
	ret
	.cfi_endproc
.LFE5394:
	.size	_ZNK5TItemltERKS_.isra.0, .-_ZNK5TItemltERKS_.isra.0
	.section	.text._ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_.isra.0,"axG",@progbits,_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_,comdat
	.type	_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_.isra.0, @function
_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_.isra.0:
.LFB5395:
	.cfi_startproc
	movq	%rdi, %r8
	movl	(%rdi), %edi
	movl	4(%r8), %esi
.L5:
	movl	-4(%r8), %ecx
	movl	-8(%r8), %edx
	movq	%r8, %r9
	subq	$8, %r8
	call	_ZNK5TItemltERKS_.isra.0
	testb	%al, %al
	je	.L8
	movq	(%r8), %rax
	movq	%rax, 8(%r8)
	jmp	.L5
.L8:
	movl	%edi, (%r9)
	movl	%esi, 4(%r9)
	ret
	.cfi_endproc
.LFE5395:
	.size	_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_.isra.0, .-_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_.isra.0
	.section	.text._ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_.isra.0,"axG",@progbits,_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_,comdat
	.type	_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_.isra.0, @function
_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_.isra.0:
.LFB5396:
	.cfi_startproc
	cmpq	%rsi, %rdi
	jne	.L19
	ret
.L19:
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$8, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	8(%rdi), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	pushq	%rdx
	.cfi_def_cfa_offset 64
.L11:
	cmpq	%rbp, %r12
	je	.L23
	movl	0(%rbp), %r14d
	movl	4(%rbp), %r13d
	movl	4(%rbx), %ecx
	movl	(%rbx), %edx
	movl	%r13d, %esi
	movl	%r14d, %edi
	call	_ZNK5TItemltERKS_.isra.0
	testb	%al, %al
	je	.L12
	movq	%rbp, %rdx
	subq	%rbx, %rdx
	cmpq	$8, %rdx
	jle	.L13
	movq	%r15, %rdi
	movq	%rbx, %rsi
	subq	%rdx, %rdi
	addq	%rbp, %rdi
	call	memmove@PLT
	jmp	.L14
.L13:
	jne	.L14
	movq	(%rbx), %rax
	movq	%rax, 0(%rbp)
.L14:
	movl	%r14d, (%rbx)
	movl	%r13d, 4(%rbx)
	jmp	.L15
.L12:
	movq	%rbp, %rdi
	call	_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_.isra.0
.L15:
	addq	$8, %rbp
	jmp	.L11
.L23:
	popq	%rax
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5396:
	.size	_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_.isra.0, .-_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_.isra.0
	.section	.text._ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_.isra.0,"axG",@progbits,_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_,comdat
	.type	_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_.isra.0, @function
_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_.isra.0:
.LFB5397:
	.cfi_startproc
	leaq	-1(%rdx), %rax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdx, %r10
	movq	%rdi, %r9
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	cqto
	movq	%rsi, %r8
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rcx, %rbx
	movl	$2, %ecx
	idivq	%rcx
	movq	%rax, %r12
.L25:
	cmpq	%r12, %r8
	jge	.L35
	leaq	1(%r8), %r11
	addq	%r11, %r11
	leaq	-1(%r11), %r13
	leaq	(%r9,%r11,8), %rdi
	leaq	(%r9,%r13,8), %rdx
	movl	4(%rdi), %esi
	movl	(%rdi), %edi
	movl	4(%rdx), %ecx
	movl	(%rdx), %edx
	call	_ZNK5TItemltERKS_.isra.0
	testb	%al, %al
	cmove	%r11, %r13
	movq	(%r9,%r13,8), %rax
	movq	%rax, (%r9,%r8,8)
	movq	%r13, %r8
	jmp	.L25
.L35:
	testl	$1, %r10d
	jne	.L28
	leaq	-2(%r10), %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	cmpq	%rax, %r8
	jne	.L28
	leaq	1(%r8,%r8), %rax
	movq	(%r9,%rax,8), %rdx
	movq	%rdx, (%r9,%r8,8)
	movq	%rax, %r8
.L28:
	leaq	-1(%r8), %rax
	movl	$2, %ecx
	movq	%rbx, %r11
	movl	%ebx, %r12d
	cqto
	sarq	$32, %r11
	movl	$2, %r14d
	idivq	%rcx
	movl	%r11d, %r13d
	movq	%rax, %r10
.L30:
	leaq	(%r9,%r8,8), %r15
	cmpq	%r8, %rbp
	jge	.L29
	leaq	(%r9,%r10,8), %r8
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movl	4(%r8), %esi
	movl	(%r8), %edi
	call	_ZNK5TItemltERKS_.isra.0
	testb	%al, %al
	je	.L29
	movq	(%r8), %rax
	movq	%r10, %r8
	movq	%rax, (%r15)
	leaq	-1(%r10), %rax
	cqto
	idivq	%r14
	movq	%rax, %r10
	jmp	.L30
.L29:
	movl	%ebx, (%r15)
	movl	%r11d, 4(%r15)
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5397:
	.size	_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_.isra.0, .-_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_.isra.0
	.text
	.globl	_Z9BranchCPUlPiS_S_S_iS_S_
	.type	_Z9BranchCPUlPiS_S_S_iS_S_, @function
_Z9BranchCPUlPiS_S_S_iS_S_:
.LFB4483:
	.cfi_startproc
	endbr64
	leaq	0(,%rdi,4), %rax
	movq	%rsi, %r10
	movq	%rdx, %rsi
	addq	%rax, %rcx
	movl	(%rcx), %edx
	cmpl	%r9d, %edx
	jle	.L37
	movq	8(%rsp), %rdx
	movslq	%r9d, %r9
	movl	(%rdx,%r9,4), %edx
	subl	%edx, (%r10,%rax)
	movq	16(%rsp), %rdx
	movl	(%rdx,%r9,4), %edx
	subl	%edx, (%rsi,%rax)
	ret
.L37:
	incl	%edx
	xorl	%eax, %eax
	movl	%edx, (%rcx)
	movl	%eax, (%r8,%rdi,4)
	ret
	.cfi_endproc
.LFE4483:
	.size	_Z9BranchCPUlPiS_S_S_iS_S_, .-_Z9BranchCPUlPiS_S_S_iS_S_
	.globl	_Z8BoundCPUlPiS_S_S_S_iiiS_S_
	.type	_Z8BoundCPUlPiS_S_S_S_iiiS_S_, @function
_Z8BoundCPUlPiS_S_S_S_iiiS_S_:
.LFB4484:
	.cfi_startproc
	endbr64
	leaq	0(,%rdi,4), %rax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r11
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	(%rsi,%rax), %r12
	xorl	%esi, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	(%rdx,%rax), %rbp
	xorl	%edx, %edx
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	(%rcx,%rax), %rbx
	movl	72(%rsp), %r13d
	movq	88(%rsp), %r14
	movl	(%r12), %r10d
	movl	0(%rbp), %edi
	movslq	(%rbx), %rcx
.L40:
	cmpl	%ecx, 64(%rsp)
	jl	.L41
	movq	80(%rsp), %rax
	movl	(%r14,%rcx,4), %edx
	leaq	1(%rcx), %r15
	movl	(%rax,%rcx,4), %esi
	leal	(%r10,%rsi), %eax
	cmpl	%r13d, %eax
	jg	.L41
	addl	%edx, %edi
	movq	%r15, %rcx
	movl	%eax, %r10d
	jmp	.L40
.L41:
	testl	%esi, %esi
	je	.L43
	movl	%r13d, %eax
	subl	%r10d, %eax
	imull	%edx, %eax
	cltd
	idivl	%esi
	movl	%eax, %esi
.L43:
	addl	%edi, %esi
	movl	%esi, (%r9,%r11,4)
	movl	%r10d, (%r12)
	movl	%edi, 0(%rbp)
	movl	%ecx, (%rbx)
	movslq	%ecx, %rcx
.L44:
	cmpl	%ecx, 64(%rsp)
	jle	.L51
	movq	80(%rsp), %rbx
	movl	(%rbx,%rcx,4), %eax
	addl	%r10d, %eax
	cmpl	%r13d, %eax
	jg	.L45
	addl	(%r14,%rcx,4), %edi
	movl	%eax, %r10d
.L45:
	incq	%rcx
	jmp	.L44
.L51:
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	movl	%edi, (%r8,%r11,4)
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4484:
	.size	_Z8BoundCPUlPiS_S_S_S_iiiS_S_, .-_Z8BoundCPUlPiS_S_S_S_iiiS_S_
	.globl	_Z40__device_stub__Z9BranchGPUPiS_S_S_iS_S_lPiS_S_S_iS_S_l
	.type	_Z40__device_stub__Z9BranchGPUPiS_S_S_iS_S_lPiS_S_S_iS_S_l, @function
_Z40__device_stub__Z9BranchGPUPiS_S_S_iS_S_lPiS_S_S_iS_S_l:
.LFB4513:
	.cfi_startproc
	endbr64
	subq	$216, %rsp
	.cfi_def_cfa_offset 224
	movq	224(%rsp), %rax
	movq	%rdi, 56(%rsp)
	leaq	88(%rsp), %rdi
	movq	%rsi, 48(%rsp)
	leaq	100(%rsp), %rsi
	movq	%rdx, 40(%rsp)
	leaq	72(%rsp), %rdx
	movq	%rcx, 32(%rsp)
	leaq	80(%rsp), %rcx
	movl	%r8d, 28(%rsp)
	movq	%r9, 16(%rsp)
	movq	%rax, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 200(%rsp)
	xorl	%eax, %eax
	leaq	56(%rsp), %rax
	movl	$1, 96(%rsp)
	movq	%rax, 136(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	28(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	232(%rsp), %rax
	movq	%rax, 192(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 88(%rsp)
	movq	%rax, 100(%rsp)
	movl	$1, 108(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L52
	pushq	80(%rsp)
	.cfi_def_cfa_offset 232
	leaq	_Z9BranchGPUPiS_S_S_iS_S_l(%rip), %rdi
	pushq	80(%rsp)
	.cfi_def_cfa_offset 240
	movq	116(%rsp), %rcx
	movl	124(%rsp), %r8d
	movq	104(%rsp), %rsi
	movl	112(%rsp), %edx
	leaq	152(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 232
	popq	%rdx
	.cfi_def_cfa_offset 224
.L52:
	movq	200(%rsp), %rax
	subq	%fs:40, %rax
	je	.L54
	call	__stack_chk_fail@PLT
.L54:
	addq	$216, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4513:
	.size	_Z40__device_stub__Z9BranchGPUPiS_S_S_iS_S_lPiS_S_S_iS_S_l, .-_Z40__device_stub__Z9BranchGPUPiS_S_S_iS_S_lPiS_S_S_iS_S_l
	.globl	_Z9BranchGPUPiS_S_S_iS_S_l
	.type	_Z9BranchGPUPiS_S_S_iS_S_l, @function
_Z9BranchGPUPiS_S_S_iS_S_l:
.LFB4514:
	.cfi_startproc
	endbr64
	jmp	_Z40__device_stub__Z9BranchGPUPiS_S_S_iS_S_lPiS_S_S_iS_S_l
	.cfi_endproc
.LFE4514:
	.size	_Z9BranchGPUPiS_S_S_iS_S_l, .-_Z9BranchGPUPiS_S_S_iS_S_l
	.globl	_Z43__device_stub__Z8BoundGPUPiS_S_S_S_iiiS_S_lPiS_S_S_S_iiiS_S_l
	.type	_Z43__device_stub__Z8BoundGPUPiS_S_S_S_iiiS_S_lPiS_S_S_S_iiiS_S_l, @function
_Z43__device_stub__Z8BoundGPUPiS_S_S_S_iiiS_S_lPiS_S_S_S_iiiS_S_l:
.LFB4515:
	.cfi_startproc
	endbr64
	subq	$232, %rsp
	.cfi_def_cfa_offset 240
	movq	256(%rsp), %rax
	movq	%rdi, 56(%rsp)
	leaq	80(%rsp), %rdi
	movq	%rsi, 48(%rsp)
	leaq	92(%rsp), %rsi
	movq	%rax, 8(%rsp)
	movq	264(%rsp), %rax
	movq	%rdx, 40(%rsp)
	leaq	64(%rsp), %rdx
	movq	%rcx, 32(%rsp)
	leaq	72(%rsp), %rcx
	movq	%r8, 24(%rsp)
	movl	%r9d, 20(%rsp)
	movq	%rax, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	leaq	56(%rsp), %rax
	movl	$1, 88(%rsp)
	movq	%rax, 128(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	240(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	248(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 192(%rsp)
	movq	%rsp, %rax
	movq	%rax, 200(%rsp)
	leaq	272(%rsp), %rax
	movq	%rax, 208(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 80(%rsp)
	movq	%rax, 92(%rsp)
	movl	$1, 100(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L57
	pushq	72(%rsp)
	.cfi_def_cfa_offset 248
	leaq	_Z8BoundGPUPiS_S_S_S_iiiS_S_l(%rip), %rdi
	pushq	72(%rsp)
	.cfi_def_cfa_offset 256
	movq	108(%rsp), %rcx
	movl	116(%rsp), %r8d
	movq	96(%rsp), %rsi
	movl	104(%rsp), %edx
	leaq	144(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 248
	popq	%rdx
	.cfi_def_cfa_offset 240
.L57:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	je	.L59
	call	__stack_chk_fail@PLT
.L59:
	addq	$232, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4515:
	.size	_Z43__device_stub__Z8BoundGPUPiS_S_S_S_iiiS_S_lPiS_S_S_S_iiiS_S_l, .-_Z43__device_stub__Z8BoundGPUPiS_S_S_S_iiiS_S_lPiS_S_S_S_iiiS_S_l
	.globl	_Z8BoundGPUPiS_S_S_S_iiiS_S_l
	.type	_Z8BoundGPUPiS_S_S_S_iiiS_S_l, @function
_Z8BoundGPUPiS_S_S_S_iiiS_S_l:
.LFB4516:
	.cfi_startproc
	endbr64
	jmp	_Z43__device_stub__Z8BoundGPUPiS_S_S_S_iiiS_S_lPiS_S_S_S_iiiS_S_l
	.cfi_endproc
.LFE4516:
	.size	_Z8BoundGPUPiS_S_S_S_iiiS_S_l, .-_Z8BoundGPUPiS_S_S_S_iiiS_S_l
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z8BoundGPUPiS_S_S_S_iiiS_S_l"
.LC1:
	.string	"_Z9BranchGPUPiS_S_S_iS_S_l"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4518:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z8BoundGPUPiS_S_S_S_iiiS_S_l(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC1(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z9BranchGPUPiS_S_S_iS_S_l(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE4518:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata._ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_.str1.1,"aMS",@progbits,1
.LC2:
	.string	"cannot create std::vector larger than max_size()"
	.section	.text._ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_,"axG",@progbits,_ZNSt6vectorI5TItemSaIS0_EEC5EmRKS1_,comdat
	.align 2
	.weak	_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_
	.type	_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_, @function
_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_:
.LFB4885:
	.cfi_startproc
	endbr64
	movabsq	$1152921504606846975, %rax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	cmpq	%rsi, %rax
	jnb	.L65
	leaq	.LC2(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L65:
	xorl	%ecx, %ecx
	movq	%rdi, %rbx
	movq	%rsi, %rbp
	xorl	%eax, %eax
	movq	%rcx, (%rdi)
	leaq	0(,%rsi,8), %r12
	movq	%rcx, 8(%rdi)
	movq	%rcx, 16(%rdi)
	testq	%rsi, %rsi
	je	.L66
	movq	%r12, %rdi
	call	_Znwm@PLT
.L66:
	addq	%rax, %r12
	movq	%rax, (%rbx)
	movq	%rax, %rdx
	movq	%rax, 8(%rbx)
	movq	%r12, 16(%rbx)
	testq	%rbp, %rbp
	je	.L67
	xorl	%edx, %edx
	decq	%rbp
	movq	%rdx, (%rax)
	leaq	8(%rax), %rdx
	je	.L67
.L68:
	cmpq	%rdx, %r12
	je	.L67
	movq	(%rax), %rcx
	addq	$8, %rdx
	movq	%rcx, -8(%rdx)
	jmp	.L68
.L67:
	movq	%rdx, 8(%rbx)
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4885:
	.size	_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_, .-_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_
	.weak	_ZNSt6vectorI5TItemSaIS0_EEC1EmRKS1_
	.set	_ZNSt6vectorI5TItemSaIS0_EEC1EmRKS1_,_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_
	.section	.text._ZNSt6vectorI5TItemSaIS0_EED2Ev,"axG",@progbits,_ZNSt6vectorI5TItemSaIS0_EED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorI5TItemSaIS0_EED2Ev
	.type	_ZNSt6vectorI5TItemSaIS0_EED2Ev, @function
_ZNSt6vectorI5TItemSaIS0_EED2Ev:
.LFB4888:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L78
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L78:
	ret
	.cfi_endproc
.LFE4888:
	.size	_ZNSt6vectorI5TItemSaIS0_EED2Ev, .-_ZNSt6vectorI5TItemSaIS0_EED2Ev
	.weak	_ZNSt6vectorI5TItemSaIS0_EED1Ev
	.set	_ZNSt6vectorI5TItemSaIS0_EED1Ev,_ZNSt6vectorI5TItemSaIS0_EED2Ev
	.section	.text._ZSt9iter_swapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEES7_EvT_T0_,"axG",@progbits,_ZSt9iter_swapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEES7_EvT_T0_,comdat
	.weak	_ZSt9iter_swapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEES7_EvT_T0_
	.type	_ZSt9iter_swapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEES7_EvT_T0_, @function
_ZSt9iter_swapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEES7_EvT_T0_:
.LFB5361:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movq	(%rsi), %rdx
	movq	%rdx, (%rdi)
	movq	%rax, (%rsi)
	ret
	.cfi_endproc
.LFE5361:
	.size	_ZSt9iter_swapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEES7_EvT_T0_, .-_ZSt9iter_swapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEES7_EvT_T0_
	.section	.text._ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_.isra.0,"axG",@progbits,_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_,comdat
	.type	_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_.isra.0, @function
_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_.isra.0:
.LFB5407:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	8(%rdi), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
.L82:
	movq	%rbp, %rax
	subq	%rbx, %rax
	cmpq	$128, %rax
	jle	.L81
	movq	%rax, %r13
	sarq	$3, %r13
	testq	%r12, %r12
	jne	.L83
	leaq	-2(%r13), %r12
	sarq	%r12
.L86:
	movq	(%rbx,%r12,8), %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_.isra.0
	testq	%r12, %r12
	je	.L85
	decq	%r12
	jmp	.L86
.L85:
	movq	%rbp, %rax
	subq	$8, %rbp
	subq	%rbx, %rax
	cmpq	$8, %rax
	jle	.L81
	movq	(%rbx), %rax
	movq	0(%rbp), %rcx
	movq	%rbp, %rdx
	xorl	%esi, %esi
	subq	%rbx, %rdx
	movq	%rbx, %rdi
	movq	%rax, 0(%rbp)
	sarq	$3, %rdx
	call	_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_.isra.0
	jmp	.L85
.L83:
	sarq	$4, %rax
	movl	8(%rbx), %r10d
	movl	12(%rbx), %r11d
	movq	%r14, %r13
	leaq	(%rbx,%rax,8), %r8
	leaq	-8(%rbp), %r15
	movl	(%r8), %eax
	movl	4(%r8), %r9d
	movl	%r11d, %esi
	movl	%r10d, %edi
	movl	%r9d, %ecx
	movl	%eax, %edx
	movl	%eax, 12(%rsp)
	call	_ZNK5TItemltERKS_.isra.0
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %ecx
	testb	%al, %al
	je	.L89
	movl	12(%rsp), %edi
	movl	%r9d, %esi
	call	_ZNK5TItemltERKS_.isra.0
	testb	%al, %al
	je	.L90
.L94:
	movq	%r8, %rsi
	jmp	.L106
.L90:
	movl	%r11d, %esi
	movl	%r10d, %edi
	call	_ZNK5TItemltERKS_.isra.0
	testb	%al, %al
	je	.L92
.L93:
	movq	%r15, %rsi
	jmp	.L106
.L89:
	call	_ZNK5TItemltERKS_.isra.0
	testb	%al, %al
	je	.L107
.L92:
	movq	%r14, %rsi
.L106:
	movq	%rbx, %rdi
	movq	%rbp, %r15
	call	_ZSt9iter_swapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEES7_EvT_T0_
	jmp	.L98
.L107:
	movl	12(%rsp), %edi
	movl	%r9d, %esi
	call	_ZNK5TItemltERKS_.isra.0
	testb	%al, %al
	jne	.L93
	jmp	.L94
.L97:
	movq	%r13, %rdi
	movq	%r15, %rsi
	addq	$8, %r13
	call	_ZSt9iter_swapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEES7_EvT_T0_
.L98:
	movl	(%rbx), %r9d
	movl	4(%rbx), %r10d
	movq	%r13, %rax
.L95:
	movl	4(%rax), %esi
	movl	(%rax), %edi
	movl	%r9d, %edx
	movl	%r10d, %ecx
	movq	%rax, %r13
	call	_ZNK5TItemltERKS_.isra.0
	movl	%eax, %edx
	leaq	8(%r13), %rax
	testb	%dl, %dl
	jne	.L95
	leaq	-8(%r15), %r8
.L96:
	movl	4(%r8), %ecx
	movl	(%r8), %edx
	movl	%r10d, %esi
	movl	%r9d, %edi
	movq	%r8, %r15
	subq	$8, %r8
	call	_ZNK5TItemltERKS_.isra.0
	testb	%al, %al
	jne	.L96
	cmpq	%r15, %r13
	jb	.L97
	decq	%r12
	movq	%rbp, %rsi
	movq	%r13, %rdi
	movq	%r13, %rbp
	movq	%r12, %rdx
	call	_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_.isra.0
	jmp	.L82
.L81:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5407:
	.size	_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_.isra.0, .-_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_.isra.0
	.section	.text._ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_,"axG",@progbits,_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_,comdat
	.weak	_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_
	.type	_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_, @function
_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_:
.LFB4893:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	je	.L117
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsi, %rbp
	subq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rsi, %rbx
	movq	%rbp, %rax
	sarq	$3, %rax
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	bsrq	%rax, %rdx
	xorq	$63, %rdx
	testq	%rax, %rax
	movl	$64, %eax
	movq	%rdi, 8(%rsp)
	cmovne	%edx, %eax
	movl	$63, %edx
	subl	%eax, %edx
	movslq	%edx, %rdx
	addq	%rdx, %rdx
	call	_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_.isra.0
	cmpq	$128, %rbp
	movq	8(%rsp), %rdi
	jle	.L111
	leaq	128(%rdi), %rbp
	movq	%rbp, %rsi
	call	_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_.isra.0
.L112:
	cmpq	%rbx, %rbp
	je	.L120
	movq	%rbp, %rdi
	addq	$8, %rbp
	call	_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_.isra.0
	jmp	.L112
.L111:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movq	%rbx, %rsi
	popq	%rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 8
	jmp	_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_.isra.0
.L120:
	.cfi_restore_state
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L117:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE4893:
	.size	_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_, .-_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_
	.section	.rodata.str1.1
.LC3:
	.string	"Usage: "
.LC4:
	.string	" input_file output_file"
.LC5:
	.string	"Step "
.LC6:
	.string	", q = "
.LC8:
	.string	"Total time: "
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4485:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4485
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$1256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	cmpl	$3, %edi
	je	.L122
	leaq	.LC3(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
.LEHB0:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rbx), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC4(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	jmp	.L123
.L122:
	movq	8(%rsi), %rsi
	leaq	-576(%rbp), %r12
	movl	$8, %edx
	movq	%r12, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE0:
	movq	16(%rbx), %rsi
	movl	$16, %edx
	leaq	-1088(%rbp), %rdi
.LEHB1:
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE1:
	leaq	-1212(%rbp), %rsi
	movq	%r12, %rdi
.LEHB2:
	call	_ZNSirsERi@PLT
	movq	%rax, %rdi
	leaq	-1208(%rbp), %rsi
	call	_ZNSirsERi@PLT
	movslq	-1212(%rbp), %rsi
	leaq	-1124(%rbp), %rdx
	leaq	-1112(%rbp), %rdi
	call	_ZNSt6vectorI5TItemSaIS0_EEC1EmRKS1_
.LEHE2:
	xorl	%ebx, %ebx
.L124:
	movq	-1112(%rbp), %rax
	cmpl	%ebx, -1212(%rbp)
	jle	.L170
	leaq	(%rax,%rbx,8), %rax
	movq	%r12, %rdi
	movq	%rax, %rsi
	movq	%rax, %r14
.LEHB3:
	call	_ZNSirsERi@PLT
	movq	%r14, %rsi
	movq	%rax, %rdi
	addq	$4, %rsi
	call	_ZNSirsERi@PLT
	incq	%rbx
	jmp	.L124
.L170:
	movq	-1104(%rbp), %rsi
	movq	%rax, %rdi
	movq	%rax, %r14
	call	_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_
	movl	-1212(%rbp), %r12d
	leal	1(%r12), %ebx
	movslq	%ebx, %rbx
	salq	$2, %rbx
	movq	%rbx, %rdi
	call	malloc@PLT
	movq	%rbx, %rdi
	movq	%rax, -1248(%rbp)
	call	malloc@PLT
	movq	%rax, -1256(%rbp)
	xorl	%eax, %eax
.L126:
	cmpl	%eax, %r12d
	jle	.L171
	movl	4(%r14,%rax,8), %edx
	movq	-1248(%rbp), %rcx
	movl	%edx, (%rcx,%rax,4)
	movq	-1256(%rbp), %rcx
	movl	(%r14,%rax,8), %edx
	movl	%edx, (%rcx,%rax,4)
	incq	%rax
	jmp	.L126
.L171:
	movq	-1256(%rbp), %rax
	xorl	%r9d, %r9d
	xorl	%r10d, %r10d
	xorl	%r15d, %r15d
	movl	%r9d, -4(%rax,%rbx)
	movq	-1248(%rbp), %rax
	movl	%r10d, -4(%rax,%rbx)
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	xorl	%r11d, %r11d
	movl	$4, %edi
	movq	%r11, -1200(%rbp)
	movq	%r11, -1192(%rbp)
	movq	%rax, -1296(%rbp)
	call	malloc@PLT
	movl	$4, %edi
	movq	%rax, %r14
	call	malloc@PLT
	movl	$4, %edi
	movq	%rax, %r13
	call	malloc@PLT
	movl	$4, %edi
	movq	%rax, -1232(%rbp)
	call	malloc@PLT
	movl	$4, %edi
	movq	%rax, %rbx
	call	malloc@PLT
	movl	%r15d, 0(%r13)
	movq	%rbx, %r8
	movq	%r13, %rdx
	movq	%rax, %r12
	movq	-1232(%rbp), %rax
	movl	%r15d, (%r14)
	movq	%r14, %rsi
	movq	%r12, %r9
	xorl	%edi, %edi
	movl	%r15d, (%rax)
	pushq	%rax
	movl	-1208(%rbp), %eax
	pushq	-1256(%rbp)
	movq	-1232(%rbp), %rcx
	pushq	-1248(%rbp)
	pushq	%rax
	movl	-1212(%rbp), %eax
	pushq	%rax
	pushq	$0
	call	_Z8BoundCPUlPiS_S_S_S_iiiS_S_
	movl	(%rbx), %eax
	movq	%rbx, %rdi
	addq	$48, %rsp
	movl	$1, %ebx
	movl	%eax, -1204(%rbp)
	call	free@PLT
	xorl	%eax, %eax
	movl	%eax, -1236(%rbp)
.L128:
	movl	-1236(%rbp), %eax
	cmpl	%eax, -1212(%rbp)
	jle	.L148
	leaq	.LC5(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	-1236(%rbp), %eax
	incl	%eax
	movl	%eax, %esi
	movl	%eax, -1240(%rbp)
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	leaq	.LC6(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	%rbx, %rsi
	call	_ZNSo9_M_insertIlEERSoT_@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	cmpq	$5000000, %rbx
	jle	.L129
	cmpq	$0, -1200(%rbp)
	jne	.L130
	movl	-1212(%rbp), %eax
	leaq	-1200(%rbp), %rdi
	leal	1(%rax), %esi
	movslq	%esi, %rsi
	salq	$2, %rsi
	call	_Z10cudaMallocIiE9cudaErrorPPT_m.isra.0
	movl	-1212(%rbp), %eax
	leaq	-1192(%rbp), %rdi
	leal	1(%rax), %esi
	movslq	%esi, %rsi
	salq	$2, %rsi
	call	_Z10cudaMallocIiE9cudaErrorPPT_m.isra.0
	movl	-1212(%rbp), %eax
	movq	-1248(%rbp), %rsi
	movl	$1, %ecx
	movq	-1200(%rbp), %rdi
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	call	cudaMemcpy@PLT
	movl	-1212(%rbp), %eax
	movq	-1256(%rbp), %rsi
	movl	$1, %ecx
	movq	-1192(%rbp), %rdi
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	call	cudaMemcpy@PLT
.L130:
	leaq	0(,%rbx,4), %rax
	leaq	-1184(%rbp), %rdi
	movq	%rax, %rsi
	movq	%rax, -1224(%rbp)
	call	_Z10cudaMallocIiE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rsi
	leaq	-1176(%rbp), %rdi
	call	_Z10cudaMallocIiE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rsi
	leaq	-1168(%rbp), %rdi
	call	_Z10cudaMallocIiE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rsi
	leaq	-1144(%rbp), %rdi
	call	_Z10cudaMallocIiE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rdx
	movq	-1184(%rbp), %rdi
	movl	$1, %ecx
	movq	%r14, %rsi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1176(%rbp), %rdi
	movl	$1, %ecx
	movq	%r13, %rsi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1232(%rbp), %rsi
	movl	$1, %ecx
	movq	-1168(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1144(%rbp), %rdi
	movl	$1, %ecx
	movq	%r12, %rsi
	call	cudaMemcpy@PLT
	movl	$192, %esi
	movl	$67108867, %ecx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	leaq	191(%rbx), %rax
	salq	$6, %rcx
	movl	$1, -1116(%rbp)
	cqto
	movq	%rcx, -1124(%rbp)
	idivq	%rsi
	movq	%rcx, %rdx
	movl	$1, %ecx
	movl	%eax, -1136(%rbp)
	movq	%rax, %r15
	movabsq	$4294967297, %rax
	movq	%rax, -1132(%rbp)
	movq	-1136(%rbp), %rdi
	movl	-1128(%rbp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L131
	pushq	%rbx
	movl	-1236(%rbp), %r8d
	pushq	-1192(%rbp)
	movq	-1200(%rbp), %r9
	movq	-1144(%rbp), %rcx
	movq	-1168(%rbp), %rdx
	movq	-1176(%rbp), %rsi
	movq	-1184(%rbp), %rdi
	.cfi_escape 0x2e,0x10
	call	_Z40__device_stub__Z9BranchGPUPiS_S_S_iS_S_lPiS_S_S_iS_S_l
	popq	%rdi
	popq	%r8
.L131:
	.cfi_escape 0x2e,0
	call	cudaDeviceSynchronize@PLT
	movq	-1224(%rbp), %rdx
	movq	-1144(%rbp), %rsi
	movl	$2, %ecx
	movq	%r12, %rdi
	call	cudaMemcpy@PLT
	movq	-1144(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1224(%rbp), %rsi
	leaq	-1160(%rbp), %rdi
	call	_Z10cudaMallocIiE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rsi
	leaq	-1152(%rbp), %rdi
	call	_Z10cudaMallocIiE9cudaErrorPPT_m.isra.0
	movl	$67108867, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %ecx
	movabsq	$4294967297, %rax
	salq	$6, %rdx
	movl	%r15d, -1136(%rbp)
	movq	%rax, -1132(%rbp)
	movl	-1128(%rbp), %esi
	movq	-1136(%rbp), %rdi
	movq	%rdx, -1124(%rbp)
	movl	$1, -1116(%rbp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L132
	pushq	%rsi
	movl	-1208(%rbp), %eax
	pushq	%rbx
	movl	-1236(%rbp), %r9d
	pushq	-1192(%rbp)
	pushq	-1200(%rbp)
	movq	-1152(%rbp), %r8
	pushq	%rax
	movl	-1212(%rbp), %eax
	movq	-1160(%rbp), %rcx
	movq	-1168(%rbp), %rdx
	movq	-1176(%rbp), %rsi
	pushq	%rax
	movq	-1184(%rbp), %rdi
	.cfi_escape 0x2e,0x30
	call	_Z43__device_stub__Z8BoundGPUPiS_S_S_S_iiiS_S_lPiS_S_S_S_iiiS_S_l
	addq	$48, %rsp
.L132:
	.cfi_escape 0x2e,0
	call	cudaDeviceSynchronize@PLT
	movq	-1224(%rbp), %rdi
	call	malloc@PLT
	movq	-1224(%rbp), %rdx
	movl	$2, %ecx
	movq	-1160(%rbp), %rsi
	movq	%rax, %rdi
	movq	%rax, %r15
	call	cudaMemcpy@PLT
	movq	-1160(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1224(%rbp), %rcx
	movq	%r15, %rax
	leaq	-1204(%rbp), %rsi
	addq	%r15, %rcx
.L134:
	movl	(%rax), %edi
	movq	%rax, %rdx
	cmpl	%edi, -1204(%rbp)
	cmovge	%rsi, %rdx
	addq	$4, %rax
	movl	(%rdx), %edx
	movl	%edx, -1204(%rbp)
	cmpq	%rcx, %rax
	jne	.L134
	movq	%r15, %rdi
	leaq	0(,%rbx,8), %r15
	call	free@PLT
	movq	%r14, %rdi
	movq	%r15, %rsi
	call	realloc@PLT
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%rax, %r14
	call	realloc@PLT
	movq	-1232(%rbp), %rdi
	movq	%r15, %rsi
	movq	%rax, %r13
	call	realloc@PLT
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rax, -1232(%rbp)
	call	realloc@PLT
	movq	-1184(%rbp), %rsi
	movl	$2, %ecx
	movq	%rax, %r12
	movq	-1224(%rbp), %rax
	leaq	(%r14,%rax), %rdi
	movq	%rax, %rdx
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rax
	movq	-1176(%rbp), %rsi
	movl	$2, %ecx
	leaq	0(%r13,%rax), %rdi
	movq	%rax, %rdx
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rcx
	movq	-1232(%rbp), %rax
	movq	-1224(%rbp), %rdx
	movq	-1168(%rbp), %rsi
	leaq	(%rax,%rcx), %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rax
	movq	-1152(%rbp), %rsi
	movl	$2, %ecx
	leaq	(%r12,%rax), %rdi
	movq	%rax, %rdx
	call	cudaMemcpy@PLT
	movq	-1184(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1176(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1168(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1152(%rbp), %rdi
	call	cudaFree@PLT
	jmp	.L135
.L129:
	leaq	0(,%rbx,8), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	call	realloc@PLT
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%rax, %r14
	call	realloc@PLT
	movq	-1232(%rbp), %rdi
	movq	%r15, %rsi
	movq	%rax, %r13
	call	realloc@PLT
	movq	%r14, %rsi
	movq	%rax, -1232(%rbp)
	leaq	0(,%rbx,4), %rax
	cmpq	%rax, %r15
	movq	%rax, -1224(%rbp)
	movq	-1224(%rbp), %rcx
	cmovnb	%r15, %rax
	movq	-1224(%rbp), %rdx
	subq	%rcx, %rax
	movq	%rax, -1264(%rbp)
	movq	%rcx, %rax
	movq	-1264(%rbp), %rcx
	addq	%r14, %rax
	movq	%rax, %rdi
	movq	%rax, -1272(%rbp)
	call	__memcpy_chk@PLT
	movq	-1224(%rbp), %rax
	movq	-1264(%rbp), %rcx
	movq	%r13, %rsi
	movq	-1224(%rbp), %rdx
	addq	%r13, %rax
	movq	%rax, %rdi
	movq	%rax, -1280(%rbp)
	call	__memcpy_chk@PLT
	movq	-1224(%rbp), %rcx
	movq	-1232(%rbp), %rax
	movq	-1224(%rbp), %rdx
	movq	-1232(%rbp), %rsi
	addq	%rcx, %rax
	movq	-1264(%rbp), %rcx
	movq	%rax, %rdi
	movq	%rax, -1288(%rbp)
	call	__memcpy_chk@PLT
	xorl	%edi, %edi
.L136:
	cmpq	%rdi, %rbx
	jle	.L172
	pushq	-1256(%rbp)
	movq	-1288(%rbp), %rcx
	movq	%r12, %r8
	movq	-1280(%rbp), %rdx
	pushq	-1248(%rbp)
	movl	-1236(%rbp), %r9d
	movq	-1272(%rbp), %rsi
	call	_Z9BranchCPUlPiS_S_S_iS_S_
	popq	%rdx
	incq	%rdi
	popq	%rcx
	jmp	.L136
.L172:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%r15d, %r15d
	call	realloc@PLT
	movq	-1224(%rbp), %rdi
	movq	%rax, %r12
	call	malloc@PLT
	movq	-1224(%rbp), %r9
	movq	%rax, %r8
	addq	%r12, %r9
.L138:
	movl	-1204(%rbp), %eax
	movl	%eax, -1224(%rbp)
	cmpq	%r15, %rbx
	jle	.L173
	pushq	%rax
	movl	-1208(%rbp), %eax
	movq	%r15, %rdi
	pushq	-1256(%rbp)
	movq	-1288(%rbp), %rcx
	movq	-1280(%rbp), %rdx
	pushq	-1248(%rbp)
	movq	-1272(%rbp), %rsi
	pushq	%rax
	movl	-1212(%rbp), %eax
	pushq	%rax
	movl	-1236(%rbp), %eax
	pushq	%rax
	call	_Z8BoundCPUlPiS_S_S_S_iiiS_S_
	movl	-1224(%rbp), %ecx
	addq	$48, %rsp
	leaq	-1204(%rbp), %rax
	cmpl	(%r8,%r15,4), %ecx
	jge	.L139
	leaq	(%r8,%r15,4), %rax
.L139:
	movl	(%rax), %eax
	incq	%r15
	movl	%eax, -1204(%rbp)
	jmp	.L138
.L173:
	movq	%r8, %rdi
	call	free@PLT
.L135:
	leaq	(%rbx,%rbx), %rdi
	movl	-1204(%rbp), %esi
	xorl	%eax, %eax
	leaq	-1(%rdi), %rbx
.L141:
	cmpq	%rax, %rdi
	jle	.L144
	cmpl	%esi, (%r12,%rax,4)
	jle	.L144
	incq	%rax
	jmp	.L141
.L174:
	cmpl	(%r12,%rbx,4), %esi
	jl	.L145
	decq	%rbx
.L144:
	testq	%rbx, %rbx
	jns	.L174
.L145:
	cmpq	%rbx, %rax
	jl	.L147
	incq	%rbx
	je	.L148
	movl	-1240(%rbp), %eax
	movl	%eax, -1236(%rbp)
	jmp	.L128
.L147:
	movl	(%r14,%rbx,4), %edx
	movq	-1232(%rbp), %rcx
	movl	%edx, (%r14,%rax,4)
	movl	0(%r13,%rbx,4), %edx
	movl	%edx, 0(%r13,%rax,4)
	movl	(%rcx,%rbx,4), %edx
	movl	%edx, (%rcx,%rax,4)
	leaq	(%r12,%rbx,4), %rdx
	leaq	(%r12,%rax,4), %rcx
	movl	(%rcx), %r8d
	movl	(%rdx), %r9d
	movl	%r9d, (%rcx)
	movl	%r8d, (%rdx)
	jmp	.L141
.L148:
	movq	%r14, %rdi
	call	free@PLT
	movq	%r13, %rdi
	call	free@PLT
	movq	-1232(%rbp), %rdi
	call	free@PLT
	movq	%r12, %rdi
	call	free@PLT
	movq	-1248(%rbp), %rdi
	call	free@PLT
	movq	-1256(%rbp), %rdi
	call	free@PLT
	movq	-1200(%rbp), %rdi
	testq	%rdi, %rdi
	je	.L151
	call	cudaFree@PLT
	movq	-1192(%rbp), %rdi
	call	cudaFree@PLT
.L151:
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movq	-1296(%rbp), %rcx
	leaq	.LC8(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	subq	%rcx, %rax
	cvtsi2sdq	%rax, %xmm0
	divsd	.LC7(%rip), %xmm0
	movq	%xmm0, %rbx
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	%rbx, %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	leaq	-1088(%rbp), %rbx
	movl	-1204(%rbp), %esi
	movq	%rbx, %rdi
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
.LEHE3:
	leaq	-1112(%rbp), %rdi
	call	_ZNSt6vectorI5TItemSaIS0_EED1Ev
	movq	%rbx, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	leaq	-576(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
.L123:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L156
	jmp	.L168
.L160:
	endbr64
	movq	%rax, %rbx
.L152:
	leaq	-1112(%rbp), %rdi
	call	_ZNSt6vectorI5TItemSaIS0_EED1Ev
	jmp	.L153
.L159:
	endbr64
	movq	%rax, %rbx
.L153:
	leaq	-1088(%rbp), %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L154
.L158:
	endbr64
	movq	%rax, %rbx
.L154:
	leaq	-576(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L168
	movq	%rbx, %rdi
.LEHB4:
	call	_Unwind_Resume@PLT
.LEHE4:
.L168:
	call	__stack_chk_fail@PLT
.L156:
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4485:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4485:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4485-.LLSDACSB4485
.LLSDACSB4485:
	.uleb128 .LEHB0-.LFB4485
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB4485
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L158-.LFB4485
	.uleb128 0
	.uleb128 .LEHB2-.LFB4485
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L159-.LFB4485
	.uleb128 0
	.uleb128 .LEHB3-.LFB4485
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L160-.LFB4485
	.uleb128 0
	.uleb128 .LEHB4-.LFB4485
	.uleb128 .LEHE4-.LEHB4
	.uleb128 0
	.uleb128 0
.LLSDACSE4485:
	.section	.text.startup
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC7:
	.long	0
	.long	1104006501
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <algorithm>
#include <chrono>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>

struct TItem {
    int price;
    int weight;
    bool operator<(const TItem& other) const {
        return (double)price / weight > (double)other.price / other.weight;
    }
};

const int THREADS_PER_BLOCK = 192;

void BranchCPU(ssize_t e, int* w, int* p, int* s, int* U_old, int k, int* weight, int* price) {
    int s_e = s[e];
    if (k < s_e) {
        w[e] -= weight[k];
        p[e] -= price[k];
    } else {
        ++s[e];
        U_old[e] = 0;
    }
}

__global__ void BranchGPU(int* w, int* p, int* s, int* U_old, int k, int* weight, int* price, ssize_t q) {
    ssize_t e = blockIdx.x * blockDim.x + threadIdx.x;
    if (e >= q) {
    	return;
    }
    int s_e = s[e];
    if (k < s_e) {
        w[e] -= weight[k];
        p[e] -= price[k];
    } else {
        ++s[e];
        U_old[e] = 0;
    }
}

void BoundCPU(ssize_t e, int* w, int* p, int* s, int* L, int* U, int k, int n, int W, int* weight, int* price) {
    int i = s[e], w_e = w[e], p_e = p[e], weight_i = 0, price_i = 0;
    for (; i <= n; ++i) {
        weight_i = weight[i];
        price_i = price[i];
        if (w_e + weight_i <= W) {
            w_e += weight_i;
            p_e += price_i;
        } else {
            break;
        }
    }
    U[e] = p_e + (weight_i ? (W - w_e) * price_i / weight_i : 0);
    w[e] = w_e;
    p[e] = p_e;
    s[e] = i;

    for (; i < n; ++i) {
        weight_i = weight[i];
        price_i = price[i];
        if (w_e + weight_i <= W) {
            w_e += weight_i;
            p_e += price_i;
        }
    }
    L[e] = p_e;
}

__global__ void BoundGPU(int* w, int* p, int* s, int* L, int* U, int k, int n, int W, int* weight, int* price, ssize_t q) {
    ssize_t e = blockIdx.x * blockDim.x + threadIdx.x;
    if (e >= q) {
    	return;
    }
    int i = s[e], w_e = w[e], p_e = p[e], weight_i = 0, price_i = 0;
    for (; i <= n; ++i) {
        weight_i = weight[i];
        price_i = price[i];
        if (w_e + weight_i <= W) {
            w_e += weight_i;
            p_e += price_i;
        } else {
            break;
        }
    }
    U[e] = p_e + (weight_i ? (W - w_e) * price_i / weight_i : 0);
    w[e] = w_e;
    p[e] = p_e;
    s[e] = i;

    for (; i < n; ++i) {
        weight_i = weight[i];
        price_i = price[i];
        if (w_e + weight_i <= W) {
            w_e += weight_i;
            p_e += price_i;
        }
    }
    L[e] = p_e;
}

int main(int argc, char* argv[]) {
    if (argc != 3) {
        std::cerr << "Usage: " << argv[0] << " input_file output_file" << std::endl;
        return 0;
    }
    std::ifstream fin(argv[1]);
    std::ofstream fout(argv[2]);
    int n, W;
    fin >> n >> W;
    std::vector<TItem> items(n);
    for (int i = 0; i < n; ++i) {
        fin >> items[i].price >> items[i].weight;
    }
    std::sort(items.begin(), items.end());

    int* weight = (int*)malloc((n + 1) * sizeof(*weight));
    int* price = (int*)malloc((n + 1) * sizeof(*price));
    for (int i = 0; i < n; ++i) {
        weight[i] = items[i].weight;
        price[i] = items[i].price;
    }
    weight[n] = price[n] = 0;

    std::chrono::high_resolution_clock::time_point total_start = std::chrono::high_resolution_clock::now();

    int *cuda_weight = nullptr, *cuda_price = nullptr;
    ssize_t q = 1;
    int* w = (int*)malloc(q * sizeof(*w));
    int* p = (int*)malloc(q * sizeof(*p));
    int* s = (int*)malloc(q * sizeof(*s));
    int* L = (int*)malloc(q * sizeof(*L));
    int* U = (int*)malloc(q * sizeof(*U));
    w[0] = p[0] = s[0]= 0;

    BoundCPU(0, w, p, s, L, U, 0, n, W, weight, price);
    int record = L[0];
    free(L);

    for (int k = 0; k < n; ++k) {
        std::cout << "Step " << k + 1 << ", q = " << q << std::endl;
        if (q > 5000000) {
            if (cuda_weight == nullptr) {
                hipMalloc(&cuda_weight, (n + 1) * sizeof(*cuda_weight));
                hipMalloc(&cuda_price, (n + 1) * sizeof(*cuda_price));
                hipMemcpy(cuda_weight, weight, (n + 1) * sizeof(*cuda_weight), hipMemcpyHostToDevice);
                hipMemcpy(cuda_price, price, (n + 1) * sizeof(*cuda_price), hipMemcpyHostToDevice);
            }
            int *w_new, *p_new, *s_new, *L_new, *U_new, *U_old;
            hipMalloc(&w_new, q * sizeof(*w_new));
            hipMalloc(&p_new, q * sizeof(*p_new));
            hipMalloc(&s_new, q * sizeof(*s_new));
            hipMalloc(&U_old, q * sizeof(*U_old));
            hipMemcpy(w_new, w, q * sizeof(*w), hipMemcpyHostToDevice);
            hipMemcpy(p_new, p, q * sizeof(*p), hipMemcpyHostToDevice);
            hipMemcpy(s_new, s, q * sizeof(*s), hipMemcpyHostToDevice);
            hipMemcpy(U_old, U, q * sizeof(*U), hipMemcpyHostToDevice);

            const ssize_t q_block = (q + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK;
            BranchGPU<<<q_block, THREADS_PER_BLOCK>>>(w_new, p_new, s_new, U_old, k, cuda_weight, cuda_price, q);
            hipDeviceSynchronize();
            
            hipMemcpy(U, U_old, q * sizeof(*U), hipMemcpyDeviceToHost);
            hipFree(U_old);
            hipMalloc(&L_new, q * sizeof(*L_new));
            hipMalloc(&U_new, q * sizeof(*U_new));

            BoundGPU<<<q_block, THREADS_PER_BLOCK>>>(w_new, p_new, s_new, L_new, U_new, k, n, W, cuda_weight, cuda_price, q);
            hipDeviceSynchronize();

            int *L_new_CPU = (int*)malloc(q * sizeof(*L_new_CPU));
            hipMemcpy(L_new_CPU, L_new, q * sizeof(*L_new), hipMemcpyDeviceToHost);
            hipFree(L_new);
            for (ssize_t e = 0; e < q; ++e) {
                record = std::max(record, L_new_CPU[e]);
            }
            free(L_new_CPU);

            w = (int*)realloc(w, 2 * q * sizeof(*w));
            p = (int*)realloc(p, 2 * q * sizeof(*p));
            s = (int*)realloc(s, 2 * q * sizeof(*s));
            U = (int*)realloc(U, 2 * q * sizeof(*U));
            hipMemcpy(w + q, w_new, q * sizeof(*w), hipMemcpyDeviceToHost);
            hipMemcpy(p + q, p_new, q * sizeof(*p), hipMemcpyDeviceToHost);
            hipMemcpy(s + q, s_new, q * sizeof(*s), hipMemcpyDeviceToHost);
            hipMemcpy(U + q, U_new, q * sizeof(*U), hipMemcpyDeviceToHost);
            hipFree(w_new);
            hipFree(p_new);
            hipFree(s_new);
            hipFree(U_new);

        } else {

            w = (int*)realloc(w, 2 * q * sizeof(*w));
            p = (int*)realloc(p, 2 * q * sizeof(*p));
            s = (int*)realloc(s, 2 * q * sizeof(*s));
            memcpy(w + q, w, q * sizeof(*w));
            memcpy(p + q, p, q * sizeof(*p));
            memcpy(s + q, s, q * sizeof(*s));
            for (ssize_t e = 0; e < q; ++e) {
                BranchCPU(e, w + q, p + q, s + q, U, k, weight, price);
            }

            U = (int*)realloc(U, 2 * q * sizeof(*U));
            int* L_new = (int*)malloc(q * sizeof(*L_new));
            for (ssize_t e = 0; e < q; ++e) {
                BoundCPU(e, w + q, p + q, s + q, L_new, U + q, k, n, W, weight, price);
                record = std::max(record, L_new[e]);
            }
            free(L_new);
        }

        for (ssize_t i = 0, j = 2 * q - 1; ;) {
            while (i < 2 * q && U[i] > record) {
                ++i;
            }
            while (j >= 0 && U[j] <= record) {
                --j;
            }
            if (i >= j) {
                q = j + 1;
                break;
            }
            w[i] = w[j];
            p[i] = p[j];
            s[i] = s[j];
            std::swap(U[i], U[j]);
        }
        if (q == 0) {
            break;
        }
    }

    free(w);
    free(p);
    free(s);
    free(U);
    free(weight);
    free(price);
    if (cuda_weight != nullptr) {
        hipFree(cuda_weight);
        hipFree(cuda_price);
    }

    std::chrono::high_resolution_clock::time_point total_end = std::chrono::high_resolution_clock::now();
    double total_time = std::chrono::duration_cast<std::chrono::duration<double>>(total_end - total_start).count();
    std::cout << "Total time: " << total_time << std::endl;
    fout << record << std::endl;

    return 0;
}

	.text
	.file	"knapsack_gpu.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_Z9BranchCPUlPiS_S_S_iS_S_      # -- Begin function _Z9BranchCPUlPiS_S_S_iS_S_
	.type	_Z9BranchCPUlPiS_S_S_iS_S_,@function
_Z9BranchCPUlPiS_S_S_iS_S_:             # @_Z9BranchCPUlPiS_S_S_iS_S_
	.cfi_startproc
# %bb.0:
	movl	(%rcx,%rdi,4), %eax
	cmpl	%r9d, %eax
	jle	.LBB0_2
# %bb.1:
	movq	16(%rsp), %rax
	movq	8(%rsp), %rcx
	movslq	%r9d, %r8
	movl	(%rcx,%r8,4), %ecx
	subl	%ecx, (%rsi,%rdi,4)
	movl	(%rax,%r8,4), %eax
	subl	%eax, (%rdx,%rdi,4)
	retq
.LBB0_2:
	incl	%eax
	movl	%eax, (%rcx,%rdi,4)
	movl	$0, (%r8,%rdi,4)
	retq
.Lfunc_end0:
	.size	_Z9BranchCPUlPiS_S_S_iS_S_, .Lfunc_end0-_Z9BranchCPUlPiS_S_S_iS_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z24__device_stub__BranchGPUPiS_S_S_iS_S_l # -- Begin function _Z24__device_stub__BranchGPUPiS_S_S_iS_S_l
	.type	_Z24__device_stub__BranchGPUPiS_S_S_iS_S_l,@function
_Z24__device_stub__BranchGPUPiS_S_S_iS_S_l: # @_Z24__device_stub__BranchGPUPiS_S_S_iS_S_l
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$160, %rsp
	.cfi_def_cfa_offset 208
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	4(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	24(%rsp), %r8
	movq	%r9, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	208(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	216(%rsp), %rax
	movq	%rax, 56(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z9BranchGPUPiS_S_S_iS_S_l, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$176, %rsp
	.cfi_adjust_cfa_offset -176
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z24__device_stub__BranchGPUPiS_S_S_iS_S_l, .Lfunc_end1-_Z24__device_stub__BranchGPUPiS_S_S_iS_S_l
	.cfi_endproc
                                        # -- End function
	.globl	_Z8BoundCPUlPiS_S_S_S_iiiS_S_   # -- Begin function _Z8BoundCPUlPiS_S_S_S_iiiS_S_
	.type	_Z8BoundCPUlPiS_S_S_S_iiiS_S_,@function
_Z8BoundCPUlPiS_S_S_S_iiiS_S_:          # @_Z8BoundCPUlPiS_S_S_S_iiiS_S_
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, %r10
	movq	88(%rsp), %r13
	movq	80(%rsp), %r14
	movl	72(%rsp), %ebp
	movl	64(%rsp), %r11d
	movl	(%rcx,%rdi,4), %edx
	movl	(%rsi,%rdi,4), %r15d
	movl	(%r10,%rdi,4), %ebx
	xorl	%eax, %eax
	cmpl	%r11d, %edx
	jle	.LBB2_2
# %bb.1:
                                        # kill: def $edx killed $edx killed $rdx
	jmp	.LBB2_11
.LBB2_2:                                # %.lr.ph.preheader
	movq	%rsi, -40(%rsp)                 # 8-byte Spill
	movq	%r10, -24(%rsp)                 # 8-byte Spill
	movq	%r9, -16(%rsp)                  # 8-byte Spill
	movq	%rcx, -32(%rsp)                 # 8-byte Spill
	movq	%r8, -8(%rsp)                   # 8-byte Spill
	movslq	%edx, %rax
	leal	1(%r11), %ecx
	movl	%ecx, -44(%rsp)                 # 4-byte Spill
	leaq	(%r14,%rax,4), %r8
	leaq	(,%rax,4), %r9
	addq	%r13, %r9
	movl	%r11d, %ecx
	notl	%ecx
	addq	%rdx, %rcx
	xorl	%r10d, %r10d
.LBB2_3:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	(%r8,%r10,4), %r12d
	movl	(%r9,%r10,4), %eax
	leal	(%r12,%r15), %r11d
	cmpl	%ebp, %r11d
	jg	.LBB2_6
# %bb.4:                                #   in Loop: Header=BB2_3 Depth=1
	addl	%eax, %ebx
	incq	%r10
	movl	%ecx, %esi
	movl	%r11d, %r15d
	addl	%r10d, %esi
	jne	.LBB2_3
# %bb.5:
	movl	%r11d, %r15d
	jmp	.LBB2_7
.LBB2_6:                                # %._crit_edge.split.loop.exit104
	addl	%edx, %r10d
	movl	%r10d, %ecx
	movl	%r10d, -44(%rsp)                # 4-byte Spill
.LBB2_7:                                # %._crit_edge
	testl	%r12d, %r12d
	movq	-8(%rsp), %r8                   # 8-byte Reload
	movq	88(%rsp), %r13
	movq	-16(%rsp), %r9                  # 8-byte Reload
	movq	-24(%rsp), %r10                 # 8-byte Reload
	je	.LBB2_8
# %bb.9:
	movl	%ebp, %ecx
	subl	%r15d, %ecx
	imull	%ecx, %eax
	cltd
	idivl	%r12d
	jmp	.LBB2_10
.LBB2_8:
	xorl	%eax, %eax
.LBB2_10:                               # %._crit_edge.thread
	movq	-32(%rsp), %rcx                 # 8-byte Reload
	movl	64(%rsp), %r11d
	movq	-40(%rsp), %rsi                 # 8-byte Reload
	movl	-44(%rsp), %edx                 # 4-byte Reload
.LBB2_11:                               # %._crit_edge.thread
	addl	%ebx, %eax
	movl	%eax, (%r9,%rdi,4)
	movl	%r15d, (%rsi,%rdi,4)
	movl	%ebx, (%r10,%rdi,4)
	movl	%edx, (%rcx,%rdi,4)
	cmpl	%r11d, %edx
	jge	.LBB2_16
# %bb.12:                               # %.lr.ph85.preheader
	movslq	%edx, %rax
	movslq	%r11d, %rcx
.LBB2_13:                               # %.lr.ph85
                                        # =>This Inner Loop Header: Depth=1
	movl	(%r14,%rax,4), %edx
	addl	%r15d, %edx
	cmpl	%ebp, %edx
	jg	.LBB2_15
# %bb.14:                               #   in Loop: Header=BB2_13 Depth=1
	addl	(%r13,%rax,4), %ebx
	movl	%edx, %r15d
.LBB2_15:                               #   in Loop: Header=BB2_13 Depth=1
	incq	%rax
	cmpq	%rax, %rcx
	jne	.LBB2_13
.LBB2_16:                               # %._crit_edge86
	movl	%ebx, (%r8,%rdi,4)
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_Z8BoundCPUlPiS_S_S_S_iiiS_S_, .Lfunc_end2-_Z8BoundCPUlPiS_S_S_S_iiiS_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z23__device_stub__BoundGPUPiS_S_S_S_iiiS_S_l # -- Begin function _Z23__device_stub__BoundGPUPiS_S_S_S_iiiS_S_l
	.type	_Z23__device_stub__BoundGPUPiS_S_S_S_iiiS_S_l,@function
_Z23__device_stub__BoundGPUPiS_S_S_S_iiiS_S_l: # @_Z23__device_stub__BoundGPUPiS_S_S_S_iiiS_S_l
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$192, %rsp
	.cfi_def_cfa_offset 240
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	24(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	4(%rsp), %r8
	movl	%r9d, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	240(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	248(%rsp), %rax
	movq	%rax, 56(%rbx)
	leaq	256(%rsp), %rax
	movq	%rax, 64(%rbx)
	leaq	264(%rsp), %rax
	movq	%rax, 72(%rbx)
	leaq	272(%rsp), %rax
	movq	%rax, 80(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z8BoundGPUPiS_S_S_S_iiiS_S_l, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$208, %rsp
	.cfi_adjust_cfa_offset -208
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_Z23__device_stub__BoundGPUPiS_S_S_S_iiiS_S_l, .Lfunc_end3-_Z23__device_stub__BoundGPUPiS_S_S_S_iiiS_S_l
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI4_0:
	.quad	0x41cdcd6500000000              # double 1.0E+9
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$1240, %rsp                     # imm = 0x4D8
	.cfi_def_cfa_offset 1296
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rbx
	cmpl	$3, %edi
	jne	.LBB4_13
# %bb.1:
	movq	8(%rbx), %rsi
	.cfi_escape 0x2e, 0x00
	leaq	720(%rsp), %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
	movq	16(%rbx), %rsi
.Ltmp0:
	.cfi_escape 0x2e, 0x00
	leaq	208(%rsp), %rdi
	movl	$16, %edx
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp1:
# %bb.2:
.Ltmp3:
	.cfi_escape 0x2e, 0x00
	leaq	720(%rsp), %rdi
	leaq	4(%rsp), %rsi
	callq	_ZNSirsERi
.Ltmp4:
# %bb.3:
.Ltmp5:
	.cfi_escape 0x2e, 0x00
	leaq	44(%rsp), %rsi
	movq	%rax, %rdi
	callq	_ZNSirsERi
.Ltmp6:
# %bb.4:
	movslq	4(%rsp), %rsi
.Ltmp8:
	.cfi_escape 0x2e, 0x00
	leaq	160(%rsp), %rdi
	leaq	32(%rsp), %rdx
	callq	_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_
.Ltmp9:
# %bb.5:
	movl	4(%rsp), %r15d
	testl	%r15d, %r15d
	jle	.LBB4_10
# %bb.6:                                # %.lr.ph.preheader
	xorl	%r14d, %r14d
	leaq	720(%rsp), %rbx
	xorl	%r12d, %r12d
.LBB4_7:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	160(%rsp), %rsi
	addq	%r14, %rsi
.Ltmp11:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	callq	_ZNSirsERi
.Ltmp12:
# %bb.8:                                #   in Loop: Header=BB4_7 Depth=1
	movq	160(%rsp), %rcx
	leaq	(%rcx,%r14), %rsi
	addq	$4, %rsi
.Ltmp13:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSirsERi
.Ltmp14:
# %bb.9:                                #   in Loop: Header=BB4_7 Depth=1
	incq	%r12
	movslq	4(%rsp), %r15
	addq	$8, %r14
	cmpq	%r15, %r12
	jl	.LBB4_7
.LBB4_10:                               # %._crit_edge
	movq	160(%rsp), %rbx
	movq	168(%rsp), %r14
	cmpq	%r14, %rbx
	je	.LBB4_21
# %bb.11:
	movq	%r14, %rax
	subq	%rbx, %rax
	sarq	$3, %rax
	je	.LBB4_17
# %bb.12:                               # %cond.false
	bsrq	%rax, %rax
	xorq	$63, %rax
	jmp	.LBB4_18
.LBB4_13:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str, %esi
	movl	$7, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	.LBB4_15
# %bb.14:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	callq	strlen
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB4_16
.LBB4_15:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB4_16:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %ebx
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.1, %esi
	movl	$23, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	.cfi_escape 0x2e, 0x00
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	callq	_ZNSo3putEc
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	jmp	.LBB4_109
.LBB4_17:
	movl	$64, %eax
.LBB4_18:                               # %cond.end
	addq	%rax, %rax
	movl	$126, %edx
	subq	%rax, %rdx
.Ltmp16:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_
.Ltmp17:
# %bb.19:                               # %.noexc
.Ltmp18:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_
.Ltmp19:
# %bb.20:                               # %.noexc._ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_.exit_crit_edge
	movl	4(%rsp), %r15d
.LBB4_21:                               # %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEEEvT_S8_.exit
	movslq	%r15d, %r14
	leaq	4(,%r14,4), %rbx
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, %rbp
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, %r13
	testl	%r14d, %r14d
	jle	.LBB4_24
# %bb.22:                               # %.lr.ph319
	movq	160(%rsp), %rax
	movl	%r15d, %ecx
	xorl	%edx, %edx
.LBB4_23:                               # =>This Inner Loop Header: Depth=1
	movl	4(%rax,%rdx,8), %esi
	movl	%esi, (%rbp,%rdx,4)
	movl	(%rax,%rdx,8), %esi
	movl	%esi, (%r13,%rdx,4)
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	.LBB4_23
.LBB4_24:                               # %._crit_edge320
	xorl	%ebx, %ebx
	movl	%ebx, (%r13,%r14,4)
	movl	%ebx, (%rbp,%r14,4)
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, 184(%rsp)                 # 8-byte Spill
	leaq	32(%rsp), %rax
	movq	%rbx, (%rax)
	leaq	88(%rsp), %rax
	movq	%rbx, (%rax)
	.cfi_escape 0x2e, 0x00
	movl	$4, %edi
	callq	malloc
	movq	%rax, 24(%rsp)                  # 8-byte Spill
	.cfi_escape 0x2e, 0x00
	movl	$4, %edi
	callq	malloc
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	.cfi_escape 0x2e, 0x00
	movl	$4, %edi
	callq	malloc
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movl	$4, %edi
	callq	malloc
	movq	%rax, %r15
	.cfi_escape 0x2e, 0x00
	movl	$4, %edi
	callq	malloc
	movq	%rax, %r14
	movl	%ebx, (%r12)
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	%ebx, (%rdx)
	movq	24(%rsp), %rsi                  # 8-byte Reload
	movl	%ebx, (%rsi)
	movl	4(%rsp), %eax
	movl	44(%rsp), %ecx
	.cfi_escape 0x2e, 0x30
	subq	$48, %rsp
	.cfi_adjust_cfa_offset 48
	movq	%r13, 144(%rsp)                 # 8-byte Spill
	movq	%r13, 32(%rsp)
	movq	%rbp, 24(%rsp)
	movl	%ecx, 16(%rsp)
	movl	%eax, 8(%rsp)
	xorl	%edi, %edi
	movq	%r12, %rcx
	movq	%r15, %r8
	movq	%r14, %r9
	callq	_Z8BoundCPUlPiS_S_S_S_iiiS_S_
	addq	$48, %rsp
	.cfi_adjust_cfa_offset -48
	movl	(%r15), %r13d
	.cfi_escape 0x2e, 0x00
	movq	%r15, %rdi
	callq	free
	movl	$1, %r15d
	movq	%rbp, 104(%rsp)                 # 8-byte Spill
.LBB4_25:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_73 Depth 2
                                        #     Child Loop BB4_79 Depth 2
                                        #     Child Loop BB4_62 Depth 2
                                        #     Child Loop BB4_83 Depth 2
                                        #       Child Loop BB4_84 Depth 3
                                        #       Child Loop BB4_88 Depth 3
	movslq	4(%rsp), %rax
	movq	%rbx, 48(%rsp)                  # 8-byte Spill
	cmpq	%rax, %rbx
	jge	.LBB4_94
# %bb.26:                               #   in Loop: Header=BB4_25 Depth=1
.Ltmp21:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cout, %edi
	movl	$.L.str.2, %esi
	movl	$5, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp22:
# %bb.27:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit250
                                        #   in Loop: Header=BB4_25 Depth=1
	movq	48(%rsp), %rax                  # 8-byte Reload
	leaq	1(%rax), %rsi
.Ltmp23:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cout, %edi
	movq	%rsi, 192(%rsp)                 # 8-byte Spill
                                        # kill: def $esi killed $esi killed $rsi
	callq	_ZNSolsEi
.Ltmp24:
# %bb.28:                               #   in Loop: Header=BB4_25 Depth=1
.Ltmp25:
	movq	%rax, %rbx
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.3, %esi
	movl	$6, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp26:
# %bb.29:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit252
                                        #   in Loop: Header=BB4_25 Depth=1
.Ltmp27:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ZNSo9_M_insertIlEERSoT_
.Ltmp28:
# %bb.30:                               # %_ZNSolsEl.exit
                                        #   in Loop: Header=BB4_25 Depth=1
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp29:
	.cfi_escape 0x2e, 0x00
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp30:
# %bb.31:                               # %.noexc279
                                        #   in Loop: Header=BB4_25 Depth=1
.Ltmp31:
	.cfi_escape 0x2e, 0x00
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp32:
# %bb.32:                               # %.noexc280
                                        #   in Loop: Header=BB4_25 Depth=1
.Ltmp33:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp34:
# %bb.33:                               # %_ZNSolsEPFRSoS_E.exit
                                        #   in Loop: Header=BB4_25 Depth=1
	cmpq	$5000001, %r15                  # imm = 0x4C4B41
	jl	.LBB4_71
# %bb.34:                               #   in Loop: Header=BB4_25 Depth=1
	cmpq	$0, 32(%rsp)
	jne	.LBB4_39
# %bb.35:                               #   in Loop: Header=BB4_25 Depth=1
	movslq	4(%rsp), %rax
	leaq	4(,%rax,4), %rsi
.Ltmp35:
	.cfi_escape 0x2e, 0x00
	leaq	32(%rsp), %rdi
	callq	hipMalloc
.Ltmp36:
# %bb.36:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit
                                        #   in Loop: Header=BB4_25 Depth=1
	movslq	4(%rsp), %rax
	leaq	4(,%rax,4), %rsi
.Ltmp37:
	.cfi_escape 0x2e, 0x00
	leaq	88(%rsp), %rdi
	callq	hipMalloc
.Ltmp38:
# %bb.37:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit257
                                        #   in Loop: Header=BB4_25 Depth=1
	movq	32(%rsp), %rdi
	movslq	4(%rsp), %rax
	leaq	4(,%rax,4), %rdx
.Ltmp39:
	.cfi_escape 0x2e, 0x00
	movq	%rbp, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp40:
# %bb.38:                               #   in Loop: Header=BB4_25 Depth=1
	movq	88(%rsp), %rdi
	movslq	4(%rsp), %rax
	leaq	4(,%rax,4), %rdx
.Ltmp41:
	.cfi_escape 0x2e, 0x00
	movq	96(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp42:
.LBB4_39:                               #   in Loop: Header=BB4_25 Depth=1
	leaq	(,%r15,4), %rbx
.Ltmp44:
	.cfi_escape 0x2e, 0x00
	leaq	80(%rsp), %rdi
	movq	%rbx, %rsi
	callq	hipMalloc
.Ltmp45:
# %bb.40:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit259
                                        #   in Loop: Header=BB4_25 Depth=1
.Ltmp46:
	.cfi_escape 0x2e, 0x00
	leaq	72(%rsp), %rdi
	movq	%rbx, %rsi
	callq	hipMalloc
.Ltmp47:
# %bb.41:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit261
                                        #   in Loop: Header=BB4_25 Depth=1
.Ltmp48:
	.cfi_escape 0x2e, 0x00
	leaq	64(%rsp), %rdi
	movq	%rbx, %rsi
	callq	hipMalloc
.Ltmp49:
# %bb.42:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit263
                                        #   in Loop: Header=BB4_25 Depth=1
.Ltmp50:
	.cfi_escape 0x2e, 0x00
	leaq	112(%rsp), %rdi
	movq	%rbx, %rsi
	callq	hipMalloc
.Ltmp51:
# %bb.43:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit265
                                        #   in Loop: Header=BB4_25 Depth=1
	movq	80(%rsp), %rdi
.Ltmp52:
	.cfi_escape 0x2e, 0x00
	movq	24(%rsp), %rsi                  # 8-byte Reload
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp53:
# %bb.44:                               #   in Loop: Header=BB4_25 Depth=1
	movq	72(%rsp), %rdi
.Ltmp54:
	.cfi_escape 0x2e, 0x00
	movq	8(%rsp), %rsi                   # 8-byte Reload
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp55:
# %bb.45:                               #   in Loop: Header=BB4_25 Depth=1
	movq	64(%rsp), %rdi
.Ltmp56:
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rsi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp57:
# %bb.46:                               #   in Loop: Header=BB4_25 Depth=1
	movq	112(%rsp), %rdi
.Ltmp58:
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp59:
# %bb.47:                               #   in Loop: Header=BB4_25 Depth=1
	movq	%rbx, 16(%rsp)                  # 8-byte Spill
	leaq	191(%r15), %rax
	movabsq	$-6148914691236517205, %rcx     # imm = 0xAAAAAAAAAAAAAAAB
	mulq	%rcx
	shrq	$7, %rdx
	movl	%edx, %ebx
	btsq	$32, %rbx
.Ltmp61:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	movl	$1, %esi
	movabsq	$4294967488, %rdx               # imm = 0x1000000C0
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp62:
# %bb.48:                               #   in Loop: Header=BB4_25 Depth=1
	testl	%eax, %eax
	jne	.LBB4_50
# %bb.49:                               #   in Loop: Header=BB4_25 Depth=1
	movq	80(%rsp), %rdi
	movq	72(%rsp), %rsi
	movq	64(%rsp), %rdx
	movq	112(%rsp), %rcx
	movq	32(%rsp), %r9
.Ltmp63:
	.cfi_escape 0x2e, 0x10
	movq	48(%rsp), %r8                   # 8-byte Reload
                                        # kill: def $r8d killed $r8d killed $r8
	pushq	%r15
	.cfi_adjust_cfa_offset 8
	pushq	96(%rsp)
	.cfi_adjust_cfa_offset 8
	callq	_Z24__device_stub__BranchGPUPiS_S_S_iS_S_l
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
.Ltmp64:
.LBB4_50:                               #   in Loop: Header=BB4_25 Depth=1
.Ltmp65:
	.cfi_escape 0x2e, 0x00
	callq	hipDeviceSynchronize
.Ltmp66:
# %bb.51:                               #   in Loop: Header=BB4_25 Depth=1
	movq	112(%rsp), %rsi
.Ltmp67:
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rdi
	movq	16(%rsp), %rdx                  # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp68:
# %bb.52:                               #   in Loop: Header=BB4_25 Depth=1
	movq	112(%rsp), %rdi
.Ltmp69:
	.cfi_escape 0x2e, 0x00
	callq	hipFree
.Ltmp70:
# %bb.53:                               #   in Loop: Header=BB4_25 Depth=1
.Ltmp71:
	.cfi_escape 0x2e, 0x00
	leaq	136(%rsp), %rdi
	movq	16(%rsp), %rsi                  # 8-byte Reload
	callq	hipMalloc
.Ltmp72:
# %bb.54:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit267
                                        #   in Loop: Header=BB4_25 Depth=1
.Ltmp73:
	.cfi_escape 0x2e, 0x00
	leaq	128(%rsp), %rdi
	movq	16(%rsp), %rsi                  # 8-byte Reload
	callq	hipMalloc
.Ltmp74:
# %bb.55:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit269
                                        #   in Loop: Header=BB4_25 Depth=1
.Ltmp75:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	movl	$1, %esi
	movabsq	$4294967488, %rdx               # imm = 0x1000000C0
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp76:
# %bb.56:                               #   in Loop: Header=BB4_25 Depth=1
	testl	%eax, %eax
	jne	.LBB4_58
# %bb.57:                               #   in Loop: Header=BB4_25 Depth=1
	movq	80(%rsp), %rdi
	movq	72(%rsp), %rsi
	movq	64(%rsp), %rdx
	movq	136(%rsp), %rcx
	movq	128(%rsp), %r8
	movl	4(%rsp), %eax
	movl	44(%rsp), %r10d
.Ltmp77:
	.cfi_escape 0x2e, 0x30
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movq	56(%rsp), %r9                   # 8-byte Reload
                                        # kill: def $r9d killed $r9d killed $r9
	pushq	%r15
	.cfi_adjust_cfa_offset 8
	pushq	104(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	56(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	%r10
	.cfi_adjust_cfa_offset 8
	pushq	%rax
	.cfi_adjust_cfa_offset 8
	callq	_Z23__device_stub__BoundGPUPiS_S_S_S_iiiS_S_l
	addq	$48, %rsp
	.cfi_adjust_cfa_offset -48
.Ltmp78:
.LBB4_58:                               #   in Loop: Header=BB4_25 Depth=1
.Ltmp79:
	.cfi_escape 0x2e, 0x00
	callq	hipDeviceSynchronize
.Ltmp80:
# %bb.59:                               #   in Loop: Header=BB4_25 Depth=1
	.cfi_escape 0x2e, 0x00
	movq	16(%rsp), %rbp                  # 8-byte Reload
	movq	%rbp, %rdi
	callq	malloc
	movq	%rax, %rbx
	movq	136(%rsp), %rsi
.Ltmp82:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	movq	%rbp, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp83:
# %bb.60:                               #   in Loop: Header=BB4_25 Depth=1
	movq	136(%rsp), %rdi
.Ltmp84:
	.cfi_escape 0x2e, 0x00
	callq	hipFree
.Ltmp85:
# %bb.61:                               # %.lr.ph332.preheader
                                        #   in Loop: Header=BB4_25 Depth=1
	movq	%r12, %rbp
	xorl	%eax, %eax
.LBB4_62:                               # %.lr.ph332
                                        #   Parent Loop BB4_25 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	%r13d, %ecx
	movl	(%rbx,%rax,4), %r13d
	cmpl	%r13d, %ecx
	cmovgl	%ecx, %r13d
	incq	%rax
	cmpq	%rax, %r15
	jne	.LBB4_62
# %bb.63:                               # %._crit_edge333
                                        #   in Loop: Header=BB4_25 Depth=1
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	callq	free
	leaq	(,%r15,8), %rbx
	.cfi_escape 0x2e, 0x00
	movq	24(%rsp), %rdi                  # 8-byte Reload
	movq	%rbx, %rsi
	callq	realloc
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movq	8(%rsp), %rdi                   # 8-byte Reload
	movq	%rbx, %rsi
	callq	realloc
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	.cfi_escape 0x2e, 0x00
	movq	%rbp, %rdi
	movq	%rbx, %rsi
	callq	realloc
	movq	%rax, %rbp
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	realloc
	movq	%rax, %r14
	movq	%r12, 24(%rsp)                  # 8-byte Spill
	leaq	(%r12,%r15,4), %rdi
	movq	%rbp, %r12
	movq	80(%rsp), %rsi
.Ltmp86:
	.cfi_escape 0x2e, 0x00
	movq	16(%rsp), %rbx                  # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp87:
	movq	104(%rsp), %rbp                 # 8-byte Reload
# %bb.64:                               #   in Loop: Header=BB4_25 Depth=1
	movq	8(%rsp), %rax                   # 8-byte Reload
	leaq	(%rax,%r15,4), %rdi
	movq	72(%rsp), %rsi
.Ltmp88:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp89:
# %bb.65:                               #   in Loop: Header=BB4_25 Depth=1
	leaq	(%r12,%r15,4), %rdi
	movq	64(%rsp), %rsi
.Ltmp90:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp91:
# %bb.66:                               #   in Loop: Header=BB4_25 Depth=1
	leaq	(%r14,%r15,4), %rdi
	movq	128(%rsp), %rsi
.Ltmp92:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp93:
# %bb.67:                               #   in Loop: Header=BB4_25 Depth=1
	movq	80(%rsp), %rdi
.Ltmp94:
	.cfi_escape 0x2e, 0x00
	callq	hipFree
.Ltmp95:
# %bb.68:                               #   in Loop: Header=BB4_25 Depth=1
	movq	72(%rsp), %rdi
.Ltmp96:
	.cfi_escape 0x2e, 0x00
	callq	hipFree
.Ltmp97:
# %bb.69:                               #   in Loop: Header=BB4_25 Depth=1
	movq	64(%rsp), %rdi
.Ltmp98:
	.cfi_escape 0x2e, 0x00
	callq	hipFree
.Ltmp99:
# %bb.70:                               #   in Loop: Header=BB4_25 Depth=1
	movq	128(%rsp), %rdi
.Ltmp100:
	.cfi_escape 0x2e, 0x00
	callq	hipFree
.Ltmp101:
	jmp	.LBB4_82
.LBB4_71:                               #   in Loop: Header=BB4_25 Depth=1
	leaq	(,%r15,8), %rbp
	.cfi_escape 0x2e, 0x00
	movq	24(%rsp), %rdi                  # 8-byte Reload
	movq	%rbp, %rsi
	callq	realloc
	movq	%rax, %rbx
	.cfi_escape 0x2e, 0x00
	movq	8(%rsp), %rdi                   # 8-byte Reload
	movq	%rbp, %rsi
	callq	realloc
	movq	%r12, %rdi
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movq	%rbp, 120(%rsp)                 # 8-byte Spill
	movq	%rbp, %rsi
	callq	realloc
	movq	%rax, 144(%rsp)                 # 8-byte Spill
	leaq	(%rbx,%r15,4), %rdi
	leaq	(,%r15,4), %rdx
	movq	%rdx, 56(%rsp)                  # 8-byte Spill
	.cfi_escape 0x2e, 0x00
	movq	%rdi, 16(%rsp)                  # 8-byte Spill
	movq	%rbx, 24(%rsp)                  # 8-byte Spill
	movq	%rbx, %rsi
	callq	memcpy@PLT
	leaq	(%r12,%r15,4), %rdi
	.cfi_escape 0x2e, 0x00
	movq	%rdi, %rbp
	movq	%r12, 8(%rsp)                   # 8-byte Spill
	movq	%r12, %rsi
	movq	144(%rsp), %rbx                 # 8-byte Reload
	movq	104(%rsp), %r12                 # 8-byte Reload
	movq	56(%rsp), %rdx                  # 8-byte Reload
	callq	memcpy@PLT
	leaq	(%rbx,%r15,4), %rdi
	movq	%rdi, 152(%rsp)                 # 8-byte Spill
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rsi
	movq	56(%rsp), %rdx                  # 8-byte Reload
	callq	memcpy@PLT
	movq	152(%rsp), %r8                  # 8-byte Reload
	testq	%r15, %r15
	movq	96(%rsp), %rdx                  # 8-byte Reload
	movq	48(%rsp), %rsi                  # 8-byte Reload
	jle	.LBB4_77
# %bb.72:                               # %.lr.ph323
                                        #   in Loop: Header=BB4_25 Depth=1
	xorl	%eax, %eax
.LBB4_73:                               #   Parent Loop BB4_25 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movslq	(%r8,%rax,4), %rcx
	cmpq	%rcx, %rsi
	jge	.LBB4_75
# %bb.74:                               #   in Loop: Header=BB4_73 Depth=2
	movl	(%r12,%rsi,4), %ecx
	movq	16(%rsp), %rdi                  # 8-byte Reload
	subl	%ecx, (%rdi,%rax,4)
	movl	(%rdx,%rsi,4), %ecx
	subl	%ecx, (%rbp,%rax,4)
	jmp	.LBB4_76
.LBB4_75:                               #   in Loop: Header=BB4_73 Depth=2
	incl	%ecx
	movl	%ecx, (%r8,%rax,4)
	movl	$0, (%r14,%rax,4)
.LBB4_76:                               # %_Z9BranchCPUlPiS_S_S_iS_S_.exit
                                        #   in Loop: Header=BB4_73 Depth=2
	incq	%rax
	cmpq	%rax, %r15
	jne	.LBB4_73
.LBB4_77:                               # %._crit_edge324
                                        #   in Loop: Header=BB4_25 Depth=1
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rdi
	movq	120(%rsp), %rsi                 # 8-byte Reload
	callq	realloc
	movq	%rax, %r14
	.cfi_escape 0x2e, 0x00
	movq	56(%rsp), %rdi                  # 8-byte Reload
	callq	malloc
	movq	%rax, %rbx
	testq	%r15, %r15
	jle	.LBB4_80
# %bb.78:                               # %.lr.ph328
                                        #   in Loop: Header=BB4_25 Depth=1
	leaq	(%r14,%r15,4), %rax
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	movl	4(%rsp), %eax
	movl	%eax, 56(%rsp)                  # 4-byte Spill
	movl	44(%rsp), %eax
	movl	%eax, 120(%rsp)                 # 4-byte Spill
	xorl	%r12d, %r12d
	movq	%rbp, 200(%rsp)                 # 8-byte Spill
.LBB4_79:                               #   Parent Loop BB4_25 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	.cfi_escape 0x2e, 0x30
	subq	$48, %rsp
	.cfi_adjust_cfa_offset 48
	movq	144(%rsp), %rax                 # 8-byte Reload
	movq	%rax, 32(%rsp)
	movq	152(%rsp), %rax                 # 8-byte Reload
	movq	%rax, 24(%rsp)
	movl	168(%rsp), %eax                 # 4-byte Reload
	movl	%eax, 16(%rsp)
	movl	104(%rsp), %eax                 # 4-byte Reload
	movl	%eax, 8(%rsp)
	movq	%r12, %rdi
	movq	64(%rsp), %rsi                  # 8-byte Reload
	movq	248(%rsp), %rdx                 # 8-byte Reload
	movq	200(%rsp), %rcx                 # 8-byte Reload
	movq	%rbx, %r8
	movq	96(%rsp), %r9                   # 8-byte Reload
	callq	_Z8BoundCPUlPiS_S_S_S_iiiS_S_
	addq	$48, %rsp
	.cfi_adjust_cfa_offset -48
	movl	(%rbx,%r12,4), %ebp
	cmpl	%ebp, %r13d
	cmovgl	%r13d, %ebp
	incq	%r12
	movl	%ebp, %r13d
	cmpq	%r12, %r15
	jne	.LBB4_79
	jmp	.LBB4_81
.LBB4_80:                               #   in Loop: Header=BB4_25 Depth=1
	movl	%r13d, %ebp
.LBB4_81:                               # %._crit_edge329
                                        #   in Loop: Header=BB4_25 Depth=1
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	callq	free
	movl	%ebp, %r13d
	movq	104(%rsp), %rbp                 # 8-byte Reload
	movq	144(%rsp), %r12                 # 8-byte Reload
.LBB4_82:                               #   in Loop: Header=BB4_25 Depth=1
	leaq	-1(,%r15,2), %rax
	addq	%r15, %r15
	xorl	%ecx, %ecx
.LBB4_83:                               #   Parent Loop BB4_25 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB4_84 Depth 3
                                        #       Child Loop BB4_88 Depth 3
	cmpq	%r15, %rcx
	jge	.LBB4_87
.LBB4_84:                               # %.lr.ph337
                                        #   Parent Loop BB4_25 Depth=1
                                        #     Parent Loop BB4_83 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	cmpl	%r13d, (%r14,%rcx,4)
	jle	.LBB4_87
# %bb.85:                               #   in Loop: Header=BB4_84 Depth=3
	incq	%rcx
	cmpq	%rcx, %r15
	jne	.LBB4_84
# %bb.86:                               #   in Loop: Header=BB4_83 Depth=2
	movq	%r15, %rcx
.LBB4_87:                               # %.critedge
                                        #   in Loop: Header=BB4_83 Depth=2
	testq	%rax, %rax
	js	.LBB4_91
.LBB4_88:                               # %.lr.ph342
                                        #   Parent Loop BB4_25 Depth=1
                                        #     Parent Loop BB4_83 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	cmpl	%r13d, (%r14,%rax,4)
	jg	.LBB4_91
# %bb.89:                               #   in Loop: Header=BB4_88 Depth=3
	leaq	-1(%rax), %rdx
	testq	%rax, %rax
	movq	%rdx, %rax
	jg	.LBB4_88
# %bb.90:                               #   in Loop: Header=BB4_83 Depth=2
	movq	$-1, %rax
.LBB4_91:                               # %.critedge2
                                        #   in Loop: Header=BB4_83 Depth=2
	cmpq	%rax, %rcx
	jge	.LBB4_93
# %bb.92:                               #   in Loop: Header=BB4_83 Depth=2
	movq	24(%rsp), %rsi                  # 8-byte Reload
	movl	(%rsi,%rax,4), %edx
	movl	%edx, (%rsi,%rcx,4)
	movq	8(%rsp), %rsi                   # 8-byte Reload
	movl	(%rsi,%rax,4), %edx
	movl	%edx, (%rsi,%rcx,4)
	movl	(%r12,%rax,4), %edx
	movl	%edx, (%r12,%rcx,4)
	movl	(%r14,%rcx,4), %edx
	movl	(%r14,%rax,4), %esi
	movl	%esi, (%r14,%rcx,4)
	movl	%edx, (%r14,%rax,4)
	jmp	.LBB4_83
.LBB4_93:                               #   in Loop: Header=BB4_25 Depth=1
	movq	192(%rsp), %rbx                 # 8-byte Reload
	incq	%rax
	movq	%rax, %r15
	jne	.LBB4_25
.LBB4_94:
	.cfi_escape 0x2e, 0x00
	movq	24(%rsp), %rdi                  # 8-byte Reload
	callq	free
	.cfi_escape 0x2e, 0x00
	movq	8(%rsp), %rdi                   # 8-byte Reload
	callq	free
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdi
	callq	free
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rdi
	callq	free
	.cfi_escape 0x2e, 0x00
	movq	%rbp, %rdi
	callq	free
	.cfi_escape 0x2e, 0x00
	movq	96(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	32(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB4_97
# %bb.95:
.Ltmp103:
	.cfi_escape 0x2e, 0x00
	callq	hipFree
.Ltmp104:
# %bb.96:
	movq	88(%rsp), %rdi
.Ltmp105:
	.cfi_escape 0x2e, 0x00
	callq	hipFree
.Ltmp106:
.LBB4_97:
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, %rbx
.Ltmp108:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cout, %edi
	movl	$.L.str.4, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp109:
# %bb.98:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit271
	subq	184(%rsp), %rbx                 # 8-byte Folded Reload
	cvtsi2sd	%rbx, %xmm0
	divsd	.LCPI4_0(%rip), %xmm0
.Ltmp110:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp111:
# %bb.99:                               # %_ZNSolsEd.exit
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp112:
	.cfi_escape 0x2e, 0x00
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp113:
# %bb.100:                              # %.noexc282
.Ltmp114:
	.cfi_escape 0x2e, 0x00
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp115:
# %bb.101:                              # %.noexc283
.Ltmp116:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp117:
# %bb.102:                              # %_ZNSolsEPFRSoS_E.exit274
.Ltmp118:
	.cfi_escape 0x2e, 0x00
	leaq	208(%rsp), %rdi
	movl	%r13d, %esi
	callq	_ZNSolsEi
.Ltmp119:
# %bb.103:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp120:
	.cfi_escape 0x2e, 0x00
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp121:
# %bb.104:                              # %.noexc286
.Ltmp122:
	.cfi_escape 0x2e, 0x00
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp123:
# %bb.105:                              # %.noexc287
.Ltmp124:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp125:
# %bb.106:                              # %_ZNSolsEPFRSoS_E.exit276
	movq	160(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB4_108
# %bb.107:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB4_108:                              # %_ZNSt6vectorI5TItemSaIS0_EED2Ev.exit
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE(%rip), %rax
	leaq	216(%rsp), %rdi
	movq	%rax, -8(%rdi)
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE+24(%rip), %rcx
	movq	-24(%rax), %rax
	movq	%rcx, 208(%rsp,%rax)
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev
	leaq	456(%rsp), %rdi
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt8ios_baseD2Ev
	.cfi_escape 0x2e, 0x00
	leaq	720(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
.LBB4_109:
	xorl	%eax, %eax
	addq	$1240, %rsp                     # imm = 0x4D8
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB4_110:
	.cfi_def_cfa_offset 1296
.Ltmp10:
	jmp	.LBB4_115
.LBB4_111:
.Ltmp2:
	movq	%rax, %rbx
	jmp	.LBB4_125
.LBB4_112:
.Ltmp107:
	jmp	.LBB4_122
.LBB4_113:
.Ltmp20:
	jmp	.LBB4_122
.LBB4_114:
.Ltmp7:
.LBB4_115:
	movq	%rax, %rbx
	jmp	.LBB4_124
.LBB4_116:
.Ltmp126:
	jmp	.LBB4_122
.LBB4_117:
.Ltmp15:
	jmp	.LBB4_122
.LBB4_118:
.Ltmp60:
	jmp	.LBB4_122
.LBB4_119:
.Ltmp81:
	jmp	.LBB4_122
.LBB4_120:
.Ltmp102:
	jmp	.LBB4_122
.LBB4_121:
.Ltmp43:
.LBB4_122:
	movq	%rax, %rbx
	movq	160(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB4_124
# %bb.123:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB4_124:
	.cfi_escape 0x2e, 0x00
	leaq	208(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev
.LBB4_125:
	.cfi_escape 0x2e, 0x00
	leaq	720(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end4:
	.size	main, .Lfunc_end4-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table4:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp6-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp6
	.uleb128 .Ltmp7-.Lfunc_begin0           #     jumps to .Ltmp7
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp8-.Lfunc_begin0           # >> Call Site 4 <<
	.uleb128 .Ltmp9-.Ltmp8                  #   Call between .Ltmp8 and .Ltmp9
	.uleb128 .Ltmp10-.Lfunc_begin0          #     jumps to .Ltmp10
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp11-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp14-.Ltmp11                #   Call between .Ltmp11 and .Ltmp14
	.uleb128 .Ltmp15-.Lfunc_begin0          #     jumps to .Ltmp15
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp14-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp16-.Ltmp14                #   Call between .Ltmp14 and .Ltmp16
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp16-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp19-.Ltmp16                #   Call between .Ltmp16 and .Ltmp19
	.uleb128 .Ltmp20-.Lfunc_begin0          #     jumps to .Ltmp20
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp21-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Ltmp42-.Ltmp21                #   Call between .Ltmp21 and .Ltmp42
	.uleb128 .Ltmp43-.Lfunc_begin0          #     jumps to .Ltmp43
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp44-.Lfunc_begin0          # >> Call Site 9 <<
	.uleb128 .Ltmp59-.Ltmp44                #   Call between .Ltmp44 and .Ltmp59
	.uleb128 .Ltmp60-.Lfunc_begin0          #     jumps to .Ltmp60
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp61-.Lfunc_begin0          # >> Call Site 10 <<
	.uleb128 .Ltmp80-.Ltmp61                #   Call between .Ltmp61 and .Ltmp80
	.uleb128 .Ltmp81-.Lfunc_begin0          #     jumps to .Ltmp81
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp82-.Lfunc_begin0          # >> Call Site 11 <<
	.uleb128 .Ltmp101-.Ltmp82               #   Call between .Ltmp82 and .Ltmp101
	.uleb128 .Ltmp102-.Lfunc_begin0         #     jumps to .Ltmp102
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp101-.Lfunc_begin0         # >> Call Site 12 <<
	.uleb128 .Ltmp103-.Ltmp101              #   Call between .Ltmp101 and .Ltmp103
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp103-.Lfunc_begin0         # >> Call Site 13 <<
	.uleb128 .Ltmp106-.Ltmp103              #   Call between .Ltmp103 and .Ltmp106
	.uleb128 .Ltmp107-.Lfunc_begin0         #     jumps to .Ltmp107
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp108-.Lfunc_begin0         # >> Call Site 14 <<
	.uleb128 .Ltmp125-.Ltmp108              #   Call between .Ltmp108 and .Ltmp125
	.uleb128 .Ltmp126-.Lfunc_begin0         #     jumps to .Ltmp126
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp125-.Lfunc_begin0         # >> Call Site 15 <<
	.uleb128 .Lfunc_end4-.Ltmp125           #   Call between .Ltmp125 and .Lfunc_end4
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_,"axG",@progbits,_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_,comdat
	.weak	_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_ # -- Begin function _ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_
	.p2align	1, 0x90
	.type	_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_,@function
_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_:   # @_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB5_8
# %bb.1:                                # %_ZNSt6vectorI5TItemSaIS0_EE17_S_check_init_lenEmRKS1_.exit
	movq	%rsi, %rbx
	movq	%rdi, %r14
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
	testq	%rsi, %rsi
	je	.LBB5_2
# %bb.3:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorI5TItemE8allocateEmPKv
	movq	%rax, (%r14)
	leaq	8(%r14), %rcx
	movq	%rax, 8(%r14)
	leaq	(%rax,%rbx,8), %rdx
	movq	%rdx, 16(%r14)
	movq	$0, (%rax)
	cmpq	$1, %rbx
	jne	.LBB5_5
# %bb.4:
	addq	$8, %rax
	movq	%rax, %rdx
	jmp	.LBB5_7
.LBB5_2:                                # %_ZNSt12_Vector_baseI5TItemSaIS0_EEC2EmRKS1_.exit.thread
	leaq	8(%r14), %rcx
	movups	%xmm0, (%r14)
	movq	$0, 16(%r14)
	xorl	%edx, %edx
	jmp	.LBB5_7
.LBB5_5:                                # %.lr.ph.i.i.i.i.i.i.i.i.preheader
	shlq	$3, %rbx
	movl	$8, %esi
.LBB5_6:                                # %.lr.ph.i.i.i.i.i.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rax), %rdi
	movq	%rdi, (%rax,%rsi)
	addq	$8, %rsi
	cmpq	%rsi, %rbx
	jne	.LBB5_6
.LBB5_7:                                # %.loopexit
	movq	%rdx, (%rcx)
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.LBB5_8:
	.cfi_def_cfa_offset 32
	movl	$.L.str.5, %edi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end5:
	.size	_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_, .Lfunc_end5-_ZNSt6vectorI5TItemSaIS0_EEC2EmRKS1_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorI5TItemE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorI5TItemE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorI5TItemE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorI5TItemE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorI5TItemE8allocateEmPKv,@function
_ZNSt15__new_allocatorI5TItemE8allocateEmPKv: # @_ZNSt15__new_allocatorI5TItemE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB6_1
# %bb.3:
	shlq	$3, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB6_1:
	.cfi_def_cfa_offset 16
	shrq	$61, %rsi
	je	.LBB6_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB6_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end6:
	.size	_ZNSt15__new_allocatorI5TItemE8allocateEmPKv, .Lfunc_end6-_ZNSt15__new_allocatorI5TItemE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_,"axG",@progbits,_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_,comdat
	.weak	_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_ # -- Begin function _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_
	.type	_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_,@function
_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_: # @_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_
	.cfi_startproc
# %bb.0:
	movq	%rsi, %rax
	subq	%rdi, %rax
	sarq	$3, %rax
	cmpq	$17, %rax
	jl	.LBB7_6
# %bb.1:                                # %.lr.ph
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	8(%rdi), %r12
	decq	%r14
.LBB7_2:                                # =>This Inner Loop Header: Depth=1
	cmpq	$-1, %r14
	je	.LBB7_3
# %bb.4:                                #   in Loop: Header=BB7_2 Depth=1
	andq	$-2, %rax
	leaq	(%rbx,%rax,4), %rdx
	leaq	-8(%r15), %rcx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ZSt22__move_median_to_firstIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_SA_SA_T0_
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_ZSt21__unguarded_partitionIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEET_SA_SA_SA_T0_
	movq	%rax, %r13
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_
	movq	%r13, %rax
	subq	%rbx, %rax
	sarq	$3, %rax
	decq	%r14
	movq	%r13, %r15
	cmpq	$16, %rax
	jg	.LBB7_2
	jmp	.LBB7_5
.LBB7_3:
	leaq	15(%rsp), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ZSt11__make_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_
	leaq	14(%rsp), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ZSt11__sort_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_
.LBB7_5:
	addq	$16, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r13
	.cfi_restore %r14
	.cfi_restore %r15
.LBB7_6:                                # %.loopexit
	retq
.Lfunc_end7:
	.size	_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_, .Lfunc_end7-_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElNS0_5__ops15_Iter_less_iterEEvT_SA_T0_T1_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_,"axG",@progbits,_ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_,comdat
	.weak	_ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_ # -- Begin function _ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_
	.type	_ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_,@function
_ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_: # @_ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rsi, %rbx
	movq	%rsi, %rax
	subq	%rdi, %rax
	cmpq	$129, %rax
	jl	.LBB8_5
# %bb.1:
	leaq	128(%rdi), %r14
	movq	%r14, %rsi
	callq	_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_
.LBB8_3:                                # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	cmpq	%rbx, %r14
	je	.LBB8_4
# %bb.2:                                # %.lr.ph.i
                                        #   in Loop: Header=BB8_3 Depth=1
	movq	%r14, %rdi
	callq	_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_
	addq	$8, %r14
	jmp	.LBB8_3
.LBB8_5:
	movq	%rbx, %rsi
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_ # TAILCALL
.LBB8_4:                                # %_ZSt26__unguarded_insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_.exit
	.cfi_def_cfa_offset 32
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end8:
	.size	_ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_, .Lfunc_end8-_ZSt22__final_insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt11__sort_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_,"axG",@progbits,_ZSt11__sort_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_,comdat
	.weak	_ZSt11__sort_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_ # -- Begin function _ZSt11__sort_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_
	.type	_ZSt11__sort_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_,@function
_ZSt11__sort_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_: # @_ZSt11__sort_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %r15
	subq	%rdi, %r15
	cmpq	$9, %r15
	jl	.LBB9_3
# %bb.1:                                # %.lr.ph.preheader
	movq	%rsi, %rbx
	movq	%rdi, %r14
	addq	$-8, %rbx
.LBB9_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rcx
	movq	(%r14), %rax
	movq	%rax, (%rbx)
	addq	$-8, %r15
	movq	%r15, %rdx
	sarq	$3, %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_
	addq	$-8, %rbx
	cmpq	$8, %r15
	jg	.LBB9_2
.LBB9_3:                                # %._crit_edge
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end9:
	.size	_ZSt11__sort_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_, .Lfunc_end9-_ZSt11__sort_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt11__make_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_,"axG",@progbits,_ZSt11__make_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_,comdat
	.weak	_ZSt11__make_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_ # -- Begin function _ZSt11__make_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_
	.type	_ZSt11__make_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_,@function
_ZSt11__make_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_: # @_ZSt11__make_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %rbx
	subq	%rdi, %rbx
	sarq	$3, %rbx
	cmpq	$2, %rbx
	jl	.LBB10_3
# %bb.1:
	movq	%rdi, %r14
	leaq	-2(%rbx), %r15
	shrq	%r15
.LBB10_2:                               # =>This Inner Loop Header: Depth=1
	movq	(%r14,%r15,8), %rcx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_
	addq	$-1, %r15
	jb	.LBB10_2
.LBB10_3:                               # %.loopexit
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end10:
	.size	_ZSt11__make_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_, .Lfunc_end10-_ZSt11__make_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_RT0_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_,"axG",@progbits,_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_,comdat
	.weak	_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_ # -- Begin function _ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_
	.type	_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_,@function
_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_: # @_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_
	.cfi_startproc
# %bb.0:
	leaq	-1(%rdx), %rax
	shrq	$63, %rax
	leaq	(%rdx,%rax), %r8
	decq	%r8
	sarq	%r8
	movq	%rsi, %rax
	cmpq	%rsi, %r8
	jle	.LBB11_6
# %bb.1:                                # %.lr.ph.preheader
	movq	%rsi, %r9
.LBB11_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	leaq	(%r9,%r9), %rax
	xorps	%xmm0, %xmm0
	cvtsi2sdl	16(%rdi,%rax,8), %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdl	20(%rdi,%rax,8), %xmm1
	xorps	%xmm2, %xmm2
	cvtsi2sdl	8(%rdi,%rax,8), %xmm2
	xorps	%xmm3, %xmm3
	cvtsi2sdl	12(%rdi,%rax,8), %xmm3
	divsd	%xmm1, %xmm0
	divsd	%xmm3, %xmm2
	ucomisd	%xmm2, %xmm0
	ja	.LBB11_3
# %bb.4:                                # %.lr.ph
                                        #   in Loop: Header=BB11_2 Depth=1
	leaq	2(,%r9,2), %rax
	jmp	.LBB11_5
.LBB11_3:                               #   in Loop: Header=BB11_2 Depth=1
	leaq	1(,%r9,2), %rax
.LBB11_5:                               # %.lr.ph
                                        #   in Loop: Header=BB11_2 Depth=1
	movq	(%rdi,%rax,8), %r10
	movq	%r10, (%rdi,%r9,8)
	movq	%rax, %r9
	cmpq	%r8, %rax
	jl	.LBB11_2
.LBB11_6:                               # %._crit_edge
	testb	$1, %dl
	jne	.LBB11_9
# %bb.7:
	addq	$-2, %rdx
	sarq	%rdx
	cmpq	%rdx, %rax
	jne	.LBB11_9
# %bb.8:
	leaq	(%rax,%rax), %rdx
	movq	8(%rdi,%rdx,8), %rdx
	movq	%rdx, (%rdi,%rax,8)
	leaq	1(,%rax,2), %rax
.LBB11_9:
	cmpq	%rsi, %rax
	jle	.LBB11_10
# %bb.11:                               # %.lr.ph.i
	movq	%rcx, %rdx
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
	shrq	$32, %rdx
	xorps	%xmm1, %xmm1
	cvtsi2sd	%edx, %xmm1
	divsd	%xmm1, %xmm0
.LBB11_12:                              # =>This Inner Loop Header: Depth=1
	leaq	-1(%rax), %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	decq	%rdx
	sarq	%rdx
	xorps	%xmm1, %xmm1
	cvtsi2sdl	(%rdi,%rdx,8), %xmm1
	xorps	%xmm2, %xmm2
	cvtsi2sdl	4(%rdi,%rdx,8), %xmm2
	divsd	%xmm2, %xmm1
	ucomisd	%xmm0, %xmm1
	jbe	.LBB11_10
# %bb.13:                               #   in Loop: Header=BB11_12 Depth=1
	movq	(%rdi,%rdx,8), %r8
	movq	%r8, (%rdi,%rax,8)
	movq	%rdx, %rax
	cmpq	%rsi, %rdx
	jg	.LBB11_12
	jmp	.LBB11_14
.LBB11_10:
	movq	%rax, %rdx
.LBB11_14:                              # %_ZSt11__push_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops14_Iter_less_valEEvT_T0_SB_T1_RT2_.exit
	movq	%rcx, (%rdi,%rdx,8)
	retq
.Lfunc_end11:
	.size	_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_, .Lfunc_end11-_ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEElS2_NS0_5__ops15_Iter_less_iterEEvT_T0_SB_T1_T2_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt22__move_median_to_firstIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_SA_SA_T0_,"axG",@progbits,_ZSt22__move_median_to_firstIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_SA_SA_T0_,comdat
	.weak	_ZSt22__move_median_to_firstIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_SA_SA_T0_ # -- Begin function _ZSt22__move_median_to_firstIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_SA_SA_T0_
	.type	_ZSt22__move_median_to_firstIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_SA_SA_T0_,@function
_ZSt22__move_median_to_firstIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_SA_SA_T0_: # @_ZSt22__move_median_to_firstIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_SA_SA_T0_
	.cfi_startproc
# %bb.0:
	cvtsi2sdl	(%rsi), %xmm0
	cvtsi2sdl	4(%rsi), %xmm2
	cvtsi2sdl	(%rdx), %xmm1
	divsd	%xmm2, %xmm0
	xorps	%xmm2, %xmm2
	cvtsi2sdl	4(%rdx), %xmm2
	divsd	%xmm2, %xmm1
	ucomisd	%xmm1, %xmm0
	xorps	%xmm2, %xmm2
	cvtsi2sdl	(%rcx), %xmm2
	cvtsi2sdl	4(%rcx), %xmm3
	divsd	%xmm3, %xmm2
	jbe	.LBB12_5
# %bb.1:
	ucomisd	%xmm2, %xmm1
	jbe	.LBB12_3
# %bb.2:
	movq	(%rdi), %rax
	jmp	.LBB12_9
.LBB12_5:
	ucomisd	%xmm2, %xmm0
	jbe	.LBB12_8
# %bb.6:
	movq	(%rdi), %rax
	jmp	.LBB12_7
.LBB12_3:
	ucomisd	%xmm2, %xmm0
	movq	(%rdi), %rax
	ja	.LBB12_4
.LBB12_7:
	movq	(%rsi), %rcx
	movq	%rcx, (%rdi)
	movq	%rax, (%rsi)
	retq
.LBB12_8:
	ucomisd	%xmm2, %xmm1
	movq	(%rdi), %rax
	jbe	.LBB12_9
.LBB12_4:
	movq	(%rcx), %rdx
	movq	%rdx, (%rdi)
	movq	%rax, (%rcx)
	retq
.LBB12_9:
	movq	(%rdx), %rcx
	movq	%rcx, (%rdi)
	movq	%rax, (%rdx)
	retq
.Lfunc_end12:
	.size	_ZSt22__move_median_to_firstIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_SA_SA_T0_, .Lfunc_end12-_ZSt22__move_median_to_firstIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_SA_SA_T0_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt21__unguarded_partitionIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEET_SA_SA_SA_T0_,"axG",@progbits,_ZSt21__unguarded_partitionIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEET_SA_SA_SA_T0_,comdat
	.weak	_ZSt21__unguarded_partitionIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEET_SA_SA_SA_T0_ # -- Begin function _ZSt21__unguarded_partitionIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEET_SA_SA_SA_T0_
	.type	_ZSt21__unguarded_partitionIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEET_SA_SA_SA_T0_,@function
_ZSt21__unguarded_partitionIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEET_SA_SA_SA_T0_: # @_ZSt21__unguarded_partitionIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEET_SA_SA_SA_T0_
	.cfi_startproc
# %bb.0:
.LBB13_1:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB13_2 Depth 2
                                        #     Child Loop BB13_4 Depth 2
	xorps	%xmm0, %xmm0
	cvtsi2sdl	(%rdx), %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdl	4(%rdx), %xmm1
	divsd	%xmm1, %xmm0
	addq	$-8, %rdi
	movq	%rdi, %rax
.LBB13_2:                               #   Parent Loop BB13_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm1, %xmm1
	cvtsi2sdl	8(%rax), %xmm1
	xorps	%xmm2, %xmm2
	cvtsi2sdl	12(%rax), %xmm2
	addq	$8, %rax
	divsd	%xmm2, %xmm1
	ucomisd	%xmm0, %xmm1
	ja	.LBB13_2
# %bb.3:                                # %.preheader.preheader
                                        #   in Loop: Header=BB13_1 Depth=1
	leaq	8(%rax), %rdi
.LBB13_4:                               # %.preheader
                                        #   Parent Loop BB13_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm1, %xmm1
	cvtsi2sdl	-8(%rsi), %xmm1
	xorps	%xmm2, %xmm2
	cvtsi2sdl	-4(%rsi), %xmm2
	addq	$-8, %rsi
	divsd	%xmm2, %xmm1
	ucomisd	%xmm1, %xmm0
	ja	.LBB13_4
# %bb.5:                                #   in Loop: Header=BB13_1 Depth=1
	cmpq	%rsi, %rax
	jae	.LBB13_6
# %bb.7:                                #   in Loop: Header=BB13_1 Depth=1
	movq	(%rax), %rcx
	movq	(%rsi), %r8
	movq	%r8, (%rax)
	movq	%rcx, (%rsi)
	jmp	.LBB13_1
.LBB13_6:
	retq
.Lfunc_end13:
	.size	_ZSt21__unguarded_partitionIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEET_SA_SA_SA_T0_, .Lfunc_end13-_ZSt21__unguarded_partitionIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEET_SA_SA_SA_T0_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_,"axG",@progbits,_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_,comdat
	.weak	_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_ # -- Begin function _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_
	.type	_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_,@function
_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_: # @_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_
	.cfi_startproc
# %bb.0:
	cmpq	%rsi, %rdi
	je	.LBB14_12
# %bb.1:                                # %.preheader
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	8(%rdi), %r15
	cmpq	%rsi, %r15
	je	.LBB14_11
# %bb.2:                                # %.lr.ph
	movl	$8, %r12d
.LBB14_3:                               # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sdl	(%r15), %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdl	4(%r15), %xmm1
	xorps	%xmm2, %xmm2
	cvtsi2sdl	(%r14), %xmm2
	xorps	%xmm3, %xmm3
	cvtsi2sdl	4(%r14), %xmm3
	divsd	%xmm1, %xmm0
	divsd	%xmm3, %xmm2
	ucomisd	%xmm2, %xmm0
	jbe	.LBB14_9
# %bb.4:                                #   in Loop: Header=BB14_3 Depth=1
	movq	(%r15), %r13
	movq	%r12, %rax
	sarq	$3, %rax
	cmpq	$2, %rax
	jl	.LBB14_6
# %bb.5:                                #   in Loop: Header=BB14_3 Depth=1
	shlq	$3, %rax
	movq	%r15, %rdi
	subq	%rax, %rdi
	addq	$8, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB14_8:                               # %_ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEES7_ET0_T_S9_S8_.exit
                                        #   in Loop: Header=BB14_3 Depth=1
	movq	%r13, (%r14)
	jmp	.LBB14_10
.LBB14_9:                               #   in Loop: Header=BB14_3 Depth=1
	movq	%r15, %rdi
	callq	_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_
.LBB14_10:                              #   in Loop: Header=BB14_3 Depth=1
	addq	$8, %r15
	addq	$8, %r12
	cmpq	%rbx, %r15
	jne	.LBB14_3
	jmp	.LBB14_11
.LBB14_6:                               #   in Loop: Header=BB14_3 Depth=1
	cmpq	$8, %r12
	jne	.LBB14_8
# %bb.7:                                #   in Loop: Header=BB14_3 Depth=1
	movq	(%r14), %rax
	movq	%rax, (%r15)
	jmp	.LBB14_8
.LBB14_11:
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r13
	.cfi_restore %r14
	.cfi_restore %r15
.LBB14_12:                              # %.loopexit
	retq
.Lfunc_end14:
	.size	_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_, .Lfunc_end14-_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_less_iterEEvT_SA_T0_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_,"axG",@progbits,_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_,comdat
	.weak	_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_ # -- Begin function _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_
	.type	_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_,@function
_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_: # @_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_
	.cfi_startproc
# %bb.0:
	movq	(%rdi), %rax
	movq	%rax, %rcx
	shrq	$32, %rcx
	cvtsi2sd	%eax, %xmm0
	cvtsi2sd	%ecx, %xmm1
	cvtsi2sdl	-8(%rdi), %xmm2
	cvtsi2sdl	-4(%rdi), %xmm3
	divsd	%xmm1, %xmm0
	divsd	%xmm3, %xmm2
	ucomisd	%xmm2, %xmm0
	jbe	.LBB15_1
.LBB15_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	leaq	-8(%rdi), %rcx
	movq	-8(%rdi), %rdx
	movq	%rdx, (%rdi)
	xorps	%xmm1, %xmm1
	cvtsi2sdl	-16(%rdi), %xmm1
	xorps	%xmm2, %xmm2
	cvtsi2sdl	-12(%rdi), %xmm2
	divsd	%xmm2, %xmm1
	ucomisd	%xmm1, %xmm0
	movq	%rcx, %rdi
	ja	.LBB15_2
	jmp	.LBB15_3
.LBB15_1:
	movq	%rdi, %rcx
.LBB15_3:                               # %._crit_edge
	movq	%rax, (%rcx)
	retq
.Lfunc_end15:
	.size	_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_, .Lfunc_end15-_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIP5TItemSt6vectorIS2_SaIS2_EEEENS0_5__ops14_Val_less_iterEEvT_T0_
	.cfi_endproc
                                        # -- End function
	.text
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB16_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB16_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z9BranchGPUPiS_S_S_iS_S_l, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z8BoundGPUPiS_S_S_S_iiiS_S_l, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end16:
	.size	__hip_module_ctor, .Lfunc_end16-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB17_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB17_2:
	retq
.Lfunc_end17:
	.size	__hip_module_dtor, .Lfunc_end17-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z9BranchGPUPiS_S_S_iS_S_l,@object # @_Z9BranchGPUPiS_S_S_iS_S_l
	.section	.rodata,"a",@progbits
	.globl	_Z9BranchGPUPiS_S_S_iS_S_l
	.p2align	3, 0x0
_Z9BranchGPUPiS_S_S_iS_S_l:
	.quad	_Z24__device_stub__BranchGPUPiS_S_S_iS_S_l
	.size	_Z9BranchGPUPiS_S_S_iS_S_l, 8

	.type	_Z8BoundGPUPiS_S_S_S_iiiS_S_l,@object # @_Z8BoundGPUPiS_S_S_S_iiiS_S_l
	.globl	_Z8BoundGPUPiS_S_S_S_iiiS_S_l
	.p2align	3, 0x0
_Z8BoundGPUPiS_S_S_S_iiiS_S_l:
	.quad	_Z23__device_stub__BoundGPUPiS_S_S_S_iiiS_S_l
	.size	_Z8BoundGPUPiS_S_S_S_iiiS_S_l, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Usage: "
	.size	.L.str, 8

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	" input_file output_file"
	.size	.L.str.1, 24

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Step "
	.size	.L.str.2, 6

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	", q = "
	.size	.L.str.3, 7

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"Total time: "
	.size	.L.str.4, 13

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"cannot create std::vector larger than max_size()"
	.size	.L.str.5, 49

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z9BranchGPUPiS_S_S_iS_S_l"
	.size	.L__unnamed_1, 27

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z8BoundGPUPiS_S_S_S_iiiS_S_l"
	.size	.L__unnamed_2, 30

	.type	__hip_fatbin_wrapper,@object    # @__hip_fatbin_wrapper
	.section	.hipFatBinSegment,"a",@progbits
	.p2align	3, 0x0
__hip_fatbin_wrapper:
	.long	1212764230                      # 0x48495046
	.long	1                               # 0x1
	.quad	__hip_fatbin
	.quad	0
	.size	__hip_fatbin_wrapper, 24

	.type	__hip_gpubin_handle,@object     # @__hip_gpubin_handle
	.local	__hip_gpubin_handle
	.comm	__hip_gpubin_handle,8,8
	.section	.init_array,"aw",@init_array
	.p2align	3, 0x0
	.quad	__hip_module_ctor
	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym _Z24__device_stub__BranchGPUPiS_S_S_iS_S_l
	.addrsig_sym _Z23__device_stub__BoundGPUPiS_S_S_S_iiiS_S_l
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _Z9BranchGPUPiS_S_S_iS_S_l
	.addrsig_sym _Z8BoundGPUPiS_S_S_S_iiiS_S_l
	.addrsig_sym _ZSt4cerr
	.addrsig_sym _ZSt4cout
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z9BranchGPUPiS_S_S_iS_S_l ; -- Begin function _Z9BranchGPUPiS_S_S_iS_S_l
	.globl	_Z9BranchGPUPiS_S_S_iS_S_l
	.p2align	8
	.type	_Z9BranchGPUPiS_S_S_iS_S_l,@function
_Z9BranchGPUPiS_S_S_iS_S_l:             ; @_Z9BranchGPUPiS_S_S_iS_S_l
; %bb.0:
	s_clause 0x1
	s_load_b32 s4, s[0:1], 0x4c
	s_load_b64 s[2:3], s[0:1], 0x38
	s_waitcnt lgkmcnt(0)
	s_and_b32 s4, s4, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s4, v[0:1]
	v_mov_b32_e32 v2, 0
	v_cmp_gt_i64_e32 vcc_lo, s[2:3], v[1:2]
	s_and_saveexec_b32 s2, vcc_lo
	s_cbranch_execz .LBB0_5
; %bb.1:
	s_load_b256 s[4:11], s[0:1], 0x0
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_load_b32 s2, s[0:1], 0x20
	s_mov_b32 s3, exec_lo
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, s8, v0
	v_add_co_ci_u32_e32 v3, vcc_lo, s9, v1, vcc_lo
	global_load_b32 v4, v[2:3], off
	s_waitcnt vmcnt(0)
	v_cmpx_ge_i32_e64 s2, v4
	s_xor_b32 s3, exec_lo, s3
	s_cbranch_execz .LBB0_3
; %bb.2:
	v_add_co_u32 v0, vcc_lo, s10, v0
	v_dual_mov_b32 v5, 0 :: v_dual_add_nc_u32 v4, 1, v4
	v_add_co_ci_u32_e32 v1, vcc_lo, s11, v1, vcc_lo
	global_store_b32 v[2:3], v4, off
	global_store_b32 v[0:1], v5, off
                                        ; implicit-def: $vgpr0_vgpr1
.LBB0_3:                                ; %Flow
	s_and_not1_saveexec_b32 s3, s3
	s_cbranch_execz .LBB0_5
; %bb.4:
	v_add_co_u32 v2, vcc_lo, s4, v0
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v1, vcc_lo
	s_load_b128 s[8:11], s[0:1], 0x28
	s_ashr_i32 s3, s2, 31
	v_add_co_u32 v0, vcc_lo, s6, v0
	global_load_b32 v4, v[2:3], off
	s_lshl_b64 s[0:1], s[2:3], 2
	v_mov_b32_e32 v5, 0
	v_add_co_ci_u32_e32 v1, vcc_lo, s7, v1, vcc_lo
	s_waitcnt lgkmcnt(0)
	s_add_u32 s2, s8, s0
	s_addc_u32 s3, s9, s1
	s_add_u32 s0, s10, s0
	s_load_b32 s2, s[2:3], 0x0
	s_addc_u32 s1, s11, s1
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_subrev_nc_u32_e32 v4, s2, v4
	global_store_b32 v[2:3], v4, off
	global_load_b32 v2, v5, s[0:1]
	global_load_b32 v3, v[0:1], off
	s_waitcnt vmcnt(0)
	v_sub_nc_u32_e32 v2, v3, v2
	global_store_b32 v[0:1], v2, off
.LBB0_5:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z9BranchGPUPiS_S_S_iS_S_l
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 320
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 6
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z9BranchGPUPiS_S_S_iS_S_l, .Lfunc_end0-_Z9BranchGPUPiS_S_S_iS_S_l
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 320
; NumSgprs: 18
; NumVgprs: 6
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 6
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z8BoundGPUPiS_S_S_S_iiiS_S_l ; -- Begin function _Z8BoundGPUPiS_S_S_S_iiiS_S_l
	.globl	_Z8BoundGPUPiS_S_S_S_iiiS_S_l
	.p2align	8
	.type	_Z8BoundGPUPiS_S_S_S_iiiS_S_l,@function
_Z8BoundGPUPiS_S_S_S_iiiS_S_l:          ; @_Z8BoundGPUPiS_S_S_S_iiiS_S_l
; %bb.0:
	s_clause 0x1
	s_load_b32 s4, s[0:1], 0x5c
	s_load_b64 s[2:3], s[0:1], 0x48
	s_waitcnt lgkmcnt(0)
	s_and_b32 s4, s4, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[2:3], null, s15, s4, v[0:1]
	v_mov_b32_e32 v3, 0
	v_cmp_gt_i64_e32 vcc_lo, s[2:3], v[2:3]
	s_and_saveexec_b32 s2, vcc_lo
	s_cbranch_execz .LBB1_16
; %bb.1:
	s_load_b256 s[4:11], s[0:1], 0x0
	v_lshlrev_b64 v[0:1], 2, v[2:3]
	v_mov_b32_e32 v16, 0
	s_mov_b32 s12, 0
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v4, vcc_lo, s8, v0
	v_add_co_ci_u32_e32 v5, vcc_lo, s9, v1, vcc_lo
	v_add_co_u32 v6, vcc_lo, s4, v0
	v_add_co_ci_u32_e32 v7, vcc_lo, s5, v1, vcc_lo
	v_add_co_u32 v8, vcc_lo, s6, v0
	v_add_co_ci_u32_e32 v9, vcc_lo, s7, v1, vcc_lo
	global_load_b32 v2, v[4:5], off
	global_load_b32 v15, v[6:7], off
	global_load_b32 v14, v[8:9], off
	s_clause 0x2
	s_load_b64 s[2:3], s[0:1], 0x2c
	s_load_b64 s[8:9], s[0:1], 0x20
	s_load_b128 s[4:7], s[0:1], 0x38
	s_mov_b32 s1, exec_lo
	s_waitcnt vmcnt(2) lgkmcnt(0)
	v_cmpx_ge_i32_e64 s2, v2
	s_cbranch_execz .LBB1_7
; %bb.2:                                ; %.lr.ph.preheader
	v_ashrrev_i32_e32 v3, 31, v2
	s_add_i32 s13, s2, 1
                                        ; implicit-def: $sgpr14
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[12:13], 2, v[2:3]
	v_add_co_u32 v10, vcc_lo, s4, v12
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v11, vcc_lo, s5, v13, vcc_lo
	v_add_co_u32 v12, vcc_lo, s6, v12
	v_add_co_ci_u32_e32 v13, vcc_lo, s7, v13, vcc_lo
.LBB1_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	global_load_b32 v16, v[10:11], off
	global_load_b32 v3, v[12:13], off
	s_waitcnt vmcnt(3)
	v_mov_b32_e32 v19, v15
	s_or_b32 s14, s14, exec_lo
	s_mov_b32 s15, exec_lo
                                        ; implicit-def: $vgpr18
	s_waitcnt vmcnt(1)
	v_add_nc_u32_e32 v17, v16, v15
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_ge_i32_e64 s3, v17
	s_cbranch_execz .LBB1_5
; %bb.4:                                ;   in Loop: Header=BB1_3 Depth=1
	v_add_co_u32 v10, vcc_lo, v10, 4
	v_add_co_ci_u32_e32 v11, vcc_lo, 0, v11, vcc_lo
	v_cmp_le_i32_e32 vcc_lo, s2, v2
	v_add_co_u32 v12, s0, v12, 4
	s_waitcnt vmcnt(0)
	v_dual_mov_b32 v19, v17 :: v_dual_add_nc_u32 v14, v3, v14
	v_add_nc_u32_e32 v18, 1, v2
	v_add_co_ci_u32_e64 v13, s0, 0, v13, s0
	v_mov_b32_e32 v2, s13
	s_and_not1_b32 s0, s14, exec_lo
	s_and_b32 s14, vcc_lo, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 s14, s0, s14
.LBB1_5:                                ; %Flow146
                                        ;   in Loop: Header=BB1_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s15
	v_dual_mov_b32 v20, v2 :: v_dual_mov_b32 v15, v17
	v_mov_b32_e32 v2, v18
	s_and_b32 s0, exec_lo, s14
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 s12, s0, s12
	s_and_not1_b32 exec_lo, exec_lo, s12
	s_cbranch_execnz .LBB1_3
; %bb.6:                                ; %Flow147
	s_or_b32 exec_lo, exec_lo, s12
	v_dual_mov_b32 v15, v19 :: v_dual_mov_b32 v2, v20
.LBB1_7:                                ; %Flow148
	s_or_b32 exec_lo, exec_lo, s1
	v_mov_b32_e32 v10, 0
	s_mov_b32 s0, exec_lo
	v_cmpx_ne_u32_e32 0, v16
	s_cbranch_execz .LBB1_9
; %bb.8:
	v_ashrrev_i32_e32 v10, 31, v16
	s_waitcnt vmcnt(1)
	v_sub_nc_u32_e32 v13, s3, v15
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v11, v16, v10
	s_waitcnt vmcnt(0)
	v_mul_lo_u32 v3, v3, v13
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v11, v11, v10
	v_cvt_f32_u32_e32 v12, v11
	v_sub_nc_u32_e32 v16, 0, v11
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_iflag_f32_e32 v12, v12
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v12, 0x4f7ffffe, v12
	v_cvt_u32_f32_e32 v12, v12
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v13, v16, v12
	v_ashrrev_i32_e32 v16, 31, v3
	v_add_nc_u32_e32 v3, v3, v16
	v_xor_b32_e32 v10, v16, v10
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_mul_hi_u32 v13, v12, v13
	v_xor_b32_e32 v3, v3, v16
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v12, v12, v13
	v_mul_hi_u32 v12, v3, v12
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v13, v12, v11
	v_sub_nc_u32_e32 v3, v3, v13
	v_add_nc_u32_e32 v13, 1, v12
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_sub_nc_u32_e32 v17, v3, v11
	v_cmp_ge_u32_e32 vcc_lo, v3, v11
	v_cndmask_b32_e32 v12, v12, v13, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cndmask_b32_e32 v3, v3, v17, vcc_lo
	v_add_nc_u32_e32 v13, 1, v12
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cmp_ge_u32_e32 vcc_lo, v3, v11
	v_cndmask_b32_e32 v3, v12, v13, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v3, v3, v10
	v_sub_nc_u32_e32 v10, v3, v10
.LBB1_9:
	s_or_b32 exec_lo, exec_lo, s0
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_add_nc_u32_e32 v3, v10, v14
	v_add_co_u32 v10, vcc_lo, s8, v0
	v_add_co_ci_u32_e32 v11, vcc_lo, s9, v1, vcc_lo
	s_mov_b32 s1, exec_lo
	global_store_b32 v[10:11], v3, off
	global_store_b32 v[6:7], v15, off
	global_store_b32 v[8:9], v14, off
	global_store_b32 v[4:5], v2, off
	v_cmpx_gt_i32_e64 s2, v2
	s_cbranch_execz .LBB1_15
; %bb.10:                               ; %.lr.ph96.preheader
	v_ashrrev_i32_e32 v3, 31, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[5:6], 2, v[2:3]
	v_add_co_u32 v3, vcc_lo, s4, v5
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v4, vcc_lo, s5, v6, vcc_lo
	v_add_co_u32 v5, vcc_lo, s6, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s7, v6, vcc_lo
	s_mov_b32 s4, 0
.LBB1_11:                               ; %.lr.ph96
                                        ; =>This Inner Loop Header: Depth=1
	global_load_b32 v7, v[3:4], off
	s_mov_b32 s0, exec_lo
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v7, v7, v15
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_ge_i32_e64 s3, v7
	s_cbranch_execz .LBB1_13
; %bb.12:                               ;   in Loop: Header=BB1_11 Depth=1
	global_load_b32 v8, v[5:6], off
	s_waitcnt vmcnt(0)
	v_dual_mov_b32 v15, v7 :: v_dual_add_nc_u32 v14, v8, v14
.LBB1_13:                               ;   in Loop: Header=BB1_11 Depth=1
	s_or_b32 exec_lo, exec_lo, s0
	v_add_nc_u32_e32 v2, 1, v2
	v_add_co_u32 v3, vcc_lo, v3, 4
	v_add_co_ci_u32_e32 v4, vcc_lo, 0, v4, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_le_i32_e32 vcc_lo, s2, v2
	v_add_co_u32 v5, s0, v5, 4
	v_add_co_ci_u32_e64 v6, s0, 0, v6, s0
	s_or_b32 s4, vcc_lo, s4
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s4
	s_cbranch_execnz .LBB1_11
; %bb.14:                               ; %Flow
	s_or_b32 exec_lo, exec_lo, s4
.LBB1_15:                               ; %Flow145
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s1
	v_add_co_u32 v0, vcc_lo, s10, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s11, v1, vcc_lo
	global_store_b32 v[0:1], v14, off
.LBB1_16:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z8BoundGPUPiS_S_S_S_iiiS_S_l
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 336
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 21
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z8BoundGPUPiS_S_S_S_iiiS_S_l, .Lfunc_end1-_Z8BoundGPUPiS_S_S_S_iiiS_S_l
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 924
; NumSgprs: 18
; NumVgprs: 21
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 21
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .offset:         32
        .size:           4
        .value_kind:     by_value
      - .address_space:  global
        .offset:         40
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         48
        .size:           8
        .value_kind:     global_buffer
      - .offset:         56
        .size:           8
        .value_kind:     by_value
      - .offset:         64
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         68
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         72
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         76
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         78
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         80
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         82
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         84
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         86
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         104
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         112
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         120
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         128
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 320
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z9BranchGPUPiS_S_S_iS_S_l
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z9BranchGPUPiS_S_S_iS_S_l.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     6
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .offset:         40
        .size:           4
        .value_kind:     by_value
      - .offset:         44
        .size:           4
        .value_kind:     by_value
      - .offset:         48
        .size:           4
        .value_kind:     by_value
      - .address_space:  global
        .offset:         56
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         64
        .size:           8
        .value_kind:     global_buffer
      - .offset:         72
        .size:           8
        .value_kind:     by_value
      - .offset:         80
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         84
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         88
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         92
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         94
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         96
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         98
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         100
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         102
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         120
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         128
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         136
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         144
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 336
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z8BoundGPUPiS_S_S_S_iiiS_S_l
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z8BoundGPUPiS_S_S_S_iiiS_S_l.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     21
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
