	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_vpd_read
_pci_vpd_read:                          ## @pci_vpd_read
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	js	LBB0_6
## %bb.1:
	movq	%rcx, %r14
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	(%rdi), %r15
	cmpl	$0, (%r15)
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_7
## %bb.2:
	movq	8(%r15), %r12
	testq	%r12, %r12
	je	LBB0_8
LBB0_3:
	xorl	%eax, %eax
	movq	%r12, %rcx
	subq	%rbx, %rcx
	jl	LBB0_10
## %bb.4:
	leaq	(%rbx,%r13), %rax
	cmpq	%r12, %rax
	cmovleq	%r13, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	cmovlq	%rax, %r12
	leaq	20(%r15), %r13
	movq	%r13, %rdi
	callq	_mutex_lock_killable
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movq	_EINTR@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_7:
	movl	$1, (%r15)
	movq	8(%r15), %rsi
	callq	_pci_vpd_size
	movq	%rax, %r12
	movq	%rax, 8(%r15)
	testq	%r12, %r12
	jne	LBB0_3
LBB0_8:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_pci_vpd_wait
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_29
## %bb.12:
	cmpq	%rbx, %r12
	jle	LBB0_29
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_PCI_VPD_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r15), %rsi
	movq	%rbx, %rdx
	andq	$-4, %rdx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_pci_user_write_config_word
	testl	%eax, %eax
	js	LBB0_28
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	$1, 16(%r15)
	movq	_PCI_VPD_ADDR_F@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r15)
	movq	%r14, %rdi
	callq	_pci_vpd_wait
	testl	%eax, %eax
	js	LBB0_28
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_PCI_VPD_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r15), %rsi
	movq	%r14, %rdi
	leaq	-44(%rbp), %rdx
	callq	_pci_user_read_config_dword
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_29
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%ebx, %edx
	movl	-44(%rbp), %eax
	andl	$3, %edx
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%eax, %ecx
	sarl	$8, %ecx
	movl	%ecx, -44(%rbp)
	cmpl	$1, %edx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	sarl	$16, %eax
	movl	%eax, -44(%rbp)
	cmpl	$3, %edx
	jne	LBB0_23
	jmp	LBB0_25
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, (%r14)
	incq	%rbx
	cmpq	%r12, %rbx
	je	LBB0_29
## %bb.20:                              ##   in Loop: Header=BB0_13 Depth=1
	addq	$4, %r14
	movl	-44(%rbp), %ecx
	sarl	$8, %ecx
	movl	%ecx, -44(%rbp)
LBB0_21:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	%ecx, (%r14)
	incq	%rbx
	cmpq	%r12, %rbx
	je	LBB0_29
## %bb.22:                              ##   in Loop: Header=BB0_13 Depth=1
	addq	$4, %r14
	movl	-44(%rbp), %eax
	sarl	$8, %eax
	movl	%eax, -44(%rbp)
LBB0_23:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	%eax, (%r14)
	incq	%rbx
	cmpq	%r12, %rbx
	je	LBB0_29
## %bb.24:                              ##   in Loop: Header=BB0_13 Depth=1
	addq	$4, %r14
	movl	-44(%rbp), %eax
LBB0_25:                                ##   in Loop: Header=BB0_13 Depth=1
	sarl	$8, %eax
	movl	%eax, (%r14)
	incq	%rbx
	cmpq	%r12, %rbx
	je	LBB0_29
## %bb.26:                              ##   in Loop: Header=BB0_13 Depth=1
	addq	$4, %r14
	cmpq	%r12, %rbx
	jl	LBB0_13
	jmp	LBB0_29
LBB0_28:
	movl	%eax, %r13d
LBB0_29:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	testl	%r13d, %r13d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmovnel	%r13d, %eax
                                        ## kill: def $eax killed $eax killed $rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_PCI_VPD_ADDR,8,3               ## @PCI_VPD_ADDR
	.comm	_PCI_VPD_ADDR_F,4,2             ## @PCI_VPD_ADDR_F
	.comm	_PCI_VPD_DATA,8,3               ## @PCI_VPD_DATA
	.no_dead_strip	_pci_vpd_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_vpd_read
_pci_vpd_read:                          ; @pci_vpd_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	tbnz	x1, #63, LBB0_5
; %bb.1:
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x24, [x0]
	ldr	w8, [x24]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	x0, [x24, #8]
	cbz	x0, LBB0_7
LBB0_3:
	subs	x8, x0, x20
	b.ge	LBB0_8
; %bb.4:
	mov	w0, #0
	b	LBB0_11
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:
	mov	w8, #1
	str	w8, [x24]
	ldr	x1, [x24, #8]
	mov	x0, x21
	bl	_pci_vpd_size
	str	x0, [x24, #8]
	cbnz	x0, LBB0_3
LBB0_7:
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
	add	x9, x22, x20
	cmp	x9, x0
	csel	x25, x8, x22, gt
	csel	x26, x9, x0, lt
	add	x22, x24, #20
	mov	x0, x22
	bl	_mutex_lock_killable
	cbz	x0, LBB0_12
; %bb.9:
Lloh4:
	adrp	x8, _EINTR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_12:
	mov	x0, x21
	bl	_pci_vpd_wait
	mov	x23, x0
	tbnz	w0, #31, LBB0_30
; %bb.13:
	cmp	x26, x20
	b.le	LBB0_30
; %bb.14:
Lloh6:
	adrp	x27, _PCI_VPD_ADDR@GOTPAGE
Lloh7:
	ldr	x27, [x27, _PCI_VPD_ADDR@GOTPAGEOFF]
Lloh8:
	adrp	x28, _PCI_VPD_ADDR_F@GOTPAGE
Lloh9:
	ldr	x28, [x28, _PCI_VPD_ADDR_F@GOTPAGEOFF]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #24]
	ldr	x9, [x27]
	add	x1, x9, x8
	and	x2, x20, #0xfffffffffffffffc
	mov	x0, x21
	bl	_pci_user_write_config_word
	tbnz	w0, #31, LBB0_29
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	w8, #1
	str	w8, [x24, #16]
	ldr	w8, [x28]
	str	w8, [x24, #32]
	mov	x0, x21
	bl	_pci_vpd_wait
	tbnz	w0, #31, LBB0_29
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x24, #24]
Lloh10:
	adrp	x9, _PCI_VPD_DATA@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PCI_VPD_DATA@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x1, x9, x8
	add	x2, sp, #12
	mov	x0, x21
	bl	_pci_user_read_config_dword
	mov	x23, x0
	tbnz	w0, #31, LBB0_30
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w10, [sp, #12]
	ands	w9, w20, #0x3
	b.eq	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	asr	w8, w10, #8
	str	w8, [sp, #12]
	cmp	w9, #1
	b.eq	LBB0_23
; %bb.20:                               ;   in Loop: Header=BB0_15 Depth=1
	asr	w8, w10, #16
	str	w8, [sp, #12]
	cmp	w9, #3
	b.ne	LBB0_25
	b	LBB0_27
LBB0_21:                                ;   in Loop: Header=BB0_15 Depth=1
	str	w10, [x19]
	add	x20, x20, #1
	cmp	x20, x26
	b.eq	LBB0_30
; %bb.22:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x19, x19, #4
	ldr	w8, [sp, #12]
	asr	w8, w8, #8
	str	w8, [sp, #12]
LBB0_23:                                ;   in Loop: Header=BB0_15 Depth=1
	str	w8, [x19]
	add	x20, x20, #1
	cmp	x20, x26
	b.eq	LBB0_30
; %bb.24:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x19, x19, #4
	ldr	w8, [sp, #12]
	asr	w8, w8, #8
	str	w8, [sp, #12]
LBB0_25:                                ;   in Loop: Header=BB0_15 Depth=1
	str	w8, [x19]
	add	x20, x20, #1
	cmp	x20, x26
	b.eq	LBB0_30
; %bb.26:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x19, x19, #4
	ldr	w8, [sp, #12]
LBB0_27:                                ;   in Loop: Header=BB0_15 Depth=1
	asr	w8, w8, #8
	str	w8, [x19]
	add	x20, x20, #1
	cmp	x20, x26
	b.eq	LBB0_30
; %bb.28:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x19, x19, #4
	b.lt	LBB0_15
	b	LBB0_30
LBB0_29:
	mov	x23, x0
LBB0_30:
	mov	x0, x22
	bl	_mutex_unlock
	cmp	w23, #0
	csel	w0, w25, w23, eq
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_PCI_VPD_ADDR,8,3               ; @PCI_VPD_ADDR
	.comm	_PCI_VPD_ADDR_F,4,2             ; @PCI_VPD_ADDR_F
	.comm	_PCI_VPD_DATA,8,3               ; @PCI_VPD_DATA
	.no_dead_strip	_pci_vpd_read
.subsections_via_symbols
