	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iflib_clone_register           ## -- Begin function iflib_clone_register
	.p2align	4, 0x90
_iflib_clone_register:                  ## @iflib_clone_register
	.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	%rdi, %rbx
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	callq	_iflib_ip_lookup
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%rbx), %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_14
LBB0_1:
	leaq	L_str(%rip), %rdi
	callq	_puts
	jmp	LBB0_13
LBB0_4:
	movq	_M_IFLIB@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$40, %edi
	callq	_malloc
	movq	%rax, %r14
	movq	%rbx, 32(%rax)
	movq	(%rbx), %rdi
	callq	_devclass_create
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movq	(%rbx), %rdi
	movq	_iflib_clone_create@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_iflib_clone_destroy@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_if_clone_simple
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	_IFC_NOGROUP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_ifc_flags_set
	movq	_iflladdr_event@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_iflib_iflladdr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EVENTHANDLER_PRI_ANY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	xorl	%edx, %edx
	callq	_EVENTHANDLER_REGISTER
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	_ifnet_departure_event@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_iflib_ifdetach@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %ecx
	xorl	%edx, %edx
	callq	_EVENTHANDLER_REGISTER
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	callq	_iflib_ip_insert
	jmp	LBB0_14
LBB0_6:
	movq	(%rbx), %rsi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_12
LBB0_10:
	movl	(%r12), %edi
	movq	8(%r14), %rsi
	callq	_EVENTHANDLER_DEREGISTER
LBB0_11:
	movq	(%r14), %rdi
	callq	_if_clone_detach
LBB0_12:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_free
LBB0_13:
	xorl	%r14d, %r14d
LBB0_14:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"iflib_clone_register failed - shared_ctx %s alread registered\n"

	.comm	_M_IFLIB,4,2                    ## @M_IFLIB
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_iflib_clone_create,4,2         ## @iflib_clone_create
	.comm	_iflib_clone_destroy,4,2        ## @iflib_clone_destroy
L_.str.2:                               ## @.str.2
	.asciz	"clone_simple failed -- cloned %s  devices will not be available\n"

	.comm	_IFC_NOGROUP,4,2                ## @IFC_NOGROUP
	.comm	_iflladdr_event,4,2             ## @iflladdr_event
	.comm	_iflib_iflladdr,4,2             ## @iflib_iflladdr
	.comm	_EVENTHANDLER_PRI_ANY,4,2       ## @EVENTHANDLER_PRI_ANY
	.comm	_ifnet_departure_event,4,2      ## @ifnet_departure_event
	.comm	_iflib_ifdetach,4,2             ## @iflib_ifdetach
L_str:                                  ## @str
	.asciz	"iflib_clone_register failed - shared_ctx needs to have a device name"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iflib_clone_register           ; -- Begin function iflib_clone_register
	.p2align	2
_iflib_clone_register:                  ; @iflib_clone_register
	.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	x20, x0
	ldr	x0, [x0]
	cbz	x0, LBB0_3
; %bb.1:
	bl	_iflib_ip_lookup
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x20]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	b	LBB0_13
LBB0_3:
Lloh2:
	adrp	x0, l_str@PAGE
Lloh3:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	b	LBB0_13
LBB0_4:
Lloh4:
	adrp	x21, _M_IFLIB@GOTPAGE
Lloh5:
	ldr	x21, [x21, _M_IFLIB@GOTPAGEOFF]
Lloh6:
	adrp	x8, _M_WAITOK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _M_WAITOK@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w0, #40
	bl	_malloc
	mov	x19, x0
	str	x20, [x0, #32]
	ldr	x0, [x20]
	bl	_devclass_create
	str	x0, [x19, #24]
	cbz	x0, LBB0_12
; %bb.5:
	ldr	x0, [x20]
Lloh12:
	adrp	x8, _iflib_clone_create@GOTPAGE
Lloh13:
	ldr	x8, [x8, _iflib_clone_create@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _iflib_clone_destroy@GOTPAGE
Lloh16:
	ldr	x8, [x8, _iflib_clone_destroy@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_if_clone_simple
	str	x0, [x19]
	cbz	x0, LBB0_9
; %bb.6:
Lloh18:
	adrp	x8, _IFC_NOGROUP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IFC_NOGROUP@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_ifc_flags_set
Lloh21:
	adrp	x20, _iflladdr_event@GOTPAGE
Lloh22:
	ldr	x20, [x20, _iflladdr_event@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh23:
	adrp	x8, _iflib_iflladdr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _iflib_iflladdr@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x22, _EVENTHANDLER_PRI_ANY@GOTPAGE
Lloh27:
	ldr	x22, [x22, _EVENTHANDLER_PRI_ANY@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	x2, #0
	bl	_EVENTHANDLER_REGISTER
	str	x0, [x19, #8]
	cbz	x0, LBB0_11
; %bb.7:
Lloh28:
	adrp	x8, _ifnet_departure_event@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ifnet_departure_event@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x8, _iflib_ifdetach@GOTPAGE
Lloh32:
	ldr	x8, [x8, _iflib_ifdetach@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	ldr	w3, [x22]
	mov	x2, #0
	bl	_EVENTHANDLER_REGISTER
	str	x0, [x19, #16]
	cbz	x0, LBB0_10
; %bb.8:
	mov	x0, x19
	bl	_iflib_ip_insert
	b	LBB0_14
LBB0_9:
	ldr	x8, [x20]
	str	x8, [sp]
Lloh34:
	adrp	x0, l_.str.2@PAGE
Lloh35:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	b	LBB0_12
LBB0_10:
	ldr	w0, [x20]
	ldr	x1, [x19, #8]
	bl	_EVENTHANDLER_DEREGISTER
LBB0_11:
	ldr	x0, [x19]
	bl	_if_clone_detach
LBB0_12:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_free
LBB0_13:
	mov	x19, #0
LBB0_14:
	mov	x0, x19
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"iflib_clone_register failed - shared_ctx %s alread registered\n"

	.comm	_M_IFLIB,4,2                    ; @M_IFLIB
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_iflib_clone_create,4,2         ; @iflib_clone_create
	.comm	_iflib_clone_destroy,4,2        ; @iflib_clone_destroy
l_.str.2:                               ; @.str.2
	.asciz	"clone_simple failed -- cloned %s  devices will not be available\n"

	.comm	_IFC_NOGROUP,4,2                ; @IFC_NOGROUP
	.comm	_iflladdr_event,4,2             ; @iflladdr_event
	.comm	_iflib_iflladdr,4,2             ; @iflib_iflladdr
	.comm	_EVENTHANDLER_PRI_ANY,4,2       ; @EVENTHANDLER_PRI_ANY
	.comm	_ifnet_departure_event,4,2      ; @ifnet_departure_event
	.comm	_iflib_ifdetach,4,2             ; @iflib_ifdetach
l_str:                                  ; @str
	.asciz	"iflib_clone_register failed - shared_ctx needs to have a device name"

.subsections_via_symbols
