	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_shuffle_by_chunks              ## -- Begin function shuffle_by_chunks
	.p2align	4, 0x90
_shuffle_by_chunks:                     ## @shuffle_by_chunks
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_STRING_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_stdin@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_array_size@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	shll	$2, %edi
	callq	_malloc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_stderr@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	_verbose@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_2:
	movq	_file_head@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_sprintf
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:
	movq	%rax, %r13
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	_verbose@GOTPCREL(%rip), %rbx
	cmpl	$2, (%rbx)
	jl	LBB0_8
## %bb.7:
	movl	(%r14), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_8:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	_array_size@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r15
	jl	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	leaq	-2(%r15), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_shuffle
	addq	%r15, -64(%rbp)                 ## 8-byte Folded Spill
	cmpl	$2, (%rbx)
	jl	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_fprintf
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_write_chunk
	movq	%r13, %rdi
	callq	_fclose
	incl	%r14d
	movq	_file_head@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %ecx
	callq	_sprintf
	movq	%rbx, %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_21
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %r13
	xorl	%r15d, %r15d
	movq	_verbose@GOTPCREL(%rip), %rbx
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,4), %rdi
	movl	$4, %esi
	movl	$1, %edx
	movq	%r12, %rcx
	callq	_fread
	movq	%r12, %rdi
	callq	_feof
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%r15
	jmp	LBB0_9
LBB0_16:
	leaq	-2(%r15), %rsi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_shuffle
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_write_chunk
	cmpl	$2, (%rbx)
	jl	LBB0_19
## %bb.17:
	addq	-64(%rbp), %r15                 ## 8-byte Folded Reload
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	cmpl	$2, (%rbx)
	jl	LBB0_19
## %bb.18:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	1(%r14), %edx
	leaq	L_.str.8(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_19:
	movq	%r13, %rdi
	callq	_fclose
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.20:
	incl	%r14d
	movl	%r14d, %edi
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_shuffle_merge                  ## TAILCALL
LBB0_3:
	movl	(%r14), %edi
	jmp	LBB0_4
LBB0_21:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_4:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.5:
	movl	$1, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_STRING_LENGTH,4,2          ## @MAX_STRING_LENGTH
	.comm	_stdin,8,3                      ## @stdin
	.comm	_array_size,4,2                 ## @array_size
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SHUFFLING COOCCURRENCES\n"

	.comm	_verbose,4,2                    ## @verbose
L_.str.1:                               ## @.str.1
	.asciz	"array size: %lld\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s_%04d.bin"

	.comm	_file_head,8,3                  ## @file_head
L_.str.3:                               ## @.str.3
	.asciz	"w"

L_.str.4:                               ## @.str.4
	.asciz	"Unable to open file %s.\n"

L_.str.5:                               ## @.str.5
	.asciz	"Shuffling by chunks: processed 0 lines."

L_.str.6:                               ## @.str.6
	.asciz	"\033[22Gprocessed %ld lines."

L_.str.7:                               ## @.str.7
	.asciz	"\033[22Gprocessed %ld lines.\n"

L_.str.8:                               ## @.str.8
	.asciz	"Wrote %d temporary file(s).\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_shuffle_by_chunks              ; -- Begin function shuffle_by_chunks
	.p2align	2
_shuffle_by_chunks:                     ; @shuffle_by_chunks
	.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, #16
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, _MAX_STRING_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_STRING_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	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
Lloh8:
	adrp	x8, _stdin@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh10:
	ldr	x21, [x8]
Lloh11:
	adrp	x24, _array_size@GOTPAGE
Lloh12:
	ldr	x24, [x24, _array_size@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	w0, w8, #2
	bl	_malloc
	mov	x19, x0
Lloh13:
	adrp	x22, _stderr@GOTPAGE
Lloh14:
	ldr	x22, [x22, _stderr@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
Lloh17:
	adrp	x25, _verbose@GOTPAGE
Lloh18:
	ldr	x25, [x25, _verbose@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	w0, [x22]
	ldr	w8, [x24]
	str	x8, [sp, #-16]!
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	add	sp, sp, #16
LBB0_2:
Lloh21:
	adrp	x8, _file_head@GOTPAGE
Lloh22:
	ldr	x8, [x8, _file_head@GOTPAGEOFF]
Lloh23:
	ldr	x2, [x8]
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	w3, #0
	bl	_sprintf
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_fopen
	cbz	x0, LBB0_18
; %bb.3:
	mov	x23, x0
	ldr	w8, [x25]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.4:
	ldr	w0, [x22]
Lloh28:
	adrp	x1, l_.str.5@PAGE
Lloh29:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
LBB0_5:
	mov	w22, #0
	mov	x28, #0
	mov	x27, #0
Lloh30:
	adrp	x25, l_.str.2@PAGE
Lloh31:
	add	x25, x25, l_.str.2@PAGEOFF
Lloh32:
	adrp	x26, l_.str.3@PAGE
Lloh33:
	add	x26, x26, l_.str.3@PAGEOFF
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x24]
	cmp	x27, x8
	b.lt	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	x1, x27, #2
	mov	x0, x19
	bl	_shuffle
	add	x28, x27, x28
Lloh34:
	adrp	x8, _verbose@GOTPAGE
Lloh35:
	ldr	x8, [x8, _verbose@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh37:
	adrp	x8, _stderr@GOTPAGE
Lloh38:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	str	x28, [sp, #-16]!
Lloh40:
	adrp	x1, l_.str.6@PAGE
Lloh41:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
	add	sp, sp, #16
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x1, x27
	mov	x2, x23
	bl	_write_chunk
	mov	x0, x23
	bl	_fclose
	add	w22, w22, #1
Lloh42:
	adrp	x8, _file_head@GOTPAGE
Lloh43:
	ldr	x8, [x8, _file_head@GOTPAGEOFF]
Lloh44:
	ldr	x2, [x8]
	mov	x0, x20
	mov	x1, x25
	mov	x3, x22
	bl	_sprintf
	mov	x0, x20
	mov	x1, x26
	bl	_fopen
	cbz	x0, LBB0_19
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x23, x0
	mov	x27, #0
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, x19, x27, lsl #2
	mov	w1, #4
	mov	w2, #1
	mov	x3, x21
	bl	_fread
	mov	x0, x21
	bl	_feof
	cbnz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x27, x27, #1
	b	LBB0_6
LBB0_13:
	sub	x1, x27, #2
	mov	x0, x19
	bl	_shuffle
	mov	x0, x19
	mov	x1, x27
	mov	x2, x23
	bl	_write_chunk
Lloh45:
	adrp	x21, _verbose@GOTPAGE
Lloh46:
	ldr	x21, [x21, _verbose@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #2
Lloh47:
	adrp	x20, _stderr@GOTPAGE
Lloh48:
	ldr	x20, [x20, _stderr@GOTPAGEOFF]
	b.lt	LBB0_16
; %bb.14:
	add	x8, x27, x28
	ldr	w0, [x20]
	str	x8, [sp, #-16]!
Lloh49:
	adrp	x1, l_.str.7@PAGE
Lloh50:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_fprintf
	add	sp, sp, #16
	ldr	w8, [x21]
	cmp	w8, #2
	b.lt	LBB0_16
; %bb.15:
	ldr	w0, [x20]
	add	w8, w22, #1
	str	x8, [sp, #-16]!
Lloh51:
	adrp	x1, l_.str.8@PAGE
Lloh52:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_fprintf
	add	sp, sp, #16
LBB0_16:
	mov	x0, x23
	bl	_fclose
	mov	x0, x19
	bl	_free
	ldur	x8, [x29, #-88]
Lloh53:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh54:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh55:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.17:
	add	w0, w22, #1
	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
	b	_shuffle_merge
LBB0_18:
	ldr	w0, [x22]
	b	LBB0_20
LBB0_19:
Lloh56:
	adrp	x8, _stderr@GOTPAGE
Lloh57:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh58:
	ldr	w0, [x8]
LBB0_20:
	str	x20, [sp, #-16]!
Lloh59:
	adrp	x1, l_.str.4@PAGE
Lloh60:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
	add	sp, sp, #16
	ldur	x8, [x29, #-88]
Lloh61:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh62:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh63:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	mov	w0, #1
	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_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpAdd	Lloh59, Lloh60
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_STRING_LENGTH,4,2          ; @MAX_STRING_LENGTH
	.comm	_stdin,8,3                      ; @stdin
	.comm	_array_size,4,2                 ; @array_size
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SHUFFLING COOCCURRENCES\n"

	.comm	_verbose,4,2                    ; @verbose
l_.str.1:                               ; @.str.1
	.asciz	"array size: %lld\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s_%04d.bin"

	.comm	_file_head,8,3                  ; @file_head
l_.str.3:                               ; @.str.3
	.asciz	"w"

l_.str.4:                               ; @.str.4
	.asciz	"Unable to open file %s.\n"

l_.str.5:                               ; @.str.5
	.asciz	"Shuffling by chunks: processed 0 lines."

l_.str.6:                               ; @.str.6
	.asciz	"\033[22Gprocessed %ld lines."

l_.str.7:                               ; @.str.7
	.asciz	"\033[22Gprocessed %ld lines.\n"

l_.str.8:                               ; @.str.8
	.asciz	"Wrote %d temporary file(s).\n"

.subsections_via_symbols
