	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function map_register
_map_register:                          ## @map_register
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$128, 8(%rdi)
	jne	LBB0_4
## %bb.1:
	movq	%rsi, %r14
	movl	8(%rsi), %eax
	movq	_WINED3DSPR_OUTPUT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.2:
	movq	%rdi, %rbx
	movq	(%r14), %rax
	movl	(%rax), %r15d
	movq	(%rdi), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r15d
	jae	LBB0_5
## %bb.3:
	movq	_WINED3DSPR_COLOROUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	(%rbx), %rax
	movl	(%rax,%r15,4), %eax
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3DSPR_OUTPUT,4,2          ## @WINED3DSPR_OUTPUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid output index %u.\n"

	.comm	_WINED3DSPR_COLOROUT,4,2        ## @WINED3DSPR_COLOROUT
	.no_dead_strip	_map_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function map_register
_map_register:                          ; @map_register
	.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
	ldr	w8, [x0, #8]
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x1
	ldr	w8, [x1, #8]
Lloh0:
	adrp	x9, _WINED3DSPR_OUTPUT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WINED3DSPR_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.2:
	mov	x20, x0
	ldr	x8, [x19]
	ldr	w21, [x8]
	ldr	x0, [x0]
	bl	_ARRAY_SIZE
	cmp	w21, w0
	b.hs	LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _WINED3DSPR_COLOROUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WINED3DSPR_COLOROUT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	ldr	x8, [x20]
	ldr	w8, [x8, x21, lsl #2]
	ldr	x9, [x19]
	str	w8, [x9]
LBB0_4:
	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
LBB0_5:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	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
	b	_ERR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3DSPR_OUTPUT,4,2          ; @WINED3DSPR_OUTPUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid output index %u.\n"

	.comm	_WINED3DSPR_COLOROUT,4,2        ; @WINED3DSPR_COLOROUT
	.no_dead_strip	_map_register
.subsections_via_symbols
