	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omap3isp_csiphy_acquire        ## -- Begin function omap3isp_csiphy_acquire
	.p2align	4, 0x90
_omap3isp_csiphy_acquire:               ## @omap3isp_csiphy_acquire
	.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
	cmpq	$0, 16(%rdi)
	je	LBB0_7
## %bb.1:
	movq	%rsi, %r15
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	16(%r14), %rdi
	callq	_regulator_enable
	testl	%eax, %eax
	js	LBB0_9
## %bb.2:
	movl	32(%r14), %edi
	callq	_omap3isp_csi2_reset
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	movq	%r15, 8(%r14)
	movq	%r14, %rdi
	callq	_omap3isp_csiphy_config
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.4:
	movq	24(%r14), %rax
	movq	(%rax), %rax
	movq	_ISP_REVISION_15_0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.5:
	movq	_ISPCSI2_PHY_CFG_PWR_CMD_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_csiphy_set_power
	testl	%eax, %eax
	je	LBB0_13
## %bb.6:
	movl	%eax, %ebx
	movq	16(%r14), %rdi
	callq	_regulator_disable
	testl	%ebx, %ebx
	jns	LBB0_11
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %ebx
LBB0_10:
	movq	$0, 8(%r14)
LBB0_11:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_12
LBB0_7:
	movq	24(%r14), %rax
	movl	8(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_csiphy_power_autoswitch_enable
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Power regulator for CSI PHY not available\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ISP_REVISION_15_0,8,3          ## @ISP_REVISION_15_0
	.comm	_ISPCSI2_PHY_CFG_PWR_CMD_ON,4,2 ## @ISPCSI2_PHY_CFG_PWR_CMD_ON
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omap3isp_csiphy_acquire        ; -- Begin function omap3isp_csiphy_acquire
	.p2align	2
_omap3isp_csiphy_acquire:               ; @omap3isp_csiphy_acquire
	.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
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_10
; %bb.1:
	mov	x21, x1
	mov	x0, x19
	bl	_mutex_lock
	ldr	x0, [x19, #16]
	bl	_regulator_enable
	tbnz	w0, #31, LBB0_7
; %bb.2:
	ldr	w0, [x19, #32]
	bl	_omap3isp_csi2_reset
	tbnz	w0, #31, LBB0_7
; %bb.3:
	str	x21, [x19, #8]
	mov	x0, x19
	bl	_omap3isp_csiphy_config
	mov	x20, x0
	tbnz	w0, #31, LBB0_8
; %bb.4:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _ISP_REVISION_15_0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ISP_REVISION_15_0@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.5:
Lloh3:
	adrp	x8, _ISPCSI2_PHY_CFG_PWR_CMD_ON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ISPCSI2_PHY_CFG_PWR_CMD_ON@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_csiphy_set_power
	mov	x20, x0
	cbz	w0, LBB0_12
; %bb.6:
	ldr	x0, [x19, #16]
	bl	_regulator_disable
	tbz	w20, #31, LBB0_9
	b	LBB0_8
LBB0_7:
	mov	x20, x0
LBB0_8:
	str	xzr, [x19, #8]
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_11
LBB0_10:
	ldr	x8, [x19, #24]
	ldr	w0, [x8, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	mov	x0, x20
	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
LBB0_12:
	mov	x0, x19
	mov	w1, #1
	bl	_csiphy_power_autoswitch_enable
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Power regulator for CSI PHY not available\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ISP_REVISION_15_0,8,3          ; @ISP_REVISION_15_0
	.comm	_ISPCSI2_PHY_CFG_PWR_CMD_ON,4,2 ; @ISPCSI2_PHY_CFG_PWR_CMD_ON
.subsections_via_symbols
