	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_glsl_swizzle_to_str
_shader_glsl_swizzle_to_str:            ## @shader_glsl_swizzle_to_str
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movl	%edx, %r15d
	movl	%edi, %r14d
	testq	%rsi, %rsi
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %r12
	cmoveq	%rax, %r12
	movb	$46, (%rcx)
	movq	_WINED3DSP_WRITEMASK_0@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%edx, %eax
	je	LBB0_1
## %bb.2:
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_shader_glsl_swizzle_get_component
	movb	(%r12,%rax), %al
	movb	%al, 1(%rbx)
	addq	$2, %rbx
	movl	(%r13), %eax
	jmp	LBB0_3
LBB0_1:
	incq	%rbx
LBB0_3:
	leal	(%rax,%rax), %ecx
	testl	%r15d, %ecx
	je	LBB0_5
## %bb.4:
	movl	%r14d, %edi
	movl	$1, %esi
	callq	_shader_glsl_swizzle_get_component
	movb	(%r12,%rax), %al
	movb	%al, (%rbx)
	incq	%rbx
	movl	(%r13), %eax
LBB0_5:
	leal	(,%rax,4), %ecx
	testl	%r15d, %ecx
	je	LBB0_7
## %bb.6:
	movl	%r14d, %edi
	movl	$2, %esi
	callq	_shader_glsl_swizzle_get_component
	movb	(%r12,%rax), %al
	movb	%al, (%rbx)
	incq	%rbx
	movl	(%r13), %eax
LBB0_7:
	shll	$3, %eax
	testl	%r15d, %eax
	je	LBB0_9
## %bb.8:
	movl	%r14d, %edi
	movl	$3, %esi
	callq	_shader_glsl_swizzle_get_component
	movb	(%r12,%rax), %al
	movb	%al, (%rbx)
	incq	%rbx
LBB0_9:
	movb	$0, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"zyxw"

L_.str.1:                               ## @.str.1
	.asciz	"xyzw"

	.comm	_WINED3DSP_WRITEMASK_0,4,2      ## @WINED3DSP_WRITEMASK_0
	.no_dead_strip	_shader_glsl_swizzle_to_str
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shader_glsl_swizzle_to_str
_shader_glsl_swizzle_to_str:            ; @shader_glsl_swizzle_to_str
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
Lloh2:
	adrp	x9, l_.str.1@PAGE
Lloh3:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x1, #0
	csel	x22, x9, x8, eq
	mov	w8, #46
	mov	x23, x3
	strb	w8, [x23], #1
Lloh4:
	adrp	x24, _WINED3DSP_WRITEMASK_0@GOTPAGE
Lloh5:
	ldr	x24, [x24, _WINED3DSP_WRITEMASK_0@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w2
	b.eq	LBB0_2
; %bb.1:
	mov	x21, x3
	mov	x0, x19
	mov	w1, #0
	bl	_shader_glsl_swizzle_get_component
	ldrb	w8, [x22, x0]
	add	x23, x21, #2
	strb	w8, [x21, #1]
	ldr	w8, [x24]
LBB0_2:
	tst	w20, w8, lsl #1
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #1
	bl	_shader_glsl_swizzle_get_component
	ldrb	w8, [x22, x0]
	strb	w8, [x23], #1
	ldr	w8, [x24]
LBB0_4:
	tst	w20, w8, lsl #2
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	mov	w1, #2
	bl	_shader_glsl_swizzle_get_component
	ldrb	w8, [x22, x0]
	strb	w8, [x23], #1
	ldr	w8, [x24]
LBB0_6:
	tst	w20, w8, lsl #3
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #3
	bl	_shader_glsl_swizzle_get_component
	ldrb	w8, [x22, x0]
	strb	w8, [x23], #1
LBB0_8:
	strb	wzr, [x23]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"zyxw"

l_.str.1:                               ; @.str.1
	.asciz	"xyzw"

	.comm	_WINED3DSP_WRITEMASK_0,4,2      ; @WINED3DSP_WRITEMASK_0
	.no_dead_strip	_shader_glsl_swizzle_to_str
.subsections_via_symbols
