	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function wasapi_init_client
LCPI0_0:
	.quad	0x408f400000000000              ## double 1000
LCPI0_1:
	.quad	0x40c3880000000000              ## double 1.0E+4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_wasapi_init_client:                    ## @wasapi_init_client
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	$0, -44(%rbp)
	movl	$0, -48(%rbp)
	movq	$0, -56(%rbp)
	cmpl	$0, (%rsi)
	je	LBB0_4
## %bb.1:
	movq	%r15, %rdi
	movq	%rdx, %rsi
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rcx, %rdx
	movl	%ebx, %ecx
	callq	_wasapi_init_client_ex
	movq	%rax, %rcx
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	movq	%r15, %rdi
	movq	%r14, %r15
	movq	%r14, %rsi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_wasapi_init_client_sh
	testq	%rax, %rax
	je	LBB0_23
## %bb.3:
	movq	%rax, %r14
	movl	$0, (%r13)
	jmp	LBB0_7
LBB0_4:
	movq	%r15, %rdi
	movq	%rdx, %rsi
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rcx, %rdx
	movl	%ebx, %ecx
	callq	_wasapi_init_client_sh
	movq	%rax, %rcx
	testq	%rax, %rax
	je	LBB0_20
LBB0_5:
	movq	%r14, %r15
	cmpl	$0, (%r13)
	movq	%rcx, %r14
	je	LBB0_7
LBB0_6:
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	jmp	LBB0_8
LBB0_7:
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
LBB0_8:
	callq	__IAudioClient_GetDevicePeriod
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_RARCH_WARN
LBB0_10:
	cmpl	$0, (%r13)
	jne	LBB0_13
## %bb.11:
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	__IAudioClient_GetStreamLatency
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	callq	_RARCH_WARN
LBB0_13:
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	callq	__IAudioClient_GetBufferSize
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	callq	_RARCH_WARN
LBB0_15:
	cmpl	$0, (%r13)
	je	LBB0_17
## %bb.16:
	movsd	-56(%rbp), %xmm0                ## xmm0 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm0
	movl	(%r12), %ecx
	cvtsi2sd	%rcx, %xmm1
	divsd	%xmm1, %xmm0
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_18
LBB0_17:
	movl	-44(%rbp), %eax
	addl	-48(%rbp), %eax
	cvtsi2sd	%rax, %xmm0
	divsd	LCPI0_1(%rip), %xmm0
	movl	(%r12), %ecx
	leaq	L_.str.5(%rip), %rsi
LBB0_18:
	cmpl	$0, (%r15)
	leaq	L_.str.7(%rip), %rax
	leaq	L_.str.6(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.3(%rip), %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	movb	$1, %al
	callq	_RARCH_LOG
	movsd	-56(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	movl	(%r12), %eax
	cvtsi2sd	%rax, %xmm2
	divsd	%xmm2, %xmm1
	leaq	L_.str.8(%rip), %rdi
	movb	$2, %al
	callq	_RARCH_LOG
	movl	-44(%rbp), %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	LCPI0_1(%rip), %xmm0
	movl	(%r12), %ecx
	imull	%eax, %ecx
	imulq	$1801439851, %rcx, %rsi         ## imm = 0x6B5FCA6B
	shrq	$54, %rsi
	leaq	L_.str.9(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movb	$1, %al
	callq	_RARCH_LOG
LBB0_19:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	%r15, %rdi
	movq	%r14, %r15
	movq	%r14, %rsi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_wasapi_init_client_ex
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:
	movq	%rax, %r14
	movl	$1, (%r13)
	jmp	LBB0_6
LBB0_23:
	xorl	%r14d, %r14d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[WASAPI]: IAudioClient::GetDevicePeriod failed with error 0x%.8X.\n"

L_.str.1:                               ## @.str.1
	.asciz	"[WASAPI]: IAudioClient::GetStreamLatency failed with error 0x%.8X.\n"

L_.str.2:                               ## @.str.2
	.asciz	"[WASAPI]: IAudioClient::GetBufferSize failed with error 0x%.8X.\n"

L_.str.3:                               ## @.str.3
	.asciz	"[WASAPI]: Client initialized (%s, %s, %uHz, %.1fms).\n"

L_.str.4:                               ## @.str.4
	.asciz	"exclusive"

L_.str.5:                               ## @.str.5
	.asciz	"shared"

L_.str.6:                               ## @.str.6
	.asciz	"float"

L_.str.7:                               ## @.str.7
	.asciz	"pcm"

L_.str.8:                               ## @.str.8
	.asciz	"[WASAPI]: Client's buffer length is %u frames (%.1fms).\n"

L_.str.9:                               ## @.str.9
	.asciz	"[WASAPI]: Device period is %.1fms (%lld frames).\n"

	.no_dead_strip	_wasapi_init_client
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wasapi_init_client
_wasapi_init_client:                    ; @wasapi_init_client
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x4
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x24, x0
	stp	xzr, xzr, [sp, #32]
	ldr	w8, [x1]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x0, x24
	mov	x1, x21
	mov	x2, x19
	mov	x3, x23
	bl	_wasapi_init_client_ex
	mov	x20, x0
	cbnz	x0, LBB0_5
; %bb.2:
	mov	x0, x24
	mov	x1, x21
	mov	x2, x19
	mov	x3, x23
	bl	_wasapi_init_client_sh
	mov	x20, x0
	cbz	x0, LBB0_19
; %bb.3:
	str	wzr, [x22]
	b	LBB0_7
LBB0_4:
	mov	x0, x24
	mov	x1, x21
	mov	x2, x19
	mov	x3, x23
	bl	_wasapi_init_client_sh
	mov	x20, x0
	cbz	x0, LBB0_20
LBB0_5:
	ldr	w8, [x22]
	cbz	w8, LBB0_7
LBB0_6:
	add	x2, sp, #44
	mov	x0, x20
	mov	x1, #0
	b	LBB0_8
LBB0_7:
	add	x1, sp, #44
	mov	x0, x20
	mov	x2, #0
LBB0_8:
	bl	__IAudioClient_GetDevicePeriod
	mov	x23, x0
	bl	_FAILED
	cbz	x0, LBB0_10
; %bb.9:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_RARCH_WARN
LBB0_10:
	ldr	w8, [x22]
	cbnz	w8, LBB0_13
; %bb.11:
	add	x1, sp, #40
	mov	x0, x20
	bl	__IAudioClient_GetStreamLatency
	mov	x23, x0
	bl	_FAILED
	cbz	x0, LBB0_13
; %bb.12:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	bl	_RARCH_WARN
LBB0_13:
	add	x1, sp, #32
	mov	x0, x20
	bl	__IAudioClient_GetBufferSize
	mov	x23, x0
	bl	_FAILED
	cbz	x0, LBB0_15
; %bb.14:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	bl	_RARCH_WARN
LBB0_15:
	ldr	w8, [x22]
	cbz	w8, LBB0_17
; %bb.16:
	ldr	d0, [sp, #32]
	mov	x8, #70368744177664
	movk	x8, #16527, lsl #48
	fmov	d1, x8
	fmul	d0, d0, d1
	ldr	w8, [x19]
	ucvtf	d1, w8
	fdiv	d0, d0, d1
Lloh6:
	adrp	x9, l_.str.4@PAGE
Lloh7:
	add	x9, x9, l_.str.4@PAGEOFF
	b	LBB0_18
LBB0_17:
	ldp	w8, w9, [sp, #40]
	add	w8, w9, w8
	ucvtf	d0, w8
	mov	x8, #149533581377536
	movk	x8, #16579, lsl #48
	fmov	d1, x8
	fdiv	d0, d0, d1
	ldr	w8, [x19]
Lloh8:
	adrp	x9, l_.str.5@PAGE
Lloh9:
	add	x9, x9, l_.str.5@PAGEOFF
LBB0_18:
	ldr	w10, [x21]
Lloh10:
	adrp	x11, l_.str.6@PAGE
Lloh11:
	add	x11, x11, l_.str.6@PAGEOFF
Lloh12:
	adrp	x12, l_.str.7@PAGE
Lloh13:
	add	x12, x12, l_.str.7@PAGEOFF
	cmp	w10, #0
	csel	x10, x12, x11, eq
	str	d0, [sp, #24]
	stp	x10, x8, [sp, #8]
	str	x9, [sp]
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_RARCH_LOG
	ldr	d0, [sp, #32]
	mov	x8, #70368744177664
	movk	x8, #16527, lsl #48
	fmov	d1, x8
	fmul	d1, d0, d1
	ldr	s2, [x19]
	ucvtf	d2, d2
	fdiv	d1, d1, d2
	stp	d0, d1, [sp]
Lloh16:
	adrp	x0, l_.str.8@PAGE
Lloh17:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_RARCH_LOG
	ldr	w8, [sp, #44]
	ucvtf	d0, w8
	mov	x9, #149533581377536
	movk	x9, #16579, lsl #48
	fmov	d1, x9
	fdiv	d0, d0, d1
	ldr	w9, [x19]
	mul	w8, w9, w8
	mov	w9, #51819
	movk	w9, #27487, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #54
	str	d0, [sp]
	str	x8, [sp, #8]
Lloh18:
	adrp	x0, l_.str.9@PAGE
Lloh19:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_RARCH_LOG
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_20:
	mov	x0, x24
	mov	x1, x21
	mov	x2, x19
	mov	x3, x23
	bl	_wasapi_init_client_ex
	mov	x20, x0
	cbz	x0, LBB0_19
; %bb.21:
	mov	w8, #1
	str	w8, [x22]
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[WASAPI]: IAudioClient::GetDevicePeriod failed with error 0x%.8X.\n"

l_.str.1:                               ; @.str.1
	.asciz	"[WASAPI]: IAudioClient::GetStreamLatency failed with error 0x%.8X.\n"

l_.str.2:                               ; @.str.2
	.asciz	"[WASAPI]: IAudioClient::GetBufferSize failed with error 0x%.8X.\n"

l_.str.3:                               ; @.str.3
	.asciz	"[WASAPI]: Client initialized (%s, %s, %uHz, %.1fms).\n"

l_.str.4:                               ; @.str.4
	.asciz	"exclusive"

l_.str.5:                               ; @.str.5
	.asciz	"shared"

l_.str.6:                               ; @.str.6
	.asciz	"float"

l_.str.7:                               ; @.str.7
	.asciz	"pcm"

l_.str.8:                               ; @.str.8
	.asciz	"[WASAPI]: Client's buffer length is %u frames (%.1fms).\n"

l_.str.9:                               ; @.str.9
	.asciz	"[WASAPI]: Device period is %.1fms (%lld frames).\n"

	.no_dead_strip	_wasapi_init_client
.subsections_via_symbols
