	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movl	%edi, %r15d
	movq	%rsp, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -64(%rbp)
	movq	_CHUNK@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	cmpl	$2, %r15d
	jne	LBB0_1
## %bb.2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %r15
	movq	_SPAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	callq	_build_index
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movq	-64(%rbp), %rsi
	movq	8(%rsi), %rax
	movslq	(%rsi), %rcx
	movl	-4(%rax,%rcx,4), %eax
	addl	%eax, %eax
	cltq
	imulq	$1431655766, %rax, %rbx         ## imm = 0x55555556
	movq	%rbx, %rax
	shrq	$63, %rax
	shrq	$32, %rbx
	addl	%eax, %ebx
	movl	(%r13), %r8d
	movq	%r15, %rdi
	movl	%ebx, %edx
	movq	%r14, %rcx
	callq	_extract
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movl	%eax, %r12d
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$1, %esi
	movl	%r12d, %edx
	callq	_fwrite
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.11(%rip), %rsi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_10
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %eax
	jmp	LBB0_12
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r12), %rdx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %eax
	jmp	LBB0_11
LBB0_6:
	movq	%r15, %rdi
	callq	_fclose
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %eax
	jmp	LBB0_11
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	leaq	L_.str.10(%rip), %rdx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_10:
	movq	-64(%rbp), %rdi
	callq	_free_index
	movq	%r15, %rdi
	callq	_fclose
	xorl	%eax, %eax
LBB0_11:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_12:
	movq	%rbx, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CHUNK,4,2                      ## @CHUNK
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usage: zran file.gz\n"

L_.str.1:                               ## @.str.1
	.asciz	"rb"

L_.str.2:                               ## @.str.2
	.asciz	"zran: could not open %s for reading\n"

	.comm	_SPAN,4,2                       ## @SPAN
L_.str.6:                               ## @.str.6
	.asciz	"zran: error %d while building index\n"

L_.str.7:                               ## @.str.7
	.asciz	"zran: built index with %d access points\n"

L_.str.8:                               ## @.str.8
	.asciz	"zran: extraction failed: %s error\n"

L_.str.10:                              ## @.str.10
	.asciz	"input corrupted"

	.comm	_stdout,4,2                     ## @stdout
L_.str.11:                              ## @.str.11
	.asciz	"zran: extracted %d bytes at %llu\n"

.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	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
	sub	sp, sp, #16
	mov	x21, x1
	mov	x23, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	stur	xzr, [x29, #-64]
Lloh3:
	adrp	x22, _CHUNK@GOTPAGE
Lloh4:
	ldr	x22, [x22, _CHUNK@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	cmp	w0, #2
	b.ne	LBB0_5
; %bb.1:
	ldr	x0, [x21, #8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_6
; %bb.2:
	mov	x19, x0
Lloh9:
	adrp	x8, _SPAN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SPAN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	sub	x2, x29, #64
	bl	_build_index
	mov	x21, x0
	tbnz	w0, #31, LBB0_7
; %bb.3:
Lloh12:
	adrp	x24, _stderr@GOTPAGE
Lloh13:
	ldr	x24, [x24, _stderr@GOTPAGEOFF]
	ldr	w0, [x24]
	str	x21, [sp, #-16]!
Lloh14:
	adrp	x1, l_.str.7@PAGE
Lloh15:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_fprintf
	add	sp, sp, #16
	ldur	x1, [x29, #-64]
	ldr	x8, [x1, #8]
	ldrsw	x9, [x1]
	add	x8, x8, x9, lsl #2
	ldur	w8, [x8, #-4]
	lsl	w8, w8, #1
	mov	w9, #21846
	movk	w9, #21845, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w21, w8, w9
	ldr	w4, [x22]
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	_extract
	tbnz	w0, #31, LBB0_9
; %bb.4:
	mov	x22, x0
Lloh16:
	adrp	x8, _stdout@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w1, #1
	mov	x2, x22
	bl	_fwrite
	ldr	w0, [x24]
	stp	x22, x21, [sp, #-16]!
Lloh19:
	adrp	x1, l_.str.11@PAGE
Lloh20:
	add	x1, x1, l_.str.11@PAGEOFF
	b	LBB0_10
LBB0_5:
Lloh21:
	adrp	x8, _stderr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	b	LBB0_11
LBB0_6:
Lloh26:
	adrp	x8, _stderr@GOTPAGE
Lloh27:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	ldr	x8, [x21, #8]
	str	x8, [sp, #-16]!
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_fclose
Lloh31:
	adrp	x8, _stderr@GOTPAGE
Lloh32:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp, #-16]!
Lloh34:
	adrp	x1, l_.str.6@PAGE
Lloh35:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_8:
	bl	_fprintf
	add	sp, sp, #16
	mov	w0, #1
	b	LBB0_11
LBB0_9:
	ldr	w0, [x24]
Lloh36:
	adrp	x8, l_.str.10@PAGE
Lloh37:
	add	x8, x8, l_.str.10@PAGEOFF
	str	x8, [sp, #-16]!
Lloh38:
	adrp	x1, l_.str.8@PAGE
Lloh39:
	add	x1, x1, l_.str.8@PAGEOFF
LBB0_10:
	bl	_fprintf
	add	sp, sp, #16
	ldur	x0, [x29, #-64]
	bl	_free_index
	mov	x0, x19
	bl	_fclose
	mov	w0, #0
LBB0_11:
	mov	sp, x23
	ldur	x8, [x29, #-56]
Lloh40:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh41:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	sub	sp, x29, #48
	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_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_CHUNK,4,2                      ; @CHUNK
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usage: zran file.gz\n"

l_.str.1:                               ; @.str.1
	.asciz	"rb"

l_.str.2:                               ; @.str.2
	.asciz	"zran: could not open %s for reading\n"

	.comm	_SPAN,4,2                       ; @SPAN
l_.str.6:                               ; @.str.6
	.asciz	"zran: error %d while building index\n"

l_.str.7:                               ; @.str.7
	.asciz	"zran: built index with %d access points\n"

l_.str.8:                               ; @.str.8
	.asciz	"zran: extraction failed: %s error\n"

l_.str.10:                              ; @.str.10
	.asciz	"input corrupted"

	.comm	_stdout,4,2                     ; @stdout
l_.str.11:                              ; @.str.11
	.asciz	"zran: extracted %d bytes at %llu\n"

.subsections_via_symbols
