	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smscore_register_hotplug       ## -- Begin function smscore_register_hotplug
	.p2align	4, 0x90
_smscore_register_hotplug:              ## @smscore_register_hotplug
	.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	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %r14
	movq	_g_smscore_devices@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	cmpq	%r13, %rbx
	je	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	*%r15
	movl	%eax, %r12d
	movq	(%rbx), %rbx
	cmpq	%r13, %rbx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%r12d, %r12d
	je	LBB0_3
LBB0_5:
	testl	%r12d, %r12d
	jns	LBB0_6
## %bb.7:
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_9
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_9
LBB0_2:
	xorl	%r12d, %r12d
LBB0_6:
	movq	%r15, (%r14)
	addq	$8, %r14
	movq	_g_smscore_notifyees@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_list_add
LBB0_9:
	movq	_g_smscore_deviceslock@GOTPCREL(%rip), %rdi
	callq	_kmutex_unlock
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_smscore_deviceslock,4,2      ## @g_smscore_deviceslock
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_g_smscore_devices,8,3          ## @g_smscore_devices
	.comm	_g_smscore_notifyees,4,2        ## @g_smscore_notifyees
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smscore_register_hotplug       ; -- Begin function smscore_register_hotplug
	.p2align	2
_smscore_register_hotplug:              ; @smscore_register_hotplug
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x0, _g_smscore_deviceslock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _g_smscore_deviceslock@GOTPAGEOFF]
	bl	_kmutex_lock
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
Lloh5:
	adrp	x23, _g_smscore_devices@GOTPAGE
Lloh6:
	ldr	x23, [x23, _g_smscore_devices@GOTPAGEOFF]
	ldr	x22, [x23]
	cmp	x22, x23
	b.eq	LBB0_6
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x22
	mov	w2, #1
	blr	x19
	ldr	x22, [x22]
	cmp	x22, x23
	ccmp	w0, #0, #0, ne
	b.eq	LBB0_2
; %bb.3:
	mov	x21, x0
	tbz	w0, #31, LBB0_7
; %bb.4:
	mov	x0, x20
	bl	_kfree
	b	LBB0_8
LBB0_5:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_6:
	mov	w21, #0
LBB0_7:
	str	x19, [x20], #8
Lloh10:
	adrp	x1, _g_smscore_notifyees@GOTPAGE
Lloh11:
	ldr	x1, [x1, _g_smscore_notifyees@GOTPAGEOFF]
	mov	x0, x20
	bl	_list_add
LBB0_8:
Lloh12:
	adrp	x0, _g_smscore_deviceslock@GOTPAGE
Lloh13:
	ldr	x0, [x0, _g_smscore_deviceslock@GOTPAGEOFF]
	bl	_kmutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_g_smscore_deviceslock,4,2      ; @g_smscore_deviceslock
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_g_smscore_devices,8,3          ; @g_smscore_devices
	.comm	_g_smscore_notifyees,4,2        ; @g_smscore_notifyees
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
