	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function submit_bo
_submit_bo:                             ## @submit_bo
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	cmpq	%rsi, %rax
	jbe	LBB0_1
## %bb.2:
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.3:
	movq	8(%rdi), %r9
	movq	%rsi, %rax
	shlq	$4, %rax
	movq	8(%r9,%rax), %rax
	movq	%rax, (%rdx)
LBB0_4:
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.5:
	movq	8(%rdi), %rax
	movq	%rsi, %rdx
	shlq	$4, %rdx
	movl	4(%rax,%rdx), %eax
	movl	%eax, (%rcx)
LBB0_6:
	xorl	%eax, %eax
	testq	%r8, %r8
	je	LBB0_8
## %bb.7:
	movq	8(%rdi), %rcx
	shlq	$4, %rsi
	movq	_BO_VALID@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%edi, %edi
	andl	(%rcx,%rsi), %edx
	setne	%dil
	movl	%edi, (%r8)
LBB0_8:
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rdx
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid buffer index: %u (out of %u)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BO_VALID,4,2                   ## @BO_VALID
	.no_dead_strip	_submit_bo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function submit_bo
_submit_bo:                             ; @submit_bo
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x8, [x0]
	cmp	x8, x1
	b.ls	LBB0_7
; %bb.1:
	cbz	x2, LBB0_3
; %bb.2:
	ldr	x8, [x0, #8]
	add	x8, x8, x1, lsl #4
	ldr	x8, [x8, #8]
	str	x8, [x2]
LBB0_3:
	cbz	x3, LBB0_5
; %bb.4:
	ldr	x8, [x0, #8]
	add	x8, x8, x1, lsl #4
	ldr	w8, [x8, #4]
	str	w8, [x3]
LBB0_5:
	mov	w8, #0
	cbz	x4, LBB0_8
; %bb.6:
	ldr	x9, [x0, #8]
	lsl	x10, x1, #4
	ldr	w9, [x9, x10]
Lloh0:
	adrp	x10, _BO_VALID@GOTPAGE
Lloh1:
	ldr	x10, [x10, _BO_VALID@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	cset	w9, ne
	str	w9, [x4]
	b	LBB0_8
LBB0_7:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x8
	bl	_DRM_ERROR
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_8:
	mov	x0, x8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid buffer index: %u (out of %u)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BO_VALID,4,2                   ; @BO_VALID
	.no_dead_strip	_submit_bo
.subsections_via_symbols
