	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_connection_f               ## -- Begin function get_connection_f
	.p2align	4, 0x90
_get_connection_f:                      ## @get_connection_f
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$65535, %edi                    ## imm = 0xFFFF
	jbe	LBB0_2
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_2:
	movq	_C@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	%edi, %r15d
	movq	(%rax,%r15,8), %rbx
	testl	%esi, %esi
	je	LBB0_8
## %bb.3:
	jle	LBB0_5
## %bb.4:
	movq	_tftp_udp_connections@GOTPCREL(%rip), %rax
	incl	(%rax)
	movl	$8, %edi
	callq	_zmalloc0
	movl	$512, (%rax)                    ## imm = 0x200
	movq	%rax, %rbx
	jmp	LBB0_7
LBB0_5:
	movl	$1, %edi
	callq	_assert
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.6:
	movq	_tftp_udp_connections@GOTPCREL(%rip), %rax
	decl	(%rax)
	leaq	4(%rbx), %rdi
	callq	_fd_close
	movq	%rbx, %rdi
	callq	_tftp_conn_close_handles
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_zfree
	xorl	%eax, %eax
LBB0_7:
	movq	(%r14), %rcx
	movq	%rax, (%rcx,%r15,8)
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_C,8,3                          ## @C
	.comm	_tftp_udp_connections,4,2       ## @tftp_udp_connections
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_connection_f               ; -- Begin function get_connection_f
	.p2align	2
_get_connection_f:                      ; @get_connection_f
	.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
	lsr	w8, w0, #16
	cbz	w8, LBB0_2
; %bb.1:
	mov	x20, #0
	b	LBB0_8
LBB0_2:
	mov	x19, x0
Lloh0:
	adrp	x21, _C@GOTPAGE
Lloh1:
	ldr	x21, [x21, _C@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x20, [x8, w0, uxtw #3]
	cbz	w1, LBB0_8
; %bb.3:
	cmp	w1, #1
	b.lt	LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _tftp_udp_connections@GOTPAGE
Lloh3:
	ldr	x8, [x8, _tftp_udp_connections@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	mov	w0, #8
	bl	_zmalloc0
	mov	w8, #512
	str	w8, [x0]
	mov	x20, x0
	b	LBB0_7
LBB0_5:
	mov	w0, #1
	bl	_assert
	cbz	x20, LBB0_8
; %bb.6:
Lloh4:
	adrp	x8, _tftp_udp_connections@GOTPAGE
Lloh5:
	ldr	x8, [x8, _tftp_udp_connections@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
	add	x0, x20, #4
	bl	_fd_close
	mov	x0, x20
	bl	_tftp_conn_close_handles
	mov	x0, x20
	mov	w1, #8
	bl	_zfree
	mov	x0, #0
LBB0_7:
	mov	w8, w19
	ldr	x9, [x21]
	str	x0, [x9, x8, lsl #3]
LBB0_8:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_C,8,3                          ; @C
	.comm	_tftp_udp_connections,4,2       ; @tftp_udp_connections
.subsections_via_symbols
