	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mode_legacy_fb_format      ## -- Begin function drm_mode_legacy_fb_format
	.p2align	4, 0x90
_drm_mode_legacy_fb_format:             ## @drm_mode_legacy_fb_format
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $edi killed $edi def $rdi
	addl	$-8, %edi
	roll	$29, %edi
	cmpl	$3, %edi
	ja	LBB0_10
## %bb.1:
	movq	_DRM_FORMAT_C8@GOTPCREL(%rip), %rax
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rdi,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_2:
	cmpl	$15, %esi
	jne	LBB0_3
## %bb.4:
	movq	_DRM_FORMAT_XRGB1555@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_5:
	movq	_DRM_FORMAT_RGB888@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_6:
	cmpl	$30, %esi
	jne	LBB0_7
## %bb.8:
	movq	_DRM_FORMAT_XRGB2101010@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_10:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_11
LBB0_3:
	movq	_DRM_FORMAT_RGB565@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_7:
	movq	_DRM_FORMAT_ARGB8888@GOTPCREL(%rip), %rax
LBB0_9:
	cmpl	$24, %esi
	jne	LBB0_12
LBB0_11:
	movq	_DRM_FORMAT_XRGB8888@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_2
	.long	L0_0_set_5
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.comm	_DRM_FORMAT_C8,4,2              ## @DRM_FORMAT_C8
	.comm	_DRM_FORMAT_XRGB1555,4,2        ## @DRM_FORMAT_XRGB1555
	.comm	_DRM_FORMAT_RGB565,4,2          ## @DRM_FORMAT_RGB565
	.comm	_DRM_FORMAT_RGB888,4,2          ## @DRM_FORMAT_RGB888
	.comm	_DRM_FORMAT_XRGB8888,4,2        ## @DRM_FORMAT_XRGB8888
	.comm	_DRM_FORMAT_XRGB2101010,4,2     ## @DRM_FORMAT_XRGB2101010
	.comm	_DRM_FORMAT_ARGB8888,4,2        ## @DRM_FORMAT_ARGB8888
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad bpp, assuming x8r8g8b8 pixel format\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mode_legacy_fb_format      ; -- Begin function drm_mode_legacy_fb_format
	.p2align	2
_drm_mode_legacy_fb_format:             ; @drm_mode_legacy_fb_format
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	sub	w8, w0, #8
	ror	w9, w8, #3
	cmp	w9, #3
	b.hi	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _DRM_FORMAT_C8@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_FORMAT_C8@GOTPAGEOFF]
Lloh2:
	adrp	x10, lJTI0_0@PAGE
Lloh3:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
Lloh4:
	adrp	x8, _DRM_FORMAT_RGB565@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DRM_FORMAT_RGB565@GOTPAGEOFF]
Lloh6:
	adrp	x9, _DRM_FORMAT_XRGB1555@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DRM_FORMAT_XRGB1555@GOTPAGEOFF]
	cmp	w1, #15
	b	LBB0_6
LBB0_3:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh10:
	adrp	x8, _DRM_FORMAT_XRGB8888@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DRM_FORMAT_XRGB8888@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh12:
	adrp	x8, _DRM_FORMAT_RGB888@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DRM_FORMAT_RGB888@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh14:
	adrp	x8, _DRM_FORMAT_ARGB8888@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DRM_FORMAT_ARGB8888@GOTPAGEOFF]
Lloh16:
	adrp	x9, _DRM_FORMAT_XRGB2101010@GOTPAGE
Lloh17:
	ldr	x9, [x9, _DRM_FORMAT_XRGB2101010@GOTPAGEOFF]
	cmp	w1, #30
	csel	x8, x9, x8, eq
Lloh18:
	adrp	x9, _DRM_FORMAT_XRGB8888@GOTPAGE
Lloh19:
	ldr	x9, [x9, _DRM_FORMAT_XRGB8888@GOTPAGEOFF]
	cmp	w1, #24
LBB0_6:
	csel	x8, x9, x8, eq
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
                                        ; -- End function
	.comm	_DRM_FORMAT_C8,4,2              ; @DRM_FORMAT_C8
	.comm	_DRM_FORMAT_XRGB1555,4,2        ; @DRM_FORMAT_XRGB1555
	.comm	_DRM_FORMAT_RGB565,4,2          ; @DRM_FORMAT_RGB565
	.comm	_DRM_FORMAT_RGB888,4,2          ; @DRM_FORMAT_RGB888
	.comm	_DRM_FORMAT_XRGB8888,4,2        ; @DRM_FORMAT_XRGB8888
	.comm	_DRM_FORMAT_XRGB2101010,4,2     ; @DRM_FORMAT_XRGB2101010
	.comm	_DRM_FORMAT_ARGB8888,4,2        ; @DRM_FORMAT_ARGB8888
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad bpp, assuming x8r8g8b8 pixel format\n"

.subsections_via_symbols
