	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_hlcdc_plane_reset
_atmel_hlcdc_plane_reset:               ## @atmel_hlcdc_plane_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	callq	_drm_plane_state_to_atmel_hlcdc_plane_state
	movq	%rax, %rbx
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_drm_framebuffer_put
LBB0_3:
	movq	%rbx, %rdi
	callq	_kfree
	movq	$0, 8(%r14)
LBB0_4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_atmel_hlcdc_plane_alloc_dscrs
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%rbx, %rdi
	callq	_kfree
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	___drm_atomic_helper_plane_reset ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate initial plane state\n"

	.no_dead_strip	_atmel_hlcdc_plane_reset
.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_reset
_atmel_hlcdc_plane_reset:               ; @atmel_hlcdc_plane_reset
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_4
; %bb.1:
	bl	_drm_plane_state_to_atmel_hlcdc_plane_state
	mov	x20, x0
	ldr	x0, [x0]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_drm_framebuffer_put
LBB0_3:
	mov	x0, x20
	bl	_kfree
	str	xzr, [x19, #8]
LBB0_4:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.5:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_atmel_hlcdc_plane_alloc_dscrs
	cbz	x0, LBB0_8
; %bb.6:
	mov	x0, x20
	bl	_kfree
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_err
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	___drm_atomic_helper_plane_reset
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate initial plane state\n"

	.no_dead_strip	_atmel_hlcdc_plane_reset
.subsections_via_symbols
