	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9t001_registered
_mt9t001_registered:                    ## @mt9t001_registered
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_v4l2_get_subdevdata
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_to_mt9t001
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mt9t001_power_on
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_MT9T001_CHIP_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt9t001_read
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_mt9t001_power_off
	movq	_MT9T001_CHIP_ID@GOTPCREL(%rip), %rax
	movq	%r14, %rdi
	addq	$4, %rdi
	cmpq	(%rax), %r12
	jne	LBB0_3
## %bb.4:
	movl	(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %ebx
	addq	$4, %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MT9T001 power up failed\n"

	.comm	_MT9T001_CHIP_VERSION,4,2       ## @MT9T001_CHIP_VERSION
	.comm	_MT9T001_CHIP_ID,8,3            ## @MT9T001_CHIP_ID
L_.str.1:                               ## @.str.1
	.asciz	"MT9T001 not detected, wrong version 0x%04x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"MT9T001 detected at address 0x%02x\n"

	.no_dead_strip	_mt9t001_registered
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9t001_registered
_mt9t001_registered:                    ; @mt9t001_registered
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	bl	_v4l2_get_subdevdata
	mov	x19, x0
	mov	x0, x20
	bl	_to_mt9t001
	mov	x21, x0
	bl	_mt9t001_power_on
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _MT9T001_CHIP_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT9T001_CHIP_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt9t001_read
	mov	x20, x0
	mov	x0, x21
	bl	_mt9t001_power_off
Lloh3:
	adrp	x8, _MT9T001_CHIP_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT9T001_CHIP_ID@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x0, x19, #4
	cmp	x20, x8
	b.ne	LBB0_4
; %bb.2:
	ldr	w2, [x19]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_info
	mov	w20, #0
	b	LBB0_5
LBB0_3:
	mov	x20, x0
	add	x0, x19, #4
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_5
LBB0_4:
	str	x20, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MT9T001 power up failed\n"

	.comm	_MT9T001_CHIP_VERSION,4,2       ; @MT9T001_CHIP_VERSION
	.comm	_MT9T001_CHIP_ID,8,3            ; @MT9T001_CHIP_ID
l_.str.1:                               ; @.str.1
	.asciz	"MT9T001 not detected, wrong version 0x%04x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"MT9T001 detected at address 0x%02x\n"

	.no_dead_strip	_mt9t001_registered
.subsections_via_symbols
