	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_tsq
_init_tsq:                              ## @init_tsq
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	36(%rdi), %edi
	movq	_RSQSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_pci_alloc_consistent
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_TSQSIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	xorl	%r14d, %r14d
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	8(%r15), %rbx
	movq	_TSQ_NUM_ENTRIES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rbx,%rax,4), %rax
	addq	$-4, %rax
	movq	%rax, 24(%r15)
	movq	%rax, 16(%r15)
	cmpq	%rax, %rbx
	ja	LBB0_5
## %bb.3:
	movq	_SAR_TSQE_INVALID@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_cpu_to_le32
	movl	%eax, (%rbx)
	addq	$4, %rbx
	cmpq	24(%r15), %rbx
	jbe	LBB0_4
LBB0_5:
	movq	(%r15), %rdi
	movq	_SAR_REG_TSQB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_writel
	movq	16(%r15), %rdi
	subq	8(%r15), %rdi
	movq	_SAR_REG_TSQH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_writel
	jmp	LBB0_6
LBB0_1:
	movl	32(%r15), %esi
	leaq	L_.str(%rip), %rdi
	callq	_printk
	movl	$-1, %r14d
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	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 TSQ.\n"

	.comm	_TSQSIZE,4,2                    ## @TSQSIZE
	.comm	_TSQ_NUM_ENTRIES,4,2            ## @TSQ_NUM_ENTRIES
	.comm	_SAR_TSQE_INVALID,4,2           ## @SAR_TSQE_INVALID
	.comm	_SAR_REG_TSQB,4,2               ## @SAR_REG_TSQB
	.comm	_SAR_REG_TSQH,4,2               ## @SAR_REG_TSQH
	.no_dead_strip	_init_tsq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_tsq
_init_tsq:                              ; @init_tsq
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w0, [x0, #36]
Lloh0:
	adrp	x8, _RSQSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RSQSIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_pci_alloc_consistent
	str	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _TSQSIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TSQSIZE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	ldr	x20, [x19, #8]
Lloh6:
	adrp	x8, _TSQ_NUM_ENTRIES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TSQ_NUM_ENTRIES@GOTPAGEOFF]
Lloh8:
	ldrsw	x8, [x8]
	add	x8, x20, x8, lsl #2
	sub	x8, x8, #4
	stp	x8, x8, [x19, #16]
	cmp	x20, x8
	b.hi	LBB0_4
; %bb.2:
Lloh9:
	adrp	x21, _SAR_TSQE_INVALID@GOTPAGE
Lloh10:
	ldr	x21, [x21, _SAR_TSQE_INVALID@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_cpu_to_le32
	str	w0, [x20], #4
	ldr	x8, [x19, #24]
	cmp	x20, x8
	b.ls	LBB0_3
LBB0_4:
	ldr	x0, [x19]
Lloh11:
	adrp	x8, _SAR_REG_TSQB@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SAR_REG_TSQB@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_writel
	ldp	x9, x8, [x19, #8]
	sub	x0, x8, x9
Lloh14:
	adrp	x8, _SAR_REG_TSQH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SAR_REG_TSQH@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_writel
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	w1, [x19, #32]
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_RSQSIZE,4,2                    ; @RSQSIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: can't allocate TSQ.\n"

	.comm	_TSQSIZE,4,2                    ; @TSQSIZE
	.comm	_TSQ_NUM_ENTRIES,4,2            ; @TSQ_NUM_ENTRIES
	.comm	_SAR_TSQE_INVALID,4,2           ; @SAR_TSQE_INVALID
	.comm	_SAR_REG_TSQB,4,2               ; @SAR_REG_TSQB
	.comm	_SAR_REG_TSQH,4,2               ; @SAR_REG_TSQH
	.no_dead_strip	_init_tsq
.subsections_via_symbols
