	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_init_ring_buffer
_intel_init_ring_buffer:                ## @intel_init_ring_buffer
	.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	%rsi, %r14
	movq	%rdi, %r12
	movq	(%rdi), %r15
	movq	%rdi, 48(%rsi)
	leaq	68(%rsi), %rdi
	callq	_INIT_LIST_HEAD
	leaq	64(%r14), %rdi
	callq	_INIT_LIST_HEAD
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	shll	$5, %eax
	movl	%eax, (%r14)
	movl	60(%r14), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	leaq	56(%r14), %rdi
	callq	_init_waitqueue_head
	movq	%r12, %rdi
	callq	_I915_NEED_GFX_HWS
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_init_status_page
	jmp	LBB0_3
LBB0_2:
	movq	8(%r14), %rax
	movq	_RCS@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_BUG_ON
	movq	%r14, %rdi
	callq	_init_phys_hws_pga
LBB0_3:
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.4:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_HAS_LLC
	testl	%eax, %eax
	je	LBB0_7
LBB0_5:
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_i915_gem_alloc_object
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_7:
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_i915_gem_object_create_stolen
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_5
LBB0_8:
	movq	%r15, 32(%r14)
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_i915_gem_object_pin
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_i915_gem_object_set_to_gtt_domain
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_14
LBB0_10:
	movq	%r15, %rdi
	callq	_i915_gem_object_unpin
LBB0_11:
	movq	%r15, %rdi
	callq	_drm_gem_object_unreference
	movq	$0, 32(%r14)
LBB0_12:
	movq	%r14, %rdi
	callq	_cleanup_status_page
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	8(%r15), %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %rdi
	movl	(%r14), %esi
	callq	_ioremap_wc
	movq	%rax, 40(%r14)
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:
	movq	%r14, %rdi
	callq	*16(%r14)
	testl	%eax, %eax
	je	LBB0_18
## %bb.16:
	movl	%eax, %ebx
	movq	40(%r14), %rdi
	callq	_iounmap
	jmp	LBB0_10
LBB0_17:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_18:
	movl	(%r14), %eax
	movl	%eax, 24(%r14)
	movq	48(%r14), %rdi
	callq	_IS_I830
	testq	%rax, %rax
	jne	LBB0_20
## %bb.19:
	movq	48(%r14), %rdi
	callq	_IS_845G
	testq	%rax, %rax
	je	LBB0_21
LBB0_20:
	addl	$-128, 24(%r14)
LBB0_21:
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_RCS,8,3                        ## @RCS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate ringbuffer\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Failed to map ringbuffer.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_intel_init_ring_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_init_ring_buffer
_intel_init_ring_buffer:                ; @intel_init_ring_buffer
	.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	x19, x1
	mov	x21, x0
	ldr	x23, [x0]
	str	x0, [x1, #48]
	add	x0, x1, #68
	bl	_INIT_LIST_HEAD
	add	x0, x19, #64
	bl	_INIT_LIST_HEAD
Lloh0:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	w8, w8, #5
	str	w8, [x19]
	ldr	w0, [x19, #60]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	add	x0, x19, #56
	bl	_init_waitqueue_head
	mov	x0, x21
	bl	_I915_NEED_GFX_HWS
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_init_status_page
	mov	x22, x0
	cbnz	w0, LBB0_12
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _RCS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RCS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_BUG_ON
	mov	x0, x19
	bl	_init_phys_hws_pga
	mov	x22, x0
	cbnz	w0, LBB0_12
LBB0_3:
	mov	x0, x21
	bl	_HAS_LLC
	cbz	w0, LBB0_6
LBB0_4:
	ldr	w1, [x19]
	mov	x0, x21
	bl	_i915_gem_alloc_object
	mov	x20, x0
	cbnz	x0, LBB0_7
; %bb.5:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_6:
	ldr	w1, [x19]
	mov	x0, x21
	bl	_i915_gem_object_create_stolen
	mov	x20, x0
	cbz	x0, LBB0_4
LBB0_7:
	str	x20, [x19, #32]
	ldr	w1, [x24]
	mov	x0, x20
	mov	w2, #1
	mov	w3, #0
	bl	_i915_gem_object_pin
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.8:
	mov	x0, x20
	mov	w1, #1
	bl	_i915_gem_object_set_to_gtt_domain
	mov	x22, x0
	cbz	w0, LBB0_13
LBB0_9:
	mov	x0, x20
	bl	_i915_gem_object_unpin
LBB0_10:
	mov	x0, x20
	bl	_drm_gem_object_unreference
	str	xzr, [x19, #32]
LBB0_11:
	mov	x0, x19
	bl	_cleanup_status_page
LBB0_12:
	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
	ret
LBB0_13:
	ldr	x8, [x23]
	ldr	x9, [x20, #8]
	add	x0, x9, x8
	ldr	w1, [x19]
	bl	_ioremap_wc
	str	x0, [x19, #40]
	cbz	x0, LBB0_16
; %bb.14:
	ldr	x8, [x19, #16]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_17
; %bb.15:
	mov	x22, x0
	ldr	x0, [x19, #40]
	bl	_iounmap
	b	LBB0_9
LBB0_16:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_9
LBB0_17:
	ldr	w8, [x19]
	str	w8, [x19, #24]
	ldr	x0, [x19, #48]
	bl	_IS_I830
	cbnz	x0, LBB0_19
; %bb.18:
	ldr	x0, [x19, #48]
	bl	_IS_845G
	cbz	x0, LBB0_20
LBB0_19:
	mov	w22, #0
	ldr	w8, [x19, #24]
	sub	w8, w8, #128
	str	w8, [x19, #24]
	b	LBB0_12
LBB0_20:
	mov	w22, #0
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_RCS,8,3                        ; @RCS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate ringbuffer\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Failed to map ringbuffer.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_intel_init_ring_buffer
.subsections_via_symbols
