	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smscore_unregister_device      ## -- Begin function smscore_unregister_device
	.p2align	4, 0x90
_smscore_unregister_device:             ## @smscore_unregister_device
	.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	%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, %r15
	movq	_g_smscore_deviceslock@GOTPCREL(%rip), %rdi
	callq	_kmutex_lock
	movq	%r15, %rdi
	callq	_sms_ir_exit
	movq	%r15, %rdi
	callq	_smscore_notify_clients
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_smscore_notify_callbacks
	leaq	48(%r15), %r12
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_1:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %r13
	leaq	4(%r13), %rdi
	callq	_list_del
	movq	%r13, %rdi
	callq	_kfree
	incl	%ebx
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %esi
	subl	%ebx, %esi
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$10, %r14d
	je	LBB0_5
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	incl	%r14d
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_g_smscore_deviceslock@GOTPCREL(%rip), %r13
	movq	%r13, %rdi
	callq	_kmutex_unlock
	movl	$100, %edi
	callq	_msleep
	movq	%r13, %rdi
	callq	_kmutex_lock
	jmp	LBB0_2
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	24(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.7:
	cmpq	$0, 40(%r15)
	je	LBB0_9
## %bb.8:
	movq	%rdx, %rdi
	callq	_kfree
	jmp	LBB0_10
LBB0_9:
	movl	36(%r15), %edi
	movl	16(%r15), %ecx
	movl	32(%r15), %esi
	callq	_dma_free_coherent
LBB0_10:
	movq	8(%r15), %rdi
	callq	_kfree
	leaq	4(%r15), %rdi
	callq	_list_del
	movq	%r15, %rdi
	callq	_kfree
	movq	_g_smscore_deviceslock@GOTPCREL(%rip), %rdi
	callq	_kmutex_unlock
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_debug                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_g_smscore_deviceslock,4,2      ## @g_smscore_deviceslock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"exiting although not all buffers released.\n"

L_.str.1:                               ## @.str.1
	.asciz	"waiting for %d buffer(s)\n"

L_.str.2:                               ## @.str.2
	.asciz	"freed %d buffers\n"

L_.str.3:                               ## @.str.3
	.asciz	"device %p destroyed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smscore_unregister_device      ; -- Begin function smscore_unregister_device
	.p2align	2
_smscore_unregister_device:             ; @smscore_unregister_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x20, _g_smscore_deviceslock@GOTPAGE
Lloh1:
	ldr	x20, [x20, _g_smscore_deviceslock@GOTPAGEOFF]
	mov	x0, x20
	bl	_kmutex_lock
	mov	x0, x19
	bl	_sms_ir_exit
	mov	x0, x19
	bl	_smscore_notify_clients
	mov	x0, x19
	mov	x1, #0
	mov	w2, #0
	bl	_smscore_notify_callbacks
	mov	w24, #0
	mov	w25, #0
	add	x21, x19, #48
Lloh2:
	adrp	x22, l_.str.1@PAGE
Lloh3:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x23, [x21]
	add	x0, x23, #4
	bl	_list_del
	mov	x0, x23
	bl	_kfree
	add	w24, w24, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_list_empty
	cbz	w0, LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x19]
	subs	w8, w8, w24
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w25, #10
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w25, w25, #1
	str	x8, [sp]
	mov	x0, x22
	bl	_pr_debug
	mov	x0, x20
	bl	_kmutex_unlock
	mov	w0, #100
	bl	_msleep
	mov	x0, x20
	bl	_kmutex_lock
	b	LBB0_2
LBB0_6:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
LBB0_7:
	str	x24, [sp]
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_debug
	ldr	x2, [x19, #24]
	cbz	x2, LBB0_11
; %bb.8:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x2
	bl	_kfree
	b	LBB0_11
LBB0_10:
	ldp	w1, w0, [x19, #32]
	ldr	w3, [x19, #16]
	bl	_dma_free_coherent
LBB0_11:
	ldr	x0, [x19, #8]
	bl	_kfree
	add	x0, x19, #4
	bl	_list_del
	mov	x0, x19
	bl	_kfree
Lloh8:
	adrp	x0, _g_smscore_deviceslock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _g_smscore_deviceslock@GOTPAGEOFF]
	bl	_kmutex_unlock
	str	x19, [sp]
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_debug
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_g_smscore_deviceslock,4,2      ; @g_smscore_deviceslock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"exiting although not all buffers released.\n"

l_.str.1:                               ; @.str.1
	.asciz	"waiting for %d buffer(s)\n"

l_.str.2:                               ; @.str.2
	.asciz	"freed %d buffers\n"

l_.str.3:                               ; @.str.3
	.asciz	"device %p destroyed\n"

.subsections_via_symbols
