	.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
	cmpl	$2, %edi
	jl	LBB0_4
## %bb.1:
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	8(%rsi), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movq	_NOPS@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	cmpl	$2, %ebx
	je	LBB0_4
## %bb.2:
	movq	16(%r14), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movq	_NBUCKETS@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	cmpl	$4, %ebx
	jb	LBB0_4
## %bb.3:
	movq	24(%r14), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movq	_NSIZE@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_4:
	xorl	%edi, %edi
	callq	_sbrk
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	_NBUCKETS@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	shll	$3, %edi
	callq	_malloc
	movq	_foo@GOTPCREL(%rip), %r12
	movq	%rax, (%r12)
	movl	(%r15), %edx
	shll	$3, %edx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	(%r15), %eax
	movl	$1, %r14d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	addl	%r14d, %r14d
	cmpl	$4097, %r14d                    ## imm = 0x1001
	jae	LBB0_14
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##     Child Loop BB0_11 Depth 2
	testl	%eax, %eax
	jle	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movw	$-24576, %ax                    ## imm = 0xA000
	xorl	%edx, %edx
	divw	%r14w
	movzwl	%ax, %r13d
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r14d, %edi
	callq	_malloc
	movq	(%r12), %rcx
	movq	%rax, -8(%rcx,%rbx,8)
	movl	(%r15), %eax
	cmpq	%r13, %rbx
	jae	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	leaq	1(%rbx), %rcx
	movslq	%eax, %rdx
	cmpq	%rdx, %rbx
	movq	%rcx, %rbx
	jl	LBB0_7
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	testl	%eax, %eax
	jle	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %rax
	movq	-8(%rax,%rbx,8), %rdi
	callq	_free
	movq	(%r12), %rax
	movq	$0, -8(%rax,%rbx,8)
	movl	(%r15), %eax
	cmpq	%r13, %rbx
	jae	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	leaq	1(%rbx), %rcx
	movslq	%eax, %rdx
	cmpq	%rdx, %rbx
	movq	%rcx, %rbx
	jl	LBB0_11
	jmp	LBB0_13
LBB0_14:
	movq	_NOPS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_22
## %bb.15:
	xorl	%r13d, %r13d
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_16 Depth=1
	incl	%r13d
	movq	_NOPS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jge	LBB0_22
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_random
	cltd
	idivl	(%r15)
	movl	%edx, %r14d
	xorl	%eax, %eax
	callq	_random
	cltd
	movq	_NSIZE@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	movl	%edx, %ebx
	movq	(%r12), %rax
	movslq	%r14d, %r14
	movq	(%rax,%r14,8), %rdi
	testb	$1, %bl
	movl	%edx, %esi
	movl	$0, %eax
	cmovnel	%eax, %esi
	callq	_realloc
	movq	(%r12), %rcx
	movq	%rax, (%rcx,%r14,8)
	testl	%ebx, %ebx
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	andl	$1, %ebx
	je	LBB0_19
LBB0_18:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	(%r12), %rax
	movq	$0, (%rax,%r14,8)
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rax
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	$1, (%rax)
	jmp	LBB0_21
LBB0_22:
	xorl	%edi, %edi
	callq	_sbrk
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_27
## %bb.23:
	xorl	%ebx, %ebx
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_24 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_27
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	callq	_free
	movq	(%r12), %rax
	movq	$0, (%rax,%rbx,8)
	movl	(%r15), %eax
	jmp	LBB0_26
LBB0_27:
	xorl	%edi, %edi
	callq	_sbrk
	movq	_NOPS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%r15), %ecx
	movq	_NSIZE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NOPS,4,2                       ## @NOPS
	.comm	_NBUCKETS,4,2                   ## @NBUCKETS
	.comm	_NSIZE,4,2                      ## @NSIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BRK(0)=%p "

	.comm	_foo,8,3                        ## @foo
L_.str.1:                               ## @.str.1
	.asciz	"BRK(1)=%p "

L_.str.2:                               ## @.str.2
	.asciz	"BRK(2)=%p NOPS=%lu NBUCKETS=%lu NSIZE=%lu\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:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x23, _NOPS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NOPS@GOTPAGEOFF]
Lloh2:
	adrp	x22, _NBUCKETS@GOTPAGE
Lloh3:
	ldr	x22, [x22, _NBUCKETS@GOTPAGEOFF]
Lloh4:
	adrp	x21, _NSIZE@GOTPAGE
Lloh5:
	ldr	x21, [x21, _NSIZE@GOTPAGEOFF]
	cmp	w0, #2
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x0, [x1, #8]
	mov	w1, #0
	mov	w2, #0
	bl	_strtoul
	str	w0, [x23]
	cmp	w20, #2
	b.eq	LBB0_4
; %bb.2:
	ldr	x0, [x19, #16]
	mov	w1, #0
	mov	w2, #0
	bl	_strtoul
	str	w0, [x22]
	cmp	w20, #4
	b.lo	LBB0_4
; %bb.3:
	ldr	x0, [x19, #24]
	mov	w1, #0
	mov	w2, #0
	bl	_strtoul
	str	w0, [x21]
LBB0_4:
	mov	w0, #0
	bl	_sbrk
	mov	x1, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	ldr	w8, [x22]
	lsl	w0, w8, #3
	bl	_malloc
Lloh8:
	adrp	x20, _foo@GOTPAGE
Lloh9:
	ldr	x20, [x20, _foo@GOTPAGEOFF]
	str	x0, [x20]
	ldr	w8, [x22]
	lsl	w2, w8, #3
	mov	w1, #0
	bl	_memset
	ldr	w8, [x22]
	mov	w19, #1
	mov	w24, #40960
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	lsl	w19, w19, #1
	cmp	w19, #1, lsl #12                ; =4096
	b.hi	LBB0_15
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;     Child Loop BB0_13 Depth 2
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x26, #0
	and	w8, w19, #0xffff
	udiv	w25, w24, w8
LBB0_9:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	bl	_malloc
	ldr	x8, [x20]
	str	x0, [x8, x26, lsl #3]
	add	x26, x26, #1
	ldr	w8, [x22]
	cmp	x26, x25
	b.hs	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	sxtw	x9, w8
	cmp	x26, x9
	b.lt	LBB0_9
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x26, #0
LBB0_13:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20]
	lsl	x27, x26, #3
	ldr	x0, [x8, x27]
	bl	_free
	ldr	x8, [x20]
	str	xzr, [x8, x27]
	add	x26, x26, #1
	ldr	w8, [x22]
	cmp	x26, x25
	b.hs	LBB0_6
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	sxtw	x9, w8
	cmp	x26, x9
	b.lt	LBB0_13
	b	LBB0_6
LBB0_15:
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.16:
	mov	w19, #0
	mov	w24, #1
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	w19, w19, #1
	ldr	w8, [x23]
	cmp	w19, w8
	b.ge	LBB0_22
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	bl	_random
	ldr	w8, [x22]
	sdiv	w9, w0, w8
	msub	w26, w9, w8, w0
	bl	_random
	ldr	w8, [x21]
	sdiv	w9, w0, w8
	msub	w27, w9, w8, w0
	ldr	x8, [x20]
	sxtw	x25, w26
	sbfiz	x26, x26, #3, #32
	ldr	x0, [x8, x26]
	ands	w28, w27, #0x1
	csel	w1, wzr, w27, ne
	bl	_realloc
	ldr	x8, [x20]
	str	x0, [x8, x26]
	cmp	w27, #0
	ccmp	w28, #0, #0, ne
	b.eq	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x20]
	str	xzr, [x8, x25, lsl #3]
LBB0_20:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8, x25, lsl #3]
	cbz	x8, LBB0_17
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=1
	str	w24, [x8]
	b	LBB0_17
LBB0_22:
	mov	w0, #0
	bl	_sbrk
	mov	x1, x0
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_27
; %bb.23:
	mov	x19, #0
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_25 Depth=1
	add	x19, x19, #1
	cmp	x19, w8, sxtw
	b.ge	LBB0_27
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20]
	ldr	x0, [x9, x19, lsl #3]
	cbz	x0, LBB0_24
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	bl	_free
	ldr	x8, [x20]
	str	xzr, [x8, x19, lsl #3]
	ldr	w8, [x22]
	b	LBB0_24
LBB0_27:
	mov	w0, #0
	bl	_sbrk
	mov	x1, x0
	ldr	w8, [x23]
	ldr	w9, [x22]
	ldr	w10, [x21]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_NOPS,4,2                       ; @NOPS
	.comm	_NBUCKETS,4,2                   ; @NBUCKETS
	.comm	_NSIZE,4,2                      ; @NSIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BRK(0)=%p "

	.comm	_foo,8,3                        ; @foo
l_.str.1:                               ; @.str.1
	.asciz	"BRK(1)=%p "

l_.str.2:                               ; @.str.2
	.asciz	"BRK(2)=%p NOPS=%lu NBUCKETS=%lu NSIZE=%lu\n"

.subsections_via_symbols
