	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dds_fourcc_to_d3dformat
_dds_fourcc_to_d3dformat:               ## @dds_fourcc_to_d3dformat
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	_dds_fourcc_to_d3dformat.known_fourcc(%rip), %r14
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	xorl	%r12d, %r12d
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r15, (%rbx)
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	addq	$8, %rbx
	cmpq	%rax, %r12
	jb	LBB0_3
LBB0_4:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_WARN
	movq	_D3DFMT_UNKNOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
LBB0_5:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @dds_fourcc_to_d3dformat.known_fourcc
_dds_fourcc_to_d3dformat.known_fourcc:
	.quad	129                             ## 0x81
	.quad	128                             ## 0x80
	.quad	130                             ## 0x82
	.quad	133                             ## 0x85
	.quad	140                             ## 0x8c
	.quad	139                             ## 0x8b
	.quad	138                             ## 0x8a
	.quad	137                             ## 0x89
	.quad	136                             ## 0x88
	.quad	132                             ## 0x84
	.quad	135                             ## 0x87
	.quad	142                             ## 0x8e
	.quad	131                             ## 0x83
	.quad	134                             ## 0x86
	.quad	141                             ## 0x8d

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown FourCC %#x\n"

	.comm	_D3DFMT_UNKNOWN,8,3             ## @D3DFMT_UNKNOWN
	.no_dead_strip	_dds_fourcc_to_d3dformat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dds_fourcc_to_d3dformat
_dds_fourcc_to_d3dformat:               ; @dds_fourcc_to_d3dformat
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _dds_fourcc_to_d3dformat.known_fourcc@PAGE
Lloh1:
	add	x20, x20, _dds_fourcc_to_d3dformat.known_fourcc@PAGEOFF
	mov	x0, x20
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_4
; %bb.1:
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, x21, lsl #3]
	cmp	x8, x19
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #1
	mov	x0, x20
	bl	_ARRAY_SIZE
	cmp	x21, w0, uxtw
	b.lo	LBB0_2
LBB0_4:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_WARN
Lloh4:
	adrp	x8, _D3DFMT_UNKNOWN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _D3DFMT_UNKNOWN@GOTPAGEOFF]
Lloh6:
	ldr	x19, [x8]
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	3                               ; @dds_fourcc_to_d3dformat.known_fourcc
_dds_fourcc_to_d3dformat.known_fourcc:
	.quad	129                             ; 0x81
	.quad	128                             ; 0x80
	.quad	130                             ; 0x82
	.quad	133                             ; 0x85
	.quad	140                             ; 0x8c
	.quad	139                             ; 0x8b
	.quad	138                             ; 0x8a
	.quad	137                             ; 0x89
	.quad	136                             ; 0x88
	.quad	132                             ; 0x84
	.quad	135                             ; 0x87
	.quad	142                             ; 0x8e
	.quad	131                             ; 0x83
	.quad	134                             ; 0x86
	.quad	141                             ; 0x8d

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown FourCC %#x\n"

	.comm	_D3DFMT_UNKNOWN,8,3             ; @D3DFMT_UNKNOWN
	.no_dead_strip	_dds_fourcc_to_d3dformat
.subsections_via_symbols
