	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpu_idle                       ## -- Begin function cpu_idle
	.p2align	4, 0x90
_cpu_idle:                              ## @cpu_idle
	.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
	movl	%edi, %ebx
	movq	_KTR_SPARE2@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_curcpu@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_CTR2
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.1:
	movq	_cpu_feature2@GOTPCREL(%rip), %rax
	movq	_CPUID2_MON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	$-1, %r14d
	testl	%ecx, (%rax)
	je	LBB0_5
## %bb.2:
	movq	_idle_mwait@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.3:
	movl	%ebx, %edi
	callq	_cpu_idle_mwait
	jmp	LBB0_11
LBB0_4:
	xorl	%eax, %eax
	callq	_critical_enter
	xorl	%eax, %eax
	callq	_cpu_idleclock
	movl	%eax, %r14d
LBB0_5:
	movq	_cpu_ident_amdc1e@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.6:
	movq	_cpu_disable_c3_sleep@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.7:
	movq	_MSR_AMDK8_IPM@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_rdmsr
	movq	_AMDK8_CMPHALT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_9
## %bb.8:
	movl	(%r13), %edi
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, %esi
	callq	_wrmsr
LBB0_9:
	movl	%r14d, %edi
	callq	_cpu_idle_fn
	testl	%ebx, %ebx
	jne	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	callq	_cpu_activeclock
	xorl	%eax, %eax
	callq	_critical_exit
LBB0_11:
	movl	(%r15), %edi
	movl	(%r12), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CTR2                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_KTR_SPARE2,4,2                 ## @KTR_SPARE2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cpu_idle(%d) at %d"

	.comm	_curcpu,4,2                     ## @curcpu
	.comm	_cpu_feature2,4,2               ## @cpu_feature2
	.comm	_CPUID2_MON,4,2                 ## @CPUID2_MON
	.comm	_idle_mwait,8,3                 ## @idle_mwait
	.comm	_cpu_ident_amdc1e,8,3           ## @cpu_ident_amdc1e
	.comm	_cpu_disable_c3_sleep,8,3       ## @cpu_disable_c3_sleep
	.comm	_MSR_AMDK8_IPM,4,2              ## @MSR_AMDK8_IPM
	.comm	_AMDK8_CMPHALT,4,2              ## @AMDK8_CMPHALT
L_.str.1:                               ## @.str.1
	.asciz	"cpu_idle(%d) at %d done"

	.comm	_cpuid,4,2                      ## @cpuid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpu_idle                       ; -- Begin function cpu_idle
	.p2align	2
_cpu_idle:                              ; @cpu_idle
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x21, _KTR_SPARE2@GOTPAGE
Lloh1:
	ldr	x21, [x21, _KTR_SPARE2@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x22, _curcpu@GOTPAGE
Lloh3:
	ldr	x22, [x22, _curcpu@GOTPAGEOFF]
	ldr	w3, [x22]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_CTR2
	cbz	w19, LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _cpu_feature2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _cpu_feature2@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _CPUID2_MON@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CPUID2_MON@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh12:
	adrp	x9, _idle_mwait@GOTPAGE
Lloh13:
	ldr	x9, [x9, _idle_mwait@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	w8, #0
	ccmp	x9, #0, #4, ne
	b.ne	LBB0_9
; %bb.2:
	mov	w20, #-1
	b	LBB0_4
LBB0_3:
	bl	_critical_enter
	bl	_cpu_idleclock
	mov	x20, x0
LBB0_4:
Lloh15:
	adrp	x8, _cpu_ident_amdc1e@GOTPAGE
Lloh16:
	ldr	x8, [x8, _cpu_ident_amdc1e@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
Lloh18:
	adrp	x9, _cpu_disable_c3_sleep@GOTPAGE
Lloh19:
	ldr	x9, [x9, _cpu_disable_c3_sleep@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x9, #0, #4, ne
	b.eq	LBB0_7
; %bb.5:
Lloh21:
	adrp	x23, _MSR_AMDK8_IPM@GOTPAGE
Lloh22:
	ldr	x23, [x23, _MSR_AMDK8_IPM@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_rdmsr
Lloh23:
	adrp	x8, _AMDK8_CMPHALT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AMDK8_CMPHALT@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x8]
	tst	w9, w0
	b.eq	LBB0_7
; %bb.6:
	ldr	w8, [x23]
	bic	w1, w0, w9
	mov	x0, x8
	bl	_wrmsr
LBB0_7:
	mov	x0, x20
	bl	_cpu_idle_fn
	cbnz	w19, LBB0_10
; %bb.8:
	bl	_cpu_activeclock
	bl	_critical_exit
	b	LBB0_10
LBB0_9:
	mov	x0, x19
	bl	_cpu_idle_mwait
LBB0_10:
	ldr	w0, [x21]
	ldr	w3, [x22]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_CTR2
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_KTR_SPARE2,4,2                 ; @KTR_SPARE2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cpu_idle(%d) at %d"

	.comm	_curcpu,4,2                     ; @curcpu
	.comm	_cpu_feature2,4,2               ; @cpu_feature2
	.comm	_CPUID2_MON,4,2                 ; @CPUID2_MON
	.comm	_idle_mwait,8,3                 ; @idle_mwait
	.comm	_cpu_ident_amdc1e,8,3           ; @cpu_ident_amdc1e
	.comm	_cpu_disable_c3_sleep,8,3       ; @cpu_disable_c3_sleep
	.comm	_MSR_AMDK8_IPM,4,2              ; @MSR_AMDK8_IPM
	.comm	_AMDK8_CMPHALT,4,2              ; @AMDK8_CMPHALT
l_.str.1:                               ; @.str.1
	.asciz	"cpu_idle(%d) at %d done"

	.comm	_cpuid,4,2                      ; @cpuid
.subsections_via_symbols
