	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function register_for_arg
_register_for_arg:                      ## @register_for_arg
	.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
	movl	%r9d, %eax
	movq	%r8, %r14
	movq	%rcx, %r15
	movl	%edi, %ebx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	movq	_GL_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r15)
LBB0_2:
	movq	_ARG_UNUSED@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	jne	LBB0_5
## %bb.3:
	movl	$-1, %eax
	testq	%r14, %r14
	je	LBB0_24
## %bb.4:
	movq	_GL_NONE@GOTPCREL(%rip), %rcx
	jmp	LBB0_23
LBB0_5:
	movq	_WINED3DTA_SELECTMASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ebx, %ecx
	addl	$-128, %ecx
	cmpl	$6, %ecx
	ja	LBB0_8
## %bb.6:
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rcx,4), %rcx
	addq	%rsi, %rcx
	jmpq	*%rcx
LBB0_7:
	movq	_ATIFS_CONST_TFACTOR@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_8:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_FIXME
	movq	_GL_ZERO@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_9:
	movq	_GL_REG_0_ATI@GOTPCREL(%rip), %rax
	addl	(%rax), %edx
	movl	%edx, %eax
	jmp	LBB0_17
LBB0_10:
	movq	_GL_SECONDARY_INTERPOLATOR_ATI@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_12:
	testl	%edx, %edx
	jne	LBB0_15
LBB0_11:
	movq	_GL_PRIMARY_COLOR@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_14:
	movl	%edx, %edi
	callq	_ATIFS_CONST_STAGE
	jmp	LBB0_17
LBB0_15:
	movq	_GL_REG_0_ATI@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %eax
LBB0_17:
	testq	%r15, %r15
	je	LBB0_20
## %bb.18:
	movq	_WINED3DTA_COMPLEMENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ebx, %ecx
	je	LBB0_20
## %bb.19:
	movq	_GL_COMP_BIT_ATI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r15)
LBB0_20:
	movq	_WINED3DTA_ALPHAREPLICATE@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	jne	LBB0_22
## %bb.21:
	movq	_GL_NONE@GOTPCREL(%rip), %rcx
	testq	%r14, %r14
	jne	LBB0_23
	jmp	LBB0_24
LBB0_22:
	movq	_GL_ALPHA@GOTPCREL(%rip), %rcx
	testq	%r14, %r14
	je	LBB0_24
LBB0_23:
	movl	(%rcx), %ecx
	movl	%ecx, (%r14)
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_17
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_GL_NONE,4,2                    ## @GL_NONE
	.comm	_ARG_UNUSED,4,2                 ## @ARG_UNUSED
	.comm	_WINED3DTA_SELECTMASK,4,2       ## @WINED3DTA_SELECTMASK
	.comm	_GL_PRIMARY_COLOR,4,2           ## @GL_PRIMARY_COLOR
	.comm	_GL_REG_0_ATI,4,2               ## @GL_REG_0_ATI
	.comm	_ATIFS_CONST_TFACTOR,4,2        ## @ATIFS_CONST_TFACTOR
	.comm	_GL_SECONDARY_INTERPOLATOR_ATI,4,2 ## @GL_SECONDARY_INTERPOLATOR_ATI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown source argument %d\n"

	.comm	_GL_ZERO,4,2                    ## @GL_ZERO
	.comm	_WINED3DTA_COMPLEMENT,4,2       ## @WINED3DTA_COMPLEMENT
	.comm	_GL_COMP_BIT_ATI,4,2            ## @GL_COMP_BIT_ATI
	.comm	_WINED3DTA_ALPHAREPLICATE,4,2   ## @WINED3DTA_ALPHAREPLICATE
	.comm	_GL_ALPHA,4,2                   ## @GL_ALPHA
	.no_dead_strip	_register_for_arg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function register_for_arg
_register_for_arg:                      ; @register_for_arg
	.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, x4
	mov	x21, x3
	mov	x20, x0
Lloh0:
	adrp	x22, _GL_NONE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GL_NONE@GOTPAGEOFF]
	cbz	x3, LBB0_2
; %bb.1:
	ldr	w8, [x22]
	str	w8, [x21]
LBB0_2:
Lloh2:
	adrp	x8, _ARG_UNUSED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ARG_UNUSED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_5
; %bb.3:
	mov	w5, #-1
	cbz	x19, LBB0_19
; %bb.4:
Lloh5:
	adrp	x8, _GL_NONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GL_NONE@GOTPAGEOFF]
	b	LBB0_18
LBB0_5:
Lloh7:
	adrp	x8, _WINED3DTA_SELECTMASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WINED3DTA_SELECTMASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	and	w8, w8, w20
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_8
; %bb.6:
Lloh10:
	adrp	x9, lJTI0_0@PAGE
Lloh11:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_7:
Lloh12:
	adrp	x8, _ATIFS_CONST_TFACTOR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ATIFS_CONST_TFACTOR@GOTPAGEOFF]
	b	LBB0_13
LBB0_8:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_FIXME
Lloh16:
	adrp	x8, _GL_ZERO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GL_ZERO@GOTPAGEOFF]
	b	LBB0_13
LBB0_9:
Lloh18:
	adrp	x8, _GL_REG_0_ATI@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GL_REG_0_ATI@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	add	w5, w8, w2
	cbnz	x21, LBB0_15
	b	LBB0_17
LBB0_10:
Lloh21:
	adrp	x8, _GL_SECONDARY_INTERPOLATOR_ATI@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GL_SECONDARY_INTERPOLATOR_ATI@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
Lloh23:
	adrp	x8, _GL_PRIMARY_COLOR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _GL_PRIMARY_COLOR@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh25:
	adrp	x8, _GL_REG_0_ATI@GOTPAGE
Lloh26:
	ldr	x8, [x8, _GL_REG_0_ATI@GOTPAGEOFF]
Lloh27:
	adrp	x9, _GL_PRIMARY_COLOR@GOTPAGE
Lloh28:
	ldr	x9, [x9, _GL_PRIMARY_COLOR@GOTPAGEOFF]
	cmp	w2, #0
	csel	x8, x9, x8, eq
LBB0_13:
	ldr	w5, [x8]
LBB0_14:
	cbz	x21, LBB0_17
LBB0_15:
Lloh29:
	adrp	x8, _WINED3DTA_COMPLEMENT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _WINED3DTA_COMPLEMENT@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	and	w8, w8, w20
	cbz	w8, LBB0_17
; %bb.16:
Lloh32:
	adrp	x8, _GL_COMP_BIT_ATI@GOTPAGE
Lloh33:
	ldr	x8, [x8, _GL_COMP_BIT_ATI@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x21]
LBB0_17:
Lloh35:
	adrp	x8, _WINED3DTA_ALPHAREPLICATE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _WINED3DTA_ALPHAREPLICATE@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
Lloh38:
	adrp	x9, _GL_ALPHA@GOTPAGE
Lloh39:
	ldr	x9, [x9, _GL_ALPHA@GOTPAGEOFF]
	tst	w8, w20
	csel	x8, x22, x9, eq
	cbz	x19, LBB0_19
LBB0_18:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_19:
	mov	x0, x5
	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_20:
	mov	x0, x2
	bl	_ATIFS_CONST_STAGE
	mov	x5, x0
	cbnz	x21, LBB0_15
	b	LBB0_17
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_9-LBB0_7)>>2
	.byte	(LBB0_14-LBB0_7)>>2
	.byte	(LBB0_10-LBB0_7)>>2
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_20-LBB0_7)>>2
                                        ; -- End function
	.comm	_GL_NONE,4,2                    ; @GL_NONE
	.comm	_ARG_UNUSED,4,2                 ; @ARG_UNUSED
	.comm	_WINED3DTA_SELECTMASK,4,2       ; @WINED3DTA_SELECTMASK
	.comm	_GL_PRIMARY_COLOR,4,2           ; @GL_PRIMARY_COLOR
	.comm	_GL_REG_0_ATI,4,2               ; @GL_REG_0_ATI
	.comm	_ATIFS_CONST_TFACTOR,4,2        ; @ATIFS_CONST_TFACTOR
	.comm	_GL_SECONDARY_INTERPOLATOR_ATI,4,2 ; @GL_SECONDARY_INTERPOLATOR_ATI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown source argument %d\n"

	.comm	_GL_ZERO,4,2                    ; @GL_ZERO
	.comm	_WINED3DTA_COMPLEMENT,4,2       ; @WINED3DTA_COMPLEMENT
	.comm	_GL_COMP_BIT_ATI,4,2            ; @GL_COMP_BIT_ATI
	.comm	_WINED3DTA_ALPHAREPLICATE,4,2   ; @WINED3DTA_ALPHAREPLICATE
	.comm	_GL_ALPHA,4,2                   ; @GL_ALPHA
	.no_dead_strip	_register_for_arg
.subsections_via_symbols
