	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function malidp_mw_encoder_atomic_check
_malidp_mw_encoder_atomic_check:        ## @malidp_mw_encoder_atomic_check
	.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
	subq	$24, %rsp
	.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, %r13
	movq	%rdi, %r12
	movq	%rdx, %rdi
	callq	_to_mw_state
	movq	%rax, %r14
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	(%rax), %r15
	movq	(%r15), %rsi
	movq	8(%r15), %rdx
	cmpq	(%r13), %rsi
	jne	LBB0_4
## %bb.3:
	cmpq	8(%r13), %rdx
	jne	LBB0_4
## %bb.6:
	cmpq	$0, 40(%r15)
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_18
LBB0_1:
	xorl	%r12d, %r12d
LBB0_18:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	(%r12), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	(%rax), %rdi
	movq	_SE_MEMWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	24(%r15), %rax
	movl	16(%rax), %edx
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	callq	_malidp_hw_get_format_id
	movq	%rax, (%r14)
	movq	_MALIDP_INVALID_FORMAT_ID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	24(%r15), %rax
	movl	16(%rax), %edi
	leaq	-56(%rbp), %rsi
	callq	_drm_get_format_name
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_5
LBB0_10:
	movq	24(%r15), %rax
	movl	(%rax), %r13d
	testl	%r13d, %r13d
	jle	LBB0_16
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_drm_fb_cma_get_gem_obj
	movq	%rax, %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	xorl	%esi, %esi
	callq	_malidp_hw_get_pitch_align
	movq	16(%r15), %rcx
	movl	(%rcx,%rbx,4), %esi
	decl	%eax
	testl	%eax, %esi
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	8(%r14), %rax
	movl	%esi, (%rax,%rbx,4)
	movq	32(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	addq	(%r12), %rax
	movq	24(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_12
## %bb.15:
	movq	24(%r15), %rax
LBB0_16:
	movl	%r13d, 16(%r14)
	xorl	%r12d, %r12d
	cmpq	$0, 8(%rax)
	je	LBB0_18
## %bb.17:
	movq	_rgb2yuv_coeffs_bt709_limited@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	jmp	LBB0_18
LBB0_13:
	leaq	L_.str.3(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid framebuffer size %ux%u\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Writeback framebuffer does not support modifiers\n"

	.comm	_SE_MEMWRITE,4,2                ## @SE_MEMWRITE
	.comm	_MALIDP_INVALID_FORMAT_ID,8,3   ## @MALIDP_INVALID_FORMAT_ID
L_.str.2:                               ## @.str.2
	.asciz	"Invalid pixel format %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"Invalid pitch %u for plane %d\n"

	.comm	_rgb2yuv_coeffs_bt709_limited,4,2 ## @rgb2yuv_coeffs_bt709_limited
	.no_dead_strip	_malidp_mw_encoder_atomic_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function malidp_mw_encoder_atomic_check
_malidp_mw_encoder_atomic_check:        ; @malidp_mw_encoder_atomic_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	mov	x0, x2
	bl	_to_mw_state
	ldr	x8, [x20]
	cbz	x8, LBB0_16
; %bb.1:
	ldr	x20, [x8]
	ldr	x10, [x22]
	ldp	x8, x9, [x20]
	cmp	x8, x10
	b.ne	LBB0_5
; %bb.2:
	ldr	x10, [x22, #8]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_7
; %bb.4:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:
	stp	x8, x9, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
LBB0_6:
	bl	_DRM_DEBUG_KMS
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_7:
	mov	x19, x0
	ldr	x8, [x21]
	ldr	x23, [x8]
	ldr	x8, [x23]
	ldr	x0, [x8]
Lloh7:
	adrp	x8, _SE_MEMWRITE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SE_MEMWRITE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	x8, [x20, #24]
	ldr	w2, [x8, #16]
	mov	w3, #0
	bl	_malidp_hw_get_format_id
	str	x0, [x19]
Lloh10:
	adrp	x8, _MALIDP_INVALID_FORMAT_ID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MALIDP_INVALID_FORMAT_ID@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
	ldr	x8, [x20, #24]
	ldr	w0, [x8, #16]
	add	x1, sp, #24
	bl	_drm_get_format_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_9:
	ldr	x8, [x20, #24]
	ldr	w24, [x8]
	cmp	w24, #1
	b.lt	LBB0_14
; %bb.10:
	mov	x21, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_drm_fb_cma_get_gem_obj
	mov	x22, x0
	ldr	x0, [x23]
	mov	w1, #0
	bl	_malidp_hw_get_pitch_align
	ldr	x8, [x20, #16]
	ldr	w8, [x8, x21, lsl #2]
	sub	w9, w0, #1
	tst	w8, w9
	b.ne	LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x9, [x19, #8]
	str	w8, [x9, x21, lsl #2]
	ldr	x8, [x22]
	ldr	x9, [x20, #32]
	lsl	x10, x21, #3
	ldr	x9, [x9, x10]
	add	x8, x9, x8
	ldr	x9, [x19, #24]
	str	x8, [x9, x10]
	add	x21, x21, #1
	cmp	x24, x21
	b.ne	LBB0_11
; %bb.13:
	ldr	x8, [x20, #24]
LBB0_14:
	str	w24, [x19, #16]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_16
; %bb.15:
	mov	w0, #0
Lloh15:
	adrp	x8, _rgb2yuv_coeffs_bt709_limited@GOTPAGE
Lloh16:
	ldr	x8, [x8, _rgb2yuv_coeffs_bt709_limited@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	b	LBB0_17
LBB0_16:
	mov	w0, #0
LBB0_17:
	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
	add	sp, sp, #96
	ret
LBB0_18:
	stp	x8, x21, [sp]
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid framebuffer size %ux%u\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Writeback framebuffer does not support modifiers\n"

	.comm	_SE_MEMWRITE,4,2                ; @SE_MEMWRITE
	.comm	_MALIDP_INVALID_FORMAT_ID,8,3   ; @MALIDP_INVALID_FORMAT_ID
l_.str.2:                               ; @.str.2
	.asciz	"Invalid pixel format %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"Invalid pitch %u for plane %d\n"

	.comm	_rgb2yuv_coeffs_bt709_limited,4,2 ; @rgb2yuv_coeffs_bt709_limited
	.no_dead_strip	_malidp_mw_encoder_atomic_check
.subsections_via_symbols
