	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function safexcel_hw_setup_rdesc_rings
_safexcel_hw_setup_rdesc_rings:         ## @safexcel_hw_setup_rdesc_rings
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_EIP197_RD64_FETCH_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	20(%rdi), %edi
	callq	_BIT
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %ebx
	decl	%ebx
	movb	20(%r15), %cl
	sarl	%cl, %ebx
	movb	24(%r15), %cl
	movq	_SAFEXCEL_HW_EIP197@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %eax
	shll	%cl, %eax
	cltd
	idivl	%ebx
	testl	%esi, (%r15)
	je	LBB0_2
## %bb.1:
	movq	_uint@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_EIP197_FETCH_DEPTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	imull	4(%r15), %edx
	movl	%eax, %esi
	callq	_min_t
	jmp	LBB0_3
LBB0_2:
	decl	%eax
LBB0_3:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	cmpl	$0, 8(%r15)
	jle	LBB0_6
## %bb.4:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	shll	$16, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %rax
	movl	(%rax,%r13,4), %edi
	callq	_lower_32_bits
	movl	%eax, %r12d
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_EIP197_HIA_RDR
	movq	_EIP197_HIA_xDR_RING_BASE_ADDR_LO@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movl	%r12d, %edi
	movq	%rax, %rsi
	callq	_writel
	movq	32(%r15), %rax
	movl	(%rax,%r13,4), %edi
	callq	_upper_32_bits
	movl	%eax, %r12d
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_EIP197_HIA_RDR
	movq	_EIP197_HIA_xDR_RING_BASE_ADDR_HI@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movl	%r12d, %edi
	movq	%rax, %rsi
	callq	_writel
	movl	12(%r15), %ebx
	shll	$16, %ebx
	movq	_EIP197_xDR_DESC_MODE_64BIT@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	orl	16(%r15), %ebx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_EIP197_HIA_RDR
	movq	_EIP197_HIA_xDR_DESC_SIZE@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_writel
	movzbl	20(%r15), %ecx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	shll	%cl, %eax
	imull	%r14d, %eax
	movl	12(%r15), %ebx
	imull	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_EIP197_HIA_RDR
	movq	_EIP197_HIA_xDR_CFG@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_writel
	movq	_WR_CACHE_3BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_EIP197_HIA_xDR_CFG_WR_CACHE
	movl	%eax, %ebx
	movq	_RD_CACHE_3BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_EIP197_HIA_xDR_CFG_RD_CACHE
	orl	%eax, %ebx
	movq	_EIP197_HIA_xDR_WR_RES_BUF@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_EIP197_HIA_xDR_WR_CTRL_BUF@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_EIP197_HIA_RDR
	movq	_EIP197_HIA_xDR_DMA_CFG@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_writel
	movl	$7, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_EIP197_HIA_RDR
	movq	_EIP197_HIA_xDR_STAT@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_writel
	movq	%r15, %rdi
	callq	_EIP197_HIA_AIC_R
	movq	%rax, %rbx
	movl	%r13d, %edi
	callq	_EIP197_HIA_AIC_R_ENABLE_CTRL
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_readl
	movl	%eax, %r12d
	movl	%r13d, %edi
	callq	_EIP197_RDR_IRQ
	orl	%eax, %r12d
	movq	%r15, %rdi
	callq	_EIP197_HIA_AIC_R
	movq	%rax, %rbx
	movl	%r13d, %edi
	callq	_EIP197_HIA_AIC_R_ENABLE_CTRL
	addq	%rax, %rbx
	movl	%r12d, %edi
	movq	%rbx, %rsi
	callq	_writel
	incq	%r13
	movslq	8(%r15), %rax
	cmpq	%rax, %r13
	jl	LBB0_5
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIP197_RD64_FETCH_SIZE,4,2     ## @EIP197_RD64_FETCH_SIZE
	.comm	_SAFEXCEL_HW_EIP197,4,2         ## @SAFEXCEL_HW_EIP197
	.comm	_uint,4,2                       ## @uint
	.comm	_EIP197_FETCH_DEPTH,4,2         ## @EIP197_FETCH_DEPTH
	.comm	_EIP197_HIA_xDR_RING_BASE_ADDR_LO,8,3 ## @EIP197_HIA_xDR_RING_BASE_ADDR_LO
	.comm	_EIP197_HIA_xDR_RING_BASE_ADDR_HI,8,3 ## @EIP197_HIA_xDR_RING_BASE_ADDR_HI
	.comm	_EIP197_xDR_DESC_MODE_64BIT,4,2 ## @EIP197_xDR_DESC_MODE_64BIT
	.comm	_EIP197_HIA_xDR_DESC_SIZE,8,3   ## @EIP197_HIA_xDR_DESC_SIZE
	.comm	_EIP197_HIA_xDR_CFG,8,3         ## @EIP197_HIA_xDR_CFG
	.comm	_WR_CACHE_3BITS,4,2             ## @WR_CACHE_3BITS
	.comm	_RD_CACHE_3BITS,4,2             ## @RD_CACHE_3BITS
	.comm	_EIP197_HIA_xDR_WR_RES_BUF,4,2  ## @EIP197_HIA_xDR_WR_RES_BUF
	.comm	_EIP197_HIA_xDR_WR_CTRL_BUF,4,2 ## @EIP197_HIA_xDR_WR_CTRL_BUF
	.comm	_EIP197_HIA_xDR_DMA_CFG,8,3     ## @EIP197_HIA_xDR_DMA_CFG
	.comm	_EIP197_HIA_xDR_STAT,8,3        ## @EIP197_HIA_xDR_STAT
	.no_dead_strip	_safexcel_hw_setup_rdesc_rings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function safexcel_hw_setup_rdesc_rings
_safexcel_hw_setup_rdesc_rings:         ; @safexcel_hw_setup_rdesc_rings
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _EIP197_RD64_FETCH_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIP197_RD64_FETCH_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldr	w0, [x0, #20]
	bl	_BIT
	add	w8, w20, w0
	sub	w8, w8, #1
	ldp	w9, w10, [x19, #20]
	asr	w24, w8, w9
Lloh3:
	adrp	x8, _SAFEXCEL_HW_EIP197@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SAFEXCEL_HW_EIP197@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh5:
	ldr	w8, [x8]
	mov	w11, #1
	lsl	w10, w11, w10
	sdiv	w1, w10, w24
	tst	w8, w9
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _uint@GOTPAGE
Lloh7:
	ldr	x8, [x8, _uint@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w8, [x19, #4]
Lloh9:
	adrp	x9, _EIP197_FETCH_DEPTH@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EIP197_FETCH_DEPTH@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	mul	w2, w9, w8
	bl	_min_t
	mov	x20, x0
	b	LBB0_3
LBB0_2:
	sub	w20, w1, #1
LBB0_3:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x21, #0
	lsl	w26, w20, #16
Lloh12:
	adrp	x28, _EIP197_HIA_xDR_WR_CTRL_BUF@GOTPAGE
Lloh13:
	ldr	x28, [x28, _EIP197_HIA_xDR_WR_CTRL_BUF@GOTPAGEOFF]
Lloh14:
	adrp	x25, _EIP197_HIA_xDR_DMA_CFG@GOTPAGE
Lloh15:
	ldr	x25, [x25, _EIP197_HIA_xDR_DMA_CFG@GOTPAGEOFF]
Lloh16:
	adrp	x27, _EIP197_HIA_xDR_STAT@GOTPAGE
Lloh17:
	ldr	x27, [x27, _EIP197_HIA_xDR_STAT@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	lsl	x23, x21, #2
	ldr	w0, [x8, x23]
	bl	_lower_32_bits
	mov	x22, x0
	mov	x0, x19
	mov	x1, x21
	bl	_EIP197_HIA_RDR
Lloh18:
	adrp	x8, _EIP197_HIA_xDR_RING_BASE_ADDR_LO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIP197_HIA_xDR_RING_BASE_ADDR_LO@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	add	x1, x8, x0
	mov	x0, x22
	bl	_writel
	ldr	x8, [x19, #32]
	ldr	w0, [x8, x23]
	bl	_upper_32_bits
	mov	x22, x0
	mov	x0, x19
	mov	x1, x21
	bl	_EIP197_HIA_RDR
Lloh21:
	adrp	x8, _EIP197_HIA_xDR_RING_BASE_ADDR_HI@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EIP197_HIA_xDR_RING_BASE_ADDR_HI@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	add	x1, x8, x0
	mov	x0, x22
	bl	_writel
Lloh24:
	adrp	x8, _EIP197_xDR_DESC_MODE_64BIT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EIP197_xDR_DESC_MODE_64BIT@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldp	w9, w10, [x19, #12]
	orr	w8, w8, w9, lsl #16
	orr	w22, w8, w10
	mov	x0, x19
	mov	x1, x21
	bl	_EIP197_HIA_RDR
Lloh27:
	adrp	x8, _EIP197_HIA_xDR_DESC_SIZE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EIP197_HIA_xDR_DESC_SIZE@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	add	x1, x8, x0
	mov	x0, x22
	bl	_writel
	ldr	w8, [x19, #20]
	lsl	w8, w24, w8
	mul	w8, w26, w8
	ldr	w9, [x19, #12]
	mul	w9, w9, w20
	orr	w22, w8, w9
	mov	x0, x19
	mov	x1, x21
	bl	_EIP197_HIA_RDR
Lloh30:
	adrp	x8, _EIP197_HIA_xDR_CFG@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EIP197_HIA_xDR_CFG@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	add	x1, x8, x0
	mov	x0, x22
	bl	_writel
Lloh33:
	adrp	x8, _WR_CACHE_3BITS@GOTPAGE
Lloh34:
	ldr	x8, [x8, _WR_CACHE_3BITS@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	bl	_EIP197_HIA_xDR_CFG_WR_CACHE
	mov	x22, x0
Lloh36:
	adrp	x8, _RD_CACHE_3BITS@GOTPAGE
Lloh37:
	ldr	x8, [x8, _RD_CACHE_3BITS@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	bl	_EIP197_HIA_xDR_CFG_RD_CACHE
Lloh39:
	adrp	x8, _EIP197_HIA_xDR_WR_RES_BUF@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EIP197_HIA_xDR_WR_RES_BUF@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	ldr	w9, [x28]
	orr	w10, w0, w22
	orr	w8, w10, w8
	orr	w22, w8, w9
	mov	x0, x19
	mov	x1, x21
	bl	_EIP197_HIA_RDR
	ldr	x8, [x25]
	add	x1, x8, x0
	mov	x0, x22
	bl	_writel
	mov	w0, #7
	mov	w1, #0
	bl	_GENMASK
	mov	x22, x0
	mov	x0, x19
	mov	x1, x21
	bl	_EIP197_HIA_RDR
	ldr	x8, [x27]
	add	x1, x8, x0
	mov	x0, x22
	bl	_writel
	mov	x0, x19
	bl	_EIP197_HIA_AIC_R
	mov	x22, x0
	mov	x0, x21
	bl	_EIP197_HIA_AIC_R_ENABLE_CTRL
	add	x0, x0, x22
	bl	_readl
	mov	x22, x0
	mov	x0, x21
	bl	_EIP197_RDR_IRQ
	orr	w22, w0, w22
	mov	x0, x19
	bl	_EIP197_HIA_AIC_R
	mov	x23, x0
	mov	x0, x21
	bl	_EIP197_HIA_AIC_R_ENABLE_CTRL
	add	x1, x0, x23
	mov	x0, x22
	bl	_writel
	add	x21, x21, #1
	ldrsw	x8, [x19, #8]
	cmp	x21, x8
	b.lt	LBB0_5
LBB0_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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EIP197_RD64_FETCH_SIZE,4,2     ; @EIP197_RD64_FETCH_SIZE
	.comm	_SAFEXCEL_HW_EIP197,4,2         ; @SAFEXCEL_HW_EIP197
	.comm	_uint,4,2                       ; @uint
	.comm	_EIP197_FETCH_DEPTH,4,2         ; @EIP197_FETCH_DEPTH
	.comm	_EIP197_HIA_xDR_RING_BASE_ADDR_LO,8,3 ; @EIP197_HIA_xDR_RING_BASE_ADDR_LO
	.comm	_EIP197_HIA_xDR_RING_BASE_ADDR_HI,8,3 ; @EIP197_HIA_xDR_RING_BASE_ADDR_HI
	.comm	_EIP197_xDR_DESC_MODE_64BIT,4,2 ; @EIP197_xDR_DESC_MODE_64BIT
	.comm	_EIP197_HIA_xDR_DESC_SIZE,8,3   ; @EIP197_HIA_xDR_DESC_SIZE
	.comm	_EIP197_HIA_xDR_CFG,8,3         ; @EIP197_HIA_xDR_CFG
	.comm	_WR_CACHE_3BITS,4,2             ; @WR_CACHE_3BITS
	.comm	_RD_CACHE_3BITS,4,2             ; @RD_CACHE_3BITS
	.comm	_EIP197_HIA_xDR_WR_RES_BUF,4,2  ; @EIP197_HIA_xDR_WR_RES_BUF
	.comm	_EIP197_HIA_xDR_WR_CTRL_BUF,4,2 ; @EIP197_HIA_xDR_WR_CTRL_BUF
	.comm	_EIP197_HIA_xDR_DMA_CFG,8,3     ; @EIP197_HIA_xDR_DMA_CFG
	.comm	_EIP197_HIA_xDR_STAT,8,3        ; @EIP197_HIA_xDR_STAT
	.no_dead_strip	_safexcel_hw_setup_rdesc_rings
.subsections_via_symbols
