	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stack_protections              ## -- Begin function stack_protections
	.p2align	4, 0x90
_stack_protections:                     ## @stack_protections
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_UM_THREAD_SIZE@GOTPCREL(%rip), %rax
	movq	_PROT_READ@GOTPCREL(%rip), %rcx
	movq	_PROT_WRITE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	_PROT_EXEC@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_mprotect
	testq	%rax, %rax
	js	LBB0_2
## %bb.1:
	popq	%rbp
	retq
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	popq	%rbp
	jmp	_panic                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_UM_THREAD_SIZE,4,2             ## @UM_THREAD_SIZE
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_PROT_EXEC,4,2                  ## @PROT_EXEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"protecting stack failed, errno = %d"

	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stack_protections              ; -- Begin function stack_protections
	.p2align	2
_stack_protections:                     ; @stack_protections
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _UM_THREAD_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UM_THREAD_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _PROT_EXEC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PROT_EXEC@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w8, w9
	bl	_mprotect
	tbnz	x0, #63, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_panic
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_UM_THREAD_SIZE,4,2             ; @UM_THREAD_SIZE
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_PROT_EXEC,4,2                  ; @PROT_EXEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"protecting stack failed, errno = %d"

	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
