	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_bus_trim                  ## -- Begin function acpi_bus_trim
	.p2align	4, 0x90
_acpi_bus_trim:                         ## @acpi_bus_trim
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -64(%rbp)
	xorl	%eax, %eax
	movl	$1, %ecx
	movq	_ACPI_TYPE_ANY@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %rbx
	leaq	-84(%rbp), %r15
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	testq	%rcx, %rcx
	setg	%cl
	testq	%r12, %r12
	setne	%r14b
	andb	%cl, %r14b
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%eax, %eax
	sete	%cl
	andb	%r14b, %cl
	cmpb	$1, %cl
	jne	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	(%r13), %edi
	movq	-56(%rbp), %rsi
	movq	-48(%rbp), %rdx
	movq	%rbx, %rcx
	callq	_acpi_get_next_object
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	jne	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	-48(%rbp), %rdi
	movq	%r15, %rsi
	callq	_acpi_get_type
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_2
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	-48(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_acpi_bus_get_device
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_2
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movq	-48(%rbp), %rax
	movq	%rax, -56(%rbp)
	movq	$0, -48(%rbp)
	xorl	%eax, %eax
	movq	-64(%rbp), %r12
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rdi
	movq	%rdi, -48(%rbp)
	leaq	-56(%rbp), %rsi
	callq	_acpi_get_parent
	movq	%r12, -64(%rbp)
	movq	(%r12), %r14
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, %rdi
	decq	%rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %esi
	movq	%rax, %r12
	callq	_acpi_bus_remove
	movq	%r12, %rcx
                                        ## kill: def $eax killed $eax def $rax
	movq	%r14, %r12
	jmp	LBB0_1
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	callq	_acpi_bus_remove
                                        ## kill: def $eax killed $eax def $rax
	movq	%r14, %r12
	xorl	%ecx, %ecx
	jmp	LBB0_1
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_TYPE_ANY,4,2              ## @ACPI_TYPE_ANY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_bus_trim                  ; -- Begin function acpi_bus_trim
	.p2align	2
_acpi_bus_trim:                         ; @acpi_bus_trim
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x1
	mov	x20, x0
	mov	w0, #0
	ldr	x8, [x20, #8]
	stp	xzr, x8, [sp, #8]
	str	xzr, [sp, #24]
	mov	w22, #1
Lloh0:
	adrp	x21, _ACPI_TYPE_ANY@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ACPI_TYPE_ANY@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
	cmp	x22, #0
	ccmp	x20, #0, #4, gt
	cset	w23, ne
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w0, #0
	cset	w8, eq
	and	w8, w23, w8
	cmp	w8, #1
	b.ne	LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	w0, [x21]
	ldp	x2, x1, [sp, #8]
	add	x3, sp, #8
	bl	_acpi_get_next_object
	bl	_ACPI_FAILURE
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	x0, [sp, #8]
	add	x1, sp, #4
	bl	_acpi_get_type
	bl	_ACPI_FAILURE
	mov	x8, x0
	mov	w0, #0
	cbnz	x8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	x0, [sp, #8]
	add	x1, sp, #24
	bl	_acpi_bus_get_device
	mov	x8, x0
	mov	w0, #0
	cbnz	x8, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #0
	add	x22, x22, #1
	ldr	x8, [sp, #8]
	stp	xzr, x8, [sp, #8]
	ldr	x20, [sp, #24]
	b	LBB0_1
LBB0_7:                                 ;   in Loop: Header=BB0_1 Depth=1
	sub	x22, x22, #1
	ldr	x0, [sp, #16]
	str	x0, [sp, #8]
	add	x1, sp, #16
	bl	_acpi_get_parent
	str	x20, [sp, #24]
	ldr	x23, [x20]
	cbz	x22, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	mov	w1, #1
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	mov	x1, x19
LBB0_10:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_acpi_bus_remove
	mov	x20, x23
	b	LBB0_1
LBB0_11:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_TYPE_ANY,4,2              ; @ACPI_TYPE_ANY
.subsections_via_symbols
