	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_malidp_mw_atomic_commit        ## -- Begin function malidp_mw_atomic_commit
	.p2align	4, 0x90
_malidp_mw_atomic_commit:               ## @malidp_mw_atomic_commit
	.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	8(%rdi), %rbx
	movq	8(%rbx), %r12
	testq	%r12, %r12
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r13
	movq	(%rbx), %r14
	movq	%r12, %rdi
	callq	_to_mw_state
	movq	%rax, %r15
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	addq	$8, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r14
	movl	(%r13), %edi
	movl	(%r14), %ecx
	movl	4(%r14), %edx
	movq	24(%r15), %rax
	movl	(%rax), %r8d
	movq	32(%r15), %r9
	movl	16(%r15), %r10d
	subq	$8, %rsp
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	pushq	%r10
	callq	_DRM_DEV_DEBUG_DRIVER
	addq	$16, %rsp
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_drm_writeback_queue_job
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	movq	8(%rax), %rax
	movq	32(%r15), %rsi
	movq	24(%r15), %rdx
	movl	16(%r15), %ebx
	movl	20(%r15), %ecx
	movl	(%r14), %r9d
	movl	4(%r14), %r8d
	cmpl	$0, (%r15)
	jne	LBB0_4
## %bb.3:
	movq	8(%r15), %r13
LBB0_4:
	pushq	%r13
	pushq	%rbx
	callq	*%rax
	addq	$16, %rsp
	xorl	%eax, %eax
	cmpq	$0, 8(%r15)
	setne	%al
	movl	%eax, (%r15)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_DRM_DEV_DEBUG_DRIVER
	movq	(%r14), %rax
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*(%rax)                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enable memwrite %ux%u:%d %pad fmt: %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"Disable memwrite\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_malidp_mw_atomic_commit        ; -- Begin function malidp_mw_atomic_commit
	.p2align	2
_malidp_mw_atomic_commit:               ; @malidp_mw_atomic_commit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	x8, [x0, #8]
	mov	x22, x8
	ldr	x21, [x22, #8]!
	cbz	x21, LBB0_7
; %bb.1:
	mov	x23, x0
	ldr	x19, [x8]
	mov	x0, x21
	bl	_to_mw_state
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x20, x0
	ldr	x24, [x8]
	ldr	w0, [x23]
	ldp	x8, x9, [x20, #24]
	ldp	w11, w10, [x24]
	ldr	w8, [x8]
	ldr	w12, [x20, #16]
	stp	x9, x12, [sp, #24]
	stp	x11, x8, [sp, #8]
	str	x10, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_DEBUG_DRIVER
	mov	x0, x22
	mov	x1, x21
	bl	_drm_writeback_queue_job
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	ldp	x2, x1, [x20, #24]
	ldp	w5, w4, [x24]
	ldp	w6, w3, [x20, #16]
	ldr	w9, [x20]
	cbz	w9, LBB0_5
; %bb.3:
	mov	x7, #0
	b	LBB0_6
LBB0_4:
	ldr	w0, [x23]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_DRM_DEV_DEBUG_DRIVER
	ldr	x8, [x19]
	ldr	x1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	br	x1
LBB0_5:
	ldr	x7, [x20, #8]
LBB0_6:
	mov	x0, x19
	blr	x8
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w8, ne
	str	w8, [x20]
LBB0_7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enable memwrite %ux%u:%d %pad fmt: %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"Disable memwrite\n"

.subsections_via_symbols
