	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function osd_init_layer
_osd_init_layer:                        ## @osd_init_layer
	.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	%esi, %r13d
	movq	%rdi, %r14
	movq	24(%rdi), %r12
	movl	%esi, %eax
	imulq	$88, %rax, %rbx
	leaq	(%r12,%rbx), %r15
	addq	$32, %r15
	callq	_spin_lock_irqsave
	movq	$0, 24(%r12,%rbx)
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	__osd_disable_layer
	movq	_ZOOM_X1@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rdx, 16(%r12,%rbx)
	movq	(%rax), %rcx
	movq	%rcx, 8(%r12,%rbx)
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	__osd_set_zoom
	movq	$0, (%r12,%rbx)
	movq	%r14, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	__osd_start_layer
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%r12,%rbx)
	movups	%xmm0, 56(%r12,%rbx)
	movups	%xmm0, 72(%r12,%rbx)
	leal	-128(%r13), %eax
	cmpl	$2, %eax
	jb	LBB0_6
## %bb.1:
	leal	-130(%r13), %eax
	cmpl	$1, %eax
	ja	LBB0_7
## %bb.2:
	movq	%r15, %rdx
	movq	_OSDWIN_OSD1@GOTPCREL(%rip), %rax
	cmpl	$131, %r13d
	jne	LBB0_4
## %bb.3:
	movq	_OSDWIN_OSD0@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r12d
	movq	16(%r14), %r15
	movq	_PIXFMT_8BPP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	__osd_set_layer_config
	movq	_RAM_CLUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rbx
	shlq	$4, %rbx
	movl	%edx, 12(%r15,%rbx)
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	__osd_set_osd_clut
	movl	$0, 8(%r15,%rbx)
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	__osd_disable_color_key
	movq	_OSD_8_VID_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, 4(%r15,%rbx)
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	__osd_set_blending_factor
	movl	$0, (%r15,%rbx)
	movq	%r14, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	__osd_set_rec601_attenuation
	movq	_OSDWIN_OSD1@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_7
## %bb.5:
	movl	$0, 12(%r14)
	movq	_BLINK_X1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	jmp	LBB0_7
LBB0_6:
	movl	4(%r14), %eax
	movl	%eax, (%r15)
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%r15, %rdx
	callq	__osd_set_layer_config
LBB0_7:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ZOOM_X1,8,3                    ## @ZOOM_X1
	.comm	_OSDWIN_OSD0,4,2                ## @OSDWIN_OSD0
	.comm	_OSDWIN_OSD1,4,2                ## @OSDWIN_OSD1
	.comm	_PIXFMT_8BPP,4,2                ## @PIXFMT_8BPP
	.comm	_RAM_CLUT,4,2                   ## @RAM_CLUT
	.comm	_OSD_8_VID_0,4,2                ## @OSD_8_VID_0
	.comm	_BLINK_X1,4,2                   ## @BLINK_X1
	.no_dead_strip	_osd_init_layer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function osd_init_layer
_osd_init_layer:                        ; @osd_init_layer
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #24]
	mov	w9, #88
	umaddl	x22, w1, w9, x8
	add	x21, x22, #32
	bl	_spin_lock_irqsave
	str	xzr, [x22, #24]
	mov	x0, x19
	mov	x1, x20
	bl	__osd_disable_layer
Lloh0:
	adrp	x8, _ZOOM_X1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ZOOM_X1@GOTPAGEOFF]
	ldr	x2, [x8]
	str	x2, [x22, #16]
	ldr	x3, [x8]
	str	x3, [x22, #8]
	mov	x0, x19
	mov	x1, x20
	bl	__osd_set_zoom
	str	xzr, [x22]
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	mov	w3, #0
	bl	__osd_start_layer
	movi.2d	v0, #0000000000000000
	stur	q0, [x22, #40]
	stur	q0, [x22, #56]
	stur	q0, [x22, #72]
	sub	w8, w20, #128
	cmp	w8, #2
	b.lo	LBB0_4
; %bb.1:
	sub	w8, w20, #130
	cmp	w8, #1
	b.hi	LBB0_5
; %bb.2:
Lloh2:
	adrp	x8, _OSDWIN_OSD0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OSDWIN_OSD0@GOTPAGEOFF]
Lloh4:
	adrp	x23, _OSDWIN_OSD1@GOTPAGE
Lloh5:
	ldr	x23, [x23, _OSDWIN_OSD1@GOTPAGEOFF]
	cmp	w20, #131
	csel	x8, x8, x23, eq
	ldr	w22, [x8]
	ldr	x24, [x19, #16]
Lloh6:
	adrp	x8, _PIXFMT_8BPP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PIXFMT_8BPP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x21]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	__osd_set_layer_config
Lloh9:
	adrp	x8, _RAM_CLUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RAM_CLUT@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x20, x24, x22, lsl #4
	str	w2, [x20, #12]
	mov	x0, x19
	mov	x1, x22
	bl	__osd_set_osd_clut
	str	wzr, [x20, #8]
	mov	x0, x19
	mov	x1, x22
	bl	__osd_disable_color_key
Lloh12:
	adrp	x8, _OSD_8_VID_0@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OSD_8_VID_0@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	str	w2, [x20, #4]
	mov	x0, x19
	mov	x1, x22
	bl	__osd_set_blending_factor
	str	wzr, [x20]
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	bl	__osd_set_rec601_attenuation
	ldr	w8, [x23]
	cmp	w22, w8
	b.ne	LBB0_5
; %bb.3:
Lloh15:
	adrp	x8, _BLINK_X1@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BLINK_X1@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	stp	w8, wzr, [x19, #8]
	b	LBB0_5
LBB0_4:
	ldr	w8, [x19, #4]
	str	w8, [x21]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	__osd_set_layer_config
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ZOOM_X1,8,3                    ; @ZOOM_X1
	.comm	_OSDWIN_OSD0,4,2                ; @OSDWIN_OSD0
	.comm	_OSDWIN_OSD1,4,2                ; @OSDWIN_OSD1
	.comm	_PIXFMT_8BPP,4,2                ; @PIXFMT_8BPP
	.comm	_RAM_CLUT,4,2                   ; @RAM_CLUT
	.comm	_OSD_8_VID_0,4,2                ; @OSD_8_VID_0
	.comm	_BLINK_X1,4,2                   ; @BLINK_X1
	.no_dead_strip	_osd_init_layer
.subsections_via_symbols
