	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv748x_link_setup
_adv748x_link_setup:                    ## @adv748x_link_setup
	.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	%ecx, %r15d
	movq	%rdi, %rbx
	movq	(%rdx), %rdi
	callq	_media_entity_to_v4l2_subdev
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_media_entity_to_v4l2_subdev
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_v4l2_get_subdevdata
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_adv748x_sd_to_csi2
	movq	_MEDIA_LNK_FL_ENABLED@GOTPCREL(%rip), %rcx
	movq	_ADV748X_IO_10_CSI1_EN@GOTPCREL(%rip), %rdx
	movq	_ADV748X_IO_10_CSI4_EN@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r14d
	movl	(%rdx), %ebx
	orl	%r14d, %ebx
	movq	_ADV748X_IO_10_CSI4_IN_SEL_AFE@GOTPCREL(%rip), %r9
	orl	(%r9), %ebx
	andl	(%rcx), %r15d
	je	LBB0_1
## %bb.2:
	cmpq	$0, (%rax)
	movq	%rax, %rcx
	je	LBB0_3
## %bb.14:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	xorl	%ecx, %ecx
LBB0_3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, %rdx
	addq	$16, %rdx
	cmpq	%rdx, %r12
	je	LBB0_4
## %bb.5:
	movq	%rcx, (%rdi)
	movq	8(%rdi), %rcx
	jmp	LBB0_6
LBB0_4:
	movq	%rcx, 8(%rdi)
LBB0_6:
	xorl	%r13d, %r13d
	testl	%r15d, %r15d
	cmoveq	%r13, %r12
	movq	%r12, (%rax)
	movl	$0, %edx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.7:
	movq	%r9, %r12
	movq	%rsi, %r15
	movq	%rax, %rdi
	callq	_is_txa
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	orl	(%r12), %r14d
	jmp	LBB0_10
LBB0_9:
	movq	_ADV748X_IO_10_CSI1_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
LBB0_10:
	movl	%r14d, %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
LBB0_11:
	cmpq	$0, (%rdi)
	je	LBB0_13
## %bb.12:
	movl	(%rsi), %r13d
LBB0_13:
	orl	%edx, %r13d
	movq	_ADV748X_IO_10@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_io_clrset                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MEDIA_LNK_FL_ENABLED,4,2       ## @MEDIA_LNK_FL_ENABLED
	.comm	_ADV748X_IO_10_CSI1_EN,4,2      ## @ADV748X_IO_10_CSI1_EN
	.comm	_ADV748X_IO_10_CSI4_EN,4,2      ## @ADV748X_IO_10_CSI4_EN
	.comm	_ADV748X_IO_10_CSI4_IN_SEL_AFE,4,2 ## @ADV748X_IO_10_CSI4_IN_SEL_AFE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ADV748X_IO_10,4,2              ## @ADV748X_IO_10
	.no_dead_strip	_adv748x_link_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv748x_link_setup
_adv748x_link_setup:                    ; @adv748x_link_setup
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x3
	mov	x19, x0
	ldr	x0, [x2]
	bl	_media_entity_to_v4l2_subdev
	mov	x20, x0
	mov	x0, x19
	bl	_media_entity_to_v4l2_subdev
	mov	x22, x0
	bl	_v4l2_get_subdevdata
	mov	x19, x0
	mov	x0, x22
	bl	_adv748x_sd_to_csi2
Lloh0:
	adrp	x8, _MEDIA_LNK_FL_ENABLED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEDIA_LNK_FL_ENABLED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x24, _ADV748X_IO_10_CSI1_EN@GOTPAGE
Lloh4:
	ldr	x24, [x24, _ADV748X_IO_10_CSI1_EN@GOTPAGEOFF]
Lloh5:
	adrp	x22, _ADV748X_IO_10_CSI4_EN@GOTPAGE
Lloh6:
	ldr	x22, [x22, _ADV748X_IO_10_CSI4_EN@GOTPAGEOFF]
	ldr	w10, [x24]
	ldr	w23, [x22]
Lloh7:
	adrp	x25, _ADV748X_IO_10_CSI4_IN_SEL_AFE@GOTPAGE
Lloh8:
	ldr	x25, [x25, _ADV748X_IO_10_CSI4_IN_SEL_AFE@GOTPAGEOFF]
	ldr	w11, [x25]
	ands	w8, w8, w21
	b.eq	LBB0_3
; %bb.1:
	ldr	x12, [x0]
	mov	x9, x0
	cbz	x12, LBB0_4
; %bb.2:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x9, #0
LBB0_4:
	orr	w10, w23, w10
	orr	w21, w10, w11
	add	x10, x19, #16
	cmp	x20, x10
	b.eq	LBB0_6
; %bb.5:
	str	x9, [x19]
	ldr	x9, [x19, #8]
	b	LBB0_7
LBB0_6:
	str	x9, [x19, #8]
LBB0_7:
	cmp	w8, #0
	csel	x8, xzr, x20, eq
	str	x8, [x0]
	cbz	x9, LBB0_10
; %bb.8:
	bl	_is_txa
	cbz	x0, LBB0_11
; %bb.9:
	ldr	w8, [x25]
	b	LBB0_12
LBB0_10:
	mov	w8, #0
	b	LBB0_13
LBB0_11:
	ldr	w8, [x24]
LBB0_12:
	orr	w8, w8, w23
LBB0_13:
	ldr	x9, [x19]
	ldr	w10, [x22]
	cmp	x9, #0
	csel	w9, wzr, w10, eq
Lloh12:
	adrp	x10, _ADV748X_IO_10@GOTPAGE
Lloh13:
	ldr	x10, [x10, _ADV748X_IO_10@GOTPAGEOFF]
	orr	w3, w9, w8
Lloh14:
	ldr	w1, [x10]
	mov	x0, x19
	mov	x2, x21
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_io_clrset
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MEDIA_LNK_FL_ENABLED,4,2       ; @MEDIA_LNK_FL_ENABLED
	.comm	_ADV748X_IO_10_CSI1_EN,4,2      ; @ADV748X_IO_10_CSI1_EN
	.comm	_ADV748X_IO_10_CSI4_EN,4,2      ; @ADV748X_IO_10_CSI4_EN
	.comm	_ADV748X_IO_10_CSI4_IN_SEL_AFE,4,2 ; @ADV748X_IO_10_CSI4_IN_SEL_AFE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ADV748X_IO_10,4,2              ; @ADV748X_IO_10
	.no_dead_strip	_adv748x_link_setup
.subsections_via_symbols
