	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_txq_ctx_alloc           ## -- Begin function il4965_txq_ctx_alloc
	.p2align	4, 0x90
_il4965_txq_ctx_alloc:                  ## @il4965_txq_ctx_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_il4965_hw_txq_ctx_free
	movl	12(%r14), %edx
	movq	%r14, %rdi
	movq	%r14, %rsi
	callq	_il4965_alloc_dma_ptr
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_IL_ERR
	jmp	LBB0_11
LBB0_2:
	leaq	4(%r14), %r15
	movq	_IL_KW_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_il4965_alloc_dma_ptr
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_IL_ERR
	jmp	LBB0_10
LBB0_4:
	movq	%r14, %rdi
	callq	_il_alloc_txq_mem
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_5
LBB0_9:
	movq	%r14, %rdi
	callq	_il4965_hw_txq_ctx_free
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_il4965_free_dma_ptr
LBB0_10:
	movq	%r14, %rdi
	movq	%r14, %rsi
	callq	_il4965_free_dma_ptr
LBB0_11:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	16(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_il4965_txq_set_sched
	movq	_FH49_KW_MEM_ADDR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	sarl	$4, %edx
	movq	%r14, %rdi
	callq	_il_wr
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	cmpl	$0, 8(%r14)
	jle	LBB0_11
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_il_tx_queue_init
	testl	%eax, %eax
	jne	LBB0_8
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	incl	%ebx
	xorl	%r12d, %r12d
	cmpl	8(%r14), %ebx
	jl	LBB0_7
	jmp	LBB0_11
LBB0_8:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_IL_ERR
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Scheduler BC Table allocation failed\n"

	.comm	_IL_KW_SIZE,4,2                 ## @IL_KW_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"Keep Warm allocation failed\n"

	.comm	_FH49_KW_MEM_ADDR_REG,4,2       ## @FH49_KW_MEM_ADDR_REG
L_.str.2:                               ## @.str.2
	.asciz	"Tx %d queue init failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_txq_ctx_alloc           ; -- Begin function il4965_txq_ctx_alloc
	.p2align	2
_il4965_txq_ctx_alloc:                  ; @il4965_txq_ctx_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
	mov	x19, x0
	bl	_il4965_hw_txq_ctx_free
	ldr	w2, [x19, #12]
	mov	x0, x19
	mov	x1, x19
	bl	_il4965_alloc_dma_ptr
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IL_ERR
	b	LBB0_7
LBB0_2:
	add	x20, x19, #4
Lloh2:
	adrp	x8, _IL_KW_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IL_KW_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_il4965_alloc_dma_ptr
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IL_ERR
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_il_alloc_txq_mem
	mov	x21, x0
	cbz	w0, LBB0_8
LBB0_5:
	mov	x0, x19
	bl	_il4965_hw_txq_ctx_free
	mov	x0, x19
	mov	x1, x20
	bl	_il4965_free_dma_ptr
LBB0_6:
	mov	x0, x19
	mov	x1, x19
	bl	_il4965_free_dma_ptr
LBB0_7:
	mov	x0, x21
	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
LBB0_8:
	add	x21, x19, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	w1, #0
	bl	_il4965_txq_set_sched
Lloh7:
	adrp	x8, _FH49_KW_MEM_ADDR_REG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FH49_KW_MEM_ADDR_REG@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w8, [x19, #4]
	asr	w2, w8, #4
	mov	x0, x19
	bl	_il_wr
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.9:
	mov	w22, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_il_tx_queue_init
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	w22, w22, #1
	ldr	w8, [x19, #8]
	cmp	w22, w8
	b.lt	LBB0_10
	b	LBB0_7
LBB0_12:
	mov	w21, #0
	b	LBB0_7
LBB0_13:
	str	x22, [sp]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_IL_ERR
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Scheduler BC Table allocation failed\n"

	.comm	_IL_KW_SIZE,4,2                 ; @IL_KW_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"Keep Warm allocation failed\n"

	.comm	_FH49_KW_MEM_ADDR_REG,4,2       ; @FH49_KW_MEM_ADDR_REG
l_.str.2:                               ; @.str.2
	.asciz	"Tx %d queue init failed\n"

.subsections_via_symbols
