	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_fort
_get_fort:                              ## @get_fort
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_File_list@GOTPCREL(%rip), %r12
	movq	(%r12), %r14
	cmpq	$0, 32(%r14)
	je	LBB0_7
## %bb.1:
	movq	(%r14), %rax
	movq	_NO_PROB@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	je	LBB0_7
## %bb.2:
	movl	$100, %edi
	callq	_arc4random_uniform
	movl	%eax, %ebx
	movl	$1, %edi
	movl	%eax, %esi
	callq	_DPRINTF
	movq	(%r12), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movslq	%ebx, %rcx
	cmpq	%rcx, %rax
	jg	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	(%r15), %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	subl	%eax, %ebx
	movl	$1, %edi
	movl	%ebx, %esi
	callq	_DPRINTF
	movq	32(%r14), %r14
	jmp	LBB0_3
LBB0_6:
	movl	$1, %edi
	movl	%ebx, %esi
	callq	_DPRINTF
LBB0_7:
	movq	(%r14), %rax
	movq	_NO_PROB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.8:
	cmpq	$0, 32(%r14)
	je	LBB0_13
## %bb.9:
	movq	%r14, %rdi
	callq	_sum_noprobs
	movq	_Noprob_tbl@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_arc4random_uniform
	movl	%eax, %ebx
	movl	(%r15), %esi
	movl	$1, %edi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	callq	_DPRINTF
	movl	24(%r14), %esi
	cmpl	%esi, %ebx
	jb	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_11 Depth=1
	subl	%esi, %ebx
	movq	32(%r14), %r14
	movl	$1, %edi
	movl	%ebx, %esi
	jmp	LBB0_11
LBB0_12:
	movl	$1, %edi
	callq	_DPRINTF
LBB0_13:
	movq	%r14, %rdi
	callq	_get_tbl
	cmpq	$0, 16(%r14)
	je	LBB0_15
## %bb.14:
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_DPRINTF
	movq	%r14, %rdi
	callq	_pick_child
	movq	%rax, %r14
LBB0_15:
	movq	_Fortfile@GOTPCREL(%rip), %rax
	movq	%r14, (%rax)
	movq	%r14, %rdi
	callq	_get_pos
	movq	%r14, %rdi
	callq	_open_dat
	movl	8(%r14), %eax
	movl	12(%r14), %edi
	leal	4(,%rax,4), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_lseek
	movl	12(%r14), %edi
	movq	_Seekpts@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movl	$8, %edx
	callq	_read
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_be64toh
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	movl	4(%rcx), %edi
	callq	_be64toh
	movq	(%rbx), %rcx
	movl	%eax, 4(%rcx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_File_list,8,3                  ## @File_list
	.comm	_NO_PROB,8,3                    ## @NO_PROB
	.comm	_stderr,4,2                     ## @stderr
	.comm	_Noprob_tbl,4,2                 ## @Noprob_tbl
	.section	__TEXT,__cstring,cstring_literals
L_.str.6:                               ## @.str.6
	.asciz	"picking child\n"

	.comm	_Fortfile,8,3                   ## @Fortfile
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_Seekpts,8,3                    ## @Seekpts
	.no_dead_strip	_get_fort
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_fort
_get_fort:                              ; @get_fort
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x22, _File_list@GOTPAGE
Lloh1:
	ldr	x22, [x22, _File_list@GOTPAGEOFF]
	ldr	x19, [x22]
	ldr	x8, [x19, #32]
Lloh2:
	adrp	x21, _NO_PROB@GOTPAGE
Lloh3:
	ldr	x21, [x21, _NO_PROB@GOTPAGEOFF]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.2:
	mov	w0, #100
	bl	_arc4random_uniform
	mov	x20, x0
	mov	w0, #1
	mov	x1, x20
	bl	_DPRINTF
	ldr	x19, [x22]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, w20, sxtw
	ccmp	x8, x9, #4, le
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w20, w20, w8
	mov	w0, #1
	mov	x1, x20
	bl	_DPRINTF
	ldr	x19, [x19, #32]
	b	LBB0_3
LBB0_5:
	mov	w0, #1
	mov	x1, x20
	bl	_DPRINTF
LBB0_6:
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.7:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_12
; %bb.8:
	mov	x0, x19
	bl	_sum_noprobs
Lloh4:
	adrp	x21, _Noprob_tbl@GOTPAGE
Lloh5:
	ldr	x21, [x21, _Noprob_tbl@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_arc4random_uniform
	mov	x20, x0
	ldr	w1, [x21]
	mov	w0, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	bl	_DPRINTF
	ldr	w1, [x19, #24]
	cmp	w20, w1
	b.lo	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	sub	w20, w20, w1
	ldr	x19, [x19, #32]
	mov	w0, #1
	mov	x1, x20
	b	LBB0_9
LBB0_11:
	mov	w0, #1
	bl	_DPRINTF
LBB0_12:
	mov	x0, x19
	bl	_get_tbl
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_14
; %bb.13:
Lloh6:
	adrp	x1, l_.str.6@PAGE
Lloh7:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_DPRINTF
	mov	x0, x19
	bl	_pick_child
	mov	x19, x0
LBB0_14:
Lloh8:
	adrp	x8, _Fortfile@GOTPAGE
Lloh9:
	ldr	x8, [x8, _Fortfile@GOTPAGEOFF]
Lloh10:
	str	x19, [x8]
	mov	x0, x19
	bl	_get_pos
	mov	x0, x19
	bl	_open_dat
	ldp	w8, w0, [x19, #8]
	lsl	w8, w8, #2
	add	w1, w8, #4
Lloh11:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_lseek
	ldr	w0, [x19, #12]
Lloh14:
	adrp	x19, _Seekpts@GOTPAGE
Lloh15:
	ldr	x19, [x19, _Seekpts@GOTPAGEOFF]
	ldr	x1, [x19]
	mov	w2, #8
	bl	_read
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_be64toh
	ldr	x8, [x19]
	str	w0, [x8]
	ldr	w0, [x8, #4]
	bl	_be64toh
	ldr	x8, [x19]
	str	w0, [x8, #4]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_File_list,8,3                  ; @File_list
	.comm	_NO_PROB,8,3                    ; @NO_PROB
	.comm	_stderr,4,2                     ; @stderr
	.comm	_Noprob_tbl,4,2                 ; @Noprob_tbl
	.section	__TEXT,__cstring,cstring_literals
l_.str.6:                               ; @.str.6
	.asciz	"picking child\n"

	.comm	_Fortfile,8,3                   ; @Fortfile
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_Seekpts,8,3                    ; @Seekpts
	.no_dead_strip	_get_fort
.subsections_via_symbols
