	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alloctape                      ## -- Begin function alloctape
	.p2align	4, 0x90
_alloctape:                             ## @alloctape
	.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
	xorl	%eax, %eax
	callq	_getpagesize
	movl	%eax, %r14d
	movq	_ntrec@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TP_BSIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%esi, %ecx
	imull	%eax, %ecx
	movq	_writesize@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	leal	4(,%rax,4), %edi
	movq	_reqsiz@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	movq	_blocksperfile@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	_unlimited@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_3
## %bb.2:
	movq	_density@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ecx, %eax
	cltd
	idivl	%ebx
	movq	_cartridge@GOTPCREL(%rip), %r8
	xorl	%edx, %edx
	cmpl	$625, %ebx                      ## imm = 0x271
	setne	%dl
	cmpq	$0, (%r8)
	leal	5(%rdx,%rdx,2), %edx
	movl	$16, %ebx
	cmovel	%edx, %ebx
	addl	%eax, %ebx
	movq	_tenths@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
LBB0_3:
	movq	_SLAVES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	js	LBB0_9
## %bb.4:
	leal	-1(%r14), %ebx
	addl	%ebx, %edi
	addl	%ecx, %edi
	addl	%esi, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %r12
	negl	%r14d
	movslq	%r14d, %rbx
	movq	$-1, %r13
	xorl	%r15d, %r15d
	movq	_slaves@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_ntrec@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	addq	%rcx, %rax
	addq	%r12, %rax
	incq	%rax
	andq	%rbx, %rax
	movq	(%r14), %rdx
	movq	%rax, (%rdx,%r15)
	movq	(%r14), %rax
	movq	(%rax,%r15), %rdx
	shlq	$2, %rcx
	negq	%rcx
	addq	%rdx, %rcx
	addq	$-4, %rcx
	movq	%rcx, 32(%rax,%r15)
	movq	_SLAVES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	incq	%r13
	cmpq	%rax, %r13
	jge	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	addq	$40, %r15
	movq	_reqsiz@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	-44(%rbp), %edi                 ## 4-byte Folded Reload
	movq	_writesize@GOTPCREL(%rip), %rax
	addl	(%rax), %edi
	movq	_TP_BSIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %edi
	callq	_malloc
	testq	%rax, %rax
	jne	LBB0_6
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_9:
	movq	_slaves@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_slp@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	$1, 8(%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rax)
	movq	(%rax), %rax
	movq	_nextblock@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	$1, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ntrec,4,2                      ## @ntrec
	.comm	_TP_BSIZE,4,2                   ## @TP_BSIZE
	.comm	_writesize,4,2                  ## @writesize
	.comm	_reqsiz,4,2                     ## @reqsiz
	.comm	_blocksperfile,8,3              ## @blocksperfile
	.comm	_unlimited,4,2                  ## @unlimited
	.comm	_density,4,2                    ## @density
	.comm	_cartridge,8,3                  ## @cartridge
	.comm	_tenths,4,2                     ## @tenths
	.comm	_SLAVES,4,2                     ## @SLAVES
	.comm	_slaves,8,3                     ## @slaves
	.comm	_slp,8,3                        ## @slp
	.comm	_nextblock,8,3                  ## @nextblock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alloctape                      ; -- Begin function alloctape
	.p2align	2
_alloctape:                             ; @alloctape
	.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
	bl	_getpagesize
	mov	x19, x0
Lloh0:
	adrp	x20, _ntrec@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ntrec@GOTPAGEOFF]
	ldr	w10, [x20]
Lloh2:
	adrp	x8, _TP_BSIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TP_BSIZE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	mul	w9, w8, w10
Lloh5:
	adrp	x22, _writesize@GOTPAGE
Lloh6:
	ldr	x22, [x22, _writesize@GOTPAGEOFF]
	str	w9, [x22]
	lsl	w10, w10, #2
	add	w10, w10, #4
Lloh7:
	adrp	x23, _reqsiz@GOTPAGE
Lloh8:
	ldr	x23, [x23, _reqsiz@GOTPAGEOFF]
	str	w10, [x23]
Lloh9:
	adrp	x11, _blocksperfile@GOTPAGE
Lloh10:
	ldr	x11, [x11, _blocksperfile@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
Lloh12:
	adrp	x12, _unlimited@GOTPAGE
Lloh13:
	ldr	x12, [x12, _unlimited@GOTPAGEOFF]
Lloh14:
	ldr	w12, [x12]
	cmp	x11, #0
	ccmp	w12, #0, #0, eq
	b.ne	LBB0_2
; %bb.1:
Lloh15:
	adrp	x11, _density@GOTPAGE
Lloh16:
	ldr	x11, [x11, _density@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	sdiv	w12, w9, w11
Lloh18:
	adrp	x13, _cartridge@GOTPAGE
Lloh19:
	ldr	x13, [x13, _cartridge@GOTPAGEOFF]
Lloh20:
	ldr	x13, [x13]
	mov	w14, #8
	mov	w15, #5
	cmp	w11, #625
	csel	w11, w15, w14, eq
	cmp	x13, #0
	mov	w13, #16
	csel	w11, w11, w13, eq
	add	w11, w11, w12
Lloh21:
	adrp	x12, _tenths@GOTPAGE
Lloh22:
	ldr	x12, [x12, _tenths@GOTPAGEOFF]
Lloh23:
	str	w11, [x12]
LBB0_2:
Lloh24:
	adrp	x24, _SLAVES@GOTPAGE
Lloh25:
	ldr	x24, [x24, _SLAVES@GOTPAGEOFF]
	ldr	w11, [x24]
	tbnz	w11, #31, LBB0_7
; %bb.3:
	sub	w25, w19, #1
	add	w10, w10, w25
	add	w9, w10, w9
	add	w0, w9, w8
	bl	_malloc
	cbz	x0, LBB0_8
; %bb.4:
	mov	x26, #0
	sxtw	x27, w25
	neg	w8, w19
	sxtw	x19, w8
	mov	x28, #-1
Lloh26:
	adrp	x21, _slaves@GOTPAGE
Lloh27:
	ldr	x21, [x21, _slaves@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x20]
	add	x9, x8, x0
	add	x9, x9, x27
	add	x9, x9, #1
	and	x9, x9, x19
	ldr	x10, [x21]
	str	x9, [x10, x26]
	ldr	x9, [x21]
	add	x9, x9, x26
	ldr	x10, [x9]
	sub	x8, x10, x8, lsl #2
	sub	x8, x8, #4
	str	x8, [x9, #32]
	ldrsw	x8, [x24]
	add	x28, x28, #1
	cmp	x28, x8
	b.ge	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x26, x26, #40
	ldr	w8, [x23]
	ldr	w9, [x22]
Lloh28:
	adrp	x10, _TP_BSIZE@GOTPAGE
Lloh29:
	ldr	x10, [x10, _TP_BSIZE@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	add	w8, w8, w25
	add	w8, w8, w9
	add	w0, w8, w10
	bl	_malloc
	cbnz	x0, LBB0_5
	b	LBB0_8
LBB0_7:
Lloh31:
	adrp	x8, _slaves@GOTPAGE
Lloh32:
	ldr	x8, [x8, _slaves@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
Lloh34:
	adrp	x9, _slp@GOTPAGE
Lloh35:
	ldr	x9, [x9, _slp@GOTPAGEOFF]
Lloh36:
	str	x8, [x9]
	mov	w0, #1
	str	w0, [x8, #8]
	stp	xzr, xzr, [x8, #16]
	ldr	x8, [x8]
Lloh37:
	adrp	x9, _nextblock@GOTPAGE
Lloh38:
	ldr	x9, [x9, _nextblock@GOTPAGEOFF]
Lloh39:
	str	x8, [x9]
LBB0_8:
	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 AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotStr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotStr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_ntrec,4,2                      ; @ntrec
	.comm	_TP_BSIZE,4,2                   ; @TP_BSIZE
	.comm	_writesize,4,2                  ; @writesize
	.comm	_reqsiz,4,2                     ; @reqsiz
	.comm	_blocksperfile,8,3              ; @blocksperfile
	.comm	_unlimited,4,2                  ; @unlimited
	.comm	_density,4,2                    ; @density
	.comm	_cartridge,8,3                  ; @cartridge
	.comm	_tenths,4,2                     ; @tenths
	.comm	_SLAVES,4,2                     ; @SLAVES
	.comm	_slaves,8,3                     ; @slaves
	.comm	_slp,8,3                        ; @slp
	.comm	_nextblock,8,3                  ; @nextblock
.subsections_via_symbols
