	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function pci_enable_device_flags
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.space	4
	.space	4
LCPI0_1:
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.space	4
	.space	4
LCPI0_2:
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
LCPI0_3:
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.space	4
	.space	4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_pci_enable_device_flags:               ## @pci_enable_device_flags
	.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	%rsi, %r12
	movq	%rdi, %r14
	movq	16(%rdi), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	_PCI_PM_CTRL@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_word
	movq	_PCI_PM_CTRL_STATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-36(%rbp), %eax
	movl	%eax, (%r14)
LBB0_2:
	leaq	4(%r14), %r15
	movq	%r15, %rdi
	callq	_atomic_inc_return
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	jg	LBB0_23
## %bb.3:
	movq	%r14, %rdi
	callq	_pci_upstream_bridge
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %rdi
	callq	_pci_enable_bridge
LBB0_5:
	movq	_PCI_ROM_RESOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movl	%eax, %ecx
	movq	8(%r14), %rdx
	incq	%rax
	xorl	%edi, %edi
	cmpl	$3, %ecx
	jae	LBB0_9
## %bb.8:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	LBB0_12
LBB0_6:
	xorl	%esi, %esi
	jmp	LBB0_13
LBB0_9:
	movl	%eax, %ecx
	andl	$-4, %ecx
	movq	%r12, %xmm0
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	leaq	(,%rax,8), %rsi
	andq	$-32, %rsi
	movdqa	LCPI0_0(%rip), %xmm5            ## xmm5 = <0,1,u,u>
	pxor	%xmm10, %xmm10
	xorl	%ebx, %ebx
	movdqa	LCPI0_1(%rip), %xmm8            ## xmm8 = <2,2,u,u>
	movdqa	LCPI0_2(%rip), %xmm11           ## xmm11 = [1065353216,1065353216,1065353216,1065353216]
	movdqa	LCPI0_3(%rip), %xmm9            ## xmm9 = <4,4,u,u>
	pxor	%xmm6, %xmm6
	pxor	%xmm3, %xmm3
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm5, %xmm1
	paddd	%xmm8, %xmm1
	movdqu	(%rdx,%rbx), %xmm7
	movdqu	16(%rdx,%rbx), %xmm2
	pand	%xmm0, %xmm7
	pand	%xmm0, %xmm2
	pcmpeqq	%xmm10, %xmm7
	pshufd	$232, %xmm7, %xmm7              ## xmm7 = xmm7[0,2,2,3]
	pcmpeqq	%xmm10, %xmm2
	pshufd	$232, %xmm2, %xmm2              ## xmm2 = xmm2[0,2,2,3]
	movdqa	%xmm5, %xmm4
	pslld	$23, %xmm4
	paddd	%xmm11, %xmm4
	cvttps2dq	%xmm4, %xmm4
	pandn	%xmm4, %xmm7
	por	%xmm7, %xmm6
	pslld	$23, %xmm1
	paddd	%xmm11, %xmm1
	cvttps2dq	%xmm1, %xmm1
	pandn	%xmm1, %xmm2
	por	%xmm2, %xmm3
	paddd	%xmm9, %xmm5
	addq	$32, %rbx
	cmpq	%rbx, %rsi
	jne	LBB0_10
## %bb.11:
	por	%xmm6, %xmm3
	pshufd	$85, %xmm3, %xmm0               ## xmm0 = xmm3[1,1,1,1]
	por	%xmm3, %xmm0
	movd	%xmm0, %esi
	cmpq	%rax, %rcx
	je	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, %ebx
	shll	%cl, %ebx
	testq	%r12, (%rdx,%rcx,8)
	cmovel	%edi, %ebx
	orl	%ebx, %esi
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_12
LBB0_13:
	movq	_PCI_BRIDGE_RESOURCES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	movq	_DEVICE_COUNT_RESOURCE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpl	%eax, %ebx
	jge	LBB0_21
## %bb.14:
	movq	8(%r14), %rdx
	movq	%rax, %r8
	subq	%rbx, %r8
	cmpq	$4, %r8
	jae	LBB0_16
## %bb.15:
	movq	%rbx, %rcx
	jmp	LBB0_19
LBB0_16:
	movq	%r8, %rdi
	andq	$-4, %rdi
	leaq	(%rdi,%rbx), %rcx
	movd	%esi, %xmm0
	movd	%ebx, %xmm1
	pshufd	$80, %xmm1, %xmm6               ## xmm6 = xmm1[0,0,1,1]
	paddd	LCPI0_0(%rip), %xmm6
	movq	%r12, %xmm2
	pshufd	$68, %xmm2, %xmm2               ## xmm2 = xmm2[0,1,0,1]
	leaq	(%rdx,%rbx,8), %rsi
	addq	$16, %rsi
	pxor	%xmm10, %xmm10
	xorl	%ebx, %ebx
	movdqa	LCPI0_1(%rip), %xmm8            ## xmm8 = <2,2,u,u>
	movdqa	LCPI0_2(%rip), %xmm11           ## xmm11 = [1065353216,1065353216,1065353216,1065353216]
	movdqa	LCPI0_3(%rip), %xmm9            ## xmm9 = <4,4,u,u>
	pxor	%xmm4, %xmm4
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm6, %xmm1
	paddd	%xmm8, %xmm1
	movdqu	-16(%rsi,%rbx,8), %xmm7
	movdqu	(%rsi,%rbx,8), %xmm3
	pand	%xmm2, %xmm7
	pand	%xmm2, %xmm3
	pcmpeqq	%xmm10, %xmm7
	pshufd	$232, %xmm7, %xmm7              ## xmm7 = xmm7[0,2,2,3]
	pcmpeqq	%xmm10, %xmm3
	pshufd	$232, %xmm3, %xmm3              ## xmm3 = xmm3[0,2,2,3]
	movdqa	%xmm6, %xmm5
	pslld	$23, %xmm5
	paddd	%xmm11, %xmm5
	cvttps2dq	%xmm5, %xmm5
	pandn	%xmm5, %xmm7
	por	%xmm7, %xmm0
	pslld	$23, %xmm1
	paddd	%xmm11, %xmm1
	cvttps2dq	%xmm1, %xmm1
	pandn	%xmm1, %xmm3
	por	%xmm3, %xmm4
	addq	$4, %rbx
	paddd	%xmm9, %xmm6
	cmpq	%rbx, %rdi
	jne	LBB0_17
## %bb.18:
	por	%xmm0, %xmm4
	pshufd	$85, %xmm4, %xmm0               ## xmm0 = xmm4[1,1,1,1]
	por	%xmm4, %xmm0
	movd	%xmm0, %esi
	cmpq	%rdi, %r8
	je	LBB0_21
LBB0_19:
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, %ebx
	shll	%cl, %ebx
	testq	%r12, (%rdx,%rcx,8)
	cmovel	%edi, %ebx
	orl	%ebx, %esi
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_20
LBB0_21:
	movq	%r14, %rdi
	callq	_do_pci_enable_device
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_23
## %bb.22:
	movq	%r15, %rdi
	callq	_atomic_dec
LBB0_23:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_PM_CTRL,8,3                ## @PCI_PM_CTRL
	.comm	_PCI_PM_CTRL_STATE_MASK,4,2     ## @PCI_PM_CTRL_STATE_MASK
	.comm	_PCI_ROM_RESOURCE,4,2           ## @PCI_ROM_RESOURCE
	.comm	_PCI_BRIDGE_RESOURCES,4,2       ## @PCI_BRIDGE_RESOURCES
	.comm	_DEVICE_COUNT_RESOURCE,4,2      ## @DEVICE_COUNT_RESOURCE
	.no_dead_strip	_pci_enable_device_flags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function pci_enable_device_flags
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_pci_enable_device_flags:               ; @pci_enable_device_flags
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _PCI_PM_CTRL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCI_PM_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _PCI_PM_CTRL_STATE_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCI_PM_CTRL_STATE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w9, w8
	str	w8, [x19]
LBB0_2:
	add	x21, x19, #4
	mov	x0, x21
	bl	_atomic_inc_return
	cmp	w0, #1
	b.le	LBB0_4
; %bb.3:
	mov	w19, #0
	b	LBB0_25
LBB0_4:
	mov	x0, x19
	bl	_pci_upstream_bridge
	cbz	x0, LBB0_6
; %bb.5:
	bl	_pci_enable_bridge
LBB0_6:
Lloh6:
	adrp	x8, _PCI_ROM_RESOURCE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCI_ROM_RESOURCE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x8]
	tbnz	w10, #31, LBB0_9
; %bb.7:
	ldr	x8, [x19, #8]
	add	x9, x10, #1
	cmp	w10, #7
	b.hs	LBB0_10
; %bb.8:
	mov	x10, #0
	mov	w1, #0
	b	LBB0_13
LBB0_9:
	mov	w1, #0
	b	LBB0_15
LBB0_10:
	and	x10, x9, #0xfffffff8
	dup.2d	v0, x20
	movi.2d	v1, #0000000000000000
	movi.2s	v2, #2
	movi.2s	v3, #4
Lloh9:
	adrp	x11, lCPI0_0@PAGE
Lloh10:
	ldr	d4, [x11, lCPI0_0@PAGEOFF]
	add	x11, x8, #32
	movi.2s	v5, #6
	movi.2s	v6, #1
	movi.2s	v7, #8
	mov	x12, x10
	movi.2d	v16, #0000000000000000
	movi.2d	v17, #0000000000000000
	movi.2d	v18, #0000000000000000
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add.2s	v19, v4, v2
	add.2s	v20, v4, v3
	add.2s	v21, v4, v5
	ldp	q22, q23, [x11, #-32]
	ldp	q24, q25, [x11], #64
	and.16b	v22, v22, v0
	and.16b	v23, v23, v0
	and.16b	v24, v24, v0
	and.16b	v25, v25, v0
	cmeq.2d	v22, v22, #0
	xtn.2s	v22, v22
	cmeq.2d	v23, v23, #0
	xtn.2s	v23, v23
	cmeq.2d	v24, v24, #0
	xtn.2s	v24, v24
	cmeq.2d	v25, v25, #0
	xtn.2s	v25, v25
	ushl.2s	v26, v6, v4
	ushl.2s	v19, v6, v19
	ushl.2s	v20, v6, v20
	ushl.2s	v21, v6, v21
	bic.8b	v22, v26, v22
	bic.8b	v19, v19, v23
	bic.8b	v20, v20, v24
	bic.8b	v21, v21, v25
	orr.8b	v1, v22, v1
	orr.8b	v16, v19, v16
	orr.8b	v17, v20, v17
	orr.8b	v18, v21, v18
	add.2s	v4, v4, v7
	subs	x12, x12, #8
	b.ne	LBB0_11
; %bb.12:
	orr.8b	v0, v16, v1
	orr.8b	v0, v17, v0
	orr.8b	v0, v18, v0
	mov.s	w11, v0[1]
	fmov	w12, s0
	orr	w1, w12, w11
	cmp	x10, x9
	b.eq	LBB0_15
LBB0_13:
	mov	w11, #1
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x8, x10, lsl #3]
	lsl	w13, w11, w10
	tst	x12, x20
	csel	w12, wzr, w13, eq
	orr	w1, w12, w1
	add	x10, x10, #1
	cmp	x9, x10
	b.ne	LBB0_14
LBB0_15:
Lloh11:
	adrp	x8, _PCI_BRIDGE_RESOURCES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PCI_BRIDGE_RESOURCES@GOTPAGEOFF]
Lloh13:
	ldrsw	x13, [x8]
Lloh14:
	adrp	x8, _DEVICE_COUNT_RESOURCE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DEVICE_COUNT_RESOURCE@GOTPAGEOFF]
Lloh16:
	ldrsw	x8, [x8]
	cmp	w13, w8
	b.ge	LBB0_23
; %bb.16:
	ldr	x9, [x19, #8]
	sub	x11, x8, x13
	cmp	x11, #8
	b.hs	LBB0_18
; %bb.17:
	mov	x10, x13
	b	LBB0_21
LBB0_18:
	and	x12, x11, #0xfffffffffffffff8
	add	x10, x12, x13
	movi	d0, #0000000000000000
	mov.s	v0[0], w1
	dup.2s	v2, w13
	dup.2d	v1, x20
Lloh17:
	adrp	x14, lCPI0_0@PAGE
Lloh18:
	ldr	d3, [x14, lCPI0_0@PAGEOFF]
	add.2s	v2, v2, v3
	movi.2d	v3, #0000000000000000
	movi.2s	v4, #2
	add	x13, x9, x13, lsl #3
	add	x13, x13, #32
	movi.2s	v5, #4
	movi.2s	v6, #6
	movi.2s	v7, #1
	movi.2s	v16, #8
	mov	x14, x12
	movi.2d	v17, #0000000000000000
	movi.2d	v18, #0000000000000000
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	add.2s	v19, v2, v4
	add.2s	v20, v2, v5
	add.2s	v21, v2, v6
	ldp	q22, q23, [x13, #-32]
	ldp	q24, q25, [x13], #64
	and.16b	v22, v22, v1
	and.16b	v23, v23, v1
	and.16b	v24, v24, v1
	and.16b	v25, v25, v1
	cmeq.2d	v22, v22, #0
	xtn.2s	v22, v22
	cmeq.2d	v23, v23, #0
	xtn.2s	v23, v23
	cmeq.2d	v24, v24, #0
	xtn.2s	v24, v24
	cmeq.2d	v25, v25, #0
	xtn.2s	v25, v25
	ushl.2s	v26, v7, v2
	ushl.2s	v19, v7, v19
	ushl.2s	v20, v7, v20
	ushl.2s	v21, v7, v21
	bic.8b	v22, v26, v22
	bic.8b	v19, v19, v23
	bic.8b	v20, v20, v24
	bic.8b	v21, v21, v25
	orr.8b	v0, v22, v0
	orr.8b	v3, v19, v3
	orr.8b	v17, v20, v17
	orr.8b	v18, v21, v18
	add.2s	v2, v2, v16
	subs	x14, x14, #8
	b.ne	LBB0_19
; %bb.20:
	orr.8b	v0, v3, v0
	orr.8b	v0, v17, v0
	orr.8b	v0, v18, v0
	mov.s	w13, v0[1]
	fmov	w14, s0
	orr	w1, w14, w13
	cmp	x11, x12
	b.eq	LBB0_23
LBB0_21:
	mov	w11, #1
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9, x10, lsl #3]
	lsl	w13, w11, w10
	tst	x12, x20
	csel	w12, wzr, w13, eq
	orr	w1, w12, w1
	add	x10, x10, #1
	cmp	x8, x10
	b.ne	LBB0_22
LBB0_23:
	mov	x0, x19
	bl	_do_pci_enable_device
	mov	x19, x0
	tbz	w0, #31, LBB0_25
; %bb.24:
	mov	x0, x21
	bl	_atomic_dec
LBB0_25:
	mov	x0, x19
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdr	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdr	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_PM_CTRL,8,3                ; @PCI_PM_CTRL
	.comm	_PCI_PM_CTRL_STATE_MASK,4,2     ; @PCI_PM_CTRL_STATE_MASK
	.comm	_PCI_ROM_RESOURCE,4,2           ; @PCI_ROM_RESOURCE
	.comm	_PCI_BRIDGE_RESOURCES,4,2       ; @PCI_BRIDGE_RESOURCES
	.comm	_DEVICE_COUNT_RESOURCE,4,2      ; @DEVICE_COUNT_RESOURCE
	.no_dead_strip	_pci_enable_device_flags
.subsections_via_symbols
