	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_RTV24
_init_RTV24:                            ## @init_RTV24
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	movq	_BT848_GPIO_OUT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12844799, %edi                 ## imm = 0xC3FEFF
	callq	_btwrite
	movq	_BT848_GPIO_DATA@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$14, %edi
	callq	_btwrite
	movl	$1, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movl	$30, %edi
	callq	_btwrite
	movl	$10, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movl	$14, %edi
	callq	_btwrite
	movl	(%rbx), %edi
	callq	_btread
	movl	%eax, %ecx
	andl	$786432, %ecx                   ## imm = 0xC0000
	cmpl	$524288, %ecx                   ## imm = 0x80000
	je	LBB0_2
## %bb.1:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pr_info
LBB0_2:
	movl	(%rbx), %esi
	movl	$17422, %edi                    ## imm = 0x440E
	callq	_btwrite
	movl	$10, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movl	$17438, %edi                    ## imm = 0x441E
	callq	_btwrite
	movl	$1, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movl	$14, %edi
	callq	_btwrite
	movl	$1, %edi
	callq	_msleep
	movl	(%rbx), %edi
	callq	_btread
	movl	(%r14), %esi
	testl	$786432, %eax                   ## imm = 0xC0000
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pr_info                        ## TAILCALL
LBB0_4:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pr_info                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d: Adlink RTV-24 initialisation in progress ...\n"

	.comm	_BT848_GPIO_OUT_EN,4,2          ## @BT848_GPIO_OUT_EN
	.comm	_BT848_GPIO_DATA,4,2            ## @BT848_GPIO_DATA
L_.str.1:                               ## @.str.1
	.asciz	"%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"%d: Adlink RTV-24 initialisation complete\n"

	.no_dead_strip	_init_RTV24
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_RTV24
_init_RTV24:                            ; @init_RTV24
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w1, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
Lloh2:
	adrp	x8, _BT848_GPIO_OUT_EN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BT848_GPIO_OUT_EN@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #65279
	movk	w0, #195, lsl #16
	bl	_btwrite
Lloh5:
	adrp	x20, _BT848_GPIO_DATA@GOTPAGE
Lloh6:
	ldr	x20, [x20, _BT848_GPIO_DATA@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w0, #14
	bl	_btwrite
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x20]
	mov	w0, #30
	bl	_btwrite
	mov	w0, #10
	bl	_msleep
	ldr	w1, [x20]
	mov	w0, #14
	bl	_btwrite
	ldr	w0, [x20]
	bl	_btread
                                        ; kill: def $w0 killed $w0 def $x0
	and	w8, w0, #0xc0000
	cmp	w8, #128, lsl #12               ; =524288
	b.eq	LBB0_2
; %bb.1:
	ldr	w1, [x19]
	str	x0, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
LBB0_2:
	ldr	w1, [x20]
	mov	w0, #17422
	bl	_btwrite
	mov	w0, #10
	bl	_msleep
	ldr	w1, [x20]
	mov	w0, #17438
	bl	_btwrite
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x20]
	mov	w0, #14
	bl	_btwrite
	mov	w0, #1
	bl	_msleep
	ldr	w0, [x20]
	bl	_btread
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w1, [x19]
	tst	w0, #0xc0000
	b.eq	LBB0_4
; %bb.3:
	str	x0, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_pr_info
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d: Adlink RTV-24 initialisation in progress ...\n"

	.comm	_BT848_GPIO_OUT_EN,4,2          ; @BT848_GPIO_OUT_EN
	.comm	_BT848_GPIO_DATA,4,2            ; @BT848_GPIO_DATA
l_.str.1:                               ; @.str.1
	.asciz	"%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"%d: Adlink RTV-24 initialisation complete\n"

	.no_dead_strip	_init_RTV24
.subsections_via_symbols
