	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dds_bump_to_d3dformat
_dds_bump_to_d3dformat:                 ## @dds_bump_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
	movl	(%rdi), %esi
	cmpl	$16, %esi
	je	LBB0_4
## %bb.1:
	cmpl	$32, %esi
	jne	LBB0_2
## %bb.7:
	movl	4(%rdi), %edx
	cmpl	$65535, %edx                    ## imm = 0xFFFF
	jne	LBB0_3
## %bb.8:
	movl	$65535, %edx                    ## imm = 0xFFFF
	cmpl	$-65536, 8(%rdi)                ## imm = 0xFFFF0000
	jne	LBB0_3
## %bb.9:
	movq	_D3DFMT_V16U16@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_4:
	movl	4(%rdi), %edx
	cmpl	$255, %edx
	jne	LBB0_3
## %bb.5:
	movl	$255, %edx
	cmpl	$65280, 8(%rdi)                 ## imm = 0xFF00
	jne	LBB0_3
## %bb.6:
	movq	_D3DFMT_V8U8@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_2:
	movl	4(%rdi), %edx
LBB0_3:
	movl	16(%rdi), %r8d
	movl	8(%rdi), %ecx
	movl	12(%rdi), %r9d
	leaq	L_.str(%rip), %rdi
	callq	_WARN
	movq	_D3DFMT_UNKNOWN@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D3DFMT_V8U8,4,2                ## @D3DFMT_V8U8
	.comm	_D3DFMT_V16U16,4,2              ## @D3DFMT_V16U16
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown bump pixel format (%u, %#x, %#x, %#x, %#x)\n"

	.comm	_D3DFMT_UNKNOWN,4,2             ## @D3DFMT_UNKNOWN
	.no_dead_strip	_dds_bump_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_bump_to_d3dformat
_dds_bump_to_d3dformat:                 ; @dds_bump_to_d3dformat
	.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
	ldr	w1, [x0]
	cmp	w1, #16
	b.eq	LBB0_5
; %bb.1:
	cmp	w1, #32
	b.ne	LBB0_8
; %bb.2:
	ldr	w2, [x0, #4]
	mov	w8, #65535
	cmp	w2, w8
	b.ne	LBB0_11
; %bb.3:
	ldr	w8, [x0, #8]
	cmn	w8, #16, lsl #12                ; =65536
	b.ne	LBB0_9
; %bb.4:
Lloh0:
	adrp	x8, _D3DFMT_V16U16@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D3DFMT_V16U16@GOTPAGEOFF]
	b	LBB0_12
LBB0_5:
	ldr	w2, [x0, #4]
	cmp	w2, #255
	b.ne	LBB0_11
; %bb.6:
	ldr	w8, [x0, #8]
	mov	w9, #65280
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.7:
Lloh2:
	adrp	x8, _D3DFMT_V8U8@GOTPAGE
Lloh3:
	ldr	x8, [x8, _D3DFMT_V8U8@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
	ldr	w2, [x0, #4]
	b	LBB0_11
LBB0_9:
	mov	w2, #65535
	b	LBB0_11
LBB0_10:
	mov	w2, #255
LBB0_11:
	ldp	w5, w4, [x0, #12]
	ldr	w3, [x0, #8]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_WARN
Lloh6:
	adrp	x8, _D3DFMT_UNKNOWN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _D3DFMT_UNKNOWN@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_D3DFMT_V8U8,4,2                ; @D3DFMT_V8U8
	.comm	_D3DFMT_V16U16,4,2              ; @D3DFMT_V16U16
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown bump pixel format (%u, %#x, %#x, %#x, %#x)\n"

	.comm	_D3DFMT_UNKNOWN,4,2             ; @D3DFMT_UNKNOWN
	.no_dead_strip	_dds_bump_to_d3dformat
.subsections_via_symbols
