	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_hlcdc_plane_atomic_update
_atmel_hlcdc_plane_atomic_update:       ## @atmel_hlcdc_plane_atomic_update
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_drm_plane_to_atmel_hlcdc_plane
	movq	%rax, %r14
	movq	(%rbx), %rdi
	callq	_drm_plane_state_to_atmel_hlcdc_plane_state
	movq	%rax, %r12
	movq	(%rbx), %rax
	cmpl	$0, 4(%rax)
	je	LBB0_6
## %bb.1:
	cmpl	$0, (%rax)
	je	LBB0_6
## %bb.2:
	cmpl	$0, (%r12)
	je	LBB0_7
## %bb.3:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_atmel_hlcdc_plane_update_pos_and_size
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_atmel_hlcdc_plane_update_general_settings
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_atmel_hlcdc_plane_update_format
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_atmel_hlcdc_plane_update_clut
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_atmel_hlcdc_plane_update_buffers
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_atmel_hlcdc_plane_update_disc_area
	movq	_ATMEL_HLCDC_LAYER_IER@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%edi, %edi
	callq	_ATMEL_HLCDC_LAYER_OVR_IRQ
	movl	%eax, %ebx
	movl	$1, %edi
	callq	_ATMEL_HLCDC_LAYER_OVR_IRQ
	orl	%eax, %ebx
	movl	$2, %edi
	callq	_ATMEL_HLCDC_LAYER_OVR_IRQ
	orl	%eax, %ebx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_atmel_hlcdc_layer_write_reg
	movq	_ATMEL_HLCDC_LAYER_CHSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_atmel_hlcdc_layer_read_reg
	movq	_ATMEL_HLCDC_LAYER_CHER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_ATMEL_HLCDC_LAYER_UPDATE@GOTPCREL(%rip), %rcx
	movq	_ATMEL_HLCDC_LAYER_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%eax, %edx
	je	LBB0_5
## %bb.4:
	movq	_ATMEL_HLCDC_LAYER_A2Q@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_5:
	orl	(%rcx), %edx
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atmel_hlcdc_layer_write_reg    ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atmel_hlcdc_plane_atomic_disable ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATMEL_HLCDC_LAYER_IER,4,2      ## @ATMEL_HLCDC_LAYER_IER
	.comm	_ATMEL_HLCDC_LAYER_CHSR,4,2     ## @ATMEL_HLCDC_LAYER_CHSR
	.comm	_ATMEL_HLCDC_LAYER_CHER,4,2     ## @ATMEL_HLCDC_LAYER_CHER
	.comm	_ATMEL_HLCDC_LAYER_UPDATE,4,2   ## @ATMEL_HLCDC_LAYER_UPDATE
	.comm	_ATMEL_HLCDC_LAYER_EN,4,2       ## @ATMEL_HLCDC_LAYER_EN
	.comm	_ATMEL_HLCDC_LAYER_A2Q,4,2      ## @ATMEL_HLCDC_LAYER_A2Q
	.no_dead_strip	_atmel_hlcdc_plane_atomic_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_hlcdc_plane_atomic_update
_atmel_hlcdc_plane_atomic_update:       ; @atmel_hlcdc_plane_atomic_update
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x1
	mov	x22, x0
	bl	_drm_plane_to_atmel_hlcdc_plane
	mov	x19, x0
	ldr	x0, [x22]
	bl	_drm_plane_state_to_atmel_hlcdc_plane_state
	ldr	x8, [x22]
	ldr	w9, [x8, #4]
	cbz	w9, LBB0_4
; %bb.1:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.2:
	mov	x20, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_atmel_hlcdc_plane_update_pos_and_size
	mov	x0, x19
	mov	x1, x20
	bl	_atmel_hlcdc_plane_update_general_settings
	mov	x0, x19
	mov	x1, x20
	bl	_atmel_hlcdc_plane_update_format
	mov	x0, x19
	mov	x1, x20
	bl	_atmel_hlcdc_plane_update_clut
	mov	x0, x19
	mov	x1, x20
	bl	_atmel_hlcdc_plane_update_buffers
	mov	x0, x19
	mov	x1, x20
	bl	_atmel_hlcdc_plane_update_disc_area
Lloh0:
	adrp	x8, _ATMEL_HLCDC_LAYER_IER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATMEL_HLCDC_LAYER_IER@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	w0, #0
	bl	_ATMEL_HLCDC_LAYER_OVR_IRQ
	mov	x21, x0
	mov	w0, #1
	bl	_ATMEL_HLCDC_LAYER_OVR_IRQ
	orr	w21, w0, w21
	mov	w0, #2
	bl	_ATMEL_HLCDC_LAYER_OVR_IRQ
	orr	w2, w21, w0
	mov	x0, x19
	mov	x1, x20
	bl	_atmel_hlcdc_layer_write_reg
Lloh3:
	adrp	x8, _ATMEL_HLCDC_LAYER_CHSR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATMEL_HLCDC_LAYER_CHSR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_atmel_hlcdc_layer_read_reg
Lloh6:
	adrp	x8, _ATMEL_HLCDC_LAYER_CHER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATMEL_HLCDC_LAYER_CHER@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _ATMEL_HLCDC_LAYER_UPDATE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATMEL_HLCDC_LAYER_UPDATE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _ATMEL_HLCDC_LAYER_EN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ATMEL_HLCDC_LAYER_EN@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _ATMEL_HLCDC_LAYER_A2Q@GOTPAGE
Lloh16:
	ldr	x10, [x10, _ATMEL_HLCDC_LAYER_A2Q@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	tst	w9, w0
	csel	w9, w9, w10, eq
	orr	w2, w9, w8
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_atmel_hlcdc_layer_write_reg
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x22
	mov	x1, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_atmel_hlcdc_plane_atomic_disable
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ATMEL_HLCDC_LAYER_IER,4,2      ; @ATMEL_HLCDC_LAYER_IER
	.comm	_ATMEL_HLCDC_LAYER_CHSR,4,2     ; @ATMEL_HLCDC_LAYER_CHSR
	.comm	_ATMEL_HLCDC_LAYER_CHER,4,2     ; @ATMEL_HLCDC_LAYER_CHER
	.comm	_ATMEL_HLCDC_LAYER_UPDATE,4,2   ; @ATMEL_HLCDC_LAYER_UPDATE
	.comm	_ATMEL_HLCDC_LAYER_EN,4,2       ; @ATMEL_HLCDC_LAYER_EN
	.comm	_ATMEL_HLCDC_LAYER_A2Q,4,2      ; @ATMEL_HLCDC_LAYER_A2Q
	.no_dead_strip	_atmel_hlcdc_plane_atomic_update
.subsections_via_symbols
