	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_update_devfreq                 ## -- Begin function update_devfreq
	.p2align	4, 0x90
_update_devfreq:                        ## @update_devfreq
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	addq	$24, %rdi
	callq	_mutex_is_locked
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	16(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.4:
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	*(%rcx)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_min
	movq	%rax, %r14
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	callq	_max
	movq	-24(%rbp), %rsi
	cmpq	%rax, %rsi
	jae	LBB0_7
## %bb.6:
	movq	%rax, -24(%rbp)
	movq	%rax, %rsi
LBB0_7:
	xorl	%edx, %edx
	cmpq	%r14, %rsi
	jbe	LBB0_9
## %bb.8:
	movq	%r14, -24(%rbp)
	movq	_DEVFREQ_FLAG_LEAST_UPPER_BOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
LBB0_9:
	movq	%rbx, %rdi
	callq	_devfreq_set_target
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"devfreq->lock must be locked by the caller.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DEVFREQ_FLAG_LEAST_UPPER_BOUND,4,2 ## @DEVFREQ_FLAG_LEAST_UPPER_BOUND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_update_devfreq                 ; -- Begin function update_devfreq
	.p2align	2
_update_devfreq:                        ; @update_devfreq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x0, x0, #24
	bl	_mutex_is_locked
	cbz	w0, LBB0_7
; %bb.1:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.2:
	ldr	x8, [x8]
	add	x1, sp, #8
	mov	x0, x19
	blr	x8
	cbnz	w0, LBB0_9
; %bb.3:
	ldp	w1, w0, [x19, #8]
	bl	_min
	mov	x20, x0
	ldp	w1, w0, [x19]
	bl	_max
	ldr	x1, [sp, #8]
	cmp	x1, x0
	b.hs	LBB0_5
; %bb.4:
	str	x0, [sp, #8]
	mov	x1, x0
LBB0_5:
	cmp	x1, x20
	b.ls	LBB0_10
; %bb.6:
	str	x20, [sp, #8]
Lloh0:
	adrp	x8, _DEVFREQ_FLAG_LEAST_UPPER_BOUND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEVFREQ_FLAG_LEAST_UPPER_BOUND@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, x20
	b	LBB0_11
LBB0_7:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN
LBB0_8:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_10:
	mov	w2, #0
LBB0_11:
	mov	x0, x19
	bl	_devfreq_set_target
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"devfreq->lock must be locked by the caller.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DEVFREQ_FLAG_LEAST_UPPER_BOUND,4,2 ; @DEVFREQ_FLAG_LEAST_UPPER_BOUND
.subsections_via_symbols
