	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_gddr5_calc                ## -- Begin function nvkm_gddr5_calc
	.p2align	4, 0x90
_nvkm_gddr5_calc:                       ## @nvkm_gddr5_calc
	.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	%rdi, %rbx
	movq	24(%rdi), %rdi
	cmpl	$17, (%rdi)
	jne	LBB0_7
## %bb.1:
	cmpl	$32, 24(%rdi)
	jne	LBB0_7
## %bb.2:
	movq	32(%rdi), %rcx
	movl	4(%rcx), %r15d
	movl	%r15d, %eax
	shrl	$7, %eax
	movl	%eax, %edx
	andl	$31, %edx
	addl	$-8, %edx
	cmpl	$-7, %edx
	jb	LBB0_6
## %bb.3:
	andl	$31, %r15d
	cmpl	$5, %r15d
	jb	LBB0_6
## %bb.4:
	movzwl	10(%rcx), %r12d
	andl	$127, %r12d
	cmpl	$4, %r12d
	jb	LBB0_6
## %bb.5:
	cmpl	$35, %r12d
	ja	LBB0_6
## %bb.9:
	movl	4(%rdi), %r10d
	movl	8(%rdi), %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	12(%rdi), %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	16(%rdi), %r14d
	movl	20(%rdi), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	56(%rdi), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	44(%rdi), %r11d
	xorl	%r13d, %r13d
	cmpl	$0, 60(%rdi)
	sete	%r13b
	addl	$-5, %r15d
	addl	$-4, %r12d
	movq	8(%rbx), %r9
	movl	%r15d, %r8d
	andl	$15, %r8d
	andl	$7, %eax
	leal	(%rax,%r8,8), %eax
	movl	%r12d, %edx
	andl	$15, %edx
	shll	$8, %edx
	orl	%edx, %eax
	movl	$-3968, %edx                    ## imm = 0xF080
	andl	(%r9), %edx
	orl	%edx, %eax
	movl	52(%rdi), %edx
	movl	40(%rdi), %ecx
	movl	48(%rdi), %edi
	movl	(%rbx), %r8d
	movl	%eax, (%r9)
	shll	$7, %r13d
	andl	$3, %edx
	orl	%r13d, %edx
	andl	$3, %edi
	leal	(%rdx,%rdi,4), %eax
	shll	$4, %ecx
	andl	$48, %ecx
	orl	%ecx, %eax
	movl	$-192, %ecx
	andl	4(%r9), %ecx
	orl	%ecx, %eax
	movl	%eax, 4(%r9)
	movl	%eax, 16(%rbx)
	testl	%esi, %esi
	je	LBB0_11
## %bb.10:
	movl	4(%r9), %eax
	andl	$-49, %eax
	shll	$4, %r11d
	andl	$48, %r11d
	orl	%eax, %r11d
	movl	%r11d, 4(%r9)
LBB0_11:
	xorl	%eax, %eax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	sete	%al
	xorl	%ecx, %ecx
	cmpl	$1000000, %r8d                  ## imm = 0xF4240
	setl	%cl
	movl	12(%r9), %edx
	movl	20(%r9), %esi
	andl	$-33, %edx
	shll	$5, %ecx
	orl	%edx, %ecx
	movl	%ecx, 12(%r9)
	andl	$-5, %esi
	leal	(%rsi,%rax,4), %eax
	movl	%eax, 20(%r9)
	movl	24(%r9), %eax
	movl	%eax, %ecx
	shrl	$4, %ecx
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	testl	%edx, %edx
	cmovnel	%edx, %ecx
	movl	%eax, %edx
	andl	$-4082, %edx                    ## imm = 0xF00E
	movzbl	%cl, %ecx
	shll	$4, %ecx
	orl	%edx, %ecx
	andl	$1, %r10d
	testb	$1, %al
	movl	$1, %eax
	cmovel	%r10d, %eax
	orl	%ecx, %eax
	movl	%eax, 24(%r9)
	movl	%r14d, %edi
	callq	_NOTE00
	movq	8(%rbx), %rcx
	movl	28(%rcx), %edx
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	andl	$-769, %edx                     ## imm = 0xFCFF
	andl	$3, %r14d
	shll	$8, %r14d
	orl	%r14d, %edx
	movl	%edx, 28(%rcx)
LBB0_13:
	andl	$-137, %edx
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	shll	$7, %eax
	movzbl	%al, %eax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	andl	$1, %esi
	leal	(%rax,%rsi,8), %eax
	orl	%edx, %eax
	movl	%eax, 28(%rcx)
	movl	32(%rcx), %eax
	andl	$-4, %eax
	shrl	$3, %r12d
	andl	$2, %r12d
	shrl	$4, %r15d
	orl	%eax, %r15d
	orl	%r12d, %r15d
	movl	%r15d, 32(%rcx)
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_7:
	movq	_ENOSYS@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_gddr5_calc                ; -- Begin function nvkm_gddr5_calc
	.p2align	2
_nvkm_gddr5_calc:                       ; @nvkm_gddr5_calc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x9, [x0, #24]
	ldr	w8, [x9]
	cmp	w8, #17
	b.ne	LBB0_9
; %bb.1:
	ldr	w8, [x9, #24]
	cmp	w8, #32
	b.ne	LBB0_9
; %bb.2:
	ldr	x8, [x9, #32]
	ldr	w13, [x8, #4]
	ubfx	w10, w13, #7, #5
	and	w14, w13, #0x1f
	ldrh	w8, [x8, #10]
	and	w15, w8, #0x7f
	sub	w8, w10, #8
	cmn	w8, #7
	ccmp	w14, #5, #0, hs
	ccmp	w15, #4, #0, hs
	b.lo	LBB0_12
; %bb.3:
	cmp	w15, #35
	b.hi	LBB0_12
; %bb.4:
	mov	x19, x0
	ldr	w12, [x0]
	ldp	w8, w22, [x9, #4]
	ldp	w21, w20, [x9, #12]
	ldr	w10, [x9, #20]
	ldp	w16, w11, [x9, #56]
	cmp	w11, #0
	cset	w0, eq
	ldp	w3, w2, [x9, #48]
	ldr	x11, [x19, #8]
	mov	w17, #-3968
	ldp	w4, w5, [x11]
	and	w4, w4, w17
	ldp	w9, w17, [x9, #40]
	sub	w23, w14, #5
	sub	w24, w15, #4
	ubfx	w13, w13, #7, #3
	bfi	w13, w23, #3, #4
	bfi	w13, w24, #8, #4
	orr	w13, w13, w4
	mov	w14, #-192
	and	w14, w5, w14
	and	w15, w2, #0x3
	bfi	w15, w0, #7, #1
	bfi	w15, w3, #2, #2
	bfi	w15, w9, #4, #2
	orr	w9, w15, w14
	stp	w13, w9, [x11]
	str	w9, [x19, #16]
	cbz	w1, LBB0_6
; %bb.5:
	ldr	w9, [x11, #4]
	bfi	w9, w17, #4, #2
	str	w9, [x11, #4]
LBB0_6:
	cmp	w16, #0
	cset	w9, eq
	mov	w13, #16960
	movk	w13, #15, lsl #16
	cmp	w12, w13
	cset	w12, lt
	ldr	w13, [x11, #12]
	bfi	w13, w12, #5, #1
	str	w13, [x11, #12]
	ldp	w12, w13, [x11, #20]
	bfi	w12, w9, #2, #1
	lsr	w9, w13, #4
	cmp	w10, #0
	csel	w9, w9, w10, eq
	mov	w10, #-4082
	and	w10, w13, w10
	bfi	w10, w9, #4, #8
	and	w8, w8, #0x1
	tst	w13, #0x1
	csinc	w8, w8, wzr, eq
	orr	w8, w10, w8
	stp	w12, w8, [x11, #20]
	mov	x0, x20
	bl	_NOTE00
	ldr	x8, [x19, #8]
	ldr	w9, [x8, #28]
	cbz	x0, LBB0_8
; %bb.7:
	bfi	w9, w20, #8, #2
	str	w9, [x8, #28]
LBB0_8:
	mov	w0, #0
	mov	w10, #-137
	and	w9, w9, w10
	ubfiz	w10, w22, #3, #1
	bfi	w10, w21, #7, #1
	orr	w9, w10, w9
	ldr	w10, [x8, #32]
	and	w10, w10, #0xfffffffc
	lsr	w11, w24, #3
	and	w11, w11, #0x2
	orr	w11, w11, w23, lsr #4
	orr	w10, w11, w10
	stp	w9, w10, [x8, #28]
	b	LBB0_11
LBB0_9:
Lloh0:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
