	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xmitfile                       ## -- Begin function xmitfile
	.p2align	4, 0x90
_xmitfile:                              ## @xmitfile
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movl	%edi, %r13d
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPKTSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	leaq	-72(%rbp), %rdi
	callq	_stats_init
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_atoi
	movl	%eax, %edi
	callq	_htons
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_getservbyname
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movl	(%r14), %eax
LBB0_3:
	movq	_peer_sock@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$1, %r15d
	leaq	-56(%rbp), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_DEBUG_SIMPLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_debug@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_printf
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r13d, %edi
	movq	%rbx, %rsi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_send_wrq
	testl	%eax, %eax
	jg	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_MAXPKTSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_timeoutpacket@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r13d, %edi
	movq	%r12, %rsi
	movq	%r14, %rcx
	callq	_receive_packet
	testl	%eax, %eax
	jns	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_RP_TIMEOUT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.4(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_printf
	incl	%r15d
	cmpl	$13, %r15d
	jne	LBB0_4
## %bb.10:
	leaq	L_str.11(%rip), %rdi
	jmp	LBB0_15
LBB0_11:
	leaq	L_str.12(%rip), %rdi
	jmp	LBB0_15
LBB0_12:
	movl	-56(%rbp), %ecx
	movq	_peer_sock@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
LBB0_13:
	movq	(%r12), %rcx
	movq	_ERROR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_19
## %bb.14:
	leaq	L_str.10(%rip), %rdi
LBB0_15:
	callq	_puts
LBB0_16:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_17:
	movq	%rbx, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_28
## %bb.18:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_OACK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_22
## %bb.20:
	movq	_options_rfc_enabled@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_27
## %bb.21:
	movl	8(%r12), %esi
	addl	$2, %eax
	movl	%r13d, %edi
	movl	%eax, %edx
	callq	_parse_options
LBB0_22:
	movl	-76(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_read_init
	testq	%rax, %rax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	js	LBB0_26
## %bb.23:
	movl	$1, -56(%rbp)
	leaq	-56(%rbp), %rsi
	leaq	-72(%rbp), %rdx
	movl	%r13d, %edi
	callq	_tftp_send
	xorl	%eax, %eax
	callq	_read_close
	cmpq	$0, -72(%rbp)
	jle	LBB0_25
## %bb.24:
	movq	_verbose@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.9(%rip), %rdi
	leaq	-72(%rbp), %rdx
	callq	_printstats
LBB0_25:
	movq	_txrx_error@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	jmp	LBB0_17
LBB0_26:
	leaq	L_.str.8(%rip), %rdi
	callq	_warn
	jmp	LBB0_17
LBB0_27:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	_EBADOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	callq	_send_error
	jmp	LBB0_16
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPKTSIZE,4,2                 ## @MAXPKTSIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tftp"

L_.str.1:                               ## @.str.1
	.asciz	"udp"

	.comm	_peer_sock,4,2                  ## @peer_sock
	.comm	_debug,4,2                      ## @debug
	.comm	_DEBUG_SIMPLE,4,2               ## @DEBUG_SIMPLE
L_.str.2:                               ## @.str.2
	.asciz	"Sending %s\n"

	.comm	_timeoutpacket,4,2              ## @timeoutpacket
	.comm	_RP_TIMEOUT,4,2                 ## @RP_TIMEOUT
L_.str.4:                               ## @.str.4
	.asciz	"Try %d, didn't receive answer from remote.\n"

	.comm	_ERROR,8,3                      ## @ERROR
	.comm	_OACK,8,3                       ## @OACK
	.comm	_options_rfc_enabled,4,2        ## @options_rfc_enabled
	.comm	_EBADOP,4,2                     ## @EBADOP
L_.str.8:                               ## @.str.8
	.asciz	"read_init()"

L_.str.9:                               ## @.str.9
	.asciz	"Sent"

	.comm	_verbose,4,2                    ## @verbose
	.comm	_txrx_error,4,2                 ## @txrx_error
L_str:                                  ## @str
	.asciz	"Got OACK while options are not enabled!"

L_str.10:                               ## @str.10
	.asciz	"Got ERROR, aborted"

L_str.11:                               ## @str.11
	.asciz	"Transfer timed out."

L_str.12:                               ## @str.12
	.asciz	"Cannot send WRQ packet"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xmitfile                       ; -- Begin function xmitfile
	.p2align	2
_xmitfile:                              ; @xmitfile
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #48
	mov	x20, x4
	mov	x23, x3
	stur	w2, [x29, #-124]                ; 4-byte Folded Spill
	mov	x24, x1
	mov	x19, x0
	mov	x8, sp
	stur	x8, [x29, #-120]                ; 8-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAXPKTSIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPKTSIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	sub	x0, x29, #112
	bl	_stats_init
	sub	x0, x29, #104
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	cbz	x24, LBB0_2
; %bb.1:
	mov	x0, x24
	bl	_atoi
	bl	_htons
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_getservbyname
	mov	x24, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	ldr	w0, [x24]
LBB0_3:
Lloh12:
	adrp	x8, _peer_sock@GOTPAGE
Lloh13:
	ldr	x8, [x8, _peer_sock@GOTPAGEOFF]
Lloh14:
	str	w0, [x8]
	mov	w21, #1
Lloh15:
	adrp	x26, _debug@GOTPAGE
Lloh16:
	ldr	x26, [x26, _debug@GOTPAGEOFF]
Lloh17:
	adrp	x28, _DEBUG_SIMPLE@GOTPAGE
Lloh18:
	ldr	x28, [x28, _DEBUG_SIMPLE@GOTPAGEOFF]
Lloh19:
	adrp	x27, _timeoutpacket@GOTPAGE
Lloh20:
	ldr	x27, [x27, _timeoutpacket@GOTPAGEOFF]
Lloh21:
	adrp	x25, _RP_TIMEOUT@GOTPAGE
Lloh22:
	ldr	x25, [x25, _RP_TIMEOUT@GOTPAGEOFF]
Lloh23:
	adrp	x24, l_.str.4@PAGE
Lloh24:
	add	x24, x24, l_.str.4@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x26]
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x23, [sp, #-16]!
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	add	sp, sp, #16
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	x2, x20
	bl	_send_wrq
	cmp	w0, #1
	b.ge	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh27:
	adrp	x8, _MAXPKTSIZE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MAXPKTSIZE@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	ldr	w4, [x27]
	sub	x3, x29, #96
	mov	x0, x19
	mov	x1, x22
	bl	_receive_packet
	tbz	w0, #31, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x21, [sp, #-16]!
	mov	x0, x24
	bl	_printf
	add	sp, sp, #16
	add	w21, w21, #1
	cmp	w21, #13
	b.ne	LBB0_4
; %bb.10:
Lloh30:
	adrp	x0, l_str.11@PAGE
Lloh31:
	add	x0, x0, l_str.11@PAGEOFF
	bl	_puts
	b	LBB0_24
LBB0_11:
Lloh32:
	adrp	x0, l_str.12@PAGE
Lloh33:
	add	x0, x0, l_str.12@PAGEOFF
	bl	_puts
	b	LBB0_24
LBB0_12:
	ldur	w8, [x29, #-96]
Lloh34:
	adrp	x9, _peer_sock@GOTPAGE
Lloh35:
	ldr	x9, [x9, _peer_sock@GOTPAGEOFF]
Lloh36:
	str	w8, [x9]
LBB0_13:
	ldr	x8, [x22]
Lloh37:
	adrp	x9, _ERROR@GOTPAGE
Lloh38:
	ldr	x9, [x9, _ERROR@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:
Lloh40:
	adrp	x0, l_str.10@PAGE
Lloh41:
	add	x0, x0, l_str.10@PAGEOFF
	bl	_puts
	b	LBB0_24
LBB0_15:
Lloh42:
	adrp	x9, _OACK@GOTPAGE
Lloh43:
	ldr	x9, [x9, _OACK@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.16:
Lloh45:
	adrp	x8, _options_rfc_enabled@GOTPAGE
Lloh46:
	ldr	x8, [x8, _options_rfc_enabled@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	cbz	w8, LBB0_23
; %bb.17:
	ldr	w1, [x22, #8]
	add	w2, w0, #2
	mov	x0, x19
	bl	_parse_options
LBB0_18:
	ldur	w0, [x29, #-124]                ; 4-byte Folded Reload
	mov	x1, #0
	mov	x2, x20
	bl	_read_init
	tbnz	x0, #63, LBB0_22
; %bb.19:
	mov	w20, #1
	stur	w20, [x29, #-96]
	sub	x1, x29, #96
	sub	x2, x29, #112
	mov	x0, x19
	bl	_tftp_send
	bl	_read_close
	ldur	x8, [x29, #-112]
	cmp	x8, #1
	b.lt	LBB0_21
; %bb.20:
Lloh48:
	adrp	x8, _verbose@GOTPAGE
Lloh49:
	ldr	x8, [x8, _verbose@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
Lloh51:
	adrp	x0, l_.str.9@PAGE
Lloh52:
	add	x0, x0, l_.str.9@PAGEOFF
	sub	x2, x29, #112
	bl	_printstats
LBB0_21:
Lloh53:
	adrp	x8, _txrx_error@GOTPAGE
Lloh54:
	ldr	x8, [x8, _txrx_error@GOTPAGEOFF]
Lloh55:
	str	w20, [x8]
	b	LBB0_24
LBB0_22:
Lloh56:
	adrp	x0, l_.str.8@PAGE
Lloh57:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_warn
	b	LBB0_24
LBB0_23:
Lloh58:
	adrp	x0, l_str@PAGE
Lloh59:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
Lloh60:
	adrp	x8, _EBADOP@GOTPAGE
Lloh61:
	ldr	x8, [x8, _EBADOP@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_send_error
LBB0_24:
	ldur	x8, [x29, #-120]                ; 8-byte Folded Reload
	mov	sp, x8
	ldur	x8, [x29, #-88]
Lloh63:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh64:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh65:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotStr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotStr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPKTSIZE,4,2                 ; @MAXPKTSIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tftp"

l_.str.1:                               ; @.str.1
	.asciz	"udp"

	.comm	_peer_sock,4,2                  ; @peer_sock
	.comm	_debug,4,2                      ; @debug
	.comm	_DEBUG_SIMPLE,4,2               ; @DEBUG_SIMPLE
l_.str.2:                               ; @.str.2
	.asciz	"Sending %s\n"

	.comm	_timeoutpacket,4,2              ; @timeoutpacket
	.comm	_RP_TIMEOUT,4,2                 ; @RP_TIMEOUT
l_.str.4:                               ; @.str.4
	.asciz	"Try %d, didn't receive answer from remote.\n"

	.comm	_ERROR,8,3                      ; @ERROR
	.comm	_OACK,8,3                       ; @OACK
	.comm	_options_rfc_enabled,4,2        ; @options_rfc_enabled
	.comm	_EBADOP,4,2                     ; @EBADOP
l_.str.8:                               ; @.str.8
	.asciz	"read_init()"

l_.str.9:                               ; @.str.9
	.asciz	"Sent"

	.comm	_verbose,4,2                    ; @verbose
	.comm	_txrx_error,4,2                 ; @txrx_error
l_str:                                  ; @str
	.asciz	"Got OACK while options are not enabled!"

l_str.10:                               ; @str.10
	.asciz	"Got ERROR, aborted"

l_str.11:                               ; @str.11
	.asciz	"Transfer timed out."

l_str.12:                               ; @str.12
	.asciz	"Cannot send WRQ packet"

.subsections_via_symbols
