	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath10k_htt_rx_alloc            ## -- Begin function ath10k_htt_rx_alloc
	.p2align	4, 0x90
_ath10k_htt_rx_alloc:                   ## @ath10k_htt_rx_alloc
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	88(%rdi), %r14
	movq	8(%r14), %rax
	movq	_ATH10K_DEV_TYPE_HL@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.1:
	movq	%rdi, %rbx
	movl	$0, (%rdi)
	movq	_HTT_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 8(%rbx)
	leal	-1(%rdi), %eax
	movl	%eax, 12(%rbx)
	movl	4(%r14), %eax
	movl	%eax, 32(%rbx)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_is_power_of_2
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	8(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	$8, %esi
	callq	_kcalloc
	movl	%eax, 16(%rbx)
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	movq	%rbx, %rdi
	callq	_ath10k_htt_get_rx_ring_size
	movq	88(%rbx), %rcx
	movl	(%rcx), %edi
	movl	(%r12), %ecx
	leaq	-40(%rbp), %rdx
	movl	%eax, %esi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	%rax, %r15
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_ath10k_htt_config_paddrs_ring
	movq	-40(%rbp), %rax
	movq	%rax, 24(%rbx)
	movq	88(%rbx), %rax
	movl	(%rax), %edi
	movl	(%r12), %ecx
	leaq	-40(%rbp), %rdx
	movl	$8, %esi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	80(%rbx), %rdi
	movq	%rax, 64(%rbx)
	movq	-40(%rbp), %rcx
	movq	%rcx, 72(%rbx)
	movl	12(%rbx), %ecx
	movl	%ecx, 40(%rbx)
	movq	$0, (%rax)
	movq	_ath10k_htt_rx_ring_refill_retry@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	callq	_timer_setup
	leaq	56(%rbx), %rdi
	callq	_spin_lock_init
	movq	$0, 48(%rbx)
	movl	$0, 40(%rbx)
	movl	36(%rbx), %edi
	callq	_hash_init
	leaq	108(%rbx), %rdi
	callq	_skb_queue_head_init
	leaq	104(%rbx), %rdi
	callq	_skb_queue_head_init
	leaq	100(%rbx), %rdi
	callq	_skb_queue_head_init
	leaq	96(%rbx), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	movq	_ATH10K_DBG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %ecx
	movl	32(%rbx), %r8d
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_ath10k_dbg
	jmp	LBB0_11
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_ath10k_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	movq	88(%rbx), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_ath10k_htt_get_rx_ring_size
	movq	24(%rbx), %rcx
	movl	%r14d, %edi
	movq	%rax, %rsi
	movq	%r15, %rdx
	callq	_dma_free_coherent
LBB0_8:
	movl	16(%rbx), %edi
	callq	_kfree
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH10K_DEV_TYPE_HL,8,3         ## @ATH10K_DEV_TYPE_HL
	.comm	_HTT_RX_RING_SIZE,4,2           ## @HTT_RX_RING_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"htt rx ring size is not power of 2\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ath10k_htt_rx_ring_refill_retry,4,2 ## @ath10k_htt_rx_ring_refill_retry
	.comm	_ATH10K_DBG_BOOT,4,2            ## @ATH10K_DBG_BOOT
L_.str.1:                               ## @.str.1
	.asciz	"htt rx ring size %d fill_level %d\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath10k_htt_rx_alloc            ; -- Begin function ath10k_htt_rx_alloc
	.p2align	2
_ath10k_htt_rx_alloc:                   ; @ath10k_htt_rx_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x20, [x0, #88]
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _ATH10K_DEV_TYPE_HL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATH10K_DEV_TYPE_HL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_12
LBB0_2:
	mov	x19, x0
	str	wzr, [x0]
Lloh3:
	adrp	x8, _HTT_RX_RING_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HTT_RX_RING_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	sub	w8, w0, #1
	stp	w0, w8, [x19, #8]
	ldr	w8, [x20, #4]
	str	w8, [x19, #32]
	bl	_is_power_of_2
	cbz	w0, LBB0_7
; %bb.3:
	ldr	w0, [x19, #8]
Lloh6:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #8
	bl	_kcalloc
	str	w0, [x19, #16]
	cbz	w0, LBB0_10
; %bb.4:
	mov	x0, x19
	bl	_ath10k_htt_get_rx_ring_size
	mov	x1, x0
	ldr	x8, [x19, #88]
	ldr	w0, [x8]
	ldr	w3, [x22]
	add	x2, sp, #8
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_9
; %bb.5:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_ath10k_htt_config_paddrs_ring
	ldr	x8, [sp, #8]
	str	x8, [x19, #24]
	ldr	x8, [x19, #88]
	ldr	w0, [x8]
	ldr	w3, [x22]
	add	x2, sp, #8
	mov	w1, #8
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_8
; %bb.6:
	add	x8, x19, #80
	ldr	x9, [sp, #8]
	stp	x0, x9, [x19, #64]
	ldr	w9, [x19, #12]
	str	w9, [x19, #40]
	str	xzr, [x0]
Lloh8:
	adrp	x9, _ath10k_htt_rx_ring_refill_retry@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ath10k_htt_rx_ring_refill_retry@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x9]
	mov	x0, x8
	mov	w2, #0
	bl	_timer_setup
	add	x0, x19, #56
	bl	_spin_lock_init
	str	xzr, [x19, #48]
	str	wzr, [x19, #40]
	ldr	w0, [x19, #36]
	bl	_hash_init
	add	x0, x19, #108
	bl	_skb_queue_head_init
	add	x0, x19, #104
	bl	_skb_queue_head_init
	add	x0, x19, #100
	bl	_skb_queue_head_init
	add	x0, x19, #96
	mov	w1, #0
	bl	_atomic_set
Lloh11:
	adrp	x8, _ATH10K_DBG_BOOT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATH10K_DBG_BOOT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w3, [x19, #8]
	ldr	w4, [x19, #32]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_ath10k_dbg
	mov	w0, #0
	b	LBB0_12
LBB0_7:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_ath10k_warn
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
	ldr	x8, [x19, #88]
	ldr	w20, [x8]
	mov	x0, x19
	bl	_ath10k_htt_get_rx_ring_size
	mov	x1, x0
	ldr	x3, [x19, #24]
	mov	x0, x20
	mov	x2, x21
	bl	_dma_free_coherent
LBB0_9:
	ldr	w0, [x19, #16]
	bl	_kfree
LBB0_10:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH10K_DEV_TYPE_HL,8,3         ; @ATH10K_DEV_TYPE_HL
	.comm	_HTT_RX_RING_SIZE,4,2           ; @HTT_RX_RING_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"htt rx ring size is not power of 2\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ath10k_htt_rx_ring_refill_retry,4,2 ; @ath10k_htt_rx_ring_refill_retry
	.comm	_ATH10K_DBG_BOOT,4,2            ; @ATH10K_DBG_BOOT
l_.str.1:                               ; @.str.1
	.asciz	"htt rx ring size %d fill_level %d\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
