	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stm_lookup_protocol            ## -- Begin function stm_lookup_protocol
	.p2align	4, 0x90
_stm_lookup_protocol:                   ## @stm_lookup_protocol
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_stm_pdrv_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	___stm_lookup_protocol
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.2:
	callq	_stm_get_protocol
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	8(%rbx), %rax
	movq	%rax, (%r15)
	movq	(%rbx), %rax
	movq	%rax, (%r14)
LBB0_4:
	movq	_stm_pdrv_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	xorl	%ecx, %ecx
	testq	%rbx, %rbx
	cmovnel	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stm_pdrv_mutex,4,2             ## @stm_pdrv_mutex
	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stm_lookup_protocol            ; -- Begin function stm_lookup_protocol
	.p2align	2
_stm_lookup_protocol:                   ; @stm_lookup_protocol
	.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, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x0, _stm_pdrv_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _stm_pdrv_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x20
	bl	___stm_lookup_protocol
	mov	x20, x0
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_4
; %bb.2:
	bl	_stm_get_protocol
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x20, #8]
	str	x8, [x21]
	ldr	x8, [x20]
	str	x8, [x19]
LBB0_4:
Lloh2:
	adrp	x0, _stm_pdrv_mutex@GOTPAGE
Lloh3:
	ldr	x0, [x0, _stm_pdrv_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh4:
	adrp	x8, _ENOENT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	x20, #0
	csneg	w0, wzr, w8, ne
	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 AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_stm_pdrv_mutex,4,2             ; @stm_pdrv_mutex
	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
