	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _osd_set_palette_map
__osd_set_palette_map:                  ## @_osd_set_palette_map
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpl	$128, %r8d
	je	LBB0_5
## %bb.1:
	cmpl	$129, %r8d
	je	LBB0_9
## %bb.2:
	cmpl	$130, %r8d
	jne	LBB0_8
## %bb.3:
	andb	$1, %dl
	movzbl	%dl, %eax
	leaq	__osd_set_palette_map.map_1bpp(%rip), %rdx
	jmp	LBB0_4
LBB0_5:
	andb	$15, %dl
	movzbl	%dl, %edx
	cmpl	$132, %esi
	jne	LBB0_6
LBB0_10:
	movq	_OSD_W0BMP01@GOTPCREL(%rip), %rsi
	jmp	LBB0_11
LBB0_9:
	andb	$3, %dl
	movzbl	%dl, %eax
	leaq	__osd_set_palette_map.map_2bpp(%rip), %rdx
LBB0_4:
	movl	(%rdx,%rax,4), %edx
	cmpl	$132, %esi
	je	LBB0_10
LBB0_6:
	cmpl	$131, %esi
	jne	LBB0_8
## %bb.7:
	movq	_OSD_W1BMP01@GOTPCREL(%rip), %rsi
LBB0_11:
	leal	(%rdx,%rdx), %eax
	andl	$-4, %eax
	addl	(%rsi), %eax
	andl	$1, %edx
	leal	(,%rdx,8), %r8d
	testl	%edx, %edx
	movl	$255, %edx
	movl	$65280, %esi                    ## imm = 0xFF00
	cmovel	%edx, %esi
	movzbl	%cl, %edx
	movl	%r8d, %ecx
	shll	%cl, %edx
	movzbl	%dl, %edx
	movl	%eax, %ecx
	popq	%rbp
	jmp	_osd_modify                     ## TAILCALL
LBB0_8:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @_osd_set_palette_map.map_2bpp
__osd_set_palette_map.map_2bpp:
	.long	0                               ## 0x0
	.long	5                               ## 0x5
	.long	10                              ## 0xa
	.long	15                              ## 0xf

	.p2align	2                               ## @_osd_set_palette_map.map_1bpp
__osd_set_palette_map.map_1bpp:
	.long	0                               ## 0x0
	.long	15                              ## 0xf

	.comm	_OSD_W0BMP01,4,2                ## @OSD_W0BMP01
	.comm	_OSD_W1BMP01,4,2                ## @OSD_W1BMP01
	.no_dead_strip	__osd_set_palette_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _osd_set_palette_map
__osd_set_palette_map:                  ; @_osd_set_palette_map
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w2 killed $w2 def $x2
	cmp	w4, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w4, #129
	b.eq	LBB0_6
; %bb.2:
	cmp	w4, #130
	b.ne	LBB0_11
; %bb.3:
	and	x8, x2, #0x1
Lloh0:
	adrp	x9, __osd_set_palette_map.map_1bpp@PAGE
Lloh1:
	add	x9, x9, __osd_set_palette_map.map_1bpp@PAGEOFF
	b	LBB0_7
LBB0_4:
	and	w9, w2, #0xf
	cmp	w1, #132
	b.ne	LBB0_8
LBB0_5:
Lloh2:
	adrp	x8, _OSD_W0BMP01@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OSD_W0BMP01@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:
                                        ; kill: def $w2 killed $w2 killed $x2 def $x2
	and	x8, x2, #0x3
Lloh4:
	adrp	x9, __osd_set_palette_map.map_2bpp@PAGE
Lloh5:
	add	x9, x9, __osd_set_palette_map.map_2bpp@PAGEOFF
LBB0_7:
	ldr	w9, [x9, x8, lsl #2]
	cmp	w1, #132
	b.eq	LBB0_5
LBB0_8:
	cmp	w1, #131
	b.ne	LBB0_11
; %bb.9:
Lloh6:
	adrp	x8, _OSD_W1BMP01@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OSD_W1BMP01@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	lsl	w10, w9, #1
	and	w10, w10, #0xfffffffc
	add	w8, w8, w10
	ands	w9, w9, #0x1
	lsl	w9, w9, #3
	mov	w10, #65280
	mov	w11, #255
	csel	w1, w11, w10, eq
	lsl	w9, w3, w9
	and	w2, w9, #0xff
	mov	x3, x8
	b	_osd_modify
LBB0_11:
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @_osd_set_palette_map.map_2bpp
__osd_set_palette_map.map_2bpp:
	.long	0                               ; 0x0
	.long	5                               ; 0x5
	.long	10                              ; 0xa
	.long	15                              ; 0xf

	.p2align	2                               ; @_osd_set_palette_map.map_1bpp
__osd_set_palette_map.map_1bpp:
	.long	0                               ; 0x0
	.long	15                              ; 0xf

	.comm	_OSD_W0BMP01,4,2                ; @OSD_W0BMP01
	.comm	_OSD_W1BMP01,4,2                ; @OSD_W1BMP01
	.no_dead_strip	__osd_set_palette_map
.subsections_via_symbols
