	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stl_cd1400panelinit
_stl_cd1400panelinit:                   ## @stl_cd1400panelinit
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_pr_debug
	movq	_brd_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movl	8(%rbx), %edi
	movq	16(%rbx), %rsi
	callq	_BRDENABLE
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %eax
	movq	_CD1400_PORTS@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
                                        ## implicit-def: $r15d
	xorl	%r12d, %r12d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %esi
	movl	12(%rax), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %ecx
	callq	_printk
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r12d
	cmpl	-68(%rbp), %r12d                ## 4-byte Folded Reload
	je	LBB0_18
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	(%r14), %rax
	movq	_BRD_ECHPCI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %edi
	shrl	%edi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	addq	16(%rbx), %rdi
	movl	8(%r14), %esi
	callq	_outb
	movl	4(%rbx), %r13d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %r13d
	shrl	%r13d
	movq	_EREG_BANKSIZE@GOTPCREL(%rip), %rax
	imull	(%rax), %r13d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	4(%rax), %r13d
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %eax
	shll	$7, %eax
	movzbl	%al, %r14d
	movq	_GFRCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r14, %rdi
	movl	%r13d, %esi
	callq	_outb
	movq	_EREG_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%r13d, %esi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_outb
	movq	_CCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r14, %rdi
	movl	%r13d, %esi
	callq	_outb
	movq	_CCR_RESETFULL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_EREG_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%r13d, %esi
	callq	_outb
	movq	_CCR_RESETFULL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_EREG_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%r13d, %esi
	callq	_outb
	movq	_GFRCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	addq	%r14, %rdi
	movl	%r13d, %esi
	callq	_outb
	movq	_CCR_MAXWAIT@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_EREG_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r13d, %edi
	callq	_inb
	testl	%eax, %eax
	jne	LBB0_9
## %bb.14:                              ##   in Loop: Header=BB0_8 Depth=2
	incl	%ebx
	cmpl	(%r14), %ebx
	jl	LBB0_8
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r15d, %r15d
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r15d
	movl	(%r14), %eax
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%eax, %ebx
	jge	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$64, %r15d
	jb	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$97, %r15d
	jae	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	btsl	%r12d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_PPR@GOTPCREL(%rip), %rax
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	addq	(%rax), %rdi
	movl	%r13d, %esi
	callq	_outb
	movq	_PPR_SCALAR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_EREG_DATA@GOTPCREL(%rip), %rax
	addl	(%rax), %r13d
	movl	%r13d, %esi
	callq	_outb
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_18:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	callq	_BRDDISABLE
	movq	_brd_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stl_panelinit(brdp=%p,panelp=%p)\n"

	.comm	_brd_lock,4,2                   ## @brd_lock
	.comm	_CD1400_PORTS,4,2               ## @CD1400_PORTS
	.comm	_BRD_ECHPCI,8,3                 ## @BRD_ECHPCI
	.comm	_EREG_BANKSIZE,4,2              ## @EREG_BANKSIZE
	.comm	_GFRCR,8,3                      ## @GFRCR
	.comm	_EREG_DATA,4,2                  ## @EREG_DATA
	.comm	_CCR,8,3                        ## @CCR
	.comm	_CCR_RESETFULL,8,3              ## @CCR_RESETFULL
	.comm	_CCR_MAXWAIT,4,2                ## @CCR_MAXWAIT
L_.str.1:                               ## @.str.1
	.asciz	"STALLION: cd1400 not responding, brd=%d panel=%d chip=%d\n"

	.comm	_PPR,8,3                        ## @PPR
	.comm	_PPR_SCALAR,8,3                 ## @PPR_SCALAR
	.no_dead_strip	_stl_cd1400panelinit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stl_cd1400panelinit
_stl_cd1400panelinit:                   ; @stl_cd1400panelinit
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	bl	_pr_debug
Lloh2:
	adrp	x0, _brd_lock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _brd_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	ldr	w0, [x19, #8]
	ldr	x1, [x19, #16]
	bl	_BRDENABLE
	ldr	w8, [x19]
Lloh4:
	adrp	x9, _CD1400_PORTS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _CD1400_PORTS@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.1:
	str	wzr, [sp, #8]                   ; 4-byte Folded Spill
	mov	w22, #0
Lloh7:
	adrp	x23, _EREG_DATA@GOTPAGE
Lloh8:
	ldr	x23, [x23, _EREG_DATA@GOTPAGEOFF]
Lloh9:
	adrp	x21, _CCR_MAXWAIT@GOTPAGE
Lloh10:
	ldr	x21, [x21, _CCR_MAXWAIT@GOTPAGEOFF]
                                        ; implicit-def: $w24
Lloh11:
	adrp	x26, _CCR_RESETFULL@GOTPAGE
Lloh12:
	ldr	x26, [x26, _CCR_RESETFULL@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldp	w1, w2, [x19, #8]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x3, x22
	bl	_printk
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w22, #1
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w22, w8
	b.eq	LBB0_18
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x8, [x20]
Lloh15:
	adrp	x9, _BRD_ECHPCI@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BRD_ECHPCI@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #16]
	lsr	w9, w22, #1
	add	x0, x8, x9
	ldr	w1, [x20, #8]
	bl	_outb
	ldr	w25, [x19, #4]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19, #4]
Lloh18:
	adrp	x9, _EREG_BANKSIZE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _EREG_BANKSIZE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	lsr	w10, w22, #1
	madd	w25, w9, w10, w8
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ubfiz	w28, w22, #7, #1
Lloh21:
	adrp	x27, _GFRCR@GOTPAGE
Lloh22:
	ldr	x27, [x27, _GFRCR@GOTPAGEOFF]
	ldr	x8, [x27]
	add	x0, x8, x28
	mov	x1, x25
	bl	_outb
	ldr	w8, [x23]
	add	w1, w8, w25
	mov	x0, #0
	bl	_outb
Lloh23:
	adrp	x8, _CCR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CCR@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	add	x0, x8, x28
	mov	x1, x25
	bl	_outb
	ldr	x0, [x26]
	ldr	w8, [x23]
	add	w1, w8, w25
	bl	_outb
	ldr	x0, [x26]
	ldr	w8, [x23]
	add	w1, w8, w25
	bl	_outb
	ldr	x8, [x27]
	add	x0, x8, x28
	mov	x1, x25
	bl	_outb
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w27, #0
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x23]
	add	w0, w8, w25
	bl	_inb
	cbnz	w0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	add	w27, w27, #1
	ldr	w8, [x21]
	cmp	w27, w8
	b.lt	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w24, #0
	b	LBB0_2
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w27, #0
	cmp	w27, w8
	b.lt	LBB0_14
	b	LBB0_2
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, x0
	ldr	w8, [x21]
	cmp	w27, w8
	b.ge	LBB0_2
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w24, #64
	b.lo	LBB0_2
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w24, #97
	b.hs	LBB0_2
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #1
	lsl	w8, w8, w22
	ldr	w9, [sp, #8]                    ; 4-byte Folded Reload
	orr	w9, w9, w8
	str	w9, [sp, #8]                    ; 4-byte Folded Spill
Lloh26:
	adrp	x8, _PPR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PPR@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	add	x0, x8, x28
	mov	x1, x25
	bl	_outb
Lloh29:
	adrp	x8, _PPR_SCALAR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PPR_SCALAR@GOTPAGEOFF]
Lloh31:
	ldr	x0, [x8]
	ldr	w8, [x23]
	add	w1, w8, w25
	bl	_outb
	b	LBB0_3
LBB0_17:
	str	wzr, [sp, #8]                   ; 4-byte Folded Spill
LBB0_18:
	ldr	w0, [x19, #8]
	bl	_BRDDISABLE
Lloh32:
	adrp	x0, _brd_lock@GOTPAGE
Lloh33:
	ldr	x0, [x0, _brd_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	ldr	w0, [sp, #8]                    ; 4-byte Folded Reload
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stl_panelinit(brdp=%p,panelp=%p)\n"

	.comm	_brd_lock,4,2                   ; @brd_lock
	.comm	_CD1400_PORTS,4,2               ; @CD1400_PORTS
	.comm	_BRD_ECHPCI,8,3                 ; @BRD_ECHPCI
	.comm	_EREG_BANKSIZE,4,2              ; @EREG_BANKSIZE
	.comm	_GFRCR,8,3                      ; @GFRCR
	.comm	_EREG_DATA,4,2                  ; @EREG_DATA
	.comm	_CCR,8,3                        ; @CCR
	.comm	_CCR_RESETFULL,8,3              ; @CCR_RESETFULL
	.comm	_CCR_MAXWAIT,4,2                ; @CCR_MAXWAIT
l_.str.1:                               ; @.str.1
	.asciz	"STALLION: cd1400 not responding, brd=%d panel=%d chip=%d\n"

	.comm	_PPR,8,3                        ; @PPR
	.comm	_PPR_SCALAR,8,3                 ; @PPR_SCALAR
	.no_dead_strip	_stl_cd1400panelinit
.subsections_via_symbols
