	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mga_driver_fence_wait          ## -- Begin function mga_driver_fence_wait
	.p2align	4, 0x90
_mga_driver_fence_wait:                 ## @mga_driver_fence_wait
	.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, %r12
	movq	(%rdi), %rdi
	movl	4(%rdi), %r14d
	movq	_DRM_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,2), %r15d
	callq	_atomic_read
	movl	%eax, %ebx
	subl	(%r12), %eax
	xorl	%ecx, %ecx
	cmpl	$8388609, %eax                  ## imm = 0x800001
	setb	%cl
	xorl	%edi, %edi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_DRM_WAIT_ON
	movl	%ebx, (%r12)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_HZ,4,2                     ## @DRM_HZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mga_driver_fence_wait          ; -- Begin function mga_driver_fence_wait
	.p2align	2
_mga_driver_fence_wait:                 ; @mga_driver_fence_wait
	.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	x19, x1
	ldr	x0, [x0]
	ldr	w20, [x0, #4]
Lloh0:
	adrp	x8, _DRM_HZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_HZ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w21, w8, w8, lsl #1
	bl	_atomic_read
	mov	x22, x0
	ldr	w8, [x19]
	sub	w8, w0, w8
	cmp	w8, #2048, lsl #12              ; =8388608
	cset	w3, ls
	mov	w0, #0
	mov	x1, x20
	mov	x2, x21
	bl	_DRM_WAIT_ON
	str	w22, [x19]
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_HZ,4,2                     ; @DRM_HZ
.subsections_via_symbols
