	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opalpci_write_config
_opalpci_write_config:                  ## @opalpci_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
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movl	%edx, %r13d
	movl	%esi, %r14d
	movl	16(%rbp), %r12d
	movq	_OPAL_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	callq	_device_get_softc
	cmpl	$1, %r12d
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	cmpl	$4, %r12d
	je	LBB0_5
## %bb.3:
	cmpl	$2, %r12d
	jne	LBB0_7
## %bb.4:
	movq	_OPAL_PCI_CONFIG_WRITE_HALF_WORD@GOTPCREL(%rip), %rdx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_6
LBB0_1:
	movq	_OPAL_PCI_CONFIG_WRITE_BYTE@GOTPCREL(%rip), %rdx
	jmp	LBB0_6
LBB0_5:
	movq	_OPAL_PCI_CONFIG_WRITE_WORD@GOTPCREL(%rip), %rdx
LBB0_6:
	shll	$8, %r14d
	andl	$31, %r13d
	leal	(%r14,%r13,8), %ecx
	andl	$7, %ebx
	orl	%ecx, %ebx
	movl	(%rdx), %edi
	movl	(%rax), %esi
	movl	%ebx, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_opal_call
	movl	%eax, %r15d
LBB0_7:
	movq	_OPAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_9
## %bb.8:
	movq	_OPAL_HARDWARE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_9
## %bb.10:
	movq	_OPAL_PCI_EEH_FREEZE_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	_OPAL_PCI_DEFAULT_PE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_OPAL_EEH_ACTION_CLEAR_FREEZE_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_opal_call                      ## TAILCALL
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OPAL_SUCCESS,4,2               ## @OPAL_SUCCESS
	.comm	_OPAL_PCI_CONFIG_WRITE_BYTE,4,2 ## @OPAL_PCI_CONFIG_WRITE_BYTE
	.comm	_OPAL_PCI_CONFIG_WRITE_HALF_WORD,4,2 ## @OPAL_PCI_CONFIG_WRITE_HALF_WORD
	.comm	_OPAL_PCI_CONFIG_WRITE_WORD,4,2 ## @OPAL_PCI_CONFIG_WRITE_WORD
	.comm	_OPAL_HARDWARE,4,2              ## @OPAL_HARDWARE
	.comm	_OPAL_PCI_EEH_FREEZE_CLEAR,4,2  ## @OPAL_PCI_EEH_FREEZE_CLEAR
	.comm	_OPAL_PCI_DEFAULT_PE,4,2        ## @OPAL_PCI_DEFAULT_PE
	.comm	_OPAL_EEH_ACTION_CLEAR_FREEZE_ALL,4,2 ## @OPAL_EEH_ACTION_CLEAR_FREEZE_ALL
	.no_dead_strip	_opalpci_write_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opalpci_write_config
_opalpci_write_config:                  ; @opalpci_write_config
	.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
	mov	x26, x6
	mov	x21, x5
	mov	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
Lloh0:
	adrp	x27, _OPAL_SUCCESS@GOTPAGE
Lloh1:
	ldr	x27, [x27, _OPAL_SUCCESS@GOTPAGEOFF]
	ldr	w25, [x27]
	bl	_device_get_softc
	mov	x19, x0
	cmp	w26, #1
	b.eq	LBB0_4
; %bb.1:
	cmp	w26, #4
	b.eq	LBB0_5
; %bb.2:
	cmp	w26, #2
	b.ne	LBB0_7
; %bb.3:
Lloh2:
	adrp	x8, _OPAL_PCI_CONFIG_WRITE_HALF_WORD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OPAL_PCI_CONFIG_WRITE_HALF_WORD@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh4:
	adrp	x8, _OPAL_PCI_CONFIG_WRITE_BYTE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _OPAL_PCI_CONFIG_WRITE_BYTE@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _OPAL_PCI_CONFIG_WRITE_WORD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OPAL_PCI_CONFIG_WRITE_WORD@GOTPAGEOFF]
LBB0_6:
	lsl	w2, w24, #8
	bfi	w2, w23, #3, #5
	bfxil	w2, w22, #0, #3
	ldr	w0, [x8]
	ldr	w1, [x19]
	str	x21, [sp]
	mov	x3, x20
	bl	_opal_call
	mov	x25, x0
LBB0_7:
	ldr	w8, [x27]
Lloh8:
	adrp	x9, _OPAL_HARDWARE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _OPAL_HARDWARE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w25, w8
	ccmp	w25, w9, #4, ne
	b.ne	LBB0_9
; %bb.8:
	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_9:
Lloh11:
	adrp	x8, _OPAL_PCI_EEH_FREEZE_CLEAR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OPAL_PCI_EEH_FREEZE_CLEAR@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	w1, [x19]
Lloh14:
	adrp	x8, _OPAL_PCI_DEFAULT_PE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OPAL_PCI_DEFAULT_PE@GOTPAGEOFF]
Lloh16:
	adrp	x9, _OPAL_EEH_ACTION_CLEAR_FREEZE_ALL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _OPAL_EEH_ACTION_CLEAR_FREEZE_ALL@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
Lloh19:
	ldr	w3, [x9]
	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
	b	_opal_call
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_OPAL_SUCCESS,4,2               ; @OPAL_SUCCESS
	.comm	_OPAL_PCI_CONFIG_WRITE_BYTE,4,2 ; @OPAL_PCI_CONFIG_WRITE_BYTE
	.comm	_OPAL_PCI_CONFIG_WRITE_HALF_WORD,4,2 ; @OPAL_PCI_CONFIG_WRITE_HALF_WORD
	.comm	_OPAL_PCI_CONFIG_WRITE_WORD,4,2 ; @OPAL_PCI_CONFIG_WRITE_WORD
	.comm	_OPAL_HARDWARE,4,2              ; @OPAL_HARDWARE
	.comm	_OPAL_PCI_EEH_FREEZE_CLEAR,4,2  ; @OPAL_PCI_EEH_FREEZE_CLEAR
	.comm	_OPAL_PCI_DEFAULT_PE,4,2        ; @OPAL_PCI_DEFAULT_PE
	.comm	_OPAL_EEH_ACTION_CLEAR_FREEZE_ALL,4,2 ; @OPAL_EEH_ACTION_CLEAR_FREEZE_ALL
	.no_dead_strip	_opalpci_write_config
.subsections_via_symbols
