	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gzlog_compress                 ## -- Begin function gzlog_compress
	.p2align	4, 0x90
_gzlog_compress:                        ## @gzlog_compress
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-3, %ebx
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %r14
	movl	36(%rdi), %edi
	movq	_LOGID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, %rdi
	callq	_log_check
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_log_open
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_2
LBB0_5:
	movq	(%r14), %r12
	movq	8(%r14), %r15
	subq	%r15, %r12
	andq	$-1024, %r12                    ## imm = 0xFC00
	addq	16(%r14), %r12
	movq	%r12, %rdi
	callq	_malloc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_16
## %bb.6:
	movl	32(%r14), %edi
	decq	%r15
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	callq	_lseek
	movl	$-1, %ebx
	testq	%rax, %rax
	js	LBB0_19
## %bb.7:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	-60(%rbp), %rbx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	-56(%rbp), %r13                 ## 8-byte Folded Reload
	jae	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	32(%r14), %edi
	leaq	-61(%rbp), %rsi
	movl	$5, %edx
	xorl	%eax, %eax
	callq	_read
	cmpq	$5, %rax
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	callq	_PULL2
	leaq	(%rax,%r13), %r12
	cmpq	-56(%rbp), %r12                 ## 8-byte Folded Reload
	ja	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, %r15
	movl	32(%r14), %edi
	addq	-48(%rbp), %r13                 ## 8-byte Folded Reload
	movq	%r13, %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_read
	movq	%r12, %r13
	cmpq	%r15, %rax
	je	LBB0_8
LBB0_12:
	movl	32(%r14), %edi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_lseek
	movq	(%r14), %rcx
	movq	16(%r14), %rdx
	addq	%rdx, %rcx
	addq	$4, %rcx
	cmpq	%rcx, %rax
	jne	LBB0_18
## %bb.13:
	movq	%r14, %rdi
	callq	_log_touch
	movl	28(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	orl	(%rax), %esi
	movl	24(%r14), %edi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_open
	testl	%eax, %eax
	js	LBB0_18
## %bb.14:
	movl	%eax, %r15d
	movl	%eax, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_write
	xorl	%r12d, %r12d
	cmpq	%rbx, %rax
	setne	%r12b
	movl	%r15d, %edi
	callq	_close
	orl	%r12d, %eax
	je	LBB0_20
LBB0_18:
	movl	$-1, %ebx
LBB0_19:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	jmp	LBB0_2
LBB0_16:
	movl	$-2, %ebx
	jmp	LBB0_2
LBB0_20:
	movq	%r14, %rdi
	callq	_log_touch
	movl	28(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcpy
	movl	24(%r14), %edi
	movl	(%r13), %esi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_open
	testl	%eax, %eax
	js	LBB0_18
## %bb.21:
	movl	%eax, %r15d
	movq	_DICT@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, %r13
	cmovaeq	%rax, %r13
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	addq	%rax, %rsi
	subq	%r13, %rsi
	movl	%r15d, %edi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_write
	xorl	%r12d, %r12d
	cmpq	%r13, %rax
	setne	%r12b
	movl	%r15d, %edi
	callq	_close
	orl	%r12d, %eax
	jne	LBB0_18
## %bb.24:
	movq	%r14, %rdi
	callq	_log_touch
	movq	8(%r14), %rax
	movq	%rax, (%r14)
	movq	$0, 16(%r14)
	movq	_COMPRESS_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_log_mark
	testq	%rax, %rax
	movl	$-1, %ebx
	jne	LBB0_19
## %bb.25:
	movl	$7, %edi
	callq	_BAIL
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_log_compress
	movl	%eax, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_LOGID,4,2                      ## @LOGID
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".add"

	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
L_.str.1:                               ## @.str.1
	.asciz	".temp"

	.comm	_DICT,8,3                       ## @DICT
	.comm	_COMPRESS_OP,4,2                ## @COMPRESS_OP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gzlog_compress                 ; -- Begin function gzlog_compress
	.p2align	2
_gzlog_compress:                        ; @gzlog_compress
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x0, #36]
Lloh0:
	adrp	x8, _LOGID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOGID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_strcmp
	cbz	x0, LBB0_4
LBB0_2:
	mov	w20, #-3
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_4:
	mov	x0, x20
	bl	_log_check
	cbz	x0, LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_log_open
	cbz	x0, LBB0_7
; %bb.6:
	mov	w20, #-1
	b	LBB0_3
LBB0_7:
	ldp	x8, x22, [x20]
	sub	x8, x8, x22
	and	x8, x8, #0xfffffffffffffc00
	ldr	x9, [x20, #16]
	add	x21, x8, x9
	mov	x0, x21
	bl	_malloc
	cbz	x0, LBB0_19
; %bb.8:
	mov	x19, x0
	ldr	w0, [x20, #32]
	sub	x1, x22, #1
Lloh3:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_lseek
	tbnz	x0, #63, LBB0_17
; %bb.9:
	mov	x26, #0
	add	x24, sp, #27
	add	x22, x24, #1
	mov	w25, #5
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	cmp	x26, x21
	b.hs	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x20, #32]
	stp	x24, x25, [sp]
	bl	_read
	cmp	x0, #5
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x22
	bl	_PULL2
	add	x27, x0, x26
	cmp	x27, x21
	b.hi	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x23, x0
	ldr	w0, [x20, #32]
	add	x8, x19, x26
	stp	x8, x23, [sp]
	bl	_read
	mov	x26, x27
	cmp	x0, x23
	b.eq	LBB0_10
LBB0_14:
	ldr	w0, [x20, #32]
Lloh6:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x1, #0
	bl	_lseek
	ldr	x8, [x20]
	ldr	x9, [x20, #16]
	add	x8, x8, x9
	add	x8, x8, #4
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.15:
	mov	x0, x20
	bl	_log_touch
	ldr	w0, [x20, #28]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
	ldr	w0, [x20, #24]
Lloh11:
	adrp	x23, _O_WRONLY@GOTPAGE
Lloh12:
	ldr	x23, [x23, _O_WRONLY@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh13:
	adrp	x24, _O_CREAT@GOTPAGE
Lloh14:
	ldr	x24, [x24, _O_CREAT@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w9, w8
Lloh15:
	adrp	x25, _O_TRUNC@GOTPAGE
Lloh16:
	ldr	x25, [x25, _O_TRUNC@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w1, w8, w9
	mov	w2, #420
	bl	_open
	tbnz	w0, #31, LBB0_17
; %bb.16:
	mov	x22, x0
	stp	x19, x21, [sp]
	bl	_write
	cmp	x0, x21
	cset	w26, ne
	mov	x0, x22
	bl	_close
	orr	w8, w0, w26
	cbz	w8, LBB0_20
LBB0_17:
	mov	w20, #-1
LBB0_18:
	mov	x0, x19
	bl	_free
	b	LBB0_3
LBB0_19:
	mov	w20, #-2
	b	LBB0_3
LBB0_20:
	mov	x0, x20
	bl	_log_touch
	ldr	w0, [x20, #28]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcpy
	ldr	w0, [x20, #24]
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	w9, [x25]
	orr	w1, w8, w9
	mov	w2, #420
	bl	_open
	tbnz	w0, #31, LBB0_17
; %bb.21:
	mov	x22, x0
Lloh19:
	adrp	x8, _DICT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _DICT@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x8, x21
	csel	x23, x8, x21, lo
	add	x8, x19, x21
	sub	x8, x8, x23
	stp	x8, x23, [sp]
	bl	_write
	cmp	x0, x23
	cset	w23, ne
	mov	x0, x22
	bl	_close
	orr	w8, w0, w23
	cbnz	w8, LBB0_17
; %bb.22:
	mov	x0, x20
	bl	_log_touch
	ldr	x8, [x20, #8]
	str	x8, [x20]
	str	xzr, [x20, #16]
Lloh22:
	adrp	x8, _COMPRESS_OP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _COMPRESS_OP@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_log_mark
	cbnz	x0, LBB0_17
; %bb.23:
	mov	w0, #7
	bl	_BAIL
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_log_compress
	mov	x20, x0
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_LOGID,4,2                      ; @LOGID
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".add"

	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
l_.str.1:                               ; @.str.1
	.asciz	".temp"

	.comm	_DICT,8,3                       ; @DICT
	.comm	_COMPRESS_OP,4,2                ; @COMPRESS_OP
.subsections_via_symbols
