	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nj_release
_nj_release:                            ## @nj_release
	.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
	movq	%rdi, %rbx
	cmpq	$0, 56(%rdi)
	je	LBB0_2
## %bb.1:
	leaq	68(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	callq	_nj_disable_hwirq
	movq	32(%rbx), %rdi
	movq	_ISDN_P_NONE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_mode_tiger
	movq	32(%rbx), %rdi
	addq	$24, %rdi
	movl	(%r15), %esi
	callq	_mode_tiger
	leaq	40(%rbx), %rdi
	callq	*48(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	64(%rbx), %edi
	movq	56(%rbx), %rsi
	callq	_release_region
	movq	$0, 56(%rbx)
LBB0_2:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	jle	LBB0_4
## %bb.3:
	movq	%rbx, %rsi
	callq	_free_irq
LBB0_4:
	cmpq	$0, 40(%rbx)
	je	LBB0_6
## %bb.5:
	leaq	40(%rbx), %rdi
	callq	_mISDN_unregister_device
LBB0_6:
	movq	32(%rbx), %rdi
	addq	$16, %rdi
	callq	_mISDN_freebchannel
	movq	32(%rbx), %rax
	movq	8(%rax), %rdi
	callq	_kfree
	movq	32(%rbx), %rax
	movq	(%rax), %rdi
	callq	_kfree
	movq	32(%rbx), %rdi
	addq	$40, %rdi
	callq	_mISDN_freebchannel
	movq	32(%rbx), %rax
	movq	32(%rax), %rdi
	callq	_kfree
	movq	32(%rbx), %rax
	movq	24(%rax), %rdi
	callq	_kfree
	movq	24(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.7:
	movq	_NJ_DMA_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %edi
	movl	16(%rbx), %ecx
	callq	_pci_free_consistent
LBB0_8:
	movq	_card_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_write_lock_irqsave
	leaq	12(%rbx), %rdi
	callq	_list_del
	movq	%r14, %rdi
	callq	_write_unlock_irqrestore
	movl	8(%rbx), %edi
	callq	_pci_clear_master
	movl	8(%rbx), %edi
	callq	_pci_disable_device
	movl	8(%rbx), %edi
	xorl	%esi, %esi
	callq	_pci_set_drvdata
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ISDN_P_NONE,4,2                ## @ISDN_P_NONE
	.comm	_NJ_DMA_SIZE,4,2                ## @NJ_DMA_SIZE
	.comm	_card_lock,4,2                  ## @card_lock
	.no_dead_strip	_nj_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nj_release
_nj_release:                            ; @nj_release
	.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	x8, [x0, #56]
	cbz	x8, LBB0_2
; %bb.1:
	add	x20, x19, #68
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_nj_disable_hwirq
	ldr	x0, [x19, #32]
Lloh0:
	adrp	x21, _ISDN_P_NONE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ISDN_P_NONE@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_mode_tiger
	ldr	x8, [x19, #32]
	add	x0, x8, #24
	ldr	w1, [x21]
	bl	_mode_tiger
	add	x0, x19, #40
	ldr	x8, [x19, #48]
	blr	x8
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #64]
	ldr	x1, [x19, #56]
	bl	_release_region
	str	xzr, [x19, #56]
LBB0_2:
	ldr	x0, [x19]
	cmp	x0, #1
	b.lt	LBB0_4
; %bb.3:
	mov	x1, x19
	bl	_free_irq
LBB0_4:
	mov	x0, x19
	ldr	x8, [x0, #40]!
	cbz	x8, LBB0_6
; %bb.5:
	bl	_mISDN_unregister_device
LBB0_6:
	ldr	x8, [x19, #32]
	add	x0, x8, #16
	bl	_mISDN_freebchannel
	ldr	x8, [x19, #32]
	ldr	x0, [x8, #8]
	bl	_kfree
	ldr	x8, [x19, #32]
	ldr	x0, [x8]
	bl	_kfree
	ldr	x8, [x19, #32]
	add	x0, x8, #40
	bl	_mISDN_freebchannel
	ldr	x8, [x19, #32]
	ldr	x0, [x8, #32]
	bl	_kfree
	ldr	x8, [x19, #32]
	ldr	x0, [x8, #24]
	bl	_kfree
	ldr	x2, [x19, #24]
	cbz	x2, LBB0_8
; %bb.7:
	ldr	w0, [x19, #8]
Lloh2:
	adrp	x8, _NJ_DMA_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NJ_DMA_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w3, [x19, #16]
	bl	_pci_free_consistent
LBB0_8:
Lloh5:
	adrp	x20, _card_lock@GOTPAGE
Lloh6:
	ldr	x20, [x20, _card_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_write_lock_irqsave
	add	x0, x19, #12
	bl	_list_del
	mov	x0, x20
	bl	_write_unlock_irqrestore
	ldr	w0, [x19, #8]
	bl	_pci_clear_master
	ldr	w0, [x19, #8]
	bl	_pci_disable_device
	ldr	w0, [x19, #8]
	mov	x1, #0
	bl	_pci_set_drvdata
	mov	x0, x19
	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
	b	_kfree
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ISDN_P_NONE,4,2                ; @ISDN_P_NONE
	.comm	_NJ_DMA_SIZE,4,2                ; @NJ_DMA_SIZE
	.comm	_card_lock,4,2                  ; @card_lock
	.no_dead_strip	_nj_release
.subsections_via_symbols
