	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rwindow_save                   ## -- Begin function rwindow_save
	.p2align	4, 0x90
_rwindow_save:                          ## @rwindow_save
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rdx
	movq	(%rdi), %rax
	movq	8(%rdi), %rbx
	movq	_KTR_TRAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	(%rax), %ecx
	movl	(%rbx), %r8d
	leaq	L_.str(%rip), %rsi
	callq	_CTR3
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_flushw
	movl	(%rbx), %eax
	movq	_MAXWIN@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	setl	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movl	(%rbx), %r13d
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.1:
	movq	8(%rbx), %r12
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %r15
	incl	%r13d
	movq	_SPOFF@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %ebx
	movq	_KTR_TRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	callq	_CTR1
	addl	(%r14), %ebx
	movl	%ebx, %eax
	andl	$7, %eax
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ebx, %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_copyout
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$4, %r12
	addq	$4, %r15
	decl	%r13d
	cmpl	$1, %r13d
	jg	LBB0_2
## %bb.5:
	movq	_KTR_TRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	callq	_CTR1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	jmp	LBB0_6
LBB0_7:
	movq	_KTR_TRAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	callq	_CTR1
	movq	_SIGILL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KTR_TRAP,4,2                   ## @KTR_TRAP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rwindow_save: td=%p (%s) nsaved=%d"

	.comm	_MAXWIN,4,2                     ## @MAXWIN
L_.str.1:                               ## @.str.1
	.asciz	"rwindow_save: pcb_nsaved > MAXWIN"

L_.str.2:                               ## @.str.2
	.asciz	"rwindow_save: usp=%#lx"

	.comm	_SPOFF,8,3                      ## @SPOFF
L_.str.3:                               ## @.str.3
	.asciz	"rwindow_save: error=%d"

	.comm	_SIGILL,4,2                     ## @SIGILL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rwindow_save                   ; -- Begin function rwindow_save
	.p2align	2
_rwindow_save:                          ; @rwindow_save
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x2, x0
Lloh0:
	adrp	x22, _KTR_TRAP@GOTPAGE
Lloh1:
	ldr	x22, [x22, _KTR_TRAP@GOTPAGEOFF]
	ldr	w0, [x22]
	ldp	x8, x23, [x2]
	ldr	w3, [x8]
	ldr	w4, [x23]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_CTR3
	bl	_flushw
	ldr	w8, [x23]
Lloh4:
	adrp	x9, _MAXWIN@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MAXWIN@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, lt
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	ldr	w8, [x23]
	cbz	w8, LBB0_6
; %bb.1:
	ldp	x24, x19, [x23, #8]
	add	w25, w8, #1
Lloh9:
	adrp	x20, l_.str.2@PAGE
Lloh10:
	add	x20, x20, l_.str.2@PAGEOFF
Lloh11:
	adrp	x26, _SPOFF@GOTPAGE
Lloh12:
	ldr	x26, [x26, _SPOFF@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x24]
	ldr	w0, [x22]
	mov	x1, x20
	mov	x2, x21
	bl	_CTR1
	ldr	w8, [x26]
	add	w8, w21, w8
	ands	w2, w8, #0x7
	b.ne	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sxtw	x1, w8
	mov	x0, x19
	mov	w2, #4
	bl	_copyout
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #4
	add	x19, x19, #4
	sub	w25, w25, #1
	cmp	w25, #1
	b.gt	LBB0_2
; %bb.5:
	ldr	w0, [x22]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w2, #0
	bl	_CTR1
	mov	w0, #0
	str	wzr, [x23]
	b	LBB0_9
LBB0_6:
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	mov	x2, x0
LBB0_8:
	ldr	w0, [x22]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_CTR1
Lloh17:
	adrp	x8, _SIGILL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SIGILL@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_KTR_TRAP,4,2                   ; @KTR_TRAP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rwindow_save: td=%p (%s) nsaved=%d"

	.comm	_MAXWIN,4,2                     ; @MAXWIN
l_.str.1:                               ; @.str.1
	.asciz	"rwindow_save: pcb_nsaved > MAXWIN"

l_.str.2:                               ; @.str.2
	.asciz	"rwindow_save: usp=%#lx"

	.comm	_SPOFF,8,3                      ; @SPOFF
l_.str.3:                               ; @.str.3
	.asciz	"rwindow_save: error=%d"

	.comm	_SIGILL,4,2                     ; @SIGILL
.subsections_via_symbols
