	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov5640_set_power
_ov5640_set_power:                      ## @ov5640_set_power
	.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
	testl	%esi, %esi
	je	LBB0_8
## %bb.1:
	movq	%r14, %rdi
	callq	_ov5640_set_power_on
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	movq	%r14, %rdi
	callq	_ov5640_restore_mode
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_3
LBB0_11:
	movq	%r14, %rdi
	callq	_ov5640_set_power_off
	movl	%r15d, %ebx
	jmp	LBB0_12
LBB0_8:
	movq	(%r14), %rax
	movq	_V4L2_MBUS_CSI2_DPHY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	_OV5640_REG_IO_MIPI_CTRL00@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$88, %edx
	callq	_ov5640_write_reg
	movq	_OV5640_REG_MIPI_CTRL00@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_ov5640_write_reg
	movq	_OV5640_REG_PAD_OUTPUT00@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_ov5640_write_reg
LBB0_10:
	movq	%r14, %rdi
	callq	_ov5640_set_power_off
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	(%r14), %rax
	movq	_V4L2_MBUS_CSI2_DPHY@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.4:
	movq	_OV5640_REG_IO_MIPI_CTRL00@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$64, %edx
	callq	_ov5640_write_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	movq	_OV5640_REG_MIPI_CTRL00@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$36, %edx
	callq	_ov5640_write_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movq	_OV5640_REG_PAD_OUTPUT00@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$112, %edx
	callq	_ov5640_write_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MBUS_CSI2_DPHY,8,3        ## @V4L2_MBUS_CSI2_DPHY
	.comm	_OV5640_REG_IO_MIPI_CTRL00,4,2  ## @OV5640_REG_IO_MIPI_CTRL00
	.comm	_OV5640_REG_MIPI_CTRL00,4,2     ## @OV5640_REG_MIPI_CTRL00
	.comm	_OV5640_REG_PAD_OUTPUT00,4,2    ## @OV5640_REG_PAD_OUTPUT00
	.no_dead_strip	_ov5640_set_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov5640_set_power
_ov5640_set_power:                      ; @ov5640_set_power
	.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
	cbz	w1, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_ov5640_set_power_on
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.2:
	mov	x0, x19
	bl	_ov5640_restore_mode
	mov	x20, x0
	cbz	w0, LBB0_9
LBB0_3:
	mov	x0, x19
	bl	_ov5640_set_power_off
	b	LBB0_8
LBB0_4:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _V4L2_MBUS_CSI2_DPHY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_MBUS_CSI2_DPHY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _OV5640_REG_IO_MIPI_CTRL00@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OV5640_REG_IO_MIPI_CTRL00@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #88
	bl	_ov5640_write_reg
Lloh6:
	adrp	x8, _OV5640_REG_MIPI_CTRL00@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OV5640_REG_MIPI_CTRL00@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #4
	bl	_ov5640_write_reg
Lloh9:
	adrp	x8, _OV5640_REG_PAD_OUTPUT00@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OV5640_REG_PAD_OUTPUT00@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_ov5640_write_reg
LBB0_6:
	mov	x0, x19
	bl	_ov5640_set_power_off
LBB0_7:
	mov	w20, #0
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	x8, [x19]
Lloh12:
	adrp	x9, _V4L2_MBUS_CSI2_DPHY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_MBUS_CSI2_DPHY@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.10:
Lloh15:
	adrp	x8, _OV5640_REG_IO_MIPI_CTRL00@GOTPAGE
Lloh16:
	ldr	x8, [x8, _OV5640_REG_IO_MIPI_CTRL00@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #64
	bl	_ov5640_write_reg
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.11:
Lloh18:
	adrp	x8, _OV5640_REG_MIPI_CTRL00@GOTPAGE
Lloh19:
	ldr	x8, [x8, _OV5640_REG_MIPI_CTRL00@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #36
	bl	_ov5640_write_reg
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.12:
Lloh21:
	adrp	x8, _OV5640_REG_PAD_OUTPUT00@GOTPAGE
Lloh22:
	ldr	x8, [x8, _OV5640_REG_PAD_OUTPUT00@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #112
	bl	_ov5640_write_reg
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.13:
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MBUS_CSI2_DPHY,8,3        ; @V4L2_MBUS_CSI2_DPHY
	.comm	_OV5640_REG_IO_MIPI_CTRL00,4,2  ; @OV5640_REG_IO_MIPI_CTRL00
	.comm	_OV5640_REG_MIPI_CTRL00,4,2     ; @OV5640_REG_MIPI_CTRL00
	.comm	_OV5640_REG_PAD_OUTPUT00,4,2    ; @OV5640_REG_PAD_OUTPUT00
	.no_dead_strip	_ov5640_set_power
.subsections_via_symbols
