	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_hlcdc_plane_update_buffers
_atmel_hlcdc_plane_update_buffers:      ## @atmel_hlcdc_plane_update_buffers
	.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, %r13
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movq	40(%rsi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_ATMEL_HLCDC_LAYER_CHSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_atmel_hlcdc_layer_read_reg
	cmpl	$0, (%r13)
	jle	LBB0_9
## %bb.1:
	movl	%eax, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jge	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_drm_fb_cma_get_gem_obj
	movq	24(%r13), %rcx
	movq	32(%r13), %rdx
	movq	(%rdx,%rbx,8), %rdx
	addq	(%rax), %rdx
	movq	(%rcx,%rbx,8), %rax
	movq	%rdx, 16(%rax)
	movl	%ebx, %edi
	callq	_ATMEL_HLCDC_LAYER_PLANE_HEAD
	movq	24(%r13), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	(%rcx), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_atmel_hlcdc_layer_write_reg
	movq	_ATMEL_HLCDC_LAYER_EN@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_ATMEL_HLCDC_LAYER_PLANE_ADDR
	movq	24(%r13), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	16(%rcx), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_atmel_hlcdc_layer_write_reg
	movl	%ebx, %edi
	callq	_ATMEL_HLCDC_LAYER_PLANE_CTRL
	movq	24(%r13), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	8(%rcx), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_atmel_hlcdc_layer_write_reg
	movl	%ebx, %edi
	callq	_ATMEL_HLCDC_LAYER_PLANE_NEXT
	movq	24(%r13), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	(%rcx), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_atmel_hlcdc_layer_write_reg
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r13), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r14, %rdi
	callq	_atmel_hlcdc_layer_write_cfg
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r14, %rdi
	callq	_atmel_hlcdc_layer_write_cfg
	jmp	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATMEL_HLCDC_LAYER_CHSR,4,2     ## @ATMEL_HLCDC_LAYER_CHSR
	.comm	_ATMEL_HLCDC_LAYER_EN,4,2       ## @ATMEL_HLCDC_LAYER_EN
	.no_dead_strip	_atmel_hlcdc_plane_update_buffers
.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_update_buffers
_atmel_hlcdc_plane_update_buffers:      ; @atmel_hlcdc_plane_update_buffers
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	ldr	x24, [x0]
	ldr	x21, [x1, #40]
Lloh0:
	adrp	x8, _ATMEL_HLCDC_LAYER_CHSR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATMEL_HLCDC_LAYER_CHSR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_atmel_hlcdc_layer_read_reg
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x22, x0
	mov	x23, #0
Lloh3:
	adrp	x25, _ATMEL_HLCDC_LAYER_EN@GOTPAGE
Lloh4:
	ldr	x25, [x25, _ATMEL_HLCDC_LAYER_EN@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x19]
	cmp	x23, x8
	b.ge	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x23
	bl	_drm_fb_cma_get_gem_obj
	ldr	x8, [x0]
	lsl	x26, x23, #3
	ldp	x10, x9, [x19, #24]
	ldr	x9, [x9, x26]
	add	x8, x9, x8
	ldr	x9, [x10, x26]
	str	x8, [x9, #16]
	mov	x0, x23
	bl	_ATMEL_HLCDC_LAYER_PLANE_HEAD
	mov	x1, x0
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x26]
	ldr	x2, [x8]
	mov	x0, x20
	bl	_atmel_hlcdc_layer_write_reg
	ldr	w8, [x25]
	tst	w8, w22
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_ATMEL_HLCDC_LAYER_PLANE_ADDR
	mov	x1, x0
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x26]
	ldr	x2, [x8, #16]
	mov	x0, x20
	bl	_atmel_hlcdc_layer_write_reg
	mov	x0, x23
	bl	_ATMEL_HLCDC_LAYER_PLANE_CTRL
	mov	x1, x0
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x26]
	ldr	x2, [x8, #8]
	mov	x0, x20
	bl	_atmel_hlcdc_layer_write_reg
	mov	x0, x23
	bl	_ATMEL_HLCDC_LAYER_PLANE_NEXT
	mov	x1, x0
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x26]
	ldr	x2, [x8]
	mov	x0, x20
	bl	_atmel_hlcdc_layer_write_reg
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24, #8]
	ldr	x1, [x8, x23, lsl #3]
	cbz	x1, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #16]
	ldr	w2, [x8, x23, lsl #2]
	mov	x0, x20
	bl	_atmel_hlcdc_layer_write_cfg
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24]
	ldr	x1, [x8, x23, lsl #3]
	cbz	x1, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	ldr	w2, [x8, x23, lsl #2]
	mov	x0, x20
	bl	_atmel_hlcdc_layer_write_cfg
	b	LBB0_2
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ATMEL_HLCDC_LAYER_CHSR,4,2     ; @ATMEL_HLCDC_LAYER_CHSR
	.comm	_ATMEL_HLCDC_LAYER_EN,4,2       ; @ATMEL_HLCDC_LAYER_EN
	.no_dead_strip	_atmel_hlcdc_plane_update_buffers
.subsections_via_symbols
