	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9t112_set_fmt
_mt9t112_set_fmt:                       ## @mt9t112_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, %r13
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_v4l2_get_subdevdata
	movq	%rax, %rdi
	callq	_to_mt9t112
	cmpq	$0, 8(%r13)
	je	LBB0_1
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_1:
	leaq	16(%r13), %r12
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_2
## %bb.6:
	movq	_mt9t112_cfmts@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	(%r12), %rsi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, (%rdx)
	je	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rcx
	addq	$16, %rdx
	cmpq	%rcx, %rax
	jne	LBB0_7
	jmp	LBB0_9
LBB0_2:
	xorl	%ecx, %ecx
LBB0_3:
	cmpl	%eax, %ecx
	jne	LBB0_4
LBB0_9:
	movq	_MEDIA_BUS_FMT_UYVY8_2X8@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	_V4L2_COLORSPACE_JPEG@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_4:
	movq	_mt9t112_cfmts@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ecx, %ecx
	shlq	$4, %rcx
	addq	%rcx, %rax
	addq	$8, %rax
LBB0_10:
	movl	(%rax), %eax
	movl	%eax, 36(%r13)
	leaq	32(%r13), %rdi
	movq	_MAX_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	28(%r13), %r8
	movq	_MAX_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
	movq	(%r13), %rax
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.13:
	movq	%r15, %rdi
	movq	%r12, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt9t112_s_fmt                  ## TAILCALL
LBB0_11:
	movq	16(%r12), %rax
	movq	%rax, 16(%r14)
	movups	(%r12), %xmm0
	movups	%xmm0, (%r14)
LBB0_12:
	movl	%ebx, %eax
	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	_mt9t112_cfmts,8,3              ## @mt9t112_cfmts
	.comm	_MEDIA_BUS_FMT_UYVY8_2X8,8,3    ## @MEDIA_BUS_FMT_UYVY8_2X8
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ## @V4L2_COLORSPACE_JPEG
	.comm	_MAX_WIDTH,4,2                  ## @MAX_WIDTH
	.comm	_MAX_HEIGHT,4,2                 ## @MAX_HEIGHT
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ## @V4L2_SUBDEV_FORMAT_ACTIVE
	.no_dead_strip	_mt9t112_set_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9t112_set_fmt
_mt9t112_set_fmt:                       ; @mt9t112_set_fmt
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_v4l2_get_subdevdata
	bl	_to_mt9t112
	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_13
LBB0_2:
	add	x22, x21, #16
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x9, #0
Lloh3:
	adrp	x10, _mt9t112_cfmts@GOTPAGE
Lloh4:
	ldr	x10, [x10, _mt9t112_cfmts@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	ldr	x11, [x22]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x10]
	cmp	x12, x11
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #1
	add	x10, x10, #16
	cmp	x8, x9
	b.ne	LBB0_4
	b	LBB0_8
LBB0_6:
	mov	w9, #0
LBB0_7:
	cmp	w9, w8
	b.ne	LBB0_9
LBB0_8:
Lloh6:
	adrp	x8, _MEDIA_BUS_FMT_UYVY8_2X8@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MEDIA_BUS_FMT_UYVY8_2X8@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [x22]
Lloh9:
	adrp	x8, _V4L2_COLORSPACE_JPEG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_COLORSPACE_JPEG@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh11:
	adrp	x8, _mt9t112_cfmts@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mt9t112_cfmts@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	add	x8, x8, w9, uxtw #4
	add	x8, x8, #8
LBB0_10:
	ldr	w8, [x8]
	str	w8, [x21, #36]
Lloh14:
	adrp	x8, _MAX_WIDTH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAX_WIDTH@GOTPAGEOFF]
	add	x0, x21, #32
Lloh16:
	ldr	w2, [x8]
	add	x4, x21, #28
Lloh17:
	adrp	x8, _MAX_HEIGHT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MAX_HEIGHT@GOTPAGEOFF]
Lloh19:
	ldr	w6, [x8]
	str	wzr, [sp]
	mov	w1, #0
	mov	w3, #0
	mov	w5, #0
	mov	w7, #0
	bl	_v4l_bound_align_image
Lloh20:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x21, #24]
	ldr	x8, [x21]
Lloh23:
	adrp	x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x20
	mov	x1, 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
	b	_mt9t112_s_fmt
LBB0_12:
	mov	w0, #0
	ldr	q0, [x22]
	ldr	x8, [x22, #16]
	str	x8, [x19, #16]
	str	q0, [x19]
LBB0_13:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_mt9t112_cfmts,8,3              ; @mt9t112_cfmts
	.comm	_MEDIA_BUS_FMT_UYVY8_2X8,8,3    ; @MEDIA_BUS_FMT_UYVY8_2X8
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ; @V4L2_COLORSPACE_JPEG
	.comm	_MAX_WIDTH,4,2                  ; @MAX_WIDTH
	.comm	_MAX_HEIGHT,4,2                 ; @MAX_HEIGHT
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ; @V4L2_SUBDEV_FORMAT_ACTIVE
	.no_dead_strip	_mt9t112_set_fmt
.subsections_via_symbols
