	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function savage_do_cleanup_bci
_savage_do_cleanup_bci:                 ## @savage_do_cleanup_bci
	.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, %r14
	movq	8(%rdi), %rbx
	movq	16(%rbx), %rdi
	leaq	24(%rbx), %rax
	cmpq	%rax, %rdi
	je	LBB0_1
## %bb.2:
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.3:
	cmpq	$0, 8(%rdi)
	je	LBB0_7
## %bb.4:
	movq	(%rdi), %rax
	movq	__DRM_AGP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movq	(%rbx), %rax
	movq	_SAVAGE_DMA_AGP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rsi
	callq	_drm_core_ioremapfree
	jmp	LBB0_7
LBB0_1:
	movq	32(%rbx), %rdi
	callq	_kfree
LBB0_7:
	movq	(%rbx), %rax
	movq	_SAVAGE_DMA_AGP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.8:
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.9:
	cmpq	$0, 8(%rdi)
	je	LBB0_11
## %bb.10:
	movq	%r14, %rsi
	callq	_drm_core_ioremapfree
	movq	$0, (%r14)
LBB0_11:
	movq	8(%rbx), %rdi
	callq	_kfree
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__DRM_AGP,8,3                   ## @_DRM_AGP
	.comm	_SAVAGE_DMA_AGP,8,3             ## @SAVAGE_DMA_AGP
	.no_dead_strip	_savage_do_cleanup_bci
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function savage_do_cleanup_bci
_savage_do_cleanup_bci:                 ; @savage_do_cleanup_bci
	.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, x0
	ldr	x20, [x0, #8]
	ldr	x0, [x20, #16]
	add	x8, x20, #24
Lloh0:
	adrp	x21, _SAVAGE_DMA_AGP@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SAVAGE_DMA_AGP@GOTPAGEOFF]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.1:
	cbz	x0, LBB0_7
; %bb.2:
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_7
; %bb.3:
	ldr	x8, [x0]
Lloh2:
	adrp	x9, __DRM_AGP@GOTPAGE
Lloh3:
	ldr	x9, [x9, __DRM_AGP@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	mov	x1, x19
	bl	_drm_core_ioremapfree
	b	LBB0_7
LBB0_6:
	ldr	x0, [x20, #32]
	bl	_kfree
LBB0_7:
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.8:
	ldr	x0, [x19]
	cbz	x0, LBB0_11
; %bb.9:
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x1, x19
	bl	_drm_core_ioremapfree
	str	xzr, [x19]
LBB0_11:
	ldr	x0, [x20, #8]
	bl	_kfree
	mov	w0, #0
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	__DRM_AGP,8,3                   ; @_DRM_AGP
	.comm	_SAVAGE_DMA_AGP,8,3             ; @SAVAGE_DMA_AGP
	.no_dead_strip	_savage_do_cleanup_bci
.subsections_via_symbols
