	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_write_init                     ## -- Begin function write_init
	.p2align	4, 0x90
_write_init:                            ## @write_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.3:
	movq	_file@GOTPCREL(%rip), %rax
	movq	%rsi, (%rax)
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rsi
	callq	_fdopen
	movq	_file@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	movq	_convert@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_tftp_log
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w"

	.comm	_file,8,3                       ## @file
	.comm	_errno,4,2                      ## @errno
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
L_.str.1:                               ## @.str.1
	.asciz	"fdopen() failed: %s"

L_.str.2:                               ## @.str.2
	.asciz	"netascii"

	.comm	_convert,4,2                    ## @convert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_write_init                     ; -- Begin function write_init
	.p2align	2
_write_init:                            ; @write_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	cbz	x1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _file@GOTPAGE
Lloh1:
	ldr	x8, [x8, _file@GOTPAGEOFF]
Lloh2:
	str	x1, [x8]
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fdopen
Lloh5:
	adrp	x8, _file@GOTPAGE
Lloh6:
	ldr	x8, [x8, _file@GOTPAGEOFF]
Lloh7:
	str	x0, [x8]
	cbz	x0, LBB0_5
LBB0_3:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_strcmp
	mov	w19, #0
	cmp	w0, #0
	cset	w8, eq
Lloh10:
	adrp	x9, _convert@GOTPAGE
Lloh11:
	ldr	x9, [x9, _convert@GOTPAGEOFF]
Lloh12:
	str	w8, [x9]
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh13:
	adrp	x8, _errno@GOTPAGE
Lloh14:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh15:
	ldr	w19, [x8]
Lloh16:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh18:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_strerror
	mov	x2, x0
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_tftp_log
	b	LBB0_4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w"

	.comm	_file,8,3                       ; @file
	.comm	_errno,4,2                      ; @errno
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
l_.str.1:                               ; @.str.1
	.asciz	"fdopen() failed: %s"

l_.str.2:                               ; @.str.2
	.asciz	"netascii"

	.comm	_convert,4,2                    ; @convert
.subsections_via_symbols
