	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_sdma_7220_regs
_init_sdma_7220_regs:                   ## @init_sdma_7220_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, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	24(%rdi), %r15
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	movq	_kr_senddmabase@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rdi), %rdx
	movq	%r15, %rdi
	callq	_qib_write_kreg
	movq	%r14, %rdi
	callq	_qib_sdma_7220_setlengen
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_qib_sdma_update_7220_tail
	movq	_kr_senddmaheadaddr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rdx
	movq	%r15, %rdi
	callq	_qib_write_kreg
	movl	4(%r15), %r12d
	addl	(%r15), %r12d
	movq	8(%r15), %rax
	movl	(%rax), %eax
	movl	%r12d, %ebx
	subl	%eax, %ebx
	cmpl	%r12d, %ebx
	jae	LBB0_1
## %bb.2:
	testb	$1, %al
	je	LBB0_4
## %bb.3:
	movl	%ebx, %edx
	shrl	$6, %edx
	movl	$1, %esi
	movl	%ebx, %ecx
	shlq	%cl, %rsi
	orq	%rsi, -80(%rbp,%rdx,8)
	incl	%ebx
LBB0_4:
	cmpl	$1, %eax
	je	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	shrl	$6, %eax
	movl	$1, %edx
	movl	%ebx, %ecx
	shlq	%cl, %rdx
	orq	%rdx, -80(%rbp,%rax,8)
	leal	1(%rbx), %ecx
	movl	%ecx, %eax
	movl	$1, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shlq	%cl, %rdx
	shrl	$6, %eax
	orq	%rdx, -80(%rbp,%rax,8)
	addl	$2, %ebx
	cmpl	%ebx, %r12d
	jne	LBB0_5
LBB0_6:
	movq	-80(%rbp), %rdx
	movq	-72(%rbp), %r13
	movq	-64(%rbp), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	%r12d, %ebx
	jmp	LBB0_7
LBB0_1:
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%edx, %edx
LBB0_7:
	movq	_kr_senddmabufmask0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_qib_write_kreg
	movq	_kr_senddmabufmask1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r13, %rdx
	callq	_qib_write_kreg
	movq	_kr_senddmabufmask2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_qib_write_kreg
	movl	%ebx, 16(%r14)
	movl	%r12d, 20(%r14)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_kr_senddmabase,4,2             ## @kr_senddmabase
	.comm	_kr_senddmaheadaddr,4,2         ## @kr_senddmaheadaddr
	.comm	_kr_senddmabufmask0,4,2         ## @kr_senddmabufmask0
	.comm	_kr_senddmabufmask1,4,2         ## @kr_senddmabufmask1
	.comm	_kr_senddmabufmask2,4,2         ## @kr_senddmabufmask2
	.no_dead_strip	_init_sdma_7220_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_7220_regs
_init_sdma_7220_regs:                   ; @init_sdma_7220_regs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	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	x20, [x0, #24]
	stp	xzr, xzr, [sp]
	str	xzr, [sp, #16]
Lloh3:
	adrp	x8, _kr_senddmabase@GOTPAGE
Lloh4:
	ldr	x8, [x8, _kr_senddmabase@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x2, [x0]
	mov	x0, x20
	bl	_qib_write_kreg
	mov	x0, x19
	bl	_qib_sdma_7220_setlengen
	mov	x0, x19
	mov	w1, #0
	bl	_qib_sdma_update_7220_tail
Lloh6:
	adrp	x8, _kr_senddmaheadaddr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _kr_senddmaheadaddr@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
	mov	x0, x20
	bl	_qib_write_kreg
	ldp	w9, w10, [x20]
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	add	w23, w10, w9
	sub	w24, w23, w8
	cmp	w24, w23
	b.hs	LBB0_4
; %bb.1:
	neg	w8, w8
	mov	w9, #1
	mov	x10, sp
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w11, w23, w8
	lsr	w12, w11, #6
	lsl	x11, x9, x11
	lsl	x12, x12, #3
	ldr	x13, [x10, x12]
	orr	x11, x13, x11
	str	x11, [x10, x12]
	adds	w8, w8, #1
	b.lo	LBB0_2
; %bb.3:
	ldp	x2, x22, [sp]
	mov	x24, x23
	ldr	x21, [sp, #16]
	b	LBB0_5
LBB0_4:
	mov	x21, #0
	mov	x22, #0
	mov	x2, #0
LBB0_5:
Lloh9:
	adrp	x8, _kr_senddmabufmask0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _kr_senddmabufmask0@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_qib_write_kreg
Lloh12:
	adrp	x8, _kr_senddmabufmask1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _kr_senddmabufmask1@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	bl	_qib_write_kreg
Lloh15:
	adrp	x8, _kr_senddmabufmask2@GOTPAGE
Lloh16:
	ldr	x8, [x8, _kr_senddmabufmask2@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_qib_write_kreg
	stp	w24, w23, [x19, #16]
	ldr	x8, [sp, #24]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	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
	add	sp, sp, #96
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_kr_senddmabase,4,2             ; @kr_senddmabase
	.comm	_kr_senddmaheadaddr,4,2         ; @kr_senddmaheadaddr
	.comm	_kr_senddmabufmask0,4,2         ; @kr_senddmabufmask0
	.comm	_kr_senddmabufmask1,4,2         ; @kr_senddmabufmask1
	.comm	_kr_senddmabufmask2,4,2         ; @kr_senddmabufmask2
	.no_dead_strip	_init_sdma_7220_regs
.subsections_via_symbols
