	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %r13d
	movq	%rsp, -96(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BUFSIZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_Z_BEST_COMPRESSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	movl	$60, -84(%rbp)                  ## 4-byte Folded Spill
	movl	$10, -68(%rbp)                  ## 4-byte Folded Spill
	leaq	L_.str(%rip), %r12
	movq	_optarg@GOTPCREL(%rip), %rbx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_usage
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_getopt
	cmpl	$118, %eax
	jg	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$115, %eax
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$122, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$119, %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	jmp	LBB0_1
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	jmp	LBB0_1
LBB0_10:
	movq	_optind@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, %rax
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	subl	%ecx, %r13d
	cmpl	$1, %r13d
	je	LBB0_12
## %bb.11:
	xorl	%eax, %eax
	callq	_usage
LBB0_12:
	movl	-88(%rbp), %r13d                ## 4-byte Reload
	cmpl	$10, %r13d
	movl	-84(%rbp), %ebx                 ## 4-byte Reload
	jb	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	callq	_usage
LBB0_14:
	cmpl	%ebx, -68(%rbp)                 ## 4-byte Folded Reload
	jbe	LBB0_16
## %bb.15:
	xorl	%eax, %eax
	callq	_usage
LBB0_16:
	xorl	%eax, %eax
	callq	_fifolog_write_new
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%r15,%rax,8), %rsi
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	movl	%r13d, %r8d
	callq	_fifolog_write_open
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%rax, %rdx
	callq	_err
LBB0_18:
	movq	_POLLIN@GOTPCREL(%rip), %r12
	leaq	-64(%rbp), %r15
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_fifolog_write_poll
LBB0_19:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_23 Depth 2
	movq	$0, -56(%rbp)
	movl	(%r12), %eax
	movl	%eax, -64(%rbp)
	movq	%r15, %rdi
	movl	$1, %esi
	movl	$1000, %edx                     ## imm = 0x3E8
	callq	_poll
	testl	%eax, %eax
	je	LBB0_27
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	cmpl	$1, %eax
	jne	LBB0_19
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	_stdin@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_28
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%r14, %rdi
	callq	_strlen
	movq	%rax, %r13
	xorl	%edi, %edi
	addq	%r14, %r13
	setne	%dil
	callq	_assert
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_19 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rbx
	cmpq	%r14, %r13
	jbe	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=2
	leaq	-1(%rbx), %r13
	movsbl	-1(%rbx), %edi
	callq	_isspace
	testq	%rax, %rax
	jne	LBB0_23
LBB0_25:                                ##   in Loop: Header=BB0_19 Depth=1
	movb	$0, (%rbx)
	cmpb	$0, (%r14)
	je	LBB0_19
## %bb.26:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	callq	_fifolog_write_record_poll
	jmp	LBB0_19
LBB0_28:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_fifolog_write_close
	movq	-96(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_30
## %bb.29:
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFSIZ,4,2                     ## @BUFSIZ
	.comm	_Z_BEST_COMPRESSION,4,2         ## @Z_BEST_COMPRESSION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w:s:z:"

	.comm	_optarg,4,2                     ## @optarg
	.comm	_optind,8,3                     ## @optind
L_.str.1:                               ## @.str.1
	.asciz	"Error: %s"

	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_stdin,4,2                      ## @stdin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #32
	mov	x21, x1
	mov	x25, x0
	mov	x27, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _BUFSIZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BUFSIZ@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
	mov	x9, x19
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x19, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
Lloh8:
	adrp	x8, _Z_BEST_COMPRESSION@GOTPAGE
Lloh9:
	ldr	x8, [x8, _Z_BEST_COMPRESSION@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
	mov	w23, #60
	mov	w24, #10
Lloh11:
	adrp	x26, l_.str@PAGE
Lloh12:
	add	x26, x26, l_.str@PAGEOFF
Lloh13:
	adrp	x28, _optarg@GOTPAGE
Lloh14:
	ldr	x28, [x28, _optarg@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	bl	_usage
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	mov	x1, x21
	mov	x2, x26
	bl	_getopt
	cmp	w0, #118
	b.gt	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, #115
	b.ne	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x28]
	mov	x1, #0
	mov	w2, #0
	bl	_strtoul
	mov	x23, x0
	b	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, #122
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, #119
	b.ne	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x28]
	mov	x1, #0
	mov	w2, #0
	bl	_strtoul
	mov	x24, x0
	b	LBB0_2
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x28]
	mov	x1, #0
	mov	w2, #0
	bl	_strtoul
	mov	x22, x0
	b	LBB0_2
LBB0_10:
Lloh15:
	adrp	x8, _optind@GOTPAGE
Lloh16:
	ldr	x8, [x8, _optind@GOTPAGEOFF]
Lloh17:
	ldr	x26, [x8]
	sub	w8, w25, w26
	cmp	w8, #1
	b.ne	LBB0_28
; %bb.11:
	cmp	w22, #10
	b.hs	LBB0_29
LBB0_12:
	cmp	w24, w23
	b.ls	LBB0_14
LBB0_13:
	bl	_usage
LBB0_14:
	bl	_fifolog_write_new
	mov	x25, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	ldr	x1, [x21, x26, lsl #3]
	mov	x0, x25
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	bl	_fifolog_write_open
	cbz	x0, LBB0_16
; %bb.15:
	mov	x2, x0
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_16:
Lloh20:
	adrp	x21, _POLLIN@GOTPAGE
Lloh21:
	ldr	x21, [x21, _POLLIN@GOTPAGEOFF]
Lloh22:
	adrp	x22, _stdin@GOTPAGE
Lloh23:
	ldr	x22, [x22, _stdin@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x25
	mov	w1, #0
	bl	_fifolog_write_poll
LBB0_18:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_22 Depth 2
	stur	xzr, [x29, #-96]
	ldr	w8, [x21]
	stur	w8, [x29, #-104]
	sub	x0, x29, #104
	mov	w1, #1
	mov	w2, #1000
	bl	_poll
	cbz	w0, LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	cmp	w0, #1
	b.ne	LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w2, [x22]
	mov	x0, x20
	mov	x1, x19
	bl	_fgets
	cbz	x0, LBB0_26
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x20
	bl	_strlen
	adds	x23, x20, x0
	cset	w0, ne
	bl	_assert
LBB0_22:                                ;   Parent Loop BB0_18 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x24, x23
	cmp	x23, x20
	b.ls	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=2
	mov	x23, x24
	ldrsb	w0, [x23, #-1]!
	bl	_isspace
	cbnz	x0, LBB0_22
LBB0_24:                                ;   in Loop: Header=BB0_18 Depth=1
	strb	wzr, [x24]
	ldrb	w8, [x20]
	cbz	w8, LBB0_18
; %bb.25:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x25
	mov	w1, #0
	mov	w2, #0
	mov	x3, x20
	mov	w4, #0
	bl	_fifolog_write_record_poll
	b	LBB0_18
LBB0_26:
	mov	x0, x25
	bl	_fifolog_write_close
	mov	sp, x27
	ldur	x8, [x29, #-88]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_30
; %bb.27:
	mov	w0, #0
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_28:
	bl	_usage
	cmp	w22, #10
	b.lo	LBB0_12
LBB0_29:
	bl	_usage
	cmp	w24, w23
	b.hi	LBB0_13
	b	LBB0_14
LBB0_30:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFSIZ,4,2                     ; @BUFSIZ
	.comm	_Z_BEST_COMPRESSION,4,2         ; @Z_BEST_COMPRESSION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w:s:z:"

	.comm	_optarg,4,2                     ; @optarg
	.comm	_optind,8,3                     ; @optind
l_.str.1:                               ; @.str.1
	.asciz	"Error: %s"

	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_stdin,4,2                      ; @stdin
.subsections_via_symbols
