	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pnpbios_set_resources
_pnpbios_set_resources:                 ## @pnpbios_set_resources
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %eax
	movl	%eax, -36(%rbp)
	callq	_pnpbios_is_dynamic
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pnp_dbg
	movq	_node_info@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movq	%rax, %r15
	movq	_PNPMODE_DYNAMIC@GOTPCREL(%rip), %r12
	movsbl	(%r12), %esi
	leaq	-36(%rbp), %rdi
	movq	%rax, %rdx
	callq	_pnp_bios_get_dev_node
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_kfree
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_pnpbios_write_resources_to_node
	testq	%rax, %rax
	js	LBB0_7
## %bb.8:
	movl	(%r15), %edi
	movsbl	(%r12), %esi
	movq	%r15, %rdx
	callq	_pnp_bios_set_dev_node
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_kfree
	testl	%ebx, %ebx
	movl	$-1, %r14d
	cmovlel	%ebx, %r14d
	jmp	LBB0_9
LBB0_7:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set resources\n"

	.comm	_node_info,4,2                  ## @node_info
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_PNPMODE_DYNAMIC,8,3            ## @PNPMODE_DYNAMIC
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_pnpbios_set_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pnpbios_set_resources
_pnpbios_set_resources:                 ; @pnpbios_set_resources
	.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	x19, x0
	ldr	w8, [x0, #4]
	str	w8, [sp, #12]
	bl	_pnpbios_is_dynamic
	cbz	w0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pnp_dbg
Lloh2:
	adrp	x8, _node_info@GOTPAGE
Lloh3:
	ldr	x8, [x8, _node_info@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.2:
	mov	x20, x0
Lloh8:
	adrp	x21, _PNPMODE_DYNAMIC@GOTPAGE
Lloh9:
	ldr	x21, [x21, _PNPMODE_DYNAMIC@GOTPAGEOFF]
	ldrsb	w1, [x21]
	add	x0, sp, #12
	mov	x2, x20
	bl	_pnp_bios_get_dev_node
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_kfree
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _EPERM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_pnpbios_write_resources_to_node
	tbnz	x0, #63, LBB0_8
; %bb.7:
	ldr	w0, [x20]
	ldrsb	w1, [x21]
	mov	x2, x20
	bl	_pnp_bios_set_dev_node
	mov	x19, x0
	mov	x0, x20
	bl	_kfree
	cmp	w19, #0
	csinv	w0, w19, wzr, le
	b	LBB0_10
LBB0_8:
	mov	x0, x20
	bl	_kfree
LBB0_9:
	mov	w0, #-1
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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set resources\n"

	.comm	_node_info,4,2                  ; @node_info
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_PNPMODE_DYNAMIC,8,3            ; @PNPMODE_DYNAMIC
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_pnpbios_set_resources
.subsections_via_symbols
