	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gzlog_write                    ## -- Begin function gzlog_write
	.p2align	4, 0x90
_gzlog_write:                           ## @gzlog_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	%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	$-3, %ebx
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	movl	20(%rdi), %edi
	movq	_LOGID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_2
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%ebx, %ebx
	testq	%r15, %r15
	je	LBB0_11
## %bb.3:
	testq	%r14, %r14
	je	LBB0_11
## %bb.4:
	movq	%r12, %rdi
	callq	_log_check
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	_log_open
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_11
LBB0_6:
	movl	16(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movl	12(%r12), %edi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_open
	movl	$-1, %ebx
	testl	%eax, %eax
	js	LBB0_11
## %bb.7:
	movl	%eax, %r13d
	movl	%eax, %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_write
	xorl	%ecx, %ecx
	cmpq	%r14, %rax
	setne	%cl
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	callq	_close
	orl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jne	LBB0_11
## %bb.8:
	movq	%r12, %rdi
	callq	_log_touch
	movq	_APPEND_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_log_mark
	testq	%rax, %rax
	jne	LBB0_11
## %bb.9:
	movl	$8, %edi
	callq	_BAIL
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_log_append
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movl	(%r12), %eax
	subl	4(%r12), %eax
	movl	8(%r12), %ecx
	sarl	$10, %eax
	sarl	$10, %ecx
	addl	%eax, %ecx
	movq	_TRIGGER@GOTPCREL(%rip), %rax
	movl	$0, %ebx
	cmpl	(%rax), %ecx
	jl	LBB0_11
## %bb.12:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gzlog_compress                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LOGID,4,2                      ## @LOGID
	.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
	.comm	_APPEND_OP,4,2                  ## @APPEND_OP
	.comm	_TRIGGER,4,2                    ## @TRIGGER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gzlog_write                    ; -- Begin function gzlog_write
	.p2align	2
_gzlog_write:                           ; @gzlog_write
	.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_2
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #20]
Lloh0:
	adrp	x8, _LOGID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOGID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_strcmp
	cbz	x0, LBB0_4
LBB0_2:
	mov	w0, #-3
LBB0_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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	cbz	x21, LBB0_3
; %bb.5:
	cbz	x20, LBB0_3
; %bb.6:
	mov	x0, x19
	bl	_log_check
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_log_open
	cbnz	x0, LBB0_12
LBB0_8:
	ldr	w0, [x19, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
	ldr	w0, [x19, #12]
Lloh5:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	w2, #420
	bl	_open
	tbnz	w0, #31, LBB0_12
; %bb.9:
	mov	x22, x0
	mov	x1, x21
	mov	x2, x20
	bl	_write
	cmp	x0, x20
	cset	w23, ne
	mov	x0, x22
	bl	_close
	orr	w8, w0, w23
	cbnz	w8, LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_log_touch
Lloh14:
	adrp	x8, _APPEND_OP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _APPEND_OP@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_log_mark
	cbnz	x0, LBB0_12
; %bb.11:
	mov	w0, #8
	bl	_BAIL
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_log_append
	cbz	x0, LBB0_13
LBB0_12:
	mov	w0, #-1
	b	LBB0_3
LBB0_13:
	ldp	w8, w9, [x19]
	sub	w8, w8, w9
	asr	w8, w8, #10
	ldr	w9, [x19, #8]
	add	w8, w8, w9, asr #10
Lloh17:
	adrp	x9, _TRIGGER@GOTPAGE
Lloh18:
	ldr	x9, [x9, _TRIGGER@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_15
; %bb.14:
	mov	w0, #0
	b	LBB0_3
LBB0_15:
	mov	x0, x19
	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
	b	_gzlog_compress
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_LOGID,4,2                      ; @LOGID
	.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
	.comm	_APPEND_OP,4,2                  ; @APPEND_OP
	.comm	_TRIGGER,4,2                    ; @TRIGGER
.subsections_via_symbols
