	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9p031_open
_mt9p031_open:                          ## @mt9p031_open
	.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	%rsi, %r15
	movq	%rdi, %rbx
	callq	_to_mt9p031
	movq	%rax, %r14
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_v4l2_subdev_get_try_crop
	movq	_MT9P031_COLUMN_START_DEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%rax)
	movq	_MT9P031_ROW_START_DEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
	movq	_MT9P031_WINDOW_WIDTH_DEF@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	%rcx, 8(%rax)
	movq	_MT9P031_WINDOW_HEIGHT_DEF@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movq	%rcx, (%rax)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_v4l2_subdev_get_try_format
	movq	(%r14), %rcx
	movq	_MT9P031_MODEL_MONOCHROME@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_1
## %bb.2:
	movq	_MEDIA_BUS_FMT_Y12_1X12@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_MEDIA_BUS_FMT_SGRBG12_1X12@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rax)
	movq	(%r12), %rcx
	movq	%rcx, 16(%rax)
	movq	(%r13), %rcx
	movq	%rcx, 8(%rax)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movq	_V4L2_COLORSPACE_SRGB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movq	%rbx, %rdi
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt9p031_set_power              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT9P031_COLUMN_START_DEF,4,2   ## @MT9P031_COLUMN_START_DEF
	.comm	_MT9P031_ROW_START_DEF,4,2      ## @MT9P031_ROW_START_DEF
	.comm	_MT9P031_WINDOW_WIDTH_DEF,8,3   ## @MT9P031_WINDOW_WIDTH_DEF
	.comm	_MT9P031_WINDOW_HEIGHT_DEF,8,3  ## @MT9P031_WINDOW_HEIGHT_DEF
	.comm	_MT9P031_MODEL_MONOCHROME,8,3   ## @MT9P031_MODEL_MONOCHROME
	.comm	_MEDIA_BUS_FMT_Y12_1X12,4,2     ## @MEDIA_BUS_FMT_Y12_1X12
	.comm	_MEDIA_BUS_FMT_SGRBG12_1X12,4,2 ## @MEDIA_BUS_FMT_SGRBG12_1X12
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ## @V4L2_COLORSPACE_SRGB
	.no_dead_strip	_mt9p031_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9p031_open
_mt9p031_open:                          ; @mt9p031_open
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	bl	_to_mt9p031
	mov	x21, x0
	ldr	w1, [x19]
	mov	x0, x20
	mov	w2, #0
	bl	_v4l2_subdev_get_try_crop
Lloh0:
	adrp	x8, _MT9P031_COLUMN_START_DEF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT9P031_COLUMN_START_DEF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MT9P031_ROW_START_DEF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MT9P031_ROW_START_DEF@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #16]
Lloh6:
	adrp	x22, _MT9P031_WINDOW_WIDTH_DEF@GOTPAGE
Lloh7:
	ldr	x22, [x22, _MT9P031_WINDOW_WIDTH_DEF@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh8:
	adrp	x23, _MT9P031_WINDOW_HEIGHT_DEF@GOTPAGE
Lloh9:
	ldr	x23, [x23, _MT9P031_WINDOW_HEIGHT_DEF@GOTPAGEOFF]
	ldr	x9, [x23]
	stp	x9, x8, [x0]
	ldr	w1, [x19]
	mov	x0, x20
	mov	w2, #0
	bl	_v4l2_subdev_get_try_format
Lloh10:
	adrp	x8, _MT9P031_MODEL_MONOCHROME@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MT9P031_MODEL_MONOCHROME@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x10, _MEDIA_BUS_FMT_Y12_1X12@GOTPAGE
Lloh14:
	ldr	x10, [x10, _MEDIA_BUS_FMT_Y12_1X12@GOTPAGEOFF]
Lloh15:
	adrp	x11, _MEDIA_BUS_FMT_SGRBG12_1X12@GOTPAGE
Lloh16:
	ldr	x11, [x11, _MEDIA_BUS_FMT_SGRBG12_1X12@GOTPAGEOFF]
	cmp	x9, x8
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	str	w8, [x0, #24]
	ldr	x8, [x22]
	ldr	x9, [x23]
	stp	x9, x8, [x0, #8]
Lloh17:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh19:
	adrp	x9, _V4L2_COLORSPACE_SRGB@GOTPAGE
Lloh20:
	ldr	x9, [x9, _V4L2_COLORSPACE_SRGB@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	ldr	w9, [x9]
	stp	w9, w8, [x0]
	mov	x0, x20
	mov	w1, #1
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_mt9p031_set_power
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MT9P031_COLUMN_START_DEF,4,2   ; @MT9P031_COLUMN_START_DEF
	.comm	_MT9P031_ROW_START_DEF,4,2      ; @MT9P031_ROW_START_DEF
	.comm	_MT9P031_WINDOW_WIDTH_DEF,8,3   ; @MT9P031_WINDOW_WIDTH_DEF
	.comm	_MT9P031_WINDOW_HEIGHT_DEF,8,3  ; @MT9P031_WINDOW_HEIGHT_DEF
	.comm	_MT9P031_MODEL_MONOCHROME,8,3   ; @MT9P031_MODEL_MONOCHROME
	.comm	_MEDIA_BUS_FMT_Y12_1X12,4,2     ; @MEDIA_BUS_FMT_Y12_1X12
	.comm	_MEDIA_BUS_FMT_SGRBG12_1X12,4,2 ; @MEDIA_BUS_FMT_SGRBG12_1X12
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ; @V4L2_COLORSPACE_SRGB
	.no_dead_strip	_mt9p031_open
.subsections_via_symbols
