	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function est_set_id16
_est_set_id16:                          ## @est_set_id16
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r15d
	movl	%edi, %r14d
	movq	_MSR_PERF_CTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_rdmsr
	andl	$-65536, %eax                   ## imm = 0xFFFF0000
	orl	%r15d, %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_wrmsr
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.1:
	movq	_EST_TRANS_LAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DELAY
	leaq	-36(%rbp), %rdi
	callq	_est_get_id16
	movl	-36(%rbp), %ecx
	cmpl	%r15d, %ecx
	je	LBB0_5
## %bb.2:
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	callq	_device_printf
LBB0_4:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSR_PERF_CTL,4,2               ## @MSR_PERF_CTL
	.comm	_EST_TRANS_LAT,4,2              ## @EST_TRANS_LAT
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid id16 (set, cur) = (%u, %u)\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_est_set_id16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function est_set_id16
_est_set_id16:                          ; @est_set_id16
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _MSR_PERF_CTL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MSR_PERF_CTL@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_rdmsr
	and	w8, w0, #0xffff0000
	orr	w1, w8, w19
	ldr	w0, [x22]
	bl	_wrmsr
	cbz	w21, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EST_TRANS_LAT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EST_TRANS_LAT@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_DELAY
	add	x0, sp, #12
	bl	_est_get_id16
	ldr	w3, [sp, #12]
	cmp	w3, w19
	b.ne	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh5:
	adrp	x8, _bootverbose@GOTPAGE
Lloh6:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_device_printf
LBB0_5:
Lloh10:
	adrp	x8, _ENXIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
LBB0_6:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MSR_PERF_CTL,4,2               ; @MSR_PERF_CTL
	.comm	_EST_TRANS_LAT,4,2              ; @EST_TRANS_LAT
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid id16 (set, cur) = (%u, %u)\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_est_set_id16
.subsections_via_symbols
