	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvbios_power_budget_header     ## -- Begin function nvbios_power_budget_header
	.p2align	4, 0x90
_nvbios_power_budget_header:            ## @nvbios_power_budget_header
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.4:
	movq	%rdi, %rbx
	leaq	-32(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	leaq	-28(%rbp), %rcx
	leaq	-36(%rbp), %r8
	callq	_nvbios_power_budget_table
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	-28(%rbp), %ecx
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movl	-32(%rbp), %edx
	cmpl	$32, %edx
	je	LBB0_8
## %bb.9:
	movl	$255, %eax
	cmpl	$48, %edx
	jne	LBB0_14
## %bb.10:
	movl	$10, %esi
	jmp	LBB0_11
LBB0_6:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_8:
	movl	$9, %esi
LBB0_11:
	addq	%r15, %rsi
	movq	%rbx, %rdi
	callq	_nvbios_rd08
	movl	-28(%rbp), %ecx
	cmpl	$255, %eax
	je	LBB0_13
## %bb.12:
	cmpl	%ecx, %eax
	jl	LBB0_13
## %bb.16:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_nvkm_warn
	movl	$255, (%r14)
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	-32(%rbp), %edx
LBB0_14:
	movq	%r15, 24(%r14)
	movl	%edx, 4(%r14)
	movl	-40(%rbp), %edx
	movl	%edx, 8(%r14)
	movl	-36(%rbp), %edx
	movl	%edx, 12(%r14)
	movl	%ecx, 16(%r14)
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid cap_entry in power budget table found\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvbios_power_budget_header     ; -- Begin function nvbios_power_budget_header
	.p2align	2
_nvbios_power_budget_header:            ; @nvbios_power_budget_header
	.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
	cbz	x0, LBB0_12
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_12
; %bb.2:
	mov	x20, x0
	add	x1, sp, #12
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x4, sp
	bl	_nvbios_power_budget_table
	cbz	x0, LBB0_7
; %bb.3:
	ldr	w9, [sp, #4]
	cbz	w9, LBB0_7
; %bb.4:
	mov	x21, x0
	ldr	w10, [sp, #12]
	cmp	w10, #32
	b.eq	LBB0_8
; %bb.5:
	cmp	w10, #48
	b.ne	LBB0_15
; %bb.6:
	mov	w8, #10
	b	LBB0_9
LBB0_7:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_13
LBB0_8:
	mov	w8, #9
LBB0_9:
	add	x1, x21, x8
	mov	x0, x20
	bl	_nvbios_rd08
	ldr	w9, [sp, #4]
	cmp	w0, #255
	b.eq	LBB0_16
; %bb.10:
	cmp	w0, w9
	b.lt	LBB0_16
; %bb.11:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_nvkm_warn
	mov	w8, #255
	str	w8, [x19]
LBB0_12:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_14:
	mov	x0, x8
	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
LBB0_15:
	mov	w0, #255
	b	LBB0_17
LBB0_16:
	ldr	w10, [sp, #12]
LBB0_17:
	mov	w8, #0
	str	x21, [x19, #24]
	ldr	w11, [sp, #8]
	ldr	w12, [sp]
	stp	w11, w12, [x19, #8]
	str	w9, [x19, #16]
	stp	w0, w10, [x19]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid cap_entry in power budget table found\n"

.subsections_via_symbols
