	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function agp_remove_controller
_agp_remove_controller:                 ## @agp_remove_controller
	.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, %rbx
	movq	(%rdi), %rcx
	movq	8(%rdi), %rax
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.1:
	movq	%rax, 8(%rcx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rcx, (%rax)
	jmp	LBB0_6
LBB0_3:
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	$0, (%rax)
LBB0_5:
	movq	_agp_fe@GOTPCREL(%rip), %rcx
	movq	%rax, 16(%rcx)
LBB0_6:
	movq	%rbx, %rdi
	callq	_agp_remove_all_memory
	movq	%rbx, %rdi
	callq	_agp_remove_all_clients
	movq	_agp_fe@GOTPCREL(%rip), %rax
	cmpq	%rbx, 8(%rax)
	jne	LBB0_8
## %bb.7:
	movq	$0, 8(%rax)
	movl	$0, (%rax)
	movq	_agp_bridge@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_agp_backend_release
LBB0_8:
	movq	%rbx, %rdi
	callq	_kfree
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_agp_fe,24,3                    ## @agp_fe
	.comm	_agp_bridge,4,2                 ## @agp_bridge
	.no_dead_strip	_agp_remove_controller
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function agp_remove_controller
_agp_remove_controller:                 ; @agp_remove_controller
	.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
	mov	x19, x0
	ldp	x9, x8, [x0]
Lloh0:
	adrp	x20, _agp_fe@GOTPAGE
Lloh1:
	ldr	x20, [x20, _agp_fe@GOTPAGEOFF]
	cbz	x9, LBB0_3
; %bb.1:
	str	x8, [x9, #8]
	cbz	x8, LBB0_6
; %bb.2:
	str	x9, [x8]
	b	LBB0_6
LBB0_3:
	cbz	x8, LBB0_5
; %bb.4:
	str	xzr, [x8]
LBB0_5:
	str	x8, [x20, #16]
LBB0_6:
	mov	x0, x19
	bl	_agp_remove_all_memory
	mov	x0, x19
	bl	_agp_remove_all_clients
	ldr	x8, [x20, #8]
	cmp	x8, x19
	b.ne	LBB0_8
; %bb.7:
	str	xzr, [x20, #8]
	str	wzr, [x20]
Lloh2:
	adrp	x8, _agp_bridge@GOTPAGE
Lloh3:
	ldr	x8, [x8, _agp_bridge@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_agp_backend_release
LBB0_8:
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_agp_fe,24,3                    ; @agp_fe
	.comm	_agp_bridge,4,2                 ; @agp_bridge
	.no_dead_strip	_agp_remove_controller
.subsections_via_symbols
