	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function actmon_update_target
_actmon_update_target:                  ## @actmon_update_target
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	8(%rsi), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	xorl	%edi, %edi
	callq	_cpufreq_get
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_actmon_cpu_to_emc_rate
	movq	%rax, %r14
	movq	8(%rbx), %rcx
	jmp	LBB0_3
LBB0_1:
	xorl	%r14d, %r14d
LBB0_3:
	movl	4(%rbx), %eax
	movq	_ACTMON_SAMPLING_PERIOD@GOTPCREL(%rip), %rsi
	cltd
	idivl	(%rsi)
	movl	%eax, %edi
	movl	%eax, (%rbx)
	movl	$10000, %eax                    ## imm = 0x2710
	xorl	%edx, %edx
	idivl	4(%rcx)
	movl	%eax, %esi
	callq	_do_percent
	addl	16(%rbx), %eax
	movl	%eax, (%rbx)
	movl	4(%rbx), %ecx
	movq	8(%rbx), %rdx
	cmpl	(%rdx), %ecx
	jl	LBB0_5
## %bb.4:
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_max
	movl	%eax, (%rbx)
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACTMON_SAMPLING_PERIOD,4,2     ## @ACTMON_SAMPLING_PERIOD
	.no_dead_strip	_actmon_update_target
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function actmon_update_target
_actmon_update_target:                  ; @actmon_update_target
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	x8, [x1, #8]
	ldr	w9, [x8]
	cbz	w9, LBB0_2
; %bb.1:
	mov	x20, x0
	mov	w0, #0
	bl	_cpufreq_get
	mov	x1, x0
	mov	x0, x20
	bl	_actmon_cpu_to_emc_rate
	mov	x20, x0
	ldr	x8, [x19, #8]
	b	LBB0_3
LBB0_2:
	mov	x20, #0
LBB0_3:
	ldr	w9, [x19, #4]
Lloh0:
	adrp	x10, _ACTMON_SAMPLING_PERIOD@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ACTMON_SAMPLING_PERIOD@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	sdiv	w0, w9, w10
	str	w0, [x19]
	ldr	w8, [x8, #4]
	mov	w9, #10000
	sdiv	w1, w9, w8
	bl	_do_percent
	ldr	w8, [x19, #16]
	add	w0, w0, w8
	str	w0, [x19]
	ldr	w8, [x19, #4]
	ldr	x9, [x19, #8]
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_5
; %bb.4:
	mov	x1, x20
	bl	_max
	str	w0, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ACTMON_SAMPLING_PERIOD,4,2     ; @ACTMON_SAMPLING_PERIOD
	.no_dead_strip	_actmon_update_target
.subsections_via_symbols
