	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gk104_volt_new                 ## -- Begin function gk104_volt_new
	.p2align	4, 0x90
_gk104_volt_new:                        ## @gk104_volt_new
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r12
	movl	4(%rdi), %edi
	leaq	-88(%rbp), %rsi
	leaq	-84(%rbp), %rdx
	leaq	-80(%rbp), %rcx
	leaq	-76(%rbp), %r8
	leaq	-56(%rbp), %r9
	callq	_nvbios_volt_parse
	testl	%eax, %eax
	je	LBB0_12
## %bb.1:
	movl	(%r12), %edi
	movq	_DCB_GPIO_VID_PWM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-72(%rbp), %r8
	xorl	%esi, %esi
	movl	$255, %ecx
	callq	_nvkm_gpio_find
	movq	_gk104_volt_gpio@GOTPCREL(%rip), %r13
	cmpq	_gk104_volt_pwm@GOTPCREL(%rip), %r13
	setne	%r14b
	movb	$1, %dl
	testl	%eax, %eax
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	jne	LBB0_4
## %bb.2:
	movq	-56(%rbp), %rax
	movq	_gk104_volt_gpio@GOTPCREL(%rip), %r13
	cmpq	_gk104_volt_pwm@GOTPCREL(%rip), %r13
	movq	_NVBIOS_VOLT_PWM@GOTPCREL(%rip), %rcx
	setne	%r14b
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_gk104_volt_pwm@GOTPCREL(%rip), %r13
	cmpq	_gk104_volt_gpio@GOTPCREL(%rip), %r13
	sete	%dl
	xorl	%r14d, %r14d
LBB0_4:
	movl	%edx, %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rbx
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rcx
	callq	_nvkm_volt_ctor
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	movq	-56(%rbp), %rax
	movq	%rax, 8(%rbx)
	movq	_NVBIOS_VOLT_PWM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%al
	notb	%r14b
	orb	%al, %r14b
	testb	$1, %r14b
	jne	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_nvkm_error
LBB0_8:
	testb	$1, %r15b
	je	LBB0_9
## %bb.10:
	movq	%rbx, %rdi
	callq	_nvkm_voltgpio_init
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_11
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_9:
	leaq	L_.str.2(%rip), %rdx
LBB0_11:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_nvkm_debug
LBB0_12:
	xorl	%eax, %eax
LBB0_13:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gk104_volt_gpio,4,2            ## @gk104_volt_gpio
	.comm	_DCB_GPIO_VID_PWM,4,2           ## @DCB_GPIO_VID_PWM
	.comm	_NVBIOS_VOLT_PWM,8,3            ## @NVBIOS_VOLT_PWM
	.comm	_gk104_volt_pwm,4,2             ## @gk104_volt_pwm
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Type mismatch between the voltage table type and the GPIO table. Fallback to GPIO mode.\n"

L_.str.1:                               ## @.str.1
	.asciz	"GPIO"

L_.str.2:                               ## @.str.2
	.asciz	"PWM"

L_.str.3:                               ## @.str.3
	.asciz	"Using %s mode\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gk104_volt_new                 ; -- Begin function gk104_volt_new
	.p2align	2
_gk104_volt_new:                        ; @gk104_volt_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x0, #4]
	add	x1, sp, #12
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x4, sp
	add	x5, sp, #16
	bl	_nvbios_volt_parse
	cbz	w0, LBB0_12
; %bb.1:
	ldr	w0, [x21]
Lloh0:
	adrp	x8, _DCB_GPIO_VID_PWM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DCB_GPIO_VID_PWM@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x4, sp, #24
	mov	w1, #0
	mov	w3, #255
	bl	_nvkm_gpio_find
Lloh3:
	adrp	x8, _gk104_volt_pwm@GOTPAGE
Lloh4:
	ldr	x8, [x8, _gk104_volt_pwm@GOTPAGEOFF]
Lloh5:
	adrp	x22, _gk104_volt_gpio@GOTPAGE
Lloh6:
	ldr	x22, [x22, _gk104_volt_gpio@GOTPAGEOFF]
	cmp	x22, x8
	cset	w26, ne
Lloh7:
	adrp	x24, _NVBIOS_VOLT_PWM@GOTPAGE
Lloh8:
	ldr	x24, [x24, _NVBIOS_VOLT_PWM@GOTPAGEOFF]
	cbz	w0, LBB0_3
; %bb.2:
	mov	w25, #1
	b	LBB0_4
LBB0_3:
	ldr	x9, [sp, #16]
	ldr	x10, [x24]
	cmp	x22, x8
	cset	w11, ne
	mov	w12, #1
	cmp	x8, x22
	cset	w13, eq
	cmp	x9, x10
	csel	x22, x22, x8, ne
	csel	w26, w11, wzr, ne
	csel	w25, w12, w13, ne
LBB0_4:
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.5:
	mov	x23, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x23
	bl	_nvkm_volt_ctor
	str	x23, [x19]
	ldr	x8, [sp, #16]
	str	x8, [x23, #8]
	ldr	x9, [x24]
	cmp	x8, x9
	cset	w8, ne
	orn	w8, w8, w26
	tbnz	w8, #0, LBB0_7
; %bb.6:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_nvkm_error
LBB0_7:
	tbz	w25, #0, LBB0_10
; %bb.8:
	mov	x0, x23
	bl	_nvkm_voltgpio_init
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_9:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_10:
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_11:
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x23
	bl	_nvkm_debug
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_gk104_volt_gpio,4,2            ; @gk104_volt_gpio
	.comm	_DCB_GPIO_VID_PWM,4,2           ; @DCB_GPIO_VID_PWM
	.comm	_NVBIOS_VOLT_PWM,8,3            ; @NVBIOS_VOLT_PWM
	.comm	_gk104_volt_pwm,4,2             ; @gk104_volt_pwm
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Type mismatch between the voltage table type and the GPIO table. Fallback to GPIO mode.\n"

l_.str.1:                               ; @.str.1
	.asciz	"GPIO"

l_.str.2:                               ; @.str.2
	.asciz	"PWM"

l_.str.3:                               ; @.str.3
	.asciz	"Using %s mode\n"

.subsections_via_symbols
