	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ice_acquire_global_cfg_lock
_ice_acquire_global_cfg_lock:           ## @ice_acquire_global_cfg_lock
	.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
	movl	%esi, %edx
	movq	%rdi, %r14
	movq	_ICE_GLOBAL_CFG_LOCK_RES_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ICE_GLOBAL_CFG_LOCK_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_ice_acquire_res
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_ICE_ERR_AQ_NO_WORK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_4
## %bb.3:
	movq	_ICE_DBG_PKG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_ice_debug
	jmp	LBB0_4
LBB0_1:
	movq	_ice_global_cfg_lock_sw@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ICE_GLOBAL_CFG_LOCK_RES_ID,4,2 ## @ICE_GLOBAL_CFG_LOCK_RES_ID
	.comm	_ICE_GLOBAL_CFG_LOCK_TIMEOUT,4,2 ## @ICE_GLOBAL_CFG_LOCK_TIMEOUT
	.comm	_ice_global_cfg_lock_sw,4,2     ## @ice_global_cfg_lock_sw
	.comm	_ICE_ERR_AQ_NO_WORK,4,2         ## @ICE_ERR_AQ_NO_WORK
	.comm	_ICE_DBG_PKG,4,2                ## @ICE_DBG_PKG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Global config lock: No work to do\n"

	.no_dead_strip	_ice_acquire_global_cfg_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ice_acquire_global_cfg_lock
_ice_acquire_global_cfg_lock:           ; @ice_acquire_global_cfg_lock
	.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	x2, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _ICE_GLOBAL_CFG_LOCK_RES_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ICE_GLOBAL_CFG_LOCK_RES_ID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _ICE_GLOBAL_CFG_LOCK_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ICE_GLOBAL_CFG_LOCK_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	bl	_ice_acquire_res
	mov	x19, x0
	cbz	w0, LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _ICE_ERR_AQ_NO_WORK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ICE_ERR_AQ_NO_WORK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_4
; %bb.2:
Lloh9:
	adrp	x8, _ICE_DBG_PKG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ICE_DBG_PKG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_ice_debug
	b	LBB0_4
LBB0_3:
Lloh14:
	adrp	x0, _ice_global_cfg_lock_sw@GOTPAGE
Lloh15:
	ldr	x0, [x0, _ice_global_cfg_lock_sw@GOTPAGEOFF]
	bl	_mutex_lock
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ICE_GLOBAL_CFG_LOCK_RES_ID,4,2 ; @ICE_GLOBAL_CFG_LOCK_RES_ID
	.comm	_ICE_GLOBAL_CFG_LOCK_TIMEOUT,4,2 ; @ICE_GLOBAL_CFG_LOCK_TIMEOUT
	.comm	_ice_global_cfg_lock_sw,4,2     ; @ice_global_cfg_lock_sw
	.comm	_ICE_ERR_AQ_NO_WORK,4,2         ; @ICE_ERR_AQ_NO_WORK
	.comm	_ICE_DBG_PKG,4,2                ; @ICE_DBG_PKG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Global config lock: No work to do\n"

	.no_dead_strip	_ice_acquire_global_cfg_lock
.subsections_via_symbols
