	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_futex_wait                     ## -- Begin function futex_wait
	.p2align	4, 0x90
_futex_wait:                            ## @futex_wait
	.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
	callq	_futex_get
	movq	%rax, %rbx
	leaq	-32(%rbp), %rsi
	movq	%rax, %rdi
	callq	_futex_load
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	__EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	cmpq	%r15, -32(%rbp)
	jne	LBB0_4
## %bb.3:
	movq	_futex_lock@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_wait_for
	movl	%eax, %r14d
	jmp	LBB0_6
LBB0_4:
	movq	__EAGAIN@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %r14d
LBB0_6:
	movq	%rbx, %rdi
	callq	_futex_put
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_STRACE
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__EFAULT,4,2                    ## @_EFAULT
	.comm	__EAGAIN,4,2                    ## @_EAGAIN
	.comm	_futex_lock,4,2                 ## @futex_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d end futex(FUTEX_WAIT)"

	.comm	_current,8,3                    ## @current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_futex_wait                     ; -- Begin function futex_wait
	.p2align	2
_futex_wait:                            ; @futex_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x21, x1
	bl	_futex_get
	mov	x19, x0
	add	x1, sp, #8
	bl	_futex_load
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, __EFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	ldr	x8, [sp, #8]
	cmp	x8, x21
	b.ne	LBB0_4
; %bb.3:
Lloh2:
	adrp	x1, _futex_lock@GOTPAGE
Lloh3:
	ldr	x1, [x1, _futex_lock@GOTPAGEOFF]
	mov	x0, x19
	mov	x2, x20
	bl	_wait_for
	mov	x20, x0
	b	LBB0_6
LBB0_4:
Lloh4:
	adrp	x8, __EAGAIN@GOTPAGE
Lloh5:
	ldr	x8, [x8, __EAGAIN@GOTPAGEOFF]
LBB0_5:
	ldr	w20, [x8]
LBB0_6:
	mov	x0, x19
	bl	_futex_put
Lloh6:
	adrp	x8, _current@GOTPAGE
Lloh7:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w1, [x8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_STRACE
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	__EFAULT,4,2                    ; @_EFAULT
	.comm	__EAGAIN,4,2                    ; @_EAGAIN
	.comm	_futex_lock,4,2                 ; @futex_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d end futex(FUTEX_WAIT)"

	.comm	_current,8,3                    ; @current
.subsections_via_symbols
