	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gzwrite                        ## -- Begin function gzwrite
	.p2align	4, 0x90
_gzwrite:                               ## @gzwrite
	.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
	xorl	%r15d, %r15d
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.1:
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	_GZ_WRITE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.2:
	movq	8(%r13), %rax
	movq	_Z_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.3:
	movl	%edx, %ebx
	testl	%edx, %edx
	js	LBB0_4
## %bb.5:
	je	LBB0_21
## %bb.6:
	movq	%rsi, %r12
	cmpq	$0, 16(%r13)
	jne	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	callq	_gz_init
	cmpl	$-1, %eax
	je	LBB0_21
LBB0_8:
	cmpq	$0, 40(%r13)
	je	LBB0_10
## %bb.9:
	movq	$0, 40(%r13)
	movl	36(%r13), %esi
	movq	%r13, %rdi
	callq	_gz_zero
	cmpl	$-1, %eax
	je	LBB0_21
LBB0_10:
	movl	%ebx, %r14d
	cmpq	%r14, 16(%r13)
	jle	LBB0_17
## %bb.11:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %r14d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	48(%r13), %rcx
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	24(%r13), %rax
	movq	56(%r13), %rdx
	jmp	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	24(%r13), %rax
	movq	%rax, 56(%r13)
	movq	%rax, %rdx
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	addq	%rcx, %rdx
	subq	%rax, %rdx
	movl	16(%r13), %ebx
	movl	%edx, %edi
	subl	%edx, %ebx
	cmpl	%ebx, %r14d
	cmovbl	%r14d, %ebx
	addq	%rax, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	addq	%rbx, 48(%r13)
	addl	%ebx, 32(%r13)
	subl	%ebx, %r14d
	je	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	addq	%rbx, %r12
	movq	_Z_NO_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_gz_comp
	cmpl	$-1, %eax
	jne	LBB0_12
	jmp	LBB0_21
LBB0_4:
	movq	_Z_DATA_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	callq	_gz_error
	jmp	LBB0_21
LBB0_17:
	cmpq	$0, 48(%r13)
	je	LBB0_19
## %bb.18:
	movq	_Z_NO_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_gz_comp
	cmpl	$-1, %eax
	je	LBB0_21
LBB0_19:
	movq	%r14, 48(%r13)
	movq	%r12, 56(%r13)
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	addl	%ebx, 32(%r13)
	movq	_Z_NO_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_gz_comp
	cmpl	$-1, %eax
	je	LBB0_21
LBB0_20:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
LBB0_21:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GZ_WRITE,8,3                   ## @GZ_WRITE
	.comm	_Z_OK,8,3                       ## @Z_OK
	.comm	_Z_DATA_ERROR,4,2               ## @Z_DATA_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"requested length does not fit in int"

	.comm	_Z_NO_FLUSH,4,2                 ## @Z_NO_FLUSH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gzwrite                        ; -- Begin function gzwrite
	.p2align	2
_gzwrite:                               ; @gzwrite
	.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
	cbz	x0, LBB0_18
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _GZ_WRITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GZ_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.2:
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x9, _Z_OK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _Z_OK@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.3:
	mov	x19, x2
	tbnz	w2, #31, LBB0_16
; %bb.4:
	cbz	w19, LBB0_17
; %bb.5:
	mov	x21, x1
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_gz_init
	cmn	w0, #1
	b.eq	LBB0_17
LBB0_7:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_9
; %bb.8:
	str	xzr, [x20, #40]
	ldr	w1, [x20, #36]
	mov	x0, x20
	bl	_gz_zero
	cmn	w0, #1
	b.eq	LBB0_17
LBB0_9:
	mov	w22, w19
	ldr	x8, [x20, #16]
	cmp	x8, x22
	b.le	LBB0_19
; %bb.10:
Lloh6:
	adrp	x23, _Z_NO_FLUSH@GOTPAGE
Lloh7:
	ldr	x23, [x23, _Z_NO_FLUSH@GOTPAGEOFF]
	mov	x24, x19
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #48]
	cbz	x8, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x10, [x20, #56]
	ldr	x9, [x20, #24]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x9, [x20, #24]
	str	x9, [x20, #56]
	mov	x10, x9
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x8, x10, x8
	sub	x8, x8, x9
	ldr	w10, [x20, #16]
	sub	w10, w10, w8
	cmp	w24, w10
	csel	w22, w24, w10, lo
	add	x0, x9, w8, uxtw
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
	ldr	x8, [x20, #48]
	add	x8, x8, x22
	str	x8, [x20, #48]
	ldr	w8, [x20, #32]
	add	w8, w8, w22
	str	w8, [x20, #32]
	subs	w24, w24, w22
	b.eq	LBB0_22
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x21, x21, x22
	ldr	w1, [x23]
	mov	x0, x20
	bl	_gz_comp
	mov	x8, x0
	mov	w0, #0
	cmn	w8, #1
	b.ne	LBB0_11
	b	LBB0_18
LBB0_16:
Lloh8:
	adrp	x8, _Z_DATA_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _Z_DATA_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_gz_error
LBB0_17:
	mov	w0, #0
LBB0_18:
	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
LBB0_19:
	ldr	x8, [x20, #48]
Lloh13:
	adrp	x23, _Z_NO_FLUSH@GOTPAGE
Lloh14:
	ldr	x23, [x23, _Z_NO_FLUSH@GOTPAGEOFF]
	cbz	x8, LBB0_21
; %bb.20:
	ldr	w1, [x23]
	mov	x0, x20
	bl	_gz_comp
	cmn	w0, #1
	b.eq	LBB0_17
LBB0_21:
	stp	x22, x21, [x20, #48]
	ldr	w8, [x20, #32]
	add	w8, w8, w19
	str	w8, [x20, #32]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_gz_comp
	cmn	w0, #1
	b.eq	LBB0_17
LBB0_22:
	mov	x0, x19
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GZ_WRITE,8,3                   ; @GZ_WRITE
	.comm	_Z_OK,8,3                       ; @Z_OK
	.comm	_Z_DATA_ERROR,4,2               ; @Z_DATA_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"requested length does not fit in int"

	.comm	_Z_NO_FLUSH,4,2                 ; @Z_NO_FLUSH
.subsections_via_symbols
