	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_trans_pcie_gen2_tx         ## -- Begin function iwl_trans_pcie_gen2_tx
	.p2align	4, 0x90
_iwl_trans_pcie_gen2_tx:                ## @iwl_trans_pcie_gen2_tx
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	callq	_IWL_TRANS_GET_PCIE_TRANS
	movq	%rax, %r15
	movq	8(%rax), %rax
	movslq	%r14d, %r12
	movq	(%rax,%r12,8), %rbx
	movl	4(%r15), %esi
	movl	%r12d, %edi
	callq	_test_bit
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_WARN_ONCE
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
LBB0_3:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_skb_is_nonlinear
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%r13, %rdi
	callq	_skb_shinfo
	movq	(%rax), %r12
	movq	%r15, %rdi
	callq	_IWL_PCIE_MAX_FRAGS
	cmpq	%rax, %r12
	jle	LBB0_7
## %bb.5:
	movq	%r13, %rdi
	callq	___skb_linearize
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_7:
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	leaq	24(%r14), %r12
	movq	%r12, %rdi
	callq	_spin_lock
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_iwl_queue_space
	cmpl	(%r14), %eax
	jge	LBB0_10
## %bb.8:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_iwl_stop_queue
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_iwl_queue_space
	xorl	%edi, %edi
	cmpl	$3, %eax
	setl	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rsi), %rax
	movslq	(%r15), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rax,%rcx,4)
	addq	$56, %r14
	movq	%r14, %rdi
	callq	___skb_queue_tail
	movq	%r12, %rdi
	jmp	LBB0_16
LBB0_10:
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %rsi
	movq	%r14, %rdi
	callq	_iwl_pcie_get_cmd_index
	movq	48(%r14), %rcx
	movslq	%eax, %r12
	leaq	(,%r12,8), %rax
	leaq	(%rax,%rax,2), %r13
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, 16(%rcx,%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%rcx,%r13)
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_QUEUE_TO_SEQ
	movl	%eax, %ebx
	movl	%r12d, %edi
	callq	_INDEX_TO_SEQ
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le16
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 8(%rcx)
	movq	48(%r14), %rax
	leaq	(%rax,%r13), %r8
	movq	$0, (%rax,%r13)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	_iwl_pcie_gen2_build_tfd
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%rax, %r12
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_le16_to_cpu
	movl	%eax, %ebx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_iwl_pcie_gen2_get_num_tbs
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_iwl_pcie_gen2_update_byte_tbl
	movq	8(%r14), %rsi
	movq	16(%r14), %rcx
	cmpq	%rsi, %rcx
	jne	LBB0_15
## %bb.13:
	movq	32(%r14), %rax
	movq	%rcx, %rsi
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	leaq	40(%r14), %rdi
	movq	_jiffies@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	%rax, %rsi
	callq	_mod_timer
	movq	8(%r14), %rsi
LBB0_15:
	movq	%r13, %rdi
	callq	_iwl_queue_inc_wrap
	movq	%rax, 8(%r14)
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_iwl_pcie_gen2_txq_inc_wr_ptr
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
LBB0_16:
	callq	_spin_unlock
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_11:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movl	$-1, %eax
LBB0_17:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TX on unused queue %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IWL_DEVICE_FAMILY_22560,8,3    ## @IWL_DEVICE_FAMILY_22560
	.comm	_jiffies,8,3                    ## @jiffies
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_trans_pcie_gen2_tx         ; -- Begin function iwl_trans_pcie_gen2_tx
	.p2align	2
_iwl_trans_pcie_gen2_tx:                ; @iwl_trans_pcie_gen2_tx
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	bl	_IWL_TRANS_GET_PCIE_TRANS
	mov	x22, x0
	ldr	x8, [x0, #8]
	ldr	x20, [x8, w25, sxtw #3]
	ldr	w1, [x0, #4]
	mov	x0, x25
	bl	_test_bit
	cmp	w0, #0
	cset	w0, eq
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x25
	bl	_WARN_ONCE
	cbz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_3:
	mov	x0, x24
	bl	_skb_is_nonlinear
	cbz	x0, LBB0_7
; %bb.4:
	mov	x0, x24
	bl	_skb_shinfo
	ldr	x21, [x0]
	mov	x0, x22
	bl	_IWL_PCIE_MAX_FRAGS
	cmp	x21, x0
	b.le	LBB0_7
; %bb.5:
	mov	x0, x24
	bl	___skb_linearize
	cbz	x0, LBB0_7
; %bb.6:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_7:
	add	x21, x20, #24
	mov	x0, x21
	bl	_spin_lock
	mov	x0, x19
	mov	x1, x20
	bl	_iwl_queue_space
	ldr	w8, [x20]
	cmp	w0, w8
	b.ge	LBB0_10
; %bb.8:
	mov	x0, x19
	mov	x1, x20
	bl	_iwl_stop_queue
	mov	x0, x19
	mov	x1, x20
	bl	_iwl_queue_space
	cmp	w0, #3
	cset	w0, lt
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.9:
	ldr	x8, [x24]
	ldrsw	x9, [x22]
	lsl	x9, x9, #2
	str	x23, [x8, x9]
	add	x0, x20, #56
	mov	x1, x24
	bl	___skb_queue_tail
	b	LBB0_17
LBB0_10:
	ldr	x1, [x20, #8]
	mov	x0, x20
	bl	_iwl_pcie_get_cmd_index
	mov	x26, x0
	ldr	x8, [x20, #48]
	mov	w27, #24
	smaddl	x8, w0, w27, x8
	stp	x23, x24, [x8, #8]
	mov	x0, x25
	bl	_QUEUE_TO_SEQ
	mov	x25, x0
	mov	x0, x26
	bl	_INDEX_TO_SEQ
	orr	w0, w0, w25
	bl	_cpu_to_le16
	str	w0, [x23, #8]
	ldr	x8, [x20, #48]
	smaddl	x4, w26, w27, x8
	str	xzr, [x4]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	mov	x3, x24
	bl	_iwl_pcie_gen2_build_tfd
	cbz	x0, LBB0_14
; %bb.11:
	mov	x24, x0
	ldr	x8, [x23]
	ldr	w0, [x8]
	bl	_le16_to_cpu
	mov	x23, x0
	mov	x0, x19
	mov	x1, x24
	bl	_iwl_pcie_gen2_get_num_tbs
	mov	x3, x0
	mov	x0, x22
	mov	x1, x20
	mov	x2, x23
	bl	_iwl_pcie_gen2_update_byte_tbl
	ldp	x1, x8, [x20, #8]
	cmp	x8, x1
	b.ne	LBB0_16
; %bb.12:
	ldr	x9, [x20, #32]
	cbz	x9, LBB0_15
; %bb.13:
	add	x0, x20, #40
Lloh6:
	adrp	x8, _jiffies@GOTPAGE
Lloh7:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	add	x1, x8, x9
	bl	_mod_timer
	ldr	x1, [x20, #8]
	b	LBB0_16
LBB0_14:
	mov	x0, x21
	bl	_spin_unlock
	mov	w0, #-1
	b	LBB0_18
LBB0_15:
	mov	x1, x8
LBB0_16:
	mov	x0, x19
	bl	_iwl_queue_inc_wrap
	str	x0, [x20, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_iwl_pcie_gen2_txq_inc_wr_ptr
LBB0_17:
	mov	x0, x21
	bl	_spin_unlock
	mov	w0, #0
LBB0_18:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TX on unused queue %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IWL_DEVICE_FAMILY_22560,8,3    ; @IWL_DEVICE_FAMILY_22560
	.comm	_jiffies,8,3                    ; @jiffies
.subsections_via_symbols
