	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bgzf_flush                     ## -- Begin function bgzf_flush
	.p2align	4, 0x90
_bgzf_flush:                            ## @bgzf_flush
	.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	%rdi, %r15
	xorl	%edi, %edi
	cmpb	$119, (%r15)
	sete	%dil
	callq	_assert
	movq	8(%r15), %rsi
	testq	%rsi, %rsi
	jle	LBB0_6
## %bb.1:
	movl	$-1, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_deflate_block
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ebx
	movl	24(%r15), %ecx
	movl	28(%r15), %edi
	movl	$1, %esi
	movl	%eax, %edx
	callq	_fwrite
	cmpl	%ebx, %eax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	addl	%ebx, 16(%r15)
	movq	8(%r15), %rsi
	testq	%rsi, %rsi
	jg	LBB0_2
LBB0_6:
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_4:
	movq	_BGZF_ERR_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%r15)
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BGZF_ERR_IO,4,2                ## @BGZF_ERR_IO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bgzf_flush                     ; -- Begin function bgzf_flush
	.p2align	2
_bgzf_flush:                            ; @bgzf_flush
	.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, x0
	ldrb	w8, [x0]
	cmp	w8, #119
	cset	w0, eq
	bl	_assert
	ldr	x1, [x19, #8]
	cmp	x1, #1
	b.lt	LBB0_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_deflate_block
	tbnz	w0, #31, LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x20, x0
	ldp	w3, w0, [x19, #24]
	mov	w1, #1
	mov	x2, x20
	bl	_fwrite
	cmp	w0, w20
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x19, #16]
	add	w8, w8, w20
	str	w8, [x19, #16]
	ldr	x1, [x19, #8]
	cmp	x1, #0
	b.gt	LBB0_1
LBB0_4:
	mov	w0, #0
	b	LBB0_7
LBB0_5:
Lloh0:
	adrp	x8, _BGZF_ERR_IO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BGZF_ERR_IO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #20]
	orr	w8, w9, w8
	str	w8, [x19, #20]
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BGZF_ERR_IO,4,2                ; @BGZF_ERR_IO
.subsections_via_symbols
