	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d_execute_buffer_init        ## -- Begin function d3d_execute_buffer_init
	.p2align	4, 0x90
_d3d_execute_buffer_init:               ## @d3d_execute_buffer_init
	.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, %rbx
	movq	_d3d_execute_buffer_vtbl@GOTPCREL(%rip), %rax
	movq	%rax, 48(%rdi)
	movl	$1, (%rdi)
	movq	%rsi, 40(%rdi)
	leaq	8(%rdi), %r14
	movl	(%rdx), %eax
	movq	%r14, %rdi
	movq	%rdx, %rsi
	movl	%eax, %edx
	callq	_memcpy
	movl	8(%rbx), %eax
	movq	_D3DDEB_LPDATA@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	testl	%eax, %ecx
	jne	LBB0_2
## %bb.1:
	movq	$0, 24(%rbx)
LBB0_2:
	movq	_D3DDEB_BUFSIZE@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_3
## %bb.4:
	cmpq	$0, 24(%rbx)
	jne	LBB0_8
	jmp	LBB0_5
LBB0_3:
	movq	$0, 16(%rbx)
	cmpq	$0, 24(%rbx)
	jne	LBB0_8
LBB0_5:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.6:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	callq	_heap_alloc_zero
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movl	(%r15), %ecx
	movl	(%r14), %eax
LBB0_8:
	orl	%ecx, %eax
	movl	%eax, (%r14)
	movq	_D3D_OK@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str(%rip), %rdi
	callq	_ERR
	movq	_DDERR_OUTOFMEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_d3d_execute_buffer_vtbl,4,2    ## @d3d_execute_buffer_vtbl
	.comm	_D3DDEB_LPDATA,4,2              ## @D3DDEB_LPDATA
	.comm	_D3DDEB_BUFSIZE,4,2             ## @D3DDEB_BUFSIZE
	.comm	_TRUE,4,2                       ## @TRUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate execute buffer data.\n"

	.comm	_DDERR_OUTOFMEMORY,4,2          ## @DDERR_OUTOFMEMORY
	.comm	_D3D_OK,4,2                     ## @D3D_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d_execute_buffer_init        ; -- Begin function d3d_execute_buffer_init
	.p2align	2
_d3d_execute_buffer_init:               ; @d3d_execute_buffer_init
	.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	x8, x2
	mov	x20, x0
Lloh0:
	adrp	x9, _d3d_execute_buffer_vtbl@GOTPAGE
Lloh1:
	ldr	x9, [x9, _d3d_execute_buffer_vtbl@GOTPAGEOFF]
	mov	w10, #1
	str	w10, [x0]
	stp	x1, x9, [x0, #40]
	add	x19, x0, #8
	ldr	w2, [x2]
	mov	x0, x19
	mov	x1, x8
	bl	_memcpy
	ldr	w8, [x20, #8]
Lloh2:
	adrp	x21, _D3DDEB_LPDATA@GOTPAGE
Lloh3:
	ldr	x21, [x21, _D3DDEB_LPDATA@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
	str	xzr, [x20, #24]
LBB0_2:
Lloh4:
	adrp	x10, _D3DDEB_BUFSIZE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _D3DDEB_BUFSIZE@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	x10, [x20, #24]
	cbnz	x10, LBB0_8
	b	LBB0_5
LBB0_4:
	str	xzr, [x20, #16]
	ldr	x10, [x20, #24]
	cbnz	x10, LBB0_8
LBB0_5:
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_8
; %bb.6:
Lloh7:
	adrp	x8, _TRUE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x20, #32]
	bl	_heap_alloc_zero
	str	x0, [x20, #24]
	cbz	x0, LBB0_10
; %bb.7:
	ldr	w9, [x21]
	ldr	w8, [x19]
LBB0_8:
	orr	w8, w8, w9
	str	w8, [x19]
Lloh10:
	adrp	x8, _D3D_OK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _D3D_OK@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
LBB0_10:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
Lloh14:
	adrp	x8, _DDERR_OUTOFMEMORY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DDERR_OUTOFMEMORY@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_d3d_execute_buffer_vtbl,4,2    ; @d3d_execute_buffer_vtbl
	.comm	_D3DDEB_LPDATA,4,2              ; @D3DDEB_LPDATA
	.comm	_D3DDEB_BUFSIZE,4,2             ; @D3DDEB_BUFSIZE
	.comm	_TRUE,4,2                       ; @TRUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate execute buffer data.\n"

	.comm	_DDERR_OUTOFMEMORY,4,2          ; @DDERR_OUTOFMEMORY
	.comm	_D3D_OK,4,2                     ; @D3D_OK
.subsections_via_symbols
