	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_query_bo_switch_prepare
_vmw_query_bo_switch_prepare:           ## @vmw_query_bo_switch_prepare
	.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, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	24(%rdx), %r13
	movq	_vmw_res_context@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	xorl	%edi, %edi
	cmpl	$0, 4(%r13,%rbx,8)
	sete	%dil
	callq	_BUG_ON
	movl	(%r13,%rbx,8), %eax
	movl	%eax, 16(%r12)
	xorl	%edi, %edi
	cmpq	%r15, 8(%r12)
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	xorl	%edi, %edi
	cmpl	$5, (%r15)
	setge	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_VMW_DEBUG_USER
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_3:
	xorl	%edi, %edi
	cmpq	$0, 8(%r12)
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	$1, (%r12)
	movl	4(%r12), %edi
	movq	8(%r12), %rsi
	movl	(%r14), %edx
	xorl	%ecx, %ecx
	callq	_vmw_validation_add_bo
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
LBB0_5:
	movq	%r15, 8(%r12)
	movl	4(%r12), %edi
	movq	8(%r14), %rsi
	movl	(%r14), %edx
	xorl	%ecx, %ecx
	callq	_vmw_validation_add_bo
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vmw_res_context,8,3            ## @vmw_res_context
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Query buffer too large.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vmw_query_bo_switch_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_query_bo_switch_prepare
_vmw_query_bo_switch_prepare:           ; @vmw_query_bo_switch_prepare
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _vmw_res_context@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vmw_res_context@GOTPAGEOFF]
	ldr	x9, [x2, #24]
Lloh2:
	ldr	x8, [x8]
	add	x22, x9, x8, lsl #3
	ldr	w8, [x22, #4]
	cmp	w8, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	w8, [x22]
	str	w8, [x20, #16]
	ldr	x8, [x20, #8]
	cmp	x8, x21
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, #4
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_VMW_DEBUG_USER
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_3:
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.4:
	mov	w8, #1
	str	w8, [x20]
	ldr	w0, [x20, #4]
	ldr	x1, [x20, #8]
	ldr	w2, [x19]
	mov	w3, #0
	bl	_vmw_validation_add_bo
	mov	x22, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_7
LBB0_5:
	str	x21, [x20, #8]
	ldr	w0, [x20, #4]
	ldr	x1, [x19, #8]
	ldr	w2, [x19]
	mov	w3, #0
	bl	_vmw_validation_add_bo
	mov	x22, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_7
LBB0_6:
	mov	w22, #0
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_vmw_res_context,8,3            ; @vmw_res_context
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Query buffer too large.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vmw_query_bo_switch_prepare
.subsections_via_symbols
