	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_6120_ib_updown
_qib_6120_ib_updown:                    ## @qib_6120_ib_updown
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	leaq	8(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_QIBL_IB_FORCE_NOTIFY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 12(%r15)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	(%r15), %rdi
	movq	(%rdi), %rax
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.1:
	cmpl	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movl	$0, (%rax)
	movq	_cr_ibsymbolerr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_read_6120_creg32
	movq	(%r15), %rdi
	movq	(%rdi), %rcx
	subl	8(%rcx), %eax
	addl	%eax, 36(%rcx)
	movq	_cr_iblinkerrrecov@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_read_6120_creg32
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	subl	16(%rcx), %eax
	addl	%eax, 32(%rcx)
LBB0_3:
	movq	%r15, %rdi
	callq	_qib_hol_init
	jmp	LBB0_7
LBB0_4:
	movq	$0, 24(%rax)
	cmpl	$0, (%rax)
	jne	LBB0_6
## %bb.5:
	movl	$1, (%rax)
	movq	_cr_ibsymbolerr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_read_6120_creg32
	movq	(%r15), %rdi
	movq	(%rdi), %rcx
	movq	%rax, 8(%rcx)
	movq	_cr_iblinkerrrecov@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_read_6120_creg32
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 16(%rcx)
LBB0_6:
	movq	%r15, %rdi
	callq	_qib_hol_down
LBB0_7:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_qib_6120_setup_setextled
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QIBL_IB_FORCE_NOTIFY,4,2       ## @QIBL_IB_FORCE_NOTIFY
	.comm	_cr_ibsymbolerr,4,2             ## @cr_ibsymbolerr
	.comm	_cr_iblinkerrrecov,4,2          ## @cr_iblinkerrrecov
	.no_dead_strip	_qib_6120_ib_updown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_6120_ib_updown
_qib_6120_ib_updown:                    ; @qib_6120_ib_updown
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	add	x21, x0, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _QIBL_IB_FORCE_NOTIFY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QIBL_IB_FORCE_NOTIFY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x20, #12]
	bic	w8, w9, w8
	str	w8, [x20, #12]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	x0, [x20]
	ldr	x8, [x0]
	cbz	w19, LBB0_4
; %bb.1:
	ldr	w9, [x8]
	cbz	w9, LBB0_3
; %bb.2:
	str	wzr, [x8]
Lloh3:
	adrp	x8, _cr_ibsymbolerr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cr_ibsymbolerr@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_read_6120_creg32
	ldr	x8, [x20]
	ldr	x9, [x8]
	ldr	w10, [x9, #8]
	ldr	w11, [x9, #36]
	sub	w10, w0, w10
	add	w10, w11, w10
	str	w10, [x9, #36]
Lloh6:
	adrp	x9, _cr_iblinkerrrecov@GOTPAGE
Lloh7:
	ldr	x9, [x9, _cr_iblinkerrrecov@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	mov	x0, x8
	bl	_read_6120_creg32
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w9, [x8, #16]
	ldr	w10, [x8, #32]
	sub	w9, w0, w9
	add	w9, w10, w9
	str	w9, [x8, #32]
LBB0_3:
	mov	x0, x20
	bl	_qib_hol_init
	b	LBB0_7
LBB0_4:
	str	xzr, [x8, #24]
	ldr	w9, [x8]
	cbnz	w9, LBB0_6
; %bb.5:
	mov	w9, #1
	str	w9, [x8]
Lloh9:
	adrp	x8, _cr_ibsymbolerr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _cr_ibsymbolerr@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_read_6120_creg32
	ldr	x8, [x20]
	ldr	x9, [x8]
	str	x0, [x9, #8]
Lloh12:
	adrp	x9, _cr_iblinkerrrecov@GOTPAGE
Lloh13:
	ldr	x9, [x9, _cr_iblinkerrrecov@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x9]
	mov	x0, x8
	bl	_read_6120_creg32
	ldr	x8, [x20]
	ldr	x8, [x8]
	str	x0, [x8, #16]
LBB0_6:
	mov	x0, x20
	bl	_qib_hol_down
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	bl	_qib_6120_setup_setextled
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_QIBL_IB_FORCE_NOTIFY,4,2       ; @QIBL_IB_FORCE_NOTIFY
	.comm	_cr_ibsymbolerr,4,2             ; @cr_ibsymbolerr
	.comm	_cr_iblinkerrrecov,4,2          ; @cr_iblinkerrrecov
	.no_dead_strip	_qib_6120_ib_updown
.subsections_via_symbols
