	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gigaset_freecs                 ## -- Begin function gigaset_freecs
	.p2align	4, 0x90
_gigaset_freecs:                        ## @gigaset_freecs
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, 16(%r12)
	je	LBB0_14
## %bb.2:
	cmpq	$0, 24(%r12)
	je	LBB0_13
## %bb.3:
	leaq	56(%r12), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	$0, 64(%r12)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	leaq	52(%r12), %rdi
	callq	_tasklet_kill
	leaq	48(%r12), %rdi
	callq	_del_timer_sync
	movl	(%r12), %eax
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	cmpl	$1, %eax
	je	LBB0_8
## %bb.5:
	cmpl	$2, %eax
	je	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	callq	_gigaset_free_dev_sysfs
	movq	%r12, %rdi
	callq	_gigaset_if_free
	movq	_DEBUG_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_gig_dbg
	movq	40(%r12), %rax
	movq	%r12, %rdi
	callq	*(%rax)
LBB0_7:
	movq	_VALID_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_make_invalid
	movq	_DEBUG_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_gig_dbg
	movq	_ISDN_STAT_UNLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_gigaset_i4l_cmd
LBB0_8:
	movq	_DEBUG_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_gig_dbg
	leaq	32(%r12), %rdi
	callq	_clear_at_state
	movq	%r12, %rdi
	callq	_dealloc_at_states
LBB0_9:
	cmpl	$0, 4(%r12)
	jle	LBB0_12
## %bb.10:
	movq	_DEBUG_INIT@GOTPCREL(%rip), %r13
	leaq	L_.str.3(%rip), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movq	%r15, %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_gig_dbg
	movq	16(%r12), %rdi
	addq	%rbx, %rdi
	callq	_gigaset_freebcs
	incq	%rbx
	movslq	4(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_11
LBB0_12:
	movq	%r12, %rdi
	callq	_clear_events
	movq	_DEBUG_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_gig_dbg
	movq	24(%r12), %rdi
	callq	_kfree
LBB0_13:
	movq	_DEBUG_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_gig_dbg
	movq	16(%r12), %rdi
	callq	_kfree
LBB0_14:
	movq	_DEBUG_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_gig_dbg
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free_cs                        ## TAILCALL
LBB0_15:
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_INIT,4,2                 ## @DEBUG_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clearing hw"

	.comm	_VALID_ID,4,2                   ## @VALID_ID
L_.str.1:                               ## @.str.1
	.asciz	"clearing iif"

	.comm	_ISDN_STAT_UNLOAD,4,2           ## @ISDN_STAT_UNLOAD
L_.str.2:                               ## @.str.2
	.asciz	"clearing at_state"

L_.str.3:                               ## @.str.3
	.asciz	"clearing bcs[%d]"

L_.str.4:                               ## @.str.4
	.asciz	"freeing inbuf"

L_.str.5:                               ## @.str.5
	.asciz	"freeing bcs[]"

L_.str.6:                               ## @.str.6
	.asciz	"freeing cs"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gigaset_freecs                 ; -- Begin function gigaset_freecs
	.p2align	2
_gigaset_freecs:                        ; @gigaset_freecs
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_15
; %bb.1:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	add	x20, x0, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x22, _DEBUG_INIT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DEBUG_INIT@GOTPAGEOFF]
	cbz	x8, LBB0_14
; %bb.2:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_13
; %bb.3:
	add	x21, x19, #56
	mov	x0, x21
	bl	_spin_lock_irqsave
	str	xzr, [x19, #64]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	add	x0, x19, #52
	bl	_tasklet_kill
	add	x0, x19, #48
	bl	_del_timer_sync
	ldr	w8, [x19]
	cbz	w8, LBB0_9
; %bb.4:
	cmp	w8, #1
	b.eq	LBB0_8
; %bb.5:
	cmp	w8, #2
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_gigaset_free_dev_sysfs
	mov	x0, x19
	bl	_gigaset_if_free
	ldr	w0, [x22]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_gig_dbg
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
LBB0_7:
Lloh4:
	adrp	x8, _VALID_ID@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VALID_ID@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_make_invalid
	ldr	w0, [x22]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_gig_dbg
Lloh9:
	adrp	x8, _ISDN_STAT_UNLOAD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ISDN_STAT_UNLOAD@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gigaset_i4l_cmd
LBB0_8:
	ldr	w0, [x22]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_gig_dbg
	add	x0, x19, #32
	bl	_clear_at_state
	mov	x0, x19
	bl	_dealloc_at_states
LBB0_9:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x23, #0
Lloh14:
	adrp	x21, l_.str.3@PAGE
Lloh15:
	add	x21, x21, l_.str.3@PAGEOFF
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	str	x23, [sp]
	mov	x1, x21
	bl	_gig_dbg
	ldr	x8, [x19, #16]
	add	x0, x23, x8
	bl	_gigaset_freebcs
	add	x23, x23, #1
	ldrsw	x8, [x19, #4]
	cmp	x23, x8
	b.lt	LBB0_11
LBB0_12:
	mov	x0, x19
	bl	_clear_events
	ldr	w0, [x22]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_gig_dbg
	ldr	x0, [x19, #24]
	bl	_kfree
LBB0_13:
	ldr	w0, [x22]
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_gig_dbg
	ldr	x0, [x19, #16]
	bl	_kfree
LBB0_14:
	ldr	w0, [x22]
Lloh20:
	adrp	x1, l_.str.6@PAGE
Lloh21:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_gig_dbg
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_free_cs
LBB0_15:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_INIT,4,2                 ; @DEBUG_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clearing hw"

	.comm	_VALID_ID,4,2                   ; @VALID_ID
l_.str.1:                               ; @.str.1
	.asciz	"clearing iif"

	.comm	_ISDN_STAT_UNLOAD,4,2           ; @ISDN_STAT_UNLOAD
l_.str.2:                               ; @.str.2
	.asciz	"clearing at_state"

l_.str.3:                               ; @.str.3
	.asciz	"clearing bcs[%d]"

l_.str.4:                               ; @.str.4
	.asciz	"freeing inbuf"

l_.str.5:                               ; @.str.5
	.asciz	"freeing bcs[]"

l_.str.6:                               ; @.str.6
	.asciz	"freeing cs"

.subsections_via_symbols
