	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i915_batchbuffer
_i915_batchbuffer:                      ## @i915_batchbuffer
	.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, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	movq	16(%rdi), %r14
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	movq	_DRIVER_MODESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_drm_core_check_feature
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	cmpl	$0, (%r14)
	je	LBB0_10
## %bb.5:
	movl	12(%r15), %esi
	movl	(%r15), %ecx
	movl	8(%r15), %edx
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_RING_LOCK_TEST_WITH_RETURN
	movl	(%r15), %edi
	testl	%edi, %edi
	js	LBB0_11
## %bb.6:
	je	LBB0_12
## %bb.7:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.8:
	movq	%rax, %rbx
	movl	(%r15), %edx
	movl	4(%r15), %esi
	shll	$2, %edx
	movq	%rax, %rdi
	callq	_copy_from_user
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	movq	%rbx, %r15
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_10:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%rbx, %r15
	movq	%rbx, %rdx
	callq	_i915_dispatch_batchbuffer
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_mutex_unlock
	testq	%r12, %r12
	je	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	callq	_READ_BREADCRUMB
	movl	%eax, (%r12)
LBB0_15:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_3
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_DRIVER_MODESET,4,2             ## @DRIVER_MODESET
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Batchbuffer ioctl disabled\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"i915 batchbuffer, start %x used %d cliprects %d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_i915_batchbuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i915_batchbuffer
_i915_batchbuffer:                      ; @i915_batchbuffer
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldp	x8, x19, [x0, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x23, [x8]
Lloh0:
	adrp	x8, _DRIVER_MODESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRIVER_MODESET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_drm_core_check_feature
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
	ldr	w8, [x19]
	cbz	w8, LBB0_8
; %bb.3:
	ldp	w2, w1, [x21, #8]
	ldr	w3, [x21]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	mov	x0, x20
	mov	x1, x22
	bl	_RING_LOCK_TEST_WITH_RETURN
	ldr	w0, [x21]
	tbnz	w0, #31, LBB0_9
; %bb.4:
	cbz	w0, LBB0_12
; %bb.5:
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kcalloc
	cbz	x0, LBB0_16
; %bb.6:
	mov	x22, x0
	ldp	w8, w1, [x21]
	lsl	w2, w8, #2
	bl	_copy_from_user
	cbz	w0, LBB0_13
; %bb.7:
Lloh10:
	adrp	x8, _EFAULT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_15
LBB0_8:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_9:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
	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
LBB0_12:
	mov	x22, #0
LBB0_13:
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_i915_dispatch_batchbuffer
	mov	x21, x0
	mov	x0, x20
	bl	_mutex_unlock
	cbz	x23, LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_READ_BREADCRUMB
	str	w0, [x23]
LBB0_15:
	mov	x0, x22
	bl	_kfree
	b	LBB0_11
LBB0_16:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_DRIVER_MODESET,4,2             ; @DRIVER_MODESET
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Batchbuffer ioctl disabled\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"i915 batchbuffer, start %x used %d cliprects %d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_i915_batchbuffer
.subsections_via_symbols
