	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pnp_device_attach              ## -- Begin function pnp_device_attach
	.p2align	4, 0x90
_pnp_device_attach:                     ## @pnp_device_attach
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_pnp_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movq	_PNP_READY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	_PNP_ATTACHED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	_pnp_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_pnp_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pnp_lock,4,2                   ## @pnp_lock
	.comm	_PNP_READY,8,3                  ## @PNP_READY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_PNP_ATTACHED,8,3               ## @PNP_ATTACHED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pnp_device_attach              ; -- Begin function pnp_device_attach
	.p2align	2
_pnp_device_attach:                     ; @pnp_device_attach
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, _pnp_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _pnp_lock@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _PNP_READY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PNP_READY@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _PNP_ATTACHED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PNP_ATTACHED@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh8:
	adrp	x0, _pnp_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _pnp_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh10:
	adrp	x0, _pnp_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _pnp_lock@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh12:
	adrp	x8, _EBUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_pnp_lock,4,2                   ; @pnp_lock
	.comm	_PNP_READY,8,3                  ; @PNP_READY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_PNP_ATTACHED,8,3               ; @PNP_ATTACHED
.subsections_via_symbols
