	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setprof                        ## -- Begin function setprof
	.p2align	4, 0x90
_setprof:                               ## @setprof
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movl	%esi, -32(%rbp)
	movq	_nl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_N_GMONPARAM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rsi
	movq	$4, -48(%rbp)
	movq	_kflag@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.4:
	movl	(%rdi), %edi
	leaq	-32(%rbp), %rdx
	movl	$4, %ecx
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_kvm_write
	cmpq	$4, %rax
	jne	LBB0_5
	jmp	LBB0_6
LBB0_1:
	movq	_CTL_KERN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	_KERN_PROF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	_GPROF_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbp)
	leaq	-28(%rbp), %rdi
	leaq	-36(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	movl	$3, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_sysctl
	testq	%rax, %rax
	js	LBB0_5
## %bb.2:
	cmpl	%ebx, -36(%rbp)
	je	LBB0_6
## %bb.3:
	xorl	%edi, %edi
	callq	_seteuid
	movq	-48(%rbp), %r9
	leaq	-28(%rbp), %rdi
	leaq	-32(%rbp), %r8
	movl	$3, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_sysctl
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_getuid
	movl	%eax, %edi
	callq	_seteuid
	testq	%rbx, %rbx
	jns	LBB0_6
LBB0_5:
	movl	-32(%rbp), %eax
	movq	_GMON_PROF_OFF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	callq	_warnx
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-16(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_nl,8,3                         ## @nl
	.comm	_N_GMONPARAM,8,3                ## @N_GMONPARAM
	.comm	_kflag,4,2                      ## @kflag
	.comm	_CTL_KERN,4,2                   ## @CTL_KERN
	.comm	_KERN_PROF,4,2                  ## @KERN_PROF
	.comm	_GPROF_STATE,4,2                ## @GPROF_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"warning: cannot turn profiling %s"

	.comm	_GMON_PROF_OFF,4,2              ## @GMON_PROF_OFF
L_.str.1:                               ## @.str.1
	.asciz	"off"

L_.str.2:                               ## @.str.2
	.asciz	"on"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setprof                        ; -- Begin function setprof
	.p2align	2
_setprof:                               ; @setprof
	.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
	mov	x19, x1
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, _nl@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nl@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _N_GMONPARAM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _N_GMONPARAM@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	x1, [x8, x9, lsl #3]
	str	w19, [sp, #24]
	mov	w8, #4
	str	x8, [sp, #16]
Lloh9:
	adrp	x8, _kflag@GOTPAGE
Lloh10:
	ldr	x8, [x8, _kflag@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w0, [x0]
	add	x2, sp, #24
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	w3, #4
	bl	_kvm_write
	cmp	x0, #4
	b.ne	LBB0_5
	b	LBB0_6
LBB0_2:
Lloh12:
	adrp	x8, _CTL_KERN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CTL_KERN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _KERN_PROF@GOTPAGE
Lloh16:
	ldr	x9, [x9, _KERN_PROF@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #28]
Lloh18:
	adrp	x8, _GPROF_STATE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GPROF_STATE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [sp, #36]
	add	x0, sp, #28
	add	x2, sp, #12
	add	x3, sp, #16
	mov	w1, #3
	mov	x4, #0
	mov	x5, #0
	bl	_sysctl
	tbnz	x0, #63, LBB0_5
; %bb.3:
	ldr	w8, [sp, #12]
	cmp	w8, w19
	b.eq	LBB0_6
; %bb.4:
	mov	w0, #0
	bl	_seteuid
	ldr	x5, [sp, #16]
	add	x0, sp, #28
	add	x4, sp, #24
	mov	w1, #3
	mov	x2, #0
	mov	x3, #0
	bl	_sysctl
	mov	x19, x0
	bl	_getuid
	bl	_seteuid
	tbz	x19, #63, LBB0_6
LBB0_5:
	ldr	w8, [sp, #24]
Lloh21:
	adrp	x9, _GMON_PROF_OFF@GOTPAGE
Lloh22:
	ldr	x9, [x9, _GMON_PROF_OFF@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
Lloh24:
	adrp	x10, l_.str.2@PAGE
Lloh25:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh26:
	adrp	x11, l_.str.1@PAGE
Lloh27:
	add	x11, x11, l_.str.1@PAGEOFF
	cmp	w8, w9
	csel	x1, x11, x10, eq
Lloh28:
	adrp	x0, l_.str@PAGE
Lloh29:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
LBB0_6:
	ldur	x8, [x29, #-24]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_nl,8,3                         ; @nl
	.comm	_N_GMONPARAM,8,3                ; @N_GMONPARAM
	.comm	_kflag,4,2                      ; @kflag
	.comm	_CTL_KERN,4,2                   ; @CTL_KERN
	.comm	_KERN_PROF,4,2                  ; @KERN_PROF
	.comm	_GPROF_STATE,4,2                ; @GPROF_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"warning: cannot turn profiling %s"

	.comm	_GMON_PROF_OFF,4,2              ; @GMON_PROF_OFF
l_.str.1:                               ; @.str.1
	.asciz	"off"

l_.str.2:                               ; @.str.2
	.asciz	"on"

.subsections_via_symbols
