	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib7000m_agc_soft_split
_dib7000m_agc_soft_split:               ## @dib7000m_agc_soft_split
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	cmpl	$0, 32(%rax)
	je	LBB0_10
## %bb.2:
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.3:
	movq	%rdi, %rbx
	movl	$390, %esi                      ## imm = 0x186
	callq	_dib7000m_read_word
	cltq
	movq	(%rbx), %rcx
	movq	8(%rcx), %rdx
	cmpq	%rax, %rdx
	jge	LBB0_5
## %bb.4:
	movq	16(%rcx), %r14
	jmp	LBB0_9
LBB0_10:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	(%rcx), %r14
	movq	24(%rcx), %rcx
	cmpq	%rax, %rcx
	jg	LBB0_9
## %bb.6:
	subq	%rdx, %rax
	imulq	%rax, %r14
	subq	%rdx, %rcx
	movq	%r14, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_7
## %bb.8:
	movq	%r14, %rax
	cqto
	idivq	%rcx
	movq	%rax, %r14
	jmp	LBB0_9
LBB0_7:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r14d
LBB0_9:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_dprintk
	movq	%rbx, %rdi
	movl	$103, %esi
	callq	_dib7000m_read_word
	andl	$65280, %eax                    ## imm = 0xFF00
	orl	%eax, %r14d
	movq	%rbx, %rdi
	movl	$103, %esi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dib7000m_write_word            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AGC split_offset: %d\n"

	.no_dead_strip	_dib7000m_agc_soft_split
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib7000m_agc_soft_split
_dib7000m_agc_soft_split:               ; @dib7000m_agc_soft_split
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w9, [x8, #32]
	cbz	w9, LBB0_5
; %bb.2:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.3:
	mov	x19, x0
	mov	w1, #390
	bl	_dib7000m_read_word
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	ldr	x11, [x19]
	ldr	x9, [x11, #8]
	cmp	x9, x8
	b.ge	LBB0_6
; %bb.4:
	ldr	x20, [x11, #16]
	b	LBB0_8
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	x10, [x11, #24]
	ldr	x20, [x11]
	cmp	x10, x8
	b.gt	LBB0_8
; %bb.7:
	sub	x8, x8, x9
	mul	x8, x20, x8
	sub	x9, x10, x9
	sdiv	x20, x8, x9
LBB0_8:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_dprintk
	mov	x0, x19
	mov	w1, #103
	bl	_dib7000m_read_word
	and	w8, w0, #0xff00
	orr	w2, w8, w20
	mov	x0, x19
	mov	w1, #103
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dib7000m_write_word
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AGC split_offset: %d\n"

	.no_dead_strip	_dib7000m_agc_soft_split
.subsections_via_symbols
