	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_record_shader_phase
_shader_record_shader_phase:            ## @shader_record_shader_phase
	.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
	movq	%rcx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r8, 8(%rax)
	movq	$0, (%r15)
LBB0_2:
	movq	48(%rbx), %rsi
	movq	_WINED3D_SHADER_TYPE_HULL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_10
## %bb.3:
	movl	(%rdx), %edi
	cmpl	$128, %edi
	je	LBB0_12
## %bb.4:
	cmpl	$129, %edi
	je	LBB0_14
## %bb.5:
	cmpl	$130, %edi
	jne	LBB0_18
## %bb.6:
	cmpq	$0, 40(%rbx)
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	callq	_FIXME
	movq	40(%rbx), %rdi
	callq	_heap_free
LBB0_8:
	movl	$16, %edi
	callq	_heap_alloc_zero
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	jne	LBB0_16
	jmp	LBB0_9
LBB0_10:
	leaq	L_.str(%rip), %rdi
LBB0_11:
	callq	_ERR
	movq	_E_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_12:
	leaq	8(%rbx), %rdi
	leaq	16(%rbx), %rsi
	movl	(%rbx), %edx
	incl	%edx
	movl	$16, %ecx
	callq	_wined3d_array_reserve
	testl	%eax, %eax
	je	LBB0_9
## %bb.13:
	movslq	(%rbx), %rax
	leal	1(%rax), %ecx
	movl	%ecx, (%rbx)
	shlq	$4, %rax
	addq	8(%rbx), %rax
	jmp	LBB0_16
LBB0_14:
	leaq	24(%rbx), %rdi
	leaq	32(%rbx), %rsi
	movl	20(%rbx), %edx
	incl	%edx
	movl	$16, %ecx
	callq	_wined3d_array_reserve
	testl	%eax, %eax
	je	LBB0_9
## %bb.15:
	movslq	20(%rbx), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 20(%rbx)
	shlq	$4, %rax
	addq	24(%rbx), %rax
LBB0_16:
	movq	%r14, (%rax)
	movq	%rax, (%r15)
	movq	_WINED3D_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_9:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	_debug_d3dshaderinstructionhandler
	leaq	L_.str.2(%rip), %rdi
	movq	%rax, %rsi
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_SHADER_TYPE_HULL,8,3   ## @WINED3D_SHADER_TYPE_HULL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unexpected shader type %#x.\n"

	.comm	_E_FAIL,4,2                     ## @E_FAIL
L_.str.1:                               ## @.str.1
	.asciz	"Multiple control point phases.\n"

	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
L_.str.2:                               ## @.str.2
	.asciz	"Unexpected opcode %s.\n"

	.comm	_WINED3D_OK,4,2                 ## @WINED3D_OK
	.no_dead_strip	_shader_record_shader_phase
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shader_record_shader_phase
_shader_record_shader_phase:            ; @shader_record_shader_phase
	.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, x3
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x1]
	cbz	x8, LBB0_2
; %bb.1:
	str	x4, [x8, #8]
	str	xzr, [x20]
LBB0_2:
	ldr	x1, [x21, #48]
Lloh0:
	adrp	x8, _WINED3D_SHADER_TYPE_HULL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3D_SHADER_TYPE_HULL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_9
; %bb.3:
	ldr	w0, [x2]
	cmp	w0, #128
	b.eq	LBB0_11
; %bb.4:
	cmp	w0, #129
	b.eq	LBB0_13
; %bb.5:
	cmp	w0, #130
	b.ne	LBB0_19
; %bb.6:
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_8
; %bb.7:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
	ldr	x0, [x21, #40]
	bl	_heap_free
LBB0_8:
	mov	w0, #16
	bl	_heap_alloc_zero
	str	x0, [x21, #40]
	cbnz	x0, LBB0_16
	b	LBB0_17
LBB0_9:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
LBB0_10:
	bl	_ERR
Lloh7:
	adrp	x8, _E_FAIL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _E_FAIL@GOTPAGEOFF]
	b	LBB0_18
LBB0_11:
	add	x0, x21, #8
	mov	x1, x21
	ldr	w8, [x1], #16
	add	w2, w8, #1
	mov	w3, #16
	bl	_wined3d_array_reserve
	cbz	w0, LBB0_17
; %bb.12:
	ldr	x8, [x21, #8]
	ldrsw	x9, [x21]
	add	w10, w9, #1
	str	w10, [x21]
	b	LBB0_15
LBB0_13:
	add	x0, x21, #24
	add	x1, x21, #32
	ldr	w8, [x21, #20]
	add	w2, w8, #1
	mov	w3, #16
	bl	_wined3d_array_reserve
	cbz	w0, LBB0_17
; %bb.14:
	ldr	x8, [x21, #24]
	ldrsw	x9, [x21, #20]
	add	w10, w9, #1
	str	w10, [x21, #20]
LBB0_15:
	add	x0, x8, x9, lsl #4
LBB0_16:
	str	x19, [x0]
	str	x0, [x20]
Lloh9:
	adrp	x8, _WINED3D_OK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WINED3D_OK@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh11:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x8]
	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_19:
	bl	_debug_d3dshaderinstructionhandler
	mov	x1, x0
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_SHADER_TYPE_HULL,8,3   ; @WINED3D_SHADER_TYPE_HULL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unexpected shader type %#x.\n"

	.comm	_E_FAIL,4,2                     ; @E_FAIL
l_.str.1:                               ; @.str.1
	.asciz	"Multiple control point phases.\n"

	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
l_.str.2:                               ; @.str.2
	.asciz	"Unexpected opcode %s.\n"

	.comm	_WINED3D_OK,4,2                 ; @WINED3D_OK
	.no_dead_strip	_shader_record_shader_phase
.subsections_via_symbols
