	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function osd_set_layer_config
_osd_set_layer_config:                  ## @osd_set_layer_config
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	24(%rdi), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	8(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%r14, %rdx
	callq	_try_layer_config
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_37
## %bb.1:
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movl	%r15d, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rax,2), %rbx
	movq	(%r14), %rdi
	callq	_is_yc_pixfmt
	testq	%rax, %rax
	movq	%r14, %r8
	movl	%r15d, %r14d
	je	LBB0_3
## %bb.2:
	movq	(%r8), %rax
	movq	%rax, (%r13)
LBB0_3:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%rbx,8), %rax
	addq	$8, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_WIN_OSD1@GOTPCREL(%rip), %rbx
	cmpl	%r14d, (%rbx)
	movq	%r8, %r15
	jne	LBB0_8
## %bb.4:
	movq	(%r8), %rax
	movq	_PIXFMT_OSD_ATTR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rdx
	cmpq	%rcx, %rax
	jne	LBB0_6
## %bb.5:
	cmpq	%rax, %rdx
	jne	LBB0_7
	jmp	LBB0_8
LBB0_6:
	cmpq	%rcx, %rdx
	jne	LBB0_8
LBB0_7:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	$0, 16(%r12,%rax,8)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	__osd_disable_layer
	movq	%r15, %r8
LBB0_8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movq	%r8, %rdx
	callq	__osd_set_layer_config
	movq	%r15, %rsi
	cmpl	%r14d, (%rbx)
	jne	LBB0_17
## %bb.9:
	movq	(%rsi), %rax
	movq	_PIXFMT_OSD_ATTR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rdx
	cmpq	%rcx, %rax
	jne	LBB0_10
## %bb.15:
	cmpq	%rax, %rdx
	je	LBB0_17
## %bb.16:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	40(%rdi), %edx
	movl	44(%rdi), %esi
	callq	__osd_set_blink_attribute
	movq	%r15, %rsi
	jmp	LBB0_17
LBB0_10:
	cmpq	%rcx, %rdx
	jne	LBB0_17
## %bb.11:
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	32(%rbx), %r12
	movq	_OSDWIN_OSD1@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movq	%rsi, %r14
	shlq	$5, %r14
	movl	28(%r12,%r14), %edx
	movq	%rbx, %rdi
	callq	__osd_set_osd_clut
	movq	(%r13), %rsi
	movl	24(%r12,%r14), %edx
	movq	%rbx, %rdi
	callq	__osd_set_blending_factor
	cmpq	$0, 16(%r12,%r14)
	movq	(%r13), %rsi
	je	LBB0_13
## %bb.12:
	movl	12(%r12,%r14), %edx
	movq	(%r15), %rcx
	movq	%rbx, %rdi
	callq	__osd_enable_color_key
	jmp	LBB0_14
LBB0_13:
	movq	%rbx, %rdi
	callq	__osd_disable_color_key
LBB0_14:
	movq	_OSDWIN_OSD1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	8(%r12,%r14), %edx
	movq	%rbx, %rdi
	callq	__osd_set_rec601_attenuation
	movq	%r15, %rsi
	movl	-68(%rbp), %r14d                ## 4-byte Reload
LBB0_17:
	movq	(%rsi), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	(%rcx), %rax
	je	LBB0_30
## %bb.18:
	leaq	-128(%rax), %rcx
	cmpq	$2, %rcx
	ja	LBB0_30
## %bb.19:
	movq	_WIN_OSD0@GOTPCREL(%rip), %rdx
	cmpl	%r14d, (%rdx)
	jne	LBB0_20
## %bb.21:
	movq	_OSDWIN_OSD0@GOTPCREL(%rip), %rdx
	jmp	LBB0_22
LBB0_20:
	movq	_OSDWIN_OSD1@GOTPCREL(%rip), %rdx
LBB0_22:
	movq	(%rdx), %r13
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	32(%rdx), %rbx
	movl	%r13d, %edx
	cmpq	$2, %rcx
	ja	LBB0_23
## %bb.24:
	leaq	l_switch.table.osd_set_layer_config(%rip), %rcx
	movq	-1024(%rcx,%rax,8), %r14
	jmp	LBB0_25
LBB0_23:
	xorl	%r14d, %r14d
LBB0_25:
	shlq	$5, %rdx
	addq	%rdx, %rbx
	xorl	%r12d, %r12d
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_26 Depth=1
	incq	%r12
	cmpq	$16, %r12
	je	LBB0_29
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movb	%r12b, (%rax,%r12)
	cmpq	%r14, %r12
	jae	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	(%r15), %r8
	movzbl	%r12b, %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movl	%ecx, %edx
	callq	__osd_set_palette_map
	movq	%r15, %rsi
	jmp	LBB0_28
LBB0_29:
	movq	(%rsi), %rax
LBB0_30:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	24(%r15), %rax
	movq	_WIN_VID0@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	leaq	(%rsi,%rsi,2), %rdx
	movq	_PIXFMT_RGB888@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, 8(%rax,%rdx,8)
	je	LBB0_31
## %bb.32:
	movq	_WIN_VID1@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	leaq	(%rsi,%rsi,2), %rdx
	cmpq	%rcx, 8(%rax,%rdx,8)
	jne	LBB0_33
LBB0_31:
	movq	%r15, %rdi
	callq	__osd_enable_vid_rgb888
	jmp	LBB0_34
LBB0_33:
	movq	%r15, %rdi
	callq	__osd_disable_vid_rgb888
LBB0_34:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	xorl	%r12d, %r12d
	cmpq	%rax, (%r14)
	jne	LBB0_36
## %bb.35:
	movl	12(%r15), %esi
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rax,%rcx,8), %edx
	movq	%r15, %rdi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	__osd_dm6446_vid0_pingpong
	movl	%eax, 16(%r15)
LBB0_36:
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
LBB0_37:
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WIN_OSD1,4,2                   ## @WIN_OSD1
	.comm	_PIXFMT_OSD_ATTR,8,3            ## @PIXFMT_OSD_ATTR
	.comm	_OSDWIN_OSD1,8,3                ## @OSDWIN_OSD1
	.comm	_WIN_OSD0,4,2                   ## @WIN_OSD0
	.comm	_OSDWIN_OSD0,8,3                ## @OSDWIN_OSD0
	.comm	_WIN_VID0,8,3                   ## @WIN_VID0
	.comm	_PIXFMT_RGB888,8,3              ## @PIXFMT_RGB888
	.comm	_WIN_VID1,8,3                   ## @WIN_VID1
	.no_dead_strip	_osd_set_layer_config
	.section	__TEXT,__const
	.p2align	3                               ## @switch.table.osd_set_layer_config
l_switch.table.osd_set_layer_config:
	.quad	16                              ## 0x10
	.quad	4                               ## 0x4
	.quad	2                               ## 0x2

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function osd_set_layer_config
_osd_set_layer_config:                  ; @osd_set_layer_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	ldr	x25, [x0, #24]
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	bl	_try_layer_config
	mov	x21, x0
	cbnz	w0, LBB0_33
; %bb.1:
	mov	w26, w23
	mov	w8, #24
	umaddl	x21, w23, w8, x25
	ldr	x0, [x22]
	bl	_is_yc_pixfmt
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x22]
	str	x8, [x20]
LBB0_3:
	add	x21, x21, #8
Lloh0:
	adrp	x27, _WIN_OSD1@GOTPAGE
Lloh1:
	ldr	x27, [x27, _WIN_OSD1@GOTPAGEOFF]
	ldr	w8, [x27]
Lloh2:
	adrp	x24, _PIXFMT_OSD_ATTR@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PIXFMT_OSD_ATTR@GOTPAGEOFF]
	cmp	w8, w23
	b.ne	LBB0_8
; %bb.4:
	ldr	x8, [x22]
	ldr	x10, [x24]
	ldr	x9, [x21]
	cmp	x8, x10
	b.ne	LBB0_6
; %bb.5:
	cmp	x9, x8
	b.ne	LBB0_7
	b	LBB0_8
LBB0_6:
	cmp	x9, x10
	b.ne	LBB0_8
LBB0_7:
	mov	w8, #24
	madd	x8, x26, x8, x25
	str	xzr, [x8, #16]
	mov	x0, x20
	mov	x1, x23
	bl	__osd_disable_layer
LBB0_8:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	bl	__osd_set_layer_config
	ldr	w8, [x27]
Lloh4:
	adrp	x27, _OSDWIN_OSD1@GOTPAGE
Lloh5:
	ldr	x27, [x27, _OSDWIN_OSD1@GOTPAGEOFF]
	cmp	w8, w23
	b.ne	LBB0_17
; %bb.9:
	ldr	x8, [x22]
	ldr	x10, [x24]
	ldr	x9, [x21]
	cmp	x8, x10
	b.ne	LBB0_12
; %bb.10:
	cmp	x9, x8
	b.eq	LBB0_17
; %bb.11:
	ldp	w2, w1, [x20, #40]
	mov	x0, x20
	bl	__osd_set_blink_attribute
	b	LBB0_17
LBB0_12:
	cmp	x9, x10
	b.ne	LBB0_17
; %bb.13:
	ldr	x8, [x20, #32]
	ldr	x24, [x27]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	add	x28, x8, x24, lsl #5
	ldr	w2, [x28, #28]
	mov	x0, x20
	mov	x1, x24
	bl	__osd_set_osd_clut
	ldr	x1, [x27]
	ldr	w2, [x28, #24]
	mov	x0, x20
	bl	__osd_set_blending_factor
	ldr	x8, [x28, #16]
	ldr	x1, [x27]
	cbz	x8, LBB0_15
; %bb.14:
	ldr	w2, [x28, #12]
	ldr	x3, [x22]
	mov	x0, x20
	bl	__osd_enable_color_key
	b	LBB0_16
LBB0_15:
	mov	x0, x20
	bl	__osd_disable_color_key
LBB0_16:
	ldr	x1, [x27]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x8, x8, x24, lsl #5
	ldr	w2, [x8, #8]
	mov	x0, x20
	bl	__osd_set_rec601_attenuation
LBB0_17:
	ldr	x9, [x22]
	ldr	x10, [x21]
	sub	x8, x9, #128
	cmp	x9, x10
	ccmp	x8, #2, #2, ne
	b.hi	LBB0_26
; %bb.18:
Lloh6:
	adrp	x9, _WIN_OSD0@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WIN_OSD0@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _OSDWIN_OSD0@GOTPAGE
Lloh10:
	ldr	x10, [x10, _OSDWIN_OSD0@GOTPAGEOFF]
	cmp	w9, w23
	csel	x9, x10, x27, eq
	ldr	x23, [x9]
	ldr	x9, [x20, #32]
	and	x10, x23, #0xffffffff
	cmp	x8, #2
	b.hi	LBB0_20
; %bb.19:
Lloh11:
	adrp	x11, l_switch.table.osd_set_layer_config@PAGE
Lloh12:
	add	x11, x11, l_switch.table.osd_set_layer_config@PAGEOFF
	ldr	x24, [x11, x8, lsl #3]
	b	LBB0_21
LBB0_20:
	mov	x24, #0
LBB0_21:
	mov	x27, #0
	add	x28, x9, x10, lsl #5
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	add	x27, x27, #1
	cmp	x27, #16
	b.eq	LBB0_25
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x28]
	strb	w27, [x8, x27]
	cmp	x27, x24
	b.hs	LBB0_22
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	x4, [x22]
	and	w2, w27, #0xff
	mov	x0, x20
	mov	x1, x23
	mov	x3, x2
	bl	__osd_set_palette_map
	b	LBB0_22
LBB0_25:
	ldr	x9, [x22]
LBB0_26:
	str	x9, [x21]
	ldr	x8, [x20, #24]
Lloh13:
	adrp	x22, _WIN_VID0@GOTPAGE
Lloh14:
	ldr	x22, [x22, _WIN_VID0@GOTPAGEOFF]
	ldr	x1, [x22]
	mov	w9, #24
	madd	x9, x1, x9, x8
	ldr	x10, [x9, #8]
Lloh15:
	adrp	x9, _PIXFMT_RGB888@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PIXFMT_RGB888@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x10, x9
	b.eq	LBB0_28
; %bb.27:
Lloh18:
	adrp	x10, _WIN_VID1@GOTPAGE
Lloh19:
	ldr	x10, [x10, _WIN_VID1@GOTPAGEOFF]
Lloh20:
	ldr	x1, [x10]
	mov	w10, #24
	madd	x8, x1, x10, x8
	ldr	x8, [x8, #8]
	cmp	x8, x9
	b.ne	LBB0_29
LBB0_28:
	mov	x0, x20
	bl	__osd_enable_vid_rgb888
	b	LBB0_30
LBB0_29:
	mov	x0, x20
	bl	__osd_disable_vid_rgb888
LBB0_30:
	ldr	x8, [x22]
	cmp	x8, x26
	b.ne	LBB0_32
; %bb.31:
	ldr	w1, [x20, #12]
	mov	w8, #24
	mul	x8, x26, x8
	ldr	w2, [x25, x8]
	mov	x0, x20
	mov	x3, x21
	bl	__osd_dm6446_vid0_pingpong
	mov	w21, #0
	str	w0, [x20, #16]
	b	LBB0_33
LBB0_32:
	mov	w21, #0
LBB0_33:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_WIN_OSD1,4,2                   ; @WIN_OSD1
	.comm	_PIXFMT_OSD_ATTR,8,3            ; @PIXFMT_OSD_ATTR
	.comm	_OSDWIN_OSD1,8,3                ; @OSDWIN_OSD1
	.comm	_WIN_OSD0,4,2                   ; @WIN_OSD0
	.comm	_OSDWIN_OSD0,8,3                ; @OSDWIN_OSD0
	.comm	_WIN_VID0,8,3                   ; @WIN_VID0
	.comm	_PIXFMT_RGB888,8,3              ; @PIXFMT_RGB888
	.comm	_WIN_VID1,8,3                   ; @WIN_VID1
	.no_dead_strip	_osd_set_layer_config
	.section	__TEXT,__const
	.p2align	3                               ; @switch.table.osd_set_layer_config
l_switch.table.osd_set_layer_config:
	.quad	16                              ; 0x10
	.quad	4                               ; 0x4
	.quad	2                               ; 0x2

.subsections_via_symbols
