	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_div
_read_div:                              ## @read_div
	.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
	movl	%ecx, %r14d
                                        ## kill: def $edx killed $edx def $rdx
	movl	%esi, %r15d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r12
	leal	(%rdx,%r15,4), %r13d
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_nvkm_rd32
	movl	%eax, %ebx
	leal	(%r14,%r15,4), %esi
	movq	%r12, %rdi
	callq	_nvkm_rd32
	movl	%eax, %r14d
	movl	%ebx, %eax
	andl	$3, %eax
	cmpl	$3, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$2, %eax
	je	LBB0_2
## %bb.3:
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	notl	%ebx
	movl	$108000, %eax                   ## imm = 0x1A5E0
	testl	$196608, %ebx                   ## imm = 0x30000
	je	LBB0_9
## %bb.5:
	movl	(%r12), %eax
	jmp	LBB0_9
LBB0_6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_read_vco
	testl	%r14d, %r14d
	jns	LBB0_9
## %bb.7:
	andl	$63, %r14d
	addl	$2, %r14d
	addl	%eax, %eax
	cltd
	idivl	%r14d
	jmp	LBB0_9
LBB0_2:
	movl	$100000, %eax                   ## imm = 0x186A0
	jmp	LBB0_9
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_read_div
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_div
_read_div:                              ; @read_div
	.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
	mov	x23, x3
	mov	x20, x0
	ldr	x19, [x0]
	lsl	w24, w1, #2
	add	w21, w24, w2
	mov	x0, x19
	mov	x1, x21
	bl	_nvkm_rd32
	mov	x22, x0
	add	w1, w24, w23
	mov	x0, x19
	bl	_nvkm_rd32
	and	w8, w22, #0x3
	cmp	w8, #3
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #2
	b.eq	LBB0_7
; %bb.2:
	cbnz	w8, LBB0_8
; %bb.3:
	mvn	w8, w22
	tst	w8, #0x30000
	b.ne	LBB0_9
; %bb.4:
	mov	w0, #42464
	movk	w0, #1, lsl #16
	b	LBB0_10
LBB0_5:
	mov	x23, x0
	mov	x0, x20
	mov	x1, x21
	bl	_read_vco
	tbz	w23, #31, LBB0_10
; %bb.6:
	and	w8, w23, #0x3f
	add	w8, w8, #2
	lsl	w9, w0, #1
	sdiv	w0, w9, w8
	b	LBB0_10
LBB0_7:
	mov	w0, #34464
	movk	w0, #1, lsl #16
	b	LBB0_10
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
	ldr	w0, [x19]
LBB0_10:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_read_div
.subsections_via_symbols
