	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib7000p_demod_reset
_dib7000p_demod_reset:                  ## @dib7000p_demod_reset
	.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, %rbx
	movq	_DIB7000P_POWER_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dib7000p_set_power_mode
	movq	(%rbx), %rax
	movq	_SOC7090@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_2
## %bb.1:
	leaq	16(%rbx), %rdi
	callq	_dibx000_reset_i2c_master
LBB0_2:
	movq	_DIBX000_VBG_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dib7000p_set_adc_state
	movq	%rbx, %rdi
	movl	$770, %esi                      ## imm = 0x302
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$771, %esi                      ## imm = 0x303
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$772, %esi                      ## imm = 0x304
	movl	$31, %edx
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$1280, %esi                     ## imm = 0x500
	movl	$7, %edx
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$770, %esi                      ## imm = 0x302
	xorl	%edx, %edx
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$771, %esi                      ## imm = 0x303
	xorl	%edx, %edx
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$772, %esi                      ## imm = 0x304
	xorl	%edx, %edx
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$1280, %esi                     ## imm = 0x500
	xorl	%edx, %edx
	callq	_dib7000p_write_word
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movl	$898, %esi                      ## imm = 0x382
	movl	$3, %edx
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$898, %esi                      ## imm = 0x382
	xorl	%edx, %edx
	callq	_dib7000p_write_word
LBB0_4:
	movq	%rbx, %rdi
	callq	_dib7000p_reset_pll
	movq	%rbx, %rdi
	callq	_dib7000p_reset_gpio
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
LBB0_6:
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	jne	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	movl	$899, %esi                      ## imm = 0x383
	xorl	%edx, %edx
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$42, %esi
	movl	$35, %edx
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$43, %esi
	movl	$724, %edx                      ## imm = 0x2D4
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$44, %esi
	movl	$300, %edx                      ## imm = 0x12C
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$273, %esi                      ## imm = 0x111
	movl	$30, %edx
	callq	_dib7000p_write_word
LBB0_8:
	movq	_OUTMODE_HIGH_Z@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dib7000p_set_output_mode
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	callq	_dprintk
LBB0_10:
	movq	_DIBX000_SLOW_ADC_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dib7000p_set_adc_state
	movq	%rbx, %rdi
	callq	_dib7000p_sad_calib
	movq	_DIBX000_SLOW_ADC_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dib7000p_set_adc_state
	movq	%rbx, %rdi
	movl	$1285, %esi                     ## imm = 0x505
	callq	_dib7000p_read_word
	andl	$-3, %eax
	movq	%rbx, %rdi
	movl	$1285, %esi                     ## imm = 0x505
	movl	%eax, %edx
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$8000, %esi                     ## imm = 0x1F40
	callq	_dib7000p_set_bandwidth
	movq	(%rbx), %rax
	movl	$1877, %edx                     ## imm = 0x755
	cmpq	(%r14), %rax
	je	LBB0_12
## %bb.11:
	cmpq	$0, 8(%rbx)
	movl	$8021, %eax                     ## imm = 0x1F55
	movl	$1877, %edx                     ## imm = 0x755
	cmovel	%eax, %edx
LBB0_12:
	movq	%rbx, %rdi
	movl	$36, %esi
	callq	_dib7000p_write_word
	movq	_dib7000p_defaults@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dib7000p_write_tab
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	je	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	movl	$901, %esi                      ## imm = 0x385
	movl	$6, %edx
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$902, %esi                      ## imm = 0x386
	movl	$3136, %edx                     ## imm = 0xC40
	callq	_dib7000p_write_word
	movq	%rbx, %rdi
	movl	$905, %esi                      ## imm = 0x389
	movl	$11406, %edx                    ## imm = 0x2C8E
	callq	_dib7000p_write_word
LBB0_14:
	movq	_DIB7000P_POWER_INTERFACE_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dib7000p_set_power_mode
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DIB7000P_POWER_ALL,4,2         ## @DIB7000P_POWER_ALL
	.comm	_SOC7090,8,3                    ## @SOC7090
	.comm	_DIBX000_VBG_ENABLE,4,2         ## @DIBX000_VBG_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GPIO reset was not successful.\n"

	.comm	_OUTMODE_HIGH_Z,4,2             ## @OUTMODE_HIGH_Z
L_.str.1:                               ## @.str.1
	.asciz	"OUTPUT_MODE could not be reset.\n"

	.comm	_DIBX000_SLOW_ADC_ON,4,2        ## @DIBX000_SLOW_ADC_ON
	.comm	_DIBX000_SLOW_ADC_OFF,4,2       ## @DIBX000_SLOW_ADC_OFF
	.comm	_dib7000p_defaults,4,2          ## @dib7000p_defaults
	.comm	_DIB7000P_POWER_INTERFACE_ONLY,4,2 ## @DIB7000P_POWER_INTERFACE_ONLY
	.no_dead_strip	_dib7000p_demod_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib7000p_demod_reset
_dib7000p_demod_reset:                  ; @dib7000p_demod_reset
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _DIB7000P_POWER_ALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DIB7000P_POWER_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_dib7000p_set_power_mode
	ldr	x8, [x19]
Lloh3:
	adrp	x20, _SOC7090@GOTPAGE
Lloh4:
	ldr	x20, [x20, _SOC7090@GOTPAGEOFF]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	add	x0, x19, #16
	bl	_dibx000_reset_i2c_master
LBB0_2:
Lloh5:
	adrp	x8, _DIBX000_VBG_ENABLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DIBX000_VBG_ENABLE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib7000p_set_adc_state
	mov	x0, x19
	mov	w1, #770
	mov	w2, #65535
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #771
	mov	w2, #65535
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #772
	mov	w2, #31
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #1280
	mov	w2, #7
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #770
	mov	w2, #0
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #771
	mov	w2, #0
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #772
	mov	w2, #0
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #1280
	mov	w2, #0
	bl	_dib7000p_write_word
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #898
	mov	w2, #3
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #898
	mov	w2, #0
	bl	_dib7000p_write_word
LBB0_4:
	mov	x0, x19
	bl	_dib7000p_reset_pll
	mov	x0, x19
	bl	_dib7000p_reset_gpio
	cbz	x0, LBB0_6
; %bb.5:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
LBB0_6:
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #899
	mov	w2, #0
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #42
	mov	w2, #35
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #43
	mov	w2, #724
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #44
	mov	w2, #300
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #273
	mov	w2, #30
	bl	_dib7000p_write_word
LBB0_8:
Lloh10:
	adrp	x8, _OUTMODE_HIGH_Z@GOTPAGE
Lloh11:
	ldr	x8, [x8, _OUTMODE_HIGH_Z@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib7000p_set_output_mode
	cbz	x0, LBB0_10
; %bb.9:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
LBB0_10:
Lloh15:
	adrp	x8, _DIBX000_SLOW_ADC_ON@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DIBX000_SLOW_ADC_ON@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib7000p_set_adc_state
	mov	x0, x19
	bl	_dib7000p_sad_calib
Lloh18:
	adrp	x8, _DIBX000_SLOW_ADC_OFF@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DIBX000_SLOW_ADC_OFF@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib7000p_set_adc_state
	mov	x0, x19
	mov	w1, #1285
	bl	_dib7000p_read_word
	and	w2, w0, #0xfffffffd
	mov	x0, x19
	mov	w1, #1285
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #8000
	bl	_dib7000p_set_bandwidth
	ldr	x8, [x19]
	ldr	x9, [x20]
	mov	w2, #1877
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.11:
	ldr	x8, [x19, #8]
	cmp	x8, #0
	mov	w8, #8021
	csel	w2, w8, w2, eq
LBB0_12:
	mov	x0, x19
	mov	w1, #36
	bl	_dib7000p_write_word
Lloh21:
	adrp	x8, _dib7000p_defaults@GOTPAGE
Lloh22:
	ldr	x8, [x8, _dib7000p_defaults@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib7000p_write_tab
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.13:
	mov	x0, x19
	mov	w1, #901
	mov	w2, #6
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #902
	mov	w2, #3136
	bl	_dib7000p_write_word
	mov	x0, x19
	mov	w1, #905
	mov	w2, #11406
	bl	_dib7000p_write_word
LBB0_14:
Lloh24:
	adrp	x8, _DIB7000P_POWER_INTERFACE_ONLY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DIB7000P_POWER_INTERFACE_ONLY@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib7000p_set_power_mode
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_DIB7000P_POWER_ALL,4,2         ; @DIB7000P_POWER_ALL
	.comm	_SOC7090,8,3                    ; @SOC7090
	.comm	_DIBX000_VBG_ENABLE,4,2         ; @DIBX000_VBG_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GPIO reset was not successful.\n"

	.comm	_OUTMODE_HIGH_Z,4,2             ; @OUTMODE_HIGH_Z
l_.str.1:                               ; @.str.1
	.asciz	"OUTPUT_MODE could not be reset.\n"

	.comm	_DIBX000_SLOW_ADC_ON,4,2        ; @DIBX000_SLOW_ADC_ON
	.comm	_DIBX000_SLOW_ADC_OFF,4,2       ; @DIBX000_SLOW_ADC_OFF
	.comm	_dib7000p_defaults,4,2          ; @dib7000p_defaults
	.comm	_DIB7000P_POWER_INTERFACE_ONLY,4,2 ; @DIB7000P_POWER_INTERFACE_ONLY
	.no_dead_strip	_dib7000p_demod_reset
.subsections_via_symbols
