	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_cs_emit_present        ## -- Begin function wined3d_cs_emit_present
	.p2align	4, 0x90
_wined3d_cs_emit_present:               ## @wined3d_cs_emit_present
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r12d
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	_WINED3D_CS_QUEUE_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	$40, %esi
	callq	*8(%rax)
	movq	_WINED3D_CS_OP_PRESENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rax)
	movl	%r12d, 32(%rax)
	movq	%r13, 24(%rax)
	movl	(%r15), %ecx
	movl	%ecx, 20(%rax)
	movl	(%rbx), %ecx
	movl	%ecx, 16(%rax)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 8(%rax)
	movq	16(%rbp), %rcx
	movq	%rcx, (%rax)
	movq	%r14, %rdi
	callq	_InterlockedIncrement
	movl	%eax, %r15d
	movq	16(%r13), %rdi
	callq	_wined3d_resource_acquire
	cmpl	$0, 8(%r13)
	je	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_wined3d_resource_acquire
	incq	%rbx
	movl	8(%r13), %eax
	cmpq	%rax, %rbx
	jb	LBB0_2
LBB0_3:
	movq	8(%r14), %rax
	movq	_WINED3D_CS_QUEUE_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	callq	*(%rax)
	cmpl	$2, %r15d
	jl	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_wined3d_pause
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_InterlockedCompareExchange
	cmpl	$1, %eax
	jg	LBB0_4
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_CS_QUEUE_DEFAULT,4,2   ## @WINED3D_CS_QUEUE_DEFAULT
	.comm	_WINED3D_CS_OP_PRESENT,4,2      ## @WINED3D_CS_OP_PRESENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_cs_emit_present        ; -- Begin function wined3d_cs_emit_present
	.p2align	2
_wined3d_cs_emit_present:               ; @wined3d_cs_emit_present
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x6
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8, #8]
Lloh0:
	adrp	x26, _WINED3D_CS_QUEUE_DEFAULT@GOTPAGE
Lloh1:
	ldr	x26, [x26, _WINED3D_CS_QUEUE_DEFAULT@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	w1, #40
	blr	x8
Lloh2:
	adrp	x8, _WINED3D_CS_OP_PRESENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WINED3D_CS_OP_PRESENT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	stp	w23, w8, [x0, #32]
	str	x20, [x0, #24]
	ldr	w8, [x25]
	str	w8, [x0, #20]
	ldr	w8, [x24]
	str	w8, [x0, #16]
	stp	x21, x22, [x0]
	mov	x0, x19
	bl	_InterlockedIncrement
	mov	x21, x0
	ldr	x0, [x20, #16]
	bl	_wined3d_resource_acquire
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x0, [x8, x22, lsl #3]
	bl	_wined3d_resource_acquire
	add	x22, x22, #1
	ldr	w8, [x20, #8]
	cmp	x22, x8
	b.lo	LBB0_2
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w1, [x26]
	mov	x0, x19
	blr	x8
	cmp	w21, #2
	b.lt	LBB0_5
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	bl	_wined3d_pause
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_InterlockedCompareExchange
	cmp	w0, #1
	b.gt	LBB0_4
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_CS_QUEUE_DEFAULT,4,2   ; @WINED3D_CS_QUEUE_DEFAULT
	.comm	_WINED3D_CS_OP_PRESENT,4,2      ; @WINED3D_CS_OP_PRESENT
.subsections_via_symbols
