	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_rsq
_init_rsq:                              ## @init_rsq
	.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
	movl	40(%rdi), %edi
	movq	_RSQSIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	8(%r15), %rdx
	callq	_pci_alloc_consistent
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %edx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	16(%r15), %r12
	movq	_RSQ_NUM_ENTRIES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%r12,%rax,8), %rbx
	addq	$-8, %rbx
	movq	%rbx, 24(%r15)
	movq	%rbx, 32(%r15)
	cmpq	%rbx, %r12
	ja	LBB0_4
## %bb.3:
	leaq	(%r12,%rax,8), %rax
	addq	$-7, %rax
	leaq	8(%r12), %rcx
	cmpq	%rcx, %rax
	cmovaq	%rax, %rcx
	movq	%r12, %rax
	notq	%rax
	leaq	(%rcx,%rax), %rsi
	addq	$8, %rsi
	andq	$-8, %rsi
	movq	%r12, %rdi
	callq	___bzero
LBB0_4:
	subq	%r12, %rbx
	movq	_SAR_REG_RSQH@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_writel
	movq	8(%r15), %rdi
	movq	_SAR_REG_RSQB@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_writel
	movl	(%r15), %ebx
	movq	16(%r15), %r12
	movl	(%r14), %edi
	callq	_readl
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_IPRINTK
	movl	(%r15), %r15d
	movl	(%r13), %edi
	callq	_readl
	movslq	%eax, %r12
	movl	(%r14), %edi
	callq	_readl
	movl	%eax, %ebx
	movq	_SAR_REG_RSQT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_readl
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_IPRINTK
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	callq	_printk
	movl	$-1, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RSQSIZE,4,2                    ## @RSQSIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: can't allocate RSQ.\n"

	.comm	_RSQ_NUM_ENTRIES,4,2            ## @RSQ_NUM_ENTRIES
	.comm	_SAR_REG_RSQH,4,2               ## @SAR_REG_RSQH
	.comm	_SAR_REG_RSQB,4,2               ## @SAR_REG_RSQB
L_.str.1:                               ## @.str.1
	.asciz	"%s: RSQ base at 0x%lx (0x%x).\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: RSQ head = 0x%x, base = 0x%x, tail = 0x%x.\n"

	.comm	_SAR_REG_RSQT,4,2               ## @SAR_REG_RSQT
	.no_dead_strip	_init_rsq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_rsq
_init_rsq:                              ; @init_rsq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w0, [x0, #40]
Lloh0:
	adrp	x20, _RSQSIZE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _RSQSIZE@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, x19, #8
	bl	_pci_alloc_consistent
	str	x0, [x19, #16]
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w2, [x20]
	mov	w1, #0
	bl	_memset
	ldr	x20, [x19, #16]
Lloh2:
	adrp	x8, _RSQ_NUM_ENTRIES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RSQ_NUM_ENTRIES@GOTPAGEOFF]
Lloh4:
	ldrsw	x8, [x8]
	add	x8, x20, x8, lsl #3
	sub	x21, x8, #8
	stp	x21, x21, [x19, #24]
	cmp	x20, x21
	b.hi	LBB0_3
; %bb.2:
	sub	x8, x8, #7
	add	x9, x20, #8
	cmp	x8, x9
	csel	x8, x8, x9, hi
	mvn	x9, x20
	add	x8, x8, x9
	add	x8, x8, #8
	and	x1, x8, #0xfffffffffffffff8
	mov	x0, x20
	bl	_bzero
LBB0_3:
	sub	x0, x21, x20
Lloh5:
	adrp	x22, _SAR_REG_RSQH@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SAR_REG_RSQH@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_writel
	ldr	x0, [x19, #8]
Lloh7:
	adrp	x23, _SAR_REG_RSQB@GOTPAGE
Lloh8:
	ldr	x23, [x23, _SAR_REG_RSQB@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_writel
	ldr	w20, [x19]
	ldr	x21, [x19, #16]
	ldr	w0, [x23]
	bl	_readl
	mov	x3, x0
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_IPRINTK
	ldr	w19, [x19]
	ldr	w0, [x22]
	bl	_readl
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x20, w0
	ldr	w0, [x23]
	bl	_readl
	mov	x21, x0
Lloh11:
	adrp	x8, _SAR_REG_RSQT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SAR_REG_RSQT@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_readl
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	mov	x3, x21
	bl	_IPRINTK
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	ldr	w1, [x19]
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_RSQSIZE,4,2                    ; @RSQSIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: can't allocate RSQ.\n"

	.comm	_RSQ_NUM_ENTRIES,4,2            ; @RSQ_NUM_ENTRIES
	.comm	_SAR_REG_RSQH,4,2               ; @SAR_REG_RSQH
	.comm	_SAR_REG_RSQB,4,2               ; @SAR_REG_RSQB
l_.str.1:                               ; @.str.1
	.asciz	"%s: RSQ base at 0x%lx (0x%x).\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: RSQ head = 0x%x, base = 0x%x, tail = 0x%x.\n"

	.comm	_SAR_REG_RSQT,4,2               ; @SAR_REG_RSQT
	.no_dead_strip	_init_rsq
.subsections_via_symbols
