	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv04_calc_arb
_nv04_calc_arb:                         ## @nv04_calc_arb
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %ecx
	movl	4(%rsi), %r13d
	movl	16(%rsi), %r8d
	movl	24(%rsi), %ebx
	movl	$10000000, %eax                 ## imm = 0x989680
	xorl	%edx, %edx
	idivl	8(%rsi)
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	$10000000, %eax                 ## imm = 0x989680
	xorl	%edx, %edx
	idivl	%ecx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	addl	$13, %r8d
	movl	%ebx, %r9d
	movl	%ebx, %eax
	movl	%ecx, %r11d
	imull	%ecx, %eax
	leal	7(%rax), %r12d
	testl	%eax, %eax
	cmovnsl	%eax, %r12d
	sarl	$3, %r12d
	imull	$3000000, 12(%rsi), %eax        ## imm = 0x2DC6C0
	cltd
	idivl	%r13d
	movl	%eax, %r15d
	movl	$128, 4(%rdi)
	movl	$3, %esi
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r8,%rsi), %eax
	imull	$1000000, %eax, %eax            ## imm = 0xF4240
	cltd
	idivl	%r13d
	addl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	addl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	addl	%r15d, %eax
	imull	%r12d, %eax
	movslq	%eax, %r14
	imulq	$1125899907, %r14, %rbx         ## imm = 0x431BDE83
	movq	%rbx, %rcx
	shrq	$63, %rcx
	sarq	$50, %rbx
	leal	(%rbx,%rcx), %r10d
	addl	$-383, %r10d                    ## imm = 0xFE81
	movl	%r10d, %eax
	imull	%r11d, %eax
	cltd
	idivl	%r13d
                                        ## kill: def $eax killed $eax def $rax
	imull	%r9d, %eax
	leal	7(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$3, %edx
	cmpl	%r10d, %edx
	setl	%al
	cmpl	$384000000, %r14d               ## imm = 0x16E36000
	setge	%dl
	andb	%al, %dl
	cmpl	$519000000, %r14d               ## imm = 0x1EEF4FC0
	setge	%al
	orb	%dl, %al
	cmpb	$1, %al
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movzbl	%al, %eax
	movl	%esi, %edx
	subl	%eax, %edx
	testl	%esi, %esi
	movl	%edx, %esi
	jne	LBB0_1
LBB0_3:
	addl	%ecx, %ebx
	cmpl	$384, %ebx                      ## imm = 0x180
	movl	$383, %eax                      ## imm = 0x17F
	cmovgel	%ebx, %eax
	incl	%eax
	movl	%eax, (%rdi)
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nv04_calc_arb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv04_calc_arb
_nv04_calc_arb:                         ; @nv04_calc_arb
	.cfi_startproc
; %bb.0:
	mov	w8, #16960
	movk	w8, #15, lsl #16
	ldp	w9, w10, [x1]
	ldp	w13, w16, [x1, #8]
	ldr	w12, [x1, #16]
	ldr	w11, [x1, #24]
	add	w12, w12, #13
	mov	w14, #38528
	movk	w14, #152, lsl #16
	sdiv	w13, w14, w13
	sdiv	w14, w14, w9
	mul	w15, w11, w9
	add	w17, w15, #7
	cmp	w15, #0
	csel	w15, w17, w15, lt
	asr	w15, w15, #3
	mov	w17, #50880
	movk	w17, #45, lsl #16
	mul	w2, w16, w17
	mov	w16, #128
	str	w16, [x0, #4]
	mov	w16, #3
	mov	w17, #24575
	movk	w17, #5859, lsl #16
	mov	w1, #20415
	movk	w1, #7919, lsl #16
	sdiv	w2, w2, w10
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	w3, w12, w16
	mul	w3, w3, w8
	sdiv	w3, w3, w10
	add	w3, w13, w3
	add	w3, w3, w14
	add	w3, w3, w2
	mul	w4, w3, w15
	sdiv	w3, w4, w8
	sub	w5, w3, #383
	mul	w6, w5, w9
	sdiv	w6, w6, w10
	mul	w6, w6, w11
	add	w7, w6, #7
	cmp	w6, #0
	csel	w6, w7, w6, lt
	cmp	w5, w6, asr #3
	ccmp	w4, w17, #4, gt
	ccmp	w4, w1, #0, le
	cset	w4, gt
	cmp	w4, #0
	ccmp	w16, #0, #4, ne
	sub	w16, w16, w4
	b.ne	LBB0_1
; %bb.2:
	mov	w8, #383
	cmp	w3, #383
	csel	w8, w3, w8, gt
	add	w8, w8, #1
	str	w8, [x0]
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nv04_calc_arb
.subsections_via_symbols
