	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zx_overlay_init
_zx_overlay_init:                       ## @zx_overlay_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_VL_NUM@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jl	LBB0_6
## %bb.1:
	movq	%rsi, %r15
	movq	16(%rsi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$1, %ebx
	movl	$4, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	_VL_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$4, %r14
	cmpq	%rax, %rbx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r13
	movq	8(%r15), %r12
	movl	%ebx, %edi
	callq	_OSD_VL_OFFSET
	addq	%r12, %rax
	movq	%rax, 24(%r13)
	movq	8(%r15), %r12
	movl	%ebx, %edi
	callq	_HBSC_VL_OFFSET
	addq	%r12, %rax
	movq	%rax, 16(%r13)
	movq	(%r15), %r12
	movl	%ebx, %edi
	callq	_RSZ_VL_OFFSET
	addq	%r12, %rax
	movq	%rax, 8(%r13)
	movq	_zx_vl_bits@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r14, %rax
	movq	%rax, (%r13)
	movq	_DRM_PLANE_TYPE_OVERLAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_zx_plane_init
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_DRM_DEV_ERROR
	jmp	LBB0_5
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEV_ERROR                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VL_NUM,4,2                     ## @VL_NUM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate zplane %d\n"

	.comm	_zx_vl_bits,8,3                 ## @zx_vl_bits
	.comm	_DRM_PLANE_TYPE_OVERLAY,4,2     ## @DRM_PLANE_TYPE_OVERLAY
L_.str.1:                               ## @.str.1
	.asciz	"failed to init overlay %d\n"

	.no_dead_strip	_zx_overlay_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zx_overlay_init
_zx_overlay_init:                       ; @zx_overlay_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x25, _VL_NUM@GOTPAGE
Lloh1:
	ldr	x25, [x25, _VL_NUM@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #2
	b.lt	LBB0_6
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x1, #16]
	mov	w22, #1
	mov	w26, #4
Lloh2:
	adrp	x27, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x27, [x27, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	adrp	x23, _DRM_PLANE_TYPE_OVERLAY@GOTPAGE
Lloh5:
	ldr	x23, [x23, _DRM_PLANE_TYPE_OVERLAY@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x25]
	add	x26, x26, #4
	cmp	x22, x8
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x27]
	mov	x0, x21
	mov	w1, #32
	bl	_devm_kzalloc
	cbz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x24, x0
	ldr	x28, [x19, #8]
	mov	x0, x22
	bl	_OSD_VL_OFFSET
	add	x8, x0, x28
	str	x8, [x24, #24]
	ldr	x28, [x19, #8]
	mov	x0, x22
	bl	_HBSC_VL_OFFSET
	add	x8, x0, x28
	str	x8, [x24, #16]
	ldr	x28, [x19]
	mov	x0, x22
	bl	_RSZ_VL_OFFSET
	add	x8, x0, x28
Lloh6:
	adrp	x9, _zx_vl_bits@GOTPAGE
Lloh7:
	ldr	x9, [x9, _zx_vl_bits@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x9, x9, x26
	stp	x9, x8, [x24]
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x24
	bl	_zx_plane_init
	cbz	w0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_DRM_DEV_ERROR
	b	LBB0_2
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_DRM_DEV_ERROR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_VL_NUM,4,2                     ; @VL_NUM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate zplane %d\n"

	.comm	_zx_vl_bits,8,3                 ; @zx_vl_bits
	.comm	_DRM_PLANE_TYPE_OVERLAY,4,2     ; @DRM_PLANE_TYPE_OVERLAY
l_.str.1:                               ; @.str.1
	.asciz	"failed to init overlay %d\n"

	.no_dead_strip	_zx_overlay_init
.subsections_via_symbols
