	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_resync_ibepb
_qib_resync_ibepb:                      ## @qib_resync_ibepb
	.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	_IBSD_RESYNC_TRIES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_1
## %bb.2:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	leaq	L_.str(%rip), %rsi
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_qib_dev_err
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r15d
	movq	_IBSD_RESYNC_TRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$2, %eax
	cmpl	%eax, %r15d
	jge	LBB0_22
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_IB_PGUDP
	movl	%eax, %r14d
	movq	_IB_7220_SERDES@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_qib_sd7220_reg_mod
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%r15d, %r15d
	je	LBB0_7
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	$165, %r13d
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	movl	$255, %r8d
	callq	_qib_sd7220_reg_mod
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_qib_sd7220_reg_mod
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%r13d, %eax
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_IB_CMUDONE
	movq	_IB_7220_SERDES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_qib_sd7220_reg_mod
	testl	%eax, %eax
	js	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %edx
	andl	$112, %edx
	movl	%ebx, %ecx
	shll	$4, %ecx
	orl	$64, %ecx
	cmpl	%ecx, %edx
	jne	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r13d
	incl	%ebx
	cmpl	$4, %ebx
	jne	LBB0_21
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$85, %r13d
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$240, %r13d
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_qib_dev_err
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r13d
	movq	%r12, %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_5
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r13d
	movq	%r12, %rdi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_5
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r13d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_5
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r13d
	movq	%r14, %rdi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_qib_dev_err
	jmp	LBB0_21
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.6(%rip), %rsi
	movl	%eax, %r13d
	movl	%eax, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_qib_dev_err
	jmp	LBB0_21
LBB0_1:
	movl	$-1, %r13d
LBB0_22:
	movl	%r13d, %eax
	sarl	$31, %eax
	andl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IBSD_RESYNC_TRIES,4,2          ## @IBSD_RESYNC_TRIES
	.comm	_IB_7220_SERDES,4,2             ## @IB_7220_SERDES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed read in resync\n"

L_.str.1:                               ## @.str.1
	.asciz	"unexpected pattern in resync\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed write in resync\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed re-read in resync\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed compare1 in resync\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed CMUDONE rd in resync\n"

L_.str.6:                               ## @.str.6
	.asciz	"Bad CMUDONE value %02X, chn %d\n"

	.no_dead_strip	_qib_resync_ibepb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_resync_ibepb
_qib_resync_ibepb:                      ; @qib_resync_ibepb
	.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
Lloh0:
	adrp	x22, _IBSD_RESYNC_TRIES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IBSD_RESYNC_TRIES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.1:
	mov	x19, x0
	mov	w20, #0
	mov	w27, #0
Lloh2:
	adrp	x24, _IB_7220_SERDES@GOTPAGE
Lloh3:
	ldr	x24, [x24, _IB_7220_SERDES@GOTPAGEOFF]
Lloh4:
	adrp	x21, l_.str@PAGE
Lloh5:
	add	x21, x21, l_.str@PAGEOFF
	mov	w23, #165
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_IB_PGUDP
	mov	x26, x0
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x26
	mov	w3, #0
	mov	w4, #0
	bl	_qib_sd7220_reg_mod
	mov	x28, x0
	tbnz	w0, #31, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cbz	w27, LBB0_11
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	eor	w25, w28, w23
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x26
	mov	x3, x25
	mov	w4, #255
	bl	_qib_sd7220_reg_mod
	tbnz	w0, #31, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x26
	mov	w3, #0
	mov	w4, #0
	bl	_qib_sd7220_reg_mod
	mov	x28, x0
	tbnz	w0, #31, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w28, w25
	b.ne	LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_IB_CMUDONE
	mov	x2, x0
	ldr	w1, [x24]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #0
	bl	_qib_sd7220_reg_mod
	mov	x28, x0
	tbnz	w0, #31, LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	and	w8, w28, #0x70
	lsl	w9, w20, #4
	orr	w9, w9, #0x40
	cmp	w8, w9
	b.ne	LBB0_18
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w20, w20, #1
	cmp	w20, #4
	b.ne	LBB0_20
	b	LBB0_22
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	x1, x21
	b	LBB0_19
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w28, #85
	b.eq	LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	cmp	w28, #240
	b.eq	LBB0_4
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_qib_dev_err
	b	LBB0_4
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x28, x0
	mov	x0, x19
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_19
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_19
LBB0_16:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
Lloh14:
	adrp	x1, l_.str.5@PAGE
Lloh15:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_2 Depth=1
	stp	x28, x20, [sp]
	mov	x0, x19
Lloh16:
	adrp	x1, l_.str.6@PAGE
Lloh17:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_19:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_qib_dev_err
LBB0_20:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w27, w27, #1
	ldr	w8, [x22]
	cmp	w27, w8, lsl #2
	b.lt	LBB0_2
	b	LBB0_22
LBB0_21:
	mov	w28, #-1
LBB0_22:
	cmp	w28, #0
	csel	w0, w28, wzr, lt
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IBSD_RESYNC_TRIES,4,2          ; @IBSD_RESYNC_TRIES
	.comm	_IB_7220_SERDES,4,2             ; @IB_7220_SERDES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed read in resync\n"

l_.str.1:                               ; @.str.1
	.asciz	"unexpected pattern in resync\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed write in resync\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed re-read in resync\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed compare1 in resync\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed CMUDONE rd in resync\n"

l_.str.6:                               ; @.str.6
	.asciz	"Bad CMUDONE value %02X, chn %d\n"

	.no_dead_strip	_qib_resync_ibepb
.subsections_via_symbols
