	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stl_sc26198panelinit
_stl_sc26198panelinit:                  ## @stl_sc26198panelinit
	.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	%rsi, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_pr_debug
	movl	(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_BRDENABLE
	movl	4(%rbx), %eax
	addl	$4, %eax
	movq	_SC26198_PORTS@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, %r12d
	movq	(%r14), %rax
	movq	_BRD_ECHPCI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	movq	8(%r14), %rsi
	callq	_outb
LBB0_2:
	testl	%r12d, %r12d
	jle	LBB0_3
## %bb.4:
	xorl	%r15d, %r15d
	movq	_XP_ADDR@GOTPCREL(%rip), %r13
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r14d, %r14d
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	btsl	%r14d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_GCCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r13), %rsi
	addq	%r12, %rsi
	addq	%r15, %rsi
	callq	_outb
	movq	_GCCR_IVRTYPCHANACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XP_DATA@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	%r12, %rsi
	addq	%r15, %rsi
	callq	_outb
	movq	_WDTRCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r13), %rsi
	addq	%r12, %rsi
	addq	%r15, %rsi
	callq	_outb
	addq	(%rbx), %r12
	addq	%r15, %r12
	movl	$255, %edi
	movq	%r12, %rsi
	callq	_outb
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	incl	%r14d
	addq	$4, %r15
	cmpl	%r14d, %r12d
	je	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movslq	8(%rbx), %r12
	movq	_SCCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r13), %rsi
	addq	%r12, %rsi
	addq	%r15, %rsi
	callq	_outb
	movq	_CR_RESETALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XP_DATA@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	%r12, %rsi
	addq	%r15, %rsi
	callq	_outb
	movq	_TSTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r13), %rsi
	addq	%r12, %rsi
	addq	%r15, %rsi
	callq	_outb
	movq	(%rbx), %rdi
	addq	%r12, %rdi
	addq	%r15, %rdi
	callq	_inb
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	12(%rbx), %esi
	movl	16(%rbx), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %ecx
	callq	_printk
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_8
LBB0_3:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_9:
	movl	12(%rbx), %edi
	callq	_BRDDISABLE
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %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_sc26198panelinit(brdp=%p,panelp=%p)\n"

	.comm	_SC26198_PORTS,4,2              ## @SC26198_PORTS
	.comm	_BRD_ECHPCI,8,3                 ## @BRD_ECHPCI
	.comm	_SCCR,4,2                       ## @SCCR
	.comm	_XP_ADDR,8,3                    ## @XP_ADDR
	.comm	_CR_RESETALL,4,2                ## @CR_RESETALL
	.comm	_XP_DATA,8,3                    ## @XP_DATA
	.comm	_TSTR,4,2                       ## @TSTR
L_.str.1:                               ## @.str.1
	.asciz	"STALLION: sc26198 not responding, brd=%d panel=%d chip=%d\n"

	.comm	_GCCR,4,2                       ## @GCCR
	.comm	_GCCR_IVRTYPCHANACK,4,2         ## @GCCR_IVRTYPCHANACK
	.comm	_WDTRCR,4,2                     ## @WDTRCR
	.no_dead_strip	_stl_sc26198panelinit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stl_sc26198panelinit
_stl_sc26198panelinit:                  ; @stl_sc26198panelinit
	.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
	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
	ldr	w0, [x19, #12]
	ldr	w1, [x19]
	bl	_BRDENABLE
	ldr	w8, [x19, #4]
	add	w8, w8, #4
Lloh2:
	adrp	x9, _SC26198_PORTS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SC26198_PORTS@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	sdiv	w23, w8, w9
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _BRD_ECHPCI@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BRD_ECHPCI@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19]
	ldr	x1, [x20, #8]
	bl	_outb
LBB0_2:
	cmp	w23, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x24, #0
	mov	w20, #0
	mov	w21, #0
Lloh8:
	adrp	x26, _XP_ADDR@GOTPAGE
Lloh9:
	ldr	x26, [x26, _XP_ADDR@GOTPAGEOFF]
Lloh10:
	adrp	x27, _CR_RESETALL@GOTPAGE
Lloh11:
	ldr	x27, [x27, _CR_RESETALL@GOTPAGEOFF]
Lloh12:
	adrp	x28, _XP_DATA@GOTPAGE
Lloh13:
	ldr	x28, [x28, _XP_DATA@GOTPAGEOFF]
Lloh14:
	adrp	x22, _TSTR@GOTPAGE
Lloh15:
	ldr	x22, [x22, _TSTR@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w8, #1
	lsl	w8, w8, w21
	orr	w20, w20, w8
Lloh16:
	adrp	x8, _GCCR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GCCR@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	x8, [x26]
	add	x8, x8, x25
	add	x1, x24, x8
	bl	_outb
Lloh19:
	adrp	x8, _GCCR_IVRTYPCHANACK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _GCCR_IVRTYPCHANACK@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	ldr	x8, [x28]
	add	x8, x8, x25
	add	x1, x24, x8
	bl	_outb
Lloh22:
	adrp	x8, _WDTRCR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _WDTRCR@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	x8, [x26]
	add	x8, x8, x25
	add	x1, x24, x8
	bl	_outb
	ldr	x8, [x28]
	add	x8, x8, x25
	add	x1, x24, x8
	mov	w0, #255
	bl	_outb
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w21, w21, #1
	add	x24, x24, #4
	cmp	w23, w21
	b.eq	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x25, [x19, #8]
Lloh25:
	adrp	x8, _SCCR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SCCR@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	ldr	x8, [x26]
	add	x8, x8, x25
	add	x1, x24, x8
	bl	_outb
	ldr	w0, [x27]
	ldr	x8, [x28]
	add	x8, x8, x25
	add	x1, x24, x8
	bl	_outb
	ldr	w0, [x22]
	ldr	x8, [x26]
	add	x8, x8, x25
	add	x1, x24, x8
	bl	_outb
	ldr	x8, [x28]
	add	x8, x8, x25
	add	x0, x24, x8
	bl	_inb
	cbz	x0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldp	w1, w2, [x19, #12]
Lloh28:
	adrp	x0, l_.str.1@PAGE
Lloh29:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x3, x21
	bl	_printk
	b	LBB0_5
LBB0_8:
	mov	w20, #0
LBB0_9:
	ldr	w0, [x19, #12]
	bl	_BRDDISABLE
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stl_sc26198panelinit(brdp=%p,panelp=%p)\n"

	.comm	_SC26198_PORTS,4,2              ; @SC26198_PORTS
	.comm	_BRD_ECHPCI,8,3                 ; @BRD_ECHPCI
	.comm	_SCCR,4,2                       ; @SCCR
	.comm	_XP_ADDR,8,3                    ; @XP_ADDR
	.comm	_CR_RESETALL,4,2                ; @CR_RESETALL
	.comm	_XP_DATA,8,3                    ; @XP_DATA
	.comm	_TSTR,4,2                       ; @TSTR
l_.str.1:                               ; @.str.1
	.asciz	"STALLION: sc26198 not responding, brd=%d panel=%d chip=%d\n"

	.comm	_GCCR,4,2                       ; @GCCR
	.comm	_GCCR_IVRTYPCHANACK,4,2         ; @GCCR_IVRTYPCHANACK
	.comm	_WDTRCR,4,2                     ; @WDTRCR
	.no_dead_strip	_stl_sc26198panelinit
.subsections_via_symbols
