	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grab_mcontext
_grab_mcontext:                         ## @grab_mcontext
	.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
	movl	%edx, %r15d
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$72, %edx
	callq	_memset
	movq	__MC_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%r13)
	movl	$0, 24(%r13)
	leaq	64(%r13), %rdi
	movq	(%r14), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	_GET_MC_CLEAR_RET@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_2
## %bb.1:
	movq	56(%r13), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rax)
LBB0_2:
	movl	(%r12), %eax
	movq	_PCB_FPREGS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.3:
	movq	_PCB_FPU@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	_curthread@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%r14, (%rax)
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	xorl	%eax, %eax
	callq	_critical_enter
	movq	%r14, %rdi
	callq	_save_fpu
	xorl	%eax, %eax
	callq	_critical_exit
LBB0_5:
	movq	__MC_FP_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%r13)
	leaq	48(%r13), %rdi
	leaq	32(%r12), %rsi
	movl	$8, %edx
	callq	_memcpy
	movl	$8, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r13), %rdi
	addq	%rbx, %rdi
	movq	24(%r12), %rsi
	addq	%r15, %rsi
	movl	$8, %edx
	callq	_memcpy
	addq	$4, %rbx
	addq	$16, %r15
	cmpq	$128, %rbx
	jne	LBB0_6
## %bb.7:
	movl	(%r12), %eax
LBB0_8:
	movq	_PCB_VSX@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r13), %rdi
	addq	%rbx, %rdi
	movq	24(%r12), %rax
	movq	(%rax,%rbx,4), %rsi
	addq	$8, %rsi
	movl	$8, %edx
	callq	_memcpy
	addq	$4, %rbx
	cmpq	$128, %rbx
	jne	LBB0_10
## %bb.11:
	movl	(%r12), %eax
LBB0_12:
	movq	_PCB_VEC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.13:
	movq	_curthread@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%r14, (%rax)
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	xorl	%eax, %eax
	callq	_critical_enter
	movq	%r14, %rdi
	callq	_save_vec
	xorl	%eax, %eax
	callq	_critical_exit
	movq	__MC_AV_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%r13)
	movl	20(%r12), %eax
	movl	%eax, 20(%r13)
	movl	16(%r12), %eax
	movl	%eax, 16(%r13)
	movq	8(%r13), %rdi
	movq	8(%r12), %rsi
	movl	$8, %edx
	callq	_memcpy
LBB0_14:
	movl	$72, (%r13)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__MC_VERSION,4,2                ## @_MC_VERSION
	.comm	_GET_MC_CLEAR_RET,4,2           ## @GET_MC_CLEAR_RET
	.comm	_PCB_FPREGS,4,2                 ## @PCB_FPREGS
	.comm	_PCB_FPU,4,2                    ## @PCB_FPU
	.comm	_curthread,8,3                  ## @curthread
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"get_mcontext: fp save not curthread"

	.comm	__MC_FP_VALID,4,2               ## @_MC_FP_VALID
	.comm	_PCB_VSX,4,2                    ## @PCB_VSX
	.comm	_PCB_VEC,4,2                    ## @PCB_VEC
	.comm	__MC_AV_VALID,4,2               ## @_MC_AV_VALID
	.no_dead_strip	_grab_mcontext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grab_mcontext
_grab_mcontext:                         ; @grab_mcontext
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
	mov	x0, x1
	mov	w1, #0
	mov	w2, #72
	bl	_memset
Lloh0:
	adrp	x8, __MC_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, __MC_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #68]
	str	wzr, [x19, #24]
	add	x0, x19, #64
	ldr	x1, [x20]
	mov	w2, #4
	bl	_memcpy
Lloh3:
	adrp	x8, _GET_MC_CLEAR_RET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GET_MC_CLEAR_RET@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x19, #56]
	stp	xzr, xzr, [x8, #24]
LBB0_2:
	ldr	w8, [x22]
Lloh6:
	adrp	x9, _PCB_FPREGS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PCB_FPREGS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x21, _curthread@GOTPAGE
Lloh10:
	ldr	x21, [x21, _curthread@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:
Lloh11:
	adrp	x9, _PCB_FPU@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PCB_FPU@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x21]
	cmp	x8, x20
	cset	w0, eq
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	bl	_critical_enter
	mov	x0, x20
	bl	_save_fpu
	bl	_critical_exit
LBB0_5:
Lloh16:
	adrp	x8, __MC_FP_VALID@GOTPAGE
Lloh17:
	ldr	x8, [x8, __MC_FP_VALID@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
	add	x0, x19, #48
	add	x1, x22, #32
	mov	w23, #8
	mov	w2, #8
	bl	_memcpy
	mov	x24, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	add	x0, x8, x24
	ldr	x8, [x22, #24]
	add	x1, x8, x23
	mov	w2, #8
	bl	_memcpy
	add	x24, x24, #4
	add	x23, x23, #16
	cmp	x24, #128
	b.ne	LBB0_6
; %bb.7:
	ldr	w8, [x22]
LBB0_8:
Lloh19:
	adrp	x9, _PCB_VSX@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PCB_VSX@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.9:
	mov	x23, #0
	mov	x24, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	add	x0, x8, x24
	ldr	x8, [x22, #24]
	ldr	x8, [x8, x23]
	add	x1, x8, #8
	mov	w2, #8
	bl	_memcpy
	add	x24, x24, #4
	add	x23, x23, #16
	cmp	x24, #128
	b.ne	LBB0_10
; %bb.11:
	ldr	w8, [x22]
LBB0_12:
Lloh22:
	adrp	x9, _PCB_VEC@GOTPAGE
Lloh23:
	ldr	x9, [x9, _PCB_VEC@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	ldr	x8, [x21]
	cmp	x8, x20
	cset	w0, eq
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	bl	_critical_enter
	mov	x0, x20
	bl	_save_vec
	bl	_critical_exit
Lloh27:
	adrp	x8, __MC_AV_VALID@GOTPAGE
Lloh28:
	ldr	x8, [x8, __MC_AV_VALID@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
	ldr	d0, [x22, #16]
	str	d0, [x19, #16]
	ldr	x0, [x19, #8]
	ldr	x1, [x22, #8]
	mov	w2, #8
	bl	_memcpy
LBB0_14:
	mov	w8, #72
	str	w8, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	__MC_VERSION,4,2                ; @_MC_VERSION
	.comm	_GET_MC_CLEAR_RET,4,2           ; @GET_MC_CLEAR_RET
	.comm	_PCB_FPREGS,4,2                 ; @PCB_FPREGS
	.comm	_PCB_FPU,4,2                    ; @PCB_FPU
	.comm	_curthread,8,3                  ; @curthread
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"get_mcontext: fp save not curthread"

	.comm	__MC_FP_VALID,4,2               ; @_MC_FP_VALID
	.comm	_PCB_VSX,4,2                    ; @PCB_VSX
	.comm	_PCB_VEC,4,2                    ; @PCB_VEC
	.comm	__MC_AV_VALID,4,2               ; @_MC_AV_VALID
	.no_dead_strip	_grab_mcontext
.subsections_via_symbols
