	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_engine_create_ring       ## -- Begin function intel_engine_create_ring
	.p2align	4, 0x90
_intel_engine_create_ring:              ## @intel_engine_create_ring
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movl	%esi, %edi
	callq	_is_power_of_2
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_GEM_BUG_ON
	movl	%r15d, %edi
	callq	_RING_CTL_SIZE
	movq	_RING_NR_PAGES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	callq	_GEM_BUG_ON
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$16, %rdi
	callq	_kref_init
	movl	%r15d, (%rbx)
	movl	%r15d, 4(%rbx)
	movq	%r12, %rdi
	callq	_IS_I830
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	callq	_IS_I845G
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:
	movq	_CACHELINE_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	subl	%eax, 4(%rbx)
LBB0_4:
	movq	%rbx, %rdi
	callq	_intel_ring_update_space
	movq	(%r14), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_create_ring_vma
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:
	movq	%rbx, %rdi
	callq	_kfree
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_5:
	movq	%r14, 8(%rbx)
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RING_NR_PAGES,4,2              ## @RING_NR_PAGES
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CACHELINE_BYTES,4,2            ## @CACHELINE_BYTES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_engine_create_ring       ; -- Begin function intel_engine_create_ring
	.p2align	2
_intel_engine_create_ring:              ; @intel_engine_create_ring
	.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
	mov	x20, x0
	ldr	x22, [x0, #8]
	mov	x0, x1
	bl	_is_power_of_2
	cmp	w0, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	mov	x0, x19
	bl	_RING_CTL_SIZE
Lloh0:
	adrp	x8, _RING_NR_PAGES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RING_NR_PAGES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bic	w0, w0, w8
	bl	_GEM_BUG_ON
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
	add	x0, x0, #16
	bl	_kref_init
	stp	w19, w19, [x21]
	mov	x0, x22
	bl	_IS_I830
	cbnz	x0, LBB0_3
; %bb.2:
	mov	x0, x22
	bl	_IS_I845G
	cbz	x0, LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _CACHELINE_BYTES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CACHELINE_BYTES@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x21, #4]
	sub	w8, w9, w8, lsl #1
	str	w8, [x21, #4]
LBB0_4:
	mov	x0, x21
	bl	_intel_ring_update_space
	ldr	x8, [x20]
	ldr	w0, [x8]
	mov	x1, x19
	bl	_create_ring_vma
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.5:
	mov	x0, x21
	bl	_kfree
	mov	x0, x19
	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
	b	_ERR_CAST
LBB0_6:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
LBB0_7:
	str	x19, [x21, #8]
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_RING_NR_PAGES,4,2              ; @RING_NR_PAGES
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CACHELINE_BYTES,4,2            ; @CACHELINE_BYTES
.subsections_via_symbols
