	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_close                      ## -- Begin function kvm_close
	.p2align	4, 0x90
_kvm_close:                             ## @kvm_close
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	cmpq	$0, 96(%rdi)
	je	LBB0_4
## %bb.3:
	movq	88(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
LBB0_4:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	js	LBB0_5
## %bb.6:
	callq	_close
	movl	%eax, %r14d
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %r14d
	jmp	LBB0_26
LBB0_5:
	xorl	%r14d, %r14d
LBB0_7:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	js	LBB0_9
## %bb.8:
	callq	_close
	orl	%eax, %r14d
LBB0_9:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	js	LBB0_11
## %bb.10:
	callq	_close
	orl	%eax, %r14d
LBB0_11:
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_free
LBB0_13:
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:
	callq	_free
LBB0_15:
	movq	40(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.16:
	callq	_free
LBB0_17:
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.18:
	callq	_free
LBB0_19:
	movq	56(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.20:
	callq	_free
LBB0_21:
	movq	64(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.22:
	callq	_free
LBB0_23:
	movq	72(%rbx), %rdi
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_25
## %bb.24:
	movl	80(%rbx), %esi
	callq	_munmap
LBB0_25:
	movq	%rbx, %rdi
	callq	_free
LBB0_26:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_close                      ; -- Begin function kvm_close
	.p2align	2
_kvm_close:                             ; @kvm_close
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_23
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #96]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x19, #88]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
LBB0_3:
	ldr	x0, [x19]
	tbnz	x0, #63, LBB0_25
; %bb.4:
	bl	_close
	mov	x20, x0
	ldr	x0, [x19, #8]
	tbnz	x0, #63, LBB0_6
LBB0_5:
	bl	_close
	orr	w20, w0, w20
LBB0_6:
	ldr	x0, [x19, #16]
	tbnz	x0, #63, LBB0_8
; %bb.7:
	bl	_close
	orr	w20, w0, w20
LBB0_8:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_10
; %bb.9:
	bl	_free
LBB0_10:
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_12
; %bb.11:
	bl	_free
LBB0_12:
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_14
; %bb.13:
	bl	_free
LBB0_14:
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_16
; %bb.15:
	bl	_free
LBB0_16:
	ldr	x0, [x19, #56]
	cbz	x0, LBB0_18
; %bb.17:
	bl	_free
LBB0_18:
	ldr	x0, [x19, #64]
	cbz	x0, LBB0_20
; %bb.19:
	bl	_free
LBB0_20:
	ldr	x0, [x19, #72]
Lloh0:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_22
; %bb.21:
	ldr	w1, [x19, #80]
	bl	_munmap
LBB0_22:
	mov	x0, x19
	bl	_free
	b	LBB0_24
LBB0_23:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _errno@GOTPAGE
Lloh7:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh8:
	str	w8, [x9]
	mov	w20, #-1
LBB0_24:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_25:
	mov	w20, #0
	ldr	x0, [x19, #8]
	tbz	x0, #63, LBB0_5
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
.subsections_via_symbols
