	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_pcie_gen2_set_tb
_iwl_pcie_gen2_set_tb:                  ## @iwl_pcie_gen2_set_tb
	.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, %r12d
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_IWL_TRANS_GET_PCIE_TRANS
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_iwl_pcie_gen2_get_num_tbs
	movl	%eax, %ebx
	movq	_IWL_TFH_NUM_TBS@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %ebx
	setge	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	(%r14), %rdi
	movq	8(%r14), %r15
	callq	_le16_to_cpu
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdx
	cmpq	%rdx, %rax
	jge	LBB0_3
## %bb.4:
	movq	%r15, %r13
	movslq	%ebx, %r15
	shlq	$4, %r15
	leaq	(%r15,%r13), %rsi
	addq	$8, %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_put_unaligned_le64
	movl	%r12d, %edi
	callq	_cpu_to_le16
	movq	%rax, (%r13,%r15)
	movl	%ebx, %edi
	incl	%edi
	callq	_cpu_to_le16
	movq	%rax, (%r14)
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_IWL_ERR
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_TFH_NUM_TBS,4,2            ## @IWL_TFH_NUM_TBS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error can not send more than %d chunks\n"

	.no_dead_strip	_iwl_pcie_gen2_set_tb
.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_set_tb
_iwl_pcie_gen2_set_tb:                  ; @iwl_pcie_gen2_set_tb
	.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	x22, x2
	mov	x19, x1
	mov	x23, x0
	bl	_IWL_TRANS_GET_PCIE_TRANS
	mov	x24, x0
	mov	x0, x23
	mov	x1, x19
	bl	_iwl_pcie_gen2_get_num_tbs
	mov	x20, x0
Lloh0:
	adrp	x8, _IWL_TFH_NUM_TBS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IWL_TFH_NUM_TBS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w0, ge
	bl	_WARN_ON
	cbnz	x0, LBB0_4
; %bb.1:
	ldp	x0, x25, [x19]
	bl	_le16_to_cpu
	ldr	x2, [x24]
	cmp	x0, x2
	b.ge	LBB0_3
; %bb.2:
	add	x23, x25, w20, sxtw #4
	add	x1, x23, #8
	mov	x0, x22
	bl	_put_unaligned_le64
	mov	x0, x21
	bl	_cpu_to_le16
	str	x0, [x23]
	add	w0, w20, #1
	bl	_cpu_to_le16
	str	x0, [x19]
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_IWL_ERR
LBB0_4:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_TFH_NUM_TBS,4,2            ; @IWL_TFH_NUM_TBS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error can not send more than %d chunks\n"

	.no_dead_strip	_iwl_pcie_gen2_set_tb
.subsections_via_symbols
