	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wined3d_event_query_create
_wined3d_event_query_create:            ## @wined3d_event_query_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	%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
	movq	%r8, %r9
	movq	%rcx, %r8
	movq	%rdx, %r12
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	(%rdi), %r15
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	movq	%r12, %rcx
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	xorl	%eax, %eax
	callq	_TRACE
	movl	$12, %edi
	callq	_heap_alloc_zero
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	8(%rax), %rdi
	movq	%r15, %rsi
	callq	_wined3d_fence_init
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_WARN
	movq	%rbx, %rdi
	callq	_heap_free
	jmp	LBB0_6
LBB0_1:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	%rbx, %rcx
	addq	$4, %rcx
	movq	_event_query_ops@GOTPCREL(%rip), %r9
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	movl	$4, %r8d
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	pushq	%r12
	callq	_wined3d_query_init
	addq	$16, %rsp
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	movq	_WINED3D_OK@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device %p, type %#x, parent %p, parent_ops %p, query %p.\n"

	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
L_.str.1:                               ## @.str.1
	.asciz	"Event queries not supported.\n"

	.comm	_event_query_ops,4,2            ## @event_query_ops
L_.str.2:                               ## @.str.2
	.asciz	"Created query %p.\n"

	.comm	_WINED3D_OK,4,2                 ## @WINED3D_OK
	.no_dead_strip	_wined3d_event_query_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wined3d_event_query_create
_wined3d_event_query_create:            ; @wined3d_event_query_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x24, x0
	ldr	x25, [x0]
	stp	x3, x4, [sp, #24]
	stp	x23, x2, [sp, #8]
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	mov	w0, #12
	bl	_heap_alloc_zero
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	add	x0, x0, #8
	mov	x1, x25
	bl	_wined3d_fence_init
	mov	x25, x0
	bl	_FAILED
	cbz	x0, LBB0_4
; %bb.2:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WARN
	mov	x0, x22
	bl	_heap_free
	b	LBB0_6
LBB0_3:
Lloh4:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
	add	x3, x22, #4
Lloh6:
	adrp	x5, _event_query_ops@GOTPAGE
Lloh7:
	ldr	x5, [x5, _event_query_ops@GOTPAGEOFF]
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	mov	w4, #4
	mov	x6, x21
	mov	x7, x20
	bl	_wined3d_query_init
	str	x22, [sp]
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TRACE
	str	x22, [x19]
Lloh10:
	adrp	x8, _WINED3D_OK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WINED3D_OK@GOTPAGEOFF]
LBB0_5:
	ldr	w25, [x8]
LBB0_6:
	mov	x0, x25
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device %p, type %#x, parent %p, parent_ops %p, query %p.\n"

	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
l_.str.1:                               ; @.str.1
	.asciz	"Event queries not supported.\n"

	.comm	_event_query_ops,4,2            ; @event_query_ops
l_.str.2:                               ; @.str.2
	.asciz	"Created query %p.\n"

	.comm	_WINED3D_OK,4,2                 ; @WINED3D_OK
	.no_dead_strip	_wined3d_event_query_create
.subsections_via_symbols
