	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movl	%edi, %r14d
	xorl	%edi, %edi
	callq	_time
	movl	%eax, %edi
	callq	_srandom
	leal	-1(%r14), %eax
	movq	_ptrc@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	cmpl	$2, %r14d
	jl	LBB0_6
## %bb.1:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$2048, %edi                     ## imm = 0x800
	callq	_malloc
	movq	_ptr@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movl	%eax, (%rcx,%r12,4)
	leaq	1(%r12), %r14
	movq	8(%r13,%r12,8), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	movq	%rax, %rbx
	movq	(%r15), %rax
	movl	(%rax,%r12,4), %edi
	movl	$1, %esi
	movl	$2048, %edx                     ## imm = 0x800
	movq	%rbx, %rcx
	callq	_fread
	movq	%rbx, %rdi
	callq	_fclose
	movq	_ptrc@GOTPCREL(%rip), %rcx
	movq	_active@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r12d, (%rax,%r12,4)
	movslq	(%rcx), %rax
	movq	%r14, %r12
	cmpq	%rax, %r14
	jl	LBB0_2
## %bb.3:
	movq	_activec@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	testl	%eax, %eax
	jle	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_fill_max
	xorl	%eax, %eax
	callq	_select_max
	xorl	%eax, %eax
	callq	_search_active
	cmpl	$0, (%rbx)
	jg	LBB0_4
	jmp	LBB0_5
LBB0_6:
	movq	_activec@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ptrc,4,2                       ## @ptrc
	.comm	_ptr,8,3                        ## @ptr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

	.comm	_active,8,3                     ## @active
	.comm	_activec,4,2                    ## @activec
.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
	mov	x19, x1
	mov	x20, x0
	mov	x0, #0
	bl	_time
	bl	_srandom
	sub	w8, w20, #1
Lloh0:
	adrp	x21, _ptrc@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ptrc@GOTPAGEOFF]
	str	w8, [x21]
	cmp	w20, #2
	b.lt	LBB0_5
; %bb.1:
	mov	x23, #0
	add	x22, x19, #8
Lloh2:
	adrp	x24, _ptr@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ptr@GOTPAGEOFF]
Lloh4:
	adrp	x25, _active@GOTPAGE
Lloh5:
	ldr	x25, [x25, _active@GOTPAGEOFF]
Lloh6:
	adrp	x19, l_.str@PAGE
Lloh7:
	add	x19, x19, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #2048
	bl	_malloc
	ldr	x8, [x24]
	lsl	x26, x23, #2
	str	w0, [x8, x26]
	add	x27, x23, #1
	ldr	x0, [x22, x23, lsl #3]
	mov	x1, x19
	bl	_fopen
	mov	x20, x0
	ldr	x8, [x24]
	ldr	w0, [x8, x26]
	mov	w1, #1
	mov	w2, #2048
	mov	x3, x20
	bl	_fread
	mov	x0, x20
	bl	_fclose
	ldr	x8, [x25]
	str	w23, [x8, x26]
	ldrsw	x8, [x21]
	mov	x23, x27
	cmp	x27, x8
	b.lt	LBB0_2
; %bb.3:
Lloh8:
	adrp	x19, _activec@GOTPAGE
Lloh9:
	ldr	x19, [x19, _activec@GOTPAGEOFF]
	str	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	bl	_fill_max
	bl	_select_max
	bl	_search_active
	ldr	w8, [x19]
	cmp	w8, #0
	b.gt	LBB0_4
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x9, _activec@GOTPAGE
Lloh11:
	ldr	x9, [x9, _activec@GOTPAGEOFF]
Lloh12:
	str	w8, [x9]
LBB0_6:
	mov	w0, #0
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ptrc,4,2                       ; @ptrc
	.comm	_ptr,8,3                        ; @ptr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

	.comm	_active,8,3                     ; @active
	.comm	_activec,4,2                    ; @activec
.subsections_via_symbols
