	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lg216x_get_sccc_code_mode
_lg216x_get_sccc_code_mode:             ## @lg216x_get_sccc_code_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
	movq	%r8, %rbx
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	(%rdi), %rax
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_5
## %bb.2:
	leaq	-44(%rbp), %rdx
	movl	$790, %esi                      ## imm = 0x316
	jmp	LBB0_3
LBB0_4:
	leaq	-44(%rbp), %rdx
	movl	$1298, %esi                     ## imm = 0x512
LBB0_3:
	callq	_lg216x_read_reg
	movl	%eax, %r14d
	jmp	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %edi
	callq	_lg_fail
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movl	-44(%rbp), %eax
	movl	%eax, %esi
	shrl	$6, %esi
	andl	$3, %esi
	cmpl	$1, %esi
	movq	_ATSCMH_SCCC_CODE_QTR@GOTPCREL(%rip), %r8
	movq	%rbx, %r9
	movq	_ATSCMH_SCCC_CODE_RES@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	cmoveq	%r8, %rdi
	testl	%esi, %esi
	movq	_ATSCMH_SCCC_CODE_HLF@GOTPCREL(%rip), %rsi
	cmoveq	%rsi, %rdi
	movl	(%rdi), %edi
	movl	%edi, (%r13)
	movl	%eax, %edi
	shrl	$4, %edi
	andl	$3, %edi
	cmpl	$1, %edi
	movq	%rbx, %rcx
	cmoveq	%r8, %rcx
	testl	%edi, %edi
	cmoveq	%rsi, %rcx
	movl	%eax, %edi
	shrl	$2, %edi
	andl	$3, %edi
	cmpl	$1, %edi
	movq	%rbx, %rdx
	cmoveq	%r8, %rdx
	testl	%edi, %edi
	movl	(%rcx), %ecx
	cmoveq	%rsi, %rdx
	movl	%ecx, (%r12)
	movl	(%rdx), %ecx
	movl	%ecx, (%r15)
	andl	$3, %eax
	cmpl	$1, %eax
	cmoveq	%r8, %rbx
	testl	%eax, %eax
	cmoveq	%rsi, %rbx
	movl	(%rbx), %eax
	movl	%eax, (%r9)
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ATSCMH_SCCC_CODE_HLF,4,2       ## @ATSCMH_SCCC_CODE_HLF
	.comm	_ATSCMH_SCCC_CODE_QTR,4,2       ## @ATSCMH_SCCC_CODE_QTR
	.comm	_ATSCMH_SCCC_CODE_RES,4,2       ## @ATSCMH_SCCC_CODE_RES
	.no_dead_strip	_lg216x_get_sccc_code_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lg216x_get_sccc_code_mode
_lg216x_get_sccc_code_mode:             ; @lg216x_get_sccc_code_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	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	ldr	x8, [x0]
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_5
; %bb.2:
	add	x2, sp, #12
	mov	w1, #790
	b	LBB0_4
LBB0_3:
	add	x2, sp, #12
	mov	w1, #1298
LBB0_4:
	bl	_lg216x_read_reg
	mov	x23, x0
	b	LBB0_6
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_6:
	mov	x0, x23
	bl	_lg_fail
	cbnz	x0, LBB0_8
; %bb.7:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _ATSCMH_SCCC_CODE_QTR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATSCMH_SCCC_CODE_QTR@GOTPAGEOFF]
Lloh5:
	adrp	x10, _ATSCMH_SCCC_CODE_RES@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ATSCMH_SCCC_CODE_RES@GOTPAGEOFF]
	ands	w11, w8, #0x3
	cmp	w11, #1
	csel	x11, x9, x10, eq
	tst	w8, #0x3
Lloh7:
	adrp	x12, _ATSCMH_SCCC_CODE_HLF@GOTPAGE
Lloh8:
	ldr	x12, [x12, _ATSCMH_SCCC_CODE_HLF@GOTPAGEOFF]
	csel	x11, x12, x11, eq
	mov	w13, #3
	ands	w14, w13, w8, lsr #2
	cmp	w14, #1
	csel	x14, x9, x10, eq
	tst	w13, w8, lsr #2
	csel	x14, x12, x14, eq
	ands	w15, w13, w8, lsr #4
	cmp	w15, #1
	csel	x15, x9, x10, eq
	tst	w13, w8, lsr #4
	csel	x15, x12, x15, eq
	ands	w16, w13, w8, lsr #6
	cmp	w16, #1
	csel	x9, x9, x10, eq
	tst	w13, w8, lsr #6
	csel	x8, x12, x9, eq
	ldr	w8, [x8]
	str	w8, [x22]
	ldr	w8, [x15]
	str	w8, [x21]
	ldr	w8, [x14]
	str	w8, [x20]
	ldr	w8, [x11]
	str	w8, [x19]
LBB0_8:
	mov	x0, x23
	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	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ATSCMH_SCCC_CODE_HLF,4,2       ; @ATSCMH_SCCC_CODE_HLF
	.comm	_ATSCMH_SCCC_CODE_QTR,4,2       ; @ATSCMH_SCCC_CODE_QTR
	.comm	_ATSCMH_SCCC_CODE_RES,4,2       ; @ATSCMH_SCCC_CODE_RES
	.no_dead_strip	_lg216x_get_sccc_code_mode
.subsections_via_symbols
