	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpufreq_gx_target
_cpufreq_gx_target:                     ## @cpufreq_gx_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	%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
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	_stock_freq@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	je	LBB0_2
## %bb.3:
	movq	%rdi, %rbx
	movq	$0, 8(%rdi)
	leaq	-48(%rbp), %rax
	leaq	-44(%rbp), %rdx
	movl	%esi, %edi
	movq	%rax, %rsi
	callq	_gx_validate_speed
	movl	%eax, %edi
	cmpl	(%rbx), %eax
	jae	LBB0_6
## %bb.4:
	movq	_max_duration@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %r14
	leaq	-44(%rbp), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %eax
	xorl	%edx, %edx
	divl	(%r13)
	addl	%eax, %edi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_gx_validate_speed
	movl	%eax, %edi
	cmpl	(%rbx), %eax
	jb	LBB0_5
LBB0_6:
	cmpl	4(%rbx), %edi
	jbe	LBB0_9
## %bb.7:
	movq	_max_duration@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %r14
	leaq	-44(%rbp), %r15
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %eax
	xorl	%edx, %edx
	divl	(%r13)
	subl	%eax, %edi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_gx_validate_speed
	movl	%eax, %edi
	cmpl	4(%rbx), %eax
	ja	LBB0_8
LBB0_9:
	callq	_gx_set_cpuspeed
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stock_freq,4,2                 ## @stock_freq
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_max_duration,4,2               ## @max_duration
	.no_dead_strip	_cpufreq_gx_target
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpufreq_gx_target
_cpufreq_gx_target:                     ; @cpufreq_gx_target
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	cbz	x0, LBB0_9
; %bb.1:
Lloh0:
	adrp	x20, _stock_freq@GOTPAGE
Lloh1:
	ldr	x20, [x20, _stock_freq@GOTPAGEOFF]
	ldr	w9, [x20]
	cbz	w9, LBB0_9
; %bb.2:
	mov	x8, x1
	mov	x19, x0
	str	xzr, [x0, #8]
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x8
	bl	_gx_validate_speed
	ldr	w8, [x19]
	cmp	w0, w8
	b.hs	LBB0_5
; %bb.3:
Lloh2:
	adrp	x21, _max_duration@GOTPAGE
Lloh3:
	ldr	x21, [x21, _max_duration@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	ldr	w9, [x21]
	udiv	w8, w8, w9
	add	w0, w8, w0
	add	x1, sp, #12
	add	x2, sp, #8
	bl	_gx_validate_speed
	ldr	w8, [x19]
	cmp	w0, w8
	b.lo	LBB0_4
LBB0_5:
	ldr	w8, [x19, #4]
	cmp	w0, w8
	b.ls	LBB0_8
; %bb.6:
Lloh4:
	adrp	x21, _max_duration@GOTPAGE
Lloh5:
	ldr	x21, [x21, _max_duration@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	ldr	w9, [x21]
	udiv	w8, w8, w9
	sub	w0, w0, w8
	add	x1, sp, #12
	add	x2, sp, #8
	bl	_gx_validate_speed
	ldr	w8, [x19, #4]
	cmp	w0, w8
	b.hi	LBB0_7
LBB0_8:
	bl	_gx_set_cpuspeed
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_stock_freq,4,2                 ; @stock_freq
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_max_duration,4,2               ; @max_duration
	.no_dead_strip	_cpufreq_gx_target
.subsections_via_symbols
