	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sky2_vpd_write
_sky2_vpd_write:                        ## @sky2_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	testl	%r8d, %r8d
	je	LBB0_5
## %bb.1:
	movl	%r8d, %r12d
	movq	%rdi, %r13
	movslq	%esi, %rbx
	xorl	%r14d, %r14d
	movq	_PCI_VPD_ADDR_F@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax), %edx
	movq	_PCI_VPD_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	movq	%r13, %rdi
	callq	_sky2_pci_write32
	movq	_PCI_VPD_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	movl	(%r15), %edx
	orl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	movq	%r13, %rdi
	callq	_sky2_pci_write32
	movl	(%r15), %edx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_sky2_vpd_wait
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addl	$4, %r14d
	cmpl	%r12d, %r14d
	jb	LBB0_2
LBB0_5:
	xorl	%eax, %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_VPD_DATA,8,3               ## @PCI_VPD_DATA
	.comm	_PCI_VPD_ADDR,8,3               ## @PCI_VPD_ADDR
	.comm	_PCI_VPD_ADDR_F,4,2             ## @PCI_VPD_ADDR_F
	.no_dead_strip	_sky2_vpd_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sky2_vpd_write
_sky2_vpd_write:                        ; @sky2_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
	cbz	w4, LBB0_4
; %bb.1:
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	mov	w24, #0
	sxtw	x25, w22
Lloh0:
	adrp	x26, _PCI_VPD_DATA@GOTPAGE
Lloh1:
	ldr	x26, [x26, _PCI_VPD_DATA@GOTPAGEOFF]
Lloh2:
	adrp	x27, _PCI_VPD_ADDR@GOTPAGE
Lloh3:
	ldr	x27, [x27, _PCI_VPD_ADDR@GOTPAGEOFF]
Lloh4:
	adrp	x28, _PCI_VPD_ADDR_F@GOTPAGE
Lloh5:
	ldr	x28, [x28, _PCI_VPD_ADDR_F@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21, w24, uxtw]
	ldr	x8, [x26]
	add	x1, x8, x25
	mov	x0, x23
	bl	_sky2_pci_write32
	ldr	x8, [x27]
	add	x1, x8, x25
	ldr	w8, [x28]
	orr	w2, w8, w20
	mov	x0, x23
	bl	_sky2_pci_write32
	ldr	w2, [x28]
	mov	x0, x23
	mov	x1, x22
	bl	_sky2_vpd_wait
	cbnz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w24, w24, #4
	cmp	w24, w19
	b.lo	LBB0_2
LBB0_4:
	mov	w0, #0
LBB0_5:
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_VPD_DATA,8,3               ; @PCI_VPD_DATA
	.comm	_PCI_VPD_ADDR,8,3               ; @PCI_VPD_ADDR
	.comm	_PCI_VPD_ADDR_F,4,2             ; @PCI_VPD_ADDR_F
	.no_dead_strip	_sky2_vpd_write
.subsections_via_symbols
