	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_validation_add_bo          ## -- Begin function vmw_validation_add_bo
	.p2align	4, 0x90
_vmw_validation_add_bo:                 ## @vmw_validation_add_bo
	.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	%ecx, %ebx
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_vmw_validation_find_bo_dup
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	cmpl	%r14d, (%rax)
	jne	LBB0_3
## %bb.2:
	xorl	%r14d, %r14d
	cmpl	%ebx, 4(%rax)
	je	LBB0_13
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	%r12, %rdi
	movl	$40, %esi
	callq	_vmw_validation_mem_alloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:
	movq	%rax, %r13
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.8:
	leaq	32(%r13), %rsi
	movq	%r15, 32(%r13)
	callq	_drm_ht_insert_item
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_13
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_10:
	movq	%r15, %rdi
	callq	_ttm_bo_get_unless_zero
	movl	%eax, 24(%r13)
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movq	%r13, %rdi
	addq	$8, %rdi
	movq	$0, 16(%r13)
	movq	%r12, %rsi
	callq	_list_add_tail
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r13)
	movl	%ebx, 4(%r13)
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_11:
	movq	_ESRCH@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_13:
	movl	%r14d, %eax
	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	"Inconsistent buffer usage.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Failed to initialize a buffer validation entry.\n"

	.comm	_ESRCH,4,2                      ## @ESRCH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_validation_add_bo          ; -- Begin function vmw_validation_add_bo
	.p2align	2
_vmw_validation_add_bo:                 ; @vmw_validation_add_bo
	.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	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	bl	_vmw_validation_find_bo_dup
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [x0]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.2:
	ldr	w8, [x0, #4]
	cmp	w8, w19
	b.ne	LBB0_4
; %bb.3:
	mov	w24, #0
	b	LBB0_14
LBB0_4:
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]
	b	LBB0_13
LBB0_5:
	mov	x0, x21
	mov	w1, #40
	bl	_vmw_validation_mem_alloc
	cbz	x0, LBB0_9
; %bb.6:
	mov	x23, x0
	ldr	x0, [x21, #8]
	cbz	x0, LBB0_10
; %bb.7:
	mov	x1, x23
	str	x22, [x1, #32]!
	bl	_drm_ht_insert_item
	cbz	w0, LBB0_10
; %bb.8:
	mov	x24, x0
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_14
LBB0_9:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_13
LBB0_10:
	mov	x0, x22
	bl	_ttm_bo_get_unless_zero
	str	w0, [x23, #24]
	cbz	w0, LBB0_12
; %bb.11:
	add	x0, x23, #8
	str	xzr, [x23, #16]
	mov	x1, x21
	bl	_list_add_tail
	mov	w24, #0
	stp	w20, w19, [x23]
	b	LBB0_14
LBB0_12:
Lloh8:
	adrp	x8, _ESRCH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_14:
	mov	x0, x24
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Inconsistent buffer usage.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Failed to initialize a buffer validation entry.\n"

	.comm	_ESRCH,4,2                      ; @ESRCH
.subsections_via_symbols
