	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gm12u320_fb_mark_dirty
_gm12u320_fb_mark_dirty:                ## @gm12u320_fb_mark_dirty
	.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	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r13
	leaq	4(%r13), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	40(%r13), %r12
	cmpq	%rbx, %r12
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_drm_framebuffer_get
	movq	%rbx, 40(%r13)
	movups	(%r15), %xmm0
	movups	16(%r15), %xmm1
	movups	%xmm0, 8(%r13)
	movups	%xmm1, 24(%r13)
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r13, %rdi
	callq	_wake_up
	testq	%r12, %r12
	je	LBB0_2
## %bb.4:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_framebuffer_put            ## TAILCALL
LBB0_3:
	movq	32(%r13), %rdi
	movq	24(%r15), %rsi
	callq	_min
	movq	%rax, 32(%r13)
	movq	24(%r13), %rdi
	movq	16(%r15), %rsi
	callq	_min
	movq	%rax, 24(%r13)
	movq	16(%r13), %rdi
	movq	8(%r15), %rsi
	callq	_max
	movq	%rax, 16(%r13)
	movq	8(%r13), %rdi
	movq	(%r15), %rsi
	callq	_max
	movq	%rax, 8(%r13)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_gm12u320_fb_mark_dirty
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gm12u320_fb_mark_dirty
_gm12u320_fb_mark_dirty:                ; @gm12u320_fb_mark_dirty
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x23, x0
	ldr	x8, [x0]
	ldr	x19, [x8]
	add	x20, x19, #4
	mov	x0, x20
	bl	_mutex_lock
	ldr	x22, [x19, #40]
	cmp	x22, x23
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x23
	bl	_drm_framebuffer_get
	str	x23, [x19, #40]
	ldp	q1, q0, [x21]
	stur	q1, [x19, #8]
	stur	q0, [x19, #24]
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	bl	_wake_up
	cbz	x22, LBB0_4
; %bb.2:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_drm_framebuffer_put
LBB0_3:
	ldr	x0, [x19, #32]
	ldr	x1, [x21, #24]
	bl	_min
	str	x0, [x19, #32]
	ldr	x0, [x19, #24]
	ldr	x1, [x21, #16]
	bl	_min
	str	x0, [x19, #24]
	ldr	x0, [x19, #16]
	ldr	x1, [x21, #8]
	bl	_max
	str	x0, [x19, #16]
	ldr	x0, [x19, #8]
	ldr	x1, [x21]
	bl	_max
	str	x0, [x19, #8]
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_mutex_unlock
LBB0_4:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_gm12u320_fb_mark_dirty
.subsections_via_symbols
