	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tftp_init_listening_connection ## -- Begin function tftp_init_listening_connection
	.p2align	4, 0x90
_tftp_init_listening_connection:        ## @tftp_init_listening_connection
	.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
	movl	%esi, %r14d
	movl	%edi, %ebx
	movl	$1, %esi
	callq	_get_connection_f
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	_working_mode@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%ebx, (%rax,%rcx,4)
	testl	%r14d, %r14d
	jns	LBB0_3
## %bb.1:
	movl	%ebx, %edi
	callq	_open_udp_server_socket
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_2
LBB0_3:
	movq	_enable_ipv6@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_ut_tftp_server@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	xorl	%r8d, %r8d
	callq	_tftp_init_udp_port
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
LBB0_4:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	$-1, %r12d
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_working_mode,8,3               ## @working_mode
	.comm	_ut_tftp_server,4,2             ## @ut_tftp_server
	.comm	_enable_ipv6,4,2                ## @enable_ipv6
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tftp_init_listening_connection ; -- Begin function tftp_init_listening_connection
	.p2align	2
_tftp_init_listening_connection:        ; @tftp_init_listening_connection
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	mov	w1, #1
	bl	_get_connection_f
	mov	x21, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _working_mode@GOTPAGE
Lloh1:
	ldr	x9, [x9, _working_mode@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	str	w19, [x8, x9, lsl #2]
	tbz	w20, #31, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_open_udp_server_socket
	mov	x20, x0
	tbnz	w0, #31, LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _enable_ipv6@GOTPAGE
Lloh4:
	ldr	x8, [x8, _enable_ipv6@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
Lloh6:
	adrp	x3, _ut_tftp_server@GOTPAGE
Lloh7:
	ldr	x3, [x3, _ut_tftp_server@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w4, #0
	bl	_tftp_init_udp_port
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	w0, #-1
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_working_mode,8,3               ; @working_mode
	.comm	_ut_tftp_server,4,2             ; @ut_tftp_server
	.comm	_enable_ipv6,4,2                ; @enable_ipv6
.subsections_via_symbols
