

#include <cuda_runtime.h>
#include <vector>
#include <iterator>
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <ncurses.h>
#ifndef gpuErrchk
#define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); }
#endif
static inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort=true)
{

   if (code != cudaSuccess)
   {
      fprintf(stderr,"GPUassert: %s %s %d\n", cudaGetErrorString(code), file, line);
      fprintf(stdout,"GPUassert: %s %s %d\n", cudaGetErrorString(code), file, line);
      endwin();
      if (abort) exit(code);
   }else{
	   fprintf(stderr,"GPUassert: %s %s %d\n", cudaGetErrorString(code), file, line);
   }
}

static void print_device_info(int device_id){
  cudaDeviceProp prop;
  gpuErrchk(cudaGetDeviceProperties(&prop, device_id));
  printw(" Device ID: %d\n", device_id);
  printw(" Device name: %s\n", prop.name);
  printw(" Device architecture: %u.%u\n", prop.major, prop.minor);
  printw(" Device global memory: %u\n", prop.totalGlobalMem);
  printw(" Device clockrate: %u\n", prop.clockRate);

}
static std::vector<int> print_devices(){
  int devices;
  gpuErrchk(cudaGetDeviceCount(&devices));
  printw("CUDA Capable Devices with architecture greater than equal to 3.5\n\n");
  std::vector<int> usable_devices;
  cudaDeviceProp prop;

  for(int device = 0; device < devices; device++){
      gpuErrchk(cudaGetDeviceProperties(&prop, device));

      if(prop.major > 3){
    	  usable_devices.push_back(device);
	  	  printw(" Device ID: %d\n", device);
	  	  printw(" Device name: %s\n", prop.name);
	  	  printw(" Device architecture: %i.%i\n", prop.major, prop.minor);
      }else if((prop.major == 3) && (prop.minor >= 5)){
    	  printw(" Device ID: %i\n", device);
    	  printw(" Device name: %i\n", prop.name);
          printw(" Device architecture: %i.%i\n", prop.major, prop.minor);
          usable_devices.push_back(device);
      }
  	printw("Hit enter to continue\n");

    getch();

  }
  printw("\n");
  return usable_devices;
}

extern "C" std::vector<int> select_devices(){
  std::vector<int> selected_devices;

  if(initscr() == NULL){
	  printw("Failed to initialize select screen\n");
	  return selected_devices;
  }
  raw();
  keypad(stdscr, TRUE);
  noecho();
  bool devices_selected = false;
  bool get_input = true;
  std::vector<int> usable_devices = print_devices();
  if(usable_devices.size() == 0)
    return selected_devices;
  std::string device_selected;
  printw("\n");
  do{
      printw("Select devices:\n");
      for(std::vector<int>::iterator iter = usable_devices.begin() ; iter != usable_devices.end(); iter++){
    	  print_device_info(*iter);
    	  get_input = true;
    	  do{
    		  try{
    			  printw("y/n?\n");
    			  char selection = getch();
    			  device_selected = selection;

    			  std::transform(device_selected.begin(), device_selected.end(),device_selected.begin(), ::toupper);
    			  if(device_selected == "Y" || device_selected == "YES"){
    				  selected_devices.push_back(*iter);
    				  get_input = false;
    			  }else if (device_selected == "N" || device_selected == "NO"){
    				  get_input = false;
    			  }else if (device_selected == "E"){
    				  selected_devices.clear();
    				  endwin();
    				  return selected_devices;
    			  }else{
    				  throw 0;
    			  }

    		  }catch(...){
    			  printw("Error in selection\n");
    			  continue;
    		  }

    	      refresh();

    	  }while(get_input);

      }

      get_input = true;
      printw("Devices selected:\n");
      do{
    	  for(std::vector<int>::iterator iter = selected_devices.begin(); iter != selected_devices.end(); iter++){
    		  print_device_info(*iter);
    	  }
	  	  try{
	  		  printw("Is this right (y/n)? \n");
			  char selection = getch();
			  device_selected = selection;
	  		  printw("\n");
	  		  std::transform(device_selected.begin(), device_selected.end(),device_selected.begin(), ::toupper);
	  		  if(device_selected == "Y" || device_selected == "YES"){
	  			  devices_selected = true;
	  			  get_input = false;
	  		  }else if (device_selected == "N" || device_selected == "NO"){
	  			  get_input = false;
	  		  }else if (device_selected == "E"){
				  selected_devices.clear();
				  endwin();
				  return selected_devices;
			  }else{
	  			  throw 0;
	  		  }
	  	  }catch(...){
	  		  printw("Error in selection\n");
	  		  continue;
	  	  }
	  	  refresh();
      }while(get_input);
      if(devices_selected == false) selected_devices.clear();
  }while(devices_selected == false);
  printw("Hit enter to continue\n");

  getch();
  endwin();
  return selected_devices;
}

extern "C" std::vector<int> select_all_devices(){
	std::vector<int> all_devices;


	raw();
	keypad(stdscr, TRUE);
	noecho();

	if(initscr() == NULL){
		printw("Failed to initialize select screen\n");

		return all_devices;
	}
	all_devices = print_devices();
	printw("Hit enter to continue\n");
	getch();
	endwin();
	return all_devices;
}

	.file	"tmpxft_00205361_00000000-6_cudafphi_device_functions.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4297:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4297:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"/home/ubuntu/Datasets/stackv2/train-structured/syumprc/solar-eclipse/master/libcuda_fphi/cudafphi_device_functions.cu"
.LC1:
	.string	"GPUassert: %s %s %d\n"
	.text
	.type	_ZL9gpuAssert9cudaErrorPKcib.constprop.0, @function
_ZL9gpuAssert9cudaErrorPKcib.constprop.0:
.LFB5060:
	.cfi_startproc
	testl	%edi, %edi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	je	.L3
	movl	%edi, %ebx
	call	cudaGetErrorString@PLT
	movl	%ebp, %r9d
	movq	%r12, %rdx
	movl	$2, %esi
	movq	stderr(%rip), %rdi
	movq	%rax, %rcx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %r8
	call	__fprintf_chk@PLT
	movl	%ebx, %edi
	call	cudaGetErrorString@PLT
	movl	%ebp, %r9d
	movq	%r12, %rdx
	movl	$2, %esi
	movq	stdout(%rip), %rdi
	movq	%rax, %rcx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %r8
	call	__fprintf_chk@PLT
	call	endwin@PLT
	movl	%ebx, %edi
	call	exit@PLT
.L3:
	xorl	%edi, %edi
	call	cudaGetErrorString@PLT
	movq	stderr(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 24
	movl	%ebp, %r9d
	movq	%rax, %rcx
	movq	%r12, %rdx
	popq	%rbp
	.cfi_def_cfa_offset 16
	movl	$2, %esi
	leaq	.LC0(%rip), %r8
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	__fprintf_chk@PLT
	.cfi_endproc
.LFE5060:
	.size	_ZL9gpuAssert9cudaErrorPKcib.constprop.0, .-_ZL9gpuAssert9cudaErrorPKcib.constprop.0
	.section	.rodata.str1.1
.LC2:
	.string	" Device ID: %d\n"
.LC3:
	.string	" Device name: %s\n"
.LC4:
	.string	" Device architecture: %u.%u\n"
.LC5:
	.string	" Device global memory: %u\n"
.LC6:
	.string	" Device clockrate: %u\n"
	.text
	.type	_ZL17print_device_infoi, @function
_ZL17print_device_infoi:
.LFB4271:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%edi, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%edi, %ebx
	subq	$1048, %rsp
	.cfi_def_cfa_offset 1072
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	call	cudaGetDeviceProperties_v2@PLT
	movl	$29, %esi
	movl	%eax, %edi
	call	_ZL9gpuAssert9cudaErrorPKcib.constprop.0
	movl	%ebx, %esi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
	movq	%rbp, %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
	movl	364(%rsp), %edx
	movl	360(%rsp), %esi
	xorl	%eax, %eax
	leaq	.LC4(%rip), %rdi
	call	printw@PLT
	movq	288(%rsp), %rsi
	leaq	.LC5(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
	movl	348(%rsp), %esi
	xorl	%eax, %eax
	leaq	.LC6(%rip), %rdi
	call	printw@PLT
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	addq	$1048, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4271:
	.size	_ZL17print_device_infoi, .-_ZL17print_device_infoi
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4320:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE4320:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZNSt6vectorIiSaIiEED2Ev,"axG",@progbits,_ZNSt6vectorIiSaIiEED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEED2Ev
	.type	_ZNSt6vectorIiSaIiEED2Ev, @function
_ZNSt6vectorIiSaIiEED2Ev:
.LFB4630:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L11
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L11:
	ret
	.cfi_endproc
.LFE4630:
	.size	_ZNSt6vectorIiSaIiEED2Ev, .-_ZNSt6vectorIiSaIiEED2Ev
	.weak	_ZNSt6vectorIiSaIiEED1Ev
	.set	_ZNSt6vectorIiSaIiEED1Ev,_ZNSt6vectorIiSaIiEED2Ev
	.section	.text._ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_,"axG",@progbits,_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_,comdat
	.weak	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	.type	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_, @function
_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_:
.LFB4650:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	8(%rdi), %r12
	movq	%rsi, %rdi
	movq	%rsi, 8(%rsp)
	call	strlen@PLT
	movq	8(%rsp), %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	cmpq	%rdx, %r12
	jne	.L13
	movb	$1, %al
	testq	%r12, %r12
	je	.L13
	movq	(%rbx), %rdi
	movq	%r12, %rdx
	call	memcmp@PLT
	testl	%eax, %eax
	sete	%al
.L13:
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4650:
	.size	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_, .-_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	.section	.rodata._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_.str1.1,"aMS",@progbits,1
.LC7:
	.string	"vector::_M_realloc_insert"
	.section	.text._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.type	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, @function
_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_:
.LFB4805:
	.cfi_startproc
	endbr64
	movabsq	$2305843009213693951, %rcx
	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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rax
	movq	(%rdi), %r14
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	subq	%r14, %rbx
	sarq	$2, %rbx
	cmpq	%rcx, %rbx
	jne	.L19
	leaq	.LC7(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L19:
	cmpq	%r14, (%rsp)
	movl	$1, %eax
	movq	%rsi, %r15
	movq	%rdi, %r13
	cmovne	%rbx, %rax
	movq	%rsi, %rbp
	addq	%rax, %rbx
	setc	%al
	subq	%r14, %r15
	movzbl	%al, %eax
	testq	%rax, %rax
	jne	.L29
	xorl	%r12d, %r12d
	testq	%rbx, %rbx
	je	.L24
	movabsq	$2305843009213693951, %rax
	cmpq	%rax, %rbx
	cmova	%rax, %rbx
	jmp	.L23
.L29:
	movq	%rcx, %rbx
.L23:
	leaq	0(,%rbx,4), %rdi
	movq	%rdx, 8(%rsp)
	call	_Znwm@PLT
	movq	8(%rsp), %rdx
	movq	%rax, %r12
.L24:
	movl	(%rdx), %eax
	movl	%eax, (%r12,%r15)
	testq	%r15, %r15
	jle	.L25
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	memmove@PLT
.L25:
	movq	(%rsp), %rax
	leaq	4(%r12,%r15), %rdx
	subq	%rbp, %rax
	testq	%rax, %rax
	jle	.L26
	movq	%rdx, %rdi
	movq	%rbp, %rsi
	movq	%rax, %rcx
	rep movsb
.L26:
	leaq	(%rdx,%rax), %rbp
	testq	%r14, %r14
	je	.L27
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L27:
	leaq	(%r12,%rbx,4), %rax
	movq	%r12, 0(%r13)
	movq	%rbp, 8(%r13)
	movq	%rax, 16(%r13)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4805:
	.size	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, .-_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.section	.text._ZNSt6vectorIiSaIiEE9push_backERKi,"axG",@progbits,_ZNSt6vectorIiSaIiEE9push_backERKi,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEE9push_backERKi
	.type	_ZNSt6vectorIiSaIiEE9push_backERKi, @function
_ZNSt6vectorIiSaIiEE9push_backERKi:
.LFB4632:
	.cfi_startproc
	endbr64
	movq	%rsi, %rdx
	movq	8(%rdi), %rsi
	cmpq	16(%rdi), %rsi
	je	.L37
	movl	(%rdx), %eax
	addq	$4, %rsi
	movl	%eax, -4(%rsi)
	movq	%rsi, 8(%rdi)
	ret
.L37:
	jmp	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.cfi_endproc
.LFE4632:
	.size	_ZNSt6vectorIiSaIiEE9push_backERKi, .-_ZNSt6vectorIiSaIiEE9push_backERKi
	.section	.rodata.str1.1
.LC8:
	.string	"CUDA Capable Devices with architecture greater than equal to 3.5\n\n"
.LC9:
	.string	" Device architecture: %i.%i\n"
.LC10:
	.string	"Hit enter to continue\n"
.LC11:
	.string	" Device ID: %i\n"
.LC12:
	.string	" Device name: %i\n"
.LC13:
	.string	"\n"
	.text
	.type	_ZL13print_devicesv, @function
_ZL13print_devicesv:
.LFB4272:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4272
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	subq	$1064, %rsp
	.cfi_def_cfa_offset 1104
	movq	%fs:40, %rax
	movq	%rax, 1048(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdi
.LEHB0:
	call	cudaGetDeviceCount@PLT
	movl	$39, %esi
	movl	%eax, %edi
	call	_ZL9gpuAssert9cudaErrorPKcib.constprop.0
	leaq	.LC8(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
.LEHE0:
	xorl	%eax, %eax
	movq	%rax, (%rbx)
	movq	%rax, 8(%rbx)
	movq	%rax, 16(%rbx)
.L41:
	movl	%ebp, 12(%rsp)
	cmpl	%ebp, 8(%rsp)
	jle	.L54
	leaq	16(%rsp), %r12
	movl	%ebp, %esi
	movq	%r12, %rdi
.LEHB1:
	call	cudaGetDeviceProperties_v2@PLT
	movl	%eax, %edi
	movl	$45, %esi
	call	_ZL9gpuAssert9cudaErrorPKcib.constprop.0
	cmpl	$3, 376(%rsp)
	jle	.L42
	leaq	12(%rsp), %rsi
	movq	%rbx, %rdi
	call	_ZNSt6vectorIiSaIiEE9push_backERKi
	movl	%ebp, %esi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	printw@PLT
	movq	%r12, %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
	movl	380(%rsp), %edx
	movl	376(%rsp), %esi
	leaq	.LC9(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
.L44:
	leaq	.LC10(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
	jmp	.L55
.L42:
	jne	.L44
	cmpl	$4, 380(%rsp)
	jle	.L44
	movl	%ebp, %esi
	leaq	.LC11(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
	movq	%r12, %rsi
	leaq	.LC12(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
	movl	380(%rsp), %edx
	movl	376(%rsp), %esi
	leaq	.LC9(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
	leaq	12(%rsp), %rsi
	movq	%rbx, %rdi
	call	_ZNSt6vectorIiSaIiEE9push_backERKi
	jmp	.L44
.L55:
	movq	stdscr(%rip), %rdi
	call	wgetch@PLT
	incl	%ebp
	jmp	.L41
.L54:
	leaq	.LC13(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
.LEHE1:
	jmp	.L56
.L49:
	endbr64
	movq	%rax, %rbp
.L46:
	movq	%rbx, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	movq	1048(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L53
	movq	%rbp, %rdi
.LEHB2:
	call	_Unwind_Resume@PLT
.LEHE2:
.L56:
	movq	1048(%rsp), %rax
	subq	%fs:40, %rax
	je	.L48
.L53:
	call	__stack_chk_fail@PLT
.L48:
	addq	$1064, %rsp
	.cfi_def_cfa_offset 40
	movq	%rbx, %rax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4272:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4272:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4272-.LLSDACSB4272
.LLSDACSB4272:
	.uleb128 .LEHB0-.LFB4272
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB4272
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L49-.LFB4272
	.uleb128 0
	.uleb128 .LEHB2-.LFB4272
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
.LLSDACSE4272:
	.text
	.size	_ZL13print_devicesv, .-_ZL13print_devicesv
	.section	.rodata.str1.1
.LC14:
	.string	"Failed to initialize select screen\n"
	.text
	.globl	select_all_devices
	.type	select_all_devices, @function
select_all_devices:
.LFB4291:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4291
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xorl	%edx, %edx
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rdx, (%rdi)
	movq	%rdx, 8(%rdi)
	movq	%rdx, 16(%rdi)
.LEHB3:
	call	raw@PLT
	movq	stdscr(%rip), %rdi
	movl	$1, %esi
	call	keypad@PLT
	call	noecho@PLT
	call	initscr@PLT
	testq	%rax, %rax
	jne	.L58
	leaq	.LC14(%rip), %rdi
	call	printw@PLT
	jmp	.L57
.L58:
	leaq	8(%rsp), %rbp
	movq	%rbp, %rdi
	call	_ZL13print_devicesv
	movq	8(%rsp), %rsi
	movq	(%rbx), %rcx
	leaq	32(%rsp), %rdi
	movq	8(%rbx), %rdx
	movq	16(%rbx), %rax
	movq	%rsi, (%rbx)
	movq	16(%rsp), %rsi
	movq	%rax, 48(%rsp)
	xorl	%eax, %eax
	movq	%rsi, 8(%rbx)
	movq	24(%rsp), %rsi
	movq	%rax, 8(%rsp)
	movq	%rsi, 16(%rbx)
	movq	%rax, 16(%rsp)
	movq	%rax, 24(%rsp)
	movq	%rcx, 32(%rsp)
	movq	%rdx, 40(%rsp)
	call	_ZNSt6vectorIiSaIiEED1Ev
	movq	%rbp, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	leaq	.LC10(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
	movq	stdscr(%rip), %rdi
	call	wgetch@PLT
	call	endwin@PLT
.LEHE3:
	jmp	.L57
.L63:
	endbr64
	movq	%rax, %rbp
.L60:
	movq	%rbx, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L65
	movq	%rbp, %rdi
.LEHB4:
	call	_Unwind_Resume@PLT
.LEHE4:
.L57:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	je	.L62
.L65:
	call	__stack_chk_fail@PLT
.L62:
	addq	$72, %rsp
	.cfi_def_cfa_offset 24
	movq	%rbx, %rax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4291:
	.section	.gcc_except_table
.LLSDA4291:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4291-.LLSDACSB4291
.LLSDACSB4291:
	.uleb128 .LEHB3-.LFB4291
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L63-.LFB4291
	.uleb128 0
	.uleb128 .LEHB4-.LFB4291
	.uleb128 .LEHE4-.LEHB4
	.uleb128 0
	.uleb128 0
.LLSDACSE4291:
	.text
	.size	select_all_devices, .-select_all_devices
	.section	.rodata.str1.1
.LC15:
	.string	"Select devices:\n"
.LC16:
	.string	"y/n?\n"
.LC17:
	.string	"Y"
.LC18:
	.string	"YES"
.LC19:
	.string	"N"
.LC20:
	.string	"NO"
.LC21:
	.string	"E"
.LC22:
	.string	"Devices selected:\n"
.LC23:
	.string	"Is this right (y/n)? \n"
.LC24:
	.string	"Error in selection\n"
	.text
	.globl	select_devices
	.type	select_devices, @function
select_devices:
.LFB4289:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4289
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%esi, %esi
	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
	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
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	movq	%rsi, (%rdi)
	movq	%rsi, 8(%rdi)
	movq	%rsi, 16(%rdi)
.LEHB5:
	call	initscr@PLT
	testq	%rax, %rax
	jne	.L67
	leaq	.LC14(%rip), %rdi
	call	printw@PLT
	jmp	.L66
.L67:
	call	raw@PLT
	movq	stdscr(%rip), %rdi
	movl	$1, %esi
	call	keypad@PLT
	call	noecho@PLT
	leaq	16(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	_ZL13print_devicesv
.LEHE5:
	movq	24(%rsp), %r14
	movq	16(%rsp), %r13
	cmpq	%r14, %r13
	je	.L69
	leaq	56(%rsp), %rax
	xorl	%ecx, %ecx
	movb	$0, 56(%rsp)
	leaq	.LC13(%rip), %rdi
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	movq	%rcx, 48(%rsp)
.LEHB6:
	call	printw@PLT
.L91:
	leaq	.LC15(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
	movq	%r13, %r12
.L70:
	cmpq	%r14, %r12
	je	.L115
	movl	(%r12), %edi
	call	_ZL17print_device_infoi
.LEHE6:
.L94:
	leaq	.LC16(%rip), %rdi
	xorl	%eax, %eax
.LEHB7:
	call	printw@PLT
	movq	stdscr(%rip), %rdi
	call	wgetch@PLT
	leaq	40(%rsp), %rcx
	movq	48(%rsp), %rdx
	movsbl	%al, %r8d
	xorl	%esi, %esi
	movq	%rcx, (%rsp)
	movq	(%rsp), %rdi
	movl	$1, %ecx
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc@PLT
	movq	40(%rsp), %rbp
	movq	48(%rsp), %r15
	addq	%rbp, %r15
.L71:
	cmpq	%rbp, %r15
	je	.L116
	movsbl	0(%rbp), %edi
	incq	%rbp
	call	toupper@PLT
	movb	%al, -1(%rbp)
	jmp	.L71
.L116:
	movq	(%rsp), %rdi
	leaq	.LC17(%rip), %rsi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	jne	.L73
	movq	(%rsp), %rdi
	leaq	.LC18(%rip), %rsi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	je	.L74
.L73:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_ZNSt6vectorIiSaIiEE9push_backERKi
	jmp	.L75
.L74:
	movq	(%rsp), %rdi
	leaq	.LC19(%rip), %rsi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	jne	.L75
	movq	(%rsp), %rdi
	leaq	.LC20(%rip), %rsi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	jne	.L75
	movq	(%rsp), %rdi
	leaq	.LC21(%rip), %rsi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	je	.L76
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	je	.L77
	movq	%rax, 8(%rbx)
.L77:
	call	endwin@PLT
.L87:
	leaq	40(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L69
.L76:
	movl	$4, %edi
	call	__cxa_allocate_exception@PLT
	xorl	%edx, %edx
	movl	%edx, (%rax)
	movq	%rax, %rdi
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L114
	xorl	%edx, %edx
	leaq	_ZTIi(%rip), %rsi
	call	__cxa_throw@PLT
.LEHE7:
.L75:
.LEHB8:
	call	refresh@PLT
	addq	$4, %r12
	jmp	.L70
.L115:
	leaq	.LC22(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
	leaq	.LC23(%rip), %r15
.L98:
	movq	(%rbx), %rbp
.L80:
	cmpq	8(%rbx), %rbp
	je	.L117
	movl	0(%rbp), %edi
	call	_ZL17print_device_infoi
.LEHE8:
	addq	$4, %rbp
	jmp	.L80
.L117:
	movq	%r15, %rdi
	xorl	%eax, %eax
.LEHB9:
	call	printw@PLT
	movq	stdscr(%rip), %rdi
	call	wgetch@PLT
	leaq	40(%rsp), %rdx
	movsbl	%al, %r8d
	movl	$1, %ecx
	xorl	%esi, %esi
	movq	%rdx, (%rsp)
	movq	48(%rsp), %rdx
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc@PLT
	leaq	.LC13(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
	movq	40(%rsp), %r12
	movq	48(%rsp), %rbp
	addq	%r12, %rbp
.L82:
	cmpq	%rbp, %r12
	je	.L118
	movsbl	(%r12), %edi
	incq	%r12
	call	toupper@PLT
	movb	%al, -1(%r12)
	jmp	.L82
.L118:
	movq	(%rsp), %rdi
	leaq	.LC17(%rip), %rsi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	movl	%eax, %ebp
	testb	%al, %al
	jne	.L84
	movq	(%rsp), %rdi
	leaq	.LC18(%rip), %rsi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	movl	%eax, %ebp
	testb	%al, %al
	jne	.L84
	movq	(%rsp), %rdi
	leaq	.LC19(%rip), %rsi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	jne	.L84
	movq	(%rsp), %rdi
	leaq	.LC20(%rip), %rsi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	jne	.L84
	movq	(%rsp), %rdi
	leaq	.LC21(%rip), %rsi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	je	.L85
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	je	.L86
	movq	%rax, 8(%rbx)
.L86:
	call	endwin@PLT
	jmp	.L87
.L85:
	movl	$4, %edi
	call	__cxa_allocate_exception@PLT
	movq	%rax, %rdi
	xorl	%eax, %eax
	movl	%eax, (%rdi)
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L114
	xorl	%edx, %edx
	leaq	_ZTIi(%rip), %rsi
	call	__cxa_throw@PLT
.LEHE9:
.L84:
.LEHB10:
	call	refresh@PLT
	testb	%bpl, %bpl
	je	.L89
	leaq	.LC10(%rip), %rdi
	xorl	%eax, %eax
	call	printw@PLT
	jmp	.L119
.L89:
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	je	.L91
	movq	%rax, 8(%rbx)
	jmp	.L91
.L119:
	movq	stdscr(%rip), %rdi
	call	wgetch@PLT
	call	endwin@PLT
.LEHE10:
	jmp	.L87
.L69:
	movq	8(%rsp), %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	jmp	.L66
.L106:
	endbr64
	movq	%rax, %rdi
.L93:
	call	__cxa_begin_catch@PLT
	leaq	.LC24(%rip), %rdi
	xorl	%eax, %eax
.LEHB11:
	call	printw@PLT
.LEHE11:
.LEHB12:
	call	__cxa_end_catch@PLT
.LEHE12:
	jmp	.L94
.L107:
	endbr64
	movq	%rax, %rbp
.L95:
	call	__cxa_end_catch@PLT
	jmp	.L96
.L108:
	endbr64
	movq	%rax, %rdi
.L97:
	call	__cxa_begin_catch@PLT
	leaq	.LC24(%rip), %rdi
	xorl	%eax, %eax
.LEHB13:
	call	printw@PLT
.LEHE13:
.LEHB14:
	call	__cxa_end_catch@PLT
.LEHE14:
	jmp	.L98
.L109:
	endbr64
	movq	%rax, %rbp
.L99:
	call	__cxa_end_catch@PLT
	jmp	.L96
.L105:
	endbr64
	movq	%rax, %rbp
.L96:
	leaq	40(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	jmp	.L100
.L104:
	endbr64
	movq	%rax, %rbp
.L100:
	movq	%rbx, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L114
	movq	%rbp, %rdi
.LEHB15:
	call	_Unwind_Resume@PLT
.LEHE15:
.L66:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L102
.L114:
	call	__stack_chk_fail@PLT
.L102:
	addq	$88, %rsp
	.cfi_def_cfa_offset 56
	movq	%rbx, %rax
	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
.LFE4289:
	.section	.gcc_except_table
	.align 4
.LLSDA4289:
	.byte	0xff
	.byte	0x9b
	.uleb128 .LLSDATT4289-.LLSDATTD4289
.LLSDATTD4289:
	.byte	0x1
	.uleb128 .LLSDACSE4289-.LLSDACSB4289
.LLSDACSB4289:
	.uleb128 .LEHB5-.LFB4289
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L104-.LFB4289
	.uleb128 0
	.uleb128 .LEHB6-.LFB4289
	.uleb128 .LEHE6-.LEHB6
	.uleb128 .L105-.LFB4289
	.uleb128 0
	.uleb128 .LEHB7-.LFB4289
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L106-.LFB4289
	.uleb128 0x1
	.uleb128 .LEHB8-.LFB4289
	.uleb128 .LEHE8-.LEHB8
	.uleb128 .L105-.LFB4289
	.uleb128 0
	.uleb128 .LEHB9-.LFB4289
	.uleb128 .LEHE9-.LEHB9
	.uleb128 .L108-.LFB4289
	.uleb128 0x1
	.uleb128 .LEHB10-.LFB4289
	.uleb128 .LEHE10-.LEHB10
	.uleb128 .L105-.LFB4289
	.uleb128 0
	.uleb128 .LEHB11-.LFB4289
	.uleb128 .LEHE11-.LEHB11
	.uleb128 .L107-.LFB4289
	.uleb128 0
	.uleb128 .LEHB12-.LFB4289
	.uleb128 .LEHE12-.LEHB12
	.uleb128 .L105-.LFB4289
	.uleb128 0
	.uleb128 .LEHB13-.LFB4289
	.uleb128 .LEHE13-.LEHB13
	.uleb128 .L109-.LFB4289
	.uleb128 0
	.uleb128 .LEHB14-.LFB4289
	.uleb128 .LEHE14-.LEHB14
	.uleb128 .L105-.LFB4289
	.uleb128 0
	.uleb128 .LEHB15-.LFB4289
	.uleb128 .LEHE15-.LEHB15
	.uleb128 0
	.uleb128 0
.LLSDACSE4289:
	.byte	0x1
	.byte	0
	.align 4
	.long	0

.LLSDATT4289:
	.text
	.size	select_devices, .-select_devices
	.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
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:



#include <hip/hip_runtime.h>
#include <vector>
#include <iterator>
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <ncurses.h>
#ifndef gpuErrchk
#define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); }
#endif
static inline void gpuAssert(hipError_t code, const char *file, int line, bool abort=true)
{

   if (code != hipSuccess)
   {
      fprintf(stderr,"GPUassert: %s %s %d\n", hipGetErrorString(code), file, line);
      fprintf(stdout,"GPUassert: %s %s %d\n", hipGetErrorString(code), file, line);
      endwin();
      if (abort) exit(code);
   }else{
	   fprintf(stderr,"GPUassert: %s %s %d\n", hipGetErrorString(code), file, line);
   }
}

static void print_device_info(int device_id){
  hipDeviceProp_t prop;
  gpuErrchk(hipGetDeviceProperties(&prop, device_id));
  printw(" Device ID: %d\n", device_id);
  printw(" Device name: %s\n", prop.name);
  printw(" Device architecture: %u.%u\n", prop.major, prop.minor);
  printw(" Device global memory: %u\n", prop.totalGlobalMem);
  printw(" Device clockrate: %u\n", prop.clockRate);

}
static std::vector<int> print_devices(){
  int devices;
  gpuErrchk(hipGetDeviceCount(&devices));
  printw("CUDA Capable Devices with architecture greater than equal to 3.5\n\n");
  std::vector<int> usable_devices;
  hipDeviceProp_t prop;

  for(int device = 0; device < devices; device++){
      gpuErrchk(hipGetDeviceProperties(&prop, device));

      if(prop.major > 3){
    	  usable_devices.push_back(device);
	  	  printw(" Device ID: %d\n", device);
	  	  printw(" Device name: %s\n", prop.name);
	  	  printw(" Device architecture: %i.%i\n", prop.major, prop.minor);
      }else if((prop.major == 3) && (prop.minor >= 5)){
    	  printw(" Device ID: %i\n", device);
    	  printw(" Device name: %i\n", prop.name);
          printw(" Device architecture: %i.%i\n", prop.major, prop.minor);
          usable_devices.push_back(device);
      }
  	printw("Hit enter to continue\n");

    getch();

  }
  printw("\n");
  return usable_devices;
}

extern "C" std::vector<int> select_devices(){
  std::vector<int> selected_devices;

  if(initscr() == NULL){
	  printw("Failed to initialize select screen\n");
	  return selected_devices;
  }
  raw();
  keypad(stdscr, TRUE);
  noecho();
  bool devices_selected = false;
  bool get_input = true;
  std::vector<int> usable_devices = print_devices();
  if(usable_devices.size() == 0)
    return selected_devices;
  std::string device_selected;
  printw("\n");
  do{
      printw("Select devices:\n");
      for(std::vector<int>::iterator iter = usable_devices.begin() ; iter != usable_devices.end(); iter++){
    	  print_device_info(*iter);
    	  get_input = true;
    	  do{
    		  try{
    			  printw("y/n?\n");
    			  char selection = getch();
    			  device_selected = selection;

    			  std::transform(device_selected.begin(), device_selected.end(),device_selected.begin(), ::toupper);
    			  if(device_selected == "Y" || device_selected == "YES"){
    				  selected_devices.push_back(*iter);
    				  get_input = false;
    			  }else if (device_selected == "N" || device_selected == "NO"){
    				  get_input = false;
    			  }else if (device_selected == "E"){
    				  selected_devices.clear();
    				  endwin();
    				  return selected_devices;
    			  }else{
    				  throw 0;
    			  }

    		  }catch(...){
    			  printw("Error in selection\n");
    			  continue;
    		  }

    	      refresh();

    	  }while(get_input);

      }

      get_input = true;
      printw("Devices selected:\n");
      do{
    	  for(std::vector<int>::iterator iter = selected_devices.begin(); iter != selected_devices.end(); iter++){
    		  print_device_info(*iter);
    	  }
	  	  try{
	  		  printw("Is this right (y/n)? \n");
			  char selection = getch();
			  device_selected = selection;
	  		  printw("\n");
	  		  std::transform(device_selected.begin(), device_selected.end(),device_selected.begin(), ::toupper);
	  		  if(device_selected == "Y" || device_selected == "YES"){
	  			  devices_selected = true;
	  			  get_input = false;
	  		  }else if (device_selected == "N" || device_selected == "NO"){
	  			  get_input = false;
	  		  }else if (device_selected == "E"){
				  selected_devices.clear();
				  endwin();
				  return selected_devices;
			  }else{
	  			  throw 0;
	  		  }
	  	  }catch(...){
	  		  printw("Error in selection\n");
	  		  continue;
	  	  }
	  	  refresh();
      }while(get_input);
      if(devices_selected == false) selected_devices.clear();
  }while(devices_selected == false);
  printw("Hit enter to continue\n");

  getch();
  endwin();
  return selected_devices;
}

extern "C" std::vector<int> select_all_devices(){
	std::vector<int> all_devices;


	raw();
	keypad(stdscr, TRUE);
	noecho();

	if(initscr() == NULL){
		printw("Failed to initialize select screen\n");

		return all_devices;
	}
	all_devices = print_devices();
	printw("Hit enter to continue\n");
	getch();
	endwin();
	return all_devices;
}

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

                                        # End of file scope inline assembly
	.globl	select_devices                  # -- Begin function select_devices
	.type	select_devices,@function
select_devices:                         # @select_devices
.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	$72, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
.Ltmp0:
	callq	initscr
.Ltmp1:
# %bb.1:
	testq	%rax, %rax
	je	.LBB0_2
# %bb.4:
.Ltmp2:
	callq	raw
.Ltmp3:
# %bb.5:
	movq	stdscr(%rip), %rdi
.Ltmp4:
	movl	$1, %esi
	callq	keypad
.Ltmp5:
# %bb.6:
.Ltmp6:
	callq	noecho
.Ltmp7:
# %bb.7:
.Ltmp8:
	leaq	48(%rsp), %rdi
	callq	_ZL13print_devicesv
.Ltmp9:
# %bb.8:
	movq	56(%rsp), %rdi
	cmpq	48(%rsp), %rdi
	je	.LBB0_35
# %bb.9:
	leaq	24(%rsp), %rax
	movq	%rax, -16(%rax)
	movq	$0, -8(%rax)
	movb	$0, (%rax)
.Ltmp11:
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp12:
# %bb.10:                               # %.preheader168
	leaq	8(%rsp), %r14
	xorl	%eax, %eax
.LBB0_11:                               # %_ZNSt6vectorIiSaIiEE5clearEv.exit94
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_12 Depth 2
                                        #       Child Loop BB0_52 Depth 3
                                        #         Child Loop BB0_17 Depth 4
                                        #           Child Loop BB0_22 Depth 5
                                        #       Child Loop BB0_54 Depth 3
                                        #         Child Loop BB0_55 Depth 4
                                        #         Child Loop BB0_62 Depth 4
	movq	%rax, 40(%rsp)                  # 8-byte Spill
.LBB0_12:                               # %_ZNSt6vectorIiSaIiEE5clearEv.exit94
                                        #   Parent Loop BB0_11 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_52 Depth 3
                                        #         Child Loop BB0_17 Depth 4
                                        #           Child Loop BB0_22 Depth 5
                                        #       Child Loop BB0_54 Depth 3
                                        #         Child Loop BB0_55 Depth 4
                                        #         Child Loop BB0_62 Depth 4
.Ltmp13:
	movl	$.L.str.2, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp14:
# %bb.13:                               #   in Loop: Header=BB0_12 Depth=2
	movq	48(%rsp), %r15
.LBB0_52:                               # %.thread
                                        #   Parent Loop BB0_11 Depth=1
                                        #     Parent Loop BB0_12 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB0_17 Depth 4
                                        #           Child Loop BB0_22 Depth 5
	cmpq	56(%rsp), %r15
	je	.LBB0_53
# %bb.16:                               # %.lr.ph
                                        #   in Loop: Header=BB0_52 Depth=3
	movl	(%r15), %edi
.Ltmp15:
	callq	_ZL17print_device_infoi
.Ltmp16:
.LBB0_17:                               # %.preheader
                                        #   Parent Loop BB0_11 Depth=1
                                        #     Parent Loop BB0_12 Depth=2
                                        #       Parent Loop BB0_52 Depth=3
                                        # =>      This Loop Header: Depth=4
                                        #           Child Loop BB0_22 Depth 5
.Ltmp17:
	movl	$.L.str.3, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp18:
# %bb.18:                               #   in Loop: Header=BB0_17 Depth=4
	movq	stdscr(%rip), %rdi
.Ltmp20:
	callq	wgetch
.Ltmp21:
# %bb.19:                               #   in Loop: Header=BB0_17 Depth=4
	movq	16(%rsp), %rdx
.Ltmp22:
	movsbl	%al, %r8d
	movl	$1, %ecx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc
.Ltmp23:
# %bb.20:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEc.exit
                                        #   in Loop: Header=BB0_17 Depth=4
	movq	16(%rsp), %r12
	testq	%r12, %r12
	je	.LBB0_47
# %bb.21:                               # %.lr.ph.i.preheader
                                        #   in Loop: Header=BB0_17 Depth=4
	movq	8(%rsp), %r13
	xorl	%ebp, %ebp
.LBB0_22:                               # %.lr.ph.i
                                        #   Parent Loop BB0_11 Depth=1
                                        #     Parent Loop BB0_12 Depth=2
                                        #       Parent Loop BB0_52 Depth=3
                                        #         Parent Loop BB0_17 Depth=4
                                        # =>        This Inner Loop Header: Depth=5
	movsbl	(%r13,%rbp), %edi
	callq	toupper
	movb	%al, (%r13,%rbp)
	incq	%rbp
	cmpq	%rbp, %r12
	jne	.LBB0_22
# %bb.23:                               # %_ZSt9transformIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES9_PDoFiiEET0_T_SD_SC_T1_.exit
                                        #   in Loop: Header=BB0_17 Depth=4
	movq	16(%rsp), %r12
	cmpq	$3, %r12
	je	.LBB0_37
# %bb.24:                               # %_ZSt9transformIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES9_PDoFiiEET0_T_SD_SC_T1_.exit
                                        #   in Loop: Header=BB0_17 Depth=4
	cmpq	$2, %r12
	je	.LBB0_46
# %bb.25:                               # %_ZSt9transformIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES9_PDoFiiEET0_T_SD_SC_T1_.exit
                                        #   in Loop: Header=BB0_17 Depth=4
	cmpq	$1, %r12
	jne	.LBB0_47
# %bb.26:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit
                                        #   in Loop: Header=BB0_17 Depth=4
	movq	8(%rsp), %r13
	cmpb	$89, (%r13)
	je	.LBB0_38
# %bb.27:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit67
                                        #   in Loop: Header=BB0_17 Depth=4
	movl	$.L.str.6, %esi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	bcmp@PLT
	testl	%eax, %eax
	je	.LBB0_50
# %bb.28:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit71
                                        #   in Loop: Header=BB0_17 Depth=4
	movl	$.L.str.8, %esi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	bcmp@PLT
	testl	%eax, %eax
	jne	.LBB0_47
# %bb.29:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit71.thread
                                        #   in Loop: Header=BB0_17 Depth=4
	movq	(%rbx), %rax
	cmpq	%rax, 8(%rbx)
	je	.LBB0_31
# %bb.30:                               #   in Loop: Header=BB0_17 Depth=4
	movq	%rax, 8(%rbx)
.LBB0_31:                               # %_ZNSt6vectorIiSaIiEE5clearEv.exit
                                        #   in Loop: Header=BB0_17 Depth=4
.Ltmp24:
	callq	endwin
.Ltmp25:
	jmp	.LBB0_32
.LBB0_46:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit69
                                        #   in Loop: Header=BB0_17 Depth=4
	movq	8(%rsp), %rdi
	movl	$.L.str.7, %esi
	movq	%r12, %rdx
	callq	bcmp@PLT
	testl	%eax, %eax
	je	.LBB0_50
.LBB0_47:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit71.thread123
                                        #   in Loop: Header=BB0_17 Depth=4
	movl	$4, %edi
	callq	__cxa_allocate_exception
	movl	$0, (%rax)
.Ltmp31:
	movl	$_ZTIi, %esi
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	__cxa_throw
.Ltmp32:
	jmp	.LBB0_103
.LBB0_37:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit64
                                        #   in Loop: Header=BB0_17 Depth=4
	movq	8(%rsp), %rdi
	movl	$.L.str.5, %esi
	movq	%r12, %rdx
	callq	bcmp@PLT
	testl	%eax, %eax
	jne	.LBB0_47
.LBB0_38:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit.thread
                                        #   in Loop: Header=BB0_17 Depth=4
	movq	8(%rbx), %rsi
	cmpq	16(%rbx), %rsi
	jne	.LBB0_39
# %bb.49:                               #   in Loop: Header=BB0_17 Depth=4
.Ltmp26:
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
.Ltmp27:
	jmp	.LBB0_50
.LBB0_42:                               #   in Loop: Header=BB0_17 Depth=4
.Ltmp19:
	jmp	.LBB0_44
.LBB0_43:                               #   in Loop: Header=BB0_17 Depth=4
.Ltmp33:
.LBB0_44:                               #   in Loop: Header=BB0_17 Depth=4
	movq	%rax, %rdi
	callq	__cxa_begin_catch
.Ltmp34:
	movl	$.L.str.9, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp35:
# %bb.45:                               #   in Loop: Header=BB0_17 Depth=4
.Ltmp39:
	callq	__cxa_end_catch
.Ltmp40:
	jmp	.LBB0_17
.LBB0_39:                               #   in Loop: Header=BB0_52 Depth=3
	movl	(%r15), %eax
	movl	%eax, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 8(%rbx)
.LBB0_50:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit67.thread
                                        #   in Loop: Header=BB0_52 Depth=3
.Ltmp28:
	callq	refresh
.Ltmp29:
# %bb.51:                               # %.thread
                                        #   in Loop: Header=BB0_52 Depth=3
	addq	$4, %r15
	jmp	.LBB0_52
.LBB0_53:                               # %_ZNSt6vectorIiSaIiEE9push_backERKi.exit.thread133
                                        #   in Loop: Header=BB0_12 Depth=2
.Ltmp42:
	movl	$.L.str.10, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp43:
.LBB0_54:                               # %.preheader160
                                        #   Parent Loop BB0_11 Depth=1
                                        #     Parent Loop BB0_12 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB0_55 Depth 4
                                        #         Child Loop BB0_62 Depth 4
	movq	(%rbx), %r15
.LBB0_55:                               # %.preheader160
                                        #   Parent Loop BB0_11 Depth=1
                                        #     Parent Loop BB0_12 Depth=2
                                        #       Parent Loop BB0_54 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	cmpq	8(%rbx), %r15
	je	.LBB0_56
# %bb.68:                               # %.lr.ph190
                                        #   in Loop: Header=BB0_55 Depth=4
	movl	(%r15), %edi
.Ltmp44:
	callq	_ZL17print_device_infoi
.Ltmp45:
# %bb.69:                               #   in Loop: Header=BB0_55 Depth=4
	addq	$4, %r15
	jmp	.LBB0_55
.LBB0_56:                               # %._crit_edge
                                        #   in Loop: Header=BB0_54 Depth=3
.Ltmp47:
	movl	$.L.str.11, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp48:
# %bb.57:                               #   in Loop: Header=BB0_54 Depth=3
	movq	stdscr(%rip), %rdi
.Ltmp50:
	callq	wgetch
.Ltmp51:
# %bb.58:                               #   in Loop: Header=BB0_54 Depth=3
	movq	16(%rsp), %rdx
.Ltmp52:
	movsbl	%al, %r8d
	movl	$1, %ecx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc
.Ltmp53:
# %bb.59:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEc.exit73
                                        #   in Loop: Header=BB0_54 Depth=3
.Ltmp54:
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp55:
# %bb.60:                               #   in Loop: Header=BB0_54 Depth=3
	movq	16(%rsp), %r15
	testq	%r15, %r15
	je	.LBB0_104
# %bb.61:                               # %.lr.ph.i75.preheader
                                        #   in Loop: Header=BB0_54 Depth=3
	movq	8(%rsp), %r12
	xorl	%r13d, %r13d
.LBB0_62:                               # %.lr.ph.i75
                                        #   Parent Loop BB0_11 Depth=1
                                        #     Parent Loop BB0_12 Depth=2
                                        #       Parent Loop BB0_54 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	movsbl	(%r12,%r13), %edi
	callq	toupper
	movb	%al, (%r12,%r13)
	incq	%r13
	cmpq	%r13, %r15
	jne	.LBB0_62
# %bb.63:                               # %_ZSt9transformIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES9_PDoFiiEET0_T_SD_SC_T1_.exit80
                                        #   in Loop: Header=BB0_54 Depth=3
	movq	16(%rsp), %r15
	cmpq	$3, %r15
	je	.LBB0_83
# %bb.64:                               # %_ZSt9transformIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES9_PDoFiiEET0_T_SD_SC_T1_.exit80
                                        #   in Loop: Header=BB0_54 Depth=3
	cmpq	$2, %r15
	je	.LBB0_80
# %bb.65:                               # %_ZSt9transformIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES9_PDoFiiEET0_T_SD_SC_T1_.exit80
                                        #   in Loop: Header=BB0_54 Depth=3
	cmpq	$1, %r15
	jne	.LBB0_104
# %bb.66:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit82
                                        #   in Loop: Header=BB0_54 Depth=3
	movq	8(%rsp), %r12
	cmpb	$89, (%r12)
	je	.LBB0_67
# %bb.75:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit86
                                        #   in Loop: Header=BB0_54 Depth=3
	movl	$.L.str.6, %esi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	bcmp@PLT
	testl	%eax, %eax
	je	.LBB0_81
# %bb.76:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit90
                                        #   in Loop: Header=BB0_54 Depth=3
	movl	$.L.str.8, %esi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	bcmp@PLT
	testl	%eax, %eax
	jne	.LBB0_104
# %bb.77:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit90.thread
                                        #   in Loop: Header=BB0_54 Depth=3
	movq	(%rbx), %rax
	cmpq	%rax, 8(%rbx)
	je	.LBB0_79
# %bb.78:                               #   in Loop: Header=BB0_54 Depth=3
	movq	%rax, 8(%rbx)
.LBB0_79:                               # %_ZNSt6vectorIiSaIiEE5clearEv.exit92
                                        #   in Loop: Header=BB0_54 Depth=3
.Ltmp56:
	callq	endwin
.Ltmp57:
	jmp	.LBB0_32
.LBB0_80:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit88
                                        #   in Loop: Header=BB0_54 Depth=3
	movq	8(%rsp), %rdi
	movl	$.L.str.7, %esi
	movq	%r15, %rdx
	callq	bcmp@PLT
	testl	%eax, %eax
	je	.LBB0_81
	jmp	.LBB0_104
.LBB0_83:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit84
                                        #   in Loop: Header=BB0_54 Depth=3
	movq	8(%rsp), %rdi
	movl	$.L.str.5, %esi
	movq	%r15, %rdx
	callq	bcmp@PLT
	movb	$1, %r15b
	testl	%eax, %eax
	je	.LBB0_84
.LBB0_104:                              # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit90.thread141
                                        #   in Loop: Header=BB0_54 Depth=3
	movl	$4, %edi
	callq	__cxa_allocate_exception
	movl	$0, (%rax)
.Ltmp68:
	movl	$_ZTIi, %esi
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	__cxa_throw
.Ltmp69:
	jmp	.LBB0_105
.LBB0_71:                               #   in Loop: Header=BB0_54 Depth=3
.Ltmp49:
	jmp	.LBB0_73
.LBB0_72:                               #   in Loop: Header=BB0_54 Depth=3
.Ltmp70:
.LBB0_73:                               #   in Loop: Header=BB0_54 Depth=3
	movq	%rax, %rdi
	callq	__cxa_begin_catch
.Ltmp71:
	movl	$.L.str.9, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp72:
# %bb.74:                               #   in Loop: Header=BB0_54 Depth=3
.Ltmp77:
	callq	__cxa_end_catch
.Ltmp78:
	jmp	.LBB0_54
.LBB0_81:                               #   in Loop: Header=BB0_12 Depth=2
	movq	40(%rsp), %rax                  # 8-byte Reload
	movl	%eax, %r15d
.LBB0_84:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit82.thread
                                        #   in Loop: Header=BB0_12 Depth=2
.Ltmp58:
	callq	refresh
.Ltmp59:
# %bb.85:                               # %.thread150
                                        #   in Loop: Header=BB0_12 Depth=2
	testb	$1, %r15b
	jne	.LBB0_88
# %bb.86:                               #   in Loop: Header=BB0_12 Depth=2
	movq	(%rbx), %rax
	movl	%r15d, %ecx
	movq	%rcx, 40(%rsp)                  # 8-byte Spill
	cmpq	%rax, 8(%rbx)
	jne	.LBB0_87
	jmp	.LBB0_12
.LBB0_67:                               #   in Loop: Header=BB0_12 Depth=2
	movb	$1, %r15b
	jmp	.LBB0_84
.LBB0_87:                               #   in Loop: Header=BB0_11 Depth=1
	movq	%rax, 8(%rbx)
	movl	%r15d, %eax
	jmp	.LBB0_11
.LBB0_2:
.Ltmp80:
	movl	$.L.str, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp81:
	jmp	.LBB0_3
.LBB0_88:                               # %.critedge
.Ltmp61:
	movl	$.L.str.12, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp62:
# %bb.89:
	movq	stdscr(%rip), %rdi
.Ltmp63:
	callq	wgetch
.Ltmp64:
# %bb.90:
.Ltmp65:
	callq	endwin
.Ltmp66:
.LBB0_32:                               # %.loopexit161
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_34
# %bb.33:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB0_34:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movq	48(%rsp), %rdi
.LBB0_35:                               # %.critedge59.critedge
	testq	%rdi, %rdi
	je	.LBB0_3
# %bb.36:
	callq	_ZdlPv
.LBB0_3:                                # %.critedge59
	movq	%rbx, %rax
	addq	$72, %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
.LBB0_103:                              # %.loopexit.unreachable
	.cfi_def_cfa_offset 128
.LBB0_105:                              # %.loopexit162.unreachable
.LBB0_91:                               # %.loopexit163
.Ltmp79:
	jmp	.LBB0_92
.LBB0_82:
.Ltmp73:
	movq	%rax, %r14
.Ltmp74:
	callq	__cxa_end_catch
.Ltmp75:
	jmp	.LBB0_93
.LBB0_40:                               # %.loopexit159
.Ltmp41:
	jmp	.LBB0_92
.LBB0_48:
.Ltmp36:
	movq	%rax, %r14
.Ltmp37:
	callq	__cxa_end_catch
.Ltmp38:
	jmp	.LBB0_93
.LBB0_102:
.Ltmp76:
	movq	%rax, %rdi
	callq	__clang_call_terminate
.LBB0_15:                               # %.loopexit.split-lp164.loopexit.split-lp
.Ltmp67:
	jmp	.LBB0_92
.LBB0_106:
.Ltmp10:
	jmp	.LBB0_98
.LBB0_14:                               # %.loopexit.split-lp164.loopexit
.Ltmp60:
	jmp	.LBB0_92
.LBB0_97:
.Ltmp82:
.LBB0_98:
	movq	%rax, %r14
	jmp	.LBB0_99
.LBB0_41:                               # %.loopexit.split-lp
.Ltmp30:
	jmp	.LBB0_92
.LBB0_70:
.Ltmp46:
.LBB0_92:                               # %.loopexit.split-lp164
	movq	%rax, %r14
.LBB0_93:                               # %.loopexit.split-lp164
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_95
# %bb.94:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i95
	callq	_ZdlPv
.LBB0_95:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit97
	movq	48(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB0_99
# %bb.96:
	callq	_ZdlPv
.LBB0_99:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	.LBB0_101
# %bb.100:
	callq	_ZdlPv
.LBB0_101:                              # %_ZNSt6vectorIiSaIiEED2Ev.exit110
	movq	%r14, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end0:
	.size	select_devices, .Lfunc_end0-select_devices
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table0:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	3                               # @TType Encoding = udata4
	.uleb128 .Lttbase0-.Lttbaseref0
.Lttbaseref0:
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 1 <<
	.uleb128 .Ltmp7-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp7
	.uleb128 .Ltmp82-.Lfunc_begin0          #     jumps to .Ltmp82
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp8-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp9-.Ltmp8                  #   Call between .Ltmp8 and .Ltmp9
	.uleb128 .Ltmp10-.Lfunc_begin0          #     jumps to .Ltmp10
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp11-.Lfunc_begin0          # >> Call Site 3 <<
	.uleb128 .Ltmp12-.Ltmp11                #   Call between .Ltmp11 and .Ltmp12
	.uleb128 .Ltmp67-.Lfunc_begin0          #     jumps to .Ltmp67
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp13-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp14-.Ltmp13                #   Call between .Ltmp13 and .Ltmp14
	.uleb128 .Ltmp60-.Lfunc_begin0          #     jumps to .Ltmp60
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp15-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp16-.Ltmp15                #   Call between .Ltmp15 and .Ltmp16
	.uleb128 .Ltmp30-.Lfunc_begin0          #     jumps to .Ltmp30
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp17-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp18-.Ltmp17                #   Call between .Ltmp17 and .Ltmp18
	.uleb128 .Ltmp19-.Lfunc_begin0          #     jumps to .Ltmp19
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp20-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp25-.Ltmp20                #   Call between .Ltmp20 and .Ltmp25
	.uleb128 .Ltmp33-.Lfunc_begin0          #     jumps to .Ltmp33
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp25-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Ltmp31-.Ltmp25                #   Call between .Ltmp25 and .Ltmp31
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp31-.Lfunc_begin0          # >> Call Site 9 <<
	.uleb128 .Ltmp27-.Ltmp31                #   Call between .Ltmp31 and .Ltmp27
	.uleb128 .Ltmp33-.Lfunc_begin0          #     jumps to .Ltmp33
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp27-.Lfunc_begin0          # >> Call Site 10 <<
	.uleb128 .Ltmp34-.Ltmp27                #   Call between .Ltmp27 and .Ltmp34
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp34-.Lfunc_begin0          # >> Call Site 11 <<
	.uleb128 .Ltmp35-.Ltmp34                #   Call between .Ltmp34 and .Ltmp35
	.uleb128 .Ltmp36-.Lfunc_begin0          #     jumps to .Ltmp36
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp39-.Lfunc_begin0          # >> Call Site 12 <<
	.uleb128 .Ltmp40-.Ltmp39                #   Call between .Ltmp39 and .Ltmp40
	.uleb128 .Ltmp41-.Lfunc_begin0          #     jumps to .Ltmp41
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp28-.Lfunc_begin0          # >> Call Site 13 <<
	.uleb128 .Ltmp29-.Ltmp28                #   Call between .Ltmp28 and .Ltmp29
	.uleb128 .Ltmp30-.Lfunc_begin0          #     jumps to .Ltmp30
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp42-.Lfunc_begin0          # >> Call Site 14 <<
	.uleb128 .Ltmp43-.Ltmp42                #   Call between .Ltmp42 and .Ltmp43
	.uleb128 .Ltmp60-.Lfunc_begin0          #     jumps to .Ltmp60
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp44-.Lfunc_begin0          # >> Call Site 15 <<
	.uleb128 .Ltmp45-.Ltmp44                #   Call between .Ltmp44 and .Ltmp45
	.uleb128 .Ltmp46-.Lfunc_begin0          #     jumps to .Ltmp46
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp47-.Lfunc_begin0          # >> Call Site 16 <<
	.uleb128 .Ltmp48-.Ltmp47                #   Call between .Ltmp47 and .Ltmp48
	.uleb128 .Ltmp49-.Lfunc_begin0          #     jumps to .Ltmp49
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp50-.Lfunc_begin0          # >> Call Site 17 <<
	.uleb128 .Ltmp57-.Ltmp50                #   Call between .Ltmp50 and .Ltmp57
	.uleb128 .Ltmp70-.Lfunc_begin0          #     jumps to .Ltmp70
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp57-.Lfunc_begin0          # >> Call Site 18 <<
	.uleb128 .Ltmp68-.Ltmp57                #   Call between .Ltmp57 and .Ltmp68
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp68-.Lfunc_begin0          # >> Call Site 19 <<
	.uleb128 .Ltmp69-.Ltmp68                #   Call between .Ltmp68 and .Ltmp69
	.uleb128 .Ltmp70-.Lfunc_begin0          #     jumps to .Ltmp70
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp69-.Lfunc_begin0          # >> Call Site 20 <<
	.uleb128 .Ltmp71-.Ltmp69                #   Call between .Ltmp69 and .Ltmp71
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp71-.Lfunc_begin0          # >> Call Site 21 <<
	.uleb128 .Ltmp72-.Ltmp71                #   Call between .Ltmp71 and .Ltmp72
	.uleb128 .Ltmp73-.Lfunc_begin0          #     jumps to .Ltmp73
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp77-.Lfunc_begin0          # >> Call Site 22 <<
	.uleb128 .Ltmp78-.Ltmp77                #   Call between .Ltmp77 and .Ltmp78
	.uleb128 .Ltmp79-.Lfunc_begin0          #     jumps to .Ltmp79
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp58-.Lfunc_begin0          # >> Call Site 23 <<
	.uleb128 .Ltmp59-.Ltmp58                #   Call between .Ltmp58 and .Ltmp59
	.uleb128 .Ltmp60-.Lfunc_begin0          #     jumps to .Ltmp60
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp80-.Lfunc_begin0          # >> Call Site 24 <<
	.uleb128 .Ltmp81-.Ltmp80                #   Call between .Ltmp80 and .Ltmp81
	.uleb128 .Ltmp82-.Lfunc_begin0          #     jumps to .Ltmp82
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp61-.Lfunc_begin0          # >> Call Site 25 <<
	.uleb128 .Ltmp66-.Ltmp61                #   Call between .Ltmp61 and .Ltmp66
	.uleb128 .Ltmp67-.Lfunc_begin0          #     jumps to .Ltmp67
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp74-.Lfunc_begin0          # >> Call Site 26 <<
	.uleb128 .Ltmp38-.Ltmp74                #   Call between .Ltmp74 and .Ltmp38
	.uleb128 .Ltmp76-.Lfunc_begin0          #     jumps to .Ltmp76
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp38-.Lfunc_begin0          # >> Call Site 27 <<
	.uleb128 .Lfunc_end0-.Ltmp38            #   Call between .Ltmp38 and .Lfunc_end0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.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
	.text
	.type	_ZL13print_devicesv,@function   # -- Begin function _ZL13print_devicesv
_ZL13print_devicesv:                    # @_ZL13print_devicesv
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$1488, %rsp                     # imm = 0x5D0
	.cfi_def_cfa_offset 1536
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdi, %rbx
	leaq	12(%rsp), %rdi
	callq	hipGetDeviceCount
	movq	stderr(%rip), %r14
	testl	%eax, %eax
	jne	.LBB1_1
# %bb.2:                                # %_ZL9gpuAssert10hipError_tPKcib.exit
	xorl	%edi, %edi
	callq	hipGetErrorString
	movl	$.L.str.20, %esi
	movl	$.L.str.13, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$39, %r8d
	xorl	%eax, %eax
	callq	fprintf
	movl	$.L.str.14, %edi
	xorl	%eax, %eax
	callq	printw
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	movq	$0, 16(%rbx)
	movl	$0, 8(%rsp)
	cmpl	$0, 12(%rsp)
	jle	.LBB1_32
# %bb.3:                                # %.lr.ph
	leaq	16(%rsp), %r14
	leaq	8(%rsp), %r15
	xorl	%esi, %esi
.LBB1_4:                                # =>This Inner Loop Header: Depth=1
.Ltmp83:
	movq	%r14, %rdi
	callq	hipGetDevicePropertiesR0600
.Ltmp84:
# %bb.5:                                #   in Loop: Header=BB1_4 Depth=1
	movl	%eax, %ebp
	movq	stderr(%rip), %r12
	testl	%eax, %eax
	jne	.LBB1_6
# %bb.10:                               #   in Loop: Header=BB1_4 Depth=1
.Ltmp92:
	xorl	%edi, %edi
	callq	hipGetErrorString
.Ltmp93:
# %bb.11:                               #   in Loop: Header=BB1_4 Depth=1
	movl	$.L.str.20, %esi
	movl	$.L.str.13, %ecx
	movq	%r12, %rdi
	movq	%rax, %rdx
	movl	$45, %r8d
	xorl	%eax, %eax
	callq	fprintf
	movl	376(%rsp), %eax
	cmpl	$4, %eax
	jl	.LBB1_21
# %bb.12:                               #   in Loop: Header=BB1_4 Depth=1
	movq	8(%rbx), %rax
	cmpq	16(%rbx), %rax
	je	.LBB1_14
# %bb.13:                               #   in Loop: Header=BB1_4 Depth=1
	movl	8(%rsp), %esi
	movl	%esi, (%rax)
	addq	$4, %rax
	movq	%rax, 8(%rbx)
	jmp	.LBB1_16
.LBB1_21:                               #   in Loop: Header=BB1_4 Depth=1
	cmpl	$3, %eax
	jne	.LBB1_29
# %bb.22:                               #   in Loop: Header=BB1_4 Depth=1
	cmpl	$5, 380(%rsp)
	jl	.LBB1_29
# %bb.23:                               #   in Loop: Header=BB1_4 Depth=1
	movl	8(%rsp), %esi
.Ltmp94:
	movl	$.L.str.18, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp95:
# %bb.24:                               #   in Loop: Header=BB1_4 Depth=1
.Ltmp96:
	movl	$.L.str.19, %edi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	printw
.Ltmp97:
# %bb.25:                               #   in Loop: Header=BB1_4 Depth=1
	movl	376(%rsp), %esi
	movl	380(%rsp), %edx
.Ltmp98:
	movl	$.L.str.17, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp99:
# %bb.26:                               #   in Loop: Header=BB1_4 Depth=1
	movq	8(%rbx), %rsi
	cmpq	16(%rbx), %rsi
	je	.LBB1_28
# %bb.27:                               #   in Loop: Header=BB1_4 Depth=1
	movl	8(%rsp), %eax
	movl	%eax, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 8(%rbx)
	jmp	.LBB1_29
.LBB1_14:                               #   in Loop: Header=BB1_4 Depth=1
.Ltmp102:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movq	%r15, %rdx
	callq	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
.Ltmp103:
# %bb.15:                               # %._ZNSt6vectorIiSaIiEE9push_backERKi.exit_crit_edge
                                        #   in Loop: Header=BB1_4 Depth=1
	movl	8(%rsp), %esi
.LBB1_16:                               # %_ZNSt6vectorIiSaIiEE9push_backERKi.exit
                                        #   in Loop: Header=BB1_4 Depth=1
.Ltmp104:
	movl	$.L.str.15, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp105:
# %bb.17:                               #   in Loop: Header=BB1_4 Depth=1
.Ltmp106:
	movl	$.L.str.16, %edi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	printw
.Ltmp107:
# %bb.18:                               #   in Loop: Header=BB1_4 Depth=1
	movl	376(%rsp), %esi
	movl	380(%rsp), %edx
.Ltmp108:
	movl	$.L.str.17, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp109:
.LBB1_29:                               # %_ZNSt6vectorIiSaIiEE9push_backERKi.exit17
                                        #   in Loop: Header=BB1_4 Depth=1
.Ltmp110:
	movl	$.L.str.12, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp111:
# %bb.30:                               #   in Loop: Header=BB1_4 Depth=1
	movq	stdscr(%rip), %rdi
.Ltmp112:
	callq	wgetch
.Ltmp113:
# %bb.31:                               #   in Loop: Header=BB1_4 Depth=1
	movl	8(%rsp), %esi
	incl	%esi
	movl	%esi, 8(%rsp)
	cmpl	12(%rsp), %esi
	jl	.LBB1_4
	jmp	.LBB1_32
.LBB1_28:                               #   in Loop: Header=BB1_4 Depth=1
.Ltmp100:
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
.Ltmp101:
	jmp	.LBB1_29
.LBB1_32:                               # %._crit_edge
.Ltmp115:
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp116:
# %bb.33:
	movq	%rbx, %rax
	addq	$1488, %rsp                     # imm = 0x5D0
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.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
.LBB1_6:
	.cfi_def_cfa_offset 1536
.Ltmp85:
	movl	%ebp, %edi
	callq	hipGetErrorString
.Ltmp86:
# %bb.7:                                # %.noexc
	movl	$.L.str.20, %esi
	movl	$.L.str.13, %ecx
	movq	%r12, %rdi
	movq	%rax, %rdx
	movl	$45, %r8d
	xorl	%eax, %eax
	callq	fprintf
	movq	stdout(%rip), %r14
.Ltmp87:
	movl	%ebp, %edi
	callq	hipGetErrorString
.Ltmp88:
# %bb.8:                                # %.noexc9
	movl	$.L.str.20, %esi
	movl	$.L.str.13, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$45, %r8d
	xorl	%eax, %eax
	callq	fprintf
.Ltmp89:
	callq	endwin
.Ltmp90:
.LBB1_9:                                # %.noexc10
	movl	%ebp, %edi
	callq	exit
.LBB1_1:
	movl	%eax, %ebp
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.20, %esi
	movl	$.L.str.13, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$39, %r8d
	xorl	%eax, %eax
	callq	fprintf
	movq	stdout(%rip), %rbx
	movl	%ebp, %edi
	callq	hipGetErrorString
	movl	$.L.str.20, %esi
	movl	$.L.str.13, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$39, %r8d
	xorl	%eax, %eax
	callq	fprintf
	callq	endwin
	jmp	.LBB1_9
.LBB1_34:
.Ltmp117:
	jmp	.LBB1_35
.LBB1_19:                               # %.loopexit
.Ltmp114:
	jmp	.LBB1_35
.LBB1_20:                               # %.loopexit.split-lp
.Ltmp91:
.LBB1_35:
	movq	%rax, %r14
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	.LBB1_37
# %bb.36:
	callq	_ZdlPv
.LBB1_37:                               # %_ZNSt6vectorIiSaIiEED2Ev.exit
	movq	%r14, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end1:
	.size	_ZL13print_devicesv, .Lfunc_end1-_ZL13print_devicesv
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table1:
.Lexception1:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end1-.Lcst_begin1
.Lcst_begin1:
	.uleb128 .Lfunc_begin1-.Lfunc_begin1    # >> Call Site 1 <<
	.uleb128 .Ltmp83-.Lfunc_begin1          #   Call between .Lfunc_begin1 and .Ltmp83
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp83-.Lfunc_begin1          # >> Call Site 2 <<
	.uleb128 .Ltmp101-.Ltmp83               #   Call between .Ltmp83 and .Ltmp101
	.uleb128 .Ltmp114-.Lfunc_begin1         #     jumps to .Ltmp114
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp115-.Lfunc_begin1         # >> Call Site 3 <<
	.uleb128 .Ltmp116-.Ltmp115              #   Call between .Ltmp115 and .Ltmp116
	.uleb128 .Ltmp117-.Lfunc_begin1         #     jumps to .Ltmp117
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp85-.Lfunc_begin1          # >> Call Site 4 <<
	.uleb128 .Ltmp90-.Ltmp85                #   Call between .Ltmp85 and .Ltmp90
	.uleb128 .Ltmp91-.Lfunc_begin1          #     jumps to .Ltmp91
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp90-.Lfunc_begin1          # >> Call Site 5 <<
	.uleb128 .Lfunc_end1-.Ltmp90            #   Call between .Ltmp90 and .Lfunc_end1
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.type	_ZL17print_device_infoi,@function # -- Begin function _ZL17print_device_infoi
_ZL17print_device_infoi:                # @_ZL17print_device_infoi
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$1472, %rsp                     # imm = 0x5C0
	.cfi_def_cfa_offset 1504
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %rbp, -16
	movl	%edi, %ebp
	movq	%rsp, %rdi
	movl	%ebp, %esi
	callq	hipGetDevicePropertiesR0600
	movq	stderr(%rip), %r14
	testl	%eax, %eax
	jne	.LBB2_2
# %bb.1:                                # %_ZL9gpuAssert10hipError_tPKcib.exit
	xorl	%edi, %edi
	callq	hipGetErrorString
	movl	$.L.str.20, %esi
	movl	$.L.str.13, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$29, %r8d
	xorl	%eax, %eax
	callq	fprintf
	movl	$.L.str.15, %edi
	movl	%ebp, %esi
	xorl	%eax, %eax
	callq	printw
	movq	%rsp, %rbx
	movl	$.L.str.16, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	printw
	movl	360(%rbx), %esi
	movl	364(%rbx), %edx
	movl	$.L.str.21, %edi
	xorl	%eax, %eax
	callq	printw
	movq	288(%rbx), %rsi
	movl	$.L.str.22, %edi
	xorl	%eax, %eax
	callq	printw
	movl	348(%rbx), %esi
	movl	$.L.str.23, %edi
	xorl	%eax, %eax
	callq	printw
	addq	$1472, %rsp                     # imm = 0x5C0
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB2_2:
	.cfi_def_cfa_offset 1504
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.20, %esi
	movl	$.L.str.13, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$29, %r8d
	xorl	%eax, %eax
	callq	fprintf
	movq	stdout(%rip), %r14
	movl	%ebx, %edi
	callq	hipGetErrorString
	movl	$.L.str.20, %esi
	movl	$.L.str.13, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$29, %r8d
	xorl	%eax, %eax
	callq	fprintf
	callq	endwin
	movl	%ebx, %edi
	callq	exit
.Lfunc_end2:
	.size	_ZL17print_device_infoi, .Lfunc_end2-_ZL17print_device_infoi
	.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_end3:
	.size	__clang_call_terminate, .Lfunc_end3-__clang_call_terminate
	.cfi_endproc
                                        # -- End function
	.text
	.globl	select_all_devices              # -- Begin function select_all_devices
	.type	select_all_devices,@function
select_all_devices:                     # @select_all_devices
.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
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
	callq	raw
	movq	stdscr(%rip), %rdi
	movl	$1, %esi
	callq	keypad
	callq	noecho
	callq	initscr
	testq	%rax, %rax
	je	.LBB4_1
# %bb.2:                                # %_ZNSt6vectorIiSaIiEED2Ev.exit
	leaq	8(%rsp), %r15
	movq	%r15, %rdi
	callq	_ZL13print_devicesv
	movq	(%r15), %r14
	movq	%r14, (%rbx)
	movq	8(%r15), %rax
	movq	%rax, 8(%rbx)
	movq	16(%r15), %rax
	movq	%rax, 16(%rbx)
.Ltmp118:
	movl	$.L.str.12, %edi
	xorl	%eax, %eax
	callq	printw
.Ltmp119:
# %bb.3:
	movq	stdscr(%rip), %rdi
.Ltmp120:
	callq	wgetch
.Ltmp121:
# %bb.4:
.Ltmp122:
	callq	endwin
.Ltmp123:
	jmp	.LBB4_5
.LBB4_1:
	movl	$.L.str, %edi
	xorl	%eax, %eax
	callq	printw
.LBB4_5:
	movq	%rbx, %rax
	addq	$32, %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
.LBB4_6:
	.cfi_def_cfa_offset 64
.Ltmp124:
	movq	%rax, %rbx
	testq	%r14, %r14
	je	.LBB4_8
# %bb.7:
	movq	%r14, %rdi
	callq	_ZdlPv
.LBB4_8:                                # %_ZNSt6vectorIiSaIiEED2Ev.exit6
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end4:
	.size	select_all_devices, .Lfunc_end4-select_all_devices
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table4:
.Lexception2:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end2-.Lcst_begin2
.Lcst_begin2:
	.uleb128 .Lfunc_begin2-.Lfunc_begin2    # >> Call Site 1 <<
	.uleb128 .Ltmp118-.Lfunc_begin2         #   Call between .Lfunc_begin2 and .Ltmp118
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp118-.Lfunc_begin2         # >> Call Site 2 <<
	.uleb128 .Ltmp123-.Ltmp118              #   Call between .Ltmp118 and .Ltmp123
	.uleb128 .Ltmp124-.Lfunc_begin2         #     jumps to .Ltmp124
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp123-.Lfunc_begin2         # >> Call Site 3 <<
	.uleb128 .Lfunc_end4-.Ltmp123           #   Call between .Ltmp123 and .Lfunc_end4
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end2:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,comdat
	.weak	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_ # -- Begin function _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,@function
_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_: # @_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.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
	movq	%rdx, (%rsp)                    # 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	$1, %esi
	movl	$.L.str.24, %edx
	callq	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	movq	(%rbx), %r13
	movq	8(%rbx), %r15
	movq	%r12, 8(%rsp)                   # 8-byte Spill
	subq	%r13, %r12
	movq	%r12, %r14
	sarq	$2, %r14
	testq	%rax, %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	je	.LBB5_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIiE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB5_3
.LBB5_1:
	xorl	%ebp, %ebp
.LBB5_3:                                # %_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.exit
	movq	(%rsp), %rax                    # 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, (%rbp,%r14,4)
	testq	%r12, %r12
	jle	.LBB5_5
# %bb.4:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB5_5:                                # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit
	addq	%rbp, %r12
	addq	$4, %r12
	movq	8(%rsp), %rsi                   # 8-byte Reload
	subq	%rsi, %r15
	testq	%r15, %r15
	jle	.LBB5_7
# %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB5_7:                                # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit16
	testq	%r13, %r13
	je	.LBB5_9
# %bb.8:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB5_9:                                # %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit
	addq	%r15, %r12
	movq	%rbp, (%rbx)
	movq	%r12, 8(%rbx)
	movq	16(%rsp), %rax                  # 8-byte Reload
	leaq	(,%rax,4), %rax
	addq	%rbp, %rax
	movq	%rax, 16(%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
.Lfunc_end5:
	.size	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, .Lfunc_end5-_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,@function
_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc: # @_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$2305843009213693951, %rcx      # imm = 0x1FFFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$2, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB6_2
# %bb.1:
	cmpq	%rsi, %r8
	cmovaq	%r8, %rsi
	leaq	(%rsi,%r8), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%r8, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB6_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end6:
	.size	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc, .Lfunc_end6-_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorIiE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorIiE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorIiE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorIiE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorIiE8allocateEmPKv,@function
_ZNSt15__new_allocatorIiE8allocateEmPKv: # @_ZNSt15__new_allocatorIiE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$61, %rax
	jne	.LBB7_1
# %bb.3:
	shlq	$2, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB7_1:
	.cfi_def_cfa_offset 16
	shrq	$62, %rsi
	je	.LBB7_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB7_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end7:
	.size	_ZNSt15__new_allocatorIiE8allocateEmPKv, .Lfunc_end7-_ZNSt15__new_allocatorIiE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Failed to initialize select screen\n"
	.size	.L.str, 36

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"\n"
	.size	.L.str.1, 2

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Select devices:\n"
	.size	.L.str.2, 17

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"y/n?\n"
	.size	.L.str.3, 6

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

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

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

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"E"
	.size	.L.str.8, 2

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"Error in selection\n"
	.size	.L.str.9, 20

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"Devices selected:\n"
	.size	.L.str.10, 19

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"Is this right (y/n)? \n"
	.size	.L.str.11, 23

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"Hit enter to continue\n"
	.size	.L.str.12, 23

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"/home/ubuntu/Datasets/stackv2/train-structured-repos-hip-sm89/syumprc/solar-eclipse/master/libcuda_fphi/cudafphi_device_functions.hip"
	.size	.L.str.13, 134

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"CUDA Capable Devices with architecture greater than equal to 3.5\n\n"
	.size	.L.str.14, 67

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	" Device ID: %d\n"
	.size	.L.str.15, 16

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	" Device name: %s\n"
	.size	.L.str.16, 18

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	" Device architecture: %i.%i\n"
	.size	.L.str.17, 29

	.type	.L.str.18,@object               # @.str.18
.L.str.18:
	.asciz	" Device ID: %i\n"
	.size	.L.str.18, 16

	.type	.L.str.19,@object               # @.str.19
.L.str.19:
	.asciz	" Device name: %i\n"
	.size	.L.str.19, 18

	.type	.L.str.20,@object               # @.str.20
.L.str.20:
	.asciz	"GPUassert: %s %s %d\n"
	.size	.L.str.20, 21

	.type	.L.str.21,@object               # @.str.21
.L.str.21:
	.asciz	" Device architecture: %u.%u\n"
	.size	.L.str.21, 29

	.type	.L.str.22,@object               # @.str.22
.L.str.22:
	.asciz	" Device global memory: %u\n"
	.size	.L.str.22, 27

	.type	.L.str.23,@object               # @.str.23
.L.str.23:
	.asciz	" Device clockrate: %u\n"
	.size	.L.str.23, 23

	.type	.L.str.24,@object               # @.str.24
.L.str.24:
	.asciz	"vector::_M_realloc_insert"
	.size	.L.str.24, 26

	.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 __gxx_personality_v0
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _ZTIi
	.addrsig_sym __hip_cuid_

	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
