	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function process_data
_process_data:                          ## @process_data
	.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
	movq	_recv_data_packets@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	_working_mode@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movq	_SERVER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	_tftp_undef@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_2:
	movq	%rdi, %r15
	movl	36(%rdi), %edi
	xorl	%esi, %esi
	callq	_get_connection_f
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:
	movq	%rax, %r14
	movslq	(%rbx), %rcx
	movl	$1, %eax
	subq	%rcx, %rax
	cmpl	$1, 8(%r15)
	movq	(%r14), %rcx
	jne	LBB0_9
## %bb.7:
	cmpq	$0, (%rcx,%rax,8)
	jne	LBB0_9
## %bb.8:
	movq	(%r15), %rdx
	movq	%rdx, (%rcx,%rax,8)
LBB0_9:
	movq	(%rcx,%rax,8), %rax
	cmpq	(%r15), %rax
	jne	LBB0_3
## %bb.10:
	movl	32(%r14), %edi
	movl	32(%r15), %esi
	movl	$16, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_tftp_undef@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_3:
	movq	_tftp_unknown_transfer_id@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edi
	xorl	%esi, %esi
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tftp_store_error               ## TAILCALL
LBB0_12:
	movl	8(%r15), %edx
	movslq	8(%r14), %rcx
	cmpl	%ecx, %edx
	jne	LBB0_14
## %bb.13:
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edi
	callq	_vkprintf
	movl	8(%r15), %edi
	jmp	LBB0_19
LBB0_14:
	leal	1(%rcx), %esi
	movzwl	%si, %eax
	cmpl	%eax, %edx
	jne	LBB0_20
## %bb.15:
	movq	16(%r15), %rax
	testq	%rax, %rax
	jle	LBB0_18
## %bb.16:
	movq	_fd_out@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movl	24(%r15), %esi
	imulq	24(%r14), %rcx
	movq	%rax, %rdx
	callq	_pwrite
	cmpq	16(%r15), %rax
	jne	LBB0_21
## %bb.17:
	movl	8(%r14), %esi
	movl	8(%r15), %edx
	incl	%esi
LBB0_18:
	movl	%esi, 8(%r14)
	movq	%rax, 16(%r14)
	movl	%edx, %edi
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tftp_store_ack                 ## TAILCALL
LBB0_20:
	movl	$-1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movq	_tftp_disk_full@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_recv_data_packets,4,2          ## @recv_data_packets
	.comm	_working_mode,4,2               ## @working_mode
	.comm	_SERVER,4,2                     ## @SERVER
	.comm	_tftp_undef,4,2                 ## @tftp_undef
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Data packet was sent to server"

	.comm	_tftp_unknown_transfer_id,4,2   ## @tftp_unknown_transfer_id
L_.str.1:                               ## @.str.1
	.asciz	"Connection IP isn't matched."

L_.str.2:                               ## @.str.2
	.asciz	"Receive duplicate data packet for block number %d. Resend acknowledgement packet.\n"

	.comm	_fd_out,4,2                     ## @fd_out
	.comm	_tftp_disk_full,4,2             ## @tftp_disk_full
	.no_dead_strip	_process_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function process_data
_process_data:                          ; @process_data
	.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
Lloh0:
	adrp	x8, _recv_data_packets@GOTPAGE
Lloh1:
	ldr	x8, [x8, _recv_data_packets@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
Lloh2:
	adrp	x21, _working_mode@GOTPAGE
Lloh3:
	ldr	x21, [x21, _working_mode@GOTPAGEOFF]
	str	w9, [x8]
	ldr	w8, [x21]
Lloh4:
	adrp	x9, _SERVER@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SERVER@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _tftp_undef@GOTPAGE
Lloh8:
	ldr	x8, [x8, _tftp_undef@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_2:
	mov	x19, x0
	ldr	w0, [x0, #36]
	mov	w1, #0
	bl	_get_connection_f
	cbz	x0, LBB0_9
; %bb.3:
	mov	x20, x0
	ldr	w10, [x19, #8]
	ldr	x8, [x0]
	ldrsw	x9, [x21]
	mov	w11, #1
	sub	x9, x11, x9
	cmp	w10, #1
	b.ne	LBB0_6
; %bb.4:
	ldr	x10, [x8, x9, lsl #3]
	cbnz	x10, LBB0_6
; %bb.5:
	ldr	x10, [x19]
	str	x10, [x8, x9, lsl #3]
LBB0_6:
	ldr	x8, [x8, x9, lsl #3]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
	ldr	w0, [x20, #32]
	ldr	w1, [x19, #32]
	mov	w2, #16
	bl	_memcmp
	cbz	x0, LBB0_12
; %bb.8:
Lloh12:
	adrp	x8, _tftp_undef@GOTPAGE
Lloh13:
	ldr	x8, [x8, _tftp_undef@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_9:
Lloh17:
	adrp	x8, _tftp_unknown_transfer_id@GOTPAGE
Lloh18:
	ldr	x8, [x8, _tftp_unknown_transfer_id@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
	mov	x1, #0
LBB0_11:
	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
	b	_tftp_store_error
LBB0_12:
	ldr	w2, [x19, #8]
	ldrsw	x10, [x20, #8]
	cmp	w2, w10
	b.ne	LBB0_14
; %bb.13:
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #3
	bl	_vkprintf
	ldr	w0, [x19, #8]
	b	LBB0_19
LBB0_14:
	add	w9, w10, #1
	cmp	w2, w9, uxth
	b.ne	LBB0_20
; %bb.15:
	ldr	x8, [x19, #16]
	cmp	x8, #1
	b.lt	LBB0_18
; %bb.16:
Lloh21:
	adrp	x9, _fd_out@GOTPAGE
Lloh22:
	ldr	x9, [x9, _fd_out@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x9]
	ldr	w1, [x19, #24]
	ldr	x9, [x20, #24]
	mul	x3, x9, x10
	mov	x2, x8
	bl	_pwrite
	ldr	x9, [x19, #16]
	cmp	x0, x9
	b.ne	LBB0_21
; %bb.17:
	mov	x8, x0
	ldr	w9, [x20, #8]
	ldr	w2, [x19, #8]
	add	w9, w9, #1
LBB0_18:
	str	w9, [x20, #8]
	str	x8, [x20, #16]
	mov	x0, x2
LBB0_19:
	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
	b	_tftp_store_ack
LBB0_20:
	mov	w0, #-1
	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_21:
Lloh24:
	adrp	x8, _tftp_disk_full@GOTPAGE
Lloh25:
	ldr	x8, [x8, _tftp_disk_full@GOTPAGEOFF]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_recv_data_packets,4,2          ; @recv_data_packets
	.comm	_working_mode,4,2               ; @working_mode
	.comm	_SERVER,4,2                     ; @SERVER
	.comm	_tftp_undef,4,2                 ; @tftp_undef
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Data packet was sent to server"

	.comm	_tftp_unknown_transfer_id,4,2   ; @tftp_unknown_transfer_id
l_.str.1:                               ; @.str.1
	.asciz	"Connection IP isn't matched."

l_.str.2:                               ; @.str.2
	.asciz	"Receive duplicate data packet for block number %d. Resend acknowledgement packet.\n"

	.comm	_fd_out,4,2                     ; @fd_out
	.comm	_tftp_disk_full,4,2             ; @tftp_disk_full
	.no_dead_strip	_process_data
.subsections_via_symbols
