	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fimc_adjust_mplane_format      ## -- Begin function fimc_adjust_mplane_format
	.p2align	4, 0x90
_fimc_adjust_mplane_format:             ## @fimc_adjust_mplane_format
	.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	_V4L2_COLORSPACE_JPEG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rcx)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rcx)
	movl	(%rdi), %eax
	movl	%eax, (%rcx)
	movl	16(%rdi), %ebx
	movl	%ebx, 24(%rcx)
	movl	%edx, 4(%rcx)
	movl	%esi, 8(%rcx)
	testl	%eax, %eax
	jle	LBB0_17
## %bb.1:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r13,%r12,8), %esi
	movl	%ebx, %edi
	callq	_max
	movl	%eax, 4(%r13,%r12,8)
	incq	%r12
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movslq	(%rcx), %rax
	movl	%r14d, %ebx
	cmpq	%rax, %r12
	movq	%r15, %rdi
	jge	LBB0_17
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rcx), %r13
	movl	(%r13,%r12,8), %r14d
	movl	4(%rdi), %eax
	cmpl	$2, %eax
	jl	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rcx), %eax
	cmpl	%eax, %r14d
	movl	%r14d, %edx
	cmovll	%eax, %edx
	testl	%r14d, %r14d
	cmovel	%eax, %edx
	movl	%edx, %r14d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1, %eax
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	(,%r14,8), %eax
	movq	8(%rdi), %rsi
	cltd
	idivl	(%rsi,%r12,4)
	movl	8(%rcx), %edx
	cmpl	%edx, %eax
	jl	LBB0_8
	jmp	LBB0_9
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rcx), %edx
	movq	8(%rdi), %rsi
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	imull	(%rsi), %edx
	leal	7(%rdx), %r14d
	testl	%edx, %edx
	cmovnsl	%edx, %r14d
	sarl	$3, %r14d
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r12d, %r12d
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1, %r12d
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$3, (%rdi)
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %r14d
	shrl	$31, %r14d
	addl	%ebx, %r14d
	sarl	%r14d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %r14d
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, (%r13,%r12,8)
	movl	4(%rcx), %eax
	imull	8(%rcx), %eax
	movq	8(%rdi), %rcx
	imull	(%rcx,%r12,4), %eax
	leal	7(%rax), %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	sarl	$3, %ebx
	movq	%rdi, %r15
	callq	_tiled_fmt
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13,%r12,8), %esi
	shll	$5, %esi
	movl	%ebx, %edi
	callq	_roundup
	movl	%eax, %ebx
	jmp	LBB0_16
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ## @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fimc_adjust_mplane_format      ; -- Begin function fimc_adjust_mplane_format
	.p2align	2
_fimc_adjust_mplane_format:             ; @fimc_adjust_mplane_format
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x8, _V4L2_COLORSPACE_JPEG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_COLORSPACE_JPEG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _V4L2_FIELD_NONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [x3, #28]
	ldr	w8, [x0]
	ldr	w9, [x0, #16]
	str	w9, [x3, #24]
	stp	w8, w2, [x3]
	str	w1, [x3, #8]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.1:
	mov	x19, x3
	mov	x20, x0
	mov	x22, #0
	mov	x23, #0
	mov	w8, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, x22
	ldr	w1, [x24, #4]
	mov	x0, x21
	bl	_max
	str	w0, [x24, #4]
	add	x23, x23, #1
	ldrsw	x9, [x19]
	add	x22, x22, #8
	mov	x8, x25
	cmp	x23, x9
	b.ge	LBB0_16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x24, [x19, #16]
	ldr	w25, [x24, x22]
	ldr	w9, [x20, #4]
	cmp	w9, #2
	b.lt	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x19, #8]
	cmp	w25, w9
	ccmp	w25, #0, #4, ge
	csel	w25, w9, w25, eq
	b	LBB0_10
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	w9, #1
	b.ne	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w25, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	w10, w25, #3
	ldr	x9, [x20, #8]
	ldr	w11, [x9, x23, lsl #2]
	sdiv	w11, w10, w11
	ldr	w10, [x19, #8]
	cmp	w11, w10
	b.lt	LBB0_9
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [x19, #8]
	ldr	x9, [x20, #8]
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x9]
	mul	w9, w9, w10
	add	w10, w9, #7
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w25, w9, #3
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w23, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	w23, #1
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x20]
	cmp	w8, #0
	cinc	w10, w8, lt
	asr	w10, w10, #1
	cmp	w9, #3
	csel	w25, w8, w10, ne
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x8
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	str	w25, [x24, x22]
	ldp	w9, w8, [x19, #4]
	ldr	x10, [x20, #8]
	ldr	w10, [x10, x23, lsl #2]
	mul	w8, w9, w8
	mul	w8, w8, w10
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w21, w8, #3
	mov	x0, x20
	bl	_tiled_fmt
	cbz	x0, LBB0_2
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x24, x22]
	lsl	w1, w8, #5
	mov	x0, x21
	bl	_roundup
	mov	x21, x0
	b	LBB0_2
LBB0_16:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ; @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
.subsections_via_symbols
