	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PXC200_muxsel
_PXC200_muxsel:                         ## @PXC200_muxsel
	.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	%esi, %r14d
	movq	%rdi, %r13
	movq	_PX_I2C_PIC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	addl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	_bttv_I2CWrite
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	8(%r13), %esi
	leaq	L_.str(%rip), %rdi
LBB0_2:
	movl	%eax, %edx
	jmp	LBB0_3
LBB0_4:
	movl	(%rbx), %esi
	addl	%esi, %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_bttv_I2CRead
	movq	_PX_CFG_PXC200F@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.6:
	movq	(%r13), %rax
	movq	_PX_PXC200A_CARDID@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	cmpq	(%r15), %rax
	setne	%dil
	shll	$4, %edi
	addl	$754, %edi                      ## imm = 0x2F2
	movq	_BT848_GPIO_OUT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_btwrite
	movq	_BT848_GPIO_DATA@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_btread
	movq	(%r13), %rcx
	cmpq	(%r15), %rcx
	jne	LBB0_8
## %bb.7:
	andl	$-641, %eax                     ## imm = 0xFD7F
	movl	%r14d, %ecx
	andl	$2, %ecx
	shll	$8, %ecx
	movl	%r14d, %edx
	shll	$7, %edx
	movzbl	%dl, %edi
	orl	%ecx, %edi
	jmp	LBB0_9
LBB0_5:
	movl	8(%r13), %esi
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_8:
	andl	$-769, %eax                     ## imm = 0xFCFF
	movl	%r14d, %edi
	andl	$3, %edi
	shll	$8, %edi
LBB0_9:
	orl	%eax, %edi
	movl	(%r12), %esi
	callq	_btwrite
	movq	(%r13), %rax
	movq	_BT848_IFORM_MUXSEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	movq	_BT848_IFORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	cmpq	(%r15), %rax
	jne	LBB0_11
## %bb.10:
	movl	$64, %edi
	callq	_btaor
	jmp	LBB0_12
LBB0_11:
	movl	%esi, %edi
	movl	%edx, %esi
	callq	_btand
LBB0_12:
	movl	8(%r13), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %edx
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_debug                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PX_I2C_PIC,4,2                 ## @PX_I2C_PIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d: PXC200_muxsel: pic cfg write failed:%d\n"

	.comm	_PX_CFG_PXC200F,4,2             ## @PX_CFG_PXC200F
L_.str.1:                               ## @.str.1
	.asciz	"%d: PXC200_muxsel: not PXC200F rc:%d\n"

	.comm	_PX_PXC200A_CARDID,8,3          ## @PX_PXC200A_CARDID
	.comm	_BT848_GPIO_OUT_EN,4,2          ## @BT848_GPIO_OUT_EN
	.comm	_BT848_GPIO_DATA,4,2            ## @BT848_GPIO_DATA
	.comm	_BT848_IFORM_MUXSEL,4,2         ## @BT848_IFORM_MUXSEL
	.comm	_BT848_IFORM,4,2                ## @BT848_IFORM
L_.str.2:                               ## @.str.2
	.asciz	"%d: setting input channel to:%d\n"

	.no_dead_strip	_PXC200_muxsel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PXC200_muxsel
_PXC200_muxsel:                         ; @PXC200_muxsel
	.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	x20, x0
Lloh0:
	adrp	x21, _PX_I2C_PIC@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PX_I2C_PIC@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	w1, w8, #1
	mov	w2, #0
	mov	w3, #0
	mov	w4, #1
	bl	_bttv_I2CWrite
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
	ldr	w1, [x20, #8]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_2:
	ldr	w8, [x21]
	lsl	w1, w8, #1
	mov	x0, x20
	mov	x2, #0
	bl	_bttv_I2CRead
Lloh4:
	adrp	x8, _PX_CFG_PXC200F@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PX_CFG_PXC200F@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.3:
	ldr	x8, [x20]
Lloh7:
	adrp	x21, _PX_PXC200A_CARDID@GOTPAGE
Lloh8:
	ldr	x21, [x21, _PX_PXC200A_CARDID@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	mov	w8, #770
	mov	w9, #754
	csel	w0, w9, w8, eq
Lloh9:
	adrp	x8, _BT848_GPIO_OUT_EN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BT848_GPIO_OUT_EN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_btwrite
Lloh12:
	adrp	x22, _BT848_GPIO_DATA@GOTPAGE
Lloh13:
	ldr	x22, [x22, _BT848_GPIO_DATA@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_btread
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	mov	w8, #-641
	and	w8, w0, w8
	bfi	w0, w19, #8, #2
	lsl	w9, w19, #8
	and	w9, w9, #0x200
	bfi	w9, w19, #7, #1
	orr	w8, w9, w8
	csel	w0, w0, w8, ne
	ldr	w1, [x22]
	bl	_btwrite
	ldr	x8, [x20]
	ldr	x9, [x21]
Lloh14:
	adrp	x10, _BT848_IFORM_MUXSEL@GOTPAGE
Lloh15:
	ldr	x10, [x10, _BT848_IFORM_MUXSEL@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	mvn	w1, w10
Lloh17:
	adrp	x10, _BT848_IFORM@GOTPAGE
Lloh18:
	ldr	x10, [x10, _BT848_IFORM@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x10]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	mov	w0, #64
	bl	_btaor
	b	LBB0_7
LBB0_5:
	mov	x2, x0
	ldr	w1, [x20, #8]
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_6:
	mov	x0, x1
	mov	x1, x2
	bl	_btand
LBB0_7:
	ldr	w1, [x20, #8]
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x2, x19
LBB0_8:
	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	_pr_debug
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_PX_I2C_PIC,4,2                 ; @PX_I2C_PIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d: PXC200_muxsel: pic cfg write failed:%d\n"

	.comm	_PX_CFG_PXC200F,4,2             ; @PX_CFG_PXC200F
l_.str.1:                               ; @.str.1
	.asciz	"%d: PXC200_muxsel: not PXC200F rc:%d\n"

	.comm	_PX_PXC200A_CARDID,8,3          ; @PX_PXC200A_CARDID
	.comm	_BT848_GPIO_OUT_EN,4,2          ; @BT848_GPIO_OUT_EN
	.comm	_BT848_GPIO_DATA,4,2            ; @BT848_GPIO_DATA
	.comm	_BT848_IFORM_MUXSEL,4,2         ; @BT848_IFORM_MUXSEL
	.comm	_BT848_IFORM,4,2                ; @BT848_IFORM
l_.str.2:                               ; @.str.2
	.asciz	"%d: setting input channel to:%d\n"

	.no_dead_strip	_PXC200_muxsel
.subsections_via_symbols
