	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function buffer_setup
_buffer_setup:                          ## @buffer_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movq	8(%rax), %rcx
	movl	(%rax), %edi
	imull	(%rcx), %edi
	imull	4(%rax), %edi
	sarl	$3, %edi
	movl	%edi, (%rdx)
	movl	(%rsi), %eax
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_TM6000_DEF_BUF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsi)
LBB0_2:
	movq	_TM6000_MIN_BUF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jae	LBB0_4
## %bb.3:
	movl	%ecx, (%rsi)
	movl	%ecx, %eax
LBB0_4:
	movl	(%rdx), %r8d
	imull	%eax, %r8d
	movq	_vid_limit@GOTPCREL(%rip), %r9
	movl	(%r9), %edi
	shll	$20, %edi
	cmpl	%edi, %r8d
	jbe	LBB0_7
## %bb.5:
	decl	%eax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, (%rsi)
	movl	(%rdx), %edi
	imull	%eax, %edi
	movl	(%r9), %ecx
	shll	$20, %ecx
	decl	%eax
	cmpl	%ecx, %edi
	ja	LBB0_6
LBB0_7:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TM6000_DEF_BUF,4,2             ## @TM6000_DEF_BUF
	.comm	_TM6000_MIN_BUF,4,2             ## @TM6000_MIN_BUF
	.comm	_vid_limit,4,2                  ## @vid_limit
	.no_dead_strip	_buffer_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function buffer_setup
_buffer_setup:                          ; @buffer_setup
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0]
	ldr	x9, [x8, #8]
	ldr	w9, [x9]
	ldp	w10, w8, [x8]
	mul	w9, w10, w9
	mul	w8, w9, w8
	asr	w8, w8, #3
	str	w8, [x2]
	ldr	w8, [x1]
	cbnz	w8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _TM6000_DEF_BUF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TM6000_DEF_BUF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x1]
LBB0_2:
Lloh3:
	adrp	x9, _TM6000_MIN_BUF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TM6000_MIN_BUF@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.hs	LBB0_4
; %bb.3:
	str	w9, [x1]
	mov	x8, x9
LBB0_4:
	ldr	w9, [x2]
	mul	w10, w8, w9
Lloh6:
	adrp	x9, _vid_limit@GOTPAGE
Lloh7:
	ldr	x9, [x9, _vid_limit@GOTPAGEOFF]
	ldr	w11, [x9]
	cmp	w10, w11, lsl #20
	b.ls	LBB0_7
; %bb.5:
	sub	w8, w8, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	str	w8, [x1]
	ldr	w10, [x2]
	mul	w10, w8, w10
	ldr	w11, [x9]
	sub	w8, w8, #1
	cmp	w10, w11, lsl #20
	b.hi	LBB0_6
LBB0_7:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_TM6000_DEF_BUF,4,2             ; @TM6000_DEF_BUF
	.comm	_TM6000_MIN_BUF,4,2             ; @TM6000_MIN_BUF
	.comm	_vid_limit,4,2                  ; @vid_limit
	.no_dead_strip	_buffer_setup
.subsections_via_symbols
