	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qed_chain_alloc_sanity_check
_qed_chain_alloc_sanity_check:          ## @qed_chain_alloc_sanity_check
	.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
	movq	%rcx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	%rdx, %rdi
	callq	_ELEMS_PER_PAGE
	imulq	%rbx, %rax
	movq	_QED_CHAIN_CNT_TYPE_U16@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	_U16_MAX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	incq	%rcx
	cmpq	%rcx, %rax
	jg	LBB0_4
LBB0_2:
	movq	_QED_CHAIN_CNT_TYPE_U32@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpl	%r15d, (%rdx)
	jne	LBB0_5
## %bb.3:
	movq	_U32_MAX@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jle	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_DP_NOTICE
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
LBB0_5:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QED_CHAIN_CNT_TYPE_U16,4,2     ## @QED_CHAIN_CNT_TYPE_U16
	.comm	_U16_MAX,8,3                    ## @U16_MAX
	.comm	_QED_CHAIN_CNT_TYPE_U32,4,2     ## @QED_CHAIN_CNT_TYPE_U32
	.comm	_U32_MAX,8,3                    ## @U32_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"The actual chain size (0x%llx) is larger than the maximal possible value\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_qed_chain_alloc_sanity_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qed_chain_alloc_sanity_check
_qed_chain_alloc_sanity_check:          ; @qed_chain_alloc_sanity_check
	.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
	mov	x21, x3
	mov	x20, x1
	mov	x19, x0
	mov	x0, x2
	bl	_ELEMS_PER_PAGE
	mul	x2, x0, x21
Lloh0:
	adrp	x8, _QED_CHAIN_CNT_TYPE_U16@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QED_CHAIN_CNT_TYPE_U16@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _U16_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _U16_MAX@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x8, x8, #1
	cmp	x2, x8
	b.gt	LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _QED_CHAIN_CNT_TYPE_U32@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QED_CHAIN_CNT_TYPE_U32@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _U32_MAX@GOTPAGE
Lloh10:
	ldr	x9, [x9, _U32_MAX@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	w8, w20
	ccmp	x2, x9, #4, eq
	b.gt	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DP_NOTICE
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_QED_CHAIN_CNT_TYPE_U16,4,2     ; @QED_CHAIN_CNT_TYPE_U16
	.comm	_U16_MAX,8,3                    ; @U16_MAX
	.comm	_QED_CHAIN_CNT_TYPE_U32,4,2     ; @QED_CHAIN_CNT_TYPE_U32
	.comm	_U32_MAX,8,3                    ; @U32_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"The actual chain size (0x%llx) is larger than the maximal possible value\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_qed_chain_alloc_sanity_check
.subsections_via_symbols
