	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adv748x_csi2_init              ## -- Begin function adv748x_csi2_init
	.p2align	4, 0x90
_adv748x_csi2_init:                     ## @adv748x_csi2_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_is_tx_enabled
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_adv748x_csi2_set_virtual_channel
	leaq	8(%rbx), %r14
	movq	_MEDIA_ENT_F_VID_IF_BRIDGE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%rbx, %rdi
	callq	_is_txa
	testq	%rax, %rax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %r8
	cmoveq	%rax, %r8
	movq	_adv748x_csi2_ops@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r12d, %ecx
	callq	_adv748x_subdev_init
	movq	(%r15), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_of_fwnode_handle
	movl	%eax, 24(%rbx)
	movq	_adv748x_csi2_internal_ops@GOTPCREL(%rip), %rax
	movq	%rax, 16(%rbx)
	movq	_MEDIA_PAD_FL_SINK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	40(%rbx), %rdx
	movq	_ADV748X_CSI2_SINK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rdx,%rcx,4)
	movq	_MEDIA_PAD_FL_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ADV748X_CSI2_SOURCE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rdx,%rcx,4)
	movq	_ADV748X_CSI2_NR_PADS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_media_entity_pads_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	movq	%rbx, %rdi
	callq	_adv748x_csi2_init_controls
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_v4l2_async_register_subdev
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %r15d
	addq	$32, %rbx
	movq	%rbx, %rdi
	callq	_v4l2_ctrl_handler_free
LBB0_5:
	movq	%r14, %rdi
	callq	_media_entity_cleanup
	jmp	LBB0_7
LBB0_6:
	xorl	%r15d, %r15d
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_adv748x_csi2_ops,4,2           ## @adv748x_csi2_ops
	.comm	_MEDIA_ENT_F_VID_IF_BRIDGE,4,2  ## @MEDIA_ENT_F_VID_IF_BRIDGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"txa"

L_.str.1:                               ## @.str.1
	.asciz	"txb"

	.comm	_adv748x_csi2_internal_ops,4,2  ## @adv748x_csi2_internal_ops
	.comm	_MEDIA_PAD_FL_SINK,4,2          ## @MEDIA_PAD_FL_SINK
	.comm	_ADV748X_CSI2_SINK,8,3          ## @ADV748X_CSI2_SINK
	.comm	_MEDIA_PAD_FL_SOURCE,4,2        ## @MEDIA_PAD_FL_SOURCE
	.comm	_ADV748X_CSI2_SOURCE,8,3        ## @ADV748X_CSI2_SOURCE
	.comm	_ADV748X_CSI2_NR_PADS,4,2       ## @ADV748X_CSI2_NR_PADS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adv748x_csi2_init              ; -- Begin function adv748x_csi2_init
	.p2align	2
_adv748x_csi2_init:                     ; @adv748x_csi2_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, x1
	mov	x21, x0
	mov	x0, x1
	bl	_is_tx_enabled
	cbz	w0, LBB0_6
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_adv748x_csi2_set_virtual_channel
	add	x20, x19, #8
Lloh0:
	adrp	x8, _MEDIA_ENT_F_VID_IF_BRIDGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEDIA_ENT_F_VID_IF_BRIDGE@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_is_txa
Lloh3:
	adrp	x8, l_.str@PAGE
Lloh4:
	add	x8, x8, l_.str@PAGEOFF
Lloh5:
	adrp	x9, l_.str.1@PAGE
Lloh6:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x0, #0
	csel	x4, x9, x8, eq
Lloh7:
	adrp	x2, _adv748x_csi2_ops@GOTPAGE
Lloh8:
	ldr	x2, [x2, _adv748x_csi2_ops@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x21
	mov	x3, x22
	bl	_adv748x_subdev_init
	ldr	x8, [x21]
	ldr	x9, [x19]
	ldr	w0, [x8, x9, lsl #2]
	bl	_of_fwnode_handle
	str	w0, [x19, #24]
Lloh9:
	adrp	x8, _MEDIA_PAD_FL_SINK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MEDIA_PAD_FL_SINK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _ADV748X_CSI2_SINK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ADV748X_CSI2_SINK@GOTPAGEOFF]
	ldr	x2, [x19, #40]
Lloh14:
	ldr	x9, [x9]
	str	w8, [x2, x9, lsl #2]
Lloh15:
	adrp	x8, _adv748x_csi2_internal_ops@GOTPAGE
Lloh16:
	ldr	x8, [x8, _adv748x_csi2_internal_ops@GOTPAGEOFF]
	str	x8, [x19, #16]
Lloh17:
	adrp	x8, _MEDIA_PAD_FL_SOURCE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MEDIA_PAD_FL_SOURCE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _ADV748X_CSI2_SOURCE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ADV748X_CSI2_SOURCE@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	str	w8, [x2, x9, lsl #2]
Lloh23:
	adrp	x8, _ADV748X_CSI2_NR_PADS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ADV748X_CSI2_NR_PADS@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_media_entity_pads_init
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_adv748x_csi2_init_controls
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x20
	bl	_v4l2_async_register_subdev
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.4:
	add	x0, x19, #32
	bl	_v4l2_ctrl_handler_free
LBB0_5:
	mov	x0, x20
	bl	_media_entity_cleanup
	b	LBB0_7
LBB0_6:
	mov	w21, #0
LBB0_7:
	mov	x0, x21
	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
	ret
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_adv748x_csi2_ops,4,2           ; @adv748x_csi2_ops
	.comm	_MEDIA_ENT_F_VID_IF_BRIDGE,4,2  ; @MEDIA_ENT_F_VID_IF_BRIDGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"txa"

l_.str.1:                               ; @.str.1
	.asciz	"txb"

	.comm	_adv748x_csi2_internal_ops,4,2  ; @adv748x_csi2_internal_ops
	.comm	_MEDIA_PAD_FL_SINK,4,2          ; @MEDIA_PAD_FL_SINK
	.comm	_ADV748X_CSI2_SINK,8,3          ; @ADV748X_CSI2_SINK
	.comm	_MEDIA_PAD_FL_SOURCE,4,2        ; @MEDIA_PAD_FL_SOURCE
	.comm	_ADV748X_CSI2_SOURCE,8,3        ; @ADV748X_CSI2_SOURCE
	.comm	_ADV748X_CSI2_NR_PADS,4,2       ; @ADV748X_CSI2_NR_PADS
.subsections_via_symbols
