	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_context_init          ## -- Begin function i915_gem_context_init
	.p2align	4, 0x90
_i915_gem_context_init:                 ## @i915_gem_context_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	callq	_HAS_HW_CONTEXTS
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$0, (%r14)
	jne	LBB0_6
## %bb.2:
	movq	8(%r14), %rax
	movq	_RCS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	jne	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	callq	_get_context_size
	movl	%eax, %edi
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_round_up
	movl	%eax, 4(%r14)
	cmpl	$1048577, %eax                  ## imm = 0x100001
	jge	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_create_default_context
	testq	%rax, %rax
	je	LBB0_7
LBB0_5:
	movl	$1, (%r14)
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_DRM_DEBUG_DRIVER               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RCS,8,3                        ## @RCS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HW context support initialized\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_context_init          ; -- Begin function i915_gem_context_init
	.p2align	2
_i915_gem_context_init:                 ; @i915_gem_context_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	ldr	x19, [x0]
	bl	_HAS_HW_CONTEXTS
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w8, [x19]
	cbnz	w8, LBB0_6
; %bb.2:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _RCS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RCS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbnz	x8, LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_get_context_size
	mov	w1, #4096
	bl	_round_up
	str	w0, [x19, #4]
	cmp	w0, #256, lsl #12               ; =1048576
	b.gt	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_create_default_context
	cbz	x0, LBB0_7
LBB0_5:
	mov	w8, #1
	str	w8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_DEBUG_DRIVER
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_RCS,8,3                        ; @RCS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HW context support initialized\n"

.subsections_via_symbols
