	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lgs8gxx_set_mpeg_mode
_lgs8gxx_set_mpeg_mode:                 ## @lgs8gxx_set_mpeg_mode
	.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
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_LGS8GXX_PROD_LGS8G75@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$48, %eax
	movl	$194, %ebx
	cmovel	%eax, %ebx
	leaq	-44(%rbp), %rdx
	movl	%ebx, %esi
	callq	_lgs8gxx_read_reg
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movl	$248, %edx
	andl	-44(%rbp), %edx
	testl	%r13d, %r13d
	jne	LBB0_2
## %bb.3:
	movq	_TS_PARALLEL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_TS_SERIAL@GOTPCREL(%rip), %rax
LBB0_4:
	orl	(%rax), %edx
	testl	%r12d, %r12d
	jne	LBB0_5
## %bb.6:
	movq	_TS_CLK_NORMAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_TS_CLK_INVERTED@GOTPCREL(%rip), %rax
LBB0_7:
	orl	(%rax), %edx
	testl	%r15d, %r15d
	jne	LBB0_8
## %bb.9:
	movq	_TS_CLK_FREERUN@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_TS_CLK_GATED@GOTPCREL(%rip), %rax
LBB0_10:
	orl	(%rax), %edx
	movl	%edx, -44(%rbp)
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_lgs8gxx_write_reg
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LGS8GXX_PROD_LGS8G75,8,3       ## @LGS8GXX_PROD_LGS8G75
	.comm	_TS_SERIAL,4,2                  ## @TS_SERIAL
	.comm	_TS_PARALLEL,4,2                ## @TS_PARALLEL
	.comm	_TS_CLK_INVERTED,4,2            ## @TS_CLK_INVERTED
	.comm	_TS_CLK_NORMAL,4,2              ## @TS_CLK_NORMAL
	.comm	_TS_CLK_GATED,4,2               ## @TS_CLK_GATED
	.comm	_TS_CLK_FREERUN,4,2             ## @TS_CLK_FREERUN
	.no_dead_strip	_lgs8gxx_set_mpeg_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lgs8gxx_set_mpeg_mode
_lgs8gxx_set_mpeg_mode:                 ; @lgs8gxx_set_mpeg_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _LGS8GXX_PROD_LGS8G75@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LGS8GXX_PROD_LGS8G75@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	mov	w8, #194
	mov	w9, #48
	csel	w21, w9, w8, eq
	add	x2, sp, #12
	mov	x1, x21
	bl	_lgs8gxx_read_reg
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _TS_SERIAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TS_SERIAL@GOTPAGEOFF]
	and	w8, w8, #0xf8
Lloh5:
	adrp	x10, _TS_PARALLEL@GOTPAGE
Lloh6:
	ldr	x10, [x10, _TS_PARALLEL@GOTPAGEOFF]
	cmp	w23, #0
	csel	x9, x10, x9, eq
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh7:
	adrp	x9, _TS_CLK_INVERTED@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TS_CLK_INVERTED@GOTPAGEOFF]
Lloh9:
	adrp	x10, _TS_CLK_NORMAL@GOTPAGE
Lloh10:
	ldr	x10, [x10, _TS_CLK_NORMAL@GOTPAGEOFF]
	cmp	w22, #0
	csel	x9, x10, x9, eq
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _TS_CLK_GATED@GOTPAGE
Lloh12:
	ldr	x10, [x10, _TS_CLK_GATED@GOTPAGEOFF]
Lloh13:
	adrp	x11, _TS_CLK_FREERUN@GOTPAGE
Lloh14:
	ldr	x11, [x11, _TS_CLK_FREERUN@GOTPAGEOFF]
	orr	w8, w9, w8
	cmp	w20, #0
	csel	x9, x11, x10, eq
	ldr	w9, [x9]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	mov	x0, x19
	mov	x1, x21
	bl	_lgs8gxx_write_reg
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_LGS8GXX_PROD_LGS8G75,8,3       ; @LGS8GXX_PROD_LGS8G75
	.comm	_TS_SERIAL,4,2                  ; @TS_SERIAL
	.comm	_TS_PARALLEL,4,2                ; @TS_PARALLEL
	.comm	_TS_CLK_INVERTED,4,2            ; @TS_CLK_INVERTED
	.comm	_TS_CLK_NORMAL,4,2              ; @TS_CLK_NORMAL
	.comm	_TS_CLK_GATED,4,2               ; @TS_CLK_GATED
	.comm	_TS_CLK_FREERUN,4,2             ; @TS_CLK_FREERUN
	.no_dead_strip	_lgs8gxx_set_mpeg_mode
.subsections_via_symbols
