	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_ring_begin               ## -- Begin function intel_ring_begin
	.p2align	4, 0x90
_intel_ring_begin:                      ## @intel_ring_begin
	.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
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r12
	movq	8(%rdi), %r13
	movl	(%r13), %r15d
	subl	4(%r13), %r15d
	leal	(,%rsi,4), %r14d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %edi
	andl	$1, %edi
	callq	_GEM_BUG_ON
	movl	(%r12), %ebx
	addl	%r14d, %ebx
	xorl	%edi, %edi
	cmpl	(%r13), %ebx
	seta	%dil
	callq	_GEM_BUG_ON
	xorl	%edi, %edi
	cmpl	%r15d, %ebx
	seta	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	8(%r13), %eax
	subl	4(%r13), %eax
	cmpl	%r15d, %r14d
	jbe	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	orl	$1, %r15d
	jmp	LBB0_5
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_6
LBB0_4:
	movl	(%r12), %ebx
	xorl	%r15d, %r15d
LBB0_5:
	addl	%eax, %ebx
LBB0_6:
	xorl	%edi, %edi
	cmpl	12(%r13), %ebx
	seta	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	xorl	%edi, %edi
	cmpl	$0, (%r12)
	sete	%dil
	callq	_GEM_BUG_ON
	movl	4(%r12), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_wait_for_space
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
## %bb.12:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_8:
	movl	%r15d, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movl	%r15d, %ebx
	andl	$-2, %ebx
	xorl	%edi, %edi
	cmpl	12(%r13), %ebx
	seta	%dil
	callq	_GEM_BUG_ON
	movl	4(%r13), %eax
	addl	%ebx, %eax
	xorl	%edi, %edi
	cmpl	8(%r13), %eax
	seta	%dil
	callq	_GEM_BUG_ON
	movl	%ebx, %edi
	movl	$4, %esi
	callq	_IS_ALIGNED
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_GEM_BUG_ON
	movl	4(%r13), %edi
	shlq	$2, %rdi
	addq	16(%r13), %rdi
	shrl	$2, %r15d
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_memset64
	subl	%ebx, 12(%r13)
	movl	$0, 4(%r13)
	jmp	LBB0_11
LBB0_9:
	movl	4(%r13), %r12d
LBB0_11:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	8(%r13), %eax
	subl	%r14d, %eax
	xorl	%edi, %edi
	cmpl	%eax, %r12d
	seta	%dil
	callq	_GEM_BUG_ON
	xorl	%edi, %edi
	cmpl	%r14d, 12(%r13)
	setb	%dil
	callq	_GEM_BUG_ON
	movl	4(%r13), %ebx
	shlq	$2, %rbx
	addq	16(%r13), %rbx
	movq	_POISON_INUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$1073741823, %r15d              ## imm = 0x3FFFFFFF
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_memset32
	movl	%eax, %edi
	callq	_GEM_DEBUG_EXEC
	addl	%r14d, 4(%r13)
	subl	%r14d, 12(%r13)
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POISON_INUSE,4,2               ## @POISON_INUSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_ring_begin               ; -- Begin function intel_ring_begin
	.p2align	2
_intel_ring_begin:                      ; @intel_ring_begin
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x22, x0
	ldr	x19, [x0, #8]
	ldp	w8, w9, [x19]
	sub	w21, w8, w9
	lsl	w24, w1, #2
	and	w0, w1, #0x1
	bl	_GEM_BUG_ON
	ldr	w8, [x22]
	ldr	w9, [x19]
	add	w23, w8, w24
	cmp	w23, w9
	cset	w0, hi
	bl	_GEM_BUG_ON
	cmp	w23, w21
	cset	w0, hi
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.1:
	ldp	w9, w8, [x19, #4]
	sub	w8, w8, w9
	cmp	w24, w21
	b.ls	LBB0_4
; %bb.2:
	orr	w21, w8, #0x1
	b	LBB0_5
LBB0_3:
	mov	w21, #0
	b	LBB0_6
LBB0_4:
	mov	w21, #0
	ldr	w23, [x22]
LBB0_5:
	add	w23, w23, w8
LBB0_6:
	ldr	w8, [x19, #12]
	cmp	w23, w8
	cset	w0, hi
	bl	_unlikely
	cbz	x0, LBB0_9
; %bb.7:
	ldr	w8, [x22]
	cmp	w8, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	ldr	w1, [x22, #4]
	mov	x0, x19
	mov	x2, x23
	bl	_wait_for_space
	mov	x22, x0
	bl	_unlikely
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_9:
	mov	x0, x21
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.10:
	and	w22, w21, #0xfffffffe
	ldr	w8, [x19, #12]
	cmp	w22, w8
	cset	w0, hi
	bl	_GEM_BUG_ON
	ldp	w8, w9, [x19, #4]
	add	w8, w8, w22
	cmp	w8, w9
	cset	w0, hi
	bl	_GEM_BUG_ON
	mov	x0, x22
	mov	w1, #4
	bl	_IS_ALIGNED
	cmp	w0, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	ldr	x8, [x19, #16]
	ldr	w9, [x19, #4]
	add	x0, x8, x9, lsl #2
	lsr	w2, w21, #2
	mov	w1, #0
	bl	_memset64
	mov	w8, #0
	ldr	w9, [x19, #12]
	sub	w9, w9, w22
	str	w9, [x19, #12]
	str	wzr, [x19, #4]
	b	LBB0_12
LBB0_11:
	ldr	w8, [x19, #4]
LBB0_12:
	ldr	w9, [x19, #8]
	sub	w9, w9, w24
	cmp	w8, w9
	cset	w0, hi
	bl	_GEM_BUG_ON
	ldr	w8, [x19, #12]
	cmp	w8, w24
	cset	w0, lo
	bl	_GEM_BUG_ON
	ldr	x8, [x19, #16]
	ldr	w9, [x19, #4]
	add	x21, x8, x9, lsl #2
Lloh0:
	adrp	x8, _POISON_INUSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POISON_INUSE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	and	w2, w20, #0x3fffffff
	mov	x0, x21
	bl	_memset32
	bl	_GEM_DEBUG_EXEC
	ldr	w8, [x19, #4]
	add	w8, w8, w24
	str	w8, [x19, #4]
	ldr	w8, [x19, #12]
	sub	w8, w8, w24
	str	w8, [x19, #12]
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_POISON_INUSE,4,2               ; @POISON_INUSE
.subsections_via_symbols
