	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_glsl_alloc
_shader_glsl_alloc:                     ## @shader_glsl_alloc
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_WINED3D_MAX_VS_CONSTS_F@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_WINED3D_MAX_PS_CONSTS_F@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_max
	movl	%eax, %edi
	callq	_wined3d_log2i
	movq	%rax, %r12
	movq	32(%r14), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	$56, %edi
	callq	_heap_alloc_zero
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %r15
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	%rax, %r13
	leaq	52(%rax), %rdi
	callq	_string_buffer_list_init
	movq	_glsl_shader_backend@GOTPCREL(%rip), %rdi
	movq	%r13, %rsi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	callq	*8(%rbx)
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rax, %rbx
	movq	_glsl_shader_backend@GOTPCREL(%rip), %rdi
	movq	%r13, %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	callq	*16(%rax)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	12(%r13), %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_string_buffer_init
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	incq	%r12
	movq	%r12, %rdi
	movl	$56, %esi
	callq	_heap_calloc
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	leaq	24(%r13), %rdi
	movq	_WINED3D_MAX_VS_CONSTS_F@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_constant_heap_init
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	leaq	28(%r13), %rdi
	movq	_WINED3D_MAX_PS_CONSTS_F@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_constant_heap_init
	testl	%eax, %eax
	je	LBB0_13
## %bb.16:
	movq	%r13, %rdi
	addq	$48, %rdi
	movq	_glsl_program_key_compare@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_wine_rb_init
	movl	$1, (%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 40(%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%r13)
	leaq	-64(%rbp), %rsi
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	*8(%rax)
	movq	_WINED3D_FRAGMENT_CAP_PROJ_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-64(%rbp), %eax
	movl	%eax, 4(%r13)
	movq	24(%r14), %rax
	movq	_WINED3D_LEGACY_FFP_LIGHTING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	movl	%ecx, 8(%r13)
	movq	%rbx, 16(%r14)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r14)
	movq	%r13, (%r14)
	movq	_WINED3D_OK@GOTPCREL(%rip), %r15
	jmp	LBB0_15
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_ERR
	jmp	LBB0_3
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	movq	%r14, %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
LBB0_3:
	movq	%r13, %rdi
	callq	_heap_free
	movq	_E_FAIL@GOTPCREL(%rip), %r15
	jmp	LBB0_15
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_14
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_14
LBB0_11:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str.5(%rip), %rdi
LBB0_14:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	callq	_ERR
	leaq	28(%r13), %rdi
	callq	_constant_heap_free
	movq	%r13, %rdi
	addq	$24, %rdi
	callq	_constant_heap_free
	movq	16(%r13), %rdi
	callq	_heap_free
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_string_buffer_free
	movq	%r14, %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
	movq	%r14, %rdi
	callq	*(%rbx)
	movq	%r13, %rdi
	callq	_heap_free
LBB0_15:
	movl	(%r15), %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_MAX_VS_CONSTS_F,4,2    ## @WINED3D_MAX_VS_CONSTS_F
	.comm	_WINED3D_MAX_PS_CONSTS_F,4,2    ## @WINED3D_MAX_PS_CONSTS_F
	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
	.comm	_glsl_shader_backend,4,2        ## @glsl_shader_backend
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to initialize vertex pipe.\n"

	.comm	_E_FAIL,4,2                     ## @E_FAIL
L_.str.1:                               ## @.str.1
	.asciz	"Failed to initialize fragment pipe.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to initialize shader buffer.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to allocate memory.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to initialize vertex shader constant heap\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to initialize pixel shader constant heap\n"

	.comm	_glsl_program_key_compare,4,2   ## @glsl_program_key_compare
	.comm	_WINED3D_FRAGMENT_CAP_PROJ_CONTROL,4,2 ## @WINED3D_FRAGMENT_CAP_PROJ_CONTROL
	.comm	_WINED3D_LEGACY_FFP_LIGHTING,4,2 ## @WINED3D_LEGACY_FFP_LIGHTING
	.comm	_WINED3D_OK,4,2                 ## @WINED3D_OK
	.no_dead_strip	_shader_glsl_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shader_glsl_alloc
_shader_glsl_alloc:                     ; @shader_glsl_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x25, _WINED3D_MAX_VS_CONSTS_F@GOTPAGE
Lloh1:
	ldr	x25, [x25, _WINED3D_MAX_VS_CONSTS_F@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh2:
	adrp	x28, _WINED3D_MAX_PS_CONSTS_F@GOTPAGE
Lloh3:
	ldr	x28, [x28, _WINED3D_MAX_PS_CONSTS_F@GOTPAGEOFF]
	ldr	w1, [x28]
	bl	_max
	bl	_wined3d_log2i
	mov	x27, x0
	ldr	x23, [x19, #32]
	mov	w0, #56
	bl	_heap_alloc_zero
	cbz	x0, LBB0_16
; %bb.1:
	mov	x20, x0
	add	x0, x0, #52
	bl	_string_buffer_list_init
	ldr	x8, [x21, #8]
Lloh4:
	adrp	x0, _glsl_shader_backend@GOTPAGE
Lloh5:
	ldr	x0, [x0, _glsl_shader_backend@GOTPAGEOFF]
	mov	x1, x20
	blr	x8
	cbz	x0, LBB0_8
; %bb.2:
	mov	x24, x0
	ldr	x8, [x22, #16]
Lloh6:
	adrp	x0, _glsl_shader_backend@GOTPAGE
Lloh7:
	ldr	x0, [x0, _glsl_shader_backend@GOTPAGEOFF]
	mov	x1, x20
	blr	x8
	cbz	x0, LBB0_9
; %bb.3:
	mov	x26, x0
	add	x0, x20, #12
	str	x0, [sp]                        ; 8-byte Folded Spill
	bl	_string_buffer_init
	cbz	w0, LBB0_11
; %bb.4:
	add	x0, x27, #1
	mov	w1, #56
	bl	_heap_calloc
	str	x0, [x20, #16]
	cbz	x0, LBB0_12
; %bb.5:
	add	x0, x20, #24
	ldr	w1, [x25]
	bl	_constant_heap_init
	cbz	w0, LBB0_13
; %bb.6:
	add	x0, x20, #28
	ldr	w1, [x28]
	bl	_constant_heap_init
	cbz	w0, LBB0_14
; %bb.7:
	add	x0, x20, #48
Lloh8:
	adrp	x8, _glsl_program_key_compare@GOTPAGE
Lloh9:
	ldr	x8, [x8, _glsl_program_key_compare@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_wine_rb_init
	mov	w8, #1
	str	w8, [x20]
	stp	x22, x21, [x20, #32]
	ldr	x8, [x22, #8]
	add	x1, sp, #8
	mov	x0, x23
	blr	x8
	ldr	w8, [sp, #8]
Lloh11:
	adrp	x9, _WINED3D_FRAGMENT_CAP_PROJ_CONTROL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _WINED3D_FRAGMENT_CAP_PROJ_CONTROL@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	and	w8, w9, w8
	ldr	x9, [x19, #24]
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _WINED3D_LEGACY_FFP_LIGHTING@GOTPAGE
Lloh15:
	ldr	x10, [x10, _WINED3D_LEGACY_FFP_LIGHTING@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	and	w9, w10, w9
	stp	w8, w9, [x20, #4]
	stp	x26, x24, [x19, #8]
	str	x20, [x19]
Lloh17:
	adrp	x8, _WINED3D_OK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WINED3D_OK@GOTPAGEOFF]
	b	LBB0_17
LBB0_8:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
	b	LBB0_10
LBB0_9:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	ldr	x8, [x21]
	mov	x0, x19
	blr	x8
LBB0_10:
	mov	x0, x20
	bl	_heap_free
Lloh23:
	adrp	x8, _E_FAIL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _E_FAIL@GOTPAGEOFF]
	b	LBB0_17
LBB0_11:
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_12:
Lloh27:
	adrp	x0, l_.str.3@PAGE
Lloh28:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_13:
Lloh29:
	adrp	x0, l_.str.4@PAGE
Lloh30:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh31:
	adrp	x0, l_.str.5@PAGE
Lloh32:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_15:
	ldr	x23, [sp]                       ; 8-byte Folded Reload
	bl	_ERR
	add	x0, x20, #28
	bl	_constant_heap_free
	add	x0, x20, #24
	bl	_constant_heap_free
	ldr	x0, [x20, #16]
	bl	_heap_free
	mov	x0, x23
	bl	_string_buffer_free
	ldr	x8, [x22]
	mov	x0, x19
	blr	x8
	ldr	x8, [x21]
	mov	x0, x19
	blr	x8
	mov	x0, x20
	bl	_heap_free
LBB0_16:
Lloh33:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh34:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_MAX_VS_CONSTS_F,4,2    ; @WINED3D_MAX_VS_CONSTS_F
	.comm	_WINED3D_MAX_PS_CONSTS_F,4,2    ; @WINED3D_MAX_PS_CONSTS_F
	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
	.comm	_glsl_shader_backend,4,2        ; @glsl_shader_backend
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to initialize vertex pipe.\n"

	.comm	_E_FAIL,4,2                     ; @E_FAIL
l_.str.1:                               ; @.str.1
	.asciz	"Failed to initialize fragment pipe.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to initialize shader buffer.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to allocate memory.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to initialize vertex shader constant heap\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to initialize pixel shader constant heap\n"

	.comm	_glsl_program_key_compare,4,2   ; @glsl_program_key_compare
	.comm	_WINED3D_FRAGMENT_CAP_PROJ_CONTROL,4,2 ; @WINED3D_FRAGMENT_CAP_PROJ_CONTROL
	.comm	_WINED3D_LEGACY_FFP_LIGHTING,4,2 ; @WINED3D_LEGACY_FFP_LIGHTING
	.comm	_WINED3D_OK,4,2                 ; @WINED3D_OK
	.no_dead_strip	_shader_glsl_alloc
.subsections_via_symbols
