	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function singlethread_map_stacks_exec
_singlethread_map_stacks_exec:          ## @singlethread_map_stacks_exec
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_CTL_KERN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	_KERN_USRSTACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	$8, -40(%rbp)
	leaq	-32(%rbp), %rdi
	leaq	-48(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	movl	$2, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_sysctl
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.1:
	movq	_RLIMIT_STACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rsi
	callq	_getrlimit
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.2:
	movq	-48(%rbp), %rbx
	movq	-56(%rbp), %r14
	subq	%r14, %rbx
	xorl	%eax, %eax
	callq	__rtld_get_stack_prot
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_mprotect
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CTL_KERN,4,2                   ## @CTL_KERN
	.comm	_KERN_USRSTACK,4,2              ## @KERN_USRSTACK
	.comm	_RLIMIT_STACK,4,2               ## @RLIMIT_STACK
	.no_dead_strip	_singlethread_map_stacks_exec
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function singlethread_map_stacks_exec
_singlethread_map_stacks_exec:          ; @singlethread_map_stacks_exec
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _CTL_KERN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CTL_KERN@GOTPAGEOFF]
Lloh5:
	adrp	x9, _KERN_USRSTACK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _KERN_USRSTACK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #32]
	mov	w8, #8
	str	x8, [sp, #8]
	add	x0, sp, #32
	add	x2, sp, #16
	add	x3, sp, #8
	mov	w1, #2
	mov	x4, #0
	mov	w5, #0
	bl	_sysctl
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
Lloh9:
	adrp	x8, _RLIMIT_STACK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RLIMIT_STACK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	add	x1, sp, #24
	bl	_getrlimit
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.2:
	ldp	x8, x19, [sp, #16]
	sub	x20, x8, x19
	bl	__rtld_get_stack_prot
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_mprotect
LBB0_3:
	ldur	x8, [x29, #-24]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CTL_KERN,4,2                   ; @CTL_KERN
	.comm	_KERN_USRSTACK,4,2              ; @KERN_USRSTACK
	.comm	_RLIMIT_STACK,4,2               ; @RLIMIT_STACK
	.no_dead_strip	_singlethread_map_stacks_exec
.subsections_via_symbols
