	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nodemgr_register_device
_nodemgr_register_device:               ## @nodemgr_register_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_nodemgr_dev_template_ud@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	movl	$16, %edx
	callq	_memcpy
	movq	%r15, 8(%rbx)
	movq	%r14, %rdi
	callq	_dev_name
	movl	32(%rbx), %ecx
	leaq	L_.str(%rip), %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_dev_set_name
	leaq	16(%rbx), %r15
	movq	%rbx, 24(%rbx)
	movq	_nodemgr_ud_class@GOTPCREL(%rip), %rax
	movq	%rax, 16(%rbx)
	movq	%r14, %rdi
	callq	_dev_name
	movl	32(%rbx), %ecx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_dev_set_name
	movq	%rbx, %rdi
	callq	_device_register
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	callq	_device_register
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	callq	_device_unregister
LBB0_3:
	movq	%rbx, %rdi
	callq	_dev_name
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HPSB_ERR                       ## TAILCALL
LBB0_4:
	callq	_get_device
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nodemgr_create_ud_dev_files    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_nodemgr_dev_template_ud,4,2    ## @nodemgr_dev_template_ud
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s-%u"

	.comm	_nodemgr_ud_class,4,2           ## @nodemgr_ud_class
L_.str.1:                               ## @.str.1
	.asciz	"Failed to create unit %s"

	.no_dead_strip	_nodemgr_register_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nodemgr_register_device
_nodemgr_register_device:               ; @nodemgr_register_device
	.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, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x1, _nodemgr_dev_template_ud@GOTPAGE
Lloh1:
	ldr	x1, [x1, _nodemgr_dev_template_ud@GOTPAGEOFF]
	mov	x0, x19
	mov	w2, #16
	bl	_memcpy
	str	x20, [x19, #8]
	mov	x0, x21
	bl	_dev_name
	mov	x2, x0
	ldr	w3, [x19, #32]
Lloh2:
	adrp	x22, l_.str@PAGE
Lloh3:
	add	x22, x22, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x22
	bl	_dev_set_name
Lloh4:
	adrp	x8, _nodemgr_ud_class@GOTPAGE
Lloh5:
	ldr	x8, [x8, _nodemgr_ud_class@GOTPAGEOFF]
	mov	x20, x19
	str	x8, [x20, #16]!
	str	x19, [x19, #24]
	mov	x0, x21
	bl	_dev_name
	mov	x2, x0
	ldr	w3, [x19, #32]
	mov	x0, x20
	mov	x1, x22
	bl	_dev_set_name
	mov	x0, x19
	bl	_device_register
	cbnz	x0, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_device_register
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_device_unregister
LBB0_3:
	mov	x0, x19
	bl	_dev_name
	mov	x1, x0
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	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	_HPSB_ERR
LBB0_4:
	mov	x0, x19
	bl	_get_device
	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	_nodemgr_create_ud_dev_files
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_nodemgr_dev_template_ud,4,2    ; @nodemgr_dev_template_ud
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s-%u"

	.comm	_nodemgr_ud_class,4,2           ; @nodemgr_ud_class
l_.str.1:                               ; @.str.1
	.asciz	"Failed to create unit %s"

	.no_dead_strip	_nodemgr_register_device
.subsections_via_symbols
