	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40iw_setup_ceqs
_i40iw_setup_ceqs:                      ## @i40iw_setup_ceqs
	.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
	movq	%rdi, %r12
	movq	_I40IW_ERR_BAD_PTR@GOTPCREL(%rip), %rax
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.1:
	movq	(%rsi), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.2:
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.3:
	movl	44(%r12), %edx
	movq	_i40iw_client@GOTPCREL(%rip), %rax
	movq	%rsi, %rdi
	movq	%rax, %rsi
	callq	*%rcx
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.4:
	movl	4(%r12), %esi
	movl	40(%r12), %edi
	callq	_min
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:
	xorl	%r15d, %r15d
	cmpq	$0, 32(%r12)
	sete	%r15b
	subq	%r15, %r14
	jbe	LBB0_7
## %bb.9:
	movq	%rax, %r13
	movq	%r12, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_i40iw_create_ceq
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_10
LBB0_16:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_i40iw_pr_err
	cmpl	$0, 16(%r12)
	jne	LBB0_7
	jmp	LBB0_18
LBB0_5:
	movq	_I40IW_ERR_NO_MEMORY@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_7
LBB0_17:
	cmpl	$0, 16(%r12)
	je	LBB0_18
LBB0_7:
	movl	$1, (%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_10:
	movq	%r13, %rax
	xorl	%r13d, %r13d
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rax
	leaq	(%rax,%r15,8), %r14
	movl	4(%rax,%r15,8), %ecx
	movl	%ecx, 4(%rdx,%r13,8)
	movl	(%rax,%r15,8), %eax
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, (%rsi)
	movq	%r12, %rdi
	movq	%r13, %rdx
	movq	%r14, %rcx
	callq	_i40iw_configure_ceq_vector
	testl	%eax, %eax
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_i40iw_enable_intr
	incl	16(%r12)
	incq	%r13
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	cmpq	%r14, %r13
	je	LBB0_7
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	incq	%r15
	movq	8(%r12), %rbx
	leaq	(%rbx,%r13,8), %rsi
	movq	%r12, %rdi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdx
	callq	_i40iw_create_ceq
	movq	%rbx, %rdx
	testl	%eax, %eax
	je	LBB0_11
## %bb.15:
	movl	%eax, %ebx
	jmp	LBB0_16
LBB0_12:
	movl	%eax, %ebx
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_i40iw_destroy_ceq
	cmpl	$0, 16(%r12)
	jne	LBB0_7
LBB0_18:
	movq	8(%r12), %rdi
	callq	_kfree
	movq	$0, 8(%r12)
LBB0_19:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_i40iw_client,4,2               ## @i40iw_client
	.comm	_I40IW_ERR_BAD_PTR,4,2          ## @I40IW_ERR_BAD_PTR
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_I40IW_ERR_NO_MEMORY,4,2        ## @I40IW_ERR_NO_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"create ceq status = %d\n"

	.no_dead_strip	_i40iw_setup_ceqs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40iw_setup_ceqs
_i40iw_setup_ceqs:                      ; @i40iw_setup_ceqs
	.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, x0
	cbz	x1, LBB0_8
; %bb.1:
	ldr	x8, [x1]
	cbz	x8, LBB0_8
; %bb.2:
	ldr	x9, [x8]
	cbz	x9, LBB0_8
; %bb.3:
	ldr	w2, [x19, #44]
Lloh0:
	adrp	x8, _i40iw_client@GOTPAGE
Lloh1:
	ldr	x8, [x8, _i40iw_client@GOTPAGEOFF]
	mov	x0, x1
	mov	x1, x8
	blr	x9
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.4:
	ldr	w0, [x19, #40]
	ldr	w1, [x19, #4]
	bl	_min
	mov	x21, x0
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_11
; %bb.5:
	ldr	x8, [x19, #32]
	cmp	x8, #0
	cset	w22, eq
	subs	x23, x21, x22
	b.ls	LBB0_10
; %bb.6:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	bl	_i40iw_create_ceq
	mov	x21, x0
	cbz	w0, LBB0_12
LBB0_7:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_i40iw_pr_err
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_10
	b	LBB0_18
LBB0_8:
Lloh7:
	adrp	x8, _I40IW_ERR_BAD_PTR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _I40IW_ERR_BAD_PTR@GOTPAGEOFF]
Lloh9:
	ldr	w21, [x8]
	cbz	w21, LBB0_10
LBB0_9:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_18
LBB0_10:
	mov	w21, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_19
LBB0_11:
Lloh10:
	adrp	x8, _I40IW_ERR_NO_MEMORY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _I40IW_ERR_NO_MEMORY@GOTPAGEOFF]
Lloh12:
	ldr	w21, [x8]
	cbnz	w21, LBB0_9
	b	LBB0_10
LBB0_12:
	mov	x24, #0
	mov	x25, #0
	lsl	x26, x22, #3
	mov	w22, #1
	mov	x27, x20
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sub	x2, x22, #1
	ldr	x8, [x19, #24]
	add	x28, x8, x26
	add	x3, x28, x24
	add	x8, x27, x24
	ldp	w10, w9, [x3]
	str	w9, [x8, #4]
	str	w10, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_i40iw_configure_ceq_vector
	cbnz	w0, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w1, [x28, x24]
	mov	x0, x19
	bl	_i40iw_enable_intr
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
	cmp	x23, x22
	b.eq	LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x25, x25, #1
	ldr	x27, [x19, #8]
	add	x20, x27, x25, lsl #3
	add	x8, x27, x24
	add	x1, x8, #8
	mov	x0, x19
	mov	x2, x22
	bl	_i40iw_create_ceq
	add	x24, x24, #8
	add	x22, x22, #1
	cbz	w0, LBB0_13
; %bb.16:
	mov	x21, x0
	b	LBB0_7
LBB0_17:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	bl	_i40iw_destroy_ceq
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_10
LBB0_18:
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
LBB0_19:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_i40iw_client,4,2               ; @i40iw_client
	.comm	_I40IW_ERR_BAD_PTR,4,2          ; @I40IW_ERR_BAD_PTR
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_I40IW_ERR_NO_MEMORY,4,2        ; @I40IW_ERR_NO_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"create ceq status = %d\n"

	.no_dead_strip	_i40iw_setup_ceqs
.subsections_via_symbols
