	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib7000m_agc_startup
_dib7000m_agc_startup:                  ## @dib7000m_agc_startup
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	movl	$72, %esi
	callq	_dib7000m_read_word
	movl	%eax, %r12d
	movl	(%rbx), %eax
	movl	$-1, %r14d
	cmpq	$5, %rax
	ja	LBB0_17
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	movq	_DIB7000M_POWER_INTERF_ANALOG_AGC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dib7000m_set_power_mode
	movq	_DIBX000_ADC_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dib7000m_set_adc_state
	movslq	8(%r15), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$38, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_BAND_OF_FREQUENCY
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_dib7000m_set_agc_config
	testl	%eax, %eax
	jne	LBB0_17
	jmp	LBB0_4
LBB0_5:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	4(%rbx), %rdi
	movl	$1, %esi
	callq	*%rax
LBB0_7:
	movq	%rbx, %rdi
	movl	$75, %esi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_dib7000m_write_word
	movq	16(%rbx), %rax
	cmpl	$0, 4(%rax)
	je	LBB0_9
## %bb.8:
	movl	$7, %r14d
	movl	$4, %eax
	jmp	LBB0_10
LBB0_11:
	orl	$16, %r12d
	movq	%rbx, %rdi
	movl	$72, %esi
	movl	%r12d, %edx
	callq	_dib7000m_write_word
	movq	%rbx, %rdi
	movl	$103, %esi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_dib7000m_write_word
	incl	(%rbx)
	movl	$14, %r14d
	jmp	LBB0_17
LBB0_12:
	movq	%rbx, %rdi
	movl	$392, %esi                      ## imm = 0x188
	callq	_dib7000m_read_word
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movl	$390, %esi                      ## imm = 0x186
	callq	_dib7000m_read_word
	movq	%rbx, %rdi
	movl	$75, %esi
	movl	%eax, %edx
	callq	_dib7000m_write_word
	andl	$-17, %r12d
	movq	%rbx, %rdi
	movl	$72, %esi
	movl	%r12d, %edx
	callq	_dib7000m_write_word
	movq	16(%rbx), %rax
	movl	(%rax), %edx
	shll	$9, %edx
	orl	%r14d, %edx
	movq	%rbx, %rdi
	movl	$103, %esi
	callq	_dib7000m_write_word
	movq	%rbx, %rdi
	callq	_dib7000m_restart_agc
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_dprintk
	incl	(%rbx)
	movl	$5, %r14d
	jmp	LBB0_17
LBB0_13:
	movq	%rbx, %rdi
	callq	_dib7000m_update_lna
	movl	$5, %r14d
	testl	%eax, %eax
	jne	LBB0_17
LBB0_4:
	incl	(%rbx)
	movl	$7, %r14d
	jmp	LBB0_17
LBB0_14:
	movq	%rbx, %rdi
	callq	_dib7000m_agc_soft_split
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	leaq	4(%rbx), %rdi
	xorl	%esi, %esi
	callq	*%rax
LBB0_16:
	incl	(%rbx)
	jmp	LBB0_17
LBB0_9:
	movq	%rbx, %rdi
	movl	$103, %esi
	movl	$256, %edx                      ## imm = 0x100
	callq	_dib7000m_write_word
	movl	(%rbx), %eax
	incl	%eax
	movl	$5, %r14d
LBB0_10:
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_dib7000m_restart_agc
LBB0_17:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_5
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_DIB7000M_POWER_INTERF_ANALOG_AGC,4,2 ## @DIB7000M_POWER_INTERF_ANALOG_AGC
	.comm	_DIBX000_ADC_ON,4,2             ## @DIBX000_ADC_ON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SPLIT %p: %hd\n"

	.no_dead_strip	_dib7000m_agc_startup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib7000m_agc_startup
_dib7000m_agc_startup:                  ; @dib7000m_agc_startup
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	x19, [x0]
	mov	x0, x19
	mov	w1, #72
	bl	_dib7000m_read_word
	ldr	w8, [x19]
	cmp	w8, #5
	b.hi	LBB0_14
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh2:
	adrp	x8, _DIB7000M_POWER_INTERF_ANALOG_AGC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DIB7000M_POWER_INTERF_ANALOG_AGC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib7000m_set_power_mode
Lloh5:
	adrp	x8, _DIBX000_ADC_ON@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DIBX000_ADC_ON@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib7000m_set_adc_state
	ldrsw	x8, [x20, #8]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w0, w8, w9
	bl	_BAND_OF_FREQUENCY
	mov	x1, x0
	mov	x0, x19
	bl	_dib7000m_set_agc_config
	cbnz	w0, LBB0_14
	b	LBB0_15
LBB0_3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.4:
	add	x0, x19, #4
	mov	w1, #1
	blr	x8
LBB0_5:
	mov	x0, x19
	mov	w1, #75
	mov	w2, #32768
	bl	_dib7000m_write_word
	ldr	x8, [x19, #16]
	ldr	w8, [x8, #4]
	cbz	w8, LBB0_16
; %bb.6:
	mov	w20, #7
	mov	w8, #4
	b	LBB0_17
LBB0_7:
	orr	w2, w21, #0x10
	mov	x0, x19
	mov	w1, #72
	bl	_dib7000m_write_word
	mov	x0, x19
	mov	w1, #103
	mov	w2, #1024
	bl	_dib7000m_write_word
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	w20, #14
	b	LBB0_18
LBB0_8:
	mov	x0, x19
	mov	w1, #392
	bl	_dib7000m_read_word
	mov	x22, x0
	mov	x0, x19
	mov	w1, #390
	bl	_dib7000m_read_word
	mov	x2, x0
	mov	x0, x19
	mov	w1, #75
	bl	_dib7000m_write_word
	and	w2, w21, #0xffffffef
	mov	x0, x19
	mov	w1, #72
	bl	_dib7000m_write_word
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	orr	w2, w22, w8, lsl #9
	mov	x0, x19
	mov	w1, #103
	bl	_dib7000m_write_word
	mov	x0, x19
	bl	_dib7000m_restart_agc
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x22
	bl	_dprintk
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	w20, #5
	b	LBB0_18
LBB0_9:
	mov	x0, x19
	bl	_dib7000m_update_lna
	cbz	w0, LBB0_15
; %bb.10:
	mov	w20, #5
	b	LBB0_18
LBB0_11:
	mov	x0, x19
	bl	_dib7000m_agc_soft_split
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_13
; %bb.12:
	add	x0, x19, #4
	mov	w1, #0
	blr	x8
LBB0_13:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_14:
	mov	w20, #-1
	b	LBB0_18
LBB0_15:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	w20, #7
	b	LBB0_18
LBB0_16:
	mov	x0, x19
	mov	w1, #103
	mov	w2, #256
	bl	_dib7000m_write_word
	ldr	w8, [x19]
	add	w8, w8, #1
	mov	w20, #5
LBB0_17:
	str	w8, [x19]
	mov	x0, x19
	bl	_dib7000m_restart_agc
LBB0_18:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
                                        ; -- End function
	.comm	_DIB7000M_POWER_INTERF_ANALOG_AGC,4,2 ; @DIB7000M_POWER_INTERF_ANALOG_AGC
	.comm	_DIBX000_ADC_ON,4,2             ; @DIBX000_ADC_ON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SPLIT %p: %hd\n"

	.no_dead_strip	_dib7000m_agc_startup
.subsections_via_symbols
