	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ql_sem_trylock
_ql_sem_trylock:                        ## @ql_sem_trylock
	.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, %edx
	movq	%rdi, %r14
	leal	-128(%rdx), %eax
	cmpl	$8, %eax
	jae	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.ql_sem_trylock(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	_SEM_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	_SEM@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	orl	%ebx, %edx
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ql_write32
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_ql_read32
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ebx, %ecx
	sete	%al
	jmp	LBB0_3
LBB0_1:
	movq	_probe@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_alert
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEM_SET,4,2                    ## @SEM_SET
	.comm	_SEM_XGMAC0_SHIFT,4,2           ## @SEM_XGMAC0_SHIFT
	.comm	_SEM_XGMAC1_SHIFT,4,2           ## @SEM_XGMAC1_SHIFT
	.comm	_SEM_ICB_SHIFT,4,2              ## @SEM_ICB_SHIFT
	.comm	_SEM_MAC_ADDR_SHIFT,4,2         ## @SEM_MAC_ADDR_SHIFT
	.comm	_SEM_FLASH_SHIFT,4,2            ## @SEM_FLASH_SHIFT
	.comm	_SEM_PROBE_SHIFT,4,2            ## @SEM_PROBE_SHIFT
	.comm	_SEM_RT_IDX_SHIFT,4,2           ## @SEM_RT_IDX_SHIFT
	.comm	_SEM_PROC_REG_SHIFT,4,2         ## @SEM_PROC_REG_SHIFT
	.comm	_probe,4,2                      ## @probe
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad Semaphore mask!.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SEM,4,2                        ## @SEM
	.no_dead_strip	_ql_sem_trylock
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.ql_sem_trylock
l_switch.table.ql_sem_trylock:
	.quad	_SEM_XGMAC1_SHIFT
	.quad	_SEM_XGMAC0_SHIFT
	.quad	_SEM_RT_IDX_SHIFT
	.quad	_SEM_PROC_REG_SHIFT
	.quad	_SEM_PROBE_SHIFT
	.quad	_SEM_MAC_ADDR_SHIFT
	.quad	_SEM_ICB_SHIFT
	.quad	_SEM_FLASH_SHIFT

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ql_sem_trylock
_ql_sem_trylock:                        ; @ql_sem_trylock
	.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, x0
	sub	w8, w1, #128
	cmp	w8, #8
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.ql_sem_trylock@PAGE
Lloh1:
	add	x9, x9, l_switch.table.ql_sem_trylock@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
Lloh2:
	adrp	x9, _SEM_SET@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SEM_SET@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	ldr	w8, [x8]
	lsl	w20, w9, w8
Lloh5:
	adrp	x21, _SEM@GOTPAGE
Lloh6:
	ldr	x21, [x21, _SEM@GOTPAGEOFF]
	ldr	w8, [x21]
	orr	w2, w20, w1
	mov	x0, x19
	mov	x1, x8
	bl	_ql_write32
	ldr	w1, [x21]
	mov	x0, x19
	bl	_ql_read32
	tst	w0, w20
	cset	w0, eq
	b	LBB0_3
LBB0_2:
Lloh7:
	adrp	x8, _probe@GOTPAGE
Lloh8:
	ldr	x8, [x8, _probe@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh10:
	adrp	x3, l_.str@PAGE
Lloh11:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_alert
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SEM_SET,4,2                    ; @SEM_SET
	.comm	_SEM_XGMAC0_SHIFT,4,2           ; @SEM_XGMAC0_SHIFT
	.comm	_SEM_XGMAC1_SHIFT,4,2           ; @SEM_XGMAC1_SHIFT
	.comm	_SEM_ICB_SHIFT,4,2              ; @SEM_ICB_SHIFT
	.comm	_SEM_MAC_ADDR_SHIFT,4,2         ; @SEM_MAC_ADDR_SHIFT
	.comm	_SEM_FLASH_SHIFT,4,2            ; @SEM_FLASH_SHIFT
	.comm	_SEM_PROBE_SHIFT,4,2            ; @SEM_PROBE_SHIFT
	.comm	_SEM_RT_IDX_SHIFT,4,2           ; @SEM_RT_IDX_SHIFT
	.comm	_SEM_PROC_REG_SHIFT,4,2         ; @SEM_PROC_REG_SHIFT
	.comm	_probe,4,2                      ; @probe
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad Semaphore mask!.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SEM,4,2                        ; @SEM
	.no_dead_strip	_ql_sem_trylock
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.ql_sem_trylock
l_switch.table.ql_sem_trylock:
	.quad	_SEM_XGMAC1_SHIFT
	.quad	_SEM_XGMAC0_SHIFT
	.quad	_SEM_RT_IDX_SHIFT
	.quad	_SEM_PROC_REG_SHIFT
	.quad	_SEM_PROBE_SHIFT
	.quad	_SEM_MAC_ADDR_SHIFT
	.quad	_SEM_ICB_SHIFT
	.quad	_SEM_FLASH_SHIFT

.subsections_via_symbols
