	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function medusa_set_decoderduration
_medusa_set_decoderduration:            ## @medusa_set_decoderduration
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$0, -36(%rbp)
	cmpl	$128, %esi
	jg	LBB0_9
## %bb.1:
	movl	%esi, %ebx
	movq	_VDEC_A@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jg	LBB0_9
## %bb.2:
	movl	%edx, %r12d
	movq	%rdi, %r14
	cmpl	$128, %ebx
	jne	LBB0_3
## %bb.4:
	movq	_DISP_GH_CNT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_DISP_AB_CNT@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %r15d
	movq	(%r14), %rdi
	leaq	-36(%rbp), %rdx
	movl	%r15d, %esi
	callq	_cx25821_i2c_read
	testb	$1, %bl
	jne	LBB0_7
## %bb.6:
	andl	$-65536, %eax                   ## imm = 0xFFFF0000
	orl	%r12d, %eax
	jmp	LBB0_8
LBB0_7:
	movzwl	%ax, %eax
	shll	$16, %r12d
	orl	%eax, %r12d
	movl	%r12d, %eax
LBB0_8:
	movq	(%r14), %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_cx25821_i2c_write
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DISP_AB_CNT,4,2                ## @DISP_AB_CNT
	.comm	_VDEC_A,4,2                     ## @VDEC_A
	.comm	_DISP_CD_CNT,4,2                ## @DISP_CD_CNT
	.comm	_DISP_EF_CNT,4,2                ## @DISP_EF_CNT
	.comm	_DISP_GH_CNT,4,2                ## @DISP_GH_CNT
	.no_dead_strip	_medusa_set_decoderduration
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function medusa_set_decoderduration
_medusa_set_decoderduration:            ; @medusa_set_decoderduration
	.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
	str	wzr, [sp, #12]
	cmp	w1, #128
	b.gt	LBB0_3
; %bb.1:
	mov	x20, x1
Lloh0:
	adrp	x8, _VDEC_A@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VDEC_A@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.gt	LBB0_3
; %bb.2:
	mov	x21, x2
	mov	x19, x0
Lloh3:
	adrp	x8, _DISP_GH_CNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DISP_GH_CNT@GOTPAGEOFF]
Lloh5:
	adrp	x9, _DISP_AB_CNT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DISP_AB_CNT@GOTPAGEOFF]
	cmp	w20, #128
	csel	x8, x8, x9, eq
	ldr	w22, [x8]
	ldr	x0, [x0]
	add	x2, sp, #12
	mov	x1, x22
	bl	_cx25821_i2c_read
	and	w8, w0, #0xffff0000
	bfi	w0, w21, #16, #16
	orr	w8, w8, w21
	tst	w20, #0x1
	csel	w2, w0, w8, ne
	ldr	x0, [x19]
	mov	x1, x22
	bl	_cx25821_i2c_write
LBB0_3:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_DISP_AB_CNT,4,2                ; @DISP_AB_CNT
	.comm	_VDEC_A,4,2                     ; @VDEC_A
	.comm	_DISP_CD_CNT,4,2                ; @DISP_CD_CNT
	.comm	_DISP_EF_CNT,4,2                ; @DISP_EF_CNT
	.comm	_DISP_GH_CNT,4,2                ; @DISP_GH_CNT
	.no_dead_strip	_medusa_set_decoderduration
.subsections_via_symbols
