	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_pcie_gen2_tfd_unmap
_iwl_pcie_gen2_tfd_unmap:               ## @iwl_pcie_gen2_tfd_unmap
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	callq	_IWL_TRANS_GET_PCIE_TRANS
	movq	%rax, %r14
	movq	%r15, %rdi
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	callq	_iwl_pcie_gen2_get_num_tbs
	cmpl	(%r14), %eax
	jle	LBB0_1
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IWL_ERR                        ## TAILCALL
LBB0_1:
	cmpl	$2, %eax
	jl	LBB0_7
## %bb.2:
	movl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$1, %ebx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_dma_unmap_single
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	incq	%rbx
	cmpq	%rbx, -72(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_BIT
	movl	%eax, %r14d
	movl	(%r15), %r13d
	movq	8(%r12), %rax
	movl	4(%rax,%rbx,8), %edi
	callq	_le64_to_cpu
	movl	%eax, %r15d
	movq	8(%r12), %rax
	movl	(%rax,%rbx,8), %edi
	callq	_le16_to_cpu
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%r14d, -44(%rbp)                ## 4-byte Folded Reload
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_dma_unmap_page
	jmp	LBB0_6
LBB0_7:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	addq	$40, %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	"Too many chunks: %i\n"

	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_iwl_pcie_gen2_tfd_unmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_pcie_gen2_tfd_unmap
_iwl_pcie_gen2_tfd_unmap:               ; @iwl_pcie_gen2_tfd_unmap
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_IWL_TRANS_GET_PCIE_TRANS
	mov	x22, x0
	mov	x0, x20
	mov	x1, x19
	bl	_iwl_pcie_gen2_get_num_tbs
	mov	x2, x0
	ldr	w8, [x22]
	cmp	w0, w8
	b.le	LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	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
	b	_IWL_ERR
LBB0_2:
	cmp	w2, #2
	b.lt	LBB0_8
; %bb.3:
	mov	x25, #0
	mov	w8, w2
	lsl	x8, x8, #3
	sub	x26, x8, #8
	mov	w22, #1
Lloh2:
	adrp	x27, _DMA_TO_DEVICE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _DMA_TO_DEVICE@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	bl	_dma_unmap_single
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w22, w22, #1
	add	x25, x25, #8
	cmp	x26, x25
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w23, [x21]
	mov	x0, x22
	bl	_BIT
	and	w28, w0, w23
	ldr	w23, [x20]
	ldr	x8, [x19, #8]
	add	x8, x8, x25
	ldr	w0, [x8, #12]
	bl	_le64_to_cpu
	mov	x24, x0
	ldr	x8, [x19, #8]
	add	x8, x8, x25
	ldr	w0, [x8, #8]
	bl	_le16_to_cpu
	mov	x2, x0
	ldr	w3, [x27]
	mov	x0, x23
	mov	x1, x24
	cbz	w28, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_dma_unmap_page
	b	LBB0_5
LBB0_8:
	str	wzr, [x19]
	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
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Too many chunks: %i\n"

	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_iwl_pcie_gen2_tfd_unmap
.subsections_via_symbols
