	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function actmon_isr_device
_actmon_isr_device:                     ## @actmon_isr_device
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	_ACTMON_DEV_AVG_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_device_readl
	movq	%rax, (%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_tegra_devfreq_update_avg_wmark
	movq	_ACTMON_DEV_INTR_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_device_readl
	movq	%rax, %r12
	movq	_ACTMON_DEV_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_device_readl
	movq	%rax, %r15
	movq	_ACTMON_DEV_INTR_CONSECUTIVE_UPPER@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_3
## %bb.1:
	movq	8(%rbx), %rdi
	movq	16(%rbx), %rax
	movl	12(%rax), %esi
	callq	_do_percent
	movq	_ACTMON_BOOST_FREQ_STEP@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	addq	%rax, %rcx
	movq	%rcx, 8(%rbx)
	movq	_ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	(%r14), %rax
	cmpq	%rax, %rcx
	jge	LBB0_6
## %bb.2:
	movq	_ACTMON_DEV_CTRL_CONSECUTIVE_ABOVE_WMARK_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	_ACTMON_DEV_INTR_STATUS@GOTPCREL(%rip), %r12
	jmp	LBB0_9
LBB0_3:
	movq	_ACTMON_DEV_INTR_CONSECUTIVE_LOWER@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_7
## %bb.4:
	movq	8(%rbx), %rdi
	movq	16(%rbx), %rax
	movl	8(%rax), %esi
	callq	_do_percent
	movq	%rax, 8(%rbx)
	movq	_ACTMON_DEV_CTRL_CONSECUTIVE_ABOVE_WMARK_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r15d
	movq	_ACTMON_BOOST_FREQ_STEP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	sarl	%ecx
	movslq	%ecx, %rcx
	cmpq	%rcx, %rax
	movq	_ACTMON_DEV_INTR_STATUS@GOTPCREL(%rip), %r12
	jge	LBB0_8
## %bb.5:
	movq	$0, 8(%rbx)
	jmp	LBB0_9
LBB0_6:
	movq	%rax, 8(%rbx)
LBB0_7:
	movq	_ACTMON_DEV_INTR_STATUS@GOTPCREL(%rip), %r12
	jmp	LBB0_9
LBB0_8:
	movq	_ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
LBB0_9:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	cmpq	%rax, (%rbx)
	jge	LBB0_13
## %bb.11:
	cmpq	$0, 8(%rbx)
	jne	LBB0_14
## %bb.12:
	movq	_ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r15d
	jmp	LBB0_14
LBB0_13:
	movq	_ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
LBB0_14:
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_device_writel
	movq	_ACTMON_INTR_STATUS_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_device_writel
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_actmon_write_barrier           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ACTMON_DEV_AVG_COUNT,4,2       ## @ACTMON_DEV_AVG_COUNT
	.comm	_ACTMON_DEV_INTR_STATUS,4,2     ## @ACTMON_DEV_INTR_STATUS
	.comm	_ACTMON_DEV_CTRL,4,2            ## @ACTMON_DEV_CTRL
	.comm	_ACTMON_DEV_INTR_CONSECUTIVE_UPPER,4,2 ## @ACTMON_DEV_INTR_CONSECUTIVE_UPPER
	.comm	_ACTMON_BOOST_FREQ_STEP,4,2     ## @ACTMON_BOOST_FREQ_STEP
	.comm	_ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN,4,2 ## @ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN
	.comm	_ACTMON_DEV_CTRL_CONSECUTIVE_ABOVE_WMARK_EN,4,2 ## @ACTMON_DEV_CTRL_CONSECUTIVE_ABOVE_WMARK_EN
	.comm	_ACTMON_DEV_INTR_CONSECUTIVE_LOWER,4,2 ## @ACTMON_DEV_INTR_CONSECUTIVE_LOWER
	.comm	_ACTMON_INTR_STATUS_CLEAR,4,2   ## @ACTMON_INTR_STATUS_CLEAR
	.no_dead_strip	_actmon_isr_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function actmon_isr_device
_actmon_isr_device:                     ; @actmon_isr_device
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ACTMON_DEV_AVG_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACTMON_DEV_AVG_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_device_readl
	str	x0, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_tegra_devfreq_update_avg_wmark
Lloh3:
	adrp	x23, _ACTMON_DEV_INTR_STATUS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _ACTMON_DEV_INTR_STATUS@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_device_readl
	mov	x22, x0
Lloh5:
	adrp	x24, _ACTMON_DEV_CTRL@GOTPAGE
Lloh6:
	ldr	x24, [x24, _ACTMON_DEV_CTRL@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_device_readl
	mov	x21, x0
Lloh7:
	adrp	x8, _ACTMON_DEV_INTR_CONSECUTIVE_UPPER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ACTMON_DEV_INTR_CONSECUTIVE_UPPER@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_3
; %bb.1:
	ldp	x0, x8, [x20, #8]
	ldr	w1, [x8, #12]
	bl	_do_percent
Lloh10:
	adrp	x8, _ACTMON_BOOST_FREQ_STEP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ACTMON_BOOST_FREQ_STEP@GOTPAGEOFF]
Lloh12:
	ldrsw	x9, [x8]
	ldr	x8, [x19]
	add	x9, x9, x0
	cmp	x9, x8
	str	x9, [x20, #8]
Lloh13:
	adrp	x9, _ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w21, w9, w21
	b.ge	LBB0_6
; %bb.2:
Lloh16:
	adrp	x8, _ACTMON_DEV_CTRL_CONSECUTIVE_ABOVE_WMARK_EN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ACTMON_DEV_CTRL_CONSECUTIVE_ABOVE_WMARK_EN@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
Lloh18:
	adrp	x8, _ACTMON_DEV_INTR_CONSECUTIVE_LOWER@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ACTMON_DEV_INTR_CONSECUTIVE_LOWER@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_9
; %bb.4:
	ldp	x0, x8, [x20, #8]
	ldr	w1, [x8, #8]
	bl	_do_percent
	str	x0, [x20, #8]
Lloh21:
	adrp	x8, _ACTMON_DEV_CTRL_CONSECUTIVE_ABOVE_WMARK_EN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ACTMON_DEV_CTRL_CONSECUTIVE_ABOVE_WMARK_EN@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	orr	w21, w8, w21
Lloh24:
	adrp	x8, _ACTMON_BOOST_FREQ_STEP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ACTMON_BOOST_FREQ_STEP@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	asr	w8, w8, #1
	cmp	x0, w8, sxtw
	b.ge	LBB0_7
; %bb.5:
	str	xzr, [x20, #8]
	b	LBB0_9
LBB0_6:
	str	x8, [x20, #8]
	b	LBB0_9
LBB0_7:
Lloh27:
	adrp	x8, _ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_9:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.10:
	ldr	x9, [x20]
	cmp	x9, x8
	b.ge	LBB0_13
; %bb.11:
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_14
; %bb.12:
Lloh29:
	adrp	x8, _ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	bic	w21, w21, w8
	b	LBB0_14
LBB0_13:
Lloh32:
	adrp	x8, _ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_14:
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, x21
	bl	_device_writel
Lloh35:
	adrp	x8, _ACTMON_INTR_STATUS_CLEAR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ACTMON_INTR_STATUS_CLEAR@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	ldr	w2, [x23]
	mov	x0, x20
	bl	_device_writel
	mov	x0, 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	_actmon_write_barrier
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_ACTMON_DEV_AVG_COUNT,4,2       ; @ACTMON_DEV_AVG_COUNT
	.comm	_ACTMON_DEV_INTR_STATUS,4,2     ; @ACTMON_DEV_INTR_STATUS
	.comm	_ACTMON_DEV_CTRL,4,2            ; @ACTMON_DEV_CTRL
	.comm	_ACTMON_DEV_INTR_CONSECUTIVE_UPPER,4,2 ; @ACTMON_DEV_INTR_CONSECUTIVE_UPPER
	.comm	_ACTMON_BOOST_FREQ_STEP,4,2     ; @ACTMON_BOOST_FREQ_STEP
	.comm	_ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN,4,2 ; @ACTMON_DEV_CTRL_CONSECUTIVE_BELOW_WMARK_EN
	.comm	_ACTMON_DEV_CTRL_CONSECUTIVE_ABOVE_WMARK_EN,4,2 ; @ACTMON_DEV_CTRL_CONSECUTIVE_ABOVE_WMARK_EN
	.comm	_ACTMON_DEV_INTR_CONSECUTIVE_LOWER,4,2 ; @ACTMON_DEV_INTR_CONSECUTIVE_LOWER
	.comm	_ACTMON_INTR_STATUS_CLEAR,4,2   ; @ACTMON_INTR_STATUS_CLEAR
	.no_dead_strip	_actmon_isr_device
.subsections_via_symbols
