	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_cotable_resize
_vmw_cotable_resize:                    ## @vmw_cotable_resize
	.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
	subq	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	$0, -152(%rbp)
	movq	24(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_vmw_cotable
	movq	%rax, %r14
	movq	16(%r13), %r15
	movq	%r15, -136(%rbp)
	movq	(%r13), %r12
	movq	(%rax), %rbx
	movq	%r13, %rdi
	callq	_vmw_cotable_readback
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	%r13, -120(%rbp)                ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -112(%rbp)                ## 8-byte Spill
	movq	(%r14), %r12
	movq	%rbx, (%r14)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	movq	%rax, -144(%rbp)
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%r14, %r15
	movq	_vmw_bo_bo_free@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	_vmw_mob_ne_placement@GOTPCREL(%rip), %rcx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %r14
	movq	%rax, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	$1, %r8d
	callq	_vmw_bo_init
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %ebx
	callq	_DRM_ERROR
	jmp	LBB0_10
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_5:
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_ttm_bo_reserve
	movl	%eax, %edi
	callq	_WARN_ON_ONCE
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ttm_bo_wait
	xorl	%edi, %edi
	movl	%eax, %ebx
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
LBB0_7:
	callq	_DRM_ERROR
LBB0_8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_9:
	callq	_ttm_bo_unreserve
	leaq	-144(%rbp), %rdi
	callq	_vmw_bo_unreference
LBB0_10:
	movl	%ebx, %eax
LBB0_11:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	cmpq	$0, (%r12)
	je	LBB0_17
## %bb.13:
	xorl	%r14d, %r14d
	leaq	-56(%rbp), %rbx
	leaq	-128(%rbp), %r13
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	movq	%rbx, %r15
	movq	%rbx, %rcx
	callq	_ttm_bo_kmap
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	$1, %edx
	movq	%r13, %rcx
	callq	_ttm_bo_kmap
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r13, %rdi
	leaq	-60(%rbp), %rsi
	callq	_ttm_kmap_obj_virtual
	movq	%r13, %r12
	movl	%eax, %r13d
	movq	%r15, %rbx
	movq	%r15, %rdi
	leaq	-60(%rbp), %rsi
	callq	_ttm_kmap_obj_virtual
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%r13d, %edi
	movq	%r12, %r13
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_memcpy
	movq	%r13, %rdi
	callq	_ttm_bo_kunmap
	movq	%r15, %rdi
	callq	_ttm_bo_kunmap
	incq	%r14
	cmpq	(%r12), %r14
	jb	LBB0_14
LBB0_17:
	movq	_vmw_mob_placement@GOTPCREL(%rip), %rsi
	leaq	-152(%rbp), %rdx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_ttm_bo_validate
	xorl	%edi, %edi
	movl	%eax, %ebx
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	leaq	L_.str.4(%rip), %rdi
	callq	_DRM_ERROR
	movq	%r14, %rdi
	jmp	LBB0_9
LBB0_19:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_7
LBB0_20:
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_vmw_resource_mob_detach
	movq	%r14, 16(%rbx)
	movq	%rbx, %r14
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rbx)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	%rax, (%r15)
	movq	%rbx, %rdi
	callq	_vmw_cotable_unscrub
	testl	%eax, %eax
	je	LBB0_23
## %bb.21:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rdi
	callq	_DRM_ERROR
	movq	%r12, 16(%r14)
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	%rax, (%r14)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r15)
	movq	%r14, %rdi
	callq	_vmw_resource_mob_attach
	jmp	LBB0_8
LBB0_22:
	leaq	L_.str.3(%rip), %rdi
	callq	_DRM_ERROR
	leaq	-56(%rbp), %rdi
	callq	_ttm_bo_kunmap
	jmp	LBB0_8
LBB0_23:
	movq	%r14, %rdi
	callq	_vmw_resource_mob_attach
	leaq	-136(%rbp), %rdi
	callq	_vmw_bo_unreference
	movl	8(%r15), %eax
	movl	%eax, 8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vmw_mob_ne_placement,4,2       ## @vmw_mob_ne_placement
	.comm	_vmw_bo_bo_free,4,2             ## @vmw_bo_bo_free
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed initializing new cotable MOB.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed waiting for cotable unbind.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed mapping old COTable on resize.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed mapping new COTable on resize.\n"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_vmw_mob_placement,4,2          ## @vmw_mob_placement
L_.str.4:                               ## @.str.4
	.asciz	"Failed validating new COTable backup buffer.\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed switching COTable backup buffer.\n"

	.no_dead_strip	_vmw_cotable_resize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_cotable_resize
_vmw_cotable_resize:                    ; @vmw_cotable_resize
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x23, x1
	mov	x20, x0
	str	xzr, [sp, #40]
	ldr	x25, [x0, #24]
	bl	_vmw_cotable
	mov	x21, x0
	ldr	x22, [x20, #16]
	str	x22, [sp, #24]
	ldr	x26, [x20]
	ldr	x27, [x0]
	mov	x0, x20
	bl	_vmw_cotable_readback
	mov	x24, x0
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x24
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_2:
	ldr	x28, [x21]
	str	x27, [x21]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	str	x0, [sp, #32]
	cbz	x0, LBB0_5
; %bb.3:
	mov	x19, x0
Lloh3:
	adrp	x8, _vmw_bo_bo_free@GOTPAGE
Lloh4:
	ldr	x8, [x8, _vmw_bo_bo_free@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
Lloh6:
	adrp	x3, _vmw_mob_ne_placement@GOTPAGE
Lloh7:
	ldr	x3, [x3, _vmw_mob_ne_placement@GOTPAGEOFF]
	mov	x0, x25
	mov	x1, x19
	mov	x2, x23
	mov	w4, #1
	bl	_vmw_bo_init
	cbz	w0, LBB0_6
; %bb.4:
	mov	x24, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_1
LBB0_5:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_1
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	mov	x3, #0
	bl	_ttm_bo_reserve
	bl	_WARN_ON_ONCE
	mov	x0, x22
	mov	w1, #0
	mov	w2, #0
	bl	_ttm_bo_wait
	mov	x24, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.7:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_DRM_ERROR
LBB0_9:
	mov	x0, x19
	bl	_ttm_bo_unreserve
	add	x0, sp, #32
	bl	_vmw_bo_unreference
	b	LBB0_1
LBB0_10:
	ldr	x8, [x22]
	cbz	x8, LBB0_15
; %bb.11:
	mov	x25, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	x3, sp, #16
	mov	x0, x22
	mov	x1, x25
	mov	w2, #1
	bl	_ttm_bo_kmap
	mov	x24, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x25
	mov	w2, #1
	bl	_ttm_bo_kmap
	mov	x24, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_20
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x0, sp, #8
	add	x1, sp, #4
	bl	_ttm_kmap_obj_virtual
	mov	x24, x0
	add	x0, sp, #16
	add	x1, sp, #4
	bl	_ttm_kmap_obj_virtual
	mov	x1, x0
Lloh15:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x24
	bl	_memcpy
	add	x0, sp, #8
	bl	_ttm_bo_kunmap
	add	x0, sp, #16
	bl	_ttm_bo_kunmap
	add	x25, x25, #1
	ldr	x8, [x22]
	cmp	x25, x8
	b.lo	LBB0_12
LBB0_15:
Lloh18:
	adrp	x1, _vmw_mob_placement@GOTPAGE
Lloh19:
	ldr	x1, [x1, _vmw_mob_placement@GOTPAGEOFF]
	add	x2, sp, #40
	mov	x0, x19
	bl	_ttm_bo_validate
	mov	x24, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_18
; %bb.16:
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_8
LBB0_17:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_18:
	mov	x0, x20
	bl	_vmw_resource_mob_detach
	str	x19, [x20, #16]
	str	x23, [x20]
	str	x28, [x21]
	mov	x0, x20
	bl	_vmw_cotable_unscrub
	mov	x24, x0
	cbz	w0, LBB0_21
; %bb.19:
Lloh24:
	adrp	x0, l_.str.5@PAGE
Lloh25:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_ERROR
	str	x22, [x20, #16]
	str	x26, [x20]
	str	x27, [x21]
	mov	x0, x20
	bl	_vmw_resource_mob_attach
	b	LBB0_9
LBB0_20:
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
	add	x0, sp, #16
	bl	_ttm_bo_kunmap
	b	LBB0_9
LBB0_21:
	mov	x0, x20
	bl	_vmw_resource_mob_attach
	add	x0, sp, #24
	bl	_vmw_bo_unreference
	ldr	w8, [x21, #8]
	str	w8, [x20, #8]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vmw_mob_ne_placement,4,2       ; @vmw_mob_ne_placement
	.comm	_vmw_bo_bo_free,4,2             ; @vmw_bo_bo_free
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed initializing new cotable MOB.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed waiting for cotable unbind.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed mapping old COTable on resize.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed mapping new COTable on resize.\n"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_vmw_mob_placement,4,2          ; @vmw_mob_placement
l_.str.4:                               ; @.str.4
	.asciz	"Failed validating new COTable backup buffer.\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed switching COTable backup buffer.\n"

	.no_dead_strip	_vmw_cotable_resize
.subsections_via_symbols
