	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40iw_alloc_push_page
_i40iw_alloc_push_page:                 ## @i40iw_alloc_push_page
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %eax
	movq	_I40IW_INVALID_PUSH_PAGE_INDEX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	$1, %esi
	callq	_i40iw_get_cqp_request
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$56, %rdi
	callq	_atomic_inc
	movq	_OP_MANAGE_PUSH_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movl	$1, 8(%rbx)
	movl	4(%r15), %eax
	movl	%eax, 40(%rbx)
	movq	$0, 32(%rbx)
	movq	%r14, 24(%rbx)
	movq	%rbx, 16(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_i40iw_handle_cqp_op
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_i40iw_pr_err
	jmp	LBB0_5
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	(%rbx), %eax
	movl	%eax, (%r15)
LBB0_5:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i40iw_put_cqp_request          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_I40IW_INVALID_PUSH_PAGE_INDEX,4,2 ## @I40IW_INVALID_PUSH_PAGE_INDEX
	.comm	_OP_MANAGE_PUSH_PAGE,4,2        ## @OP_MANAGE_PUSH_PAGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CQP-OP Push page fail"

	.no_dead_strip	_i40iw_alloc_push_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40iw_alloc_push_page
_i40iw_alloc_push_page:                 ; @i40iw_alloc_push_page
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _I40IW_INVALID_PUSH_PAGE_INDEX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I40IW_INVALID_PUSH_PAGE_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	w22, #1
	mov	w1, #1
	bl	_i40iw_get_cqp_request
	cbz	x0, LBB0_4
; %bb.2:
	mov	x21, x0
	add	x0, x0, #56
	bl	_atomic_inc
Lloh3:
	adrp	x8, _OP_MANAGE_PUSH_PAGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OP_MANAGE_PUSH_PAGE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x21, #48]
	str	w22, [x21, #8]
	ldr	w8, [x20, #4]
	str	w8, [x21, #40]
	stp	x19, xzr, [x21, #24]
	str	x21, [x21, #16]
	mov	x0, x19
	mov	x1, x21
	bl	_i40iw_handle_cqp_op
	cbz	w0, LBB0_5
; %bb.3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_i40iw_pr_err
	b	LBB0_6
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w8, [x21]
	str	w8, [x20]
LBB0_6:
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_i40iw_put_cqp_request
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_I40IW_INVALID_PUSH_PAGE_INDEX,4,2 ; @I40IW_INVALID_PUSH_PAGE_INDEX
	.comm	_OP_MANAGE_PUSH_PAGE,4,2        ; @OP_MANAGE_PUSH_PAGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CQP-OP Push page fail"

	.no_dead_strip	_i40iw_alloc_push_page
.subsections_via_symbols
