	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s2io_bist_test
_s2io_bist_test:                        ## @s2io_bist_test
	.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, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movl	$0, -44(%rbp)
	movl	(%rdi), %edi
	movq	_PCI_BIST@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-44(%rbp), %r15
	movq	%r15, %rdx
	callq	_pci_read_config_byte
	movq	_PCI_BIST_START@GOTPCREL(%rip), %r13
	movl	-44(%rbp), %edx
	orl	(%r13), %edx
	movl	%edx, -44(%rbp)
	movl	(%rbx), %edi
	movl	(%r12), %esi
	callq	_pci_write_config_word
	movl	$20, %r14d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	movl	(%r12), %esi
	movq	%r15, %rdx
	callq	_pci_read_config_byte
	movl	-44(%rbp), %eax
	testl	%eax, (%r13)
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$100, %edi
	callq	_msleep
	decl	%r14d
	jne	LBB0_1
## %bb.4:
	movl	$-1, %eax
	jmp	LBB0_5
LBB0_2:
	movq	_PCI_BIST_CODE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%eax, %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_BIST,4,2                   ## @PCI_BIST
	.comm	_PCI_BIST_START,4,2             ## @PCI_BIST_START
	.comm	_PCI_BIST_CODE_MASK,4,2         ## @PCI_BIST_CODE_MASK
	.no_dead_strip	_s2io_bist_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s2io_bist_test
_s2io_bist_test:                        ; @s2io_bist_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	str	wzr, [sp, #12]
	ldr	w0, [x0]
Lloh0:
	adrp	x21, _PCI_BIST@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PCI_BIST@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_pci_read_config_byte
Lloh2:
	adrp	x22, _PCI_BIST_START@GOTPAGE
Lloh3:
	ldr	x22, [x22, _PCI_BIST_START@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w0, [x20]
	ldr	w1, [x21]
	bl	_pci_write_config_word
	mov	w23, #20
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_pci_read_config_byte
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #100
	bl	_msleep
	subs	w23, w23, #1
	b.ne	LBB0_1
; %bb.3:
	mov	w0, #-1
	b	LBB0_5
LBB0_4:
	mov	w0, #0
Lloh4:
	adrp	x9, _PCI_BIST_CODE_MASK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PCI_BIST_CODE_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	and	w8, w9, w8
	str	w8, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_BIST,4,2                   ; @PCI_BIST
	.comm	_PCI_BIST_START,4,2             ; @PCI_BIST_START
	.comm	_PCI_BIST_CODE_MASK,4,2         ; @PCI_BIST_CODE_MASK
	.no_dead_strip	_s2io_bist_test
.subsections_via_symbols
