	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zx_plane_init                  ## -- Begin function zx_plane_init
	.p2align	4, 0x90
_zx_plane_init:                         ## @zx_plane_init
	.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
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	(%rsi), %r14
	movq	%rsi, %rdi
	callq	_zx_plane_hbsc_init
	cmpl	$128, %r15d
	je	LBB0_1
## %bb.2:
	cmpl	$129, %r15d
	jne	LBB0_8
## %bb.3:
	movq	_zx_vl_plane_helper_funcs@GOTPCREL(%rip), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_vl_formats@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movq	_zx_gl_plane_helper_funcs@GOTPCREL(%rip), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_gl_formats@GOTPCREL(%rip), %rax
LBB0_4:
	addq	$8, %r12
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movq	_VOU_CRTC_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	subq	$8, %rsp
	movq	_zx_plane_funcs@GOTPCREL(%rip), %rcx
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%rbx, %r8
	movl	%eax, %r9d
	pushq	$0
	pushq	%r15
	pushq	$0
	callq	_drm_universal_plane_init
	addq	$32, %rsp
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	jmp	LBB0_7
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_6:
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_drm_plane_helper_add
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_zx_gl_plane_helper_funcs,4,2   ## @zx_gl_plane_helper_funcs
	.comm	_gl_formats,8,3                 ## @gl_formats
	.comm	_zx_vl_plane_helper_funcs,4,2   ## @zx_vl_plane_helper_funcs
	.comm	_vl_formats,8,3                 ## @vl_formats
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_VOU_CRTC_MASK,4,2              ## @VOU_CRTC_MASK
	.comm	_zx_plane_funcs,4,2             ## @zx_plane_funcs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to init universal plane: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zx_plane_init                  ; -- Begin function zx_plane_init
	.p2align	2
_zx_plane_init:                         ; @zx_plane_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x2
	mov	x23, x0
	mov	x20, x1
	ldr	x19, [x20], #8
	mov	x0, x1
	bl	_zx_plane_hbsc_init
	cmp	w21, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w21, #129
	b.ne	LBB0_6
; %bb.2:
Lloh0:
	adrp	x22, _zx_vl_plane_helper_funcs@GOTPAGE
Lloh1:
	ldr	x22, [x22, _zx_vl_plane_helper_funcs@GOTPAGEOFF]
Lloh2:
	adrp	x8, _vl_formats@GOTPAGE
Lloh3:
	ldr	x8, [x8, _vl_formats@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh4:
	adrp	x22, _zx_gl_plane_helper_funcs@GOTPAGE
Lloh5:
	ldr	x22, [x22, _zx_gl_plane_helper_funcs@GOTPAGEOFF]
Lloh6:
	adrp	x8, _gl_formats@GOTPAGE
Lloh7:
	ldr	x8, [x8, _gl_formats@GOTPAGEOFF]
LBB0_4:
	ldr	x24, [x8]
	mov	x0, x24
	bl	_ARRAY_SIZE
	mov	x5, x0
Lloh8:
	adrp	x8, _VOU_CRTC_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VOU_CRTC_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	str	xzr, [sp]
Lloh11:
	adrp	x3, _zx_plane_funcs@GOTPAGE
Lloh12:
	ldr	x3, [x3, _zx_plane_funcs@GOTPAGEOFF]
	mov	x0, x23
	mov	x1, x20
	mov	x4, x24
	mov	x6, #0
	mov	x7, x21
	bl	_drm_universal_plane_init
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.5:
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_DRM_DEV_ERROR
	b	LBB0_8
LBB0_6:
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_7:
	mov	x0, x20
	mov	x1, x22
	bl	_drm_plane_helper_add
LBB0_8:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_zx_gl_plane_helper_funcs,4,2   ; @zx_gl_plane_helper_funcs
	.comm	_gl_formats,8,3                 ; @gl_formats
	.comm	_zx_vl_plane_helper_funcs,4,2   ; @zx_vl_plane_helper_funcs
	.comm	_vl_formats,8,3                 ; @vl_formats
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_VOU_CRTC_MASK,4,2              ; @VOU_CRTC_MASK
	.comm	_zx_plane_funcs,4,2             ; @zx_plane_funcs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to init universal plane: %d\n"

.subsections_via_symbols
