	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_oc_core_priority
_get_oc_core_priority:                  ## @get_oc_core_priority
	.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
	movq	_OC_MAILBOX_FC_CONTROL_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_MSR_OC_MAILBOX_CMD_OFFSET@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movl	%edi, %r14d
	movq	_MSR_OC_MAILBOX_BUSY_BIT@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_BIT_ULL
	orl	%eax, %ebx
	movl	%ebx, -44(%rbp)
	movq	_MSR_OC_MAILBOX@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_wrmsrl_safe
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
LBB0_4:
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_pr_debug
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_OC_MAILBOX_RETRY_COUNT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_2
## %bb.5:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	leaq	-44(%rbp), %rsi
	callq	_rdmsrl_safe
	testl	%eax, %eax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %ebx
	movl	(%r13), %edi
	callq	_BIT_ULL
	testl	%ebx, %eax
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	incl	%r15d
	movq	_OC_MAILBOX_RETRY_COUNT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jl	LBB0_6
## %bb.10:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_2:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_7:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_12:
	movl	-44(%rbp), %eax
	movq	_MSR_OC_MAILBOX_RSP_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%eax, %edx
	sarl	%cl, %edx
	testb	%dl, %dl
	je	LBB0_14
## %bb.13:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_ENXIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_14:
	movzbl	%al, %ebx
	leaq	L_.str.4(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_pr_debug
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_OC_MAILBOX_FC_CONTROL_CMD,4,2  ## @OC_MAILBOX_FC_CONTROL_CMD
	.comm	_MSR_OC_MAILBOX_CMD_OFFSET,4,2  ## @MSR_OC_MAILBOX_CMD_OFFSET
	.comm	_MSR_OC_MAILBOX_BUSY_BIT,4,2    ## @MSR_OC_MAILBOX_BUSY_BIT
	.comm	_MSR_OC_MAILBOX,4,2             ## @MSR_OC_MAILBOX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cpu %d OC mailbox write failed\n"

	.comm	_OC_MAILBOX_RETRY_COUNT,4,2     ## @OC_MAILBOX_RETRY_COUNT
L_.str.1:                               ## @.str.1
	.asciz	"cpu %d OC mailbox read failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"cpu %d OC mailbox still processing\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MSR_OC_MAILBOX_RSP_OFFSET,4,2  ## @MSR_OC_MAILBOX_RSP_OFFSET
L_.str.3:                               ## @.str.3
	.asciz	"cpu %d OC mailbox cmd failed\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.4:                               ## @.str.4
	.asciz	"cpu %d max_ratio %d\n"

	.no_dead_strip	_get_oc_core_priority
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_oc_core_priority
_get_oc_core_priority:                  ; @get_oc_core_priority
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, _OC_MAILBOX_FC_CONTROL_CMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OC_MAILBOX_FC_CONTROL_CMD@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MSR_OC_MAILBOX_CMD_OFFSET@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MSR_OC_MAILBOX_CMD_OFFSET@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	lsl	w20, w8, w9
Lloh6:
	adrp	x22, _MSR_OC_MAILBOX_BUSY_BIT@GOTPAGE
Lloh7:
	ldr	x22, [x22, _MSR_OC_MAILBOX_BUSY_BIT@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_BIT_ULL
	orr	w1, w20, w0
	str	w1, [sp, #12]
Lloh8:
	adrp	x23, _MSR_OC_MAILBOX@GOTPAGE
Lloh9:
	ldr	x23, [x23, _MSR_OC_MAILBOX@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_wrmsrl_safe
	cbz	w0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	mov	x1, x19
	bl	_pr_debug
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_4:
Lloh12:
	adrp	x24, _OC_MAILBOX_RETRY_COUNT@GOTPAGE
Lloh13:
	ldr	x24, [x24, _OC_MAILBOX_RETRY_COUNT@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.5:
	mov	w25, #0
Lloh14:
	adrp	x21, l_.str.2@PAGE
Lloh15:
	add	x21, x21, l_.str.2@PAGEOFF
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	add	x1, sp, #12
	bl	_rdmsrl_safe
	cbnz	w0, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w20, [sp, #12]
	ldr	w0, [x22]
	bl	_BIT_ULL
	tst	w0, w20
	b.eq	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	x1, x19
	bl	_pr_debug
	add	w25, w25, #1
	ldr	w8, [x24]
	cmp	w25, w8
	b.lt	LBB0_6
; %bb.9:
Lloh16:
	adrp	x8, _EBUSY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
	mov	w20, #0
	b	LBB0_3
LBB0_11:
	mov	x20, x0
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_12:
	ldr	w8, [sp, #12]
Lloh20:
	adrp	x9, _MSR_OC_MAILBOX_RSP_OFFSET@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MSR_OC_MAILBOX_RSP_OFFSET@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	asr	w9, w8, w9
	tst	w9, #0xff
	b.eq	LBB0_15
; %bb.13:
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_pr_debug
Lloh25:
	adrp	x8, _ENXIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_3
LBB0_15:
	and	w20, w8, #0xff
	str	x20, [sp]
Lloh27:
	adrp	x0, l_.str.4@PAGE
Lloh28:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_OC_MAILBOX_FC_CONTROL_CMD,4,2  ; @OC_MAILBOX_FC_CONTROL_CMD
	.comm	_MSR_OC_MAILBOX_CMD_OFFSET,4,2  ; @MSR_OC_MAILBOX_CMD_OFFSET
	.comm	_MSR_OC_MAILBOX_BUSY_BIT,4,2    ; @MSR_OC_MAILBOX_BUSY_BIT
	.comm	_MSR_OC_MAILBOX,4,2             ; @MSR_OC_MAILBOX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cpu %d OC mailbox write failed\n"

	.comm	_OC_MAILBOX_RETRY_COUNT,4,2     ; @OC_MAILBOX_RETRY_COUNT
l_.str.1:                               ; @.str.1
	.asciz	"cpu %d OC mailbox read failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"cpu %d OC mailbox still processing\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MSR_OC_MAILBOX_RSP_OFFSET,4,2  ; @MSR_OC_MAILBOX_RSP_OFFSET
l_.str.3:                               ; @.str.3
	.asciz	"cpu %d OC mailbox cmd failed\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.4:                               ; @.str.4
	.asciz	"cpu %d max_ratio %d\n"

	.no_dead_strip	_get_oc_core_priority
.subsections_via_symbols
