	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___pnp_add_device               ## -- Begin function __pnp_add_device
	.p2align	4, 0x90
___pnp_add_device:                      ## @__pnp_add_device
	.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	%rdi, %rbx
	callq	_pnp_fixup_device
	movq	_PNP_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_pnp_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	16(%rbx), %rdi
	movq	_pnp_global@GOTPCREL(%rip), %rsi
	callq	_list_add_tail
	leaq	12(%rbx), %rdi
	movq	(%rbx), %rsi
	addq	$8, %rsi
	callq	_list_add_tail
	movq	%r14, %rdi
	callq	_mutex_unlock
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_device_register
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_pnp_delist_device
	jmp	LBB0_4
LBB0_2:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	*%rax
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_device_set_wakeup_capable
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNP_READY,4,2                  ## @PNP_READY
	.comm	_pnp_lock,4,2                   ## @pnp_lock
	.comm	_pnp_global,4,2                 ## @pnp_global
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___pnp_add_device               ; -- Begin function __pnp_add_device
	.p2align	2
___pnp_add_device:                      ; @__pnp_add_device
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_pnp_fixup_device
Lloh0:
	adrp	x8, _PNP_READY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PNP_READY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #20]
Lloh3:
	adrp	x20, _pnp_lock@GOTPAGE
Lloh4:
	ldr	x20, [x20, _pnp_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
	add	x0, x19, #16
Lloh5:
	adrp	x1, _pnp_global@GOTPAGE
Lloh6:
	ldr	x1, [x1, _pnp_global@GOTPAGEOFF]
	bl	_list_add_tail
	add	x0, x19, #12
	ldr	x8, [x19]
	add	x1, x8, #8
	bl	_list_add_tail
	mov	x0, x20
	bl	_mutex_unlock
	add	x21, x19, #8
	mov	x0, x21
	bl	_device_register
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_pnp_delist_device
	b	LBB0_4
LBB0_2:
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x19
	blr	x8
	mov	x1, x0
	mov	x0, x21
	bl	_device_set_wakeup_capable
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PNP_READY,4,2                  ; @PNP_READY
	.comm	_pnp_lock,4,2                   ; @pnp_lock
	.comm	_pnp_global,4,2                 ; @pnp_global
.subsections_via_symbols
