	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function R_SaveDDS
LCPI0_0:
	.long	32                              ## 0x20
	.long	255                             ## 0xff
	.long	65280                           ## 0xff00
	.long	16711680                        ## 0xff0000
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_R_SaveDDS
	.p2align	4, 0x90
_R_SaveDDS:                             ## @R_SaveDDS
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r14d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	testl	%r8d, %r8d
	movl	$1, %r12d
	cmovnel	%r8d, %r12d
	movl	%edx, %eax
	imull	%ecx, %eax
	imull	%r12d, %eax
	leal	56(,%rax,4), %edi
	movl	%eax, %r13d
	shll	$2, %r13d
	movq	_ri@GOTPCREL(%rip), %rax
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	callq	*(%rax)
	movq	%rax, %rbx
	movl	$542327876, (%rax)              ## imm = 0x20534444
	leaq	4(%rax), %rdi
	xorl	%esi, %esi
	movl	$52, %edx
	callq	_memset
	movl	$124, 4(%rbx)
	movq	__DDSFLAGS_REQUIRED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movl	%r15d, 8(%rbx)
	movl	%r14d, 12(%rbx)
	movl	$32, 16(%rbx)
	movq	_DDSCAPS_COMPLEX@GOTPCREL(%rip), %rax
	movq	_DDSCAPS_REQUIRED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 20(%rbx)
	cmpl	$6, %r12d
	jne	LBB0_2
## %bb.1:
	movq	_DDSCAPS2_CUBEMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
LBB0_2:
	movq	_DDSPF_RGB@GOTPCREL(%rip), %rax
	movq	_DDSPF_ALPHAPIXELS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 24(%rbx)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [32,255,65280,16711680]
	movups	%xmm0, 28(%rbx)
	movl	$-16777216, 44(%rbx)            ## imm = 0xFF000000
	movq	%rbx, %rdi
	addq	$56, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_Com_Memcpy
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	_ri@GOTPCREL(%rip), %r14
	callq	*16(%r14)
	movq	%rbx, %rdi
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*8(%rax)                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ri,24,3                        ## @ri
	.comm	__DDSFLAGS_REQUIRED,4,2         ## @_DDSFLAGS_REQUIRED
	.comm	_DDSCAPS_COMPLEX,4,2            ## @DDSCAPS_COMPLEX
	.comm	_DDSCAPS_REQUIRED,4,2           ## @DDSCAPS_REQUIRED
	.comm	_DDSCAPS2_CUBEMAP,4,2           ## @DDSCAPS2_CUBEMAP
	.comm	_DDSPF_RGB,4,2                  ## @DDSPF_RGB
	.comm	_DDSPF_ALPHAPIXELS,4,2          ## @DDSPF_ALPHAPIXELS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function R_SaveDDS
lCPI0_0:
	.long	32                              ; 0x20
	.long	255                             ; 0xff
	.long	65280                           ; 0xff00
	.long	16711680                        ; 0xff0000
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_R_SaveDDS
	.p2align	2
_R_SaveDDS:                             ; @R_SaveDDS
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x24, x3
	mov	x25, x2
	mov	x21, x1
	mov	x19, x0
	cmp	w4, #0
	csinc	w27, w4, wzr, ne
	mul	w8, w2, w3
	mul	w8, w8, w27
	lsl	w23, w8, #2
	add	w20, w23, #56
Lloh0:
	adrp	x26, _ri@GOTPAGE
Lloh1:
	ldr	x26, [x26, _ri@GOTPAGEOFF]
	ldr	x8, [x26]
	mov	x0, x20
	blr	x8
	mov	x22, x0
	mov	w8, #17476
	movk	w8, #8275, lsl #16
	str	w8, [x0], #4
	mov	w1, #0
	mov	w2, #52
	bl	_memset
Lloh2:
	adrp	x8, __DDSFLAGS_REQUIRED@GOTPAGE
Lloh3:
	ldr	x8, [x8, __DDSFLAGS_REQUIRED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x22, #52]
	mov	w8, #124
	stp	w8, w24, [x22, #4]
	mov	w8, #32
	stp	w25, w8, [x22, #12]
Lloh5:
	adrp	x8, _DDSCAPS_COMPLEX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DDSCAPS_COMPLEX@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _DDSCAPS_REQUIRED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DDSCAPS_REQUIRED@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x22, #20]
	cmp	w27, #6
	b.ne	LBB0_2
; %bb.1:
Lloh11:
	adrp	x8, _DDSCAPS2_CUBEMAP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DDSCAPS2_CUBEMAP@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x22, #48]
LBB0_2:
Lloh14:
	adrp	x8, _DDSPF_RGB@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DDSPF_RGB@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _DDSPF_ALPHAPIXELS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DDSPF_ALPHAPIXELS@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x22, #24]
Lloh20:
	adrp	x8, lCPI0_0@PAGE
Lloh21:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	stur	q0, [x22, #28]
	mov	w8, #-16777216
	str	w8, [x22, #44]
	add	x0, x22, #56
	mov	x1, x21
	mov	x2, x23
	bl	_Com_Memcpy
	ldr	x8, [x26, #16]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	blr	x8
	ldr	x1, [x26, #8]
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	br	x1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdr	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ri,24,3                        ; @ri
	.comm	__DDSFLAGS_REQUIRED,4,2         ; @_DDSFLAGS_REQUIRED
	.comm	_DDSCAPS_COMPLEX,4,2            ; @DDSCAPS_COMPLEX
	.comm	_DDSCAPS_REQUIRED,4,2           ; @DDSCAPS_REQUIRED
	.comm	_DDSCAPS2_CUBEMAP,4,2           ; @DDSCAPS2_CUBEMAP
	.comm	_DDSPF_RGB,4,2                  ; @DDSPF_RGB
	.comm	_DDSPF_ALPHAPIXELS,4,2          ; @DDSPF_ALPHAPIXELS
.subsections_via_symbols
