	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv76xx_core_init
_adv76xx_core_init:                     ## @adv76xx_core_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_state
	movq	%rax, %r14
	xorl	%eax, %eax
	cmpq	$0, 88(%r14)
	setne	%al
	shll	$7, %eax
	xorl	%edx, %edx
	cmpq	$0, 80(%r14)
	movq	96(%r14), %r15
	setne	%dl
	shll	$6, %edx
	orl	%eax, %edx
	movq	%rbx, %rdi
	movl	$72, %esi
	callq	_hdmi_write
	movq	%rbx, %rdi
	callq	_disable_input
	movq	16(%r14), %rax
	testq	%rax, %rax
	js	LBB0_3
## %bb.1:
	cmpq	(%r14), %rax
	jge	LBB0_3
## %bb.2:
	movq	%rax, 8(%r14)
	movq	%rbx, %rdi
	callq	_select_input
	movq	%rbx, %rdi
	callq	_enable_input
LBB0_3:
	movq	%rbx, %rdi
	movl	$12, %esi
	movl	$66, %edx
	callq	_io_write
	movq	%rbx, %rdi
	movl	$11, %esi
	movl	$68, %edx
	callq	_io_write
	movq	%rbx, %rdi
	movl	$207, %esi
	movl	$1, %edx
	callq	_cp_write
	movl	24(%r14), %ecx
	shll	$3, %ecx
	movq	%rbx, %rdi
	movl	$2, %esi
	movl	$15, %edx
	callq	_io_write_clr_set
	movl	28(%r14), %eax
	movl	32(%r14), %edx
	shll	$3, %eax
	shll	$2, %edx
	orl	%eax, %edx
	movl	36(%r14), %ecx
	addl	%ecx, %ecx
	orl	%edx, %ecx
	movq	%rbx, %rdi
	movl	$5, %esi
	movl	$14, %edx
	callq	_io_write_clr_set
	movq	%r14, %rdi
	callq	_adv76xx_setup_format
	movq	%rbx, %rdi
	movl	$105, %esi
	movl	$48, %edx
	callq	_cp_write
	movl	40(%r14), %eax
	movl	44(%r14), %edx
	shll	$2, %eax
	addl	%edx, %edx
	orl	%eax, %edx
	orl	48(%r14), %edx
	orl	$160, %edx
	movq	%rbx, %rdi
	movl	$6, %esi
	callq	_io_write
	movl	52(%r14), %eax
	movl	56(%r14), %edx
	shll	$4, %eax
	shll	$2, %edx
	orl	%eax, %edx
	orl	60(%r14), %edx
	orl	$64, %edx
	movq	%rbx, %rdi
	movl	$20, %esi
	callq	_io_write
	movl	64(%r14), %eax
	leal	(%rax,%rax), %edx
	incl	%edx
	movq	%rbx, %rdi
	movl	$186, %esi
	callq	_cp_write
	movq	%rbx, %rdi
	movl	$243, %esi
	movl	$220, %edx
	callq	_cp_write
	movq	%rbx, %rdi
	movl	$249, %esi
	movl	$35, %edx
	callq	_cp_write
	movq	%rbx, %rdi
	movl	$69, %esi
	movl	$35, %edx
	callq	_cp_write
	movq	%rbx, %rdi
	movl	$201, %esi
	movl	$45, %edx
	callq	_cp_write
	movq	%rbx, %rdi
	movl	$21, %esi
	movl	$3, %edx
	movl	$3, %ecx
	callq	_hdmi_write_clr_set
	movq	%rbx, %rdi
	movl	$26, %esi
	movl	$14, %edx
	movl	$8, %ecx
	callq	_hdmi_write_clr_set
	movq	%rbx, %rdi
	movl	$104, %esi
	movl	$6, %edx
	movl	$6, %ecx
	callq	_hdmi_write_clr_set
	movq	%rbx, %rdi
	movl	$181, %esi
	movl	$1, %edx
	callq	_afe_write
	movq	%r14, %rdi
	callq	_adv76xx_has_afe
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	68(%r14), %edx
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_afe_write
	movl	72(%r14), %ecx
	shll	$4, %ecx
	movq	%rbx, %rdi
	movl	$48, %esi
	movl	$16, %edx
	callq	_io_write_clr_set
LBB0_5:
	movl	$192, %edx
	orl	76(%r14), %edx
	movq	%rbx, %rdi
	movl	$64, %esi
	callq	_io_write
	movq	%rbx, %rdi
	movl	$70, %esi
	movl	$152, %edx
	callq	_io_write
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$110, %esi
	callq	_io_write
	movl	4(%r15), %edx
	movq	%rbx, %rdi
	movl	$115, %esi
	callq	_io_write
	movq	%rbx, %rdi
	callq	*8(%r15)
	movl	(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_v4l2_ctrl_handler_setup        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_adv76xx_core_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv76xx_core_init
_adv76xx_core_init:                     ; @adv76xx_core_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	bl	_to_state
	mov	x20, x0
	ldp	x8, x22, [x0, #88]
	ldr	x9, [x0, #80]
	cmp	x8, #0
	cset	w8, ne
	lsl	w2, w8, #7
	cmp	x9, #0
	cset	w8, ne
	bfi	w2, w8, #6, #1
	mov	x0, x19
	mov	w1, #72
	bl	_hdmi_write
	mov	x0, x19
	bl	_disable_input
	ldr	x8, [x20, #16]
	tbnz	x8, #63, LBB0_3
; %bb.1:
	ldr	x9, [x20]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.2:
	str	x8, [x20, #8]
	mov	x0, x19
	bl	_select_input
	mov	x0, x19
	bl	_enable_input
LBB0_3:
	mov	x0, x19
	mov	w1, #12
	mov	w2, #66
	bl	_io_write
	mov	x0, x19
	mov	w1, #11
	mov	w2, #68
	bl	_io_write
	mov	w21, #1
	mov	x0, x19
	mov	w1, #207
	mov	w2, #1
	bl	_cp_write
	ldr	w8, [x20, #24]
	lsl	w3, w8, #3
	mov	x0, x19
	mov	w1, #2
	mov	w2, #15
	bl	_io_write_clr_set
	ldp	w8, w9, [x20, #28]
	lsl	w9, w9, #2
	orr	w8, w9, w8, lsl #3
	ldr	w9, [x20, #36]
	orr	w3, w8, w9, lsl #1
	mov	x0, x19
	mov	w1, #5
	mov	w2, #14
	bl	_io_write_clr_set
	mov	x0, x20
	bl	_adv76xx_setup_format
	mov	x0, x19
	mov	w1, #105
	mov	w2, #48
	bl	_cp_write
	ldp	w8, w9, [x20, #40]
	lsl	w8, w8, #2
	ldr	w10, [x20, #48]
	orr	w8, w8, w9, lsl #1
	orr	w8, w8, w10
	mov	w9, #160
	orr	w2, w8, w9
	mov	x0, x19
	mov	w1, #6
	bl	_io_write
	ldp	w8, w9, [x20, #52]
	lsl	w8, w8, #4
	ldr	w10, [x20, #60]
	orr	w8, w8, w9, lsl #2
	orr	w8, w8, w10
	orr	w2, w8, #0x40
	mov	x0, x19
	mov	w1, #20
	bl	_io_write
	ldr	w8, [x20, #64]
	bfi	w21, w8, #1, #31
	mov	x0, x19
	mov	w1, #186
	mov	x2, x21
	bl	_cp_write
	mov	x0, x19
	mov	w1, #243
	mov	w2, #220
	bl	_cp_write
	mov	x0, x19
	mov	w1, #249
	mov	w2, #35
	bl	_cp_write
	mov	x0, x19
	mov	w1, #69
	mov	w2, #35
	bl	_cp_write
	mov	x0, x19
	mov	w1, #201
	mov	w2, #45
	bl	_cp_write
	mov	x0, x19
	mov	w1, #21
	mov	w2, #3
	mov	w3, #3
	bl	_hdmi_write_clr_set
	mov	x0, x19
	mov	w1, #26
	mov	w2, #14
	mov	w3, #8
	bl	_hdmi_write_clr_set
	mov	x0, x19
	mov	w1, #104
	mov	w2, #6
	mov	w3, #6
	bl	_hdmi_write_clr_set
	mov	x0, x19
	mov	w1, #181
	mov	w2, #1
	bl	_afe_write
	mov	x0, x20
	bl	_adv76xx_has_afe
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w2, [x20, #68]
	mov	x0, x19
	mov	w1, #2
	bl	_afe_write
	ldr	w8, [x20, #72]
	lsl	w3, w8, #4
	mov	x0, x19
	mov	w1, #48
	mov	w2, #16
	bl	_io_write_clr_set
LBB0_5:
	ldr	w8, [x20, #76]
	orr	w2, w8, #0xc0
	mov	x0, x19
	mov	w1, #64
	bl	_io_write
	mov	x0, x19
	mov	w1, #70
	mov	w2, #152
	bl	_io_write
	ldr	w2, [x22]
	mov	x0, x19
	mov	w1, #110
	bl	_io_write
	ldr	w2, [x22, #4]
	mov	x0, x19
	mov	w1, #115
	bl	_io_write
	ldr	x8, [x22, #8]
	mov	x0, x19
	blr	x8
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_v4l2_ctrl_handler_setup
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_adv76xx_core_init
.subsections_via_symbols
