	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_agp_remove_client              ## -- Begin function agp_remove_client
	.p2align	4, 0x90
_agp_remove_client:                     ## @agp_remove_client
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	callq	_agp_find_controller_for_client
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_agp_find_client_in_controller
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.4:
	movq	%rax, 8(%rcx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	%rcx, (%rax)
	jmp	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_6:
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	$0, (%rax)
LBB0_8:
	movq	%rax, 8(%r15)
LBB0_9:
	decl	(%r15)
	movq	%r14, %rdi
	callq	_agp_remove_seg_from_client
	movq	%r14, %rdi
	callq	_kfree
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_agp_remove_client              ; -- Begin function agp_remove_client
	.p2align	2
_agp_remove_client:                     ; @agp_remove_client
	.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	x20, x0
	bl	_agp_find_controller_for_client
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x1, x20
	bl	_agp_find_client_in_controller
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	ldp	x9, x8, [x0]
	cbz	x9, LBB0_6
; %bb.3:
	str	x8, [x9, #8]
	cbz	x8, LBB0_9
; %bb.4:
	str	x9, [x8]
	b	LBB0_9
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_6:
	cbz	x8, LBB0_8
; %bb.7:
	str	xzr, [x8]
LBB0_8:
	str	x8, [x19, #8]
LBB0_9:
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	mov	x0, x20
	bl	_agp_remove_seg_from_client
	mov	x0, x20
	bl	_kfree
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
