	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_context_create_ioctl  ## -- Begin function i915_gem_context_create_ioctl
	.p2align	4, 0x90
_i915_gem_context_create_ioctl:         ## @i915_gem_context_create_ioctl
	.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	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_to_i915
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_DRIVER_CAPS
	cmpl	$0, (%rax)
	je	LBB0_3
## %bb.1:
	movq	_I915_CONTEXT_CREATE_FLAGS_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_7
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
LBB0_5:
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r13, %rdi
	callq	_intel_gt_terminally_wedged
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.8:
	movl	(%r12), %r12d
	movl	%r12d, -44(%rbp)
	movl	%r12d, %edi
	callq	_client_is_banned
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%rdi), %r14d
	movq	_PIDTYPE_PID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_get_task_pid
	movl	%eax, %edi
	callq	_pid_nr
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_10:
	movq	%r15, %rdi
	callq	_i915_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.11:
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_i915_gem_create_context
	movl	%eax, %ebx
	movl	%eax, -48(%rbp)
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_13:
	movq	_I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_16
## %bb.14:
	movl	8(%r14), %edi
	callq	_u64_to_user_ptr
	movl	%eax, %r15d
	movq	_create_extensions@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	leaq	-48(%rbp), %rcx
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_i915_user_extensions
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.15:
	movl	-48(%rbp), %ebx
	movl	-44(%rbp), %r12d
LBB0_16:
	movl	%ebx, %edi
	movl	%r12d, %esi
	callq	_gem_context_register
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_18
## %bb.17:
	movl	%ebx, 4(%r14)
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_18:
	movl	-48(%rbp), %edi
	callq	_context_close
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_I915_CONTEXT_CREATE_FLAGS_UNKNOWN,4,2 ## @I915_CONTEXT_CREATE_FLAGS_UNKNOWN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"client %s[%d] banned from creating ctx\n"

	.comm	_current,8,3                    ## @current
	.comm	_PIDTYPE_PID,4,2                ## @PIDTYPE_PID
	.comm	_EIO,4,2                        ## @EIO
	.comm	_I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,4,2 ## @I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS
	.comm	_create_extensions,4,2          ## @create_extensions
L_.str.1:                               ## @.str.1
	.asciz	"HW context %d created\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_context_create_ioctl  ; -- Begin function i915_gem_context_create_ioctl
	.p2align	2
_i915_gem_context_create_ioctl:         ; @i915_gem_context_create_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_to_i915
	mov	x22, x0
	bl	_DRIVER_CAPS
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _I915_CONTEXT_CREATE_FLAGS_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I915_CONTEXT_CREATE_FLAGS_UNKNOWN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_5:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	mov	x0, x22
	bl	_intel_gt_terminally_wedged
	mov	x23, x0
	cbnz	w0, LBB0_5
; %bb.7:
	ldr	w21, [x21]
	str	w21, [sp, #12]
	mov	x0, x21
	bl	_client_is_banned
	cbz	x0, LBB0_9
; %bb.8:
Lloh7:
	adrp	x8, _current@GOTPAGE
Lloh8:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh9:
	ldr	x0, [x8]
	ldr	w19, [x0]
Lloh10:
	adrp	x8, _PIDTYPE_PID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PIDTYPE_PID@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_get_task_pid
	bl	_pid_nr
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DRM_DEBUG
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_4
LBB0_9:
	mov	x0, x20
	bl	_i915_mutex_lock_interruptible
	mov	x23, x0
	cbnz	w0, LBB0_5
; %bb.10:
	ldr	w1, [x19]
	mov	x0, x22
	bl	_i915_gem_create_context
	mov	x22, x0
	str	w0, [sp, #8]
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x22
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.11:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_12:
	ldr	w8, [x19]
Lloh17:
	adrp	x9, _I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.13:
	ldr	w0, [x19, #8]
	bl	_u64_to_user_ptr
	mov	x20, x0
Lloh20:
	adrp	x8, _create_extensions@GOTPAGE
Lloh21:
	ldr	x8, [x8, _create_extensions@GOTPAGEOFF]
Lloh22:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x2, x0
	add	x3, sp, #8
	mov	x0, x20
	mov	x1, x21
	bl	_i915_user_extensions
	mov	x23, x0
	cbnz	w0, LBB0_17
; %bb.14:
	ldp	w22, w21, [sp, #8]
LBB0_15:
	mov	x0, x22
	mov	x1, x21
	bl	_gem_context_register
	mov	x23, x0
	tbnz	w0, #31, LBB0_17
; %bb.16:
	str	w23, [x19, #4]
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	bl	_DRM_DEBUG
	mov	w23, #0
	b	LBB0_5
LBB0_17:
	ldr	w0, [sp, #8]
	bl	_context_close
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_I915_CONTEXT_CREATE_FLAGS_UNKNOWN,4,2 ; @I915_CONTEXT_CREATE_FLAGS_UNKNOWN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"client %s[%d] banned from creating ctx\n"

	.comm	_current,8,3                    ; @current
	.comm	_PIDTYPE_PID,4,2                ; @PIDTYPE_PID
	.comm	_EIO,4,2                        ; @EIO
	.comm	_I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,4,2 ; @I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS
	.comm	_create_extensions,4,2          ; @create_extensions
l_.str.1:                               ; @.str.1
	.asciz	"HW context %d created\n"

.subsections_via_symbols
