	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gl_alloc_stencil_buffer        ## -- Begin function gl_alloc_stencil_buffer
	.p2align	4, 0x90
_gl_alloc_stencil_buffer:               ## @gl_alloc_stencil_buffer
	.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	%rdi, %r14
	movq	8(%rdi), %rax
	movl	(%rax), %ebx
	movl	4(%rax), %r15d
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_free
	movq	8(%r14), %rax
	movq	$0, 8(%rax)
LBB0_2:
	imull	%r15d, %ebx
	shll	$2, %ebx
	movl	%ebx, %edi
	callq	_malloc
	movq	8(%r14), %rcx
	movq	%rax, 8(%rcx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_GL_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	_GL_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gl_error                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_FALSE,4,2                   ## @GL_FALSE
	.comm	_GL_OUT_OF_MEMORY,4,2           ## @GL_OUT_OF_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gl_alloc_stencil_buffer"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gl_alloc_stencil_buffer        ; -- Begin function gl_alloc_stencil_buffer
	.p2align	2
_gl_alloc_stencil_buffer:               ; @gl_alloc_stencil_buffer
	.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, x0
	ldr	x8, [x0, #8]
	ldp	w20, w21, [x8]
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_free
	ldr	x8, [x19, #8]
	str	xzr, [x8, #8]
LBB0_2:
	mul	w8, w20, w21
	lsl	w0, w8, #2
	bl	_malloc
	ldr	x8, [x19, #8]
	str	x0, [x8, #8]
	cbz	x0, LBB0_4
; %bb.3:
	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_4:
Lloh0:
	adrp	x8, _GL_FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GL_FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh3:
	adrp	x8, _GL_OUT_OF_MEMORY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GL_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	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
	b	_gl_error
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_FALSE,4,2                   ; @GL_FALSE
	.comm	_GL_OUT_OF_MEMORY,4,2           ; @GL_OUT_OF_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gl_alloc_stencil_buffer"

.subsections_via_symbols
