	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmd_handler_mi_batch_buffer_end
_cmd_handler_mi_batch_buffer_end:       ## @cmd_handler_mi_batch_buffer_end
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_BATCH_BUFFER_2ND_LEVEL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.4:
	movq	_BATCH_BUFFER_INSTRUCTION@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	8(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_ip_gma_set
	movl	44(%rbx), %ecx
	movl	%ecx, 40(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	_RING_BUFFER_INSTRUCTION@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	_GTT_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	16(%rbx), %rsi
	movq	32(%rbx), %rax
	movq	24(%rbx), %rcx
	addq	%rax, %rcx
	cmpq	%rcx, %rsi
	jl	LBB0_3
## %bb.2:
	subq	%rax, %rsi
	movq	%rsi, 16(%rbx)
LBB0_3:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ip_gma_set                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BATCH_BUFFER_2ND_LEVEL,8,3     ## @BATCH_BUFFER_2ND_LEVEL
	.comm	_BATCH_BUFFER_INSTRUCTION,8,3   ## @BATCH_BUFFER_INSTRUCTION
	.comm	_RING_BUFFER_INSTRUCTION,8,3    ## @RING_BUFFER_INSTRUCTION
	.comm	_GTT_BUFFER,4,2                 ## @GTT_BUFFER
	.no_dead_strip	_cmd_handler_mi_batch_buffer_end
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmd_handler_mi_batch_buffer_end
_cmd_handler_mi_batch_buffer_end:       ; @cmd_handler_mi_batch_buffer_end
	.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	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _BATCH_BUFFER_2ND_LEVEL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BATCH_BUFFER_2ND_LEVEL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _BATCH_BUFFER_INSTRUCTION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BATCH_BUFFER_INSTRUCTION@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x19]
	ldr	x1, [x19, #8]
	mov	x0, x19
	bl	_ip_gma_set
	ldr	w8, [x19, #44]
	str	w8, [x19, #40]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh6:
	adrp	x8, _RING_BUFFER_INSTRUCTION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RING_BUFFER_INSTRUCTION@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh9:
	adrp	x8, _GTT_BUFFER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GTT_BUFFER@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	ldp	x1, x9, [x19, #16]
	ldr	x8, [x19, #32]
	add	x9, x8, x9
	cmp	x1, x9
	b.lt	LBB0_4
; %bb.3:
	sub	x1, x1, x8
	str	x1, [x19, #16]
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ip_gma_set
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BATCH_BUFFER_2ND_LEVEL,8,3     ; @BATCH_BUFFER_2ND_LEVEL
	.comm	_BATCH_BUFFER_INSTRUCTION,8,3   ; @BATCH_BUFFER_INSTRUCTION
	.comm	_RING_BUFFER_INSTRUCTION,8,3    ; @RING_BUFFER_INSTRUCTION
	.comm	_GTT_BUFFER,4,2                 ; @GTT_BUFFER
	.no_dead_strip	_cmd_handler_mi_batch_buffer_end
.subsections_via_symbols
