	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ddb_fe_attach_mxl5xx           ## -- Begin function ddb_fe_attach_mxl5xx
	.p2align	4, 0x90
_ddb_fe_attach_mxl5xx:                  ## @ddb_fe_attach_mxl5xx
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r14
	movq	24(%r14), %rax
	movq	16(%r14), %rsi
	movq	(%r14), %r13
	movq	8(%r14), %r12
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %ecx
	movl	%ecx, %r15d
	andl	$1, %r15d
	shlq	$2, %r13
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	addq	8(%rax), %r13
	movq	%r13, -88(%rbp)
	shlq	$5, %r15
	leaq	(%r12,%r15), %r9
	addq	$24, %r9
	movq	$0, 24(%r12,%r15)
	movl	%ecx, %r8d
	andl	$3, %r8d
	movq	_fmode@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	$3, (%rax)
	cmovel	%ebx, %r8d
	movq	_mxl5xx_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-88(%rbp), %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	callq	_dvb_attach
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, 8(%r12,%r15)
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.2:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	%r15, %rax
	addq	$8, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movl	(%r12), %edx
	cmpl	$3, %edx
	jg	LBB0_4
## %bb.3:
	movq	(%r14), %rsi
	movq	_LNB_CMD_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_lnb_command
	movq	(%r14), %rsi
	movl	(%r12), %edx
	movq	_SEC_VOLTAGE_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_lnb_set_voltage
LBB0_4:
	movq	_fmode@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_ddb_lnb_init_fmode
	movq	_max_set_voltage@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	%eax, 24(%rcx)
	movq	_max_enable_high_lnb_voltage@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rcx)
	movq	_max_set_tone@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rcx)
	movl	12(%rcx), %eax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, 16(%rdx,%r15)
	movq	_max_send_master_cmd@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rcx)
	movq	_max_send_burst@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rcx)
	movq	%r12, (%rcx)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rdx,%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mxl5xx,8,3                     ## @mxl5xx
	.comm	_fmode,4,2                      ## @fmode
	.comm	_mxl5xx_attach,4,2              ## @mxl5xx_attach
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No MXL5XX found!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"No mxl5xx_set_input function pointer!\n"

	.comm	_LNB_CMD_INIT,4,2               ## @LNB_CMD_INIT
	.comm	_SEC_VOLTAGE_OFF,4,2            ## @SEC_VOLTAGE_OFF
	.comm	_max_set_voltage,4,2            ## @max_set_voltage
	.comm	_max_enable_high_lnb_voltage,4,2 ## @max_enable_high_lnb_voltage
	.comm	_max_set_tone,4,2               ## @max_set_tone
	.comm	_max_send_master_cmd,4,2        ## @max_send_master_cmd
	.comm	_max_send_burst,4,2             ## @max_send_burst
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ddb_fe_attach_mxl5xx           ; -- Begin function ddb_fe_attach_mxl5xx
	.p2align	2
_ddb_fe_attach_mxl5xx:                  ; @ddb_fe_attach_mxl5xx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x27, [x0, #8]
	ldp	x1, x21, [x27, #16]
	ldr	w3, [x0]
	and	x24, x3, #0x1
	ldr	x8, [x21, #8]
	ldp	x9, x25, [x27]
	add	x22, x8, x9, lsl #2
	str	x22, [sp, #8]
	add	x26, x25, x24, lsl #5
	mov	x23, x26
	str	xzr, [x23, #24]!
	and	w8, w3, #0x3
Lloh0:
	adrp	x28, _fmode@GOTPAGE
Lloh1:
	ldr	x28, [x28, _fmode@GOTPAGEOFF]
	ldr	w9, [x28]
	cmp	w9, #3
	csel	w20, wzr, w8, eq
Lloh2:
	adrp	x8, _mxl5xx_attach@GOTPAGE
Lloh3:
	ldr	x8, [x8, _mxl5xx_attach@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x2, sp, #8
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	x4, x20
	mov	x5, x23
	bl	_dvb_attach
	str	x0, [x26, #8]!
	cbz	x0, LBB0_5
; %bb.1:
	ldr	x8, [x23]
	cbz	x8, LBB0_6
; %bb.2:
	ldr	w2, [x19]
	cmp	w2, #3
	b.gt	LBB0_4
; %bb.3:
	ldr	x1, [x27]
Lloh5:
	adrp	x8, _LNB_CMD_INIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LNB_CMD_INIT@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x21
	bl	_lnb_command
	ldr	x1, [x27]
	ldr	w2, [x19]
Lloh8:
	adrp	x8, _SEC_VOLTAGE_OFF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SEC_VOLTAGE_OFF@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x21
	bl	_lnb_set_voltage
LBB0_4:
	ldr	w2, [x28]
	mov	x0, x21
	mov	x1, x22
	bl	_ddb_lnb_init_fmode
	mov	w0, #0
Lloh11:
	adrp	x8, _max_set_voltage@GOTPAGE
Lloh12:
	ldr	x8, [x8, _max_set_voltage@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	x9, [x26]
	str	w8, [x9, #24]
Lloh14:
	adrp	x8, _max_enable_high_lnb_voltage@GOTPAGE
Lloh15:
	ldr	x8, [x8, _max_enable_high_lnb_voltage@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x10, _max_set_tone@GOTPAGE
Lloh18:
	ldr	x10, [x10, _max_set_tone@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #16]
	ldr	w8, [x9, #12]
	add	x10, x25, x24, lsl #5
	str	w8, [x10, #16]
Lloh20:
	adrp	x8, _max_send_master_cmd@GOTPAGE
Lloh21:
	ldr	x8, [x8, _max_send_master_cmd@GOTPAGEOFF]
Lloh22:
	adrp	x11, _max_send_burst@GOTPAGE
Lloh23:
	ldr	x11, [x11, _max_send_burst@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	ldr	w11, [x11]
	stp	w11, w8, [x9, #8]
	str	x19, [x9]
	str	w20, [x10]
	b	LBB0_8
LBB0_5:
	ldr	w0, [x21]
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
	ldr	w0, [x21]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	bl	_dev_err
Lloh30:
	adrp	x8, _ENODEV@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_mxl5xx,8,3                     ; @mxl5xx
	.comm	_fmode,4,2                      ; @fmode
	.comm	_mxl5xx_attach,4,2              ; @mxl5xx_attach
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No MXL5XX found!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"No mxl5xx_set_input function pointer!\n"

	.comm	_LNB_CMD_INIT,4,2               ; @LNB_CMD_INIT
	.comm	_SEC_VOLTAGE_OFF,4,2            ; @SEC_VOLTAGE_OFF
	.comm	_max_set_voltage,4,2            ; @max_set_voltage
	.comm	_max_enable_high_lnb_voltage,4,2 ; @max_enable_high_lnb_voltage
	.comm	_max_set_tone,4,2               ; @max_set_tone
	.comm	_max_send_master_cmd,4,2        ; @max_send_master_cmd
	.comm	_max_send_burst,4,2             ; @max_send_burst
.subsections_via_symbols
