	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3drm_visual_array_create
_d3drm_visual_array_create:             ## @d3drm_visual_array_create
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	movl	$24, %edi
	callq	_heap_alloc_zero
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %r12
	movq	_d3drm_visual_array_vtbl@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r12)
	movl	$1, (%r12)
	movl	%r15d, 4(%r12)
	testl	%r15d, %r15d
	je	LBB0_9
## %bb.2:
	movl	%r15d, %edi
	movl	$8, %esi
	callq	_heap_calloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	(%r14), %rcx
	movq	%rcx, (%rax)
	movq	8(%r12), %rax
	movq	(%rax), %rdi
	callq	_IDirect3DRMVisual_AddRef
	cmpl	$1, %r15d
	je	LBB0_9
## %bb.4:
	movl	%r15d, %r15d
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%r14,%rbx,8), %rcx
	movq	%rcx, (%rax,%rbx,8)
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_IDirect3DRMVisual_AddRef
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_5
	jmp	LBB0_9
LBB0_7:
	movq	%r12, %rdi
	callq	_heap_free
LBB0_8:
	xorl	%r12d, %r12d
LBB0_9:
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_d3drm_visual_array_vtbl,4,2    ## @d3drm_visual_array_vtbl
	.no_dead_strip	_d3drm_visual_array_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3drm_visual_array_create
_d3drm_visual_array_create:             ; @d3drm_visual_array_create
	.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	x20, x1
	mov	x21, x0
	mov	w0, #24
	bl	_heap_alloc_zero
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, _d3drm_visual_array_vtbl@GOTPAGE
Lloh1:
	ldr	x8, [x8, _d3drm_visual_array_vtbl@GOTPAGEOFF]
	str	x8, [x19, #16]
	mov	w8, #1
	stp	w8, w21, [x19]
	cbz	w21, LBB0_7
; %bb.2:
	mov	x0, x21
	mov	w1, #8
	bl	_heap_calloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.3:
	ldr	x8, [x20]
	str	x8, [x0]
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	bl	_IDirect3DRMVisual_AddRef
	cmp	w21, #1
	b.eq	LBB0_7
; %bb.4:
	mov	w21, w21
	mov	w22, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x8, x22, #3
	ldr	x9, [x20, x8]
	ldr	x10, [x19, #8]
	str	x9, [x10, x8]
	ldr	x9, [x19, #8]
	ldr	x0, [x9, x8]
	bl	_IDirect3DRMVisual_AddRef
	add	x22, x22, #1
	cmp	x21, x22
	b.ne	LBB0_5
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_heap_free
	mov	x19, #0
LBB0_7:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_d3drm_visual_array_vtbl,4,2    ; @d3drm_visual_array_vtbl
	.no_dead_strip	_d3drm_visual_array_create
.subsections_via_symbols
