	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40iw_puda_cq_create
_i40iw_puda_cq_create:                  ## @i40iw_puda_cq_create
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	32(%rdi), %r15
	movl	(%rdi), %r12d
	movl	44(%rdi), %eax
	movl	%eax, 48(%rdi)
	leal	4(,%r12,4), %edx
	movl	(%r15), %edi
	leaq	16(%rbx), %r14
	movq	_I40IW_CQ0_ALIGNMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rsi
	callq	_i40iw_allocate_dma_mem
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	leaq	48(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	shll	$2, %r12d
	movslq	%r12d, %r13
	leaq	-120(%rbp), %rdi
	xorl	%esi, %esi
	movl	$72, %edx
	callq	_memset
	movq	%r15, -80(%rbp)
	movq	8(%rbx), %rax
	movq	_I40IW_PUDA_RSRC_TYPE_ILQ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	_I40IW_CQ_TYPE_ILQ@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_I40IW_CQ_TYPE_IEQ@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movl	(%rbx), %eax
	movl	%eax, %ecx
	sarl	$2, %ecx
	movl	%ecx, -120(%rbp)
	movq	24(%rbx), %rcx
	movq	%rcx, -96(%rbp)
	addq	%r13, %rcx
	movq	%rcx, -104(%rbp)
	movq	16(%rbx), %rcx
	movq	%rcx, -56(%rbp)
	leaq	(%rcx,%r13,4), %rcx
	movq	%rcx, -64(%rbp)
	movl	%eax, -72(%rbp)
	movl	40(%rbx), %eax
	movl	%eax, -68(%rbp)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, -116(%rbp)
	movq	16(%r15), %rax
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	leaq	-120(%rbp), %rsi
	callq	*(%rax)
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movq	32(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_i40iw_cqp_cq_create_cmd
	jmp	LBB0_8
LBB0_7:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_i40iw_puda_cq_wqe
LBB0_8:
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_9
LBB0_10:
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_i40iw_free_dma_mem
LBB0_11:
	movl	%r13d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%r13d, %r13d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_I40IW_CQ0_ALIGNMENT,4,2        ## @I40IW_CQ0_ALIGNMENT
	.comm	_I40IW_PUDA_RSRC_TYPE_ILQ,8,3   ## @I40IW_PUDA_RSRC_TYPE_ILQ
	.comm	_I40IW_CQ_TYPE_ILQ,4,2          ## @I40IW_CQ_TYPE_ILQ
	.comm	_I40IW_CQ_TYPE_IEQ,4,2          ## @I40IW_CQ_TYPE_IEQ
	.no_dead_strip	_i40iw_puda_cq_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40iw_puda_cq_create
_i40iw_puda_cq_create:                  ; @i40iw_puda_cq_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x22, x0
	ldr	x19, [x0, #32]
	ldr	w8, [x0, #44]
	mov	x21, x0
	str	w8, [x21, #48]!
	ldr	w8, [x0]
	lsl	w24, w8, #2
	add	w2, w24, #4
	ldr	w0, [x19]
	add	x20, x22, #16
Lloh0:
	adrp	x8, _I40IW_CQ0_ALIGNMENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I40IW_CQ0_ALIGNMENT@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x1, x20
	bl	_i40iw_allocate_dma_mem
	mov	x23, x0
	cbnz	w0, LBB0_5
; %bb.1:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #72
	bl	_memset
	str	x19, [sp, #48]
Lloh3:
	adrp	x8, _I40IW_PUDA_RSRC_TYPE_ILQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I40IW_PUDA_RSRC_TYPE_ILQ@GOTPAGEOFF]
Lloh5:
	adrp	x9, _I40IW_CQ_TYPE_ILQ@GOTPAGE
Lloh6:
	ldr	x9, [x9, _I40IW_CQ_TYPE_ILQ@GOTPAGEOFF]
Lloh7:
	adrp	x10, _I40IW_CQ_TYPE_IEQ@GOTPAGE
Lloh8:
	ldr	x10, [x10, _I40IW_CQ_TYPE_IEQ@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldp	x11, x12, [x22, #8]
	cmp	x11, x8
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	ldr	w9, [x22]
	asr	w10, w9, #2
	str	w10, [sp, #8]
	ldr	x10, [x22, #24]
	add	x11, x10, w24, sxtw
	stp	x11, x10, [sp, #24]
	add	x10, x12, w24, sxtw #2
	stp	x10, x12, [sp, #64]
	str	w8, [sp, #40]
	ldr	w8, [x22, #40]
	stp	w9, w8, [sp, #56]
	movi.2s	v0, #1
	stur	d0, [sp, #12]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	add	x1, sp, #8
	mov	x0, x21
	blr	x8
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	x8, [x22, #32]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_6
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	bl	_i40iw_cqp_cq_create_cmd
	mov	x23, x0
	cbz	w0, LBB0_5
LBB0_4:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_i40iw_free_dma_mem
LBB0_5:
	mov	x0, x23
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_6:
	mov	x0, x19
	mov	x1, x21
	bl	_i40iw_puda_cq_wqe
	mov	x23, x0
	cbnz	w0, LBB0_4
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_I40IW_CQ0_ALIGNMENT,4,2        ; @I40IW_CQ0_ALIGNMENT
	.comm	_I40IW_PUDA_RSRC_TYPE_ILQ,8,3   ; @I40IW_PUDA_RSRC_TYPE_ILQ
	.comm	_I40IW_CQ_TYPE_ILQ,4,2          ; @I40IW_CQ_TYPE_ILQ
	.comm	_I40IW_CQ_TYPE_IEQ,4,2          ; @I40IW_CQ_TYPE_IEQ
	.no_dead_strip	_i40iw_puda_cq_create
.subsections_via_symbols
