	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpia2_init_camera              ## -- Begin function cpia2_init_camera
	.p2align	4, 0x90
_cpia2_init_camera:                     ## @cpia2_init_camera
	.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, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	movl	$0, (%rbx)
	movq	%rbx, %rdi
	callq	_cpia2_set_high_power
	movq	%rbx, %rdi
	callq	_cpia2_get_version_info
	movq	8(%rbx), %rsi
	movq	_CPIA2_ASIC_672@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_1
## %bb.2:
	movq	_CPIA2_CMD_SET_VC_MP_GPIO_DIRECTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TRANSFER_WRITE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_cpia2_do_command
	movq	_CPIA2_CMD_SET_VC_MP_GPIO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_cpia2_do_command
	movq	%rbx, %rdi
	callq	_reset_camera_struct
	movq	%rbx, %rdi
	callq	_cpia2_set_low_power
	leaq	L_.str.2(%rip), %rdi
	callq	_DBG
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %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	"Start\n"

	.comm	_CPIA2_ASIC_672,8,3             ## @CPIA2_ASIC_672
L_.str.1:                               ## @.str.1
	.asciz	"Device IO error (asicID has incorrect value of 0x%X\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_CPIA2_CMD_SET_VC_MP_GPIO_DIRECTION,4,2 ## @CPIA2_CMD_SET_VC_MP_GPIO_DIRECTION
	.comm	_TRANSFER_WRITE,4,2             ## @TRANSFER_WRITE
	.comm	_CPIA2_CMD_SET_VC_MP_GPIO_DATA,4,2 ## @CPIA2_CMD_SET_VC_MP_GPIO_DATA
L_.str.2:                               ## @.str.2
	.asciz	"End\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpia2_init_camera              ; -- Begin function cpia2_init_camera
	.p2align	2
_cpia2_init_camera:                     ; @cpia2_init_camera
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	str	wzr, [x19]
	mov	x0, x19
	bl	_cpia2_set_high_power
	mov	x0, x19
	bl	_cpia2_get_version_info
	ldr	x1, [x19, #8]
Lloh2:
	adrp	x8, _CPIA2_ASIC_672@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CPIA2_ASIC_672@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _CPIA2_CMD_SET_VC_MP_GPIO_DIRECTION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CPIA2_CMD_SET_VC_MP_GPIO_DIRECTION@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x20, _TRANSFER_WRITE@GOTPAGE
Lloh9:
	ldr	x20, [x20, _TRANSFER_WRITE@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	mov	w3, #0
	bl	_cpia2_do_command
Lloh10:
	adrp	x8, _CPIA2_CMD_SET_VC_MP_GPIO_DATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CPIA2_CMD_SET_VC_MP_GPIO_DATA@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w2, [x20]
	mov	x0, x19
	mov	w3, #0
	bl	_cpia2_do_command
	mov	x0, x19
	bl	_reset_camera_struct
	mov	x0, x19
	bl	_cpia2_set_low_power
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DBG
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
Lloh17:
	adrp	x8, _ENODEV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Start\n"

	.comm	_CPIA2_ASIC_672,8,3             ; @CPIA2_ASIC_672
l_.str.1:                               ; @.str.1
	.asciz	"Device IO error (asicID has incorrect value of 0x%X\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_CPIA2_CMD_SET_VC_MP_GPIO_DIRECTION,4,2 ; @CPIA2_CMD_SET_VC_MP_GPIO_DIRECTION
	.comm	_TRANSFER_WRITE,4,2             ; @TRANSFER_WRITE
	.comm	_CPIA2_CMD_SET_VC_MP_GPIO_DATA,4,2 ; @CPIA2_CMD_SET_VC_MP_GPIO_DATA
l_.str.2:                               ; @.str.2
	.asciz	"End\n"

.subsections_via_symbols
