	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stl_cd1400portinit
_stl_cd1400portinit:                    ## @stl_cd1400portinit
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	_pr_debug
	testq	%r12, %r12
	je	LBB0_6
## %bb.1:
	testq	%r15, %r15
	je	LBB0_6
## %bb.2:
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.3:
	movq	_brd_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%r12), %rcx
	movq	_BRD_ECHPCI@GOTPCREL(%rip), %r8
	movl	(%rbx), %eax
	movl	8(%rbx), %edi
	xorl	%esi, %esi
	movl	$0, %edx
	cmpl	$8, %eax
	jl	LBB0_5
## %bb.4:
	movq	_EREG_BANKSIZE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
LBB0_5:
	cmpq	(%r8), %rcx
	cmoveq	%rsi, %rdx
	addq	8(%r15), %rdx
	movq	%rdx, 24(%rbx)
	movl	%eax, %ecx
	andl	$4, %ecx
	shll	$5, %ecx
	movl	%ecx, 4(%rbx)
	sarl	$3, %eax
	movslq	%eax, %rsi
	addq	(%r15), %rsi
	movq	%rsi, 16(%rbx)
	callq	_BRDENABLE
	movq	_CAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	andl	$3, %edx
	movq	%rbx, %rdi
	callq	_stl_cd1400setreg
	movq	_LIVR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	shll	$3, %edx
	movq	%rbx, %rdi
	callq	_stl_cd1400setreg
	movq	_GFRCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stl_cd1400getreg
	movl	%eax, 12(%rbx)
	movl	8(%rbx), %edi
	callq	_BRDDISABLE
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stl_cd1400portinit(brdp=%p,panelp=%p,portp=%p)\n"

	.comm	_brd_lock,4,2                   ## @brd_lock
	.comm	_BRD_ECHPCI,8,3                 ## @BRD_ECHPCI
	.comm	_EREG_BANKSIZE,8,3              ## @EREG_BANKSIZE
	.comm	_CAR,4,2                        ## @CAR
	.comm	_LIVR,4,2                       ## @LIVR
	.comm	_GFRCR,4,2                      ## @GFRCR
	.no_dead_strip	_stl_cd1400portinit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stl_cd1400portinit
_stl_cd1400portinit:                    ; @stl_cd1400portinit
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	mov	x3, x19
	bl	_pr_debug
	cbz	x22, LBB0_4
; %bb.1:
	cbz	x21, LBB0_4
; %bb.2:
	cbz	x19, LBB0_4
; %bb.3:
Lloh2:
	adrp	x20, _brd_lock@GOTPAGE
Lloh3:
	ldr	x20, [x20, _brd_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x22]
Lloh4:
	adrp	x9, _BRD_ECHPCI@GOTPAGE
Lloh5:
	ldr	x9, [x9, _BRD_ECHPCI@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	ldr	w10, [x19]
	cmp	w10, #8
	ccmp	x8, x9, #4, ge
Lloh7:
	adrp	x8, _EREG_BANKSIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EREG_BANKSIZE@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	csel	x8, xzr, x8, eq
	ldp	x11, x9, [x21]
	add	x8, x8, x9
	lsl	w9, w10, #5
	and	w9, w9, #0x80
	str	w9, [x19, #4]
	asr	w9, w10, #3
	add	x1, x11, w9, sxtw
	stp	x1, x8, [x19, #16]
	ldr	w0, [x19, #8]
	bl	_BRDENABLE
Lloh10:
	adrp	x8, _CAR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CAR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w8, [x19]
	and	w2, w8, #0x3
	mov	x0, x19
	bl	_stl_cd1400setreg
Lloh13:
	adrp	x8, _LIVR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LIVR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	w8, [x19]
	lsl	w2, w8, #3
	mov	x0, x19
	bl	_stl_cd1400setreg
Lloh16:
	adrp	x8, _GFRCR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GFRCR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stl_cd1400getreg
	str	w0, [x19, #12]
	ldr	w0, [x19, #8]
	bl	_BRDDISABLE
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stl_cd1400portinit(brdp=%p,panelp=%p,portp=%p)\n"

	.comm	_brd_lock,4,2                   ; @brd_lock
	.comm	_BRD_ECHPCI,8,3                 ; @BRD_ECHPCI
	.comm	_EREG_BANKSIZE,8,3              ; @EREG_BANKSIZE
	.comm	_CAR,4,2                        ; @CAR
	.comm	_LIVR,4,2                       ; @LIVR
	.comm	_GFRCR,4,2                      ; @GFRCR
	.no_dead_strip	_stl_cd1400portinit
.subsections_via_symbols
