	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_sdma_7322_regs
_init_sdma_7322_regs:                   ## @init_sdma_7322_regs
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	32(%rdi), %r14
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	movq	_krp_senddmabase@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rdi), %rdx
	callq	_qib_write_kreg_port
	movq	%rbx, %rdi
	callq	_qib_sdma_7322_setlengen
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_qib_sdma_update_7322_tail
	movq	_krp_senddmareloadcnt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_sdma_idle_cnt@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rbx, %rdi
	callq	_qib_write_kreg_port
	movq	_krp_senddmadesccnt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_qib_write_kreg_port
	movq	_krp_senddmaheadaddr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_qib_write_kreg_port
	movl	(%r14), %esi
	movq	16(%r14), %rax
	movl	(%rax), %ecx
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%eax, %r15d
	movl	8(%r14), %r12d
	addl	4(%r14), %r12d
	cmpl	$1, %esi
	jne	LBB0_3
	jmp	LBB0_4
LBB0_1:
	movl	8(%r14), %r12d
	addl	4(%r14), %r12d
	movl	%ecx, %r15d
LBB0_3:
	cmpl	$2, 16(%rbx)
	cmovel	%r15d, %ecx
	movl	%ecx, %eax
LBB0_4:
	subl	%eax, %r12d
	leal	(%r12,%r15), %eax
	movl	%r12d, 20(%rbx)
	movl	%eax, 24(%rbx)
	cmpl	%eax, %r12d
	jae	LBB0_5
## %bb.6:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	_BITS_PER_LONG@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %ebx
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%ebx
	movl	%eax, %r13d
	decl	%ebx
	andl	%r12d, %ebx
	xorl	%edi, %edi
	cmpl	$3, %eax
	setae	%dil
	callq	_BUG_ON
	movl	$1, %eax
	movl	%ebx, %ecx
	shlq	%cl, %rax
	orq	%rax, -80(%rbp,%r13,8)
	incl	%r12d
	decl	%r15d
	jne	LBB0_7
## %bb.8:
	movq	-80(%rbp), %rdx
	movq	-72(%rbp), %r14
	movq	-64(%rbp), %r15
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_5:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	xorl	%edx, %edx
LBB0_9:
	movq	_krp_senddmabufmask0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_qib_write_kreg_port
	movq	_krp_senddmabufmask1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_qib_write_kreg_port
	movq	_krp_senddmabufmask2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_qib_write_kreg_port
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_krp_senddmabase,4,2            ## @krp_senddmabase
	.comm	_krp_senddmareloadcnt,4,2       ## @krp_senddmareloadcnt
	.comm	_sdma_idle_cnt,8,3              ## @sdma_idle_cnt
	.comm	_krp_senddmadesccnt,4,2         ## @krp_senddmadesccnt
	.comm	_krp_senddmaheadaddr,4,2        ## @krp_senddmaheadaddr
	.comm	_BITS_PER_LONG,4,2              ## @BITS_PER_LONG
	.comm	_krp_senddmabufmask0,4,2        ## @krp_senddmabufmask0
	.comm	_krp_senddmabufmask1,4,2        ## @krp_senddmabufmask1
	.comm	_krp_senddmabufmask2,4,2        ## @krp_senddmabufmask2
	.no_dead_strip	_init_sdma_7322_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_sdma_7322_regs
_init_sdma_7322_regs:                   ; @init_sdma_7322_regs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x21, [x0, #32]
	stp	xzr, xzr, [sp]
	str	xzr, [sp, #16]
Lloh3:
	adrp	x8, _krp_senddmabase@GOTPAGE
Lloh4:
	ldr	x8, [x8, _krp_senddmabase@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x2, [x0]
	bl	_qib_write_kreg_port
	mov	x0, x19
	bl	_qib_sdma_7322_setlengen
	mov	x0, x19
	mov	w1, #0
	bl	_qib_sdma_update_7322_tail
Lloh6:
	adrp	x8, _krp_senddmareloadcnt@GOTPAGE
Lloh7:
	ldr	x8, [x8, _krp_senddmareloadcnt@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _sdma_idle_cnt@GOTPAGE
Lloh10:
	ldr	x8, [x8, _sdma_idle_cnt@GOTPAGEOFF]
Lloh11:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_qib_write_kreg_port
Lloh12:
	adrp	x8, _krp_senddmadesccnt@GOTPAGE
Lloh13:
	ldr	x8, [x8, _krp_senddmadesccnt@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_qib_write_kreg_port
Lloh15:
	adrp	x8, _krp_senddmaheadaddr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _krp_senddmaheadaddr@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
	mov	x0, x19
	bl	_qib_write_kreg_port
	ldr	w10, [x21]
	ldr	x8, [x21, #16]
	ldr	w8, [x8]
	cbz	w10, LBB0_2
; %bb.1:
	sdiv	w20, w8, w10
	ldp	w9, w11, [x21, #4]
	add	w9, w11, w9
	mov	x11, x20
	cmp	w10, #1
	b.ne	LBB0_3
	b	LBB0_4
LBB0_2:
	ldp	w9, w10, [x21, #4]
	add	w9, w10, w9
	mov	x20, x8
LBB0_3:
	ldr	w10, [x19, #16]
	cmp	w10, #2
	csel	w11, w20, w8, eq
LBB0_4:
	sub	w21, w9, w11
	add	w8, w21, w20
	stp	w21, w8, [x19, #20]
	cmp	w21, w8
	b.hs	LBB0_8
; %bb.5:
Lloh18:
	adrp	x22, _BITS_PER_LONG@GOTPAGE
Lloh19:
	ldr	x22, [x22, _BITS_PER_LONG@GOTPAGEOFF]
	mov	w23, #1
	mov	x24, sp
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	udiv	w25, w21, w8
	sub	w8, w8, #1
	and	w26, w8, w21
	cmp	w25, #2
	cset	w0, hi
	bl	_BUG_ON
	lsl	x8, x25, #3
	ldr	x9, [x24, x8]
	lsl	x10, x23, x26
	orr	x9, x10, x9
	str	x9, [x24, x8]
	add	w21, w21, #1
	subs	w20, w20, #1
	b.ne	LBB0_6
; %bb.7:
	ldp	x2, x21, [sp]
	ldr	x20, [sp, #16]
	b	LBB0_9
LBB0_8:
	mov	x20, #0
	mov	x21, #0
	mov	x2, #0
LBB0_9:
Lloh20:
	adrp	x8, _krp_senddmabufmask0@GOTPAGE
Lloh21:
	ldr	x8, [x8, _krp_senddmabufmask0@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qib_write_kreg_port
Lloh23:
	adrp	x8, _krp_senddmabufmask1@GOTPAGE
Lloh24:
	ldr	x8, [x8, _krp_senddmabufmask1@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_qib_write_kreg_port
Lloh26:
	adrp	x8, _krp_senddmabufmask2@GOTPAGE
Lloh27:
	ldr	x8, [x8, _krp_senddmabufmask2@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_qib_write_kreg_port
	ldr	x8, [sp, #24]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	w0, #0
	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
	add	sp, sp, #112
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_krp_senddmabase,4,2            ; @krp_senddmabase
	.comm	_krp_senddmareloadcnt,4,2       ; @krp_senddmareloadcnt
	.comm	_sdma_idle_cnt,8,3              ; @sdma_idle_cnt
	.comm	_krp_senddmadesccnt,4,2         ; @krp_senddmadesccnt
	.comm	_krp_senddmaheadaddr,4,2        ; @krp_senddmaheadaddr
	.comm	_BITS_PER_LONG,4,2              ; @BITS_PER_LONG
	.comm	_krp_senddmabufmask0,4,2        ; @krp_senddmabufmask0
	.comm	_krp_senddmabufmask1,4,2        ; @krp_senddmabufmask1
	.comm	_krp_senddmabufmask2,4,2        ; @krp_senddmabufmask2
	.no_dead_strip	_init_sdma_7322_regs
.subsections_via_symbols
