	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hm_get_adapter_index_nvml
_hm_get_adapter_index_nvml:             ## @hm_get_adapter_index_nvml
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	$0, -28(%rbp)
	leaq	-28(%rbp), %rsi
	callq	_hm_NVML_nvmlDeviceGetCount
	cmpl	$0, -28(%rbp)
	je	LBB0_2
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_hm_NVML_nvmlDeviceGetHandleByIndex
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movl	-28(%rbp), %eax
	addq	$4, %r15
	cmpq	%rax, %rbx
	jb	LBB0_4
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_event_log_error
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_5:
	movl	-28(%rbp), %eax
LBB0_6:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No NVML adapters found."

	.no_dead_strip	_hm_get_adapter_index_nvml
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hm_get_adapter_index_nvml
_hm_get_adapter_index_nvml:             ; @hm_get_adapter_index_nvml
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	str	wzr, [sp, #12]
	add	x1, sp, #12
	bl	_hm_NVML_nvmlDeviceGetCount
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_hm_NVML_nvmlDeviceGetHandleByIndex
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #1
	ldr	w0, [sp, #12]
	add	x20, x20, #4
	cmp	x21, x0
	b.lo	LBB0_2
	b	LBB0_6
LBB0_4:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_event_log_error
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	w0, [sp, #12]
LBB0_6:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No NVML adapters found."

	.no_dead_strip	_hm_get_adapter_index_nvml
.subsections_via_symbols
