	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qedr_set_page
_qedr_set_page:                         ## @qedr_set_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_get_qedr_mr
	movq	%rax, %rbx
	movl	(%rax), %eax
	xorl	%edi, %edi
	cmpl	16(%rbx), %eax
	sete	%dil
	callq	_unlikely
	movl	24(%rbx), %edi
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_DP_ERR
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_3
LBB0_2:
	movq	_QEDR_MSG_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %r8
	callq	_DP_DEBUG
	movl	20(%rbx), %ecx
	sarl	$3, %ecx
	movq	8(%rbx), %rsi
	movl	(%rbx), %eax
	cltd
	idivl	%ecx
	cltq
	movq	(%rsi,%rax,8), %r15
	movslq	%edx, %r12
	movl	%r14d, %edi
	callq	_cpu_to_le32
	shlq	$4, %r12
	movq	%rax, 8(%r15,%r12)
	movq	%r14, %rdi
	callq	_upper_32_bits
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, (%r15,%r12)
	incl	(%rbx)
	xorl	%eax, %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"qedr_set_page fails when %d\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_QEDR_MSG_MR,4,2                ## @QEDR_MSG_MR
L_.str.1:                               ## @.str.1
	.asciz	"qedr_set_page pages[%d] = 0x%llx\n"

	.no_dead_strip	_qedr_set_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qedr_set_page
_qedr_set_page:                         ; @qedr_set_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
	mov	x20, x1
	bl	_get_qedr_mr
	mov	x19, x0
	ldr	w8, [x0]
	ldr	w9, [x0, #16]
	cmp	w8, w9
	cset	w0, eq
	bl	_unlikely
	mov	x8, x0
	ldr	w0, [x19, #24]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w2, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DP_ERR
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, _QEDR_MSG_MR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _QEDR_MSG_MR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w3, [x19]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x4, x20
	bl	_DP_DEBUG
	ldr	w8, [x19, #20]
	asr	w8, w8, #3
	ldr	x9, [x19, #8]
	ldr	w10, [x19]
	sdiv	w11, w10, w8
	ldr	x21, [x9, w11, sxtw #3]
	msub	w22, w11, w8, w10
	mov	x0, x20
	bl	_cpu_to_le32
	add	x21, x21, w22, sxtw #4
	str	x0, [x21, #8]
	mov	x0, x20
	bl	_upper_32_bits
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_cpu_to_le32
	mov	x8, x0
	mov	w0, #0
	str	x8, [x21]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_3:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"qedr_set_page fails when %d\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_QEDR_MSG_MR,4,2                ; @QEDR_MSG_MR
l_.str.1:                               ; @.str.1
	.asciz	"qedr_set_page pages[%d] = 0x%llx\n"

	.no_dead_strip	_qedr_set_page
.subsections_via_symbols
