	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_mdp_bound_align_image
_mtk_mdp_bound_align_image:             ## @mtk_mdp_bound_align_image
	.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	%r8, %r14
	movq	%rdi, %r12
	movl	16(%rbp), %eax
	movl	24(%rbp), %edi
	movl	(%r12), %r15d
	bsfl	%ecx, %r13d
	movl	$-1, %ecx
	cmovel	%ecx, %r13d
	movl	(%r8), %ebx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	bsfl	%edi, %ebx
	cmovel	%ecx, %ebx
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, %ecx
	pushq	$0
	pushq	%rbx
	pushq	%rax
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movl	$1, %eax
	movl	%ebx, %ecx
	shll	%cl, %eax
	movl	$1, %esi
	movl	(%r12), %edx
	cmpl	%r15d, %edx
	jge	LBB0_3
## %bb.1:
	movl	%r13d, %ecx
	shll	%cl, %esi
	addl	%esi, %edx
	cmpl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	ja	LBB0_3
## %bb.2:
	movl	%edx, (%r12)
LBB0_3:
	movl	(%r14), %ecx
	cmpl	-48(%rbp), %ecx                 ## 4-byte Folded Reload
	jge	LBB0_6
## %bb.4:
	addl	%eax, %ecx
	movl	16(%rbp), %eax
	cmpl	%eax, %ecx
	ja	LBB0_6
## %bb.5:
	movl	%ecx, (%r14)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mtk_mdp_bound_align_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_mdp_bound_align_image
_mtk_mdp_bound_align_image:             ; @mtk_mdp_bound_align_image
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x6
	mov	x19, x4
	mov	x23, x2
	mov	x21, x0
	ldr	w26, [x0]
	ldr	w25, [x4]
	rbit	w8, w3
	clz	w8, w8
	cmp	w3, #0
	csinv	w24, w8, wzr, ne
	rbit	w8, w7
	clz	w8, w8
	cmp	w7, #0
	csinv	w22, w8, wzr, ne
	str	wzr, [sp]
	mov	x3, x24
	mov	x7, x22
	bl	_v4l_bound_align_image
	mov	w8, #1
	ldr	w9, [x21]
	cmp	w9, w26
	lsl	w10, w8, w24
	add	w9, w9, w10
	ccmp	w9, w23, #2, lt
	b.hi	LBB0_2
; %bb.1:
	str	w9, [x21]
LBB0_2:
	ldr	w9, [x19]
	cmp	w9, w25
	b.ge	LBB0_5
; %bb.3:
	lsl	w8, w8, w22
	add	w8, w9, w8
	cmp	w8, w20
	b.hi	LBB0_5
; %bb.4:
	str	w8, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mtk_mdp_bound_align_image
.subsections_via_symbols
