	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rds_message_purge
_rds_message_purge:                     ## @rds_message_purge
	.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	%rdi, %r15
	movq	_RDS_MSG_PAGEVEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	48(%r15), %rsi
	callq	_test_bit
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_1
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpq	$0, 32(%r15)
	je	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	leaq	L_.str(%rip), %r14
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r15), %rdi
	addq	%rbx, %rdi
	callq	_sg_page
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_rdsdebug
	movq	40(%r15), %rdi
	addq	%rbx, %rdi
	callq	_sg_page
	movq	%rax, %rdi
	callq	___free_page
	incq	%r12
	addq	$4, %rbx
	cmpq	32(%r15), %r12
	jb	LBB0_3
LBB0_4:
	movq	$0, 32(%r15)
	leaq	16(%r15), %r14
	cmpq	$0, 24(%r15)
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_rds_rdma_free_op
LBB0_6:
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_rds_mr_put
LBB0_8:
	cmpq	$0, 8(%r15)
	je	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_rds_atomic_free_op
LBB0_10:
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rds_mr_put                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RDS_MSG_PAGEVEC,4,2            ## @RDS_MSG_PAGEVEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"putting data page %p\n"

	.no_dead_strip	_rds_message_purge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rds_message_purge
_rds_message_purge:                     ; @rds_message_purge
	.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	x19, x0
Lloh0:
	adrp	x8, _RDS_MSG_PAGEVEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RDS_MSG_PAGEVEC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #48
	bl	_test_bit
	bl	_unlikely
	cbz	x0, LBB0_2
LBB0_1:
	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_2:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_5
; %bb.3:
	mov	x21, #0
	mov	x22, #0
Lloh3:
	adrp	x20, l_.str@PAGE
Lloh4:
	add	x20, x20, l_.str@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	add	x0, x8, x21
	bl	_sg_page
	mov	x1, x0
	mov	x0, x20
	bl	_rdsdebug
	ldr	x8, [x19, #40]
	add	x0, x8, x21
	bl	_sg_page
	bl	___free_page
	add	x22, x22, #1
	ldr	x8, [x19, #32]
	add	x21, x21, #4
	cmp	x22, x8
	b.lo	LBB0_4
LBB0_5:
	str	xzr, [x19, #32]
	add	x20, x19, #16
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_rds_rdma_free_op
LBB0_7:
	ldr	x0, [x20]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_rds_mr_put
LBB0_9:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_rds_atomic_free_op
LBB0_11:
	ldr	x0, [x19]
	cbz	x0, LBB0_1
; %bb.12:
	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	_rds_mr_put
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_RDS_MSG_PAGEVEC,4,2            ; @RDS_MSG_PAGEVEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"putting data page %p\n"

	.no_dead_strip	_rds_message_purge
.subsections_via_symbols
