	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmtcp_remove_persistent
_atmtcp_remove_persistent:              ## @atmtcp_remove_persistent
	.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
	callq	_atm_dev_lookup
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	(%rax), %rax
	cmpq	_atmtcp_v_dev_ops@GOTPCREL(%rip), %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_atm_dev_put
	movq	_EMEDIUMTYPE@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	callq	_PRIV
	xorl	%r14d, %r14d
	cmpq	$0, 8(%rax)
	je	LBB0_8
## %bb.6:
	movq	%rax, %r15
	movq	$0, 8(%rax)
	movq	%rbx, %rdi
	callq	_PRIV
	cmpq	$0, (%rax)
	jne	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_kfree
	movq	%rbx, %rdi
	callq	_atm_dev_put
	movq	%rbx, %rdi
	callq	_atm_dev_deregister
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_atmtcp_v_dev_ops,4,2           ## @atmtcp_v_dev_ops
	.comm	_EMEDIUMTYPE,4,2                ## @EMEDIUMTYPE
	.no_dead_strip	_atmtcp_remove_persistent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmtcp_remove_persistent
_atmtcp_remove_persistent:              ; @atmtcp_remove_persistent
	.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
	bl	_atm_dev_lookup
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _atmtcp_v_dev_ops@GOTPAGE
Lloh1:
	ldr	x9, [x9, _atmtcp_v_dev_ops@GOTPAGEOFF]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_atm_dev_put
Lloh2:
	adrp	x8, _EMEDIUMTYPE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EMEDIUMTYPE@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	mov	x0, x19
	bl	_PRIV
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_8
; %bb.6:
	mov	x20, x0
	str	xzr, [x0, #8]
	mov	x0, x19
	bl	_PRIV
	ldr	x8, [x0]
	cbnz	x8, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_kfree
	mov	x0, x19
	bl	_atm_dev_put
	mov	x0, x19
	bl	_atm_dev_deregister
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_atmtcp_v_dev_ops,4,2           ; @atmtcp_v_dev_ops
	.comm	_EMEDIUMTYPE,4,2                ; @EMEDIUMTYPE
	.no_dead_strip	_atmtcp_remove_persistent
.subsections_via_symbols
