#include <iostream>
#include <stack>
#include <stdlib.h>
#include <math.h>
#include <cuda.h>
using namespace std;

struct Point {
  /* it will represent a point */
  int x, y;
};

__constant__ Point d_p0[1];

__device__ int distSq(Point p1, Point p2)
{
    return (p1.x - p2.x)*(p1.x - p2.x) +
          (p1.y - p2.y)*(p1.y - p2.y);
}

// To find orientation of ordered triplet (p, q, r).
// The function returns following values
// 0 --> p, q and r are colinear
// 1 --> Clockwise
// 2 --> Counterclockwise
__device__ int d_orientation(Point p, Point q, Point r)
{
    int val = (q.y - p.y) * (r.x - q.x) -
              (q.x - p.x) * (r.y - q.y);

    if (val == 0) return 0;  // colinear
    return (val > 0)? 1: 2; // clock or counterclock wise
}

__device__ int compare(Point p1,Point p2){
  // Find orientation with respect to the first point
  int o = d_orientation(d_p0[0], p1, p2);
  if(o == 0)
    return (distSq(d_p0[0], p2) >= distSq(d_p0[0],p1))? -1 : 1;

  return (o == 2)? -1: 1;
}

__device__ void swap(Point *points,uint lowIndex,uint upIndex){
  /* it will swap two points */
  Point aux = points[lowIndex];
  points[lowIndex] = points[upIndex];
  points[upIndex] = aux;
}

__global__ void sort(Point* points,uint phase,uint n){
  /* it will sort with points array with respect to phase*/
  uint ti = blockIdx.x*blockDim.x+threadIdx.x;
  if(ti >= n || ti == 0) return;

  if(ti%phase == 0){ // multiplier phase
    uint top = ti, lower = (top - phase) + 1;
    uint middle = lower + phase/2;
    uint lowG1 = lower, lowG2 = middle, topG1 = middle-1, topG2 = top;
    while(true){
      if(lowG1 > topG1 && lowG2 > topG2) break;

      // --------------------- case 1 ---------------------
      if(lowG1 <= topG1 && lowG2 <= topG2){
        Point p1 = points[lowG1];
        Point p2 = points[lowG2];
        if(compare(p1,p2) == 1){
          swap(points,lowG1,lowG2);
          lowG2++;
        }
        else lowG1++;

      }

      // --------------------- case 2 ---------------------
      else if(lowG1 < topG1 && lowG2 > topG2){
        uint next = lowG1 + 1;
        Point p1 = points[lowG1];
        Point p2 = points[next];
        if(compare(p1,p2) == 1)
          swap(points,lowG1,next);
        lowG1++;
      }

      // --------------------- case 3 ---------------------
      else if(lowG2 < topG2 && lowG1 > topG1){
        uint next = lowG2 + 1;
        Point p1 = points[lowG2];
        Point p2 = points[next];
        if(compare(p1,p2) == 1)
          swap(points,lowG2,next);
        lowG2++;
      }

      else if(lowG1 == topG1)
        lowG1++;
      else if(lowG2 == topG2)
        lowG2++;
    }
  }
}

__host__ void checkCudaState(cudaError_t& cudaState,const char *message){
  /* it will print an error message if there is */
  if(cudaState != cudaSuccess) cout << message;
}

__host__ Point nextToTop(stack<Point> &S){
  /* it will find next to top in a stack */
  Point p = S.top();
  S.pop();
  Point res = S.top();
  S.push(p);
  return res;
}

__host__ void swap(Point &p1, Point &p2){
  /* it will swap two points */
  Point temp = p1;
  p1 = p2;
  p2 = temp;
}

__host__ int h_orientation(Point p, Point q, Point r){
  /* it will determine orientation between three points */
  int val = (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);

  if(val == 0) return 0;  // colinear
  return (val > 0)? 1: 2; // clock or counterclock wise
}

// Prints convex hull of a set of n points.
__host__ void convexHull(Point *h_points, int n){
  /* it will find convex hull of a set of points */

  cudaError_t cudaState = cudaSuccess;
  size_t size = n*sizeof(Point);
  Point *h_result = NULL, *d_points = NULL;

  h_result = (Point *) malloc(size);
  cudaState = cudaMalloc((void**)&d_points,size);
  checkCudaState(cudaState,"Impossible allocate data for d_points\n");

  if(d_points != NULL){

    // Find the bottommost point
    int ymin = h_points[0].y, min = 0;
    for(int i = 1; i < n; i++){
     int y = h_points[i].y;

      // Pick the bottom-most or chose the left
      // most point in case of tie
      if((y < ymin) || (ymin == y && h_points[i].x < h_points[min].x))
        ymin = h_points[i].y, min = i;
    }

    // Place the bottom-most point at first position
    swap(h_points[0], h_points[min]);

    // Sort n-1 points with respect to the first point.
    // A point p1 comes before p2 in sorted ouput if p2
    // has larger polar angle (in counterclockwise
    // direction) than p1

    cudaState = cudaMemcpyToSymbol(d_p0,h_points,sizeof(Point));
    checkCudaState(cudaState,"Impossible copy data from host to device\n");

    cudaState = cudaMemcpy(d_points,h_points,size,cudaMemcpyHostToDevice);
    checkCudaState(cudaState,"Impossible copy data from host to device\n");
    dim3 gridSize((int)(ceil(n/1024.0)),1,1);
    dim3 blockSize(1024,1,1);
    uint i = 1;
    while(pow(2,i) <= n){
      sort<<<gridSize,blockSize>>>(d_points,pow(2,i),n);
      cudaDeviceSynchronize();
      i++;
    }

    cudaState = cudaMemcpy(h_result,d_points,size,cudaMemcpyDeviceToHost);
    checkCudaState(cudaState,"Impossible copy data from device to host\n");
    h_result[0] = h_points[0];
    // If two or more points make same angle with p0,
    // Remove all but the one that is farthest from p0
    // Remember that, in above sorting, our criteria was
    // to keep the farthest point at the end when more than
    // one points have same angle.
    int m = 1; // Initialize size of modified array
    for(int i=1; i<n; i++){
      // Keep removing i while angle of i and i+1 is same
      // with respect to p0
      while(i < n-1 && h_orientation(h_points[0],h_result[i],h_result[i+1]) == 0)
        i++;

      h_result[m] = h_result[i];
      m++;  // Update size of modified array
    }

    // If modified array of points has less than 3 points,
    // convex hull is not possible
    if (m < 3) return;

    // Create an empty stack and push first three points
    // to it.
    stack<Point> S;
    S.push(h_result[0]);
    S.push(h_result[1]);
    S.push(h_result[2]);

    // Process remaining n-3 points
    for(int i = 3; i < m; i++){
      // Keep removing top while the angle formed by
      // points next-to-top, top, and h_result[i] makes
      // a non-left turn
      while(h_orientation(nextToTop(S), S.top(), h_result[i]) != 2)
        S.pop();
      S.push(h_result[i]);
    }

    // Now stack has the output points, print contents of stack
    while(!S.empty()){
      Point p = S.top();
      cout << "(" << p.x << ", " << p.y <<")" << endl;
      S.pop();
    }

  }

  if(h_result != NULL) free(h_result);
  if(d_points != NULL) cudaFree(d_points);

}

// Driver program to test above functions
int main() {
  uint n = 9;
  size_t size = n*sizeof(Point);
  Point *h_points = NULL;
  h_points = (Point *) malloc(size);

  if(h_points != NULL){
    h_points[0].x = 0; h_points[0].y = 3;
    h_points[1].x = 1; h_points[1].y = 1;
    h_points[2].x = 2; h_points[2].y = 2;
    h_points[3].x = 4; h_points[3].y = 4;
    h_points[4].x = 0; h_points[4].y = 0;
    h_points[5].x = 1; h_points[5].y = 2;
    h_points[6].x = 3; h_points[6].y = 1;
    h_points[7].x = 3; h_points[7].y = 3;
    h_points[8].x = 2; h_points[8].y = 1;
    convexHull(h_points, n);
  }

  if(h_points != NULL) free(h_points);
  return 0;
}

	.file	"tmpxft_0030859b_00000000-6_graham.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3922:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3922:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z6distSq5PointS_
	.type	_Z6distSq5PointS_, @function
_Z6distSq5PointS_:
.LFB3906:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	$1, 12(%rsp)
	movl	12(%rsp), %edi
	call	exit@PLT
	.cfi_endproc
.LFE3906:
	.size	_Z6distSq5PointS_, .-_Z6distSq5PointS_
	.globl	_Z13d_orientation5PointS_S_
	.type	_Z13d_orientation5PointS_S_, @function
_Z13d_orientation5PointS_S_:
.LFB3907:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	$1, 12(%rsp)
	movl	12(%rsp), %edi
	call	exit@PLT
	.cfi_endproc
.LFE3907:
	.size	_Z13d_orientation5PointS_S_, .-_Z13d_orientation5PointS_S_
	.globl	_Z7compare5PointS_
	.type	_Z7compare5PointS_, @function
_Z7compare5PointS_:
.LFB4713:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	pushq	%rax
	.cfi_def_cfa_offset 16
	call	_Z6distSq5PointS_
	.cfi_endproc
.LFE4713:
	.size	_Z7compare5PointS_, .-_Z7compare5PointS_
	.globl	_Z4swapP5Pointjj
	.type	_Z4swapP5Pointjj, @function
_Z4swapP5Pointjj:
.LFB3909:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	$1, 12(%rsp)
	movl	12(%rsp), %edi
	call	exit@PLT
	.cfi_endproc
.LFE3909:
	.size	_Z4swapP5Pointjj, .-_Z4swapP5Pointjj
	.globl	_Z14checkCudaStateR9cudaErrorPKc
	.type	_Z14checkCudaStateR9cudaErrorPKc, @function
_Z14checkCudaStateR9cudaErrorPKc:
.LFB3910:
	.cfi_startproc
	endbr64
	cmpl	$0, (%rdi)
	je	.L10
	leaq	_ZSt4cout(%rip), %rdi
	jmp	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L10:
	ret
	.cfi_endproc
.LFE3910:
	.size	_Z14checkCudaStateR9cudaErrorPKc, .-_Z14checkCudaStateR9cudaErrorPKc
	.globl	_Z4swapR5PointS0_
	.type	_Z4swapR5PointS0_, @function
_Z4swapR5PointS0_:
.LFB3912:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movq	(%rsi), %rdx
	movq	%rdx, (%rdi)
	movq	%rax, (%rsi)
	ret
	.cfi_endproc
.LFE3912:
	.size	_Z4swapR5PointS0_, .-_Z4swapR5PointS0_
	.globl	_Z13h_orientation5PointS_S_
	.type	_Z13h_orientation5PointS_S_, @function
_Z13h_orientation5PointS_S_:
.LFB3913:
	.cfi_startproc
	endbr64
	movq	%rsi, %rcx
	movq	%rdi, %r8
	sarq	$32, %rcx
	sarq	$32, %r8
	movl	%ecx, %eax
	subl	%r8d, %eax
	movl	%edx, %r8d
	sarq	$32, %rdx
	subl	%esi, %r8d
	subl	%ecx, %edx
	subl	%edi, %esi
	imull	%r8d, %eax
	imull	%edx, %esi
	subl	%esi, %eax
	testl	%eax, %eax
	je	.L14
	movl	$1, %eax
	movl	$2, %edx
	cmovle	%edx, %eax
.L14:
	ret
	.cfi_endproc
.LFE3913:
	.size	_Z13h_orientation5PointS_S_, .-_Z13h_orientation5PointS_S_
	.globl	_Z30__device_stub__Z4sortP5PointjjP5Pointjj
	.type	_Z30__device_stub__Z4sortP5PointjjP5Pointjj, @function
_Z30__device_stub__Z4sortP5PointjjP5Pointjj:
.LFB3944:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	24(%rsp), %rcx
	leaq	32(%rsp), %rdi
	movl	%esi, 4(%rsp)
	leaq	44(%rsp), %rsi
	movl	%edx, (%rsp)
	leaq	16(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 40(%rsp)
	movq	%rax, 80(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 32(%rsp)
	movq	%rax, 44(%rsp)
	movl	$1, 52(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L20
	pushq	24(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z4sortP5Pointjj(%rip), %rdi
	pushq	24(%rsp)
	.cfi_def_cfa_offset 144
	movq	60(%rsp), %rcx
	movl	68(%rsp), %r8d
	movq	48(%rsp), %rsi
	movl	56(%rsp), %edx
	leaq	96(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L20:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3944:
	.size	_Z30__device_stub__Z4sortP5PointjjP5Pointjj, .-_Z30__device_stub__Z4sortP5PointjjP5Pointjj
	.globl	_Z4sortP5Pointjj
	.type	_Z4sortP5Pointjj, @function
_Z4sortP5Pointjj:
.LFB3945:
	.cfi_startproc
	endbr64
	jmp	_Z30__device_stub__Z4sortP5PointjjP5Pointjj
	.cfi_endproc
.LFE3945:
	.size	_Z4sortP5Pointjj, .-_Z4sortP5Pointjj
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z4sortP5Pointjj"
.LC1:
	.string	"d_p0"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3947:
	.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	_Z4sortP5Pointjj(%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	%r8d, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC1(%rip), %rdx
	movl	$8, %r9d
	leaq	_ZL4d_p0(%rip), %rsi
	pushq	$1
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	call	__cudaRegisterVar@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rdx
	.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
.LFE3947:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZNSt5dequeI5PointSaIS0_EE4backEv,"axG",@progbits,_ZNSt5dequeI5PointSaIS0_EE4backEv,comdat
	.align 2
	.weak	_ZNSt5dequeI5PointSaIS0_EE4backEv
	.type	_ZNSt5dequeI5PointSaIS0_EE4backEv, @function
_ZNSt5dequeI5PointSaIS0_EE4backEv:
.LFB4406:
	.cfi_startproc
	endbr64
	movq	48(%rdi), %rax
	movq	72(%rdi), %rdx
	cmpq	56(%rdi), %rax
	jne	.L28
	movq	-8(%rdx), %rax
	addq	$512, %rax
.L28:
	subq	$8, %rax
	ret
	.cfi_endproc
.LFE4406:
	.size	_ZNSt5dequeI5PointSaIS0_EE4backEv, .-_ZNSt5dequeI5PointSaIS0_EE4backEv
	.section	.text._ZNSt5dequeI5PointSaIS0_EE8pop_backEv,"axG",@progbits,_ZNSt5dequeI5PointSaIS0_EE8pop_backEv,comdat
	.align 2
	.weak	_ZNSt5dequeI5PointSaIS0_EE8pop_backEv
	.type	_ZNSt5dequeI5PointSaIS0_EE8pop_backEv, @function
_ZNSt5dequeI5PointSaIS0_EE8pop_backEv:
.LFB4407:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movq	48(%rdi), %rdi
	cmpq	56(%rbx), %rdi
	je	.L30
	subq	$8, %rdi
	movq	%rdi, 48(%rbx)
	jmp	.L29
.L30:
	movl	$512, %esi
	call	_ZdlPvm@PLT
	movq	72(%rbx), %rax
	leaq	-8(%rax), %rdx
	movq	-8(%rax), %rax
	movq	%rdx, 72(%rbx)
	movq	%rax, 56(%rbx)
	leaq	512(%rax), %rdx
	addq	$504, %rax
	movq	%rdx, 64(%rbx)
	movq	%rax, 48(%rbx)
.L29:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4407:
	.size	_ZNSt5dequeI5PointSaIS0_EE8pop_backEv, .-_ZNSt5dequeI5PointSaIS0_EE8pop_backEv
	.section	.text._ZNSt11_Deque_baseI5PointSaIS0_EED2Ev,"axG",@progbits,_ZNSt11_Deque_baseI5PointSaIS0_EED5Ev,comdat
	.align 2
	.weak	_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev
	.type	_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev, @function
_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev:
.LFB4418:
	.cfi_startproc
	endbr64
	cmpq	$0, (%rdi)
	je	.L33
	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
	movq	72(%rdi), %rax
	movq	%rdi, %rbx
	movq	40(%rdi), %rbp
	leaq	8(%rax), %r12
.L35:
	cmpq	%r12, %rbp
	jnb	.L40
	movq	0(%rbp), %rdi
	movl	$512, %esi
	addq	$8, %rbp
	call	_ZdlPvm@PLT
	jmp	.L35
.L40:
	movq	8(%rbx), %rax
	movq	(%rbx), %rdi
	popq	%rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 16
	leaq	0(,%rax,8), %rsi
	popq	%r12
	.cfi_restore 12
	.cfi_def_cfa_offset 8
	jmp	_ZdlPvm@PLT
.L33:
	ret
	.cfi_endproc
.LFE4418:
	.size	_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev, .-_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev
	.weak	_ZNSt11_Deque_baseI5PointSaIS0_EED1Ev
	.set	_ZNSt11_Deque_baseI5PointSaIS0_EED1Ev,_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev
	.section	.rodata._ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_.str1.1,"aMS",@progbits,1
.LC2:
	.string	"cannot create std::deque larger than max_size()"
	.section	.text._ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_,"axG",@progbits,_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_,comdat
	.align 2
	.weak	_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_
	.type	_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_, @function
_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_:
.LFB4521:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	pushq	%rdx
	.cfi_def_cfa_offset 64
	movq	72(%rdi), %rdx
	movq	40(%rdi), %rsi
	movq	48(%rdi), %rax
	movq	%rdx, %r13
	subq	56(%rdi), %rax
	subq	%rsi, %r13
	sarq	$3, %rax
	movq	%r13, %rbp
	sarq	$3, %rbp
	cmpq	$1, %rdx
	movq	%rbp, %rcx
	adcq	$-1, %rcx
	salq	$6, %rcx
	addq	%rcx, %rax
	movq	32(%rdi), %rcx
	subq	16(%rdi), %rcx
	movabsq	$1152921504606846975, %rdi
	sarq	$3, %rcx
	addq	%rcx, %rax
	cmpq	%rdi, %rax
	jne	.L42
	leaq	.LC2(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L42:
	movq	(%rbx), %r8
	movq	8(%rbx), %rax
	movq	%rdx, %rcx
	subq	%r8, %rcx
	movq	%rax, %r9
	sarq	$3, %rcx
	subq	%rcx, %r9
	cmpq	$1, %r9
	ja	.L43
	addq	$2, %rbp
	leaq	0(%rbp,%rbp), %rcx
	cmpq	%rax, %rcx
	jnb	.L44
	subq	%rbp, %rax
	addq	$8, %rdx
	shrq	%rax
	subq	%rsi, %rdx
	leaq	(%r8,%rax,8), %rbp
	cmpq	%rsi, %rbp
	jnb	.L45
	movq	%rbp, %rdi
	cmpq	$8, %rdx
	jg	.L56
	jne	.L50
	movq	(%rsi), %rax
	movq	%rax, 0(%rbp)
	jmp	.L50
.L45:
	leaq	8(%rbp,%r13), %rdi
	cmpq	$8, %rdx
	jle	.L48
	subq	%rdx, %rdi
.L56:
	call	memmove@PLT
	jmp	.L50
.L48:
	jne	.L50
	movq	(%rsi), %rax
	movq	%rax, -8(%rdi)
	jmp	.L50
.L44:
	testq	%rax, %rax
	movl	$1, %edx
	cmovne	%rax, %rdx
	leaq	2(%rax,%rdx), %r14
	cmpq	%r14, %rdi
	jnb	.L51
	movabsq	$2305843009213693951, %rax
	cmpq	%r14, %rax
	jnb	.L52
	call	_ZSt28__throw_bad_array_new_lengthv@PLT
.L52:
	call	_ZSt17__throw_bad_allocv@PLT
.L51:
	leaq	0(,%r14,8), %rdi
	call	_Znwm@PLT
	movq	40(%rbx), %rsi
	movq	%rax, %r15
	movq	%r14, %rax
	subq	%rbp, %rax
	shrq	%rax
	leaq	(%r15,%rax,8), %rbp
	movq	72(%rbx), %rax
	leaq	8(%rax), %rdx
	subq	%rsi, %rdx
	cmpq	$8, %rdx
	jle	.L53
	movq	%rbp, %rdi
	call	memmove@PLT
	jmp	.L54
.L53:
	jne	.L54
	movq	(%rsi), %rax
	movq	%rax, 0(%rbp)
.L54:
	movq	8(%rbx), %rax
	movq	(%rbx), %rdi
	leaq	0(,%rax,8), %rsi
	call	_ZdlPvm@PLT
	movq	%r15, (%rbx)
	movq	%r14, 8(%rbx)
.L50:
	movq	0(%rbp), %rax
	movq	%rbp, 40(%rbx)
	addq	%r13, %rbp
	movq	%rbp, 72(%rbx)
	movq	%rax, 24(%rbx)
	addq	$512, %rax
	movq	%rax, 32(%rbx)
	movq	0(%rbp), %rax
	movq	%rax, 56(%rbx)
	addq	$512, %rax
	movq	%rax, 64(%rbx)
.L43:
	movq	72(%rbx), %rbp
	movl	$512, %edi
	call	_Znwm@PLT
	movq	(%r12), %rdx
	movq	%rax, 8(%rbp)
	movq	48(%rbx), %rax
	movq	%rdx, (%rax)
	movq	72(%rbx), %rax
	leaq	8(%rax), %rdx
	movq	8(%rax), %rax
	movq	%rdx, 72(%rbx)
	leaq	512(%rax), %rdx
	movq	%rax, 56(%rbx)
	movq	%rdx, 64(%rbx)
	movq	%rax, 48(%rbx)
	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
.LFE4521:
	.size	_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_, .-_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_
	.section	.text._ZNSt5dequeI5PointSaIS0_EE9push_backERKS0_,"axG",@progbits,_ZNSt5dequeI5PointSaIS0_EE9push_backERKS0_,comdat
	.align 2
	.weak	_ZNSt5dequeI5PointSaIS0_EE9push_backERKS0_
	.type	_ZNSt5dequeI5PointSaIS0_EE9push_backERKS0_, @function
_ZNSt5dequeI5PointSaIS0_EE9push_backERKS0_:
.LFB4409:
	.cfi_startproc
	endbr64
	movq	64(%rdi), %rcx
	movq	48(%rdi), %rax
	leaq	-8(%rcx), %rdx
	cmpq	%rdx, %rax
	je	.L58
	movq	(%rsi), %rdx
	addq	$8, %rax
	movq	%rdx, -8(%rax)
	movq	%rax, 48(%rdi)
	ret
.L58:
	jmp	_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_
	.cfi_endproc
.LFE4409:
	.size	_ZNSt5dequeI5PointSaIS0_EE9push_backERKS0_, .-_ZNSt5dequeI5PointSaIS0_EE9push_backERKS0_
	.text
	.globl	_Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE
	.type	_Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE, @function
_Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE:
.LFB3911:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	_ZNSt5dequeI5PointSaIS0_EE4backEv
	movq	%rbx, %rdi
	movq	(%rax), %rax
	movq	%rax, (%rsp)
	call	_ZNSt5dequeI5PointSaIS0_EE8pop_backEv
	movq	%rbx, %rdi
	call	_ZNSt5dequeI5PointSaIS0_EE4backEv
	movq	%rsp, %rsi
	movq	%rbx, %rdi
	movq	(%rax), %rbp
	call	_ZNSt5dequeI5PointSaIS0_EE9push_backERKS0_
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L62
	call	__stack_chk_fail@PLT
.L62:
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	movq	%rbp, %rax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3911:
	.size	_Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE, .-_Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE
	.section	.rodata.str1.1
.LC3:
	.string	"Impossible allocate data for d_points\n"
.LC4:
	.string	"Impossible copy data from host to device\n"
.LC7:
	.string	"Impossible copy data from device to host\n"
.LC8:
	.string	"("
.LC9:
	.string	", "
.LC10:
	.string	")"
	.text
	.globl	_Z10convexHullP5Pointi
	.type	_Z10convexHullP5Pointi, @function
_Z10convexHullP5Pointi:
.LFB3914:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3914
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%edx, %edx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movslq	%esi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %r12
	salq	$3, %r13
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	movq	%r13, %rdi
	subq	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %r14
	movq	%rdx, 24(%rsp)
	call	malloc@PLT
	leaq	24(%rsp), %rdi
	movq	%r13, %rsi
	movq	%rax, %rbp
.LEHB0:
	call	cudaMalloc@PLT
	leaq	.LC3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, 20(%rsp)
	call	_Z14checkCudaStateR9cudaErrorPKc
	cmpq	$0, 24(%rsp)
	je	.L65
	movl	4(%rbx), %ecx
	movl	$1, %eax
	xorl	%edx, %edx
.L66:
	cmpl	%eax, %r12d
	jle	.L118
	movl	4(%rbx,%rax,8), %esi
	cmpl	%esi, %ecx
	jg	.L67
	jne	.L99
	movslq	%edx, %rcx
	movl	(%rbx,%rcx,8), %ecx
	cmpl	%ecx, (%rbx,%rax,8)
	jge	.L68
.L67:
	movslq	%eax, %rdx
	jmp	.L68
.L99:
	movl	%ecx, %esi
.L68:
	incq	%rax
	movl	%esi, %ecx
	jmp	.L66
.L118:
	leaq	(%rbx,%rdx,8), %rax
	movq	(%rbx), %rdx
	movl	$1, %r8d
	movq	%rbx, %rsi
	movq	(%rax), %rcx
	leaq	.LC4(%rip), %r15
	leaq	_ZL4d_p0(%rip), %rdi
	movq	%rcx, (%rbx)
	xorl	%ecx, %ecx
	movq	%rdx, (%rax)
	movl	$8, %edx
	call	cudaMemcpyToSymbol@PLT
	movq	%r15, %rsi
	movq	%r14, %rdi
	movl	%eax, 20(%rsp)
	call	_Z14checkCudaStateR9cudaErrorPKc
	movq	24(%rsp), %rdi
	movq	%r13, %rdx
	movq	%rbx, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movq	%r15, %rsi
	movq	%r14, %rdi
	movl	$1, %r15d
	movl	%eax, 20(%rsp)
	call	_Z14checkCudaStateR9cudaErrorPKc
	cvtsi2sdl	%r12d, %xmm2
	movsd	.LC5(%rip), %xmm0
	mulsd	%xmm2, %xmm0
	movsd	%xmm2, (%rsp)
	call	ceil@PLT
	movl	$1, 52(%rsp)
	cvttsd2sil	%xmm0, %eax
	movl	%eax, 32(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 36(%rsp)
	addq	$1023, %rax
	movq	%rax, 44(%rsp)
.L70:
	movl	%r15d, %eax
	movsd	.LC6(%rip), %xmm0
	cvtsi2sdq	%rax, %xmm1
	movsd	%xmm1, 8(%rsp)
	call	pow@PLT
	movsd	(%rsp), %xmm3
	movsd	8(%rsp), %xmm1
	comisd	%xmm0, %xmm3
	jb	.L119
	movl	52(%rsp), %ecx
	movq	44(%rsp), %rdx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	32(%rsp), %rdi
	movl	40(%rsp), %esi
	movsd	%xmm1, 8(%rsp)
	call	__cudaPushCallConfiguration@PLT
	movsd	8(%rsp), %xmm1
	testl	%eax, %eax
	jne	.L71
	movsd	.LC6(%rip), %xmm0
	call	pow@PLT
	movq	24(%rsp), %rdi
	movl	%r12d, %edx
	cvttsd2siq	%xmm0, %rsi
	call	_Z30__device_stub__Z4sortP5PointjjP5Pointjj
.L71:
	call	cudaDeviceSynchronize@PLT
	incl	%r15d
	jmp	.L70
.L119:
	movq	24(%rsp), %rsi
	movq	%r13, %rdx
	movl	$2, %ecx
	movq	%rbp, %rdi
	movl	$1, %r13d
	call	cudaMemcpy@PLT
	leaq	.LC7(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, 20(%rsp)
	call	_Z14checkCudaStateR9cudaErrorPKc
	movq	(%rbx), %rax
	movl	$1, %r9d
	movq	%rax, 0(%rbp)
.L75:
	cmpl	%r12d, %r9d
	jge	.L120
	movslq	%r9d, %rax
	leaq	0(%rbp,%rax,8), %r10
.L77:
	incl	%r9d
	movq	%r10, %r11
	cmpl	%r9d, %r12d
	je	.L76
	movq	(%r11), %rsi
	movq	(%rbx), %rdi
	addq	$8, %r10
	movq	(%r10), %rdx
	call	_Z13h_orientation5PointS_S_
	testl	%eax, %eax
	je	.L77
.L76:
	movq	(%r11), %rax
	movq	%rax, 0(%rbp,%r13,8)
	incq	%r13
	jmp	.L75
.L120:
	cmpl	$2, %r13d
	jle	.L64
	movq	$8, 64(%rsp)
	xorl	%eax, %eax
	movl	$64, %edi
	movq	%rax, 72(%rsp)
	movq	%rax, 80(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rax, 96(%rsp)
	movq	%rax, 104(%rsp)
	movq	%rax, 112(%rsp)
	movq	%rax, 120(%rsp)
	movq	%rax, 128(%rsp)
	call	_Znwm@PLT
.LEHE0:
	movl	$512, %edi
	movq	%rax, 56(%rsp)
	movq	%rax, %rbx
	leaq	24(%rax), %r12
.LEHB1:
	call	_Znwm@PLT
.LEHE1:
	movq	%rax, 24(%rbx)
	leaq	56(%rsp), %rbx
	leaq	512(%rax), %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	movq	%r12, 96(%rsp)
	movq	%rax, 80(%rsp)
	movq	%rdx, 88(%rsp)
	movq	%r12, 128(%rsp)
	movq	%rax, 112(%rsp)
	movq	%rdx, 120(%rsp)
	movq	%rax, 72(%rsp)
	movq	%rax, 104(%rsp)
.LEHB2:
	call	_ZNSt5dequeI5PointSaIS0_EE9push_backERKS0_
.LEHE2:
	jmp	.L121
.L102:
	endbr64
	movq	%rax, %rdi
.L82:
	call	__cxa_begin_catch@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L116
.LEHB3:
	call	__cxa_rethrow@PLT
.LEHE3:
.L103:
	endbr64
	movq	%rax, %rbp
.L84:
	call	__cxa_end_catch@PLT
	movq	%rbp, %rdi
	call	__cxa_begin_catch@PLT
	movl	$64, %esi
	movq	%rbx, %rdi
	call	_ZdlPvm@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L116
.LEHB4:
	call	__cxa_rethrow@PLT
.LEHE4:
.L101:
	endbr64
	movq	%rax, %rbx
.L86:
	call	__cxa_end_catch@PLT
	movq	%rbx, %rdi
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L117
	jmp	.L116
.L121:
	leaq	8(%rbp), %rsi
	movq	%rbx, %rdi
.LEHB5:
	call	_ZNSt5dequeI5PointSaIS0_EE9push_backERKS0_
	leaq	16(%rbp), %rsi
	movq	%rbx, %rdi
	call	_ZNSt5dequeI5PointSaIS0_EE9push_backERKS0_
	leaq	24(%rbp), %r12
	leal	-3(%r13), %eax
	leaq	(%r12,%rax,8), %r14
.L88:
	cmpq	%r14, %r12
	je	.L122
.L91:
	movq	%rbx, %rdi
	call	_ZNSt5dequeI5PointSaIS0_EE4backEv
	movq	%rbx, %rdi
	movq	%rax, %r13
	call	_Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE
	movq	(%r12), %rdx
	movq	0(%r13), %rsi
	movq	%rax, %rdi
	call	_Z13h_orientation5PointS_S_
	cmpl	$2, %eax
	je	.L123
	movq	%rbx, %rdi
	call	_ZNSt5dequeI5PointSaIS0_EE8pop_backEv
	jmp	.L91
.L123:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_ZNSt5dequeI5PointSaIS0_EE9push_backERKS0_
	addq	$8, %r12
	jmp	.L88
.L122:
	leaq	.LC8(%rip), %r12
.L90:
	movq	72(%rsp), %rax
	movq	%rbx, %rdi
	cmpq	%rax, 104(%rsp)
	je	.L124
	call	_ZNSt5dequeI5PointSaIS0_EE4backEv
	movq	%r12, %rsi
	leaq	_ZSt4cout(%rip), %rdi
	movl	(%rax), %r14d
	movl	4(%rax), %r13d
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	%r14d, %esi
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	leaq	.LC9(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	%r13d, %esi
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	leaq	.LC10(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
.LEHE5:
	movq	%rbx, %rdi
	call	_ZNSt5dequeI5PointSaIS0_EE8pop_backEv
	jmp	.L90
.L124:
	call	_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev
	jmp	.L93
.L65:
	testq	%rbp, %rbp
	je	.L94
.L93:
	movq	%rbp, %rdi
	call	free@PLT
.L94:
	movq	24(%rsp), %rdi
	testq	%rdi, %rdi
	je	.L64
.LEHB6:
	call	cudaFree@PLT
	jmp	.L64
.L100:
	endbr64
	movq	%rax, %rbp
.L96:
	movq	%rbx, %rdi
	call	_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev
	movq	%rbp, %rdi
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L116
.L117:
	call	_Unwind_Resume@PLT
.LEHE6:
.L64:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L98
.L116:
	call	__stack_chk_fail@PLT
.L98:
	addq	$152, %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
.LFE3914:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
	.align 4
.LLSDA3914:
	.byte	0xff
	.byte	0x9b
	.uleb128 .LLSDATT3914-.LLSDATTD3914
.LLSDATTD3914:
	.byte	0x1
	.uleb128 .LLSDACSE3914-.LLSDACSB3914
.LLSDACSB3914:
	.uleb128 .LEHB0-.LFB3914
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB3914
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L102-.LFB3914
	.uleb128 0x1
	.uleb128 .LEHB2-.LFB3914
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L100-.LFB3914
	.uleb128 0
	.uleb128 .LEHB3-.LFB3914
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L103-.LFB3914
	.uleb128 0x3
	.uleb128 .LEHB4-.LFB3914
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L101-.LFB3914
	.uleb128 0
	.uleb128 .LEHB5-.LFB3914
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L100-.LFB3914
	.uleb128 0
	.uleb128 .LEHB6-.LFB3914
	.uleb128 .LEHE6-.LEHB6
	.uleb128 0
	.uleb128 0
.LLSDACSE3914:
	.byte	0x1
	.byte	0
	.byte	0
	.byte	0x7d
	.align 4
	.long	0

.LLSDATT3914:
	.text
	.size	_Z10convexHullP5Pointi, .-_Z10convexHullP5Pointi
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB3919:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	$72, %edi
	call	malloc@PLT
	testq	%rax, %rax
	je	.L126
	movq	%rax, %rbx
	movl	$3, %eax
	movl	$9, %esi
	salq	$32, %rax
	movq	%rbx, %rdi
	movq	%rax, (%rbx)
	movabsq	$4294967297, %rax
	movq	%rax, 8(%rbx)
	movabsq	$8589934594, %rax
	movq	%rax, 16(%rbx)
	movabsq	$17179869188, %rax
	movq	%rax, 24(%rbx)
	xorl	%eax, %eax
	movq	%rax, 32(%rbx)
	movabsq	$8589934593, %rax
	movq	%rax, 40(%rbx)
	movabsq	$4294967299, %rax
	movq	%rax, 48(%rbx)
	movabsq	$12884901891, %rax
	movq	%rax, 56(%rbx)
	movl	$2147483649, %eax
	addq	%rax, %rax
	movq	%rax, 64(%rbx)
	call	_Z10convexHullP5Pointi
	movq	%rbx, %rdi
	call	free@PLT
.L126:
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3919:
	.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
	.local	_ZL4d_p0
	.comm	_ZL4d_p0,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC5:
	.long	0
	.long	1062207488
	.align 8
.LC6:
	.long	0
	.long	1073741824
	.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 <iostream>
#include <stack>
#include <stdlib.h>
#include <math.h>
#include <hip/hip_runtime.h>
using namespace std;

struct Point {
  /* it will represent a point */
  int x, y;
};

__constant__ Point d_p0[1];

__device__ int distSq(Point p1, Point p2)
{
    return (p1.x - p2.x)*(p1.x - p2.x) +
          (p1.y - p2.y)*(p1.y - p2.y);
}

// To find orientation of ordered triplet (p, q, r).
// The function returns following values
// 0 --> p, q and r are colinear
// 1 --> Clockwise
// 2 --> Counterclockwise
__device__ int d_orientation(Point p, Point q, Point r)
{
    int val = (q.y - p.y) * (r.x - q.x) -
              (q.x - p.x) * (r.y - q.y);

    if (val == 0) return 0;  // colinear
    return (val > 0)? 1: 2; // clock or counterclock wise
}

__device__ int compare(Point p1,Point p2){
  // Find orientation with respect to the first point
  int o = d_orientation(d_p0[0], p1, p2);
  if(o == 0)
    return (distSq(d_p0[0], p2) >= distSq(d_p0[0],p1))? -1 : 1;

  return (o == 2)? -1: 1;
}

__device__ void swap(Point *points,uint lowIndex,uint upIndex){
  /* it will swap two points */
  Point aux = points[lowIndex];
  points[lowIndex] = points[upIndex];
  points[upIndex] = aux;
}

__global__ void sort(Point* points,uint phase,uint n){
  /* it will sort with points array with respect to phase*/
  uint ti = blockIdx.x*blockDim.x+threadIdx.x;
  if(ti >= n || ti == 0) return;

  if(ti%phase == 0){ // multiplier phase
    uint top = ti, lower = (top - phase) + 1;
    uint middle = lower + phase/2;
    uint lowG1 = lower, lowG2 = middle, topG1 = middle-1, topG2 = top;
    while(true){
      if(lowG1 > topG1 && lowG2 > topG2) break;

      // --------------------- case 1 ---------------------
      if(lowG1 <= topG1 && lowG2 <= topG2){
        Point p1 = points[lowG1];
        Point p2 = points[lowG2];
        if(compare(p1,p2) == 1){
          swap(points,lowG1,lowG2);
          lowG2++;
        }
        else lowG1++;

      }

      // --------------------- case 2 ---------------------
      else if(lowG1 < topG1 && lowG2 > topG2){
        uint next = lowG1 + 1;
        Point p1 = points[lowG1];
        Point p2 = points[next];
        if(compare(p1,p2) == 1)
          swap(points,lowG1,next);
        lowG1++;
      }

      // --------------------- case 3 ---------------------
      else if(lowG2 < topG2 && lowG1 > topG1){
        uint next = lowG2 + 1;
        Point p1 = points[lowG2];
        Point p2 = points[next];
        if(compare(p1,p2) == 1)
          swap(points,lowG2,next);
        lowG2++;
      }

      else if(lowG1 == topG1)
        lowG1++;
      else if(lowG2 == topG2)
        lowG2++;
    }
  }
}

__host__ void checkCudaState(hipError_t& cudaState,const char *message){
  /* it will print an error message if there is */
  if(cudaState != hipSuccess) cout << message;
}

__host__ Point nextToTop(stack<Point> &S){
  /* it will find next to top in a stack */
  Point p = S.top();
  S.pop();
  Point res = S.top();
  S.push(p);
  return res;
}

__host__ void swap(Point &p1, Point &p2){
  /* it will swap two points */
  Point temp = p1;
  p1 = p2;
  p2 = temp;
}

__host__ int h_orientation(Point p, Point q, Point r){
  /* it will determine orientation between three points */
  int val = (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);

  if(val == 0) return 0;  // colinear
  return (val > 0)? 1: 2; // clock or counterclock wise
}

// Prints convex hull of a set of n points.
__host__ void convexHull(Point *h_points, int n){
  /* it will find convex hull of a set of points */

  hipError_t cudaState = hipSuccess;
  size_t size = n*sizeof(Point);
  Point *h_result = NULL, *d_points = NULL;

  h_result = (Point *) malloc(size);
  cudaState = hipMalloc((void**)&d_points,size);
  checkCudaState(cudaState,"Impossible allocate data for d_points\n");

  if(d_points != NULL){

    // Find the bottommost point
    int ymin = h_points[0].y, min = 0;
    for(int i = 1; i < n; i++){
     int y = h_points[i].y;

      // Pick the bottom-most or chose the left
      // most point in case of tie
      if((y < ymin) || (ymin == y && h_points[i].x < h_points[min].x))
        ymin = h_points[i].y, min = i;
    }

    // Place the bottom-most point at first position
    swap(h_points[0], h_points[min]);

    // Sort n-1 points with respect to the first point.
    // A point p1 comes before p2 in sorted ouput if p2
    // has larger polar angle (in counterclockwise
    // direction) than p1

    cudaState = hipMemcpyToSymbol(HIP_SYMBOL(d_p0),h_points,sizeof(Point));
    checkCudaState(cudaState,"Impossible copy data from host to device\n");

    cudaState = hipMemcpy(d_points,h_points,size,hipMemcpyHostToDevice);
    checkCudaState(cudaState,"Impossible copy data from host to device\n");
    dim3 gridSize((int)(ceil(n/1024.0)),1,1);
    dim3 blockSize(1024,1,1);
    uint i = 1;
    while(pow(2,i) <= n){
      sort<<<gridSize,blockSize>>>(d_points,pow(2,i),n);
      hipDeviceSynchronize();
      i++;
    }

    cudaState = hipMemcpy(h_result,d_points,size,hipMemcpyDeviceToHost);
    checkCudaState(cudaState,"Impossible copy data from device to host\n");
    h_result[0] = h_points[0];
    // If two or more points make same angle with p0,
    // Remove all but the one that is farthest from p0
    // Remember that, in above sorting, our criteria was
    // to keep the farthest point at the end when more than
    // one points have same angle.
    int m = 1; // Initialize size of modified array
    for(int i=1; i<n; i++){
      // Keep removing i while angle of i and i+1 is same
      // with respect to p0
      while(i < n-1 && h_orientation(h_points[0],h_result[i],h_result[i+1]) == 0)
        i++;

      h_result[m] = h_result[i];
      m++;  // Update size of modified array
    }

    // If modified array of points has less than 3 points,
    // convex hull is not possible
    if (m < 3) return;

    // Create an empty stack and push first three points
    // to it.
    stack<Point> S;
    S.push(h_result[0]);
    S.push(h_result[1]);
    S.push(h_result[2]);

    // Process remaining n-3 points
    for(int i = 3; i < m; i++){
      // Keep removing top while the angle formed by
      // points next-to-top, top, and h_result[i] makes
      // a non-left turn
      while(h_orientation(nextToTop(S), S.top(), h_result[i]) != 2)
        S.pop();
      S.push(h_result[i]);
    }

    // Now stack has the output points, print contents of stack
    while(!S.empty()){
      Point p = S.top();
      cout << "(" << p.x << ", " << p.y <<")" << endl;
      S.pop();
    }

  }

  if(h_result != NULL) free(h_result);
  if(d_points != NULL) hipFree(d_points);

}

// Driver program to test above functions
int main() {
  uint n = 9;
  size_t size = n*sizeof(Point);
  Point *h_points = NULL;
  h_points = (Point *) malloc(size);

  if(h_points != NULL){
    h_points[0].x = 0; h_points[0].y = 3;
    h_points[1].x = 1; h_points[1].y = 1;
    h_points[2].x = 2; h_points[2].y = 2;
    h_points[3].x = 4; h_points[3].y = 4;
    h_points[4].x = 0; h_points[4].y = 0;
    h_points[5].x = 1; h_points[5].y = 2;
    h_points[6].x = 3; h_points[6].y = 1;
    h_points[7].x = 3; h_points[7].y = 3;
    h_points[8].x = 2; h_points[8].y = 1;
    convexHull(h_points, n);
  }

  if(h_points != NULL) free(h_points);
  return 0;
}

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

                                        # End of file scope inline assembly
	.globl	_Z19__device_stub__sortP5Pointjj # -- Begin function _Z19__device_stub__sortP5Pointjj
	.type	_Z19__device_stub__sortP5Pointjj,@function
_Z19__device_stub__sortP5Pointjj:       # @_Z19__device_stub__sortP5Pointjj
	.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	$96, %rsp
	.cfi_def_cfa_offset 144
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	4(%rsp), %rcx
	movl	%esi, (%rcx)
	movq	%rsp, %rsi
	movl	%edx, (%rsi)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%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	$_Z4sortP5Pointjj, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$112, %rsp
	.cfi_adjust_cfa_offset -112
	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_end0:
	.size	_Z19__device_stub__sortP5Pointjj, .Lfunc_end0-_Z19__device_stub__sortP5Pointjj
	.cfi_endproc
                                        # -- End function
	.globl	_Z14checkCudaStateR10hipError_tPKc # -- Begin function _Z14checkCudaStateR10hipError_tPKc
	.type	_Z14checkCudaStateR10hipError_tPKc,@function
_Z14checkCudaStateR10hipError_tPKc:     # @_Z14checkCudaStateR10hipError_tPKc
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	cmpl	$0, (%rdi)
	je	.LBB1_3
# %bb.1:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	je	.LBB1_4
# %bb.2:
	movq	%rbx, %rdi
	callq	strlen
	movl	$_ZSt4cout, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l # TAILCALL
.LBB1_3:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB1_4:
	.cfi_def_cfa_offset 16
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cout(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate # TAILCALL
.Lfunc_end1:
	.size	_Z14checkCudaStateR10hipError_tPKc, .Lfunc_end1-_Z14checkCudaStateR10hipError_tPKc
	.cfi_endproc
                                        # -- End function
	.globl	_Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE # -- Begin function _Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE
	.type	_Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE,@function
_Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE: # @_Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE
	.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
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	movq	48(%rdi), %rax
	cmpq	56(%rdi), %rax
	jne	.LBB2_2
# %bb.1:
	movq	72(%rbx), %rcx
	movl	$512, %eax                      # imm = 0x200
	addq	-8(%rcx), %rax
.LBB2_2:                                # %_ZNSt5stackI5PointSt5dequeIS0_SaIS0_EEE3topEv.exit
	movq	-8(%rax), %r15
	movq	%r15, 8(%rsp)
	movq	%rbx, %rdi
	callq	_ZNSt5dequeI5PointSaIS0_EE8pop_backEv
	movq	48(%rbx), %rax
	movq	%rax, %rcx
	cmpq	56(%rbx), %rax
	jne	.LBB2_4
# %bb.3:
	movq	72(%rbx), %rdx
	movl	$512, %ecx                      # imm = 0x200
	addq	-8(%rdx), %rcx
.LBB2_4:                                # %_ZNSt5stackI5PointSt5dequeIS0_SaIS0_EEE3topEv.exit4
	movq	-8(%rcx), %r14
	movq	64(%rbx), %rcx
	addq	$-8, %rcx
	cmpq	%rcx, %rax
	je	.LBB2_6
# %bb.5:
	movq	%r15, (%rax)
	addq	$8, 48(%rbx)
	jmp	.LBB2_7
.LBB2_6:
	leaq	8(%rsp), %rsi
	movq	%rbx, %rdi
	callq	_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_
.LBB2_7:                                # %_ZNSt5stackI5PointSt5dequeIS0_SaIS0_EEE4pushERKS0_.exit
	movq	%r14, %rax
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE, .Lfunc_end2-_Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE
	.cfi_endproc
                                        # -- End function
	.globl	_Z4swapR5PointS0_               # -- Begin function _Z4swapR5PointS0_
	.type	_Z4swapR5PointS0_,@function
_Z4swapR5PointS0_:                      # @_Z4swapR5PointS0_
	.cfi_startproc
# %bb.0:
	movq	(%rdi), %rax
	movq	(%rsi), %rcx
	movq	%rcx, (%rdi)
	movq	%rax, (%rsi)
	retq
.Lfunc_end3:
	.size	_Z4swapR5PointS0_, .Lfunc_end3-_Z4swapR5PointS0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z13h_orientation5PointS_S_     # -- Begin function _Z13h_orientation5PointS_S_
	.type	_Z13h_orientation5PointS_S_,@function
_Z13h_orientation5PointS_S_:            # @_Z13h_orientation5PointS_S_
	.cfi_startproc
# %bb.0:
	movq	%rsi, %rcx
	movq	%rdx, %rax
	subl	%esi, %edx
	subl	%edi, %esi
	shrq	$32, %rdi
	shrq	$32, %rcx
	shrq	$32, %rax
	movl	%ecx, %r8d
	subl	%edi, %r8d
	imull	%r8d, %edx
	subl	%eax, %ecx
	imull	%esi, %ecx
	leal	(%rcx,%rdx), %eax
	xorl	%esi, %esi
	testl	%eax, %eax
	setle	%sil
	incl	%esi
	xorl	%eax, %eax
	addl	%edx, %ecx
	cmovnel	%esi, %eax
	retq
.Lfunc_end4:
	.size	_Z13h_orientation5PointS_S_, .Lfunc_end4-_Z13h_orientation5PointS_S_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z10convexHullP5Pointi
.LCPI5_0:
	.quad	0x3f50000000000000              # double 9.765625E-4
.LCPI5_1:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z10convexHullP5Pointi
	.type	_Z10convexHullP5Pointi,@function
_Z10convexHullP5Pointi:                 # @_Z10convexHullP5Pointi
.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	$136, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%esi, %r12d
	movq	%rdi, %r14
	movslq	%esi, %r15
	shlq	$3, %r15
	leaq	8(%rsp), %r13
	movq	$0, (%r13)
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, %rbx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	hipMalloc
	leaq	4(%rsp), %rdi
	movl	%eax, (%rdi)
	movl	$.L.str, %esi
	callq	_Z14checkCudaStateR10hipError_tPKc
	cmpq	$0, (%r13)
	je	.LBB5_66
# %bb.1:
	xorl	%eax, %eax
	cmpl	$2, %r12d
	jl	.LBB5_8
# %bb.2:                                # %.lr.ph.preheader
	movl	4(%r14), %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	movl	$1, %esi
.LBB5_3:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	4(%r14,%rsi,8), %edi
	cmpl	%edx, %edi
	jge	.LBB5_4
.LBB5_6:                                #   in Loop: Header=BB5_3 Depth=1
	movl	%esi, %eax
	movl	%edi, %edx
	jmp	.LBB5_7
.LBB5_4:                                #   in Loop: Header=BB5_3 Depth=1
	jne	.LBB5_7
# %bb.5:                                #   in Loop: Header=BB5_3 Depth=1
	movl	(%r14,%rsi,8), %r8d
	movslq	%eax, %r9
	cmpl	(%r14,%r9,8), %r8d
	jl	.LBB5_6
.LBB5_7:                                #   in Loop: Header=BB5_3 Depth=1
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	.LBB5_3
.LBB5_8:                                # %._crit_edge
	cltq
	movq	(%r14), %rcx
	movq	(%r14,%rax,8), %rdx
	movq	%rdx, (%r14)
	movq	%rcx, (%r14,%rax,8)
	movl	$d_p0, %edi
	movl	$8, %edx
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	hipMemcpyToSymbol
	leaq	4(%rsp), %r13
	movl	%eax, (%r13)
	movl	$.L.str.1, %esi
	movq	%r13, %rdi
	callq	_Z14checkCudaStateR10hipError_tPKc
	movq	8(%rsp), %rdi
	movq	%r14, 120(%rsp)                 # 8-byte Spill
	movq	%r14, %rsi
	movq	%r15, 112(%rsp)                 # 8-byte Spill
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movl	%eax, (%r13)
	movl	$.L.str.1, %esi
	movq	%r13, %rdi
	callq	_Z14checkCudaStateR10hipError_tPKc
	cvtsi2sd	%r12d, %xmm1
	movsd	.LCPI5_0(%rip), %xmm0           # xmm0 = mem[0],zero
	movsd	%xmm1, 128(%rsp)                # 8-byte Spill
	mulsd	%xmm1, %xmm0
	callq	ceil@PLT
	movsd	%xmm0, 104(%rsp)                # 8-byte Spill
	movsd	.LCPI5_1(%rip), %xmm0           # xmm0 = mem[0],zero
	movsd	%xmm0, 96(%rsp)                 # 8-byte Spill
	callq	exp2@PLT
	cmpl	$2, %r12d
	jl	.LBB5_13
# %bb.9:                                # %.lr.ph150.preheader
	cvttsd2si	104(%rsp), %r13d        # 8-byte Folded Reload
	movabsq	$4294967296, %rbp               # imm = 0x100000000
	btsq	$32, %r13
	movl	$2, %r14d
	addq	$1024, %rbp                     # imm = 0x400
.LBB5_10:                               # %.lr.ph150
                                        # =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	$1, %esi
	movq	%rbp, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB5_12
# %bb.11:                               #   in Loop: Header=BB5_10 Depth=1
	movq	%r12, %r15
	movq	8(%rsp), %r12
	movsd	96(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	exp2@PLT
	cvttsd2si	%xmm0, %rsi
	movq	%r12, %rdi
	movq	%r15, %r12
                                        # kill: def $esi killed $esi killed $rsi
	movl	%r12d, %edx
	callq	_Z19__device_stub__sortP5Pointjj
.LBB5_12:                               #   in Loop: Header=BB5_10 Depth=1
	callq	hipDeviceSynchronize
	movl	%r14d, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	movsd	%xmm0, 96(%rsp)                 # 8-byte Spill
	callq	exp2@PLT
	incl	%r14d
	movsd	128(%rsp), %xmm1                # 8-byte Reload
                                        # xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jae	.LBB5_10
.LBB5_13:                               # %._crit_edge151
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	movq	112(%rsp), %rdx                 # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
	leaq	4(%rsp), %rdi
	movl	%eax, (%rdi)
	movl	$.L.str.2, %esi
	callq	_Z14checkCudaStateR10hipError_tPKc
	movq	120(%rsp), %rax                 # 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	cmpl	$2, %r12d
	jl	.LBB5_70
# %bb.14:                               # %.preheader142.lr.ph
	leal	-1(%r12), %ecx
	movq	%rax, %rdx
	shrq	$32, %rdx
	movl	$1, %esi
	movl	$1, %r15d
.LBB5_15:                               # %.preheader142
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_16 Depth 2
	movslq	%esi, %r8
	cmpl	%ecx, %r8d
	movl	%ecx, %esi
	cmovgl	%r8d, %esi
	leal	-1(%r8), %edi
.LBB5_16:                               #   Parent Loop BB5_15 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpq	%rcx, %r8
	jge	.LBB5_17
# %bb.18:                               #   in Loop: Header=BB5_16 Depth=2
	movq	(%rbx,%r8,8), %r9
	movq	8(%rbx,%r8,8), %r10
	incq	%r8
	movq	%r9, %r11
	shrq	$32, %r11
	movl	%r9d, %ebp
	subl	%r10d, %ebp
	shrq	$32, %r10
	movl	%r11d, %r14d
	subl	%edx, %r14d
	imull	%r14d, %ebp
	subl	%eax, %r9d
	subl	%r10d, %r11d
	imull	%r9d, %r11d
	incl	%edi
	cmpl	%ebp, %r11d
	je	.LBB5_16
	jmp	.LBB5_19
.LBB5_17:                               #   in Loop: Header=BB5_15 Depth=1
	movl	%esi, %edi
.LBB5_19:                               # %.critedge
                                        #   in Loop: Header=BB5_15 Depth=1
	movslq	%edi, %rsi
	movq	(%rbx,%rsi,8), %rdi
	movq	%rdi, (%rbx,%r15,8)
	incq	%r15
	incl	%esi
	cmpl	%r12d, %esi
	jl	.LBB5_15
# %bb.20:                               # %._crit_edge154
	cmpl	$2, %r15d
	jbe	.LBB5_70
# %bb.21:
	xorpd	%xmm0, %xmm0
	leaq	16(%rsp), %r14
	movapd	%xmm0, 64(%r14)
	movapd	%xmm0, 48(%r14)
	movapd	%xmm0, 32(%r14)
	movapd	%xmm0, 16(%r14)
	movapd	%xmm0, (%r14)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ZNSt11_Deque_baseI5PointSaIS0_EE17_M_initialize_mapEm
	movq	48(%r14), %rax
	movq	64(%r14), %rcx
	addq	$-8, %rcx
	cmpq	%rcx, %rax
	je	.LBB5_23
# %bb.22:
	movq	(%rbx), %rcx
	movq	%rcx, (%rax)
	movq	64(%rsp), %rax
	addq	$8, %rax
	movq	%rax, 64(%rsp)
	jmp	.LBB5_25
.LBB5_23:
.Ltmp0:
	leaq	16(%rsp), %rdi
	movq	%rbx, %rsi
	callq	_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_
.Ltmp1:
# %bb.24:                               # %._ZNSt5stackI5PointSt5dequeIS0_SaIS0_EEE4pushERKS0_.exit_crit_edge
	movq	64(%rsp), %rax
.LBB5_25:                               # %_ZNSt5stackI5PointSt5dequeIS0_SaIS0_EEE4pushERKS0_.exit
	leaq	8(%rbx), %rsi
	movq	80(%rsp), %rcx
	addq	$-8, %rcx
	cmpq	%rcx, %rax
	je	.LBB5_27
# %bb.26:
	movq	(%rsi), %rcx
	movq	%rcx, (%rax)
	movq	64(%rsp), %rax
	addq	$8, %rax
	movq	%rax, 64(%rsp)
	jmp	.LBB5_29
.LBB5_27:
.Ltmp2:
	leaq	16(%rsp), %rdi
	callq	_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_
.Ltmp3:
# %bb.28:                               # %._ZNSt5stackI5PointSt5dequeIS0_SaIS0_EEE4pushERKS0_.exit104_crit_edge
	movq	64(%rsp), %rax
.LBB5_29:                               # %_ZNSt5stackI5PointSt5dequeIS0_SaIS0_EEE4pushERKS0_.exit104
	leaq	16(%rbx), %rsi
	movq	80(%rsp), %rcx
	addq	$-8, %rcx
	cmpq	%rcx, %rax
	je	.LBB5_31
# %bb.30:
	movq	(%rsi), %rcx
	movq	%rcx, (%rax)
	addq	$8, 64(%rsp)
	jmp	.LBB5_32
.LBB5_31:
.Ltmp4:
	leaq	16(%rsp), %rdi
	callq	_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_
.Ltmp5:
.LBB5_32:                               # %_ZNSt5stackI5PointSt5dequeIS0_SaIS0_EEE4pushERKS0_.exit107
	cmpl	$3, %r15d
	je	.LBB5_41
# %bb.33:                               # %.preheader141.lr.ph
	movl	%r15d, %r12d
	movl	$3, %r13d
	leaq	16(%rsp), %r14
	movl	$512, %ebp                      # imm = 0x200
.LBB5_34:                               # %.preheader141
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_35 Depth 2
	leaq	(%rbx,%r13,8), %r15
.LBB5_35:                               #   Parent Loop BB5_34 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
.Ltmp7:
	movq	%r14, %rdi
	callq	_Z9nextToTopRSt5stackI5PointSt5dequeIS0_SaIS0_EEE
.Ltmp8:
# %bb.36:                               #   in Loop: Header=BB5_35 Depth=2
	movq	64(%rsp), %rdi
	movq	72(%rsp), %rcx
	movq	%rdi, %rdx
	cmpq	%rcx, %rdi
	jne	.LBB5_38
# %bb.37:                               #   in Loop: Header=BB5_35 Depth=2
	movq	88(%rsp), %rdx
	movq	-8(%rdx), %rdx
	addq	%rbp, %rdx
.LBB5_38:                               # %_ZNSt5stackI5PointSt5dequeIS0_SaIS0_EEE3topEv.exit
                                        #   in Loop: Header=BB5_35 Depth=2
	movq	-8(%rdx), %rsi
	movq	(%r15), %rdx
	movq	%rax, %r8
	shrq	$32, %r8
	movq	%rsi, %r9
	shrq	$32, %r9
	movq	%rdx, %r10
	shrq	$32, %r10
	movl	%r9d, %r11d
	subl	%r8d, %r11d
	movl	%edx, %r8d
	subl	%esi, %r8d
	imull	%r11d, %r8d
	subl	%eax, %esi
	subl	%r10d, %r9d
	imull	%esi, %r9d
	addl	%r8d, %r9d
	js	.LBB5_59
# %bb.39:                               #   in Loop: Header=BB5_35 Depth=2
	cmpq	%rcx, %rdi
	je	.LBB5_55
# %bb.40:                               #   in Loop: Header=BB5_35 Depth=2
	addq	$-8, %rdi
	jmp	.LBB5_56
.LBB5_55:                               #   in Loop: Header=BB5_35 Depth=2
	callq	_ZdlPv
	movq	88(%rsp), %rax
	leaq	-8(%rax), %rcx
	movq	%rcx, 88(%rsp)
	movq	-8(%rax), %rdi
	movq	%rdi, 72(%rsp)
	leaq	512(%rdi), %rax
	movq	%rax, 80(%rsp)
	addq	$504, %rdi                      # imm = 0x1F8
.LBB5_56:                               # %_ZNSt5dequeI5PointSaIS0_EE8pop_backEv.exit
                                        #   in Loop: Header=BB5_35 Depth=2
	movq	%rdi, 64(%rsp)
	jmp	.LBB5_35
.LBB5_59:                               #   in Loop: Header=BB5_34 Depth=1
	movq	80(%rsp), %rax
	addq	$-8, %rax
	cmpq	%rax, %rdi
	je	.LBB5_61
# %bb.60:                               #   in Loop: Header=BB5_34 Depth=1
	movq	%rdx, (%rdi)
	addq	$8, 64(%rsp)
	jmp	.LBB5_62
.LBB5_61:                               #   in Loop: Header=BB5_34 Depth=1
.Ltmp10:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_
.Ltmp11:
.LBB5_62:                               # %_ZNSt5stackI5PointSt5dequeIS0_SaIS0_EEE4pushERKS0_.exit123
                                        #   in Loop: Header=BB5_34 Depth=1
	incq	%r13
	cmpq	%r12, %r13
	jne	.LBB5_34
.LBB5_41:                               # %.preheader
	movq	64(%rsp), %rdi
	cmpq	32(%rsp), %rdi
	je	.LBB5_65
# %bb.42:                               # %.lr.ph158
	movq	72(%rsp), %rax
	movl	$512, %r15d                     # imm = 0x200
.LBB5_43:                               # =>This Inner Loop Header: Depth=1
	cmpq	%rax, %rdi
	jne	.LBB5_45
# %bb.44:                               #   in Loop: Header=BB5_43 Depth=1
	movq	88(%rsp), %rax
	movq	-8(%rax), %rdi
	addq	%r15, %rdi
.LBB5_45:                               # %_ZNSt5stackI5PointSt5dequeIS0_SaIS0_EEE3topEv.exit124
                                        #   in Loop: Header=BB5_43 Depth=1
	movl	-8(%rdi), %r14d
	movl	-4(%rdi), %ebp
.Ltmp13:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.3, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp14:
# %bb.46:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
                                        #   in Loop: Header=BB5_43 Depth=1
.Ltmp15:
	movl	$_ZSt4cout, %edi
	movl	%r14d, %esi
	callq	_ZNSolsEi
.Ltmp16:
# %bb.47:                               #   in Loop: Header=BB5_43 Depth=1
.Ltmp17:
	movq	%rax, %r14
	movl	$.L.str.4, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp18:
# %bb.48:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit127
                                        #   in Loop: Header=BB5_43 Depth=1
.Ltmp19:
	movq	%r14, %rdi
	movl	%ebp, %esi
	callq	_ZNSolsEi
.Ltmp20:
# %bb.49:                               #   in Loop: Header=BB5_43 Depth=1
.Ltmp21:
	movq	%rax, %r14
	movl	$.L.str.5, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp22:
# %bb.50:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit129
                                        #   in Loop: Header=BB5_43 Depth=1
	movq	(%r14), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp23:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp24:
# %bb.51:                               # %.noexc131
                                        #   in Loop: Header=BB5_43 Depth=1
.Ltmp25:
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
.Ltmp26:
# %bb.52:                               # %.noexc132
                                        #   in Loop: Header=BB5_43 Depth=1
.Ltmp27:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp28:
# %bb.53:                               # %_ZNSolsEPFRSoS_E.exit
                                        #   in Loop: Header=BB5_43 Depth=1
	movq	64(%rsp), %rdi
	movq	72(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB5_63
# %bb.54:                               #   in Loop: Header=BB5_43 Depth=1
	addq	$-8, %rdi
	jmp	.LBB5_64
.LBB5_63:                               #   in Loop: Header=BB5_43 Depth=1
	callq	_ZdlPv
	movq	88(%rsp), %rax
	leaq	-8(%rax), %rcx
	movq	%rcx, 88(%rsp)
	movq	-8(%rax), %rax
	movq	%rax, 72(%rsp)
	leaq	512(%rax), %rcx
	movq	%rcx, 80(%rsp)
	leaq	504(%rax), %rdi
.LBB5_64:                               # %_ZNSt5dequeI5PointSaIS0_EE8pop_backEv.exit136
                                        #   in Loop: Header=BB5_43 Depth=1
	movq	%rdi, 64(%rsp)
	cmpq	32(%rsp), %rdi
	jne	.LBB5_43
.LBB5_65:                               # %._crit_edge159
	leaq	16(%rsp), %rdi
	callq	_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev
.LBB5_66:
	testq	%rbx, %rbx
	je	.LBB5_68
# %bb.67:
	movq	%rbx, %rdi
	callq	free
.LBB5_68:
	movq	8(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB5_70
# %bb.69:
	callq	hipFree
.LBB5_70:                               # %.critedge101
	addq	$136, %rsp
	.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
.LBB5_71:
	.cfi_def_cfa_offset 192
.Ltmp6:
	jmp	.LBB5_72
.LBB5_58:                               # %.loopexit.split-lp
.Ltmp12:
	jmp	.LBB5_72
.LBB5_73:
.Ltmp29:
	jmp	.LBB5_72
.LBB5_57:                               # %.loopexit
.Ltmp9:
.LBB5_72:
	movq	%rax, %rbx
	leaq	16(%rsp), %rdi
	callq	_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end5:
	.size	_Z10convexHullP5Pointi, .Lfunc_end5-_Z10convexHullP5Pointi
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table5:
.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 .Ltmp5-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp5
	.uleb128 .Ltmp6-.Lfunc_begin0           #     jumps to .Ltmp6
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp7-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp8-.Ltmp7                  #   Call between .Ltmp7 and .Ltmp8
	.uleb128 .Ltmp9-.Lfunc_begin0           #     jumps to .Ltmp9
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp10-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp11-.Ltmp10                #   Call between .Ltmp10 and .Ltmp11
	.uleb128 .Ltmp12-.Lfunc_begin0          #     jumps to .Ltmp12
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp13-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp28-.Ltmp13                #   Call between .Ltmp13 and .Ltmp28
	.uleb128 .Ltmp29-.Lfunc_begin0          #     jumps to .Ltmp29
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp28-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Lfunc_end5-.Ltmp28            #   Call between .Ltmp28 and .Lfunc_end5
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function main
.LCPI6_0:
	.long	0                               # 0x0
	.long	3                               # 0x3
	.long	1                               # 0x1
	.long	1                               # 0x1
.LCPI6_1:
	.long	2                               # 0x2
	.long	2                               # 0x2
	.long	4                               # 0x4
	.long	4                               # 0x4
.LCPI6_2:
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	1                               # 0x1
	.long	2                               # 0x2
.LCPI6_3:
	.long	3                               # 0x3
	.long	1                               # 0x1
	.long	3                               # 0x3
	.long	3                               # 0x3
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movl	$72, %edi
	callq	malloc
	testq	%rax, %rax
	je	.LBB6_2
# %bb.1:
	movq	%rax, %rbx
	movaps	.LCPI6_0(%rip), %xmm0           # xmm0 = [0,3,1,1]
	movups	%xmm0, (%rax)
	movaps	.LCPI6_1(%rip), %xmm0           # xmm0 = [2,2,4,4]
	movups	%xmm0, 16(%rax)
	movaps	.LCPI6_2(%rip), %xmm0           # xmm0 = [0,0,1,2]
	movups	%xmm0, 32(%rax)
	movaps	.LCPI6_3(%rip), %xmm0           # xmm0 = [3,1,3,3]
	movups	%xmm0, 48(%rax)
	movabsq	$4294967298, %rax               # imm = 0x100000002
	movq	%rax, 64(%rbx)
	movq	%rbx, %rdi
	movl	$9, %esi
	callq	_Z10convexHullP5Pointi
	movq	%rbx, %rdi
	callq	free
.LBB6_2:                                # %.critedge
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	main, .Lfunc_end6-main
	.cfi_endproc
                                        # -- End function
	.section	.text.__clang_call_terminate,"axG",@progbits,__clang_call_terminate,comdat
	.hidden	__clang_call_terminate          # -- Begin function __clang_call_terminate
	.weak	__clang_call_terminate
	.type	__clang_call_terminate,@function
__clang_call_terminate:                 # @__clang_call_terminate
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__cxa_begin_catch
	callq	_ZSt9terminatev
.Lfunc_end7:
	.size	__clang_call_terminate, .Lfunc_end7-__clang_call_terminate
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt11_Deque_baseI5PointSaIS0_EED2Ev,"axG",@progbits,_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev,comdat
	.weak	_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev # -- Begin function _ZNSt11_Deque_baseI5PointSaIS0_EED2Ev
	.p2align	1, 0x90
	.type	_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev,@function
_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev:  # @_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev
	.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	%rdi, %rbx
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	.LBB8_6
# %bb.1:
	movq	40(%rbx), %r14
	movq	72(%rbx), %r15
	leaq	8(%r15), %rax
	cmpq	%rax, %r14
	jae	.LBB8_5
# %bb.2:                                # %.lr.ph.i.preheader
	addq	$-8, %r14
.LBB8_3:                                # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rdi
	addq	$8, %r14
	callq	_ZdlPv
	cmpq	%r15, %r14
	jb	.LBB8_3
# %bb.4:                                # %_ZNSt11_Deque_baseI5PointSaIS0_EE16_M_destroy_nodesEPPS0_S4_.exit.loopexit
	movq	(%rbx), %rdi
.LBB8_5:                                # %_ZNSt11_Deque_baseI5PointSaIS0_EE16_M_destroy_nodesEPPS0_S4_.exit
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_ZdlPv                          # TAILCALL
.LBB8_6:
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end8:
	.size	_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev, .Lfunc_end8-_ZNSt11_Deque_baseI5PointSaIS0_EED2Ev
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt5dequeI5PointSaIS0_EE8pop_backEv,"axG",@progbits,_ZNSt5dequeI5PointSaIS0_EE8pop_backEv,comdat
	.weak	_ZNSt5dequeI5PointSaIS0_EE8pop_backEv # -- Begin function _ZNSt5dequeI5PointSaIS0_EE8pop_backEv
	.p2align	1, 0x90
	.type	_ZNSt5dequeI5PointSaIS0_EE8pop_backEv,@function
_ZNSt5dequeI5PointSaIS0_EE8pop_backEv:  # @_ZNSt5dequeI5PointSaIS0_EE8pop_backEv
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	movq	48(%rdi), %rdi
	cmpq	56(%rbx), %rdi
	je	.LBB9_2
# %bb.1:
	addq	$-8, %rdi
	jmp	.LBB9_3
.LBB9_2:
	callq	_ZdlPv
	movq	72(%rbx), %rax
	leaq	-8(%rax), %rcx
	movq	%rcx, 72(%rbx)
	movq	-8(%rax), %rdi
	movq	%rdi, 56(%rbx)
	leaq	512(%rdi), %rax
	movq	%rax, 64(%rbx)
	addq	$504, %rdi                      # imm = 0x1F8
.LBB9_3:
	movq	%rdi, 48(%rbx)
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end9:
	.size	_ZNSt5dequeI5PointSaIS0_EE8pop_backEv, .Lfunc_end9-_ZNSt5dequeI5PointSaIS0_EE8pop_backEv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_,"axG",@progbits,_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_,comdat
	.weak	_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_ # -- Begin function _ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_
	.p2align	1, 0x90
	.type	_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_,@function
_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_: # @_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_
	.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	72(%rdi), %r15
	movq	%r15, %rax
	subq	40(%rdi), %rax
	shrq	$3, %rax
	cmpq	$1, %r15
	adcq	$-1, %rax
	shlq	$6, %rax
	movq	32(%rdi), %rcx
	movq	48(%rdi), %rdx
	subq	56(%rdi), %rdx
	sarq	$3, %rdx
	subq	16(%rdi), %rcx
	sarq	$3, %rcx
	addq	%rdx, %rcx
	addq	%rax, %rcx
	movabsq	$1152921504606846975, %rax      # imm = 0xFFFFFFFFFFFFFFF
	cmpq	%rax, %rcx
	je	.LBB10_4
# %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%r15, %rax
	subq	(%rdi), %rax
	movq	8(%rdi), %rcx
	sarq	$3, %rax
	subq	%rax, %rcx
	cmpq	$1, %rcx
	ja	.LBB10_3
# %bb.2:
	movl	$1, %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_ZNSt5dequeI5PointSaIS0_EE17_M_reallocate_mapEmb
	movq	72(%rbx), %r15
.LBB10_3:                               # %_ZNSt5dequeI5PointSaIS0_EE22_M_reserve_map_at_backEm.exit
	movl	$512, %edi                      # imm = 0x200
	callq	_Znwm
	movq	%rax, 8(%r15)
	movq	48(%rbx), %rax
	movq	(%r14), %rcx
	movq	%rcx, (%rax)
	movq	72(%rbx), %rax
	leaq	8(%rax), %rcx
	movq	%rcx, 72(%rbx)
	movq	8(%rax), %rax
	movq	%rax, 56(%rbx)
	leaq	512(%rax), %rcx
	movq	%rcx, 64(%rbx)
	movq	%rax, 48(%rbx)
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB10_4:
	.cfi_def_cfa_offset 32
	movl	$.L.str.6, %edi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end10:
	.size	_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_, .Lfunc_end10-_ZNSt5dequeI5PointSaIS0_EE16_M_push_back_auxIJRKS0_EEEvDpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt5dequeI5PointSaIS0_EE17_M_reallocate_mapEmb,"axG",@progbits,_ZNSt5dequeI5PointSaIS0_EE17_M_reallocate_mapEmb,comdat
	.weak	_ZNSt5dequeI5PointSaIS0_EE17_M_reallocate_mapEmb # -- Begin function _ZNSt5dequeI5PointSaIS0_EE17_M_reallocate_mapEmb
	.p2align	1, 0x90
	.type	_ZNSt5dequeI5PointSaIS0_EE17_M_reallocate_mapEmb,@function
_ZNSt5dequeI5PointSaIS0_EE17_M_reallocate_mapEmb: # @_ZNSt5dequeI5PointSaIS0_EE17_M_reallocate_mapEmb
	.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
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edx, %r8d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	72(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	40(%rdi), %rsi
	subq	%rsi, %rax
	movq	%rax, %r13
	sarq	$3, %r13
	leaq	(%r14,%r13), %r12
	incq	%r12
	incq	%r13
	leaq	(%r12,%r12), %rdx
	cmpq	%rdx, %rcx
	jbe	.LBB11_4
# %bb.1:
	subq	%r12, %rcx
	andq	$-2, %rcx
	shlq	$2, %rcx
	addq	(%rbx), %rcx
	xorl	%edx, %edx
	testb	%r8b, %r8b
	cmovneq	%r14, %rdx
	leaq	(%rcx,%rdx,8), %r14
	leaq	8(%rax), %rdx
	cmpq	%rsi, %r14
	jae	.LBB11_7
# %bb.2:
	cmpq	$9, %rdx
	jl	.LBB11_13
# %bb.3:
	movq	%r14, %rdi
	jmp	.LBB11_9
.LBB11_4:
	cmpq	%r14, %rcx
	movq	%r14, %rax
	cmovaq	%rcx, %rax
	leaq	(%rcx,%rax), %rbp
	addq	$2, %rbp
	xorl	%r15d, %r15d
	leaq	11(%rsp), %rdi
	movq	%rbp, %rsi
	xorl	%edx, %edx
	movl	%r8d, 12(%rsp)                  # 4-byte Spill
	callq	_ZNSt15__new_allocatorIP5PointE8allocateEmPKv
	movq	%rbp, 16(%rsp)                  # 8-byte Spill
	subq	%r12, %rbp
	movq	%rax, %r12
	andq	$-2, %rbp
	leaq	(%rax,%rbp,4), %rax
	cmpb	$0, 12(%rsp)                    # 1-byte Folded Reload
	cmovneq	%r14, %r15
	leaq	(%rax,%r15,8), %r14
	movq	40(%rbx), %rsi
	movq	72(%rbx), %rdx
	subq	%rsi, %rdx
	addq	$8, %rdx
	cmpq	$9, %rdx
	jl	.LBB11_11
# %bb.5:
	movq	%r14, %rdi
	callq	memmove@PLT
.LBB11_6:                               # %_ZSt4copyIPP5PointS2_ET0_T_S4_S3_.exit24
	movq	(%rbx), %rdi
	callq	_ZdlPv
	movq	%r12, (%rbx)
	movq	16(%rsp), %rax                  # 8-byte Reload
	movq	%rax, 8(%rbx)
	jmp	.LBB11_10
.LBB11_7:
	movq	%rdx, %rcx
	sarq	$3, %rcx
	cmpq	$2, %rcx
	jl	.LBB11_15
# %bb.8:
	leaq	(%r14,%r13,8), %rdi
	shlq	$3, %rcx
	subq	%rcx, %rdi
.LBB11_9:                               # %_ZSt4copyIPP5PointS2_ET0_T_S4_S3_.exit
	callq	memmove@PLT
.LBB11_10:                              # %_ZSt4copyIPP5PointS2_ET0_T_S4_S3_.exit
	movq	%r14, 40(%rbx)
	movq	(%r14), %rax
	movq	%rax, 24(%rbx)
	movl	$512, %ecx                      # imm = 0x200
	addq	%rcx, %rax
	movq	%rax, 32(%rbx)
	leaq	(%r14,%r13,8), %rax
	addq	$-8, %rax
	movq	%rax, 72(%rbx)
	movq	(%rax), %rax
	movq	%rax, 56(%rbx)
	addq	%rcx, %rax
	movq	%rax, 64(%rbx)
	addq	$24, %rsp
	.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
.LBB11_11:
	.cfi_def_cfa_offset 80
	cmpq	$8, %rdx
	jne	.LBB11_6
# %bb.12:
	movq	(%rsi), %rax
	movq	%rax, (%r14)
	jmp	.LBB11_6
.LBB11_13:
	cmpq	$8, %rdx
	jne	.LBB11_10
# %bb.14:
	movq	(%rsi), %rax
	movq	%rax, (%r14)
	jmp	.LBB11_10
.LBB11_15:
	cmpq	$8, %rdx
	jne	.LBB11_10
# %bb.16:
	movq	(%rsi), %rcx
	movq	%rcx, (%r14,%rax)
	jmp	.LBB11_10
.Lfunc_end11:
	.size	_ZNSt5dequeI5PointSaIS0_EE17_M_reallocate_mapEmb, .Lfunc_end11-_ZNSt5dequeI5PointSaIS0_EE17_M_reallocate_mapEmb
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorIP5PointE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorIP5PointE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorIP5PointE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorIP5PointE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorIP5PointE8allocateEmPKv,@function
_ZNSt15__new_allocatorIP5PointE8allocateEmPKv: # @_ZNSt15__new_allocatorIP5PointE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB12_1
# %bb.3:
	shlq	$3, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB12_1:
	.cfi_def_cfa_offset 16
	shrq	$61, %rsi
	je	.LBB12_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB12_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end12:
	.size	_ZNSt15__new_allocatorIP5PointE8allocateEmPKv, .Lfunc_end12-_ZNSt15__new_allocatorIP5PointE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt11_Deque_baseI5PointSaIS0_EE17_M_initialize_mapEm,"axG",@progbits,_ZNSt11_Deque_baseI5PointSaIS0_EE17_M_initialize_mapEm,comdat
	.weak	_ZNSt11_Deque_baseI5PointSaIS0_EE17_M_initialize_mapEm # -- Begin function _ZNSt11_Deque_baseI5PointSaIS0_EE17_M_initialize_mapEm
	.p2align	1, 0x90
	.type	_ZNSt11_Deque_baseI5PointSaIS0_EE17_M_initialize_mapEm,@function
_ZNSt11_Deque_baseI5PointSaIS0_EE17_M_initialize_mapEm: # @_ZNSt11_Deque_baseI5PointSaIS0_EE17_M_initialize_mapEm
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rsi, %r12
	shrq	$6, %r12
	leaq	1(%r12), %r15
	cmpq	$6, %r12
	movl	$5, %esi
	cmovaeq	%r12, %rsi
	addq	$3, %rsi
	movq	%rsi, 8(%rdi)
	leaq	7(%rsp), %rdi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIP5PointE8allocateEmPKv
	movq	%rax, (%rbx)
	movq	8(%rbx), %rcx
	subq	%r15, %rcx
	andq	$-2, %rcx
	leaq	(%rax,%rcx,4), %r15
	leaq	(%r15,%r12,8), %rdx
	addq	$8, %rdx
.Ltmp30:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ZNSt11_Deque_baseI5PointSaIS0_EE15_M_create_nodesEPPS0_S4_
.Ltmp31:
# %bb.1:
	movq	%r15, 40(%rbx)
	movq	(%r15), %rax
	movq	%rax, 24(%rbx)
	movl	$512, %ecx                      # imm = 0x200
	leaq	(%rax,%rcx), %rdx
	movq	%rdx, 32(%rbx)
	leaq	(%r15,%r12,8), %rdx
	movq	%rdx, 72(%rbx)
	movq	(%rdx), %rdx
	movq	%rdx, 56(%rbx)
	addq	%rdx, %rcx
	movq	%rcx, 64(%rbx)
	movq	%rax, 16(%rbx)
	andl	$63, %r14d
	leaq	(%rdx,%r14,8), %rax
	movq	%rax, 48(%rbx)
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB13_5:
	.cfi_def_cfa_offset 48
.Ltmp32:
	movq	%rax, %rdi
	callq	__cxa_begin_catch
	movq	(%rbx), %rdi
	callq	_ZdlPv
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
.Ltmp33:
	callq	__cxa_rethrow
.Ltmp34:
# %bb.6:
.LBB13_2:
.Ltmp35:
	movq	%rax, %rbx
.Ltmp36:
	callq	__cxa_end_catch
.Ltmp37:
# %bb.3:
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.LBB13_4:
.Ltmp38:
	movq	%rax, %rdi
	callq	__clang_call_terminate
.Lfunc_end13:
	.size	_ZNSt11_Deque_baseI5PointSaIS0_EE17_M_initialize_mapEm, .Lfunc_end13-_ZNSt11_Deque_baseI5PointSaIS0_EE17_M_initialize_mapEm
	.cfi_endproc
	.section	.gcc_except_table._ZNSt11_Deque_baseI5PointSaIS0_EE17_M_initialize_mapEm,"aG",@progbits,_ZNSt11_Deque_baseI5PointSaIS0_EE17_M_initialize_mapEm,comdat
	.p2align	2, 0x0
GCC_except_table13:
.Lexception1:
	.byte	255                             # @LPStart Encoding = omit
	.byte	3                               # @TType Encoding = udata4
	.uleb128 .Lttbase0-.Lttbaseref0
.Lttbaseref0:
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end1-.Lcst_begin1
.Lcst_begin1:
	.uleb128 .Lfunc_begin1-.Lfunc_begin1    # >> Call Site 1 <<
	.uleb128 .Ltmp30-.Lfunc_begin1          #   Call between .Lfunc_begin1 and .Ltmp30
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp30-.Lfunc_begin1          # >> Call Site 2 <<
	.uleb128 .Ltmp31-.Ltmp30                #   Call between .Ltmp30 and .Ltmp31
	.uleb128 .Ltmp32-.Lfunc_begin1          #     jumps to .Ltmp32
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp31-.Lfunc_begin1          # >> Call Site 3 <<
	.uleb128 .Ltmp33-.Ltmp31                #   Call between .Ltmp31 and .Ltmp33
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp33-.Lfunc_begin1          # >> Call Site 4 <<
	.uleb128 .Ltmp34-.Ltmp33                #   Call between .Ltmp33 and .Ltmp34
	.uleb128 .Ltmp35-.Lfunc_begin1          #     jumps to .Ltmp35
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp36-.Lfunc_begin1          # >> Call Site 5 <<
	.uleb128 .Ltmp37-.Ltmp36                #   Call between .Ltmp36 and .Ltmp37
	.uleb128 .Ltmp38-.Lfunc_begin1          #     jumps to .Ltmp38
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp37-.Lfunc_begin1          # >> Call Site 6 <<
	.uleb128 .Lfunc_end13-.Ltmp37           #   Call between .Ltmp37 and .Lfunc_end13
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.byte	1                               # >> Action Record 1 <<
                                        #   Catch TypeInfo 1
	.byte	0                               #   No further actions
	.p2align	2, 0x0
                                        # >> Catch TypeInfos <<
	.long	0                               # TypeInfo 1
.Lttbase0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt11_Deque_baseI5PointSaIS0_EE15_M_create_nodesEPPS0_S4_,"axG",@progbits,_ZNSt11_Deque_baseI5PointSaIS0_EE15_M_create_nodesEPPS0_S4_,comdat
	.weak	_ZNSt11_Deque_baseI5PointSaIS0_EE15_M_create_nodesEPPS0_S4_ # -- Begin function _ZNSt11_Deque_baseI5PointSaIS0_EE15_M_create_nodesEPPS0_S4_
	.p2align	1, 0x90
	.type	_ZNSt11_Deque_baseI5PointSaIS0_EE15_M_create_nodesEPPS0_S4_,@function
_ZNSt11_Deque_baseI5PointSaIS0_EE15_M_create_nodesEPPS0_S4_: # @_ZNSt11_Deque_baseI5PointSaIS0_EE15_M_create_nodesEPPS0_S4_
.Lfunc_begin2:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception2
# %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
	cmpq	%rdx, %rsi
	jae	.LBB14_4
# %bb.1:                                # %.lr.ph.preheader
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rsi, %r15
.LBB14_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
.Ltmp39:
	movl	$512, %edi                      # imm = 0x200
	callq	_Znwm
.Ltmp40:
# %bb.3:                                # %_ZNSt11_Deque_baseI5PointSaIS0_EE16_M_allocate_nodeEv.exit
                                        #   in Loop: Header=BB14_2 Depth=1
	movq	%rax, (%r15)
	addq	$8, %r15
	cmpq	%r14, %r15
	jb	.LBB14_2
.LBB14_4:                               # %._crit_edge
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB14_5:
	.cfi_def_cfa_offset 32
.Ltmp41:
	movq	%rax, %rdi
	callq	__cxa_begin_catch
	cmpq	%rbx, %r15
	jbe	.LBB14_7
.LBB14_6:                               # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	callq	_ZdlPv
	addq	$8, %rbx
	cmpq	%r15, %rbx
	jb	.LBB14_6
.LBB14_7:                               # %_ZNSt11_Deque_baseI5PointSaIS0_EE16_M_destroy_nodesEPPS0_S4_.exit
.Ltmp42:
	callq	__cxa_rethrow
.Ltmp43:
# %bb.11:
.LBB14_8:
.Ltmp44:
	movq	%rax, %rbx
.Ltmp45:
	callq	__cxa_end_catch
.Ltmp46:
# %bb.9:
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.LBB14_10:
.Ltmp47:
	movq	%rax, %rdi
	callq	__clang_call_terminate
.Lfunc_end14:
	.size	_ZNSt11_Deque_baseI5PointSaIS0_EE15_M_create_nodesEPPS0_S4_, .Lfunc_end14-_ZNSt11_Deque_baseI5PointSaIS0_EE15_M_create_nodesEPPS0_S4_
	.cfi_endproc
	.section	.gcc_except_table._ZNSt11_Deque_baseI5PointSaIS0_EE15_M_create_nodesEPPS0_S4_,"aG",@progbits,_ZNSt11_Deque_baseI5PointSaIS0_EE15_M_create_nodesEPPS0_S4_,comdat
	.p2align	2, 0x0
GCC_except_table14:
.Lexception2:
	.byte	255                             # @LPStart Encoding = omit
	.byte	3                               # @TType Encoding = udata4
	.uleb128 .Lttbase1-.Lttbaseref1
.Lttbaseref1:
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end2-.Lcst_begin2
.Lcst_begin2:
	.uleb128 .Ltmp39-.Lfunc_begin2          # >> Call Site 1 <<
	.uleb128 .Ltmp40-.Ltmp39                #   Call between .Ltmp39 and .Ltmp40
	.uleb128 .Ltmp41-.Lfunc_begin2          #     jumps to .Ltmp41
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp40-.Lfunc_begin2          # >> Call Site 2 <<
	.uleb128 .Ltmp42-.Ltmp40                #   Call between .Ltmp40 and .Ltmp42
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp42-.Lfunc_begin2          # >> Call Site 3 <<
	.uleb128 .Ltmp43-.Ltmp42                #   Call between .Ltmp42 and .Ltmp43
	.uleb128 .Ltmp44-.Lfunc_begin2          #     jumps to .Ltmp44
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp45-.Lfunc_begin2          # >> Call Site 4 <<
	.uleb128 .Ltmp46-.Ltmp45                #   Call between .Ltmp45 and .Ltmp46
	.uleb128 .Ltmp47-.Lfunc_begin2          #     jumps to .Ltmp47
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp46-.Lfunc_begin2          # >> Call Site 5 <<
	.uleb128 .Lfunc_end14-.Ltmp46           #   Call between .Ltmp46 and .Lfunc_end14
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end2:
	.byte	1                               # >> Action Record 1 <<
                                        #   Catch TypeInfo 1
	.byte	0                               #   No further actions
	.p2align	2, 0x0
                                        # >> Catch TypeInfos <<
	.long	0                               # TypeInfo 1
.Lttbase1:
	.p2align	2, 0x0
                                        # -- 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	.LBB15_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB15_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z4sortP5Pointjj, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$0, 8(%rsp)
	movl	$1, (%rsp)
	movl	$d_p0, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	callq	__hipRegisterVar
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end15:
	.size	__hip_module_ctor, .Lfunc_end15-__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	.LBB16_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
.LBB16_2:
	retq
.Lfunc_end16:
	.size	__hip_module_dtor, .Lfunc_end16-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	d_p0,@object                    # @d_p0
	.local	d_p0
	.comm	d_p0,8,4
	.type	_Z4sortP5Pointjj,@object        # @_Z4sortP5Pointjj
	.section	.rodata,"a",@progbits
	.globl	_Z4sortP5Pointjj
	.p2align	3, 0x0
_Z4sortP5Pointjj:
	.quad	_Z19__device_stub__sortP5Pointjj
	.size	_Z4sortP5Pointjj, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Impossible allocate data for d_points\n"
	.size	.L.str, 39

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"Impossible copy data from host to device\n"
	.size	.L.str.1, 42

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Impossible copy data from device to host\n"
	.size	.L.str.2, 42

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"("
	.size	.L.str.3, 2

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	", "
	.size	.L.str.4, 3

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	")"
	.size	.L.str.5, 2

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"cannot create std::deque larger than max_size()"
	.size	.L.str.6, 48

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z4sortP5Pointjj"
	.size	.L__unnamed_1, 17

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"d_p0"
	.size	.L__unnamed_2, 5

	.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 _Z19__device_stub__sortP5Pointjj
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym d_p0
	.addrsig_sym _Z4sortP5Pointjj
	.addrsig_sym _ZSt4cout
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z4sortP5Pointjj        ; -- Begin function _Z4sortP5Pointjj
	.globl	_Z4sortP5Pointjj
	.p2align	8
	.type	_Z4sortP5Pointjj,@function
_Z4sortP5Pointjj:                       ; @_Z4sortP5Pointjj
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x1c
	s_load_b64 s[4:5], s[0:1], 0x8
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[4:5], null, s15, s2, v[0:1]
	v_cmp_gt_u32_e32 vcc_lo, s5, v4
	v_cmp_ne_u32_e64 s2, 0, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s2, vcc_lo, s2
	s_and_saveexec_b32 s3, s2
	s_cbranch_execz .LBB0_39
; %bb.1:
	v_cvt_f32_u32_e32 v0, s4
	s_sub_i32 s2, 0, s4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_iflag_f32_e32 v0, v0
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v0, 0x4f7ffffe, v0
	v_cvt_u32_f32_e32 v0, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v1, s2, v0
	v_mul_hi_u32 v1, v0, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v0, v0, v1
	v_mul_hi_u32 v0, v4, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v0, v0, s4
	v_sub_nc_u32_e32 v0, v4, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_subrev_nc_u32_e32 v1, s4, v0
	v_cmp_le_u32_e32 vcc_lo, s4, v0
	v_cndmask_b32_e32 v0, v0, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_subrev_nc_u32_e32 v1, s4, v0
	v_cmp_le_u32_e32 vcc_lo, s4, v0
	v_cndmask_b32_e32 v0, v0, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_eq_u32_e32 vcc_lo, 0, v0
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB0_39
; %bb.2:
	v_subrev_nc_u32_e32 v0, s4, v4
	s_lshr_b32 s2, s4, 1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v5, 1, v0
	v_add_nc_u32_e32 v14, s2, v0
	v_add_nc_u32_e32 v7, s2, v5
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cmp_gt_u32_e64 s6, v5, v14
	v_cmp_gt_u32_e64 s7, v7, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s2, s6, s7
	s_xor_b32 s2, s2, -1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_b32 exec_lo, exec_lo, s2
	s_cbranch_execz .LBB0_39
; %bb.3:                                ; %.lr.ph
	s_getpc_b64 s[2:3]
	s_add_u32 s2, s2, d_p0@rel32@lo+4
	s_addc_u32 s3, s3, d_p0@rel32@hi+12
	v_dual_mov_b32 v6, 0 :: v_dual_add_nc_u32 v15, 1, v14
	s_load_b64 s[0:1], s[0:1], 0x0
	s_load_b64 s[2:3], s[2:3], 0x0
	s_mov_b32 s4, 0
.LBB0_4:                                ; =>This Inner Loop Header: Depth=1
	s_or_b32 s5, s6, s7
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_xor_b32 s5, s5, -1
	s_and_saveexec_b32 s8, s5
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s5, exec_lo, s8
	s_cbranch_execz .LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	v_mov_b32_e32 v8, v6
	v_lshlrev_b64 v[0:1], 3, v[5:6]
	s_mov_b32 s8, exec_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[2:3], 3, v[7:8]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v0, vcc_lo, s0, v0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v1, vcc_lo
	v_add_co_u32 v2, vcc_lo, s0, v2
	s_delay_alu instid0(VALU_DEP_4)
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v3, vcc_lo
	s_clause 0x1
	global_load_b64 v[8:9], v[0:1], off
	global_load_b64 v[10:11], v[2:3], off
	s_waitcnt vmcnt(1)
	v_subrev_nc_u32_e32 v12, s2, v8
	s_waitcnt vmcnt(0)
	v_sub_nc_u32_e32 v13, v9, v11
	v_subrev_nc_u32_e32 v17, s3, v9
	v_sub_nc_u32_e32 v18, v10, v8
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v16, v12, v13
	v_mad_u64_u32 v[12:13], null, v17, v18, v[16:17]
                                        ; implicit-def: $vgpr13
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_ne_u32_e32 0, v12
	s_xor_b32 s8, exec_lo, s8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	v_cmp_gt_i32_e32 vcc_lo, 1, v12
                                        ; implicit-def: $vgpr10_vgpr11
                                        ; implicit-def: $vgpr8_vgpr9
	v_cndmask_b32_e64 v13, 1, -1, vcc_lo
; %bb.7:                                ; %Flow147
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_and_not1_saveexec_b32 s8, s8
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	v_sub_nc_u32_e32 v10, s2, v10
	v_sub_nc_u32_e32 v12, s2, v8
	v_sub_nc_u32_e32 v13, s3, v11
	v_sub_nc_u32_e32 v16, s3, v9
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_mul_lo_u32 v8, v10, v10
	v_mul_lo_u32 v10, v12, v12
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[11:12], null, v13, v13, v[8:9]
	v_mad_u64_u32 v[8:9], null, v16, v16, v[10:11]
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_lt_u32_e32 vcc_lo, v11, v8
	v_cndmask_b32_e64 v13, -1, 1, vcc_lo
; %bb.9:                                ; %_Z7compare5PointS_.exit
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_or_b32 exec_lo, exec_lo, s8
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	s_mov_b32 s8, exec_lo
	v_cmpx_ne_u32_e32 1, v13
	s_xor_b32 s8, exec_lo, s8
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	v_add_nc_u32_e32 v5, 1, v5
                                        ; implicit-def: $vgpr0_vgpr1
                                        ; implicit-def: $vgpr2_vgpr3
; %bb.11:                               ; %Flow
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_and_not1_saveexec_b32 s8, s8
	s_cbranch_execz .LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	s_clause 0x1
	global_load_b64 v[8:9], v[2:3], off
	global_load_b64 v[10:11], v[0:1], off
	v_add_nc_u32_e32 v7, 1, v7
	s_waitcnt vmcnt(1)
	global_store_b64 v[0:1], v[8:9], off
	s_waitcnt vmcnt(0)
	global_store_b64 v[2:3], v[10:11], off
.LBB0_13:                               ; %Flow146
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_or_b32 exec_lo, exec_lo, s8
.LBB0_14:                               ; %Flow157
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_and_not1_saveexec_b32 s5, s5
	s_cbranch_execz .LBB0_38
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	v_cmp_ge_u32_e32 vcc_lo, v5, v14
	s_xor_b32 s7, s7, -1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 s7, vcc_lo, s7
	s_and_saveexec_b32 s8, s7
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s7, exec_lo, s8
	s_cbranch_execz .LBB0_29
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	v_cmp_ge_u32_e32 vcc_lo, v7, v4
	s_xor_b32 s6, s6, -1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 s6, vcc_lo, s6
	s_and_saveexec_b32 s8, s6
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s6, exec_lo, s8
	s_cbranch_execz .LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	v_mov_b32_e32 v0, v15
	s_mov_b32 s8, exec_lo
	v_cmpx_ne_u32_e64 v5, v14
; %bb.18:                               ;   in Loop: Header=BB0_4 Depth=1
	v_cmp_eq_u32_e32 vcc_lo, v7, v4
	v_mov_b32_e32 v0, v5
	v_add_co_ci_u32_e32 v7, vcc_lo, 0, v7, vcc_lo
; %bb.19:                               ; %Flow148
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_or_b32 exec_lo, exec_lo, s8
	s_delay_alu instid0(VALU_DEP_2)
	v_mov_b32_e32 v5, v0
.LBB0_20:                               ; %Flow151
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_and_not1_saveexec_b32 s6, s6
	s_cbranch_execz .LBB0_28
; %bb.21:                               ;   in Loop: Header=BB0_4 Depth=1
	v_mov_b32_e32 v8, v6
	s_mov_b32 s8, exec_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 3, v[7:8]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v8, vcc_lo, s0, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v9, vcc_lo, s1, v1, vcc_lo
	global_load_b128 v[0:3], v[8:9], off
	s_waitcnt vmcnt(0)
	v_subrev_nc_u32_e32 v10, s2, v0
	v_sub_nc_u32_e32 v11, v1, v3
	v_subrev_nc_u32_e32 v13, s3, v1
	v_sub_nc_u32_e32 v16, v2, v0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v12, v10, v11
	v_mad_u64_u32 v[10:11], null, v13, v16, v[12:13]
                                        ; implicit-def: $vgpr11
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_ne_u32_e32 0, v10
	s_xor_b32 s8, exec_lo, s8
; %bb.22:                               ;   in Loop: Header=BB0_4 Depth=1
	v_cmp_gt_i32_e32 vcc_lo, 1, v10
                                        ; implicit-def: $vgpr0_vgpr1_vgpr2_vgpr3
	v_cndmask_b32_e64 v11, 1, -1, vcc_lo
; %bb.23:                               ; %Flow150
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_and_not1_saveexec_b32 s8, s8
; %bb.24:                               ;   in Loop: Header=BB0_4 Depth=1
	v_sub_nc_u32_e32 v2, s2, v2
	v_sub_nc_u32_e32 v10, s2, v0
	v_sub_nc_u32_e32 v3, s3, v3
	v_sub_nc_u32_e32 v12, s3, v1
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_mul_lo_u32 v0, v2, v2
	v_mul_lo_u32 v2, v10, v10
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mad_u64_u32 v[10:11], null, v3, v3, v[0:1]
	v_mad_u64_u32 v[0:1], null, v12, v12, v[2:3]
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_lt_u32_e32 vcc_lo, v10, v0
	v_cndmask_b32_e64 v11, -1, 1, vcc_lo
; %bb.25:                               ; %_Z7compare5PointS_.exit120
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_or_b32 exec_lo, exec_lo, s8
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	s_mov_b32 s8, exec_lo
	v_cmpx_eq_u32_e32 1, v11
	s_cbranch_execz .LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_4 Depth=1
	global_load_b128 v[0:3], v[8:9], off
	s_waitcnt vmcnt(0)
	v_dual_mov_b32 v10, v2 :: v_dual_mov_b32 v11, v3
	v_dual_mov_b32 v12, v0 :: v_dual_mov_b32 v13, v1
	global_store_b128 v[8:9], v[10:13], off
.LBB0_27:                               ; %Flow149
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_or_b32 exec_lo, exec_lo, s8
	v_add_nc_u32_e32 v7, 1, v7
.LBB0_28:                               ; %Flow152
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_or_b32 exec_lo, exec_lo, s6
.LBB0_29:                               ; %Flow155
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_and_not1_saveexec_b32 s6, s7
	s_cbranch_execz .LBB0_37
; %bb.30:                               ;   in Loop: Header=BB0_4 Depth=1
	v_lshlrev_b64 v[0:1], 3, v[5:6]
	s_mov_b32 s7, exec_lo
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v8, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v9, vcc_lo, s1, v1, vcc_lo
	global_load_b128 v[0:3], v[8:9], off
	s_waitcnt vmcnt(0)
	v_subrev_nc_u32_e32 v10, s2, v0
	v_sub_nc_u32_e32 v11, v1, v3
	v_subrev_nc_u32_e32 v13, s3, v1
	v_sub_nc_u32_e32 v16, v2, v0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v12, v10, v11
	v_mad_u64_u32 v[10:11], null, v13, v16, v[12:13]
                                        ; implicit-def: $vgpr11
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_ne_u32_e32 0, v10
	s_xor_b32 s7, exec_lo, s7
; %bb.31:                               ;   in Loop: Header=BB0_4 Depth=1
	v_cmp_gt_i32_e32 vcc_lo, 1, v10
                                        ; implicit-def: $vgpr0_vgpr1_vgpr2_vgpr3
	v_cndmask_b32_e64 v11, 1, -1, vcc_lo
; %bb.32:                               ; %Flow154
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_and_not1_saveexec_b32 s7, s7
; %bb.33:                               ;   in Loop: Header=BB0_4 Depth=1
	v_sub_nc_u32_e32 v2, s2, v2
	v_sub_nc_u32_e32 v10, s2, v0
	v_sub_nc_u32_e32 v3, s3, v3
	v_sub_nc_u32_e32 v12, s3, v1
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_mul_lo_u32 v0, v2, v2
	v_mul_lo_u32 v2, v10, v10
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mad_u64_u32 v[10:11], null, v3, v3, v[0:1]
	v_mad_u64_u32 v[0:1], null, v12, v12, v[2:3]
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_lt_u32_e32 vcc_lo, v10, v0
	v_cndmask_b32_e64 v11, -1, 1, vcc_lo
; %bb.34:                               ; %_Z7compare5PointS_.exit112
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_or_b32 exec_lo, exec_lo, s7
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	s_mov_b32 s7, exec_lo
	v_cmpx_eq_u32_e32 1, v11
	s_cbranch_execz .LBB0_36
; %bb.35:                               ;   in Loop: Header=BB0_4 Depth=1
	global_load_b128 v[0:3], v[8:9], off
	s_waitcnt vmcnt(0)
	v_dual_mov_b32 v10, v2 :: v_dual_mov_b32 v11, v3
	v_dual_mov_b32 v12, v0 :: v_dual_mov_b32 v13, v1
	global_store_b128 v[8:9], v[10:13], off
.LBB0_36:                               ; %Flow153
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_or_b32 exec_lo, exec_lo, s7
	v_add_nc_u32_e32 v5, 1, v5
.LBB0_37:                               ; %Flow156
                                        ;   in Loop: Header=BB0_4 Depth=1
	s_or_b32 exec_lo, exec_lo, s6
.LBB0_38:                               ;   in Loop: Header=BB0_4 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	s_or_b32 exec_lo, exec_lo, s5
	v_cmp_gt_u32_e64 s6, v5, v14
	v_cmp_gt_u32_e64 s7, v7, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s5, s6, s7
	s_and_b32 s5, exec_lo, s5
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 s4, s5, s4
	s_and_not1_b32 exec_lo, exec_lo, s4
	s_cbranch_execnz .LBB0_4
.LBB0_39:                               ; %.loopexit
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z4sortP5Pointjj
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 272
		.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 19
		.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	_Z4sortP5Pointjj, .Lfunc_end0-_Z4sortP5Pointjj
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1356
; NumSgprs: 18
; NumVgprs: 19
; ScratchSize: 0
; MemoryBound: 1
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 19
; 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
	.protected	d_p0                    ; @d_p0
	.type	d_p0,@object
	.section	.bss,"aw",@nobits
	.globl	d_p0
	.p2align	2, 0x0
d_p0:
	.zero	8
	.size	d_p0, 8

	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.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 d_p0
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         12
        .size:           4
        .value_kind:     by_value
      - .offset:         16
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         20
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         28
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         30
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         32
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         34
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         36
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         38
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         56
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         80
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 272
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z4sortP5Pointjj
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z4sortP5Pointjj.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     19
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
