	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mot_setup
_mot_setup:                             ## @mot_setup
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%rax), %r13d
	xorl	%r14d, %r14d
	movq	_MOT_EEPROM@GOTPCREL(%rip), %r15
	movq	_POINTER@GOTPCREL(%rip), %r12
	movq	_CTL_RELOAD@GOTPCREL(%rip), %rcx
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movl	$2, %edi
	movq	%rcx, %rbx
	callq	_SMC_SELECT_BANK
	movl	(%r15), %edi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	addl	%r14d, %edi
	movq	(%r12), %rsi
	addq	%r13, %rsi
	callq	_outw
	movl	$1, %edi
	callq	_SMC_SELECT_BANK
	movq	_CTL_EE_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%rbx), %edi
	movq	%r13, %rax
	movq	_CONTROL@GOTPCREL(%rip), %rcx
	movq	%rcx, %r13
	movq	(%rcx), %rsi
	movq	%rax, %r12
	addq	%rax, %rsi
	callq	_outw
	movl	$200, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	$10, %edi
	callq	_udelay
	movq	_CTL_STORE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	orl	(%rbx), %r14d
	movq	(%r13), %rdi
	addq	%r12, %rdi
	callq	_inw
	testl	%r14d, %eax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	decl	%r15d
	jne	LBB0_2
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_GENERAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r12, %r13
	addq	%r12, %rdi
	callq	_inw
	movzbl	%al, %ecx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rdx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%ecx, (%rdx,%r14,8)
	movzbl	%ah, %eax
	movl	%eax, 4(%rdx,%r14,8)
	incq	%r14
	cmpq	$3, %r14
	movq	_MOT_EEPROM@GOTPCREL(%rip), %r15
	movq	%rbx, %rcx
	movq	_POINTER@GOTPCREL(%rip), %r12
	jne	LBB0_1
## %bb.6:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_4:
	movl	$-1, %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MOT_EEPROM,4,2                 ## @MOT_EEPROM
	.comm	_POINTER,8,3                    ## @POINTER
	.comm	_CTL_RELOAD,4,2                 ## @CTL_RELOAD
	.comm	_CTL_EE_SELECT,4,2              ## @CTL_EE_SELECT
	.comm	_CONTROL,8,3                    ## @CONTROL
	.comm	_CTL_STORE,4,2                  ## @CTL_STORE
	.comm	_GENERAL,8,3                    ## @GENERAL
	.no_dead_strip	_mot_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mot_setup
_mot_setup:                             ; @mot_setup
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x19, [x0]
	ldr	w20, [x19]
	mov	w0, #2
	bl	_SMC_SELECT_BANK
Lloh0:
	adrp	x24, _MOT_EEPROM@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MOT_EEPROM@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh2:
	adrp	x25, _POINTER@GOTPAGE
Lloh3:
	ldr	x25, [x25, _POINTER@GOTPAGEOFF]
	ldr	x8, [x25]
	add	x1, x8, x20
	bl	_outw
	mov	w0, #1
	bl	_SMC_SELECT_BANK
Lloh4:
	adrp	x21, _CTL_RELOAD@GOTPAGE
Lloh5:
	ldr	x21, [x21, _CTL_RELOAD@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh6:
	adrp	x26, _CTL_EE_SELECT@GOTPAGE
Lloh7:
	ldr	x26, [x26, _CTL_EE_SELECT@GOTPAGEOFF]
	ldr	w9, [x26]
	orr	w0, w9, w8
Lloh8:
	adrp	x22, _CONTROL@GOTPAGE
Lloh9:
	ldr	x22, [x22, _CONTROL@GOTPAGEOFF]
	ldr	x8, [x22]
	add	x1, x8, x20
	bl	_outw
	mov	w27, #200
Lloh10:
	adrp	x23, _CTL_STORE@GOTPAGE
Lloh11:
	ldr	x23, [x23, _CTL_STORE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w8, [x21]
	ldr	w9, [x23]
	orr	w28, w9, w8
	ldr	x8, [x22]
	add	x0, x8, x20
	bl	_inw
	tst	w0, w28
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	subs	w27, w27, #1
	b.ne	LBB0_1
	b	LBB0_9
LBB0_3:
Lloh12:
	adrp	x8, _GENERAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GENERAL@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	add	x0, x8, x20
	bl	_inw
	and	w8, w0, #0xff
	ldr	x9, [x19, #8]
	ubfx	w10, w0, #8, #8
	stp	w8, w10, [x9]
	mov	w0, #2
	bl	_SMC_SELECT_BANK
	ldr	w8, [x24]
	add	w0, w8, #1
	ldr	x8, [x25]
	add	x1, x8, x20
	bl	_outw
	mov	w0, #1
	bl	_SMC_SELECT_BANK
	ldr	w8, [x21]
	ldr	w9, [x26]
	orr	w0, w9, w8
	ldr	x8, [x22]
	add	x1, x8, x20
	bl	_outw
	mov	w28, #200
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w8, [x21]
	ldr	w9, [x23]
	orr	w27, w9, w8
	ldr	x8, [x22]
	add	x0, x8, x20
	bl	_inw
	tst	w0, w27
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	subs	w28, w28, #1
	b.ne	LBB0_4
	b	LBB0_9
LBB0_6:
Lloh15:
	adrp	x27, _GENERAL@GOTPAGE
Lloh16:
	ldr	x27, [x27, _GENERAL@GOTPAGEOFF]
	ldr	x8, [x27]
	add	x0, x8, x20
	bl	_inw
	and	w8, w0, #0xff
	ldr	x9, [x19, #8]
	ubfx	w10, w0, #8, #8
	stp	w8, w10, [x9, #8]
	mov	w0, #2
	bl	_SMC_SELECT_BANK
	ldr	w8, [x24]
	add	w0, w8, #2
	ldr	x8, [x25]
	add	x1, x8, x20
	bl	_outw
	mov	w0, #1
	bl	_SMC_SELECT_BANK
	ldr	w8, [x21]
	ldr	w9, [x26]
	orr	w0, w9, w8
	ldr	x8, [x22]
	add	x1, x8, x20
	bl	_outw
	mov	w24, #200
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w8, [x21]
	ldr	w9, [x23]
	orr	w25, w9, w8
	ldr	x8, [x22]
	add	x0, x8, x20
	bl	_inw
	tst	w0, w25
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	subs	w24, w24, #1
	b.ne	LBB0_7
LBB0_9:
	mov	w0, #-1
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	x8, [x27]
	add	x0, x8, x20
	bl	_inw
	mov	x8, x0
	mov	w0, #0
	and	w9, w8, #0xff
	ldr	x10, [x19, #8]
	ubfx	w8, w8, #8, #8
	stp	w9, w8, [x10, #16]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MOT_EEPROM,4,2                 ; @MOT_EEPROM
	.comm	_POINTER,8,3                    ; @POINTER
	.comm	_CTL_RELOAD,4,2                 ; @CTL_RELOAD
	.comm	_CTL_EE_SELECT,4,2              ; @CTL_EE_SELECT
	.comm	_CONTROL,8,3                    ; @CONTROL
	.comm	_CTL_STORE,4,2                  ; @CTL_STORE
	.comm	_GENERAL,8,3                    ; @GENERAL
	.no_dead_strip	_mot_setup
.subsections_via_symbols
