	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_vpd_write
_pci_vpd_write:                         ## @pci_vpd_write
	.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
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movabsq	$-9223372036854775805, %rax     ## imm = 0x8000000000000003
	andq	%rsi, %rax
	movl	%ebx, %ecx
	andl	$3, %ecx
	orq	%rax, %rcx
	je	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	(%rdi), %r12
	cmpl	$0, (%r12)
	je	LBB0_9
## %bb.5:
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_10
LBB0_6:
	leaq	(%rbx,%r15), %rcx
	cmpq	%rax, %rcx
	jg	LBB0_1
## %bb.7:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leaq	20(%r12), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock_killable
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	_EINTR@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_9:
	movl	$1, (%r12)
	movq	8(%r12), %rsi
	movq	%r13, %rdi
	callq	_pci_vpd_size
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	jne	LBB0_6
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_11:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_pci_vpd_wait
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_20
## %bb.12:
	cmpq	%r15, -48(%rbp)                 ## 8-byte Folded Reload
	jle	LBB0_20
## %bb.13:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%r14), %eax
	movl	8(%r14), %ecx
	shll	$8, %eax
	orl	(%r14), %eax
	shll	$16, %ecx
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movl	12(%r14), %edx
	shll	$24, %edx
	orl	%ecx, %edx
	orl	%eax, %edx
	movq	_PCI_VPD_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%r12), %rsi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_pci_user_write_config_dword
	testl	%eax, %eax
	js	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	_PCI_VPD_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%r12), %rsi
	movq	_PCI_VPD_ADDR_F@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	orq	%r15, %rdx
	movq	%r14, %rdi
	callq	_pci_user_write_config_word
	testl	%eax, %eax
	js	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	$1, 16(%r12)
	movq	$0, 24(%r12)
	movq	%r14, %rdi
	callq	_pci_vpd_wait
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	addq	$4, %r15
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	addq	$16, %r14
	cmpq	-48(%rbp), %r15                 ## 8-byte Folded Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jl	LBB0_14
	jmp	LBB0_20
LBB0_19:
	movl	%eax, %r13d
LBB0_20:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	testl	%r13d, %r13d
	cmovnel	%r13d, %ebx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_PCI_VPD_DATA,8,3               ## @PCI_VPD_DATA
	.comm	_PCI_VPD_ADDR,8,3               ## @PCI_VPD_ADDR
	.comm	_PCI_VPD_ADDR_F,8,3             ## @PCI_VPD_ADDR_F
	.no_dead_strip	_pci_vpd_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_vpd_write
_pci_vpd_write:                         ; @pci_vpd_write
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	and	x8, x1, #0x8000000000000003
	and	x9, x2, #0x3
	orr	x8, x9, x8
	cbz	x8, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x20, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x25, [x0]
	ldr	w8, [x25]
	cbz	w8, LBB0_9
; %bb.5:
	ldr	x0, [x25, #8]
	cbz	x0, LBB0_10
LBB0_6:
	add	x26, x19, x21
	cmp	x26, x0
	b.gt	LBB0_1
; %bb.7:
	add	x23, x25, #20
	mov	x0, x23
	bl	_mutex_lock_killable
	cbz	x0, LBB0_11
; %bb.8:
Lloh2:
	adrp	x8, _EINTR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
	b	LBB0_2
LBB0_9:
	mov	w8, #1
	str	w8, [x25]
	ldr	x1, [x25, #8]
	mov	x0, x22
	bl	_pci_vpd_size
	str	x0, [x25, #8]
	cbnz	x0, LBB0_6
LBB0_10:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_2
LBB0_11:
	mov	x0, x22
	bl	_pci_vpd_wait
	mov	x24, x0
	tbnz	w0, #31, LBB0_19
; %bb.12:
	cmp	x26, x21
	b.le	LBB0_19
; %bb.13:
Lloh6:
	adrp	x27, _PCI_VPD_DATA@GOTPAGE
Lloh7:
	ldr	x27, [x27, _PCI_VPD_DATA@GOTPAGEOFF]
Lloh8:
	adrp	x28, _PCI_VPD_ADDR_F@GOTPAGE
Lloh9:
	ldr	x28, [x28, _PCI_VPD_ADDR_F@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldp	w8, w9, [x20]
	orr	w8, w8, w9, lsl #8
	ldp	w9, w10, [x20, #8]
	orr	w8, w8, w9, lsl #16
	orr	w2, w8, w10, lsl #24
	ldr	x8, [x25, #32]
	ldr	x9, [x27]
	add	x1, x9, x8
	mov	x0, x22
	bl	_pci_user_write_config_dword
	tbnz	w0, #31, LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x25, #32]
Lloh10:
	adrp	x9, _PCI_VPD_ADDR@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PCI_VPD_ADDR@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x1, x9, x8
	ldr	x8, [x28]
	orr	x2, x8, x21
	mov	x0, x22
	bl	_pci_user_write_config_word
	tbnz	w0, #31, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	w8, #1
	str	w8, [x25, #16]
	str	xzr, [x25, #24]
	mov	x0, x22
	bl	_pci_vpd_wait
	mov	x24, x0
	tbnz	w0, #31, LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x21, x21, #4
	add	x20, x20, #16
	cmp	x21, x26
	b.lt	LBB0_14
	b	LBB0_19
LBB0_18:
	mov	x24, x0
LBB0_19:
	mov	x0, x23
	bl	_mutex_unlock
	cmp	w24, #0
	csel	w0, w19, w24, eq
	b	LBB0_3
	.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_DATA,8,3               ; @PCI_VPD_DATA
	.comm	_PCI_VPD_ADDR,8,3               ; @PCI_VPD_ADDR
	.comm	_PCI_VPD_ADDR_F,8,3             ; @PCI_VPD_ADDR_F
	.no_dead_strip	_pci_vpd_write
.subsections_via_symbols
