	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efipart_close
_efipart_close:                         ## @efipart_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
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_efiblk_get_pdinfo
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	decq	(%rax)
	jne	LBB0_5
## %bb.4:
	movq	$0, 16(%r14)
	movq	8(%r14), %rdi
	callq	_bcache_free
	movq	$0, 8(%r14)
LBB0_5:
	movq	(%rbx), %rax
	movq	(%rax), %rcx
	movq	_DEVT_DISK@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.7:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_disk_close                     ## TAILCALL
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DEVT_DISK,8,3                  ## @DEVT_DISK
	.no_dead_strip	_efipart_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efipart_close
_efipart_close:                         ; @efipart_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
	ldr	x19, [x0]
	cbz	x19, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_efiblk_get_pdinfo
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	ldr	x8, [x0]
	subs	x8, x8, #1
	str	x8, [x0]
	b.ne	LBB0_4
; %bb.3:
	str	xzr, [x20, #16]
	ldr	x0, [x20, #8]
	bl	_bcache_free
	str	xzr, [x20, #8]
LBB0_4:
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _DEVT_DISK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DEVT_DISK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_disk_close
LBB0_6:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DEVT_DISK,8,3                  ; @DEVT_DISK
	.no_dead_strip	_efipart_close
.subsections_via_symbols
