	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function et8ek8_set_test_pattern
_et8ek8_set_test_pattern:               ## @et8ek8_set_test_pattern
	.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	%esi, %ebx
	callq	_v4l2_get_subdevdata
	movq	%rax, %r12
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	leal	268435455(%rbx), %eax
	leal	3(%rbx), %ecx
	xorl	%r13d, %r13d
	cmpl	$5, %ebx
	setl	%r13b
	cmovgel	%eax, %ecx
	shll	$7, %r13d
	shll	$4, %ecx
	movl	$224, %r14d
	movl	$1, %r15d
	jmp	LBB0_3
LBB0_1:
	movl	$240, %r14d
	xorl	%r13d, %r13d
	xorl	%ecx, %ecx
	xorl	%r15d, %r15d
LBB0_3:
	movq	_ET8EK8_REG_8BIT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$4379, %edx                     ## imm = 0x111B
	callq	_et8ek8_i2c_write_reg
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$4385, %edx                     ## imm = 0x1121
	movl	%r13d, %ecx
	callq	_et8ek8_i2c_write_reg
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$4388, %edx                     ## imm = 0x1124
	movl	%r13d, %ecx
	callq	_et8ek8_i2c_write_reg
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$4396, %edx                     ## imm = 0x112C
	movl	%r15d, %ecx
	callq	_et8ek8_i2c_write_reg
	testl	%eax, %eax
	je	LBB0_8
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$5152, %edx                     ## imm = 0x1420
	movl	%r14d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_et8ek8_i2c_write_reg           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ET8EK8_REG_8BIT,4,2            ## @ET8EK8_REG_8BIT
	.no_dead_strip	_et8ek8_set_test_pattern
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function et8ek8_set_test_pattern
_et8ek8_set_test_pattern:               ; @et8ek8_set_test_pattern
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	bl	_v4l2_get_subdevdata
	mov	x19, x0
	mov	w8, #240
	mov	w9, #268435455
	mov	w10, #3
	cmp	w20, #5
	csel	w9, w10, w9, lt
	cset	w10, lt
	lsl	w10, w10, #7
	add	w9, w9, w20
	lsl	w9, w9, #4
	mov	w11, #224
	mov	w12, #1
	cmp	w20, #0
	csel	w22, wzr, w10, eq
	csel	w3, wzr, w9, eq
	csel	w21, wzr, w12, eq
	csel	w20, w8, w11, eq
Lloh0:
	adrp	x23, _ET8EK8_REG_8BIT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ET8EK8_REG_8BIT@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w2, #4379
	bl	_et8ek8_i2c_write_reg
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #4385
	mov	x3, x22
	bl	_et8ek8_i2c_write_reg
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #4388
	mov	x3, x22
	bl	_et8ek8_i2c_write_reg
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #4396
	mov	x3, x21
	bl	_et8ek8_i2c_write_reg
	cbz	w0, LBB0_5
LBB0_4:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #5152
	mov	x3, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_et8ek8_i2c_write_reg
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ET8EK8_REG_8BIT,4,2            ; @ET8EK8_REG_8BIT
	.no_dead_strip	_et8ek8_set_test_pattern
.subsections_via_symbols
