	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apm_create_clone
_apm_create_clone:                      ## @apm_create_clone
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_M_APMDEV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$32, %edi
	callq	_malloc
	movq	%rax, %r12
	movq	%r15, 24(%rax)
	movq	%r14, 16(%rax)
	movq	_APM_EV_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	leaq	4(%r12), %rbx
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_bzero
	movq	_acpi_mutex@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_knlist_init_mtx
	movq	%r15, %rdi
	callq	_devtoname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_ACPI_EVF_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_3
LBB0_1:
	movq	_ACPI_EVF_DEVD@GOTPCREL(%rip), %rcx
	movq	_ACPI_EVF_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
LBB0_3:
	movl	%eax, (%r12)
	movq	_acpi@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_ACPI_LOCK
	movq	_entries@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_STAILQ_INSERT_TAIL
	movl	(%rbx), %edi
	callq	_ACPI_UNLOCK
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_M_APMDEV,4,2                   ## @M_APMDEV
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_APM_EV_NONE,4,2                ## @APM_EV_NONE
	.comm	_acpi_mutex,4,2                 ## @acpi_mutex
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"acpi"

	.comm	_ACPI_EVF_DEVD,4,2              ## @ACPI_EVF_DEVD
	.comm	_ACPI_EVF_WRITE,4,2             ## @ACPI_EVF_WRITE
	.comm	_ACPI_EVF_NONE,4,2              ## @ACPI_EVF_NONE
	.comm	_acpi,4,2                       ## @acpi
	.comm	_entries,4,2                    ## @entries
	.no_dead_strip	_apm_create_clone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apm_create_clone
_apm_create_clone:                      ; @apm_create_clone
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _M_APMDEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M_APMDEV@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _M_WAITOK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _M_WAITOK@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w0, #32
	bl	_malloc
	mov	x20, x0
	stp	x19, x21, [x0, #16]
Lloh6:
	adrp	x8, _APM_EV_NONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _APM_EV_NONE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	add	x22, x0, #4
	mov	x0, x22
	mov	w1, #4
	bl	_bzero
Lloh9:
	adrp	x1, _acpi_mutex@GOTPAGE
Lloh10:
	ldr	x1, [x1, _acpi_mutex@GOTPAGEOFF]
	mov	x0, x22
	bl	_knlist_init_mtx
	mov	x0, x21
	bl	_devtoname
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_strcmp
Lloh13:
	adrp	x8, _ACPI_EVF_DEVD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ACPI_EVF_DEVD@GOTPAGEOFF]
Lloh15:
	adrp	x9, _ACPI_EVF_WRITE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ACPI_EVF_WRITE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _ACPI_EVF_NONE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ACPI_EVF_NONE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	cmp	x0, #0
	csel	w8, w8, w9, eq
	str	w8, [x20]
Lloh22:
	adrp	x21, _acpi@GOTPAGE
Lloh23:
	ldr	x21, [x21, _acpi@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_ACPI_LOCK
Lloh24:
	adrp	x8, _entries@GOTPAGE
Lloh25:
	ldr	x8, [x8, _entries@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_STAILQ_INSERT_TAIL
	ldr	w0, [x21]
	bl	_ACPI_UNLOCK
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_M_APMDEV,4,2                   ; @M_APMDEV
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_APM_EV_NONE,4,2                ; @APM_EV_NONE
	.comm	_acpi_mutex,4,2                 ; @acpi_mutex
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"acpi"

	.comm	_ACPI_EVF_DEVD,4,2              ; @ACPI_EVF_DEVD
	.comm	_ACPI_EVF_WRITE,4,2             ; @ACPI_EVF_WRITE
	.comm	_ACPI_EVF_NONE,4,2              ; @ACPI_EVF_NONE
	.comm	_acpi,4,2                       ; @acpi
	.comm	_entries,4,2                    ; @entries
	.no_dead_strip	_apm_create_clone
.subsections_via_symbols
