	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vfe_wm_line_based
_vfe_wm_line_based:                     ## @vfe_wm_line_based
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	testl	%r8d, %r8d
	je	LBB0_2
## %bb.1:
	movq	%rdx, %rbx
	movl	$0, -44(%rbp)
	movl	$0, -36(%rbp)
	movl	$0, -40(%rbp)
	leaq	-44(%rbp), %rdx
	leaq	-36(%rbp), %rax
	leaq	-40(%rbp), %r8
	movq	%rbx, %rdi
	movl	%ecx, %esi
	movq	%rax, %rcx
	callq	_vfe_get_wm_sizes
	movl	(%rbx), %edi
	movl	-44(%rbp), %esi
	callq	_vfe_word_per_line_by_pixel
                                        ## kill: def $eax killed $eax def $rax
	movl	-36(%rbp), %ecx
	decl	%ecx
	leal	3(%rax), %edx
	leal	6(%rax), %ebx
	testl	%edx, %edx
	cmovnsl	%edx, %ebx
	andl	$-4, %ebx
	shll	$14, %ebx
	addl	$-65536, %ebx                   ## imm = 0xFFFF0000
	orl	%ecx, %ebx
	movq	(%r15), %r12
	movl	%r14d, %edi
	callq	_VFE_0_BUS_IMAGE_MASTER_n_WR_IMAGE_SIZE
	addq	%rax, %r12
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_writel_relaxed
	movl	-40(%rbp), %edi
	callq	_vfe_word_per_line_by_bytes
                                        ## kill: def $eax killed $eax def $rax
	movl	-36(%rbp), %ecx
	leal	-4(,%rcx,4), %ecx
	movl	%eax, %edx
	incl	%edx
	shrl	$31, %edx
	leal	(%rax,%rdx), %ebx
	incl	%ebx
	andl	$-2, %ebx
	shll	$15, %ebx
	orl	%ecx, %ebx
	orl	$3, %ebx
	movq	(%r15), %r15
	movl	%r14d, %edi
	callq	_VFE_0_BUS_IMAGE_MASTER_n_WR_BUFFER_CFG
	addq	%rax, %r15
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_writel_relaxed
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	(%r15), %rbx
	movl	%r14d, %edi
	callq	_VFE_0_BUS_IMAGE_MASTER_n_WR_IMAGE_SIZE
	addq	%rax, %rbx
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_writel_relaxed
	movq	(%r15), %rbx
	movl	%r14d, %edi
	callq	_VFE_0_BUS_IMAGE_MASTER_n_WR_BUFFER_CFG
	addq	%rax, %rbx
	xorl	%edi, %edi
	movq	%rbx, %rsi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel_relaxed                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_vfe_wm_line_based
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vfe_wm_line_based
_vfe_wm_line_based:                     ; @vfe_wm_line_based
	.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	x19, x1
	mov	x20, x0
	cbz	w4, LBB0_2
; %bb.1:
	mov	x8, x3
	mov	x21, x2
	str	xzr, [sp, #8]
	str	wzr, [sp, #4]
	add	x2, sp, #12
	add	x3, sp, #8
	add	x4, sp, #4
	mov	x0, x21
	mov	x1, x8
	bl	_vfe_get_wm_sizes
	ldr	w0, [x21]
	ldr	w1, [sp, #12]
	bl	_vfe_word_per_line_by_pixel
	ldr	w8, [sp, #8]
	sub	w8, w8, #1
	add	w9, w0, #3
	add	w10, w0, #6
	cmp	w9, #0
	csel	w9, w10, w9, lt
	lsl	w9, w9, #14
	and	w9, w9, #0xffff0000
	sub	w9, w9, #16, lsl #12            ; =65536
	orr	w21, w9, w8
	ldr	x22, [x20]
	mov	x0, x19
	bl	_VFE_0_BUS_IMAGE_MASTER_n_WR_IMAGE_SIZE
	add	x1, x0, x22
	mov	x0, x21
	bl	_writel_relaxed
	ldr	w0, [sp, #4]
	bl	_vfe_word_per_line_by_bytes
	ldr	w8, [sp, #8]
	lsl	w8, w8, #2
	sub	w8, w8, #4
	add	w9, w0, #1
	add	w10, w0, #2
	cmp	w9, #0
	csinc	w9, w10, w0, lt
	lsl	w9, w9, #15
	and	w9, w9, #0xffff0000
	orr	w8, w9, w8
	orr	w21, w8, #0x3
	ldr	x20, [x20]
	mov	x0, x19
	bl	_VFE_0_BUS_IMAGE_MASTER_n_WR_BUFFER_CFG
	add	x1, x0, x20
	mov	x0, x21
	bl	_writel_relaxed
	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
LBB0_2:
	ldr	x21, [x20]
	mov	x0, x19
	bl	_VFE_0_BUS_IMAGE_MASTER_n_WR_IMAGE_SIZE
	add	x1, x0, x21
	mov	w0, #0
	bl	_writel_relaxed
	ldr	x20, [x20]
	mov	x0, x19
	bl	_VFE_0_BUS_IMAGE_MASTER_n_WR_BUFFER_CFG
	add	x1, x0, x20
	mov	w0, #0
	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	_writel_relaxed
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_vfe_wm_line_based
.subsections_via_symbols
