	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sndout_oss_write_nb            ## -- Begin function sndout_oss_write_nb
	.p2align	4, 0x90
_sndout_oss_write_nb:                   ## @sndout_oss_write_nb
	.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, %ebx
	movq	%rdi, %r14
	cmpl	$3, _sndout_oss_write_nb.lag_counter(%rip)
	jl	LBB0_2
## %bb.1:
	movl	$0, _sndout_oss_write_nb.lag_counter(%rip)
	movq	_FRAG_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, _sndout_oss_write_nb.skip_counter(%rip)
	testl	%eax, %eax
	jg	LBB0_4
LBB0_5:
	xorl	%eax, %eax
	callq	_plat_get_ticks_ms
	movl	%eax, %r15d
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_sndout_oss_write
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_plat_get_ticks_ms
	subl	%r15d, %eax
	cmpl	$2, %eax
	jb	LBB0_8
## %bb.6:
	movl	_sndout_oss_write_nb.lag_counter(%rip), %ecx
	leal	1(%rcx), %edx
	movl	%edx, _sndout_oss_write_nb.lag_counter(%rip)
	cmpl	$2, %ecx
	jl	LBB0_9
## %bb.7:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_printf
	jmp	LBB0_9
LBB0_2:
	movl	_sndout_oss_write_nb.skip_counter(%rip), %eax
	testl	%eax, %eax
	jle	LBB0_5
LBB0_4:
	decl	%eax
	movl	%eax, _sndout_oss_write_nb.skip_counter(%rip)
	jmp	LBB0_9
LBB0_8:
	movl	$0, _sndout_oss_write_nb.lag_counter(%rip)
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_sndout_oss_write_nb.lag_counter,4,2 ## @sndout_oss_write_nb.lag_counter
.zerofill __DATA,__bss,_sndout_oss_write_nb.skip_counter,4,2 ## @sndout_oss_write_nb.skip_counter
	.comm	_FRAG_COUNT,4,2                 ## @FRAG_COUNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"audio lag %u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sndout_oss_write_nb            ; -- Begin function sndout_oss_write_nb
	.p2align	2
_sndout_oss_write_nb:                   ; @sndout_oss_write_nb
	.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, x1
	mov	x20, x0
	adrp	x22, _sndout_oss_write_nb.lag_counter@PAGE
	ldr	w9, [x22, _sndout_oss_write_nb.lag_counter@PAGEOFF]
	adrp	x8, _sndout_oss_write_nb.skip_counter@PAGE
	cmp	w9, #3
	b.lt	LBB0_5
; %bb.1:
	str	wzr, [x22, _sndout_oss_write_nb.lag_counter@PAGEOFF]
Lloh0:
	adrp	x9, _FRAG_COUNT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FRAG_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x8, _sndout_oss_write_nb.skip_counter@PAGEOFF]
	subs	w9, w9, #1
	b.ge	LBB0_6
LBB0_2:
	bl	_plat_get_ticks_ms
	mov	x21, x0
	mov	x0, x20
	mov	x1, x19
	bl	_sndout_oss_write
	mov	x19, x0
	bl	_plat_get_ticks_ms
	sub	w1, w0, w21
	cmp	w1, #2
	b.lo	LBB0_7
; %bb.3:
	ldr	w8, [x22, _sndout_oss_write_nb.lag_counter@PAGEOFF]
	add	w9, w8, #1
	str	w9, [x22, _sndout_oss_write_nb.lag_counter@PAGEOFF]
	cmp	w8, #2
	b.lt	LBB0_8
; %bb.4:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	b	LBB0_8
LBB0_5:
	ldr	w9, [x8, _sndout_oss_write_nb.skip_counter@PAGEOFF]
	subs	w9, w9, #1
	b.lt	LBB0_2
LBB0_6:
	str	w9, [x8, _sndout_oss_write_nb.skip_counter@PAGEOFF]
	b	LBB0_8
LBB0_7:
	str	wzr, [x22, _sndout_oss_write_nb.lag_counter@PAGEOFF]
LBB0_8:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_sndout_oss_write_nb.lag_counter,4,2 ; @sndout_oss_write_nb.lag_counter
.zerofill __DATA,__bss,_sndout_oss_write_nb.skip_counter,4,2 ; @sndout_oss_write_nb.skip_counter
	.comm	_FRAG_COUNT,4,2                 ; @FRAG_COUNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"audio lag %u\n"

.subsections_via_symbols
