	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_cotable_alloc              ## -- Begin function vmw_cotable_alloc
	.p2align	4, 0x90
_vmw_cotable_alloc:                     ## @vmw_cotable_alloc
	.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	$24, %rsp
	.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, %r14
	movq	%rdi, %r13
	movq	$1, -64(%rbp)
	movq	_cotable_acc_size@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	cmpq	$0, (%r15)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	$48, %edi
	callq	_ttm_round_pot
	movq	%rax, (%r15)
LBB0_2:
	movq	%r13, %rdi
	callq	_vmw_mem_glob
	movq	(%r15), %rsi
	leaq	-64(%rbp), %rdx
	movl	%eax, %edi
	callq	_ttm_mem_global_alloc
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	%ebx, %edi
	jmp	LBB0_12
LBB0_4:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_11
LBB0_6:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	leaq	16(%r12), %rbx
	movq	_vmw_cotable_free@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_vmw_cotable_func@GOTPCREL(%rip), %r8
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_vmw_resource_init
	movl	%eax, %r14d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.10:
	movq	%r12, %rdi
	callq	_kfree
LBB0_11:
	movq	%r13, %rdi
	callq	_vmw_mem_glob
	movq	(%r15), %rsi
	movl	%eax, %edi
	callq	_ttm_mem_global_free
	movl	%r14d, %edi
LBB0_12:
	callq	_ERR_PTR
	movq	%rax, %rbx
LBB0_13:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r12, %rdi
	addq	$40, %rdi
	callq	_INIT_LIST_HEAD
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	%r9, 16(%r12)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r8d, 24(%r12)
	movq	_co_info@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r9, %rcx
	shlq	$4, %rcx
	movl	(%rdi,%rcx), %esi
	movl	%r8d, %eax
	cltd
	idivl	%esi
	movslq	%eax, %rdx
	movq	8(%rdi,%rcx), %rax
	cmpq	%rdx, %rax
	jbe	LBB0_9
## %bb.8:
	imull	%eax, %esi
	leal	(%r8,%rsi), %eax
	decl	%eax
	movq	_PAGE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, 24(%r12)
LBB0_9:
	movabsq	$-4294967295, %rax              ## imm = 0xFFFFFFFF00000001
	movq	%rax, (%r12)
	movq	%r9, 8(%r12)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%r12)
	movq	_vmw_hw_cotable_destroy@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r12)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_cotable_acc_size,8,3           ## @cotable_acc_size
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vmw_cotable_free,4,2           ## @vmw_cotable_free
	.comm	_vmw_cotable_func,4,2           ## @vmw_cotable_func
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_co_info,8,3                    ## @co_info
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.comm	_vmw_hw_cotable_destroy,4,2     ## @vmw_hw_cotable_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function vmw_cotable_alloc
lCPI0_0:
	.long	1                               ; 0x1
	.long	4294967295                      ; 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_vmw_cotable_alloc
	.p2align	2
_vmw_cotable_alloc:                     ; @vmw_cotable_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	mov	w8, #1
	str	x8, [sp, #8]
Lloh0:
	adrp	x25, _cotable_acc_size@GOTPAGE
Lloh1:
	ldr	x25, [x25, _cotable_acc_size@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #48
	bl	_ttm_round_pot
	str	x0, [x25]
LBB0_2:
	mov	x0, x21
	bl	_vmw_mem_glob
	ldr	x1, [x25]
	add	x2, sp, #8
	bl	_ttm_mem_global_alloc
	mov	x22, x0
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x22
	b	LBB0_9
LBB0_4:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	mov	x22, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.5:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_8
LBB0_6:
	add	x23, x22, #16
Lloh8:
	adrp	x8, _vmw_cotable_free@GOTPAGE
Lloh9:
	ldr	x8, [x8, _vmw_cotable_free@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
Lloh11:
	adrp	x4, _vmw_cotable_func@GOTPAGE
Lloh12:
	ldr	x4, [x4, _vmw_cotable_func@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x23
	mov	w2, #1
	bl	_vmw_resource_init
	mov	x24, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.7:
	mov	x0, x22
	bl	_kfree
LBB0_8:
	mov	x0, x21
	bl	_vmw_mem_glob
	ldr	x1, [x25]
	bl	_ttm_mem_global_free
	mov	x0, x24
LBB0_9:
	bl	_ERR_PTR
	mov	x23, x0
LBB0_10:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_11:
	add	x0, x22, #40
	bl	_INIT_LIST_HEAD
	str	x20, [x22, #16]
Lloh13:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x22, #24]
Lloh16:
	adrp	x9, _co_info@GOTPAGE
Lloh17:
	ldr	x9, [x9, _co_info@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x10, x9, x20, lsl #4
	ldr	w9, [x10]
	sdiv	w11, w8, w9
	ldr	x10, [x10, #8]
	cmp	x10, w11, sxtw
	b.ls	LBB0_13
; %bb.12:
	madd	w8, w9, w10, w8
	sub	w8, w8, #1
Lloh19:
	adrp	x9, _PAGE_MASK@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PAGE_MASK@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	and	w8, w9, w8
	str	w8, [x22, #24]
LBB0_13:
Lloh22:
	adrp	x8, lCPI0_0@PAGE
Lloh23:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x22]
	str	x20, [x22, #8]
	str	x19, [x22, #32]
Lloh24:
	adrp	x8, _vmw_hw_cotable_destroy@GOTPAGE
Lloh25:
	ldr	x8, [x8, _vmw_hw_cotable_destroy@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	str	w8, [x22, #28]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdrp	Lloh22, Lloh24
	.loh AdrpLdr	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_cotable_acc_size,8,3           ; @cotable_acc_size
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vmw_cotable_free,4,2           ; @vmw_cotable_free
	.comm	_vmw_cotable_func,4,2           ; @vmw_cotable_func
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_co_info,8,3                    ; @co_info
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_vmw_hw_cotable_destroy,4,2     ; @vmw_hw_cotable_destroy
.subsections_via_symbols
