	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_os_unmap_generic_address  ## -- Begin function acpi_os_unmap_generic_address
	.p2align	4, 0x90
_acpi_os_unmap_generic_address:         ## @acpi_os_unmap_generic_address
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rdi), %rax
	movq	_ACPI_ADR_SPACE_SYSTEM_MEMORY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	leaq	12(%rdi), %rsi
	leaq	-12(%rbp), %rdi
	movl	$4, %edx
	callq	_memcpy
	cmpl	$0, -12(%rbp)
	je	LBB0_6
## %bb.2:
	cmpl	$0, 8(%rbx)
	je	LBB0_6
## %bb.3:
	movq	_acpi_ioremap_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	-12(%rbp), %edi
	movl	8(%rbx), %eax
	leal	7(%rax), %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$3, %esi
	callq	_acpi_map_lookup
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_acpi_os_drop_map_ref
	movq	_acpi_ioremap_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_acpi_os_map_cleanup
	jmp	LBB0_6
LBB0_4:
	movq	_acpi_ioremap_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_ADR_SPACE_SYSTEM_MEMORY,8,3 ## @ACPI_ADR_SPACE_SYSTEM_MEMORY
	.comm	_acpi_ioremap_lock,4,2          ## @acpi_ioremap_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_os_unmap_generic_address  ; -- Begin function acpi_os_unmap_generic_address
	.p2align	2
_acpi_os_unmap_generic_address:         ; @acpi_os_unmap_generic_address
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _ACPI_ADR_SPACE_SYSTEM_MEMORY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ACPI_ADR_SPACE_SYSTEM_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
	mov	x19, x0
	add	x1, x0, #12
	add	x0, sp, #12
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_6
; %bb.3:
Lloh3:
	adrp	x0, _acpi_ioremap_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _acpi_ioremap_lock@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w0, [sp, #12]
	ldr	w8, [x19, #8]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w1, w8, #3
	bl	_acpi_map_lookup
	cbz	x0, LBB0_5
; %bb.4:
	mov	x19, x0
	bl	_acpi_os_drop_map_ref
Lloh5:
	adrp	x0, _acpi_ioremap_lock@GOTPAGE
Lloh6:
	ldr	x0, [x0, _acpi_ioremap_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x19
	bl	_acpi_os_map_cleanup
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x0, _acpi_ioremap_lock@GOTPAGE
Lloh8:
	ldr	x0, [x0, _acpi_ioremap_lock@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_ADR_SPACE_SYSTEM_MEMORY,8,3 ; @ACPI_ADR_SPACE_SYSTEM_MEMORY
	.comm	_acpi_ioremap_lock,4,2          ; @acpi_ioremap_lock
.subsections_via_symbols
