	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_listen
_do_listen:                             ## @do_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	$0, -12(%rbp)
	movq	(%rdi), %rax
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.1:
	movl	(%rax), %eax
	leal	-128(%rax), %ecx
	cmpl	$3, %ecx
	jae	LBB0_2
## %bb.5:
	movq	_API_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_LWIP_DEBUGF
	jmp	LBB0_12
LBB0_2:
	cmpl	$131, %eax
	je	LBB0_6
## %bb.3:
	cmpl	$132, %eax
	jne	LBB0_12
## %bb.4:
	movq	_API_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_LWIP_DEBUGF
	jmp	LBB0_12
LBB0_6:
	callq	_tcp_listen
	movq	(%rbx), %rsi
	movq	%rax, 8(%rsi)
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movl	24(%rsi), %ecx
	movq	_SYS_MBOX_NULL@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_11
## %bb.9:
	addq	$24, %rsi
	movq	_MQBOX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rsi, %rdi
	movl	%eax, %esi
	callq	_MQ_Init
	movq	_MQ_ERROR_SUCCESSFUL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.10:
	movq	(%rbx), %rsi
	movq	8(%rsi), %rax
LBB0_11:
	movq	%rax, %rdi
	callq	_tcp_arg
	movq	(%rbx), %rax
	movq	8(%rax), %rdi
	movq	_accept_func@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tcp_accept
	jmp	LBB0_12
LBB0_7:
	movq	_ERR_MEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rsi)
	jmp	LBB0_12
LBB0_13:
	movq	_ERR_MEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movq	%rax, 16(%rcx)
LBB0_12:
	movq	(%rbx), %rax
	movl	4(%rax), %edi
	movq	_MQ_MSG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-12(%rbp), %rsi
	callq	_MQ_Send
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_API_MSG_DEBUG,4,2              ## @API_MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"api_msg: listen RAW: cannot listen for RAW.\n"

L_.str.1:                               ## @.str.1
	.asciz	"api_msg: listen UDP: cannot listen for UDP.\n"

	.comm	_ERR_MEM,8,3                    ## @ERR_MEM
	.comm	_SYS_MBOX_NULL,4,2              ## @SYS_MBOX_NULL
	.comm	_MQBOX_SIZE,4,2                 ## @MQBOX_SIZE
	.comm	_MQ_ERROR_SUCCESSFUL,4,2        ## @MQ_ERROR_SUCCESSFUL
	.comm	_accept_func,4,2                ## @accept_func
	.comm	_MQ_MSG_BLOCK,4,2               ## @MQ_MSG_BLOCK
	.no_dead_strip	_do_listen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_listen
_do_listen:                             ; @do_listen
	.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
	mov	x19, x0
	str	wzr, [sp, #12]
	ldr	x8, [x0]
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_13
; %bb.1:
	ldr	w8, [x8]
	sub	w9, w8, #128
	cmp	w9, #3
	b.hs	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _API_MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _API_MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_LWIP_DEBUGF
	b	LBB0_13
LBB0_3:
	cmp	w8, #131
	b.eq	LBB0_6
; %bb.4:
	cmp	w8, #132
	b.ne	LBB0_13
; %bb.5:
Lloh5:
	adrp	x8, _API_MSG_DEBUG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _API_MSG_DEBUG@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_LWIP_DEBUGF
	b	LBB0_13
LBB0_6:
	bl	_tcp_listen
	ldr	x1, [x19]
	str	x0, [x1, #8]
	cbz	x0, LBB0_11
; %bb.7:
	mov	x8, x1
	ldr	w9, [x8, #24]!
Lloh10:
	adrp	x10, _SYS_MBOX_NULL@GOTPAGE
Lloh11:
	ldr	x10, [x10, _SYS_MBOX_NULL@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_10
; %bb.8:
Lloh13:
	adrp	x9, _MQBOX_SIZE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MQBOX_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x9]
	mov	x0, x8
	bl	_MQ_Init
Lloh16:
	adrp	x8, _MQ_ERROR_SUCCESSFUL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MQ_ERROR_SUCCESSFUL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_12
; %bb.9:
	ldr	x1, [x19]
	ldr	x0, [x1, #8]
LBB0_10:
	bl	_tcp_arg
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
Lloh19:
	adrp	x8, _accept_func@GOTPAGE
Lloh20:
	ldr	x8, [x8, _accept_func@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_tcp_accept
	b	LBB0_13
LBB0_11:
Lloh22:
	adrp	x8, _ERR_MEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ERR_MEM@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	str	x8, [x1, #16]
	b	LBB0_13
LBB0_12:
Lloh25:
	adrp	x8, _ERR_MEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ERR_MEM@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	ldr	x9, [x19]
	str	x8, [x9, #16]
LBB0_13:
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
Lloh28:
	adrp	x8, _MQ_MSG_BLOCK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MQ_MSG_BLOCK@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	add	x1, sp, #12
	bl	_MQ_Send
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_API_MSG_DEBUG,4,2              ; @API_MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"api_msg: listen RAW: cannot listen for RAW.\n"

l_.str.1:                               ; @.str.1
	.asciz	"api_msg: listen UDP: cannot listen for UDP.\n"

	.comm	_ERR_MEM,8,3                    ; @ERR_MEM
	.comm	_SYS_MBOX_NULL,4,2              ; @SYS_MBOX_NULL
	.comm	_MQBOX_SIZE,4,2                 ; @MQBOX_SIZE
	.comm	_MQ_ERROR_SUCCESSFUL,4,2        ; @MQ_ERROR_SUCCESSFUL
	.comm	_accept_func,4,2                ; @accept_func
	.comm	_MQ_MSG_BLOCK,4,2               ; @MQ_MSG_BLOCK
	.no_dead_strip	_do_listen
.subsections_via_symbols
