	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_work
_get_work:                              ## @get_work
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	16(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r12
	movq	8(%rdi), %r14
	movl	16(%r14), %edi
	callq	_hc_thread_mutex_lock
	movq	(%r14), %r15
	movq	8(%r14), %rbx
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rsi
	callq	_MIN
	movq	%rax, %rbx
LBB0_2:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r15, (%r12)
	subq	%r15, %rbx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	cmpq	(%r15), %rbx
	jge	LBB0_5
## %bb.3:
	cmpq	$0, 8(%r15)
	jne	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_set_kernel_power_final
LBB0_5:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_get_power
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_MIN
	movq	%rax, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_MIN
	movq	%rax, %rbx
	addq	%rax, (%r14)
	movl	16(%r14), %edi
	callq	_hc_thread_mutex_unlock
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_get_work
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_work
_get_work:                              ; @get_work
	.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	x19, x2
	mov	x20, x1
	mov	x22, x0
	ldp	x24, x21, [x0, #8]
	ldr	x23, [x0]
	ldr	w0, [x24, #16]
	bl	_hc_thread_mutex_lock
	ldr	x0, [x23]
	ldp	x23, x1, [x24]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_MIN
	mov	x1, x0
LBB0_2:
	str	x23, [x20]
	ldr	x8, [x21]
	sub	x23, x1, x23
	cmp	x23, x8
	b.ge	LBB0_5
; %bb.3:
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_5
; %bb.4:
	mov	x0, x22
	mov	x1, x23
	bl	_set_kernel_power_final
LBB0_5:
	mov	x0, x21
	mov	x1, x20
	bl	_get_power
	mov	x1, x0
	mov	x0, x23
	bl	_MIN
	mov	x1, x19
	bl	_MIN
	mov	x19, x0
	ldr	x8, [x24]
	add	x8, x8, x0
	str	x8, [x24]
	ldr	w0, [x24, #16]
	bl	_hc_thread_mutex_unlock
	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
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_get_work
.subsections_via_symbols
