	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lgs8gxx_set_mode_manual
_lgs8gxx_set_mode_manual:               ## @lgs8gxx_set_mode_manual
	.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
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_LGS8GXX_PROD_LGS8G75@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	leaq	-20(%rbp), %r14
	movq	%rbx, %rdi
	movl	$12, %esi
	movq	%r14, %rdx
	callq	_lgs8gxx_read_reg
	movl	$-129, %edx
	andl	-20(%rbp), %edx
	movl	%edx, -20(%rbp)
	movq	%rbx, %rdi
	movl	$12, %esi
	callq	_lgs8gxx_write_reg
	movq	%rbx, %rdi
	movl	$12, %esi
	movq	%r14, %rdx
	callq	_lgs8gxx_read_reg
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$25, %esi
	callq	_lgs8gxx_read_reg
	movl	-20(%rbp), %eax
	andl	$3, %eax
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.2:
	testb	$1, -24(%rbp)
	jne	LBB0_3
LBB0_4:
	movq	%rbx, %rdi
	movl	$110, %esi
	movl	$63, %edx
	callq	_lgs8gxx_write_reg
	movq	%rbx, %rdi
	movl	$57, %esi
	xorl	%edx, %edx
	callq	_lgs8gxx_write_reg
	movq	%rbx, %rdi
	movl	$61, %esi
	movl	$4, %edx
	jmp	LBB0_8
LBB0_5:
	movq	%rbx, %rdi
	movl	$126, %esi
	xorl	%edx, %edx
	callq	_lgs8gxx_write_reg
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_LGS8GXX_PROD_LGS8913@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	movl	$193, %esi
	xorl	%edx, %edx
	callq	_lgs8gxx_write_reg
LBB0_7:
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$197, %esi
	callq	_lgs8gxx_read_reg
	movl	$224, %edx
	andl	-20(%rbp), %edx
	orl	$6, %edx
	movl	%edx, -20(%rbp)
	movq	%rbx, %rdi
	movl	$197, %esi
	jmp	LBB0_8
LBB0_3:
	movq	%rbx, %rdi
	movl	$110, %esi
	movl	$5, %edx
	callq	_lgs8gxx_write_reg
	movq	%rbx, %rdi
	movl	$57, %esi
	movl	$2, %edx
	callq	_lgs8gxx_write_reg
	movq	%rbx, %rdi
	movl	$57, %esi
	movl	$3, %edx
	callq	_lgs8gxx_write_reg
	movq	%rbx, %rdi
	movl	$61, %esi
	movl	$5, %edx
	callq	_lgs8gxx_write_reg
	movq	%rbx, %rdi
	movl	$62, %esi
	movl	$40, %edx
	callq	_lgs8gxx_write_reg
	movq	%rbx, %rdi
	movl	$83, %esi
	movl	$128, %edx
LBB0_8:
	callq	_lgs8gxx_write_reg
	movq	%rbx, %rdi
	callq	_lgs8gxx_soft_reset
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LGS8GXX_PROD_LGS8G75,8,3       ## @LGS8GXX_PROD_LGS8G75
	.comm	_LGS8GXX_PROD_LGS8913,8,3       ## @LGS8GXX_PROD_LGS8913
	.no_dead_strip	_lgs8gxx_set_mode_manual
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lgs8gxx_set_mode_manual
_lgs8gxx_set_mode_manual:               ; @lgs8gxx_set_mode_manual
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _LGS8GXX_PROD_LGS8G75@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LGS8GXX_PROD_LGS8G75@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #12
	bl	_lgs8gxx_read_reg
	ldr	w8, [sp, #12]
	and	w2, w8, #0xffffff7f
	str	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #12
	bl	_lgs8gxx_write_reg
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #12
	bl	_lgs8gxx_read_reg
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #25
	bl	_lgs8gxx_read_reg
	ldr	w8, [sp, #12]
	and	w8, w8, #0x3
	cmp	w8, #1
	b.ne	LBB0_3
; %bb.2:
	ldrb	w8, [sp, #8]
	tbnz	w8, #0, LBB0_7
LBB0_3:
	mov	x0, x19
	mov	w1, #110
	mov	w2, #63
	bl	_lgs8gxx_write_reg
	mov	x0, x19
	mov	w1, #57
	mov	w2, #0
	bl	_lgs8gxx_write_reg
	mov	x0, x19
	mov	w1, #61
	mov	w2, #4
	b	LBB0_8
LBB0_4:
	mov	x0, x19
	mov	w1, #126
	mov	w2, #0
	bl	_lgs8gxx_write_reg
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _LGS8GXX_PROD_LGS8913@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LGS8GXX_PROD_LGS8913@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x19
	mov	w1, #193
	mov	w2, #0
	bl	_lgs8gxx_write_reg
LBB0_6:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #197
	bl	_lgs8gxx_read_reg
	ldr	w8, [sp, #12]
	and	w8, w8, #0xe0
	orr	w2, w8, #0x6
	str	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #197
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	mov	w1, #110
	mov	w2, #5
	bl	_lgs8gxx_write_reg
	mov	x0, x19
	mov	w1, #57
	mov	w2, #2
	bl	_lgs8gxx_write_reg
	mov	x0, x19
	mov	w1, #57
	mov	w2, #3
	bl	_lgs8gxx_write_reg
	mov	x0, x19
	mov	w1, #61
	mov	w2, #5
	bl	_lgs8gxx_write_reg
	mov	x0, x19
	mov	w1, #62
	mov	w2, #40
	bl	_lgs8gxx_write_reg
	mov	x0, x19
	mov	w1, #83
	mov	w2, #128
LBB0_8:
	bl	_lgs8gxx_write_reg
	mov	x0, x19
	bl	_lgs8gxx_soft_reset
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_LGS8GXX_PROD_LGS8G75,8,3       ; @LGS8GXX_PROD_LGS8G75
	.comm	_LGS8GXX_PROD_LGS8913,8,3       ; @LGS8GXX_PROD_LGS8913
	.no_dead_strip	_lgs8gxx_set_mode_manual
.subsections_via_symbols
