	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm355evm_msp_probe
_dm355evm_msp_probe:                    ## @dm355evm_msp_probe
	.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, %r14
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_msp_has_tvp
	testq	%rax, %rax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %r15
	cmoveq	%rax, %r15
	movq	_msp430@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	movq	%r14, (%rax)
	movq	_DM355EVM_MSP_FIRMREV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_dm355evm_msp_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movq	%r15, %rcx
	callq	_dev_info
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_msp_has_tvp
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_MSP_VIDEO_IMAGER@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_5:
	movq	_DM355EVM_MSP_VIDEO_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_dm355evm_msp_write
	testl	%eax, %eax
	jns	LBB0_7
## %bb.6:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	movq	%r15, %rcx
	callq	_dev_warn
LBB0_7:
	movq	_msp_led_cache@GOTPCREL(%rip), %rax
	movl	$255, (%rax)
	movq	_DM355EVM_MSP_LED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$255, %edi
	callq	_dm355evm_msp_write
	movq	%r14, %rdi
	callq	_add_children
	testl	%eax, %eax
	js	LBB0_8
## %bb.11:
	movq	_dm355evm_power_off@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_pm_power_off@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_8:
	movl	%eax, %ebx
LBB0_9:
	movq	%r14, %rdi
	callq	_dm355evm_msp_remove
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TVP5146"

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

	.comm	_msp430,8,3                     ## @msp430
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_DM355EVM_MSP_FIRMREV,4,2       ## @DM355EVM_MSP_FIRMREV
L_.str.2:                               ## @.str.2
	.asciz	"firmware v.%02X, %s as video-in\n"

	.comm	_MSP_VIDEO_IMAGER,4,2           ## @MSP_VIDEO_IMAGER
	.comm	_DM355EVM_MSP_VIDEO_IN,4,2      ## @DM355EVM_MSP_VIDEO_IN
L_.str.3:                               ## @.str.3
	.asciz	"error %d muxing %s as video-in\n"

	.comm	_msp_led_cache,4,2              ## @msp_led_cache
	.comm	_DM355EVM_MSP_LED,4,2           ## @DM355EVM_MSP_LED
	.comm	_dm355evm_power_off,4,2         ## @dm355evm_power_off
	.comm	_pm_power_off,4,2               ## @pm_power_off
	.no_dead_strip	_dm355evm_msp_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dm355evm_msp_probe
_dm355evm_msp_probe:                    ; @dm355evm_msp_probe
	.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	_msp_has_tvp
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
Lloh2:
	adrp	x9, l_.str.1@PAGE
Lloh3:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x0, #0
	csel	x20, x9, x8, eq
Lloh4:
	adrp	x8, _msp430@GOTPAGE
Lloh5:
	ldr	x8, [x8, _msp430@GOTPAGEOFF]
	ldr	x9, [x8]
	cbz	x9, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_2:
	str	x19, [x8]
Lloh9:
	adrp	x8, _DM355EVM_MSP_FIRMREV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DM355EVM_MSP_FIRMREV@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_dm355evm_msp_read
	mov	x21, x0
	tbnz	w0, #31, LBB0_8
; %bb.3:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	_dev_info
	bl	_msp_has_tvp
Lloh14:
	adrp	x8, _MSP_VIDEO_IMAGER@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MSP_VIDEO_IMAGER@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, w8, wzr, eq
Lloh17:
	adrp	x8, _DM355EVM_MSP_VIDEO_IN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DM355EVM_MSP_VIDEO_IN@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_dm355evm_msp_write
	tbz	w0, #31, LBB0_5
; %bb.4:
	mov	x2, x0
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_dev_warn
LBB0_5:
Lloh22:
	adrp	x8, _msp_led_cache@GOTPAGE
Lloh23:
	ldr	x8, [x8, _msp_led_cache@GOTPAGEOFF]
	mov	w9, #255
Lloh24:
	str	w9, [x8]
Lloh25:
	adrp	x8, _DM355EVM_MSP_LED@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DM355EVM_MSP_LED@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	w0, #255
	bl	_dm355evm_msp_write
	mov	x0, x19
	bl	_add_children
	tbnz	w0, #31, LBB0_7
; %bb.6:
	mov	w21, #0
Lloh28:
	adrp	x8, _dm355evm_power_off@GOTPAGE
Lloh29:
	ldr	x8, [x8, _dm355evm_power_off@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _pm_power_off@GOTPAGE
Lloh32:
	ldr	x9, [x9, _pm_power_off@GOTPAGEOFF]
Lloh33:
	str	w8, [x9]
	b	LBB0_9
LBB0_7:
	mov	x21, x0
LBB0_8:
	mov	x0, x19
	bl	_dm355evm_msp_remove
LBB0_9:
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TVP5146"

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

	.comm	_msp430,8,3                     ; @msp430
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_DM355EVM_MSP_FIRMREV,4,2       ; @DM355EVM_MSP_FIRMREV
l_.str.2:                               ; @.str.2
	.asciz	"firmware v.%02X, %s as video-in\n"

	.comm	_MSP_VIDEO_IMAGER,4,2           ; @MSP_VIDEO_IMAGER
	.comm	_DM355EVM_MSP_VIDEO_IN,4,2      ; @DM355EVM_MSP_VIDEO_IN
l_.str.3:                               ; @.str.3
	.asciz	"error %d muxing %s as video-in\n"

	.comm	_msp_led_cache,4,2              ; @msp_led_cache
	.comm	_DM355EVM_MSP_LED,4,2           ; @DM355EVM_MSP_LED
	.comm	_dm355evm_power_off,4,2         ; @dm355evm_power_off
	.comm	_pm_power_off,4,2               ; @pm_power_off
	.no_dead_strip	_dm355evm_msp_probe
.subsections_via_symbols
