	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_articulation
_load_articulation:                     ## @load_articulation
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	xorl	%eax, %eax
	callq	_GetProcessHeap
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	8(%r12), %rdx
	movl	(%r12), %ecx
	shll	$4, %ecx
	addl	$16, %ecx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapReAlloc
	jmp	LBB0_3
LBB0_1:
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_HeapAlloc
LBB0_3:
	movq	%rax, %rbx
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movslq	(%r12), %r13
	shlq	$4, %r13
	leaq	(%rbx,%r13), %rsi
	movq	%r15, %rdi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	$4, %edx
	callq	_read_from_stream
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_11
## %bb.6:
	movq	%r15, %r14
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %edx
	shll	$2, %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	movq	%rax, 8(%rbx,%r13)
	testq	%rax, %rax
	je	LBB0_4
## %bb.7:
	movl	(%r15), %edx
	shll	$2, %edx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_read_from_stream
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	addq	%r13, %rbx
	addq	$8, %rbx
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	(%rbx), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
	jmp	LBB0_11
LBB0_4:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	(%r15), %eax
	leal	4(,%rax,4), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_subtract_bytes
	incl	(%r12)
	movq	_S_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
	.comm	_S_OK,4,2                       ## @S_OK
	.no_dead_strip	_load_articulation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_articulation
_load_articulation:                     ; @load_articulation
	.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, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
	bl	_GetProcessHeap
	cbz	x22, LBB0_2
; %bb.1:
	ldr	x2, [x19, #8]
	ldr	w8, [x19]
	lsl	w8, w8, #4
	add	w3, w8, #16
	mov	w1, #0
	bl	_HeapReAlloc
	str	x0, [x19, #8]
	cbnz	x0, LBB0_3
	b	LBB0_7
LBB0_2:
	mov	w1, #0
	mov	w2, #16
	bl	_HeapAlloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_7
LBB0_3:
	ldrsw	x8, [x19]
	add	x22, x0, x8, lsl #4
	mov	x0, x21
	mov	x1, x22
	mov	w2, #4
	bl	_read_from_stream
	mov	x23, x0
	bl	_FAILED
	cbnz	x0, LBB0_9
; %bb.4:
	bl	_GetProcessHeap
	ldr	w8, [x22]
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_HeapAlloc
	mov	x24, x22
	str	x0, [x24, #8]!
	cbz	x0, LBB0_7
; %bb.5:
	mov	x1, x0
	ldr	w8, [x22]
	lsl	w2, w8, #2
	mov	x0, x21
	bl	_read_from_stream
	mov	x23, x0
	bl	_FAILED
	cbz	x0, LBB0_10
; %bb.6:
	bl	_GetProcessHeap
	ldr	x2, [x24]
	mov	w1, #0
	bl	_HeapFree
	b	LBB0_9
LBB0_7:
Lloh0:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
LBB0_8:
	ldr	w23, [x8]
LBB0_9:
	mov	x0, x23
	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
LBB0_10:
	ldr	w8, [x22]
	lsl	w8, w8, #2
	add	w1, w8, #4
	mov	x0, x20
	bl	_subtract_bytes
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
Lloh2:
	adrp	x8, _S_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
	.comm	_S_OK,4,2                       ; @S_OK
	.no_dead_strip	_load_articulation
.subsections_via_symbols
