	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40iw_create_listen            ## -- Begin function i40iw_create_listen
	.p2align	4, 0x90
_i40iw_create_listen:                   ## @i40iw_create_listen
	.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
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	28(%rdi), %edi
	callq	_to_iwdev
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r14
	leaq	24(%r15), %rbx
	leaq	-80(%rbp), %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	24(%r15), %rsi
	movq	_AF_INET@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_6
## %bb.2:
	movl	$1, -80(%rbp)
	movq	8(%rbx), %rdi
	callq	_ntohl
	movq	-40(%rbp), %rcx
	movl	%eax, (%rcx)
	movl	16(%rbx), %edi
	callq	_ntohs
	movq	%rax, -72(%rbp)
	movq	8(%rbx), %rax
	movq	_INADDR_ANY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.8:
	movq	-40(%rbp), %rdi
	callq	_i40iw_get_vlan_ipv4
	movl	%eax, -48(%rbp)
	jmp	LBB0_10
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	movl	$0, -80(%rbp)
	movq	-40(%rbp), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_i40iw_copy_ip_ntohl
	movl	4(%rbx), %edi
	callq	_ntohs
	movq	%rax, -72(%rbp)
	movq	%rbx, %rdi
	callq	_ipv6_addr_type
	movq	_IPV6_ADDR_ANY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_9:
	movq	-40(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	callq	_i40iw_netdev_vlan_ipv6
LBB0_10:
	movb	$1, %bl
LBB0_11:
	movl	%r12d, -76(%rbp)
	movq	%r15, -56(%rbp)
	leaq	-80(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r14, %rsi
	callq	_i40iw_make_listen_node
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movq	%rax, %r12
	movq	%rax, 16(%r15)
	movl	8(%r15), %edi
	movl	%edi, 24(%rax)
	callq	_rt_tos2priority
	movl	%eax, 20(%r12)
	movl	%eax, -64(%rbp)
	cmpl	$0, 16(%r12)
	je	LBB0_15
LBB0_13:
	movq	%r15, %rdi
	callq	*(%r15)
	movq	8(%r12), %rax
	incl	(%rax)
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_14:
	leaq	L_.str(%rip), %rdi
	callq	_i40iw_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
LBB0_23:
	subl	(%rax), %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	testb	%bl, %bl
	je	LBB0_18
## %bb.16:
	movq	_I40IW_QHASH_TYPE_TCP_SYN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_I40IW_QHASH_MANAGE_TYPE_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-80(%rbp), %rsi
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_i40iw_manage_qhash
	testl	%eax, %eax
	jne	LBB0_22
## %bb.17:
	movl	$1, (%r12)
	jmp	LBB0_21
LBB0_18:
	cmpl	$0, -80(%rbp)
	je	LBB0_20
## %bb.19:
	leaq	-80(%rbp), %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_i40iw_add_mqh_4
	testl	%eax, %eax
	jne	LBB0_22
	jmp	LBB0_21
LBB0_20:
	leaq	-80(%rbp), %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_i40iw_add_mqh_6
	testl	%eax, %eax
	jne	LBB0_22
LBB0_21:
	movq	-72(%rbp), %rsi
	movq	_I40IW_MANAGE_APBVT_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_i40iw_manage_apbvt
	testl	%eax, %eax
	je	LBB0_13
LBB0_22:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_i40iw_cm_del_listen
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AF_INET,8,3                    ## @AF_INET
	.comm	_INADDR_ANY,8,3                 ## @INADDR_ANY
	.comm	_IPV6_ADDR_ANY,8,3              ## @IPV6_ADDR_ANY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cm_listen_node == NULL\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_I40IW_MANAGE_APBVT_ADD,4,2     ## @I40IW_MANAGE_APBVT_ADD
	.comm	_I40IW_QHASH_TYPE_TCP_SYN,4,2   ## @I40IW_QHASH_TYPE_TCP_SYN
	.comm	_I40IW_QHASH_MANAGE_TYPE_ADD,4,2 ## @I40IW_QHASH_MANAGE_TYPE_ADD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40iw_create_listen            ; -- Begin function i40iw_create_listen
	.p2align	2
_i40iw_create_listen:                   ; @i40iw_create_listen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w0, [x0, #28]
	bl	_to_iwdev
	cbz	x0, LBB0_20
; %bb.1:
	mov	x20, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	mov	x22, x19
	ldr	x1, [x22, #24]!
Lloh0:
	adrp	x8, _AF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_4
; %bb.2:
	mov	w8, #1
	str	w8, [sp]
	ldr	x0, [x22, #8]
	bl	_ntohl
	ldr	x8, [sp, #40]
	str	w0, [x8]
	ldr	w0, [x22, #16]
	bl	_ntohs
	str	x0, [sp, #8]
	ldr	x8, [x22, #8]
Lloh3:
	adrp	x9, _INADDR_ANY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _INADDR_ANY@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	mov	w22, #0
	b	LBB0_8
LBB0_4:
	str	wzr, [sp]
	ldr	x0, [sp, #40]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_i40iw_copy_ip_ntohl
	ldr	w0, [x22, #4]
	bl	_ntohs
	str	x0, [sp, #8]
	mov	x0, x22
	bl	_ipv6_addr_type
	mov	w22, #0
Lloh6:
	adrp	x8, _IPV6_ADDR_ANY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IPV6_ADDR_ANY@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.5:
	ldr	x0, [sp, #40]
	mov	x8, sp
	add	x1, x8, #32
	bl	_i40iw_netdev_vlan_ipv6
	b	LBB0_7
LBB0_6:
	ldr	x0, [sp, #40]
	bl	_i40iw_get_vlan_ipv4
	str	w0, [sp, #32]
LBB0_7:
	mov	w22, #1
LBB0_8:
	str	w21, [sp, #4]
	str	x19, [sp, #24]
	mov	x2, sp
	mov	x0, x20
	mov	x1, x20
	bl	_i40iw_make_listen_node
	cbz	x0, LBB0_11
; %bb.9:
	mov	x21, x0
	str	x0, [x19, #16]
	ldr	w0, [x19, #8]
	str	w0, [x21, #24]
	bl	_rt_tos2priority
	str	w0, [x21, #20]
	str	w0, [sp, #16]
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_12
LBB0_10:
	ldr	x8, [x19]
	mov	x0, x19
	blr	x8
	mov	w0, #0
	ldr	x8, [x21, #8]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	b	LBB0_22
LBB0_11:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_i40iw_pr_err
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_21
LBB0_12:
	tbz	w22, #0, LBB0_15
; %bb.13:
Lloh13:
	adrp	x8, _I40IW_QHASH_TYPE_TCP_SYN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _I40IW_QHASH_TYPE_TCP_SYN@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x8, _I40IW_QHASH_MANAGE_TYPE_ADD@GOTPAGE
Lloh17:
	ldr	x8, [x8, _I40IW_QHASH_MANAGE_TYPE_ADD@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	mov	w22, #1
	mov	x1, sp
	mov	x0, x20
	mov	x4, #0
	mov	w5, #1
	bl	_i40iw_manage_qhash
	cbnz	w0, LBB0_19
; %bb.14:
	str	w22, [x21]
	b	LBB0_18
LBB0_15:
	ldr	w8, [sp]
	cbz	w8, LBB0_17
; %bb.16:
	mov	x1, sp
	mov	x0, x20
	mov	x2, x21
	bl	_i40iw_add_mqh_4
	cbnz	w0, LBB0_19
	b	LBB0_18
LBB0_17:
	mov	x1, sp
	mov	x0, x20
	mov	x2, x21
	bl	_i40iw_add_mqh_6
	cbnz	w0, LBB0_19
LBB0_18:
	ldr	x1, [sp, #8]
Lloh19:
	adrp	x8, _I40IW_MANAGE_APBVT_ADD@GOTPAGE
Lloh20:
	ldr	x8, [x8, _I40IW_MANAGE_APBVT_ADD@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_i40iw_manage_apbvt
	cbz	w0, LBB0_10
LBB0_19:
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_i40iw_cm_del_listen
LBB0_20:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_22:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AF_INET,8,3                    ; @AF_INET
	.comm	_INADDR_ANY,8,3                 ; @INADDR_ANY
	.comm	_IPV6_ADDR_ANY,8,3              ; @IPV6_ADDR_ANY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cm_listen_node == NULL\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_I40IW_MANAGE_APBVT_ADD,4,2     ; @I40IW_MANAGE_APBVT_ADD
	.comm	_I40IW_QHASH_TYPE_TCP_SYN,4,2   ; @I40IW_QHASH_TYPE_TCP_SYN
	.comm	_I40IW_QHASH_MANAGE_TYPE_ADD,4,2 ; @I40IW_QHASH_MANAGE_TYPE_ADD
.subsections_via_symbols
