	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9m001_set_fmt
_mt9m001_set_fmt:                       ## @mt9m001_set_fmt
	.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	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_v4l2_get_subdevdata
	movq	%rax, %rdi
	callq	_to_mt9m001
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_2:
	movq	%rax, %r12
	leaq	48(%rbx), %rdi
	movq	_MT9M001_MIN_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MT9M001_MAX_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	40(%rbx), %r13
	movq	_MT9M001_MIN_HEIGHT@GOTPCREL(%rip), %rcx
	movq	24(%r12), %rax
	movq	(%rcx), %r9
	addq	%rax, %r9
	movq	_MT9M001_MAX_HEIGHT@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	subq	$8, %rsp
	movl	$1, %ecx
	movq	%r13, %r8
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movq	(%r12), %rsi
	movq	_mt9m001_colour_fmts@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_4
## %bb.3:
	movq	(%r13), %rdi
	decq	%rdi
	movl	$2, %esi
	callq	_ALIGN
	movq	%rax, (%r13)
	movq	(%r12), %rsi
LBB0_4:
	movl	36(%rbx), %edi
	movl	16(%r12), %edx
	callq	_mt9m001_find_datafmt
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	8(%r12), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 36(%rbx)
LBB0_6:
	leaq	16(%rbx), %rdx
	movl	(%rax), %ecx
	movl	%ecx, 32(%rbx)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 28(%rbx)
	movq	_V4L2_YCBCR_ENC_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rbx)
	movq	_V4L2_QUANTIZATION_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%rbx)
	movq	_V4L2_XFER_FUNC_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rbx)
	movq	(%rbx), %rcx
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_7
## %bb.9:
	movq	%r15, %rdi
	movq	%rax, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt9m001_s_fmt                  ## TAILCALL
LBB0_7:
	movq	32(%rdx), %rax
	movq	%rax, 32(%r14)
	movups	(%rdx), %xmm0
	movups	16(%rdx), %xmm1
	movups	%xmm1, 16(%r14)
	movups	%xmm0, (%r14)
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MT9M001_MIN_WIDTH,4,2          ## @MT9M001_MIN_WIDTH
	.comm	_MT9M001_MAX_WIDTH,4,2          ## @MT9M001_MAX_WIDTH
	.comm	_MT9M001_MIN_HEIGHT,8,3         ## @MT9M001_MIN_HEIGHT
	.comm	_MT9M001_MAX_HEIGHT,8,3         ## @MT9M001_MAX_HEIGHT
	.comm	_mt9m001_colour_fmts,8,3        ## @mt9m001_colour_fmts
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_YCBCR_ENC_DEFAULT,4,2     ## @V4L2_YCBCR_ENC_DEFAULT
	.comm	_V4L2_QUANTIZATION_DEFAULT,4,2  ## @V4L2_QUANTIZATION_DEFAULT
	.comm	_V4L2_XFER_FUNC_DEFAULT,4,2     ## @V4L2_XFER_FUNC_DEFAULT
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ## @V4L2_SUBDEV_FORMAT_ACTIVE
	.no_dead_strip	_mt9m001_set_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9m001_set_fmt
_mt9m001_set_fmt:                       ; @mt9m001_set_fmt
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_v4l2_get_subdevdata
	bl	_to_mt9m001
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_2:
	mov	x22, x0
	add	x0, x21, #48
Lloh3:
	adrp	x8, _MT9M001_MIN_WIDTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT9M001_MIN_WIDTH@GOTPAGEOFF]
Lloh5:
	adrp	x9, _MT9M001_MAX_WIDTH@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MT9M001_MAX_WIDTH@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	ldr	w2, [x9]
	add	x23, x21, #40
Lloh9:
	adrp	x8, _MT9M001_MIN_HEIGHT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MT9M001_MIN_HEIGHT@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	x9, [x22, #24]
	add	x5, x9, x8
Lloh12:
	adrp	x8, _MT9M001_MAX_HEIGHT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MT9M001_MAX_HEIGHT@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	add	x6, x8, x9
	str	wzr, [sp]
	mov	w3, #1
	mov	x4, x23
	mov	w7, #0
	bl	_v4l_bound_align_image
	ldr	x1, [x22]
Lloh15:
	adrp	x8, _mt9m001_colour_fmts@GOTPAGE
Lloh16:
	ldr	x8, [x8, _mt9m001_colour_fmts@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x23]
	sub	x0, x8, #1
	mov	w1, #2
	bl	_ALIGN
	str	x0, [x23]
	ldr	x1, [x22]
LBB0_4:
	ldr	w0, [x21, #36]
	ldr	w2, [x22, #16]
	bl	_mt9m001_find_datafmt
	mov	x1, x0
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	x1, [x22, #8]
	ldr	w8, [x1, #4]
	str	w8, [x21, #36]
LBB0_6:
	add	x2, x21, #16
	ldr	w8, [x1]
	str	w8, [x21, #32]
Lloh18:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _V4L2_YCBCR_ENC_DEFAULT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _V4L2_YCBCR_ENC_DEFAULT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
Lloh24:
	adrp	x10, _V4L2_QUANTIZATION_DEFAULT@GOTPAGE
Lloh25:
	ldr	x10, [x10, _V4L2_QUANTIZATION_DEFAULT@GOTPAGEOFF]
	stp	w9, w8, [x21, #24]
Lloh26:
	ldr	w8, [x10]
Lloh27:
	adrp	x9, _V4L2_XFER_FUNC_DEFAULT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _V4L2_XFER_FUNC_DEFAULT@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #16]
	ldr	x8, [x21]
Lloh30:
	adrp	x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGE
Lloh31:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	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
	b	_mt9m001_s_fmt
LBB0_8:
	mov	w0, #0
	ldp	q0, q1, [x2]
	ldr	x8, [x2, #32]
	str	x8, [x19, #32]
	stp	q0, q1, [x19]
LBB0_9:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MT9M001_MIN_WIDTH,4,2          ; @MT9M001_MIN_WIDTH
	.comm	_MT9M001_MAX_WIDTH,4,2          ; @MT9M001_MAX_WIDTH
	.comm	_MT9M001_MIN_HEIGHT,8,3         ; @MT9M001_MIN_HEIGHT
	.comm	_MT9M001_MAX_HEIGHT,8,3         ; @MT9M001_MAX_HEIGHT
	.comm	_mt9m001_colour_fmts,8,3        ; @mt9m001_colour_fmts
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_YCBCR_ENC_DEFAULT,4,2     ; @V4L2_YCBCR_ENC_DEFAULT
	.comm	_V4L2_QUANTIZATION_DEFAULT,4,2  ; @V4L2_QUANTIZATION_DEFAULT
	.comm	_V4L2_XFER_FUNC_DEFAULT,4,2     ; @V4L2_XFER_FUNC_DEFAULT
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ; @V4L2_SUBDEV_FORMAT_ACTIVE
	.no_dead_strip	_mt9m001_set_fmt
.subsections_via_symbols
