	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i915_dispatch_batchbuffer
_i915_dispatch_batchbuffer:             ## @i915_dispatch_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
	movl	8(%rsi), %eax
	orl	4(%rsi), %eax
	testb	$7, %al
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_20
LBB0_2:
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movslq	(%rsi), %r12
	callq	_i915_kernel_lost_context
	testl	%r12d, %r12d
	movl	$1, %eax
	cmovnel	%r12d, %eax
	testl	%eax, %eax
	jle	LBB0_15
## %bb.3:
	movl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r12, %r13
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	12(%r15), %ecx
	movl	16(%r15), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_i915_emit_box
	testl	%eax, %eax
	jne	LBB0_20
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	callq	_IS_I830
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	callq	_IS_845G
	testl	%eax, %eax
	je	LBB0_8
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	$4, %edi
	callq	_BEGIN_LP_RING
	testl	%eax, %eax
	jne	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_MI_BATCH_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OUT_RING
	movq	_MI_BATCH_NON_SECURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	4(%r15), %edi
	callq	_OUT_RING
	movl	4(%r15), %eax
	movl	8(%r15), %ecx
	leal	(%rax,%rcx), %edi
	addl	$-4, %edi
	callq	_OUT_RING
	xorl	%edi, %edi
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	callq	_OUT_RING
	xorl	%eax, %eax
	callq	_ADVANCE_LP_RING
	incq	%r13
	addq	$4, %rbx
	cmpq	%r13, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_4
	jmp	LBB0_15
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$2, %edi
	callq	_BEGIN_LP_RING
	testl	%eax, %eax
	jne	LBB0_20
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	callq	_INTEL_INFO
	cmpl	$4, (%rax)
	movq	_MI_BATCH_BUFFER_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	jl	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_MI_BATCH_NON_SECURE_I965@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	orl	$128, %edi
	callq	_OUT_RING
	movl	4(%r15), %edi
	jmp	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	orl	$128, %edi
	callq	_OUT_RING
	movq	_MI_BATCH_NON_SECURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	4(%r15), %edi
	jmp	LBB0_14
LBB0_15:
	movq	%r14, %rdi
	callq	_IS_G4X
	testq	%rax, %rax
	jne	LBB0_17
## %bb.16:
	movq	%r14, %rdi
	callq	_IS_GEN5
	testq	%rax, %rax
	je	LBB0_19
LBB0_17:
	movl	$2, %edi
	callq	_BEGIN_LP_RING
	testl	%eax, %eax
	jne	LBB0_19
## %bb.18:
	movq	_MI_FLUSH@GOTPCREL(%rip), %rax
	movq	_MI_NO_WRITE_FLUSH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_MI_INVALIDATE_ISP@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_OUT_RING
	movq	_MI_NOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	callq	_ADVANCE_LP_RING
LBB0_19:
	movq	%r14, %rdi
	callq	_i915_emit_breadcrumb
	xorl	%eax, %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"alignment"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MI_BATCH_BUFFER_START,4,2      ## @MI_BATCH_BUFFER_START
	.comm	_MI_BATCH_NON_SECURE_I965,4,2   ## @MI_BATCH_NON_SECURE_I965
	.comm	_MI_BATCH_NON_SECURE,4,2        ## @MI_BATCH_NON_SECURE
	.comm	_MI_BATCH_BUFFER,4,2            ## @MI_BATCH_BUFFER
	.comm	_MI_FLUSH,4,2                   ## @MI_FLUSH
	.comm	_MI_NO_WRITE_FLUSH,4,2          ## @MI_NO_WRITE_FLUSH
	.comm	_MI_INVALIDATE_ISP,4,2          ## @MI_INVALIDATE_ISP
	.comm	_MI_NOOP,4,2                    ## @MI_NOOP
	.no_dead_strip	_i915_dispatch_batchbuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i915_dispatch_batchbuffer
_i915_dispatch_batchbuffer:             ; @i915_dispatch_batchbuffer
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldp	w8, w9, [x1, #4]
	orr	w8, w9, w8
	tst	w8, #0x7
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_20
LBB0_2:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldrsw	x22, [x1]
	bl	_i915_kernel_lost_context
	cmp	w22, #0
	csinc	w23, w22, wzr, ne
	cmp	w23, #1
	b.lt	LBB0_15
; %bb.3:
	mov	x24, #0
Lloh5:
	adrp	x25, _MI_BATCH_BUFFER_START@GOTPAGE
Lloh6:
	ldr	x25, [x25, _MI_BATCH_BUFFER_START@GOTPAGEOFF]
Lloh7:
	adrp	x26, _MI_BATCH_NON_SECURE_I965@GOTPAGE
Lloh8:
	ldr	x26, [x26, _MI_BATCH_NON_SECURE_I965@GOTPAGEOFF]
Lloh9:
	adrp	x27, _MI_BATCH_NON_SECURE@GOTPAGE
Lloh10:
	ldr	x27, [x27, _MI_BATCH_NON_SECURE@GOTPAGEOFF]
Lloh11:
	adrp	x28, _MI_BATCH_BUFFER@GOTPAGE
Lloh12:
	ldr	x28, [x28, _MI_BATCH_BUFFER@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x24, x22
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	w3, w2, [x21, #12]
	mov	x0, x19
	mov	x1, x20
	bl	_i915_emit_box
	cbnz	w0, LBB0_20
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_IS_I830
	cbnz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_IS_845G
	cbz	w0, LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #4
	bl	_BEGIN_LP_RING
	cbnz	w0, LBB0_20
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x28]
	bl	_OUT_RING
	ldr	w8, [x21, #4]
	ldr	w9, [x27]
	orr	w0, w9, w8
	bl	_OUT_RING
	ldp	w8, w9, [x21, #4]
	add	w8, w8, w9
	sub	w0, w8, #4
	bl	_OUT_RING
	mov	w0, #0
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_OUT_RING
	bl	_ADVANCE_LP_RING
	add	x24, x24, #1
	add	x20, x20, #4
	cmp	x23, x24
	b.ne	LBB0_4
	b	LBB0_15
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #2
	bl	_BEGIN_LP_RING
	cbnz	w0, LBB0_20
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_INTEL_INFO
	ldr	w9, [x0]
	ldr	w8, [x25]
	cmp	w9, #4
	b.lt	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x26]
	orr	w8, w8, w9
	orr	w0, w8, #0x80
	bl	_OUT_RING
	ldr	w0, [x21, #4]
	b	LBB0_10
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	orr	w0, w8, #0x80
	bl	_OUT_RING
	ldr	w8, [x21, #4]
	ldr	w9, [x27]
	orr	w0, w9, w8
	b	LBB0_10
LBB0_15:
	mov	x0, x19
	bl	_IS_G4X
	cbnz	x0, LBB0_17
; %bb.16:
	mov	x0, x19
	bl	_IS_GEN5
	cbz	x0, LBB0_19
LBB0_17:
	mov	w0, #2
	bl	_BEGIN_LP_RING
	cbnz	w0, LBB0_19
; %bb.18:
Lloh13:
	adrp	x8, _MI_FLUSH@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MI_FLUSH@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _MI_NO_WRITE_FLUSH@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MI_NO_WRITE_FLUSH@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _MI_INVALIDATE_ISP@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MI_INVALIDATE_ISP@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_OUT_RING
Lloh22:
	adrp	x8, _MI_NOOP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MI_NOOP@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_OUT_RING
	bl	_ADVANCE_LP_RING
LBB0_19:
	mov	x0, x19
	bl	_i915_emit_breadcrumb
	mov	w0, #0
LBB0_20:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"alignment"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MI_BATCH_BUFFER_START,4,2      ; @MI_BATCH_BUFFER_START
	.comm	_MI_BATCH_NON_SECURE_I965,4,2   ; @MI_BATCH_NON_SECURE_I965
	.comm	_MI_BATCH_NON_SECURE,4,2        ; @MI_BATCH_NON_SECURE
	.comm	_MI_BATCH_BUFFER,4,2            ; @MI_BATCH_BUFFER
	.comm	_MI_FLUSH,4,2                   ; @MI_FLUSH
	.comm	_MI_NO_WRITE_FLUSH,4,2          ; @MI_NO_WRITE_FLUSH
	.comm	_MI_INVALIDATE_ISP,4,2          ; @MI_INVALIDATE_ISP
	.comm	_MI_NOOP,4,2                    ; @MI_NOOP
	.no_dead_strip	_i915_dispatch_batchbuffer
.subsections_via_symbols
