	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function camerarx_phy_enable
_camerarx_phy_enable:                   ## @camerarx_phy_enable
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %rdi
	cmpl	$0, (%rdi)
	je	LBB0_7
## %bb.1:
	movq	_CM_CTRL_CORE_CAMERRX_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_reg_read
	movl	%eax, -44(%rbp)
	movl	(%r14), %eax
	cmpl	$1, %eax
	je	LBB0_2
## %bb.3:
	cmpl	$2, %eax
	jne	LBB0_6
## %bb.4:
	movq	_CM_CAMERRX_CTRL_CSI1_MODE_MASK@GOTPCREL(%rip), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$3, %ebx
	movq	_CM_CAMERRX_CTRL_CSI1_LANEENABLE_MASK@GOTPCREL(%rip), %r12
	movq	_CM_CAMERRX_CTRL_CSI1_CAMMODE_MASK@GOTPCREL(%rip), %r13
	movq	_CM_CAMERRX_CTRL_CSI1_CTRLCLKEN_MASK@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ctx_err                        ## TAILCALL
LBB0_2:
	movq	_CM_CAMERRX_CTRL_CSI0_MODE_MASK@GOTPCREL(%rip), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$15, %ebx
	movq	_CM_CAMERRX_CTRL_CSI0_LANEENABLE_MASK@GOTPCREL(%rip), %r12
	movq	_CM_CAMERRX_CTRL_CSI0_CAMMODE_MASK@GOTPCREL(%rip), %r13
	movq	_CM_CAMERRX_CTRL_CSI0_CTRLCLKEN_MASK@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edx
	leaq	-44(%rbp), %r15
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_set_field
	movl	(%r13), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_set_field
	movl	(%r12), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_set_field
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_set_field
	movq	_CM_CTRL_CORE_CAMERRX_CONTROL@GOTPCREL(%rip), %rbx
LBB0_6:
	movq	8(%r14), %rax
	movq	(%rax), %rdi
	movl	(%rbx), %esi
	movl	-44(%rbp), %edx
	callq	_reg_write
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cm not mapped\n"

	.comm	_CM_CTRL_CORE_CAMERRX_CONTROL,4,2 ## @CM_CTRL_CORE_CAMERRX_CONTROL
	.comm	_CM_CAMERRX_CTRL_CSI0_CTRLCLKEN_MASK,4,2 ## @CM_CAMERRX_CTRL_CSI0_CTRLCLKEN_MASK
	.comm	_CM_CAMERRX_CTRL_CSI0_CAMMODE_MASK,4,2 ## @CM_CAMERRX_CTRL_CSI0_CAMMODE_MASK
	.comm	_CM_CAMERRX_CTRL_CSI0_LANEENABLE_MASK,4,2 ## @CM_CAMERRX_CTRL_CSI0_LANEENABLE_MASK
	.comm	_CM_CAMERRX_CTRL_CSI0_MODE_MASK,4,2 ## @CM_CAMERRX_CTRL_CSI0_MODE_MASK
	.comm	_CM_CAMERRX_CTRL_CSI1_CTRLCLKEN_MASK,4,2 ## @CM_CAMERRX_CTRL_CSI1_CTRLCLKEN_MASK
	.comm	_CM_CAMERRX_CTRL_CSI1_CAMMODE_MASK,4,2 ## @CM_CAMERRX_CTRL_CSI1_CAMMODE_MASK
	.comm	_CM_CAMERRX_CTRL_CSI1_LANEENABLE_MASK,4,2 ## @CM_CAMERRX_CTRL_CSI1_LANEENABLE_MASK
	.comm	_CM_CAMERRX_CTRL_CSI1_MODE_MASK,4,2 ## @CM_CAMERRX_CTRL_CSI1_MODE_MASK
	.no_dead_strip	_camerarx_phy_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function camerarx_phy_enable
_camerarx_phy_enable:                   ; @camerarx_phy_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x0, [x8]
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x21, _CM_CTRL_CORE_CAMERRX_CONTROL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CM_CTRL_CORE_CAMERRX_CONTROL@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_reg_read
	str	w0, [sp, #12]
	ldr	w8, [x19]
	cmp	w8, #1
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #2
	b.ne	LBB0_7
; %bb.3:
Lloh2:
	adrp	x22, _CM_CAMERRX_CTRL_CSI1_MODE_MASK@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CM_CAMERRX_CTRL_CSI1_MODE_MASK@GOTPAGEOFF]
	mov	w20, #3
Lloh4:
	adrp	x23, _CM_CAMERRX_CTRL_CSI1_LANEENABLE_MASK@GOTPAGE
Lloh5:
	ldr	x23, [x23, _CM_CAMERRX_CTRL_CSI1_LANEENABLE_MASK@GOTPAGEOFF]
Lloh6:
	adrp	x24, _CM_CAMERRX_CTRL_CSI1_CAMMODE_MASK@GOTPAGE
Lloh7:
	ldr	x24, [x24, _CM_CAMERRX_CTRL_CSI1_CAMMODE_MASK@GOTPAGEOFF]
Lloh8:
	adrp	x8, _CM_CAMERRX_CTRL_CSI1_CTRLCLKEN_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CM_CAMERRX_CTRL_CSI1_CTRLCLKEN_MASK@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	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
	add	sp, sp, #80
	b	_ctx_err
LBB0_5:
Lloh12:
	adrp	x22, _CM_CAMERRX_CTRL_CSI0_MODE_MASK@GOTPAGE
Lloh13:
	ldr	x22, [x22, _CM_CAMERRX_CTRL_CSI0_MODE_MASK@GOTPAGEOFF]
	mov	w20, #15
Lloh14:
	adrp	x23, _CM_CAMERRX_CTRL_CSI0_LANEENABLE_MASK@GOTPAGE
Lloh15:
	ldr	x23, [x23, _CM_CAMERRX_CTRL_CSI0_LANEENABLE_MASK@GOTPAGEOFF]
Lloh16:
	adrp	x24, _CM_CAMERRX_CTRL_CSI0_CAMMODE_MASK@GOTPAGE
Lloh17:
	ldr	x24, [x24, _CM_CAMERRX_CTRL_CSI0_CAMMODE_MASK@GOTPAGEOFF]
Lloh18:
	adrp	x8, _CM_CAMERRX_CTRL_CSI0_CTRLCLKEN_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CM_CAMERRX_CTRL_CSI0_CTRLCLKEN_MASK@GOTPAGEOFF]
LBB0_6:
	ldr	w2, [x8]
	add	x0, sp, #12
	mov	w1, #1
	bl	_set_field
	ldr	w2, [x24]
	add	x0, sp, #12
	mov	w1, #0
	bl	_set_field
	ldr	w2, [x23]
	add	x0, sp, #12
	mov	x1, x20
	bl	_set_field
	ldr	w2, [x22]
	add	x0, sp, #12
	mov	w1, #1
	bl	_set_field
LBB0_7:
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	ldr	w1, [x21]
	ldr	w2, [sp, #12]
	bl	_reg_write
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cm not mapped\n"

	.comm	_CM_CTRL_CORE_CAMERRX_CONTROL,4,2 ; @CM_CTRL_CORE_CAMERRX_CONTROL
	.comm	_CM_CAMERRX_CTRL_CSI0_CTRLCLKEN_MASK,4,2 ; @CM_CAMERRX_CTRL_CSI0_CTRLCLKEN_MASK
	.comm	_CM_CAMERRX_CTRL_CSI0_CAMMODE_MASK,4,2 ; @CM_CAMERRX_CTRL_CSI0_CAMMODE_MASK
	.comm	_CM_CAMERRX_CTRL_CSI0_LANEENABLE_MASK,4,2 ; @CM_CAMERRX_CTRL_CSI0_LANEENABLE_MASK
	.comm	_CM_CAMERRX_CTRL_CSI0_MODE_MASK,4,2 ; @CM_CAMERRX_CTRL_CSI0_MODE_MASK
	.comm	_CM_CAMERRX_CTRL_CSI1_CTRLCLKEN_MASK,4,2 ; @CM_CAMERRX_CTRL_CSI1_CTRLCLKEN_MASK
	.comm	_CM_CAMERRX_CTRL_CSI1_CAMMODE_MASK,4,2 ; @CM_CAMERRX_CTRL_CSI1_CAMMODE_MASK
	.comm	_CM_CAMERRX_CTRL_CSI1_LANEENABLE_MASK,4,2 ; @CM_CAMERRX_CTRL_CSI1_LANEENABLE_MASK
	.comm	_CM_CAMERRX_CTRL_CSI1_MODE_MASK,4,2 ; @CM_CAMERRX_CTRL_CSI1_MODE_MASK
	.no_dead_strip	_camerarx_phy_enable
.subsections_via_symbols
