	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SDL_CondWaitTimeout            ## -- Begin function SDL_CondWaitTimeout
	.p2align	4, 0x90
_SDL_CondWaitTimeout:                   ## @SDL_CondWaitTimeout
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_assert
	movq	%r14, %rdi
	callq	_assert
	movl	$-1, %eax
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.1:
	testq	%r14, %r14
	je	LBB0_10
## %bb.2:
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	callq	_gettimeofday
	movslq	%r15d, %rcx
	imulq	$274877907, %rcx, %rax          ## imm = 0x10624DD3
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$38, %rax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	imull	$1000, %edx, %edx               ## imm = 0x3E8
	subl	%edx, %ecx
	imull	$1000, %ecx, %ecx               ## imm = 0x3E8
	addl	-64(%rbp), %ecx
	movq	%rax, -40(%rbp)
	imull	$1000, %ecx, %ecx               ## imm = 0x3E8
	movl	%ecx, -48(%rbp)
	cmpl	$1000000001, %ecx               ## imm = 0x3B9ACA01
	jl	LBB0_4
## %bb.3:
	incq	%rax
	movq	%rax, -40(%rbp)
	addl	$-1000000000, %ecx              ## imm = 0xC4653600
	movl	%ecx, -48(%rbp)
LBB0_4:
	leaq	-48(%rbp), %r15
	movq	_EINTR@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_pthread_cond_timedwait
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %ecx
	cmpl	(%r12), %eax
	je	LBB0_5
## %bb.8:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpl	(%rdx), %ecx
	jne	LBB0_10
## %bb.9:
	movq	_SDL_MUTEX_TIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_10
LBB0_6:
	xorl	%eax, %eax
LBB0_10:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_SDL_MUTEX_TIMEDOUT,4,2         ## @SDL_MUTEX_TIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SDL_CondWaitTimeout            ; -- Begin function SDL_CondWaitTimeout
	.p2align	2
_SDL_CondWaitTimeout:                   ; @SDL_CondWaitTimeout
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_assert
	mov	x0, x19
	bl	_assert
	mov	w0, #-1
	cbz	x20, LBB0_8
; %bb.1:
	cbz	x19, LBB0_8
; %bb.2:
	add	x0, sp, #16
	mov	x1, #0
	bl	_gettimeofday
	ldr	x8, [sp, #24]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x9, w21, w9
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	add	x8, x8, w9, sxtw
	str	x8, [sp, #8]
	ldr	w10, [sp, #16]
	mov	w11, #1000
	msub	w9, w9, w11, w21
	madd	w9, w9, w11, w10
	mul	w9, w9, w11
	str	w9, [sp]
	mov	w10, #51713
	movk	w10, #15258, lsl #16
	cmp	w9, w10
	b.lt	LBB0_4
; %bb.3:
	add	x8, x8, #1
	str	x8, [sp, #8]
	mov	w8, #13824
	movk	w8, #50277, lsl #16
	add	w8, w9, w8
	str	w8, [sp]
LBB0_4:
Lloh0:
	adrp	x21, _EINTR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _EINTR@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x2, sp
	mov	x0, x20
	mov	x1, x19
	bl	_pthread_cond_timedwait
	cbz	w0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	cmp	w0, w8
	b.eq	LBB0_5
; %bb.7:
Lloh2:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _SDL_MUTEX_TIMEDOUT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SDL_MUTEX_TIMEDOUT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w0, w8
	csinv	w0, w9, wzr, eq
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_SDL_MUTEX_TIMEDOUT,4,2         ; @SDL_MUTEX_TIMEDOUT
.subsections_via_symbols
