	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_7322_ibspeed_fast
_set_7322_ibspeed_fast:                 ## @set_7322_ibspeed_fast
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r14
	movq	8(%rdi), %r8
	movl	(%r8), %edi
	movq	_IBA7322_IBC_SPEED_MASK@GOTPCREL(%rip), %rax
	movq	_IBA7322_IBC_IBTA_1_2_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_IBA7322_IBC_MAX_SPEED_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	movl	(%rax), %eax
	orl	%edx, %eax
	notl	%eax
	andl	%edi, %eax
	leal	-1(%rsi), %ebx
	testl	%ebx, %esi
	jne	LBB0_1
## %bb.2:
	movq	_QIB_IB_QDR@GOTPCREL(%rip), %rdx
	cmpl	%esi, (%rdx)
	jne	LBB0_4
## %bb.3:
	movq	_IBA7322_IBC_SPEED_QDR@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, %edx
	jmp	LBB0_8
LBB0_1:
	movq	_IBA7322_IBC_SPEED_LSB@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%esi, %edx
	jmp	LBB0_8
LBB0_4:
	movq	_QIB_IB_DDR@GOTPCREL(%rip), %rcx
	cmpl	%esi, (%rcx)
	jne	LBB0_5
## %bb.6:
	movq	_IBA7322_IBC_SPEED_DDR@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_5:
	movq	_IBA7322_IBC_SPEED_SDR@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %edx
LBB0_8:
	orl	%eax, %edx
	cmpl	%edi, %edx
	jne	LBB0_10
## %bb.9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	movl	%edx, (%r8)
	movq	_krp_ibcctrl_b@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_qib_write_kreg_port
	movl	(%r14), %edi
	movq	_kr_scratch@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_qib_write_kreg                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IBA7322_IBC_SPEED_MASK,4,2     ## @IBA7322_IBC_SPEED_MASK
	.comm	_IBA7322_IBC_IBTA_1_2_MASK,4,2  ## @IBA7322_IBC_IBTA_1_2_MASK
	.comm	_IBA7322_IBC_MAX_SPEED_MASK,4,2 ## @IBA7322_IBC_MAX_SPEED_MASK
	.comm	_IBA7322_IBC_SPEED_LSB,4,2      ## @IBA7322_IBC_SPEED_LSB
	.comm	_QIB_IB_QDR,4,2                 ## @QIB_IB_QDR
	.comm	_IBA7322_IBC_SPEED_QDR,4,2      ## @IBA7322_IBC_SPEED_QDR
	.comm	_QIB_IB_DDR,4,2                 ## @QIB_IB_DDR
	.comm	_IBA7322_IBC_SPEED_DDR,4,2      ## @IBA7322_IBC_SPEED_DDR
	.comm	_IBA7322_IBC_SPEED_SDR,4,2      ## @IBA7322_IBC_SPEED_SDR
	.comm	_krp_ibcctrl_b,4,2              ## @krp_ibcctrl_b
	.comm	_kr_scratch,4,2                 ## @kr_scratch
	.no_dead_strip	_set_7322_ibspeed_fast
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_7322_ibspeed_fast
_set_7322_ibspeed_fast:                 ; @set_7322_ibspeed_fast
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	w9, [x8]
Lloh0:
	adrp	x10, _IBA7322_IBC_SPEED_MASK@GOTPAGE
Lloh1:
	ldr	x10, [x10, _IBA7322_IBC_SPEED_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
Lloh3:
	adrp	x11, _IBA7322_IBC_IBTA_1_2_MASK@GOTPAGE
Lloh4:
	ldr	x11, [x11, _IBA7322_IBC_IBTA_1_2_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
Lloh6:
	adrp	x12, _IBA7322_IBC_MAX_SPEED_MASK@GOTPAGE
Lloh7:
	ldr	x12, [x12, _IBA7322_IBC_MAX_SPEED_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w12, [x12]
	orr	w12, w12, w11
	orr	w10, w12, w10
	bic	w10, w9, w10
	sub	w13, w1, #1
	tst	w1, w13
	b.ne	LBB0_3
; %bb.1:
Lloh9:
	adrp	x12, _QIB_IB_QDR@GOTPAGE
Lloh10:
	ldr	x12, [x12, _QIB_IB_QDR@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	cmp	w12, w1
	b.ne	LBB0_4
; %bb.2:
Lloh12:
	adrp	x12, _IBA7322_IBC_SPEED_QDR@GOTPAGE
Lloh13:
	ldr	x12, [x12, _IBA7322_IBC_SPEED_QDR@GOTPAGEOFF]
Lloh14:
	ldr	w12, [x12]
	orr	w11, w12, w11
	b	LBB0_5
LBB0_3:
Lloh15:
	adrp	x11, _IBA7322_IBC_SPEED_LSB@GOTPAGE
Lloh16:
	ldr	x11, [x11, _IBA7322_IBC_SPEED_LSB@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	lsl	w11, w1, w11
	orr	w11, w12, w11
	b	LBB0_5
LBB0_4:
Lloh18:
	adrp	x11, _QIB_IB_DDR@GOTPAGE
Lloh19:
	ldr	x11, [x11, _QIB_IB_DDR@GOTPAGEOFF]
Lloh20:
	adrp	x12, _IBA7322_IBC_SPEED_DDR@GOTPAGE
Lloh21:
	ldr	x12, [x12, _IBA7322_IBC_SPEED_DDR@GOTPAGEOFF]
Lloh22:
	ldr	w11, [x11]
Lloh23:
	adrp	x13, _IBA7322_IBC_SPEED_SDR@GOTPAGE
Lloh24:
	ldr	x13, [x13, _IBA7322_IBC_SPEED_SDR@GOTPAGEOFF]
	cmp	w11, w1
	csel	x11, x12, x13, eq
	ldr	w11, [x11]
LBB0_5:
	orr	w2, w11, w10
	cmp	w2, w9
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	str	w2, [x8]
Lloh25:
	adrp	x8, _krp_ibcctrl_b@GOTPAGE
Lloh26:
	ldr	x8, [x8, _krp_ibcctrl_b@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qib_write_kreg_port
	ldr	w0, [x19]
Lloh28:
	adrp	x8, _kr_scratch@GOTPAGE
Lloh29:
	ldr	x8, [x8, _kr_scratch@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	w2, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_qib_write_kreg
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_IBA7322_IBC_SPEED_MASK,4,2     ; @IBA7322_IBC_SPEED_MASK
	.comm	_IBA7322_IBC_IBTA_1_2_MASK,4,2  ; @IBA7322_IBC_IBTA_1_2_MASK
	.comm	_IBA7322_IBC_MAX_SPEED_MASK,4,2 ; @IBA7322_IBC_MAX_SPEED_MASK
	.comm	_IBA7322_IBC_SPEED_LSB,4,2      ; @IBA7322_IBC_SPEED_LSB
	.comm	_QIB_IB_QDR,4,2                 ; @QIB_IB_QDR
	.comm	_IBA7322_IBC_SPEED_QDR,4,2      ; @IBA7322_IBC_SPEED_QDR
	.comm	_QIB_IB_DDR,4,2                 ; @QIB_IB_DDR
	.comm	_IBA7322_IBC_SPEED_DDR,4,2      ; @IBA7322_IBC_SPEED_DDR
	.comm	_IBA7322_IBC_SPEED_SDR,4,2      ; @IBA7322_IBC_SPEED_SDR
	.comm	_krp_ibcctrl_b,4,2              ; @krp_ibcctrl_b
	.comm	_kr_scratch,4,2                 ; @kr_scratch
	.no_dead_strip	_set_7322_ibspeed_fast
.subsections_via_symbols
