	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lg216x_set_ensemble
_lg216x_set_ensemble:                   ## @lg216x_set_ensemble
	.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
	movq	%rdi, %r14
	movq	(%rdi), %rax
	xorl	%ebx, %ebx
	cmpl	$129, (%rax)
	movl	%esi, %r15d
	setne	%bl
	orl	$4, %ebx
	shll	$8, %ebx
	leaq	-36(%rbp), %rdx
	movl	%ebx, %esi
	callq	_lg216x_read_reg
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_lg_fail
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movl	$254, %eax
	andl	-36(%rbp), %eax
	xorl	%edx, %edx
	testl	%r15d, %r15d
	setne	%dl
	orl	%eax, %edx
	movl	%edx, -36(%rbp)
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_lg216x_write_reg
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_lg_fail
LBB0_2:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_lg216x_set_ensemble
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lg216x_set_ensemble
_lg216x_set_ensemble:                   ; @lg216x_set_ensemble
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w8, [x8]
	mov	w9, #1280
	mov	w10, #1024
	cmp	w8, #129
	csel	w21, w10, w9, eq
	add	x2, sp, #12
	mov	x1, x21
	bl	_lg216x_read_reg
	mov	x22, x0
	bl	_lg_fail
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w8, [sp, #12]
	and	w8, w8, #0xfe
	cmp	w20, #0
	cset	w9, ne
	orr	w2, w8, w9
	str	w2, [sp, #12]
	mov	x0, x19
	mov	x1, x21
	bl	_lg216x_write_reg
	mov	x22, x0
	bl	_lg_fail
LBB0_2:
	mov	x0, x22
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_lg216x_set_ensemble
.subsections_via_symbols
