	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_write_config
_pci_write_config:                      ## @pci_write_config
	.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
	movq	%r9, %r14
	movq	%r8, %rbx
	movq	%rcx, %r15
	movq	%rsi, %rdi
	callq	_kobj_to_dev
	movl	%eax, %edi
	callq	_to_pci_dev
	movq	%rax, %r13
	movq	_LOCKDOWN_PCI_ACCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_security_locked_down
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.1:
	movq	(%r13), %rax
	xorl	%r12d, %r12d
	cmpq	%rbx, %rax
	jl	LBB0_18
## %bb.2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%rbx), %rcx
	movl	%eax, %edx
	subl	%ebx, %edx
	cmpq	%rax, %rcx
	movl	%r14d, %r12d
	cmoval	%edx, %r12d
	movq	%r13, %rdi
	callq	_pci_config_pm_runtime_get
	movq	%rbx, %r15
	movl	%r12d, %r14d
	testb	$1, %r15b
	je	LBB0_5
## %bb.3:
	movl	%r12d, %r14d
	movq	%r15, %rbx
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_pci_user_write_config_byte
	leaq	1(%r15), %rbx
	leal	-1(%r12), %r14d
LBB0_5:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	testb	$3, %bl
	je	LBB0_6
## %bb.7:
	cmpl	$3, %r14d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jb	LBB0_9
## %bb.8:
	movq	%rbx, %rax
	subq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movl	4(%r15,%rax,4), %edx
	shll	$8, %edx
	orl	(%r15,%rax,4), %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_pci_user_write_config_word
	addq	$2, %rbx
	addl	$-2, %r14d
LBB0_9:
	cmpl	$4, %r14d
	jae	LBB0_10
	jmp	LBB0_12
LBB0_6:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	cmpl	$4, %r14d
	jb	LBB0_12
LBB0_10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(,%rax,4), %rax
	subq	%rax, %r15
	addq	$12, %r15
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	-8(%r15,%rbx,4), %eax
	movl	-4(%r15,%rbx,4), %ecx
	shll	$8, %eax
	orl	-12(%r15,%rbx,4), %eax
	shll	$16, %ecx
	movl	(%r15,%rbx,4), %edx
	shll	$24, %edx
	orl	%ecx, %edx
	orl	%eax, %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_pci_user_write_config_dword
	addq	$4, %rbx
	addl	$-4, %r14d
	cmpl	$3, %r14d
	ja	LBB0_11
LBB0_12:
	cmpl	$2, %r14d
	jb	LBB0_13
## %bb.14:
	movq	%rbx, %rax
	subq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	4(%r15,%rax,4), %edx
	shll	$8, %edx
	orl	(%r15,%rax,4), %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_pci_user_write_config_word
	addq	$2, %rbx
	addl	$-2, %r14d
	testl	%r14d, %r14d
	jne	LBB0_16
	jmp	LBB0_17
LBB0_13:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	testl	%r14d, %r14d
	je	LBB0_17
LBB0_16:
	movq	%rbx, %rax
	subq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movl	(%r15,%rax,4), %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_pci_user_write_config_byte
LBB0_17:
	movq	%r13, %rdi
	callq	_pci_config_pm_runtime_put
LBB0_18:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOCKDOWN_PCI_ACCESS,4,2        ## @LOCKDOWN_PCI_ACCESS
	.no_dead_strip	_pci_write_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_write_config
_pci_write_config:                      ; @pci_write_config
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x23, x5
	mov	x20, x4
	mov	x19, x3
	mov	x0, x1
	bl	_kobj_to_dev
	bl	_to_pci_dev
	mov	x21, x0
Lloh0:
	adrp	x8, _LOCKDOWN_PCI_ACCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOCKDOWN_PCI_ACCESS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_security_locked_down
	mov	x22, x0
	cbnz	w0, LBB0_17
; %bb.1:
	ldr	x8, [x21]
	cmp	x8, x20
	b.ge	LBB0_3
; %bb.2:
	mov	w22, #0
	b	LBB0_17
LBB0_3:
	sub	w9, w8, w20
	add	x10, x23, x20
	cmp	x10, x8
	csel	w22, w9, w23, hi
	mov	x0, x21
	bl	_pci_config_pm_runtime_get
	mov	x24, x22
	mov	x23, x20
	tbz	w20, #0, LBB0_6
; %bb.4:
	mov	x24, x22
	mov	x23, x20
	cbz	w22, LBB0_6
; %bb.5:
	ldr	w2, [x19]
	mov	x0, x21
	mov	x1, x20
	bl	_pci_user_write_config_byte
	add	x23, x20, #1
	sub	w24, w22, #1
LBB0_6:
	tst	x23, #0x3
	b.eq	LBB0_9
; %bb.7:
	cmp	w24, #3
	b.lo	LBB0_9
; %bb.8:
	sub	x8, x23, x20
	add	x8, x19, x8, lsl #2
	ldp	w9, w8, [x8]
	orr	w2, w9, w8, lsl #8
	mov	x0, x21
	mov	x1, x23
	bl	_pci_user_write_config_word
	add	x23, x23, #2
	sub	w24, w24, #2
LBB0_9:
	cmp	w24, #4
	b.lo	LBB0_12
; %bb.10:
	lsl	x8, x23, #2
	sub	x8, x8, x20, lsl #2
	add	x8, x8, x19
	add	x25, x8, #8
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldp	w8, w9, [x25, #-8]
	orr	w8, w8, w9, lsl #8
	ldp	w9, w10, [x25], #16
	orr	w8, w8, w9, lsl #16
	orr	w2, w8, w10, lsl #24
	mov	x0, x21
	mov	x1, x23
	bl	_pci_user_write_config_dword
	add	x23, x23, #4
	sub	w24, w24, #4
	cmp	w24, #3
	b.hi	LBB0_11
LBB0_12:
	subs	w25, w24, #2
	b.lo	LBB0_14
; %bb.13:
	sub	x8, x23, x20
	add	x8, x19, x8, lsl #2
	ldp	w9, w8, [x8]
	orr	w2, w9, w8, lsl #8
	mov	x0, x21
	mov	x1, x23
	bl	_pci_user_write_config_word
	add	x23, x23, #2
	mov	x24, x25
LBB0_14:
	cbz	w24, LBB0_16
; %bb.15:
	sub	x8, x23, x20
	ldr	w2, [x19, x8, lsl #2]
	mov	x0, x21
	mov	x1, x23
	bl	_pci_user_write_config_byte
LBB0_16:
	mov	x0, x21
	bl	_pci_config_pm_runtime_put
LBB0_17:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LOCKDOWN_PCI_ACCESS,4,2        ; @LOCKDOWN_PCI_ACCESS
	.no_dead_strip	_pci_write_config
.subsections_via_symbols
