	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apm_cpu_idle
_apm_cpu_idle:                          ## @apm_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
	movq	_jiffies@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movl	%ecx, %esi
	subl	_apm_cpu_idle.last_jiffies(%rip), %esi
	movq	_idle_period@GOTPCREL(%rip), %r13
	xorl	%r15d, %r15d
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	_IDLE_CALC_LIMIT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jbe	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, _apm_cpu_idle.use_apm_idle(%rip)
	movl	%ecx, _apm_cpu_idle.last_jiffies(%rip)
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	(%r13), %esi
	jbe	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	%edi, %eax
	subl	_apm_cpu_idle.last_stime(%rip), %eax
	imull	$100, %eax, %eax
	xorl	%edx, %edx
	divl	%esi
	movq	_idle_threshold@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	seta	%al
	movq	_apm_info@GOTPCREL(%rip), %rdx
	cmpq	$0, (%rdx)
	sete	%dl
	andb	%al, %dl
	movzbl	%dl, %eax
	movl	%eax, _apm_cpu_idle.use_apm_idle(%rip)
	movl	%ecx, _apm_cpu_idle.last_jiffies(%rip)
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%edi, _apm_cpu_idle.last_stime(%rip)
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_IDLE_LEAKY_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	$1, %r15d
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=2
	xorl	%eax, %eax
	callq	_original_pm_idle
	xorl	%eax, %eax
	callq	_local_irq_disable
	movl	(%rbx), %ecx
	movl	%ecx, %esi
	subl	_apm_cpu_idle.last_jiffies(%rip), %esi
	cmpl	(%r13), %esi
	ja	LBB0_1
LBB0_7:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%eax, %eax
	callq	_need_resched
	testl	%eax, %eax
	jne	LBB0_18
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	cmpl	$0, _apm_cpu_idle.use_apm_idle(%rip)
	je	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movl	(%rbx), %r12d
	xorl	%eax, %eax
	callq	_apm_do_idle
	cmpl	$1, %eax
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=2
	testl	%eax, %eax
	jne	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=2
	cmpl	(%rbx), %r12d
	jne	LBB0_12
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	$1, %r15d
	testl	%r14d, %r14d
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=2
	decl	%r14d
	movl	$1, %r15d
	jmp	LBB0_7
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	$1, %r15d
	testl	%r14d, %r14d
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	_IDLE_LEAKY_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	$1, %r15d
	jmp	LBB0_7
LBB0_18:
	testl	%r15d, %r15d
	je	LBB0_20
## %bb.19:
	xorl	%eax, %eax
	callq	_apm_do_busy
LBB0_20:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_local_irq_enable               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_apm_cpu_idle.use_apm_idle,4,2 ## @apm_cpu_idle.use_apm_idle
.zerofill __DATA,__bss,_apm_cpu_idle.last_jiffies,4,2 ## @apm_cpu_idle.last_jiffies
.zerofill __DATA,__bss,_apm_cpu_idle.last_stime,4,2 ## @apm_cpu_idle.last_stime
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_IDLE_CALC_LIMIT,4,2            ## @IDLE_CALC_LIMIT
	.comm	_current,8,3                    ## @current
	.comm	_idle_period,4,2                ## @idle_period
	.comm	_idle_threshold,4,2             ## @idle_threshold
	.comm	_apm_info,8,3                   ## @apm_info
	.comm	_IDLE_LEAKY_MAX,4,2             ## @IDLE_LEAKY_MAX
	.no_dead_strip	_apm_cpu_idle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apm_cpu_idle
_apm_cpu_idle:                          ; @apm_cpu_idle
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	w28, #0
Lloh0:
	adrp	x19, _jiffies@GOTPAGE
Lloh1:
	ldr	x19, [x19, _jiffies@GOTPAGEOFF]
	ldr	w8, [x19]
	adrp	x20, _apm_cpu_idle.last_jiffies@PAGE
	ldr	w9, [x20, _apm_cpu_idle.last_jiffies@PAGEOFF]
	sub	w9, w8, w9
Lloh2:
	adrp	x21, _IDLE_CALC_LIMIT@GOTPAGE
Lloh3:
	ldr	x21, [x21, _IDLE_CALC_LIMIT@GOTPAGEOFF]
	adrp	x22, _apm_cpu_idle.use_apm_idle@PAGE
Lloh4:
	adrp	x24, _IDLE_LEAKY_MAX@GOTPAGE
Lloh5:
	ldr	x24, [x24, _IDLE_LEAKY_MAX@GOTPAGEOFF]
Lloh6:
	adrp	x25, _idle_period@GOTPAGE
Lloh7:
	ldr	x25, [x25, _idle_period@GOTPAGEOFF]
	adrp	x26, _apm_cpu_idle.last_stime@PAGE
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	w10, [x21]
	cmp	w9, w10
	b.ls	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	str	wzr, [x22, _apm_cpu_idle.use_apm_idle@PAGEOFF]
	str	w8, [x20, _apm_cpu_idle.last_jiffies@PAGEOFF]
Lloh8:
	adrp	x8, _current@GOTPAGE
Lloh9:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	w10, [x8]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w10, [x25]
	cmp	w9, w10
	b.ls	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh11:
	adrp	x10, _current@GOTPAGE
Lloh12:
	ldr	x10, [x10, _current@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	ldr	w10, [x10]
	ldr	w11, [x26, _apm_cpu_idle.last_stime@PAGEOFF]
	sub	w11, w10, w11
	mov	w12, #100
	mul	w11, w11, w12
	udiv	w9, w11, w9
Lloh14:
	adrp	x11, _idle_threshold@GOTPAGE
Lloh15:
	ldr	x11, [x11, _idle_threshold@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
Lloh17:
	adrp	x12, _apm_info@GOTPAGE
Lloh18:
	ldr	x12, [x12, _apm_info@GOTPAGEOFF]
Lloh19:
	ldr	x12, [x12]
	cmp	x12, #0
	ccmp	w9, w11, #0, eq
	cset	w9, hi
	str	w9, [x22, _apm_cpu_idle.use_apm_idle@PAGEOFF]
	str	w8, [x20, _apm_cpu_idle.last_jiffies@PAGEOFF]
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	str	w10, [x26, _apm_cpu_idle.last_stime@PAGEOFF]
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w27, [x24]
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_10 Depth=2
	cbnz	w27, LBB0_17
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	mov	w28, #1
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	bl	_original_pm_idle
	bl	_local_irq_disable
	ldr	w8, [x19]
	ldr	w9, [x20, _apm_cpu_idle.last_jiffies@PAGEOFF]
	ldr	w10, [x25]
	sub	w9, w8, w9
	cmp	w9, w10
	b.hi	LBB0_1
LBB0_10:                                ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_need_resched
	cbnz	w0, LBB0_18
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x22, _apm_cpu_idle.use_apm_idle@PAGEOFF]
	cbz	w8, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w23, [x19]
	bl	_apm_do_idle
	cmp	w0, #1
	b.eq	LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=2
	cbnz	w0, LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x19]
	cmp	w23, w8
	b.eq	LBB0_7
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=2
	cbz	w27, LBB0_8
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w27, [x24]
	mov	w28, #1
	b	LBB0_10
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=2
	sub	w27, w27, #1
	mov	w28, #1
	b	LBB0_10
LBB0_18:
	cbz	w28, LBB0_20
; %bb.19:
	bl	_apm_do_busy
LBB0_20:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_local_irq_enable
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_apm_cpu_idle.use_apm_idle,4,2 ; @apm_cpu_idle.use_apm_idle
.zerofill __DATA,__bss,_apm_cpu_idle.last_jiffies,4,2 ; @apm_cpu_idle.last_jiffies
.zerofill __DATA,__bss,_apm_cpu_idle.last_stime,4,2 ; @apm_cpu_idle.last_stime
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_IDLE_CALC_LIMIT,4,2            ; @IDLE_CALC_LIMIT
	.comm	_current,8,3                    ; @current
	.comm	_idle_period,4,2                ; @idle_period
	.comm	_idle_threshold,4,2             ; @idle_threshold
	.comm	_apm_info,8,3                   ; @apm_info
	.comm	_IDLE_LEAKY_MAX,4,2             ; @IDLE_LEAKY_MAX
	.no_dead_strip	_apm_cpu_idle
.subsections_via_symbols
