	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flush_write                    ## -- Begin function flush_write
	.p2align	4, 0x90
_flush_write:                           ## @flush_write
	.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
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_wptr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%edi, %rbx
	movq	(%rcx,%rbx,8), %rdx
	movq	_write_buff@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	subq	(%rcx,%rbx,8), %rdx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_3
LBB0_1:
	movslq	%edi, %rbx
LBB0_3:
	movq	_wptr@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rcx
	movq	_write_buff@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	movq	(%rdx,%rbx,8), %rsi
	movq	%rcx, %rdx
	subq	%rsi, %rdx
	je	LBB0_6
## %bb.4:
	movq	_write_fd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_write
	movl	%eax, %r14d
	testl	%eax, %eax
	jle	LBB0_7
## %bb.5:
	movl	%r14d, %edx
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rsi
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rcx
	subq	%rcx, %rsi
	cmpq	%rdx, %rsi
	jne	LBB0_8
LBB0_6:
	movq	%rcx, (%rax,%rbx,8)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%r14d, %edx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$2, %edi
	callq	_exit
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$2, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_verbosity,8,3                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"writing %ld bytes to file %d\n"

	.comm	_wptr,8,3                       ## @wptr
	.comm	_write_buff,8,3                 ## @write_buff
	.comm	_write_fd,8,3                   ## @write_fd
L_.str.1:                               ## @.str.1
	.asciz	"error_code %d (%s)\n"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"written only part...\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flush_write                    ; -- Begin function flush_write
	.p2align	2
_flush_write:                           ; @flush_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _verbosity@GOTPAGE
Lloh1:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x21, _wptr@GOTPAGE
Lloh4:
	ldr	x21, [x21, _wptr@GOTPAGEOFF]
Lloh5:
	adrp	x20, _write_buff@GOTPAGE
Lloh6:
	ldr	x20, [x20, _write_buff@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	x9, [x21]
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	sxtw	x19, w0
	sbfiz	x10, x0, #3, #32
	ldr	x9, [x9, x10]
	ldr	x11, [x20]
	ldr	x10, [x11, x10]
	sub	x9, x9, x10
	stp	x9, x0, [sp]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_fprintf
	b	LBB0_3
LBB0_2:
	sxtw	x19, w0
LBB0_3:
	ldr	x8, [x21]
	lsl	x22, x19, #3
	ldr	x9, [x8, x22]
	ldr	x10, [x20]
	ldr	x1, [x10, x22]
	subs	x2, x9, x1
	b.eq	LBB0_6
; %bb.4:
Lloh12:
	adrp	x8, _write_fd@GOTPAGE
Lloh13:
	ldr	x8, [x8, _write_fd@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	w0, [x8, x19, lsl #2]
	bl	_write
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, #0
	b.le	LBB0_7
; %bb.5:
	ldr	x8, [x21]
	ldr	x10, [x8, x22]
	ldr	x9, [x20]
	ldr	x9, [x9, x22]
	sub	x10, x10, x9
	cmp	x10, w0, uxtw
	b.ne	LBB0_8
LBB0_6:
	str	x9, [x8, x19, lsl #3]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
Lloh15:
	adrp	x8, _stderr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh17:
	ldr	w19, [x8]
Lloh18:
	adrp	x8, _errno@GOTPAGE
Lloh19:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	mov	x20, x0
	mov	x0, x8
	bl	_strerror
	stp	x20, x0, [sp]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	b	LBB0_9
LBB0_8:
Lloh23:
	adrp	x8, _stderr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	bl	_fprintf
	mov	w0, #2
	bl	_exit
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_verbosity,8,3                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"writing %ld bytes to file %d\n"

	.comm	_wptr,8,3                       ; @wptr
	.comm	_write_buff,8,3                 ; @write_buff
	.comm	_write_fd,8,3                   ; @write_fd
l_.str.1:                               ; @.str.1
	.asciz	"error_code %d (%s)\n"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"written only part...\n"

.subsections_via_symbols
