	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_device_add_child               ## -- Begin function device_add_child
	.p2align	4, 0x90
_device_add_child:                      ## @device_add_child
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	cmpl	$-1, %edx
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_make_device
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.5:
	movq	_dev_link@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_TAILQ_INSERT_TAIL
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_device_printf
LBB0_6:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unit is not -1\n"

L_.str.1:                               ## @.str.1
	.asciz	"Could not add child '%s'\n"

	.comm	_dev_link,4,2                   ## @dev_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_device_add_child               ; -- Begin function device_add_child
	.p2align	2
_device_add_child:                      ; @device_add_child
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	cmn	w2, #1
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
LBB0_2:
	mov	x0, x19
	mov	x1, x21
	bl	_make_device
	mov	x20, x0
	cbz	x0, LBB0_5
; %bb.3:
	cbz	x19, LBB0_6
; %bb.4:
Lloh2:
	adrp	x8, _dev_link@GOTPAGE
Lloh3:
	ldr	x8, [x8, _dev_link@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_TAILQ_INSERT_TAIL
	b	LBB0_6
LBB0_5:
	str	x21, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_device_printf
LBB0_6:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unit is not -1\n"

l_.str.1:                               ; @.str.1
	.asciz	"Could not add child '%s'\n"

	.comm	_dev_link,4,2                   ; @dev_link
.subsections_via_symbols
