	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tftp_init_udp_port
_tftp_init_udp_port:                    ## @tftp_init_udp_port
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r13
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	%rcx, %rdi
	callq	_check_udp_functions
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	cmpl	$3, %r12d
	setge	%al
	movq	_MAX_EVENTS@GOTPCREL(%rip), %rcx
	cmpl	%r12d, (%rcx)
	setg	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movl	$1, -44(%rbp)
	movq	_IPPROTO_IP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IP_PKTINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movl	%r12d, %edi
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_kprintf
LBB0_4:
	movq	_SM_IPV6@GOTPCREL(%rip), %rbx
	testl	%r15d, (%rbx)
	je	LBB0_7
## %bb.5:
	movq	_IPPROTO_IPV6@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IPV6_RECVPKTINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movl	%r12d, %edi
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	jns	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_kprintf
LBB0_7:
	movl	%r12d, (%r14)
	andl	(%rbx), %r15d
	je	LBB0_9
## %bb.8:
	movq	_U_IPV6@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_9:
	movl	%r15d, 32(%r14)
	movq	%r13, 24(%r14)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r14)
	movq	_Events@GOTPCREL(%rip), %rax
	movslq	%r12d, %rcx
	addq	(%rax), %rcx
	movq	%rcx, 8(%r14)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r14)
	movq	_server_receive_udp@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	movl	$-5, %esi
	movq	%r14, %rcx
	callq	_epoll_sethandler
	movq	_EVT_LEVEL@GOTPCREL(%rip), %rax
	movq	_EVT_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_EVT_SPEC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	%r12d, %edi
	callq	_epoll_insert
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_1:
	movl	$-1, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_EVENTS,4,2                 ## @MAX_EVENTS
	.comm	_IPPROTO_IP,4,2                 ## @IPPROTO_IP
	.comm	_IP_PKTINFO,4,2                 ## @IP_PKTINFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setsockopt for %d failed: %m\n"

	.comm	_SM_IPV6,4,2                    ## @SM_IPV6
	.comm	_IPPROTO_IPV6,4,2               ## @IPPROTO_IPV6
	.comm	_IPV6_RECVPKTINFO,4,2           ## @IPV6_RECVPKTINFO
	.comm	_U_IPV6,4,2                     ## @U_IPV6
	.comm	_Events,8,3                     ## @Events
	.comm	_server_receive_udp,4,2         ## @server_receive_udp
	.comm	_EVT_LEVEL,4,2                  ## @EVT_LEVEL
	.comm	_EVT_READ,4,2                   ## @EVT_READ
	.comm	_EVT_SPEC,4,2                   ## @EVT_SPEC
	.no_dead_strip	_tftp_init_udp_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tftp_init_udp_port
_tftp_init_udp_port:                    ; @tftp_init_udp_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x5
	mov	x21, x4
	mov	x23, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x3
	bl	_check_udp_functions
	tbnz	x0, #63, LBB0_7
; %bb.1:
	cmp	w19, #2
Lloh0:
	adrp	x8, _MAX_EVENTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_EVENTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w8, w19, #4, gt
	cset	w0, gt
	bl	_assert
	mov	w8, #1
	str	w8, [sp, #12]
Lloh3:
	adrp	x8, _IPPROTO_IP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IPPROTO_IP@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _IP_PKTINFO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IP_PKTINFO@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
	tbz	x0, #63, LBB0_3
; %bb.2:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_kprintf
LBB0_3:
Lloh11:
	adrp	x25, _SM_IPV6@GOTPAGE
Lloh12:
	ldr	x25, [x25, _SM_IPV6@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w24
	b.eq	LBB0_6
; %bb.4:
Lloh13:
	adrp	x8, _IPPROTO_IPV6@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IPPROTO_IPV6@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _IPV6_RECVPKTINFO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IPV6_RECVPKTINFO@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
	tbz	x0, #63, LBB0_6
; %bb.5:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_kprintf
LBB0_6:
	str	w19, [x20]
	ldr	w8, [x25]
Lloh21:
	adrp	x9, _U_IPV6@GOTPAGE
Lloh22:
	ldr	x9, [x9, _U_IPV6@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w8, w24
	csel	w8, wzr, w9, eq
	str	w8, [x20, #32]
	str	x23, [x20, #24]
Lloh24:
	adrp	x8, _Events@GOTPAGE
Lloh25:
	ldr	x8, [x8, _Events@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	add	x8, x8, w19, sxtw
	stp	x8, x21, [x20, #8]
	str	w22, [x20, #4]
Lloh27:
	adrp	x8, _server_receive_udp@GOTPAGE
Lloh28:
	ldr	x8, [x8, _server_receive_udp@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #-5
	mov	x3, x20
	bl	_epoll_sethandler
Lloh30:
	adrp	x8, _EVT_LEVEL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EVT_LEVEL@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x9, _EVT_READ@GOTPAGE
Lloh34:
	ldr	x9, [x9, _EVT_READ@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh36:
	adrp	x9, _EVT_SPEC@GOTPAGE
Lloh37:
	ldr	x9, [x9, _EVT_SPEC@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x19
	bl	_epoll_insert
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	mov	w0, #-1
LBB0_8:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_EVENTS,4,2                 ; @MAX_EVENTS
	.comm	_IPPROTO_IP,4,2                 ; @IPPROTO_IP
	.comm	_IP_PKTINFO,4,2                 ; @IP_PKTINFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setsockopt for %d failed: %m\n"

	.comm	_SM_IPV6,4,2                    ; @SM_IPV6
	.comm	_IPPROTO_IPV6,4,2               ; @IPPROTO_IPV6
	.comm	_IPV6_RECVPKTINFO,4,2           ; @IPV6_RECVPKTINFO
	.comm	_U_IPV6,4,2                     ; @U_IPV6
	.comm	_Events,8,3                     ; @Events
	.comm	_server_receive_udp,4,2         ; @server_receive_udp
	.comm	_EVT_LEVEL,4,2                  ; @EVT_LEVEL
	.comm	_EVT_READ,4,2                   ; @EVT_READ
	.comm	_EVT_SPEC,4,2                   ; @EVT_SPEC
	.no_dead_strip	_tftp_init_udp_port
.subsections_via_symbols
