	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function newbuf
_newbuf:                                ## @newbuf
	.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	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	_LRU@GOTPCREL(%rip), %rbx
	movq	(%rbx), %r13
	cmpq	40(%rdi), %r13
	jne	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	callq	_BUF_REMOVE
	movq	%r13, %rdi
	callq	_MRU_INSERT
	movq	(%rbx), %r13
LBB0_2:
	movq	(%r12), %rax
	testq	%r14, %r14
	je	LBB0_7
## %bb.3:
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movq	24(%r13), %rax
	testq	%rax, %rax
	je	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r14, %rax
	je	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_8
LBB0_7:
	testq	%rax, %rax
	jne	LBB0_15
LBB0_8:
	movq	_BUF_PIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	jne	LBB0_15
## %bb.9:
	cmpq	40(%r12), %r13
	je	LBB0_15
## %bb.10:
	movq	%r13, %rdi
	callq	_BUF_REMOVE
	movl	16(%r13), %ecx
	testl	%ecx, %ecx
	jne	LBB0_12
## %bb.11:
	movq	_BUF_BUCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_44
LBB0_12:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	8(%r13), %r15
	movslq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_21
## %bb.13:
	movl	-4(%r15,%rax,4), %ebx
	jmp	LBB0_22
LBB0_14:
	movq	$1, (%r12)
LBB0_15:
	movl	$1, %edi
	movl	$32, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_19
## %bb.16:
	movq	%rax, %r13
	movl	8(%r12), %esi
	movl	$1, %edi
	callq	_calloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_20
## %bb.17:
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_44
## %bb.18:
	decq	%rax
	movq	%rax, (%r12)
	jmp	LBB0_44
LBB0_20:
	movq	%r13, %rdi
	callq	_free
	xorl	%r13d, %r13d
	jmp	LBB0_48
LBB0_21:
	xorl	%ebx, %ebx
LBB0_22:
	movl	(%r13), %edi
	movq	_BUF_MOD@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_26
## %bb.23:
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	callq	_IS_BUCKET
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	___put_page
	testq	%rax, %rax
	je	LBB0_25
LBB0_19:
	xorl	%r13d, %r13d
	jmp	LBB0_48
LBB0_25:
	movl	(%r13), %edi
LBB0_26:
	callq	_IS_BUCKET
	testq	%rax, %rax
	je	LBB0_33
## %bb.27:
	movslq	16(%r13), %rax
	movslq	12(%r12), %r15
	decq	%r15
	andq	%rax, %r15
	movq	32(%r12), %rdx
	movb	16(%r12), %cl
	sarl	%cl, %eax
	cltq
	movq	(%rdx,%rax,8), %rcx
	cmpq	$0, 24(%r12)
	je	LBB0_31
## %bb.28:
	movq	_BUF_MOD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movslq	%r15d, %r15
	testl	%eax, (%r13)
	jne	LBB0_30
## %bb.29:
	movq	(%rcx,%r15,8), %rdi
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	callq	_ISDISK
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_31
LBB0_30:
	movq	_BUF_DISK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_32
LBB0_31:
	xorl	%eax, %eax
LBB0_32:
	movq	%rax, (%rcx,%r15,8)
LBB0_33:
	movq	24(%r13), %r15
	testq	%r15, %r15
	je	LBB0_43
## %bb.34:
	leaq	24(%r13), %rax
	jmp	LBB0_36
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_36 Depth=1
	movl	$0, 16(%r15)
	movl	$0, (%r15)
	movq	%r15, %rdi
	callq	_BUF_REMOVE
	movq	%r15, %rdi
	callq	_LRU_INSERT
	movq	%r15, %rax
	movq	24(%r15), %rcx
	addq	$24, %rax
	movq	%rcx, %r15
	testq	%rcx, %rcx
	je	LBB0_43
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	movq	$0, (%rax)
	movl	(%r15), %edi
	callq	_IS_BUCKET
	testq	%rax, %rax
	jne	LBB0_43
## %bb.37:                              ##   in Loop: Header=BB0_36 Depth=1
	cmpl	16(%r15), %ebx
	jne	LBB0_43
## %bb.38:                              ##   in Loop: Header=BB0_36 Depth=1
	movq	8(%r15), %rsi
	movslq	(%rsi), %rax
	movl	%ebx, %edx
	testq	%rax, %rax
	je	LBB0_40
## %bb.39:                              ##   in Loop: Header=BB0_36 Depth=1
	movl	-4(%rsi,%rax,4), %ebx
LBB0_40:                                ##   in Loop: Header=BB0_36 Depth=1
	movq	_BUF_MOD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_35
## %bb.41:                              ##   in Loop: Header=BB0_36 Depth=1
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	___put_page
	testq	%rax, %rax
	je	LBB0_35
	jmp	LBB0_19
LBB0_43:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
LBB0_44:
	movl	%r15d, 16(%r13)
	movq	$0, 24(%r13)
	testq	%r14, %r14
	je	LBB0_46
## %bb.45:
	movq	%r13, 24(%r14)
	xorl	%eax, %eax
	jmp	LBB0_47
LBB0_46:
	movq	_BUF_BUCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_47:
	movl	%eax, (%r13)
	movq	%r13, %rdi
	callq	_MRU_INSERT
LBB0_48:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LRU,8,3                        ## @LRU
	.comm	_BUF_PIN,4,2                    ## @BUF_PIN
	.comm	_BUF_BUCKET,4,2                 ## @BUF_BUCKET
	.comm	_BUF_MOD,4,2                    ## @BUF_MOD
	.comm	_BUF_DISK,8,3                   ## @BUF_DISK
	.comm	_stderr,4,2                     ## @stderr
	.no_dead_strip	_newbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function newbuf
_newbuf:                                ; @newbuf
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x23, _LRU@GOTPAGE
Lloh1:
	ldr	x23, [x23, _LRU@GOTPAGEOFF]
	ldr	x19, [x23]
	ldr	x8, [x0, #40]
	cmp	x19, x8
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x22]
	cbnz	x20, LBB0_3
	b	LBB0_7
LBB0_2:
	mov	x0, x19
	bl	_BUF_REMOVE
	mov	x0, x19
	bl	_MRU_INSERT
	ldr	x19, [x23]
	ldr	x8, [x22]
	cbz	x20, LBB0_7
LBB0_3:
	cbnz	x8, LBB0_7
; %bb.4:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x8, x20
	b.eq	LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x8, #24]
	cbnz	x8, LBB0_5
	b	LBB0_8
LBB0_7:
	cbnz	x8, LBB0_15
LBB0_8:
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _BUF_PIN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BUF_PIN@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_15
; %bb.9:
	ldr	x8, [x22, #40]
	cmp	x19, x8
	b.eq	LBB0_15
; %bb.10:
	mov	x0, x19
	bl	_BUF_REMOVE
	ldr	w24, [x19, #16]
	cbnz	w24, LBB0_12
; %bb.11:
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _BUF_BUCKET@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BUF_BUCKET@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
LBB0_12:
	ldr	x25, [x19, #8]
	ldr	w8, [x25]
	cbz	w8, LBB0_25
; %bb.13:
	sub	w8, w8, #1
	ldr	w23, [x25, w8, sxtw #2]
	b	LBB0_26
LBB0_14:
	mov	w8, #1
	str	x8, [x22]
LBB0_15:
	mov	w0, #1
	mov	w1, #32
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_24
; %bb.16:
	ldr	w1, [x22, #8]
	mov	w0, #1
	bl	_calloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_21
; %bb.17:
	ldr	x8, [x22]
	cbz	x8, LBB0_19
; %bb.18:
	sub	x8, x8, #1
	str	x8, [x22]
LBB0_19:
	str	w21, [x19, #16]
	str	xzr, [x19, #24]
	cbz	x20, LBB0_22
; %bb.20:
	mov	w8, #0
	str	x19, [x20, #24]
	b	LBB0_23
LBB0_21:
	mov	x0, x19
	bl	_free
	mov	x19, #0
	b	LBB0_24
LBB0_22:
Lloh8:
	adrp	x8, _BUF_BUCKET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BUF_BUCKET@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
LBB0_23:
	str	w8, [x19]
	mov	x0, x19
	bl	_MRU_INSERT
LBB0_24:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_25:
	mov	w23, #0
LBB0_26:
	ldr	w0, [x19]
Lloh11:
	adrp	x26, _BUF_MOD@GOTPAGE
Lloh12:
	ldr	x26, [x26, _BUF_MOD@GOTPAGEOFF]
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_30
; %bb.27:
	bl	_IS_BUCKET
	mov	x3, x0
	mov	x0, x22
	mov	x1, x25
	mov	x2, x24
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	w4, #0
	bl	___put_page
	cbz	x0, LBB0_29
LBB0_28:
	mov	x19, #0
	b	LBB0_24
LBB0_29:
	ldr	w0, [x19]
LBB0_30:
	bl	_IS_BUCKET
	cbz	x0, LBB0_37
; %bb.31:
	ldrsw	x8, [x19, #16]
	ldp	w9, w10, [x22, #12]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	sub	x9, x9, #1
	and	x24, x9, x8
	asr	w8, w8, w10
	ldp	x10, x9, [x22, #24]
	ldr	x25, [x9, w8, sxtw #3]
	cbz	x10, LBB0_35
; %bb.32:
	ldr	w8, [x19]
	ldr	w9, [x26]
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	sxtw	x24, w24
	tst	w9, w8
	b.ne	LBB0_34
; %bb.33:
	ldr	x0, [x25, x24, lsl #3]
	bl	_ISDISK
	cbz	x0, LBB0_35
LBB0_34:
Lloh13:
	adrp	x8, _BUF_DISK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BUF_DISK@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	b	LBB0_36
LBB0_35:
	mov	x8, #0
LBB0_36:
	str	x8, [x25, x24, lsl #3]
LBB0_37:
	mov	x8, x19
	ldr	x24, [x8, #24]!
	cbnz	x24, LBB0_39
	b	LBB0_19
LBB0_38:                                ;   in Loop: Header=BB0_39 Depth=1
	str	wzr, [x24, #16]
	str	wzr, [x24]
	mov	x0, x24
	bl	_BUF_REMOVE
	mov	x0, x24
	bl	_LRU_INSERT
	ldr	x9, [x24, #24]!
	mov	x8, x24
	mov	x24, x9
	mov	x23, x25
	cbz	x9, LBB0_19
LBB0_39:                                ; =>This Inner Loop Header: Depth=1
	str	xzr, [x8]
	ldr	w0, [x24]
	bl	_IS_BUCKET
	cbnz	x0, LBB0_19
; %bb.40:                               ;   in Loop: Header=BB0_39 Depth=1
	ldr	w8, [x24, #16]
	cmp	w23, w8
	b.ne	LBB0_19
; %bb.41:                               ;   in Loop: Header=BB0_39 Depth=1
	ldr	x1, [x24, #8]
	ldr	w8, [x1]
	mov	x25, x23
	cbz	w8, LBB0_43
; %bb.42:                               ;   in Loop: Header=BB0_39 Depth=1
	sub	w8, w8, #1
	ldr	w25, [x1, w8, sxtw #2]
LBB0_43:                                ;   in Loop: Header=BB0_39 Depth=1
	ldr	w8, [x24]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_38
; %bb.44:                               ;   in Loop: Header=BB0_39 Depth=1
	mov	x0, x22
	mov	x2, x23
	mov	w3, #0
	mov	w4, #0
	bl	___put_page
	cbz	x0, LBB0_38
	b	LBB0_28
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_LRU,8,3                        ; @LRU
	.comm	_BUF_PIN,4,2                    ; @BUF_PIN
	.comm	_BUF_BUCKET,4,2                 ; @BUF_BUCKET
	.comm	_BUF_MOD,4,2                    ; @BUF_MOD
	.comm	_BUF_DISK,8,3                   ; @BUF_DISK
	.comm	_stderr,4,2                     ; @stderr
	.no_dead_strip	_newbuf
.subsections_via_symbols
