	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function append_const_set
_append_const_set:                      ## @append_const_set
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %ecx
	movl	4(%rdi), %r15d
	cmpl	%r15d, %ecx
	jge	LBB0_2
## %bb.1:
	movq	8(%rbx), %rax
	jmp	LBB0_8
LBB0_2:
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.5:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	8(%rbx), %rdx
	leal	(,%r15,8), %ecx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapReAlloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	addl	%r15d, %r15d
	jmp	LBB0_7
LBB0_3:
	movq	_INITIAL_CONST_SET_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_GetProcessHeap
	leal	(,%r15,4), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_4
LBB0_7:
	movq	%rax, 8(%rbx)
	movl	%r15d, 4(%rbx)
	movl	(%rbx), %ecx
LBB0_8:
	leal	1(%rcx), %edx
	movl	%edx, (%rbx)
	movslq	%ecx, %rcx
	movl	(%r14), %edx
	movl	%edx, (%rax,%rcx,4)
	movq	_D3D_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_ERR
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INITIAL_CONST_SET_SIZE,4,2     ## @INITIAL_CONST_SET_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of memory.\n"

	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
	.comm	_D3D_OK,4,2                     ## @D3D_OK
	.no_dead_strip	_append_const_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function append_const_set
_append_const_set:                      ; @append_const_set
	.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, x1
	mov	x20, x0
	ldp	w8, w21, [x0]
	cmp	w8, w21
	b.ge	LBB0_2
; %bb.1:
	ldr	x0, [x20, #8]
	b	LBB0_7
LBB0_2:
	cbz	w21, LBB0_5
; %bb.3:
	bl	_GetProcessHeap
	ldr	x2, [x20, #8]
	lsl	w3, w21, #3
	mov	w1, #0
	bl	_HeapReAlloc
	cbz	x0, LBB0_8
; %bb.4:
	lsl	w21, w21, #1
	b	LBB0_6
LBB0_5:
Lloh0:
	adrp	x8, _INITIAL_CONST_SET_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INITIAL_CONST_SET_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_GetProcessHeap
	lsl	w2, w21, #2
	mov	w1, #0
	bl	_HeapAlloc
	cbz	x0, LBB0_8
LBB0_6:
	str	x0, [x20, #8]
	str	w21, [x20, #4]
	ldr	w8, [x20]
LBB0_7:
	add	w9, w8, #1
	str	w9, [x20]
	ldr	w9, [x19]
	str	w9, [x0, w8, sxtw #2]
Lloh3:
	adrp	x8, _D3D_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D3D_OK@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
Lloh7:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_INITIAL_CONST_SET_SIZE,4,2     ; @INITIAL_CONST_SET_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of memory.\n"

	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
	.comm	_D3D_OK,4,2                     ; @D3D_OK
	.no_dead_strip	_append_const_set
.subsections_via_symbols
