	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt352_get_parameters
_mt352_get_parameters:                  ## @mt352_get_parameters
	.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
	movq	%rsi, %r15
	movq	(%rdi), %r14
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mt352_read_register
	notl	%eax
	testb	$-64, %al
	jne	LBB0_1
## %bb.2:
	movq	_TPS_RECEIVED_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt352_read_register
	movl	%eax, %ebx
	shll	$8, %ebx
	movq	_TPS_RECEIVED_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt352_read_register
	movl	%eax, %r13d
	orl	%eax, %ebx
	movq	_CHAN_START_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt352_read_register
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_CHAN_START_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt352_read_register
	movl	%eax, %r12d
	movq	_TRL_NOMINAL_RATE_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt352_read_register
	movl	%ebx, %ecx
	shrl	$7, %ecx
	andl	$7, %ecx
	leaq	_mt352_get_parameters.tps_fec_to_api(%rip), %rdx
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, (%r15)
	movl	%r13d, %ecx
	shrl	$4, %ecx
	andl	$7, %ecx
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, 4(%r15)
	movl	%ebx, %ecx
	shrl	$13, %ecx
	andl	$3, %ecx
	cmpl	$3, %ecx
	jne	LBB0_4
## %bb.3:
	movq	_QAM_AUTO@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_4:
	movl	%ecx, %ecx
	leaq	l_switch.table.mt352_get_parameters(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
LBB0_5:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	shll	$8, %edx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%r15)
	testb	$1, %r13b
	jne	LBB0_6
## %bb.7:
	movq	_TRANSMISSION_MODE_2K@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_6:
	movq	_TRANSMISSION_MODE_8K@GOTPCREL(%rip), %rcx
LBB0_8:
	orl	%edx, %r12d
	movl	(%rcx), %ecx
	movl	%ecx, 28(%r15)
	shrl	$2, %r13d
	andl	$3, %r13d
	leaq	l_switch.table.mt352_get_parameters.1(%rip), %rcx
	movq	(%rcx,%r13,8), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%r15)
	shrl	$10, %ebx
	andl	$7, %ebx
	cmpl	$3, %ebx
	ja	LBB0_9
## %bb.10:
	movl	%ebx, %ecx
	leaq	l_switch.table.mt352_get_parameters.2(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	jmp	LBB0_11
LBB0_9:
	movq	_HIERARCHY_AUTO@GOTPCREL(%rip), %rcx
LBB0_11:
	movl	(%rcx), %ecx
	movl	%ecx, 20(%r15)
	movq	_IF_FREQUENCYx6@GOTPCREL(%rip), %rcx
	subl	(%rcx), %r12d
	imull	$500, %r12d, %ecx               ## imm = 0x1F4
	movslq	%ecx, %rcx
	imulq	$1431655766, %rcx, %rcx         ## imm = 0x55555556
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	imull	$1000, %ecx, %ecx               ## imm = 0x3E8
	cmpl	$100, %eax
	movl	$7000000, %edx                  ## imm = 0x6ACFC0
	movl	$6000000, %esi                  ## imm = 0x5B8D80
	cmovel	%edx, %esi
	cmpl	$114, %eax
	movl	$8000000, %eax                  ## imm = 0x7A1200
	cmovnel	%esi, %eax
	movl	%ecx, 8(%r15)
	movl	%eax, 12(%r15)
	movq	_STATUS_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt352_read_register
	testb	$2, %al
	jne	LBB0_12
## %bb.13:
	movq	_INVERSION_ON@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_12:
	movq	_INVERSION_OFF@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	xorl	%ebx, %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @mt352_get_parameters.tps_fec_to_api
_mt352_get_parameters.tps_fec_to_api:
	.long	133                             ## 0x85
	.long	132                             ## 0x84
	.long	131                             ## 0x83
	.long	130                             ## 0x82
	.long	129                             ## 0x81
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.long	128                             ## 0x80

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TPS_RECEIVED_1,4,2             ## @TPS_RECEIVED_1
	.comm	_TPS_RECEIVED_0,4,2             ## @TPS_RECEIVED_0
	.comm	_CHAN_START_1,4,2               ## @CHAN_START_1
	.comm	_CHAN_START_0,4,2               ## @CHAN_START_0
	.comm	_TRL_NOMINAL_RATE_1,4,2         ## @TRL_NOMINAL_RATE_1
	.comm	_QPSK,4,2                       ## @QPSK
	.comm	_QAM_16,4,2                     ## @QAM_16
	.comm	_QAM_64,4,2                     ## @QAM_64
	.comm	_QAM_AUTO,4,2                   ## @QAM_AUTO
	.comm	_TRANSMISSION_MODE_8K,4,2       ## @TRANSMISSION_MODE_8K
	.comm	_TRANSMISSION_MODE_2K,4,2       ## @TRANSMISSION_MODE_2K
	.comm	_GUARD_INTERVAL_1_32,4,2        ## @GUARD_INTERVAL_1_32
	.comm	_GUARD_INTERVAL_1_16,4,2        ## @GUARD_INTERVAL_1_16
	.comm	_GUARD_INTERVAL_1_8,4,2         ## @GUARD_INTERVAL_1_8
	.comm	_GUARD_INTERVAL_1_4,4,2         ## @GUARD_INTERVAL_1_4
	.comm	_GUARD_INTERVAL_AUTO,4,2        ## @GUARD_INTERVAL_AUTO
	.comm	_HIERARCHY_NONE,4,2             ## @HIERARCHY_NONE
	.comm	_HIERARCHY_1,4,2                ## @HIERARCHY_1
	.comm	_HIERARCHY_2,4,2                ## @HIERARCHY_2
	.comm	_HIERARCHY_4,4,2                ## @HIERARCHY_4
	.comm	_HIERARCHY_AUTO,4,2             ## @HIERARCHY_AUTO
	.comm	_IF_FREQUENCYx6,4,2             ## @IF_FREQUENCYx6
	.comm	_STATUS_2,4,2                   ## @STATUS_2
	.comm	_INVERSION_OFF,4,2              ## @INVERSION_OFF
	.comm	_INVERSION_ON,4,2               ## @INVERSION_ON
	.no_dead_strip	_mt352_get_parameters
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.mt352_get_parameters
l_switch.table.mt352_get_parameters:
	.quad	_QPSK
	.quad	_QAM_16
	.quad	_QAM_64

	.p2align	3                               ## @switch.table.mt352_get_parameters.1
l_switch.table.mt352_get_parameters.1:
	.quad	_GUARD_INTERVAL_1_32
	.quad	_GUARD_INTERVAL_1_16
	.quad	_GUARD_INTERVAL_1_8
	.quad	_GUARD_INTERVAL_1_4

	.p2align	3                               ## @switch.table.mt352_get_parameters.2
l_switch.table.mt352_get_parameters.2:
	.quad	_HIERARCHY_NONE
	.quad	_HIERARCHY_1
	.quad	_HIERARCHY_2
	.quad	_HIERARCHY_4

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt352_get_parameters
_mt352_get_parameters:                  ; @mt352_get_parameters
	.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	x19, x1
	ldr	x20, [x0]
	mov	x0, x20
	mov	w1, #0
	bl	_mt352_read_register
	mvn	w8, w0
	tst	w8, #0xc0
	b.ne	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _TPS_RECEIVED_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TPS_RECEIVED_1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mt352_read_register
	mov	x22, x0
Lloh3:
	adrp	x8, _TPS_RECEIVED_0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TPS_RECEIVED_0@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mt352_read_register
	mov	x21, x0
	orr	w24, w0, w22, lsl #8
Lloh6:
	adrp	x8, _CHAN_START_1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CHAN_START_1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mt352_read_register
	mov	x22, x0
Lloh9:
	adrp	x8, _CHAN_START_0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CHAN_START_0@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mt352_read_register
	mov	x23, x0
Lloh12:
	adrp	x8, _TRL_NOMINAL_RATE_1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TRL_NOMINAL_RATE_1@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mt352_read_register
	ubfx	w8, w24, #7, #3
Lloh15:
	adrp	x9, _mt352_get_parameters.tps_fec_to_api@PAGE
Lloh16:
	add	x9, x9, _mt352_get_parameters.tps_fec_to_api@PAGEOFF
	ldr	w8, [x9, w8, uxtw #2]
	ubfx	w10, w21, #4, #3
	ldr	w9, [x9, w10, uxtw #2]
	stp	w8, w9, [x19]
	ubfx	w8, w24, #13, #2
	cmp	w8, #3
	b.ne	LBB0_4
; %bb.2:
Lloh17:
	adrp	x9, _QAM_AUTO@GOTPAGE
Lloh18:
	ldr	x9, [x9, _QAM_AUTO@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_4:
Lloh22:
	adrp	x9, l_switch.table.mt352_get_parameters@PAGE
Lloh23:
	add	x9, x9, l_switch.table.mt352_get_parameters@PAGEOFF
	ldr	x9, [x9, w8, uxtw #3]
LBB0_5:
	orr	w8, w23, w22, lsl #8
	ldr	w9, [x9]
	str	w9, [x19, #32]
Lloh24:
	adrp	x9, _TRANSMISSION_MODE_8K@GOTPAGE
Lloh25:
	ldr	x9, [x9, _TRANSMISSION_MODE_8K@GOTPAGEOFF]
Lloh26:
	adrp	x10, _TRANSMISSION_MODE_2K@GOTPAGE
Lloh27:
	ldr	x10, [x10, _TRANSMISSION_MODE_2K@GOTPAGEOFF]
	tst	w21, #0x1
	csel	x9, x10, x9, eq
	ldr	w9, [x9]
	str	w9, [x19, #28]
	ubfx	w9, w21, #2, #2
Lloh28:
	adrp	x10, l_switch.table.mt352_get_parameters.1@PAGE
Lloh29:
	add	x10, x10, l_switch.table.mt352_get_parameters.1@PAGEOFF
	ldr	x9, [x10, w9, uxtw #3]
	ldr	w9, [x9]
	str	w9, [x19, #24]
	ubfx	w9, w24, #10, #3
	cmp	w9, #3
	b.hi	LBB0_7
; %bb.6:
Lloh30:
	adrp	x10, l_switch.table.mt352_get_parameters.2@PAGE
Lloh31:
	add	x10, x10, l_switch.table.mt352_get_parameters.2@PAGEOFF
	ldr	x9, [x10, w9, uxtw #3]
	b	LBB0_8
LBB0_7:
Lloh32:
	adrp	x9, _HIERARCHY_AUTO@GOTPAGE
Lloh33:
	ldr	x9, [x9, _HIERARCHY_AUTO@GOTPAGEOFF]
LBB0_8:
	ldr	w9, [x9]
Lloh34:
	adrp	x10, _IF_FREQUENCYx6@GOTPAGE
Lloh35:
	ldr	x10, [x10, _IF_FREQUENCYx6@GOTPAGEOFF]
	str	w9, [x19, #20]
Lloh36:
	ldr	w9, [x10]
	sub	w8, w8, w9
	mov	w9, #500
	mul	w8, w8, w9
	mov	w9, #21846
	movk	w9, #21845, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w8, w8, w9
	mov	w9, #1000
	mul	w8, w8, w9
	mov	w9, #36224
	movk	w9, #91, lsl #16
	mov	w10, #53184
	movk	w10, #106, lsl #16
	cmp	w0, #100
	csel	w9, w10, w9, eq
	mov	w10, #4608
	movk	w10, #122, lsl #16
	cmp	w0, #114
	csel	w9, w10, w9, eq
	stp	w8, w9, [x19, #8]
Lloh37:
	adrp	x8, _STATUS_2@GOTPAGE
Lloh38:
	ldr	x8, [x8, _STATUS_2@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mt352_read_register
	tbnz	w0, #1, LBB0_10
; %bb.9:
	mov	w0, #0
Lloh40:
	adrp	x8, _INVERSION_ON@GOTPAGE
Lloh41:
	ldr	x8, [x8, _INVERSION_ON@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
	mov	w0, #0
Lloh42:
	adrp	x8, _INVERSION_OFF@GOTPAGE
Lloh43:
	ldr	x8, [x8, _INVERSION_OFF@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	str	w8, [x19, #16]
LBB0_12:
	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
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @mt352_get_parameters.tps_fec_to_api
_mt352_get_parameters.tps_fec_to_api:
	.long	133                             ; 0x85
	.long	132                             ; 0x84
	.long	131                             ; 0x83
	.long	130                             ; 0x82
	.long	129                             ; 0x81
	.long	128                             ; 0x80
	.long	128                             ; 0x80
	.long	128                             ; 0x80

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TPS_RECEIVED_1,4,2             ; @TPS_RECEIVED_1
	.comm	_TPS_RECEIVED_0,4,2             ; @TPS_RECEIVED_0
	.comm	_CHAN_START_1,4,2               ; @CHAN_START_1
	.comm	_CHAN_START_0,4,2               ; @CHAN_START_0
	.comm	_TRL_NOMINAL_RATE_1,4,2         ; @TRL_NOMINAL_RATE_1
	.comm	_QPSK,4,2                       ; @QPSK
	.comm	_QAM_16,4,2                     ; @QAM_16
	.comm	_QAM_64,4,2                     ; @QAM_64
	.comm	_QAM_AUTO,4,2                   ; @QAM_AUTO
	.comm	_TRANSMISSION_MODE_8K,4,2       ; @TRANSMISSION_MODE_8K
	.comm	_TRANSMISSION_MODE_2K,4,2       ; @TRANSMISSION_MODE_2K
	.comm	_GUARD_INTERVAL_1_32,4,2        ; @GUARD_INTERVAL_1_32
	.comm	_GUARD_INTERVAL_1_16,4,2        ; @GUARD_INTERVAL_1_16
	.comm	_GUARD_INTERVAL_1_8,4,2         ; @GUARD_INTERVAL_1_8
	.comm	_GUARD_INTERVAL_1_4,4,2         ; @GUARD_INTERVAL_1_4
	.comm	_GUARD_INTERVAL_AUTO,4,2        ; @GUARD_INTERVAL_AUTO
	.comm	_HIERARCHY_NONE,4,2             ; @HIERARCHY_NONE
	.comm	_HIERARCHY_1,4,2                ; @HIERARCHY_1
	.comm	_HIERARCHY_2,4,2                ; @HIERARCHY_2
	.comm	_HIERARCHY_4,4,2                ; @HIERARCHY_4
	.comm	_HIERARCHY_AUTO,4,2             ; @HIERARCHY_AUTO
	.comm	_IF_FREQUENCYx6,4,2             ; @IF_FREQUENCYx6
	.comm	_STATUS_2,4,2                   ; @STATUS_2
	.comm	_INVERSION_OFF,4,2              ; @INVERSION_OFF
	.comm	_INVERSION_ON,4,2               ; @INVERSION_ON
	.no_dead_strip	_mt352_get_parameters
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.mt352_get_parameters
l_switch.table.mt352_get_parameters:
	.quad	_QPSK
	.quad	_QAM_16
	.quad	_QAM_64

	.p2align	3                               ; @switch.table.mt352_get_parameters.1
l_switch.table.mt352_get_parameters.1:
	.quad	_GUARD_INTERVAL_1_32
	.quad	_GUARD_INTERVAL_1_16
	.quad	_GUARD_INTERVAL_1_8
	.quad	_GUARD_INTERVAL_1_4

	.p2align	3                               ; @switch.table.mt352_get_parameters.2
l_switch.table.mt352_get_parameters.2:
	.quad	_HIERARCHY_NONE
	.quad	_HIERARCHY_1
	.quad	_HIERARCHY_2
	.quad	_HIERARCHY_4

.subsections_via_symbols
