	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usbvision_power_on             ## -- Begin function usbvision_power_on
	.p2align	4, 0x90
_usbvision_power_on:                    ## @usbvision_power_on
	.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
	movq	%rdi, %r14
	movq	_DBG_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_PDEBUG
	movq	_USBVISION_PWR_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_USBVISION_SSPND_EN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r14, %rdi
	callq	_usbvision_write_reg
	movl	(%rbx), %esi
	movq	_USBVISION_RES2@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	orl	(%r12), %edx
	movq	%r14, %rdi
	callq	_usbvision_write_reg
	movq	_usbvision_device_data@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_CODEC_WEBCAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_USBVISION_VIN_REG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_USBVISION_16_422_SYNC@GOTPCREL(%rip), %rax
	movq	_USBVISION_HVALID_PO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_usbvision_write_reg
	movq	_USBVISION_VIN_REG2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_USBVISION_NOHVALID@GOTPCREL(%rip), %rax
	movq	_USBVISION_KEEP_BLANK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_usbvision_write_reg
LBB0_2:
	movl	(%rbx), %esi
	movq	_USBVISION_PWR_VID@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	orl	(%r12), %edx
	movq	%r14, %rdi
	callq	_usbvision_write_reg
	movl	$10, %edi
	callq	_mdelay
	movl	(%rbx), %esi
	movl	(%r15), %edx
	orl	(%r12), %edx
	orl	(%r13), %edx
	movq	%r14, %rdi
	callq	_usbvision_write_reg
	movl	%eax, %ebx
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.3:
	movl	$1, 8(%r14)
LBB0_4:
	movq	_DBG_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%ebx, %ebx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rdx
	cmovsq	%rax, %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_PDEBUG
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DBG_FUNC,4,2                   ## @DBG_FUNC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_USBVISION_PWR_REG,4,2          ## @USBVISION_PWR_REG
	.comm	_USBVISION_SSPND_EN,4,2         ## @USBVISION_SSPND_EN
	.comm	_USBVISION_RES2,4,2             ## @USBVISION_RES2
	.comm	_usbvision_device_data,8,3      ## @usbvision_device_data
	.comm	_CODEC_WEBCAM,8,3               ## @CODEC_WEBCAM
	.comm	_USBVISION_VIN_REG1,4,2         ## @USBVISION_VIN_REG1
	.comm	_USBVISION_16_422_SYNC,4,2      ## @USBVISION_16_422_SYNC
	.comm	_USBVISION_HVALID_PO,4,2        ## @USBVISION_HVALID_PO
	.comm	_USBVISION_VIN_REG2,4,2         ## @USBVISION_VIN_REG2
	.comm	_USBVISION_NOHVALID,4,2         ## @USBVISION_NOHVALID
	.comm	_USBVISION_KEEP_BLANK,4,2       ## @USBVISION_KEEP_BLANK
	.comm	_USBVISION_PWR_VID,4,2          ## @USBVISION_PWR_VID
L_.str.1:                               ## @.str.1
	.asciz	"%s: err_code %d"

L_.str.2:                               ## @.str.2
	.asciz	"ERROR"

L_.str.3:                               ## @.str.3
	.asciz	"power is on"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usbvision_power_on             ; -- Begin function usbvision_power_on
	.p2align	2
_usbvision_power_on:                    ; @usbvision_power_on
	.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
Lloh0:
	adrp	x21, _DBG_FUNC@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DBG_FUNC@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
Lloh4:
	adrp	x20, _USBVISION_PWR_REG@GOTPAGE
Lloh5:
	ldr	x20, [x20, _USBVISION_PWR_REG@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh6:
	adrp	x22, _USBVISION_SSPND_EN@GOTPAGE
Lloh7:
	ldr	x22, [x22, _USBVISION_SSPND_EN@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_usbvision_write_reg
	ldr	w1, [x20]
	ldr	w8, [x22]
Lloh8:
	adrp	x23, _USBVISION_RES2@GOTPAGE
Lloh9:
	ldr	x23, [x23, _USBVISION_RES2@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_usbvision_write_reg
Lloh10:
	adrp	x8, _usbvision_device_data@GOTPAGE
Lloh11:
	ldr	x8, [x8, _usbvision_device_data@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
Lloh13:
	adrp	x9, _CODEC_WEBCAM@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CODEC_WEBCAM@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh16:
	adrp	x8, _USBVISION_VIN_REG1@GOTPAGE
Lloh17:
	ldr	x8, [x8, _USBVISION_VIN_REG1@GOTPAGEOFF]
Lloh18:
	adrp	x9, _USBVISION_16_422_SYNC@GOTPAGE
Lloh19:
	ldr	x9, [x9, _USBVISION_16_422_SYNC@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	ldr	w8, [x9]
Lloh22:
	adrp	x9, _USBVISION_HVALID_PO@GOTPAGE
Lloh23:
	ldr	x9, [x9, _USBVISION_HVALID_PO@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_usbvision_write_reg
Lloh25:
	adrp	x8, _USBVISION_VIN_REG2@GOTPAGE
Lloh26:
	ldr	x8, [x8, _USBVISION_VIN_REG2@GOTPAGEOFF]
Lloh27:
	adrp	x9, _USBVISION_NOHVALID@GOTPAGE
Lloh28:
	ldr	x9, [x9, _USBVISION_NOHVALID@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	ldr	w8, [x9]
Lloh31:
	adrp	x9, _USBVISION_KEEP_BLANK@GOTPAGE
Lloh32:
	ldr	x9, [x9, _USBVISION_KEEP_BLANK@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_usbvision_write_reg
LBB0_2:
	ldr	w1, [x20]
	ldr	w8, [x22]
Lloh34:
	adrp	x24, _USBVISION_PWR_VID@GOTPAGE
Lloh35:
	ldr	x24, [x24, _USBVISION_PWR_VID@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_usbvision_write_reg
	mov	w0, #10
	bl	_mdelay
	ldr	w1, [x20]
	ldr	w8, [x22]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	w9, [x23]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_usbvision_write_reg
	mov	x20, x0
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_4:
	ldr	w0, [x21]
Lloh36:
	adrp	x8, l_.str.3@PAGE
Lloh37:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh38:
	adrp	x9, l_.str.2@PAGE
Lloh39:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w20, #0
	csel	x8, x9, x8, lt
	stp	x8, x20, [sp]
Lloh40:
	adrp	x1, l_.str.1@PAGE
Lloh41:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_PDEBUG
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh29
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_DBG_FUNC,4,2                   ; @DBG_FUNC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_USBVISION_PWR_REG,4,2          ; @USBVISION_PWR_REG
	.comm	_USBVISION_SSPND_EN,4,2         ; @USBVISION_SSPND_EN
	.comm	_USBVISION_RES2,4,2             ; @USBVISION_RES2
	.comm	_usbvision_device_data,8,3      ; @usbvision_device_data
	.comm	_CODEC_WEBCAM,8,3               ; @CODEC_WEBCAM
	.comm	_USBVISION_VIN_REG1,4,2         ; @USBVISION_VIN_REG1
	.comm	_USBVISION_16_422_SYNC,4,2      ; @USBVISION_16_422_SYNC
	.comm	_USBVISION_HVALID_PO,4,2        ; @USBVISION_HVALID_PO
	.comm	_USBVISION_VIN_REG2,4,2         ; @USBVISION_VIN_REG2
	.comm	_USBVISION_NOHVALID,4,2         ; @USBVISION_NOHVALID
	.comm	_USBVISION_KEEP_BLANK,4,2       ; @USBVISION_KEEP_BLANK
	.comm	_USBVISION_PWR_VID,4,2          ; @USBVISION_PWR_VID
l_.str.1:                               ; @.str.1
	.asciz	"%s: err_code %d"

l_.str.2:                               ; @.str.2
	.asciz	"ERROR"

l_.str.3:                               ; @.str.3
	.asciz	"power is on"

.subsections_via_symbols
