	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ddb_fe_attach_mci              ## -- Begin function ddb_fe_attach_mci
	.p2align	4, 0x90
_ddb_fe_attach_mci:                     ## @ddb_fe_attach_mci
	.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
	cmpl	$128, %esi
	jne	LBB0_6
## %bb.1:
	movq	8(%rdi), %rax
	movq	16(%rax), %rcx
	movq	(%rax), %r12
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r14
	movl	(%rdi), %edx
	movl	%edx, %eax
	andl	$1, %eax
	shlq	$2, %r12
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	addq	8(%rcx), %r12
	movl	%edx, %esi
	andl	$3, %esi
	movq	_ddb_max_sx8_cfg@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -48(%rbp)
	movq	_fmode@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpl	$3, (%rcx)
	cmovel	%ebx, %esi
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	leaq	(%rax,%rax,2), %r15
	leaq	(%r14,%r15,8), %r13
	addq	$20, %r13
	leaq	-48(%rbp), %rsi
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx killed $rdx
	movq	%r13, %rcx
	callq	_ddb_mci_attach
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, 8(%r14,%r15,8)
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	cmpl	$0, (%r13)
	je	LBB0_11
## %bb.3:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %r13
	addq	$8, %r13
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %edx
	cmpl	$3, %edx
	jg	LBB0_5
## %bb.4:
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rsi
	movq	_LNB_CMD_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_lnb_command
	movq	(%r15), %rsi
	movl	(%r14), %edx
	movq	_SEC_VOLTAGE_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_lnb_set_voltage
LBB0_5:
	movq	_fmode@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ddb_lnb_init_fmode
	movq	_max_set_voltage@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r13), %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	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, 16(%rdx,%rsi,8)
	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	%r14, (%rcx)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rdx,%rsi,8)
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_8:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ddb_max_sx8_cfg,4,2            ## @ddb_max_sx8_cfg
	.comm	_fmode,4,2                      ## @fmode
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No MCI card found!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"No MCI 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_mci              ; -- Begin function ddb_fe_attach_mci
	.p2align	2
_ddb_fe_attach_mci:                     ; @ddb_fe_attach_mci
	.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
	cmp	w1, #128
	b.ne	LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x25, [x0, #8]
	ldp	x23, x20, [x25, #8]
	ldr	w2, [x0]
	and	x22, x2, #0x1
	ldr	x28, [x20, #8]
	ldr	x24, [x25]
	and	w8, w2, #0x3
Lloh0:
	adrp	x9, _ddb_max_sx8_cfg@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ddb_max_sx8_cfg@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [sp, #8]
Lloh3:
	adrp	x27, _fmode@GOTPAGE
Lloh4:
	ldr	x27, [x27, _fmode@GOTPAGEOFF]
	ldr	w9, [x27]
	cmp	w9, #3
	csel	w8, wzr, w8, eq
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	mov	w8, #24
	madd	x26, x22, x8, x23
	add	x21, x26, #20
	add	x1, sp, #8
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x3, x21
	bl	_ddb_mci_attach
	str	x0, [x26, #8]!
	cbz	x0, LBB0_7
; %bb.2:
	ldr	w8, [x21]
	cbz	w8, LBB0_8
; %bb.3:
	add	x21, x28, x24, lsl #2
	ldr	w2, [x19]
	cmp	w2, #3
	b.gt	LBB0_5
; %bb.4:
	ldr	x1, [x25]
Lloh5:
	adrp	x8, _LNB_CMD_INIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LNB_CMD_INIT@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_lnb_command
	ldr	x1, [x25]
	ldr	w2, [x19]
Lloh8:
	adrp	x8, _SEC_VOLTAGE_OFF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SEC_VOLTAGE_OFF@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_lnb_set_voltage
LBB0_5:
	ldr	w2, [x27]
	mov	x0, x20
	mov	x1, x21
	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:
	adrp	x10, _max_set_tone@GOTPAGE
Lloh17:
	ldr	x10, [x10, _max_set_tone@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #16]
	mov	w8, #24
	madd	x8, x22, x8, x23
	ldr	w10, [x9, #12]
	str	w10, [x8, #16]
Lloh20:
	adrp	x10, _max_send_master_cmd@GOTPAGE
Lloh21:
	ldr	x10, [x10, _max_send_master_cmd@GOTPAGEOFF]
Lloh22:
	adrp	x11, _max_send_burst@GOTPAGE
Lloh23:
	ldr	x11, [x11, _max_send_burst@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
Lloh25:
	ldr	w11, [x11]
	stp	w11, w10, [x9, #8]
	str	x19, [x9]
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	str	w9, [x8]
	b	LBB0_11
LBB0_6:
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	ldr	w0, [x20]
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
	ldr	w0, [x20]
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	bl	_dev_err
Lloh32:
	adrp	x8, _ENODEV@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_ddb_max_sx8_cfg,4,2            ; @ddb_max_sx8_cfg
	.comm	_fmode,4,2                      ; @fmode
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No MCI card found!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"No MCI 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
