	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mgsl_bh_action
_mgsl_bh_action:                        ## @mgsl_bh_action
	.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
	movq	%rdi, %r15
	leaq	12(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%r15), %eax
	movq	_BH_RECEIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%eax, %edx
	jne	LBB0_3
## %bb.1:
	movq	_BH_TRANSMIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%eax, %edx
	jne	LBB0_3
## %bb.2:
	movq	_BH_STATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_4
LBB0_3:
	notl	%edx
	andl	%edx, %eax
	movl	%eax, (%r15)
	movl	(%rcx), %ebx
	testl	%ebx, %ebx
	jne	LBB0_5
LBB0_4:
	movq	$0, 4(%r15)
	xorl	%ebx, %ebx
LBB0_5:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BH_RECEIVE,4,2                 ## @BH_RECEIVE
	.comm	_BH_TRANSMIT,4,2                ## @BH_TRANSMIT
	.comm	_BH_STATUS,4,2                  ## @BH_STATUS
	.no_dead_strip	_mgsl_bh_action
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mgsl_bh_action
_mgsl_bh_action:                        ; @mgsl_bh_action
	.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	x20, x0
	add	x19, x0, #12
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _BH_RECEIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BH_RECEIVE@GOTPAGEOFF]
	ldr	w10, [x9]
	tst	w10, w8
	b.ne	LBB0_3
; %bb.1:
Lloh2:
	adrp	x9, _BH_TRANSMIT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BH_TRANSMIT@GOTPAGEOFF]
	ldr	w10, [x9]
	tst	w10, w8
	b.ne	LBB0_3
; %bb.2:
Lloh4:
	adrp	x9, _BH_STATUS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _BH_STATUS@GOTPAGEOFF]
	ldr	w10, [x9]
	tst	w10, w8
	b.eq	LBB0_4
LBB0_3:
	bic	w8, w8, w10
	str	w8, [x20]
	ldr	w21, [x9]
	cbnz	w21, LBB0_5
LBB0_4:
	mov	w21, #0
	stp	wzr, wzr, [x20, #4]
LBB0_5:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_BH_RECEIVE,4,2                 ; @BH_RECEIVE
	.comm	_BH_TRANSMIT,4,2                ; @BH_TRANSMIT
	.comm	_BH_STATUS,4,2                  ; @BH_STATUS
	.no_dead_strip	_mgsl_bh_action
.subsections_via_symbols
