	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_pcie_txq_build_tfd
_iwl_pcie_txq_build_tfd:                ## @iwl_pcie_txq_build_tfd
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r13d
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_IWL_TRANS_GET_PCIE_TRANS
	movq	%rax, %r14
	movslq	(%rax), %rdx
	movslq	(%r15), %rbx
	imulq	%rdx, %rbx
	addq	8(%r15), %rbx
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memset
LBB0_2:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_iwl_pcie_tfd_get_num_tbs
	movq	8(%r14), %rdx
	cmpq	%rdx, %rax
	jge	LBB0_3
## %bb.4:
	movq	%rax, %r13
	movq	_IWL_TX_DMA_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	notl	%edi
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	andl	%r14d, %edi
	movslq	%r14d, %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_WARN
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movl	%r14d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_iwl_pcie_tfd_set_tb
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_IWL_ERR
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_7:
	movl	%r13d, %eax
	addq	$8, %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	"Error can not send more than %d chunks\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IWL_TX_DMA_MASK,4,2            ## @IWL_TX_DMA_MASK
L_.str.1:                               ## @.str.1
	.asciz	"Unaligned address = %llx\n"

	.no_dead_strip	_iwl_pcie_txq_build_tfd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_pcie_txq_build_tfd
_iwl_pcie_txq_build_tfd:                ; @iwl_pcie_txq_build_tfd
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x4
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	bl	_IWL_TRANS_GET_PCIE_TRANS
	mov	x24, x0
	ldr	x8, [x22, #8]
	ldrsw	x2, [x0]
	ldrsw	x9, [x22]
	madd	x22, x9, x2, x8
	cbz	w23, LBB0_2
; %bb.1:
	mov	x0, x22
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memset
LBB0_2:
	mov	x0, x21
	mov	x1, x22
	bl	_iwl_pcie_tfd_get_num_tbs
	ldr	x2, [x24, #8]
	cmp	x0, x2
	b.ge	LBB0_5
; %bb.3:
	mov	x23, x0
Lloh0:
	adrp	x8, _IWL_TX_DMA_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IWL_TX_DMA_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bic	w0, w20, w8
	sxtw	x2, w20
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_WARN
	cbnz	x0, LBB0_6
; %bb.4:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	mov	x3, x20
	mov	x4, x19
	bl	_iwl_pcie_tfd_set_tb
	b	LBB0_7
LBB0_5:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_IWL_ERR
LBB0_6:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_7:
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error can not send more than %d chunks\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IWL_TX_DMA_MASK,4,2            ; @IWL_TX_DMA_MASK
l_.str.1:                               ; @.str.1
	.asciz	"Unaligned address = %llx\n"

	.no_dead_strip	_iwl_pcie_txq_build_tfd
.subsections_via_symbols
