	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function operate_on_bytes
_operate_on_bytes:                      ## @operate_on_bytes
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_operate_common
	movl	$-1, %r14d
	testq	%rax, %rax
	js	LBB0_16
## %bb.1:
	movq	_fd@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_buf@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_bsize@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_read
	testl	%eax, %eax
	jle	LBB0_2
## %bb.5:
	movl	%eax, %r12d
	testl	%ebx, %ebx
	js	LBB0_9
## %bb.6:
	movq	_buf@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	%r12d, %edx
	callq	_write
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	_end_dialog
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_err
LBB0_8:
	movl	%ebx, %edi
	callq	_fsync
LBB0_9:
	movq	_dpv_overall_read@GOTPCREL(%rip), %rax
	addl	%r12d, (%rax)
	movslq	(%r15), %rax
	movslq	%r12d, %rcx
	addq	%rax, %rcx
	movl	%ecx, (%r15)
	movq	8(%r15), %rsi
	testq	%rsi, %rsi
	js	LBB0_16
## %bb.10:
	imulq	$100, %rcx, %rax
	testq	%rsi, %rsi
	movl	$1, %edi
	cmovneq	%rsi, %rdi
	movq	%rax, %rdx
	orq	%rdi, %rdx
	shrq	$32, %rdx
	je	LBB0_11
## %bb.12:
	cqto
	idivq	%rdi
	movq	%rax, %r14
	jmp	LBB0_13
LBB0_2:
	movl	(%r13), %edi
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	je	LBB0_4
## %bb.3:
	callq	_close
LBB0_4:
	movl	$-1, (%r13)
	movq	_DPV_STATUS_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movl	$100, %r14d
	jmp	LBB0_16
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %r14d
LBB0_13:
	movq	_no_overrun@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_16
## %bb.14:
	cmpl	$100, %r14d
	jne	LBB0_16
## %bb.15:
	movslq	%ecx, %rax
	xorl	%ecx, %ecx
	cmpq	%rax, %rsi
	setg	%cl
	movl	$100, %r14d
	subl	%ecx, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fd,4,2                         ## @fd
	.comm	_buf,4,2                        ## @buf
	.comm	_bsize,4,2                      ## @bsize
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_DPV_STATUS_DONE,4,2            ## @DPV_STATUS_DONE
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"output"

	.comm	_dpv_overall_read,4,2           ## @dpv_overall_read
	.comm	_no_overrun,8,3                 ## @no_overrun
	.no_dead_strip	_operate_on_bytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function operate_on_bytes
_operate_on_bytes:                      ; @operate_on_bytes
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	bl	_operate_common
	tbnz	x0, #63, LBB0_10
; %bb.1:
Lloh0:
	adrp	x22, _fd@GOTPAGE
Lloh1:
	ldr	x22, [x22, _fd@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x23, _buf@GOTPAGE
Lloh3:
	ldr	x23, [x23, _buf@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh4:
	adrp	x8, _bsize@GOTPAGE
Lloh5:
	ldr	x8, [x8, _bsize@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	bl	_read
	cmp	w0, #0
	b.le	LBB0_11
; %bb.2:
	mov	x21, x0
	tbnz	w20, #31, LBB0_6
; %bb.3:
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x21
	bl	_write
	tbz	w0, #31, LBB0_5
; %bb.4:
	bl	_end_dialog
Lloh7:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_5:
	mov	x0, x20
	bl	_fsync
LBB0_6:
Lloh12:
	adrp	x8, _dpv_overall_read@GOTPAGE
Lloh13:
	ldr	x8, [x8, _dpv_overall_read@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, w21
	str	w9, [x8]
	ldrsw	x8, [x19]
	add	x8, x8, w21, sxtw
	str	w8, [x19]
	ldr	x9, [x19, #8]
	tbnz	x9, #63, LBB0_10
; %bb.7:
	mov	w10, #100
	mul	x10, x8, x10
	cmp	x9, #0
	csinc	x11, x9, xzr, ne
Lloh14:
	adrp	x12, _no_overrun@GOTPAGE
Lloh15:
	ldr	x12, [x12, _no_overrun@GOTPAGEOFF]
Lloh16:
	ldr	x12, [x12]
	sdiv	x0, x10, x11
	cbz	x12, LBB0_14
; %bb.8:
	cmp	w0, #100
	b.ne	LBB0_14
; %bb.9:
	cmp	x9, w8, sxtw
	mov	w8, #99
	cinc	w0, w8, le
	b	LBB0_14
LBB0_10:
	mov	w0, #-1
	b	LBB0_14
LBB0_11:
	ldr	w0, [x22]
Lloh17:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_13
; %bb.12:
	bl	_close
LBB0_13:
	mov	w8, #-1
	str	w8, [x22]
Lloh20:
	adrp	x8, _DPV_STATUS_DONE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DPV_STATUS_DONE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	mov	w0, #100
LBB0_14:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_fd,4,2                         ; @fd
	.comm	_buf,4,2                        ; @buf
	.comm	_bsize,4,2                      ; @bsize
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_DPV_STATUS_DONE,4,2            ; @DPV_STATUS_DONE
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"output"

	.comm	_dpv_overall_read,4,2           ; @dpv_overall_read
	.comm	_no_overrun,8,3                 ; @no_overrun
	.no_dead_strip	_operate_on_bytes
.subsections_via_symbols
