	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function state_eval_encoder_run
_state_eval_encoder_run:                ## @state_eval_encoder_run
	.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	%rdi, %rbx
	cmpl	$0, (%rdi)
	je	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	callq	_state_check_disable_encoder_run
	testl	%eax, %eax
	je	LBB0_12
## %bb.2:
	cmpq	$0, 24(%rbx)
	je	LBB0_4
## %bb.3:
	leaq	8(%rbx), %rdi
	callq	_del_timer_sync
	movq	%rbx, %rdi
	callq	_pvr2_encoder_stop
	testq	%rax, %rax
	js	LBB0_10
LBB0_4:
	movl	$0, (%rbx)
	xorl	%esi, %esi
	jmp	LBB0_9
LBB0_5:
	movq	%rbx, %rdi
	callq	_state_check_enable_encoder_run
	testl	%eax, %eax
	je	LBB0_12
## %bb.6:
	movq	%rbx, %rdi
	callq	_pvr2_encoder_start
	testq	%rax, %rax
	js	LBB0_10
## %bb.7:
	movl	$1, (%rbx)
	movl	$1, %esi
	cmpl	$0, 16(%rbx)
	jne	LBB0_9
## %bb.8:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_TIME_MSEC_ENCODER_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	addq	%r14, %rax
	leaq	8(%rbx), %rdi
	movq	%rax, 8(%rbx)
	callq	_add_timer
	movl	(%rbx), %esi
LBB0_9:
	leaq	L_.str(%rip), %rdi
	callq	_trace_stbit
LBB0_10:
	movl	$1, %eax
	jmp	LBB0_13
LBB0_12:
	xorl	%eax, %eax
LBB0_13:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_TIME_MSEC_ENCODER_OK,4,2       ## @TIME_MSEC_ENCODER_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"state_encoder_run"

	.no_dead_strip	_state_eval_encoder_run
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function state_eval_encoder_run
_state_eval_encoder_run:                ; @state_eval_encoder_run
	.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, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_state_check_disable_encoder_run
	cbz	w0, LBB0_11
; %bb.2:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_4
; %bb.3:
	add	x0, x19, #8
	bl	_del_timer_sync
	mov	x0, x19
	bl	_pvr2_encoder_stop
	tbnz	x0, #63, LBB0_10
LBB0_4:
	mov	w1, #0
	str	wzr, [x19]
	b	LBB0_9
LBB0_5:
	mov	x0, x19
	bl	_state_check_enable_encoder_run
	cbz	w0, LBB0_11
; %bb.6:
	mov	x0, x19
	bl	_pvr2_encoder_start
	mov	w1, #1
	tbnz	x0, #63, LBB0_12
; %bb.7:
	str	w1, [x19]
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_9
; %bb.8:
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
Lloh3:
	adrp	x8, _TIME_MSEC_ENCODER_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TIME_MSEC_ENCODER_OK@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	add	x8, x0, x20
	mov	x0, x19
	str	x8, [x0, #8]!
	bl	_add_timer
	ldr	w1, [x19]
LBB0_9:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_trace_stbit
LBB0_10:
	mov	w1, #1
	b	LBB0_12
LBB0_11:
	mov	w1, #0
LBB0_12:
	mov	x0, x1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_TIME_MSEC_ENCODER_OK,4,2       ; @TIME_MSEC_ENCODER_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"state_encoder_run"

	.no_dead_strip	_state_eval_encoder_run
.subsections_via_symbols
