	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40iw_sc_static_hmc_pages_allocated ## -- Begin function i40iw_sc_static_hmc_pages_allocated
	.p2align	4, 0x90
_i40iw_sc_static_hmc_pages_allocated:   ## @i40iw_sc_static_hmc_pages_allocated
	.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
	movl	%r8d, %ebx
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movq	%rdi, %r12
	callq	_i40iw_sc_cqp_get_next_send_wqe
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_I40IW_SHMC_PAGE_ALLOCATED_HMC_FN_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	callq	_LS_64
	movq	%r14, %rdi
	movl	$16, %esi
	movl	%eax, %edx
	callq	_set_64bit_val
	movq	_I40IW_CQP_OP_SHMC_PAGES_ALLOCATED@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_I40IW_CQPSQ_OPCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movl	%eax, %ebx
	movl	4(%r12), %edi
	movq	_I40IW_CQPSQ_WQEVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	orl	%eax, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_i40iw_insert_wqe_hdr
	movl	(%r12), %edi
	movq	_I40IW_DEBUG_WQE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_I40IW_CQP_WQE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	shll	$3, %r8d
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rcx
	callq	_i40iw_debug_buf
	leaq	-72(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	movq	%r12, %rdi
	callq	_i40iw_get_cqp_reg_info
	cmpq	$0, -56(%rbp)
	je	LBB0_4
## %bb.3:
	movq	_I40IW_ERR_CQP_COMPL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_1:
	movq	_I40IW_ERR_RING_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_4:
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.6:
	movq	%r12, %rdi
	callq	_i40iw_sc_cqp_post_sq
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_8
## %bb.7:
	movq	-64(%rbp), %rsi
	movq	%r12, %rdi
	movl	$1000, %edx                     ## imm = 0x3E8
	callq	_i40iw_cqp_poll_registers
	jmp	LBB0_9
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_8:
	movl	(%r13), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_i40iw_sc_poll_for_cqp_op_done
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I40IW_ERR_RING_FULL,4,2        ## @I40IW_ERR_RING_FULL
	.comm	_I40IW_SHMC_PAGE_ALLOCATED_HMC_FN_ID,4,2 ## @I40IW_SHMC_PAGE_ALLOCATED_HMC_FN_ID
	.comm	_I40IW_CQP_OP_SHMC_PAGES_ALLOCATED,4,2 ## @I40IW_CQP_OP_SHMC_PAGES_ALLOCATED
	.comm	_I40IW_CQPSQ_OPCODE,4,2         ## @I40IW_CQPSQ_OPCODE
	.comm	_I40IW_CQPSQ_WQEVALID,4,2       ## @I40IW_CQPSQ_WQEVALID
	.comm	_I40IW_DEBUG_WQE,4,2            ## @I40IW_DEBUG_WQE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SHMC_PAGES_ALLOCATED WQE"

	.comm	_I40IW_CQP_WQE_SIZE,4,2         ## @I40IW_CQP_WQE_SIZE
	.comm	_I40IW_ERR_CQP_COMPL_ERROR,4,2  ## @I40IW_ERR_CQP_COMPL_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40iw_sc_static_hmc_pages_allocated ; -- Begin function i40iw_sc_static_hmc_pages_allocated
	.p2align	2
_i40iw_sc_static_hmc_pages_allocated:   ; @i40iw_sc_static_hmc_pages_allocated
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x4
	mov	x21, x3
	mov	x23, x2
	mov	x19, x0
	bl	_i40iw_sc_cqp_get_next_send_wqe
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x8, _I40IW_SHMC_PAGE_ALLOCATED_HMC_FN_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I40IW_SHMC_PAGE_ALLOCATED_HMC_FN_ID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_LS_64
	mov	x2, x0
	mov	x0, x22
	mov	w1, #16
	bl	_set_64bit_val
Lloh3:
	adrp	x24, _I40IW_CQP_OP_SHMC_PAGES_ALLOCATED@GOTPAGE
Lloh4:
	ldr	x24, [x24, _I40IW_CQP_OP_SHMC_PAGES_ALLOCATED@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh5:
	adrp	x8, _I40IW_CQPSQ_OPCODE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I40IW_CQPSQ_OPCODE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_LS_64
	mov	x23, x0
	ldr	w0, [x19, #4]
Lloh8:
	adrp	x8, _I40IW_CQPSQ_WQEVALID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I40IW_CQPSQ_WQEVALID@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w1, w0, w23
	mov	x0, x22
	bl	_i40iw_insert_wqe_hdr
Lloh11:
	adrp	x8, _I40IW_DEBUG_WQE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I40IW_DEBUG_WQE@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _I40IW_CQP_WQE_SIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _I40IW_CQP_WQE_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	lsl	w4, w8, #3
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x22
	bl	_i40iw_debug_buf
	add	x1, sp, #16
	add	x2, sp, #24
	add	x3, sp, #8
	mov	x0, x19
	bl	_i40iw_get_cqp_reg_info
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_4
; %bb.2:
Lloh19:
	adrp	x8, _I40IW_ERR_CQP_COMPL_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _I40IW_ERR_CQP_COMPL_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_3:
Lloh22:
	adrp	x8, _I40IW_ERR_RING_FULL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _I40IW_ERR_RING_FULL@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_4:
	cbz	w21, LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_i40iw_sc_cqp_post_sq
	cbz	w20, LBB0_8
; %bb.6:
	ldr	x1, [sp, #24]
	mov	x0, x19
	mov	w2, #1000
	bl	_i40iw_cqp_poll_registers
	b	LBB0_9
LBB0_7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, #0
	bl	_i40iw_sc_poll_for_cqp_op_done
LBB0_9:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_I40IW_ERR_RING_FULL,4,2        ; @I40IW_ERR_RING_FULL
	.comm	_I40IW_SHMC_PAGE_ALLOCATED_HMC_FN_ID,4,2 ; @I40IW_SHMC_PAGE_ALLOCATED_HMC_FN_ID
	.comm	_I40IW_CQP_OP_SHMC_PAGES_ALLOCATED,4,2 ; @I40IW_CQP_OP_SHMC_PAGES_ALLOCATED
	.comm	_I40IW_CQPSQ_OPCODE,4,2         ; @I40IW_CQPSQ_OPCODE
	.comm	_I40IW_CQPSQ_WQEVALID,4,2       ; @I40IW_CQPSQ_WQEVALID
	.comm	_I40IW_DEBUG_WQE,4,2            ; @I40IW_DEBUG_WQE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SHMC_PAGES_ALLOCATED WQE"

	.comm	_I40IW_CQP_WQE_SIZE,4,2         ; @I40IW_CQP_WQE_SIZE
	.comm	_I40IW_ERR_CQP_COMPL_ERROR,4,2  ; @I40IW_ERR_CQP_COMPL_ERROR
.subsections_via_symbols
