	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_gpio_init
_nvkm_gpio_init:                        ## @nvkm_gpio_init
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_nvkm_gpio
	movq	%rax, %r12
	movq	_gpio_reset_ids@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_dmi_check_system
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_DCB_GPIO_UNUSED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_nvkm_gpio_reset
LBB0_2:
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	$1, %edx
	callq	_nvkm_boolopt
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	_power_checks@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_10
## %bb.4:
	xorl	%ebx, %ebx
	movq	_DCB_GPIO_UNUSED@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %r14
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	(%rax,%rbx,4), %edx
	movl	(%r13), %ecx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%r14, %r8
	callq	_nvkm_gpio_find
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-48(%rbp), %ecx
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_nvkm_gpio_get
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_nvkm_error
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_10
LBB0_9:
	xorl	%r14d, %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gpio_reset_ids,4,2             ## @gpio_reset_ids
	.comm	_DCB_GPIO_UNUSED,4,2            ## @DCB_GPIO_UNUSED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NvPowerChecks"

	.comm	_power_checks,8,3               ## @power_checks
L_.str.1:                               ## @.str.1
	.asciz	"GPU is missing power, check its power cables.  Boot with nouveau.config=NvPowerChecks=0 to disable.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nvkm_gpio_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_gpio_init
_nvkm_gpio_init:                        ; @nvkm_gpio_init
	.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, x0
	bl	_nvkm_gpio
	mov	x19, x0
Lloh0:
	adrp	x8, _gpio_reset_ids@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gpio_reset_ids@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_dmi_check_system
Lloh3:
	adrp	x21, _DCB_GPIO_UNUSED@GOTPAGE
Lloh4:
	ldr	x21, [x21, _DCB_GPIO_UNUSED@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_nvkm_gpio_reset
LBB0_2:
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #1
	bl	_nvkm_boolopt
	cbz	x0, LBB0_10
; %bb.3:
Lloh7:
	adrp	x20, _power_checks@GOTPAGE
Lloh8:
	ldr	x20, [x20, _power_checks@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.4:
	mov	x22, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.ge	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	w2, [x8, x22, lsl #2]
	ldr	w3, [x21]
	add	x4, sp, #8
	mov	x0, x19
	mov	w1, #0
	bl	_nvkm_gpio_find
	cbnz	w0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldp	w3, w2, [sp, #8]
	mov	x0, x19
	mov	w1, #0
	bl	_nvkm_gpio_get
	cbz	w0, LBB0_5
; %bb.8:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_nvkm_error
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_gpio_reset_ids,4,2             ; @gpio_reset_ids
	.comm	_DCB_GPIO_UNUSED,4,2            ; @DCB_GPIO_UNUSED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NvPowerChecks"

	.comm	_power_checks,8,3               ; @power_checks
l_.str.1:                               ; @.str.1
	.asciz	"GPU is missing power, check its power cables.  Boot with nouveau.config=NvPowerChecks=0 to disable.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nvkm_gpio_init
.subsections_via_symbols
