	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_pcie_txq_alloc             ## -- Begin function iwl_pcie_txq_alloc
	.p2align	4, 0x90
_iwl_pcie_txq_alloc:                    ## @iwl_pcie_txq_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_IWL_TRANS_GET_PCIE_TRANS
	movq	%rax, %r15
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rax
	movq	8(%rax), %rax
	movq	(%rax), %rbx
	movl	$1, %edi
	cmpq	$0, 8(%r12)
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpq	$0, 24(%r12)
	setne	%dil
LBB0_2:
	imulq	(%r15), %rbx
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_21
LBB0_4:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movslq	%r13d, %rbx
	imulq	(%r15), %rbx
LBB0_6:
	leaq	56(%r12), %rdi
	movq	_iwl_pcie_txq_stuck_timer@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
	movq	%r15, 48(%r12)
	movl	%r13d, (%r12)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	%r13d, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_15
## %bb.7:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_12
## %bb.8:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_12
## %bb.9:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kmalloc
	movq	8(%r12), %rcx
	movq	%rax, (%rcx,%r15,8)
	testq	%rax, %rax
	je	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_11 Depth=1
	incq	%r15
	cmpq	%r15, %r14
	jne	LBB0_11
LBB0_12:
	movl	(%r13), %edi
	leaq	16(%r12), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rsi
	callq	_dma_alloc_coherent
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movq	_IWL_FIRST_TB_SIZE_ALIGN@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	$1, (%rax)
	setne	%dil
	callq	_BUILD_BUG_ON
	movslq	-44(%rbp), %rsi                 ## 4-byte Folded Reload
	movl	(%r13), %edi
	leaq	40(%r12), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_alloc_coherent
	movq	%rax, %rcx
	movq	%rax, 32(%r12)
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_22
## %bb.14:
	movl	(%r13), %edi
	movq	24(%r12), %rdx
	movl	16(%r12), %ecx
	movq	%rbx, %rsi
	callq	_dma_free_coherent
LBB0_15:
	movq	8(%r12), %rdi
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_20
## %bb.16:
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.17:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	jle	LBB0_20
## %bb.18:
	movl	%eax, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rbx,8), %rdi
	callq	_kfree
	incq	%rbx
	movq	8(%r12), %rdi
	cmpq	%rbx, %r14
	jne	LBB0_19
LBB0_20:
	callq	_kfree
	movq	$0, 8(%r12)
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_21:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_22:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_iwl_pcie_txq_stuck_timer,4,2   ## @iwl_pcie_txq_stuck_timer
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_IWL_FIRST_TB_SIZE_ALIGN,4,2    ## @IWL_FIRST_TB_SIZE_ALIGN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_pcie_txq_alloc             ; -- Begin function iwl_pcie_txq_alloc
	.p2align	2
_iwl_pcie_txq_alloc:                    ; @iwl_pcie_txq_alloc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	bl	_IWL_TRANS_GET_PCIE_TRANS
	mov	x24, x0
	ldr	x8, [x22, #8]
	ldr	x8, [x8, #8]
	ldr	x9, [x19, #8]
	cbz	x9, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_3
LBB0_2:
	ldr	x9, [x19, #24]
	cmp	x9, #0
	cset	w0, ne
LBB0_3:
	ldr	x23, [x24]
	ldr	x25, [x8]
	bl	_WARN_ON
	cbz	x0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_24
LBB0_5:
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	x8, [x24]
	mov	x9, x20
	sxtw	x9, w9
	mul	x23, x8, x9
	b	LBB0_8
LBB0_7:
	mul	x23, x25, x23
LBB0_8:
	add	x0, x19, #56
Lloh2:
	adrp	x8, _iwl_pcie_txq_stuck_timer@GOTPAGE
Lloh3:
	ldr	x8, [x8, _iwl_pcie_txq_stuck_timer@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
	str	x24, [x19, #48]
	str	w20, [x19]
Lloh5:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x20
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_18
; %bb.9:
	cbz	w21, LBB0_14
; %bb.10:
	cmp	w20, #1
	b.lt	LBB0_14
; %bb.11:
	mov	x25, #0
	mov	w8, w20
	lsl	x26, x8, #3
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	w0, #4
	bl	_kmalloc
	ldr	x8, [x19, #8]
	str	x0, [x8, x25]
	cbz	x0, LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x25, x25, #8
	cmp	x26, x25
	b.ne	LBB0_12
LBB0_14:
	ldr	w0, [x22]
	add	x2, x19, #16
	ldr	w3, [x24]
	mov	x1, x23
	bl	_dma_alloc_coherent
	str	x0, [x19, #24]
	cbz	x0, LBB0_18
; %bb.15:
Lloh7:
	adrp	x8, _IWL_FIRST_TB_SIZE_ALIGN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IWL_FIRST_TB_SIZE_ALIGN@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, #1
	cset	w0, ne
	bl	_BUILD_BUG_ON
	sxtw	x1, w20
	ldr	w0, [x22]
	add	x2, x19, #40
	ldr	w3, [x24]
	bl	_dma_alloc_coherent
	str	x0, [x19, #32]
	cbz	x0, LBB0_17
; %bb.16:
	mov	w0, #0
	b	LBB0_25
LBB0_17:
	ldr	w0, [x22]
	ldr	x2, [x19, #24]
	ldr	w3, [x19, #16]
	mov	x1, x23
	bl	_dma_free_coherent
LBB0_18:
	ldr	x0, [x19, #8]
	cbz	w21, LBB0_23
; %bb.19:
	cbz	x0, LBB0_23
; %bb.20:
	cmp	w20, #1
	b.lt	LBB0_23
; %bb.21:
	mov	x21, #0
	mov	w8, w20
	lsl	x20, x8, #3
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x0, x21]
	bl	_kfree
	ldr	x0, [x19, #8]
	add	x21, x21, #8
	cmp	x20, x21
	b.ne	LBB0_22
LBB0_23:
	bl	_kfree
	str	xzr, [x19, #8]
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_25:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_iwl_pcie_txq_stuck_timer,4,2   ; @iwl_pcie_txq_stuck_timer
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_IWL_FIRST_TB_SIZE_ALIGN,4,2    ; @IWL_FIRST_TB_SIZE_ALIGN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
