	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_sm4_read_reg_idx
_shader_sm4_read_reg_idx:               ## @shader_sm4_read_reg_idx
	.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	%r8, %r13
	movq	%rsi, %r14
	movq	_WINED3D_SM4_ADDRESSING_RELATIVE@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.1:
	movl	%ecx, %ebx
	movq	%rdx, %r15
	movq	%rdi, %r12
	callq	_get_src_param
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	_WINED3D_SM4_ADDRESSING_OFFSET@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_3
## %bb.4:
	movq	(%r14), %rcx
	leaq	4(%rcx), %rdx
	movq	%rdx, (%r14)
	movslq	(%rcx), %rcx
	jmp	LBB0_5
LBB0_7:
	movq	$0, 8(%r13)
	movq	(%r14), %rax
	leaq	4(%rax), %rcx
	movq	%rcx, (%r14)
	movslq	(%rax), %rax
	movq	%rax, (%r13)
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_ERR
	movq	_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_3:
	xorl	%ecx, %ecx
LBB0_5:
	movq	%rcx, (%r13)
	movq	_WINED3D_DATA_INT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movq	%rax, %r8
	callq	_shader_sm4_read_src_param
LBB0_8:
	movq	_TRUE@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_SM4_ADDRESSING_RELATIVE,4,2 ## @WINED3D_SM4_ADDRESSING_RELATIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get src param for relative addressing.\n"

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_WINED3D_SM4_ADDRESSING_OFFSET,4,2 ## @WINED3D_SM4_ADDRESSING_OFFSET
	.comm	_WINED3D_DATA_INT,4,2           ## @WINED3D_DATA_INT
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_shader_sm4_read_reg_idx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shader_sm4_read_reg_idx
_shader_sm4_read_reg_idx:               ; @shader_sm4_read_reg_idx
	.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, x4
	mov	x19, x1
Lloh0:
	adrp	x8, _WINED3D_SM4_ADDRESSING_RELATIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3D_SM4_ADDRESSING_RELATIVE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w3
	b.eq	LBB0_4
; %bb.1:
	mov	x23, x3
	mov	x21, x2
	mov	x22, x0
	bl	_get_src_param
	str	x0, [x20, #8]
	cbz	x0, LBB0_5
; %bb.2:
	mov	x4, x0
Lloh3:
	adrp	x8, _WINED3D_SM4_ADDRESSING_OFFSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WINED3D_SM4_ADDRESSING_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_6
; %bb.3:
	ldr	x9, [x19]
	ldrsw	x8, [x9], #4
	str	x9, [x19]
	b	LBB0_7
LBB0_4:
	str	xzr, [x20, #8]
	ldr	x8, [x19]
	ldrsw	x9, [x8], #4
	str	x8, [x19]
	str	x9, [x20]
	b	LBB0_8
LBB0_5:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
Lloh8:
	adrp	x8, _FALSE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	mov	x8, #0
LBB0_7:
	str	x8, [x20]
Lloh10:
	adrp	x8, _WINED3D_DATA_INT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WINED3D_DATA_INT@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	bl	_shader_sm4_read_src_param
LBB0_8:
Lloh13:
	adrp	x8, _TRUE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_SM4_ADDRESSING_RELATIVE,4,2 ; @WINED3D_SM4_ADDRESSING_RELATIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get src param for relative addressing.\n"

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_WINED3D_SM4_ADDRESSING_OFFSET,4,2 ; @WINED3D_SM4_ADDRESSING_OFFSET
	.comm	_WINED3D_DATA_INT,4,2           ; @WINED3D_DATA_INT
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_shader_sm4_read_reg_idx
.subsections_via_symbols
