	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pciehp_check_presence
_pciehp_check_presence:                 ## @pciehp_check_presence
	.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
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_down_read
	leaq	12(%rbx), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_pciehp_card_present_or_link_active
	movq	(%rbx), %rcx
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	_OFF_STATE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_6
## %bb.2:
	movq	_BLINKINGON_STATE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_7
	jmp	LBB0_6
LBB0_3:
	movq	_ON_STATE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_6
## %bb.4:
	movq	_BLINKINGOFF_STATE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_7
LBB0_6:
	movq	_PCI_EXP_SLTSTA_PDC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pciehp_request
LBB0_7:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_up_read                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_OFF_STATE,8,3                  ## @OFF_STATE
	.comm	_BLINKINGON_STATE,8,3           ## @BLINKINGON_STATE
	.comm	_ON_STATE,8,3                   ## @ON_STATE
	.comm	_BLINKINGOFF_STATE,8,3          ## @BLINKINGOFF_STATE
	.comm	_PCI_EXP_SLTSTA_PDC,4,2         ## @PCI_EXP_SLTSTA_PDC
	.no_dead_strip	_pciehp_check_presence
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pciehp_check_presence
_pciehp_check_presence:                 ; @pciehp_check_presence
	.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	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_down_read
	add	x21, x20, #12
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x20
	bl	_pciehp_card_present_or_link_active
	ldr	x8, [x20]
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _OFF_STATE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OFF_STATE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _BLINKINGON_STATE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _BLINKINGON_STATE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x9, _ON_STATE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ON_STATE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x10, _BLINKINGOFF_STATE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _BLINKINGOFF_STATE@GOTPAGEOFF]
LBB0_3:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_5
; %bb.4:
Lloh10:
	adrp	x8, _PCI_EXP_SLTSTA_PDC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PCI_EXP_SLTSTA_PDC@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pciehp_request
LBB0_5:
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x19
	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
	b	_up_read
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_OFF_STATE,8,3                  ; @OFF_STATE
	.comm	_BLINKINGON_STATE,8,3           ; @BLINKINGON_STATE
	.comm	_ON_STATE,8,3                   ; @ON_STATE
	.comm	_BLINKINGOFF_STATE,8,3          ; @BLINKINGOFF_STATE
	.comm	_PCI_EXP_SLTSTA_PDC,4,2         ; @PCI_EXP_SLTSTA_PDC
	.no_dead_strip	_pciehp_check_presence
.subsections_via_symbols
