	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dev_irnet_close
_dev_irnet_close:                       ## @dev_irnet_close
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rsi), %rbx
	movq	_FS_TRACE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	movq	%rbx, %rcx
	callq	_DENTER
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	movq	_FS_ERROR@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	L_.str.1(%rip), %rcx
	xorl	%esi, %esi
	callq	_DABORT
	movq	$0, (%r14)
	movq	%rbx, %rdi
	callq	_irda_irnet_destroy
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_DERROR
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	callq	_ppp_unregister_channel
LBB0_2:
	movq	%rbx, %rdi
	callq	_kfree
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_DEXIT
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FS_TRACE,4,2                   ## @FS_TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(file=0x%p, ap=0x%p)\n"

	.comm	_FS_ERROR,4,2                   ## @FS_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"ap is NULL !!!\n"

L_.str.2:                               ## @.str.2
	.asciz	"Channel still registered - deregistering !\n"

L_.str.3:                               ## @.str.3
	.asciz	"\n"

	.no_dead_strip	_dev_irnet_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dev_irnet_close
_dev_irnet_close:                       ; @dev_irnet_close
	.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	x20, x1
	ldr	x19, [x1]
Lloh0:
	adrp	x21, _FS_TRACE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FS_TRACE@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_DENTER
	cmp	x19, #0
	cset	w0, eq
Lloh4:
	adrp	x22, _FS_ERROR@GOTPAGE
Lloh5:
	ldr	x22, [x22, _FS_ERROR@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh6:
	adrp	x3, l_.str.1@PAGE
Lloh7:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w1, #0
	bl	_DABORT
	str	xzr, [x20]
	mov	x0, x19
	bl	_irda_irnet_destroy
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x22]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_DERROR
	str	xzr, [x19, #8]
	mov	x0, x19
	bl	_ppp_unregister_channel
LBB0_2:
	mov	x0, x19
	bl	_kfree
	ldr	w0, [x21]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_DEXIT
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_FS_TRACE,4,2                   ; @FS_TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(file=0x%p, ap=0x%p)\n"

	.comm	_FS_ERROR,4,2                   ; @FS_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"ap is NULL !!!\n"

l_.str.2:                               ; @.str.2
	.asciz	"Channel still registered - deregistering !\n"

l_.str.3:                               ; @.str.3
	.asciz	"\n"

	.no_dead_strip	_dev_irnet_close
.subsections_via_symbols
