	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9t031_video_probe
_mt9t031_video_probe:                   ## @mt9t031_video_probe
	.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	_to_mt9t031
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_soc_camera_i2c_to_vdev
	movq	%rax, %r15
	movq	_MT9T031_CHIP_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_reg_write
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	movq	_MT9T031_CHIP_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_reg_read
	cmpl	$5665, %eax                     ## imm = 0x1621
	jne	LBB0_6
## %bb.1:
	movq	_V4L2_IDENT_MT9T031@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	$5665, %edx                     ## imm = 0x1621
	callq	_dev_info
	movq	%rbx, %rdi
	callq	_mt9t031_idle
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	_mt9t031_dev_type@GOTPCREL(%rip), %rax
	movq	%rax, (%r15)
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_4:
	movabsq	$274877907199, %rax             ## imm = 0x40000000FF
	movq	%rax, (%r14)
LBB0_5:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT9T031_CHIP_ENABLE,4,2        ## @MT9T031_CHIP_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write: %d\n"

	.comm	_MT9T031_CHIP_VERSION,4,2       ## @MT9T031_CHIP_VERSION
	.comm	_V4L2_IDENT_MT9T031,4,2         ## @V4L2_IDENT_MT9T031
L_.str.1:                               ## @.str.1
	.asciz	"No MT9T031 chip detected, register read %x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"Detected a MT9T031 chip ID %x\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to initialise the camera\n"

	.comm	_mt9t031_dev_type,4,2           ## @mt9t031_dev_type
	.no_dead_strip	_mt9t031_video_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function mt9t031_video_probe
lCPI0_0:
	.long	255                             ; 0xff
	.long	64                              ; 0x40
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_mt9t031_video_probe:                   ; @mt9t031_video_probe
	.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	_to_mt9t031
	mov	x19, x0
	mov	x0, x20
	bl	_soc_camera_i2c_to_vdev
	mov	x21, x0
Lloh0:
	adrp	x8, _MT9T031_CHIP_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT9T031_CHIP_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_reg_write
	mov	x2, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
Lloh5:
	adrp	x8, _MT9T031_CHIP_VERSION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MT9T031_CHIP_VERSION@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_reg_read
                                        ; kill: def $w0 killed $w0 def $x0
	mov	w8, #5665
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.1:
Lloh8:
	adrp	x8, _V4L2_IDENT_MT9T031@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_IDENT_MT9T031@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #8]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	w2, #5665
	bl	_dev_info
	mov	x0, x20
	bl	_mt9t031_idle
	mov	x22, x0
	tbnz	w0, #31, LBB0_4
; %bb.2:
Lloh13:
	adrp	x8, _mt9t031_dev_type@GOTPAGE
Lloh14:
	ldr	x8, [x8, _mt9t031_dev_type@GOTPAGEOFF]
	str	x8, [x21]
	b	LBB0_5
LBB0_3:
	str	x0, [sp]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh17:
	adrp	x8, _ENODEV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_6
LBB0_4:
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_5:
Lloh22:
	adrp	x8, lCPI0_0@PAGE
Lloh23:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
LBB0_6:
	mov	x0, x22
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdr	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MT9T031_CHIP_ENABLE,4,2        ; @MT9T031_CHIP_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write: %d\n"

	.comm	_MT9T031_CHIP_VERSION,4,2       ; @MT9T031_CHIP_VERSION
	.comm	_V4L2_IDENT_MT9T031,4,2         ; @V4L2_IDENT_MT9T031
l_.str.1:                               ; @.str.1
	.asciz	"No MT9T031 chip detected, register read %x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"Detected a MT9T031 chip ID %x\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to initialise the camera\n"

	.comm	_mt9t031_dev_type,4,2           ; @mt9t031_dev_type
	.no_dead_strip	_mt9t031_video_probe
.subsections_via_symbols
