	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_sd7220_reg_mod
_qib_sd7220_reg_mod:                    ## @qib_sd7220_reg_mod
	.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	%esi, %ebx
	leal	-128(%rbx), %eax
	movl	$-1, %r15d
	cmpl	$2, %eax
	ja	LBB0_16
## %bb.1:
	movl	%ecx, %r13d
	movq	%rdi, %r14
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	cltq
	leaq	l_switch.table.qib_sd7220_reg_mod(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %r12d
	movq	(%rdi), %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_epb_access
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movl	%r13d, -56(%rbp)                ## 4-byte Spill
	movq	_EPB_TRANS_TRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	testl	%r13d, %r13d
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.5:
	movq	_EPB_TRANS_RDY@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_qib_read_kreg32
	movl	%eax, %ebx
	testl	%eax, (%r15)
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$5, %edi
	callq	_udelay
	decl	%r13d
	jne	LBB0_6
	jmp	LBB0_8
LBB0_2:
	movq	(%r14), %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_16
LBB0_4:
                                        ## implicit-def: $ebx
LBB0_8:
	movl	%ebx, -44(%rbp)
	xorl	%r13d, %r13d
LBB0_15:
	movl	$-1, %ebx
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$-1, %edx
	callq	_epb_access
	movq	_EPB_DATA_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	andl	-44(%rbp), %r15d
	testl	%eax, %eax
	cmovsl	%ebx, %r15d
	movq	(%r14), %rdi
	callq	_spin_unlock_irqrestore
	testl	%r13d, %r13d
	cmovlel	%ebx, %r15d
LBB0_16:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%ebx, -44(%rbp)
	testl	%r13d, %r13d
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	jle	LBB0_15
## %bb.10:
	movl	$1, %r13d
	cmpl	$255, %ecx
	je	LBB0_12
## %bb.11:
	movq	_EPB_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	-48(%rbp), %edx                 ## 4-byte Folded Reload
	movl	%edx, -44(%rbp)
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_epb_trans
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, %r13d
LBB0_12:
	testl	%ecx, %ecx
	je	LBB0_15
## %bb.13:
	testl	%r13d, %r13d
	jle	LBB0_15
## %bb.14:
	movl	-44(%rbp), %eax
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %edx
	andl	%ecx, %edx
	xorl	%eax, %edx
	movq	_EPB_DATA_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	orl	-48(%rbp), %edx                 ## 4-byte Folded Reload
	movl	%edx, -44(%rbp)
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_epb_trans
	movl	%eax, %r13d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_kr_ibsd_epb_transaction_reg,4,2 ## @kr_ibsd_epb_transaction_reg
	.comm	_kr_pciesd_epb_transaction_reg,4,2 ## @kr_pciesd_epb_transaction_reg
	.comm	_EPB_TRANS_TRIES,4,2            ## @EPB_TRANS_TRIES
	.comm	_EPB_TRANS_RDY,4,2              ## @EPB_TRANS_RDY
	.comm	_EPB_RD,4,2                     ## @EPB_RD
	.comm	_EPB_DATA_MASK,4,2              ## @EPB_DATA_MASK
	.no_dead_strip	_qib_sd7220_reg_mod
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.qib_sd7220_reg_mod
l_switch.table.qib_sd7220_reg_mod:
	.quad	_kr_pciesd_epb_transaction_reg
	.quad	_kr_pciesd_epb_transaction_reg
	.quad	_kr_ibsd_epb_transaction_reg

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_sd7220_reg_mod
_qib_sd7220_reg_mod:                    ; @qib_sd7220_reg_mod
	.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
	sub	w8, w1, #128
	cmp	w8, #2
	b.hi	LBB0_6
; %bb.1:
	mov	x23, x4
	mov	x24, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x9, l_switch.table.qib_sd7220_reg_mod@PAGE
Lloh1:
	add	x9, x9, l_switch.table.qib_sd7220_reg_mod@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w22, [x8]
	ldr	x0, [x0]
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_epb_access
	tbnz	w0, #31, LBB0_7
; %bb.2:
Lloh2:
	adrp	x8, _EPB_TRANS_TRIES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EPB_TRANS_TRIES@GOTPAGEOFF]
Lloh4:
	ldr	w25, [x8]
Lloh5:
	adrp	x27, _EPB_DATA_MASK@GOTPAGE
Lloh6:
	ldr	x27, [x27, _EPB_DATA_MASK@GOTPAGEOFF]
	cbz	w25, LBB0_8
; %bb.3:
Lloh7:
	adrp	x28, _EPB_TRANS_RDY@GOTPAGE
Lloh8:
	ldr	x28, [x28, _EPB_TRANS_RDY@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_qib_read_kreg32
	mov	x26, x0
	ldr	w8, [x28]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #5
	bl	_udelay
	subs	w25, w25, #1
	b.ne	LBB0_4
	b	LBB0_9
LBB0_6:
	mov	w0, #-1
	b	LBB0_11
LBB0_7:
	ldr	x0, [x19]
	bl	_spin_unlock_irqrestore
	mov	w0, #-1
	b	LBB0_11
LBB0_8:
                                        ; implicit-def: $w26
LBB0_9:
	mov	w25, #0
	str	w26, [sp, #12]
LBB0_10:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #-1
	bl	_epb_access
	ldr	w8, [sp, #12]
	ldr	w9, [x27]
	and	w8, w9, w8
	cmp	w0, #0
	csinv	w20, w8, wzr, ge
	ldr	x0, [x19]
	bl	_spin_unlock_irqrestore
	cmp	w25, #1
	csinv	w0, w20, wzr, ge
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:
	str	w26, [sp, #12]
	cmp	w25, #1
	b.lt	LBB0_10
; %bb.13:
	cmp	w23, #255
	b.ne	LBB0_15
; %bb.14:
	mov	w25, #1
	b	LBB0_16
LBB0_15:
Lloh9:
	adrp	x8, _EPB_RD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EPB_RD@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w2, w8, w21
	str	w2, [sp, #12]
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x22
	bl	_epb_trans
	mov	x25, x0
LBB0_16:
	cbz	w23, LBB0_10
; %bb.17:
	cmp	w25, #1
	b.lt	LBB0_10
; %bb.18:
	and	w8, w23, w24
	ldr	w9, [sp, #12]
	bic	w9, w9, w23
	orr	w8, w9, w8
	ldr	w9, [x27]
	and	w8, w8, w9
	orr	w2, w8, w21
	str	w2, [sp, #12]
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x22
	bl	_epb_trans
	mov	x25, x0
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_kr_ibsd_epb_transaction_reg,4,2 ; @kr_ibsd_epb_transaction_reg
	.comm	_kr_pciesd_epb_transaction_reg,4,2 ; @kr_pciesd_epb_transaction_reg
	.comm	_EPB_TRANS_TRIES,4,2            ; @EPB_TRANS_TRIES
	.comm	_EPB_TRANS_RDY,4,2              ; @EPB_TRANS_RDY
	.comm	_EPB_RD,4,2                     ; @EPB_RD
	.comm	_EPB_DATA_MASK,4,2              ; @EPB_DATA_MASK
	.no_dead_strip	_qib_sd7220_reg_mod
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.qib_sd7220_reg_mod
l_switch.table.qib_sd7220_reg_mod:
	.quad	_kr_pciesd_epb_transaction_reg
	.quad	_kr_pciesd_epb_transaction_reg
	.quad	_kr_ibsd_epb_transaction_reg

.subsections_via_symbols
