	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv10_calc_arb
_nv10_calc_arb:                         ## @nv10_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %r11d
	movl	8(%rsi), %r9d
	movl	12(%rsi), %r8d
	movl	16(%rsi), %r12d
	xorl	%r13d, %r13d
	cmpq	$1, 24(%rsi)
	movl	$0, %eax
	adcl	$1, %eax
	imull	%r8d, %eax
	leal	31(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$5, %ecx
	leal	18(%rcx), %eax
	imull	$1000000, %eax, %eax            ## imm = 0xF4240
	cltd
	idivl	%r9d
	movl	%eax, %r10d
	movl	$9000000, %eax                  ## imm = 0x895440
	xorl	%edx, %edx
	idivl	4(%rsi)
	movl	%eax, %ebx
	addl	%r10d, %ebx
	movl	$4000000, %eax                  ## imm = 0x3D0900
	xorl	%edx, %edx
	idivl	%r11d
                                        ## kill: def $eax killed $eax def $rax
	addl	%ebx, %eax
	movq	%rax, %rbx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	32(%rsi), %eax
	shll	$2, %eax
	xorl	%edx, %edx
	cmpl	$32, %r12d
	sete	%dl
	leal	(%rax,%rdx,4), %eax
	addl	%ecx, %eax
	addl	$18, %eax
	imull	$1000000, %eax, %eax            ## imm = 0xF4240
	addl	$4000000, %eax                  ## imm = 0x3D0900
	cltd
	idivl	%r9d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	$0, 40(%rsi)
	leal	80(%rax,%rbx), %r14d
	cmovel	%r13d, %r14d
	movl	$0, %ecx
	setne	%cl
	shll	$9, %ecx
	movq	%rcx, %rdx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	addl	%eax, %r14d
	imull	%r11d, %r12d
	leal	7(%r12), %ebx
	testl	%r12d, %r12d
	cmovnsl	%r12d, %ebx
	movq	%rdi, %r15
	sarl	$3, %ebx
	imull	%r9d, %r8d
	leal	7(%r8), %r13d
	testl	%r8d, %r8d
	cmovnsl	%r8d, %r13d
	sarl	$3, %r13d
	movl	%r14d, %eax
	imull	%ebx, %eax
	cltq
	imulq	$-1125899907, %rax, %rax        ## imm = 0xBCE4217D
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$32, %rax
	sarl	$18, %eax
	addl	%ecx, %eax
	leal	(%rdx,%rax), %ecx
	addl	$1025, %ecx                     ## imm = 0x401
	movslq	%r8d, %r12
	imulq	$274877907, %r12, %rax          ## imm = 0x10624DD3
	movq	%rax, %rdx
	shrq	$63, %rdx
	shrq	$32, %rax
	sarl	$9, %eax
	addl	%edx, %eax
	imull	%ecx, %eax
	movl	%r13d, %ecx
	subl	%ebx, %ecx
	movslq	%ecx, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	sarl	$6, %ecx
	addl	%edx, %ecx
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	%ecx
	movl	%eax, %edi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_min
	movl	%eax, (%r15)
	imulq	$351843721, %r12, %rdi          ## imm = 0x14F8B589
	movq	%rdi, %rcx
	shrq	$63, %rcx
	shrq	$32, %rdi
	sarl	$13, %edi
	addl	%ecx, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	movl	%eax, %esi
	callq	_min
	movl	%eax, (%r15)
	movl	%eax, %edi
	callq	_rounddown_pow_of_two
	movl	%eax, %ecx
	movl	%eax, (%r15)
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	addl	%edx, %r14d
	imull	%ebx, %r14d
	movslq	%r14d, %rax
	imulq	$1125899907, %rax, %rsi         ## imm = 0x431BDE83
	movq	%rsi, %rax
	shrq	$63, %rax
	shrq	$32, %rsi
	sarl	$18, %esi
	addl	%eax, %esi
	movq	%rdx, %rax
	imull	%ebx, %eax
	cltq
	imulq	$1125899907, %rax, %rdi         ## imm = 0x431BDE83
	movq	%rdi, %rax
	shrq	$63, %rax
	shrq	$32, %rdi
	sarl	$18, %edi
	addl	%eax, %edi
	imull	%ecx, %ebx
	movl	%ebx, %eax
	cltd
	idivl	%r13d
	movl	%esi, %edx
	notl	%edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	addl	%ebx, %edi
	addl	$1024, %edi                     ## imm = 0x400
	subl	%ecx, %edi
	addl	%edx, %edi
	addl	%eax, %edi
	movslq	%edi, %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$32, %rax
	sarl	$2, %eax
	addl	%ecx, %eax
	addl	%esi, %eax
	incl	%eax
	movl	%eax, 4(%r15)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nv10_calc_arb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv10_calc_arb
_nv10_calc_arb:                         ; @nv10_calc_arb
	.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	x19, x0
	ldp	w8, w9, [x1]
	ldp	w10, w11, [x1, #8]
	ldr	w12, [x1, #16]
	ldr	x13, [x1, #40]
	ldr	x14, [x1, #24]
	cmp	x14, #0
	mov	w14, #1
	cinc	w14, w14, eq
	mul	w14, w14, w11
	add	w15, w14, #31
	cmp	w14, #0
	csel	w14, w15, w14, lt
	asr	w14, w14, #5
	add	w14, w14, #18
	mov	w15, #16960
	movk	w15, #15, lsl #16
	mul	w16, w14, w15
	sdiv	w16, w16, w10
	mov	w17, #21568
	movk	w17, #137, lsl #16
	sdiv	w9, w17, w9
	mov	w17, #2304
	movk	w17, #61, lsl #16
	sdiv	w17, w17, w8
	add	w9, w9, w16
	add	w20, w9, w17
	ldr	w9, [x1, #32]
	mov	w16, #4
	mov	w17, #8
	cmp	w12, #32
	csel	w16, w17, w16, eq
	add	w9, w16, w9, lsl #2
	add	w9, w9, w14
	mul	w9, w9, w15
	sdiv	w9, w9, w10
	add	w14, w20, w9
	add	w14, w14, #80
	cmp	x13, #0
	mov	w13, #1536
	mov	w15, #1024
	csel	w21, w15, w13, eq
	csel	w13, wzr, w14, eq
	add	w24, w13, w9
	mul	w8, w12, w8
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w22, w8, #3
	mul	w25, w11, w10
	add	w8, w25, #7
	cmp	w25, #0
	csel	w8, w8, w25, lt
	asr	w23, w8, #3
	mul	w8, w24, w22
	mov	w9, #8573
	movk	w9, #48356, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w8, w8, w9, asr #18
	add	w8, w8, w21
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x10, w25, w9
	lsr	x11, x10, #32
	lsr	x10, x10, #63
	add	w10, w10, w11, asr #9
	madd	w8, w10, w8, w10
	sub	w10, w23, w22
	smull	x9, w10, w9
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w9, w9, w10, asr #6
	sdiv	w0, w8, w9
	mov	w1, #1024
	bl	_min
	mov	x1, x0
	str	w1, [x19]
	mov	w8, #46473
	movk	w8, #5368, lsl #16
	smull	x8, w25, w8
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w0, w8, w9, asr #13
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_min
	str	w0, [x19]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_rounddown_pow_of_two
	add	w8, w24, w20
	mul	w8, w8, w22
	mov	w9, #56963
	movk	w9, #17179, lsl #16
	smull	x8, w8, w9
	lsr	x10, x8, #32
	lsr	x8, x8, #63
	add	w8, w8, w10, asr #18
	mul	w10, w20, w22
	smull	x9, w10, w9
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w9, w9, w10, asr #18
	mul	w10, w0, w22
	sdiv	w10, w10, w23
	mvn	w11, w8
	add	w9, w9, w21
	sub	w9, w9, w0
	add	w9, w9, w11
	add	w9, w9, w10
	mov	w10, #26215
	movk	w10, #26214, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w9, w9, w10, asr #2
	add	w8, w8, w9
	add	w8, w8, #1
	stp	w0, w8, [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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nv10_calc_arb
.subsections_via_symbols
