	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_on_sem
_wait_on_sem:                           ## @wait_on_sem
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	cmpq	$0, (%rdi)
	movq	_LOOP_TIMEOUT@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	jne	LBB0_1
## %bb.2:
	movl	$0, %ebx
	testl	%eax, %eax
	jle	LBB0_6
## %bb.3:
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_udelay
	incl	%ebx
	cmpq	$0, (%r15)
	movl	(%r12), %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%eax, %ebx
	jl	LBB0_4
LBB0_6:
	cmpl	%eax, %ebx
	jne	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_pr_alert
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	xorl	%ebx, %ebx
	cmpl	%eax, %ebx
	je	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_LOOP_TIMEOUT,4,2               ## @LOOP_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Completion-Wait loop timed out\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_wait_on_sem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_on_sem
_wait_on_sem:                           ; @wait_on_sem
	.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
	ldr	x9, [x0]
Lloh0:
	adrp	x21, _LOOP_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _LOOP_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	x9, #0
	ccmp	w8, #1, #8, eq
	b.ge	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_4
LBB0_2:
	mov	x19, x0
	mov	w20, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_udelay
	add	w20, w20, #1
	ldr	x9, [x19]
	ldr	w8, [x21]
	cmp	x9, #0
	ccmp	w20, w8, #0, eq
	b.lt	LBB0_3
LBB0_4:
	cmp	w20, w8
	b.ne	LBB0_6
; %bb.5:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_alert
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	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 AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_LOOP_TIMEOUT,4,2               ; @LOOP_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Completion-Wait loop timed out\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_wait_on_sem
.subsections_via_symbols
