	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cnic_cm_select_dev
_cnic_cm_select_dev:                    ## @cnic_cm_select_dev
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	$0, -24(%rbp)
	movq	(%rdi), %rax
	movq	_AF_INET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	leaq	-16(%rbp), %rsi
	callq	_cnic_get_v4_route
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_5
LBB0_3:
	movq	_AF_INET6@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.4:
	leaq	-16(%rbp), %rsi
	callq	_cnic_get_v6_route
	testl	%eax, %eax
	jne	LBB0_10
LBB0_5:
	movq	-16(%rbp), %rdi
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:
	leaq	-24(%rbp), %rsi
	movl	%eax, %edi
	callq	_cnic_get_vlan
	movq	-24(%rbp), %rdi
	callq	_cnic_from_netdev
	movq	%rax, %rbx
	movq	-16(%rbp), %rdi
	callq	_dst_release
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.7:
	movq	%rbx, %rdi
	callq	_cnic_put
	jmp	LBB0_11
LBB0_9:
	callq	_dst_release
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENETUNREACH,4,2                ## @ENETUNREACH
	.comm	_AF_INET,8,3                    ## @AF_INET
	.comm	_AF_INET6,8,3                   ## @AF_INET6
	.no_dead_strip	_cnic_cm_select_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cnic_cm_select_dev
_cnic_cm_select_dev:                    ; @cnic_cm_select_dev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	str	xzr, [sp]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AF_INET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AF_INET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	add	x1, sp, #8
	bl	_cnic_get_v4_route
	cbnz	w0, LBB0_8
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x9, _AF_INET6@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AF_INET6@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
	add	x1, sp, #8
	bl	_cnic_get_v6_route
	cbnz	w0, LBB0_8
LBB0_4:
	ldr	x8, [sp, #8]
	ldr	w0, [x8]
	cbz	w0, LBB0_7
; %bb.5:
	mov	x1, sp
	bl	_cnic_get_vlan
	ldr	x0, [sp]
	bl	_cnic_from_netdev
	mov	x19, x0
	ldr	x0, [sp, #8]
	bl	_dst_release
	cbz	x19, LBB0_9
; %bb.6:
	mov	x0, x19
	bl	_cnic_put
	b	LBB0_9
LBB0_7:
	mov	x0, x8
	bl	_dst_release
LBB0_8:
	mov	x19, #0
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENETUNREACH,4,2                ; @ENETUNREACH
	.comm	_AF_INET,8,3                    ; @AF_INET
	.comm	_AF_INET6,8,3                   ; @AF_INET6
	.no_dead_strip	_cnic_cm_select_dev
.subsections_via_symbols
