	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DirectSoundCaptureDevice_Initialize
_DirectSoundCaptureDevice_Initialize:   ## @DirectSoundCaptureDevice_Initialize
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, %rdi
	callq	_debugstr_guid
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_TRACE
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	_GUID_NULL@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_IsEqualGUID
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	_DSDEVID_DefaultCapture@GOTPCREL(%rip), %rbx
LBB0_3:
	leaq	-52(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_GetDeviceID
	movq	_DS_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_waveInGetNumDevs
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%eax, %r14d
	shlq	$2, %r14
	movq	_DSOUND_capture_guids@GOTPCREL(%rip), %r13
	leaq	-52(%rbp), %r12
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rsi
	addq	%r15, %rsi
	movq	%r12, %rdi
	callq	_IsEqualGUID
	testq	%rax, %rax
	jne	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	incl	%ebx
	addq	$4, %r15
	cmpq	%r15, %r14
	jne	LBB0_7
## %bb.12:
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %ebx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_WARN
	movq	_DSERR_INVALIDPARAM@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	jmp	LBB0_38
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_10
LBB0_8:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
LBB0_13:
	movq	_FALSE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_15
## %bb.14:
	leaq	L_.str.3(%rip), %rdi
LBB0_10:
	xorl	%eax, %eax
	callq	_WARN
	movq	_DSERR_NODRIVER@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	jmp	LBB0_38
LBB0_15:
	movq	_DSOUND_capture@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_17
## %bb.16:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_WARN
	movq	_DSERR_ALLOCATED@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	jmp	LBB0_38
LBB0_17:
	leaq	-48(%rbp), %rdi
	callq	_DirectSoundCaptureDevice_Create
	movq	%rax, %r15
	movq	_DS_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_18
## %bb.20:
	movq	-48(%rbp), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	-52(%rbp), %ecx
	movl	%ecx, 40(%rax)
	movq	$0, 32(%rax)
	movq	_ds_hw_accel@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_DS_HW_ACCEL_EMULATION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
LBB0_28:
	movq	%r15, %r12
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	_DSDDESC_DOMMSYSTEMOPEN@GOTPCREL(%rip), %rax
	movq	_DSDDESC_DOMMSYSTEMSETFORMAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	-48(%rbp), %rax
	movl	%ecx, 16(%rax)
	movq	_DS_OK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
LBB0_29:
	movl	%ebx, 20(%rax)
	movq	32(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_32
## %bb.30:
	cmpq	%r15, %r12
	jne	LBB0_32
## %bb.31:
	callq	_IDsCaptureDriver_Open
	movq	%rax, %r12
	movq	_DS_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
LBB0_32:
	cmpq	%r15, %r12
	movq	%r12, %r15
	jne	LBB0_38
## %bb.33:
	movq	-48(%rbp), %rsi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rsi, (%rax)
	movq	32(%rsi), %rdi
	testq	%rdi, %rdi
	je	LBB0_36
## %bb.34:
	movl	$16, (%rsi)
	callq	_IDsCaptureDriver_GetCaps
	movq	%rax, %r15
	movq	_DS_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_38
## %bb.35:
	leaq	L_.str.10(%rip), %rdi
	jmp	LBB0_19
LBB0_18:
	leaq	L_.str.5(%rip), %rdi
LBB0_19:
	xorl	%eax, %eax
	callq	_WARN
LBB0_38:
	movq	%r15, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movl	%ebx, %edi
	callq	_UlongToHandle
	movq	_DRV_QUERYDSOUNDIFACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	-48(%rbp), %edx
	addl	$32, %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_waveInMessage
	movl	%eax, %edi
	callq	_mmErr
	movq	%rax, %r12
	movq	_DS_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	cmpq	%r15, %r12
	je	LBB0_24
## %bb.22:
	movq	_DSERR_UNSUPPORTED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	je	LBB0_24
## %bb.23:
	leaq	L_.str.6(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_WARN
	movq	%r12, %r15
	jmp	LBB0_38
LBB0_24:
	movq	-48(%rbp), %rax
	cmpq	$0, 32(%rax)
	je	LBB0_28
## %bb.25:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	-48(%rbp), %rsi
	movq	32(%rsi), %rdi
	addq	$16, %rsi
	callq	_IDsCaptureDriver_GetDriverDesc
	movq	%rax, %r15
	movq	_DS_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_27
## %bb.26:
	movq	-48(%rbp), %rax
	movq	%r15, %r12
	jmp	LBB0_29
LBB0_36:
	movl	20(%rsi), %edi
	leaq	-80(%rbp), %rsi
	movl	$12, %edx
	callq	_waveInGetDevCapsA
	movl	%eax, %edi
	callq	_mmErr
	movq	%rax, %r15
	movq	_DS_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_38
## %bb.37:
	movq	-48(%rbp), %rax
	movl	$0, 12(%rax)
	movl	24(%rax), %edi
	movl	-72(%rbp), %esi
	movl	$4, %edx
	callq	_lstrcpynA
	movq	_DSCCAPS_EMULDRIVER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx
	orl	%eax, 12(%rcx)
	movl	-76(%rbp), %eax
	movl	%eax, 8(%rcx)
	movl	-80(%rbp), %eax
	movl	%eax, 4(%rcx)
	jmp	LBB0_38
LBB0_27:
	leaq	L_.str.8(%rip), %rdi
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_DSERR_INVALIDPARAM,8,3         ## @DSERR_INVALIDPARAM
	.comm	_FALSE,8,3                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%p, %s)\n"

	.comm	_GUID_NULL,4,2                  ## @GUID_NULL
	.comm	_DSDEVID_DefaultCapture,4,2     ## @DSDEVID_DefaultCapture
	.comm	_DS_OK,8,3                      ## @DS_OK
L_.str.1:                               ## @.str.1
	.asciz	"invalid parameter: lpcGUID\n"

L_.str.2:                               ## @.str.2
	.asciz	"no audio devices found\n"

	.comm	_DSERR_NODRIVER,8,3             ## @DSERR_NODRIVER
	.comm	_DSOUND_capture_guids,8,3       ## @DSOUND_capture_guids
	.comm	_TRUE,8,3                       ## @TRUE
L_.str.3:                               ## @.str.3
	.asciz	"No device found matching given ID!\n"

	.comm	_DSOUND_capture,8,3             ## @DSOUND_capture
L_.str.4:                               ## @.str.4
	.asciz	"already in use\n"

	.comm	_DSERR_ALLOCATED,8,3            ## @DSERR_ALLOCATED
L_.str.5:                               ## @.str.5
	.asciz	"DirectSoundCaptureDevice_Create failed\n"

	.comm	_ds_hw_accel,8,3                ## @ds_hw_accel
	.comm	_DS_HW_ACCEL_EMULATION,8,3      ## @DS_HW_ACCEL_EMULATION
	.comm	_DRV_QUERYDSOUNDIFACE,4,2       ## @DRV_QUERYDSOUNDIFACE
	.comm	_DSERR_UNSUPPORTED,8,3          ## @DSERR_UNSUPPORTED
L_.str.6:                               ## @.str.6
	.asciz	"waveInMessage failed; err=%x\n"

L_.str.7:                               ## @.str.7
	.asciz	"using DirectSound driver\n"

L_.str.8:                               ## @.str.8
	.asciz	"IDsCaptureDriver_GetDriverDesc failed\n"

L_.str.9:                               ## @.str.9
	.asciz	"using WINMM\n"

	.comm	_DSDDESC_DOMMSYSTEMOPEN,4,2     ## @DSDDESC_DOMMSYSTEMOPEN
	.comm	_DSDDESC_DOMMSYSTEMSETFORMAT,4,2 ## @DSDDESC_DOMMSYSTEMSETFORMAT
L_.str.10:                              ## @.str.10
	.asciz	"IDsCaptureDriver_GetCaps failed\n"

	.comm	_DSCCAPS_EMULDRIVER,4,2         ## @DSCCAPS_EMULDRIVER
	.no_dead_strip	_DirectSoundCaptureDevice_Initialize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DirectSoundCaptureDevice_Initialize
_DirectSoundCaptureDevice_Initialize:   ; @DirectSoundCaptureDevice_Initialize
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _FALSE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _FALSE@GOTPAGEOFF]
	ldr	x24, [x22]
	ldr	x8, [x0]
	str	x8, [sp, #32]
	mov	x0, x1
	bl	_debugstr_guid
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	cbz	x20, LBB0_2
; %bb.1:
Lloh4:
	adrp	x1, _GUID_NULL@GOTPAGE
Lloh5:
	ldr	x1, [x1, _GUID_NULL@GOTPAGEOFF]
	mov	x0, x20
	bl	_IsEqualGUID
	cbz	x0, LBB0_3
LBB0_2:
Lloh6:
	adrp	x20, _DSDEVID_DefaultCapture@GOTPAGE
Lloh7:
	ldr	x20, [x20, _DSDEVID_DefaultCapture@GOTPAGEOFF]
LBB0_3:
	add	x1, sp, #44
	mov	x0, x20
	bl	_GetDeviceID
Lloh8:
	adrp	x23, _DS_OK@GOTPAGE
Lloh9:
	ldr	x23, [x23, _DS_OK@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.4:
	bl	_waveInGetNumDevs
	cbz	w0, LBB0_10
; %bb.5:
	mov	x21, x0
	mov	x25, #0
	mov	w20, #0
	mov	w8, w0
	lsl	x26, x8, #2
Lloh10:
	adrp	x27, _DSOUND_capture_guids@GOTPAGE
Lloh11:
	ldr	x27, [x27, _DSOUND_capture_guids@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x27]
	add	x1, x8, x25
	add	x0, sp, #44
	bl	_IsEqualGUID
	cbnz	x0, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w20, w20, #1
	add	x25, x25, #4
	cmp	x26, x25
	b.ne	LBB0_6
; %bb.8:
	mov	x20, x21
	b	LBB0_12
LBB0_9:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WARN
Lloh14:
	adrp	x8, _DSERR_INVALIDPARAM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DSERR_INVALIDPARAM@GOTPAGEOFF]
Lloh16:
	ldr	x21, [x8]
	b	LBB0_29
LBB0_10:
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_11:
Lloh19:
	adrp	x8, _TRUE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh21:
	ldr	x24, [x8]
LBB0_12:
	ldr	x8, [x22]
	cmp	x24, x8
	b.ne	LBB0_15
; %bb.13:
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_14:
	bl	_WARN
Lloh24:
	adrp	x8, _DSERR_NODRIVER@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DSERR_NODRIVER@GOTPAGEOFF]
Lloh26:
	ldr	x21, [x8]
	b	LBB0_29
LBB0_15:
Lloh27:
	adrp	x8, _DSOUND_capture@GOTPAGE
Lloh28:
	ldr	x8, [x8, _DSOUND_capture@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	ldr	x8, [x8, w20, uxtw #3]
	cbz	x8, LBB0_17
; %bb.16:
Lloh30:
	adrp	x0, l_.str.4@PAGE
Lloh31:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_WARN
Lloh32:
	adrp	x8, _DSERR_ALLOCATED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _DSERR_ALLOCATED@GOTPAGEOFF]
Lloh34:
	ldr	x21, [x8]
	b	LBB0_29
LBB0_17:
	add	x0, sp, #32
	bl	_DirectSoundCaptureDevice_Create
	mov	x21, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_27
; %bb.18:
	ldr	x8, [sp, #32]
	str	x8, [x19]
	ldr	w9, [sp, #44]
	str	w9, [x8, #40]
Lloh35:
	adrp	x9, _ds_hw_accel@GOTPAGE
Lloh36:
	ldr	x9, [x9, _ds_hw_accel@GOTPAGEOFF]
	str	xzr, [x8, #32]
Lloh37:
	ldr	x8, [x9]
Lloh38:
	adrp	x9, _DS_HW_ACCEL_EMULATION@GOTPAGE
Lloh39:
	ldr	x9, [x9, _DS_HW_ACCEL_EMULATION@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_30
LBB0_19:
	mov	x22, x21
Lloh41:
	adrp	x0, l_.str.9@PAGE
Lloh42:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_TRACE
Lloh43:
	adrp	x8, _DSDDESC_DOMMSYSTEMOPEN@GOTPAGE
Lloh44:
	ldr	x8, [x8, _DSDDESC_DOMMSYSTEMOPEN@GOTPAGEOFF]
Lloh45:
	adrp	x9, _DSDDESC_DOMMSYSTEMSETFORMAT@GOTPAGE
Lloh46:
	ldr	x9, [x9, _DSDDESC_DOMMSYSTEMSETFORMAT@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
Lloh48:
	ldr	w9, [x9]
	orr	w9, w9, w8
	ldr	x8, [sp, #32]
	str	w9, [x8, #16]
	ldr	x21, [x23]
LBB0_20:
	str	w20, [x8, #20]
	ldr	x0, [x8, #32]
	cbz	x0, LBB0_23
; %bb.21:
	cmp	x22, x21
	b.ne	LBB0_23
; %bb.22:
	bl	_IDsCaptureDriver_Open
	mov	x22, x0
	ldr	x21, [x23]
LBB0_23:
	cmp	x22, x21
	mov	x21, x22
	b.ne	LBB0_29
; %bb.24:
	ldr	x1, [sp, #32]
	str	x1, [x19]
	ldr	x0, [x1, #32]
	cbz	x0, LBB0_36
; %bb.25:
	mov	w8, #16
	str	w8, [x1]
	bl	_IDsCaptureDriver_GetCaps
	mov	x21, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_29
; %bb.26:
Lloh49:
	adrp	x0, l_.str.10@PAGE
Lloh50:
	add	x0, x0, l_.str.10@PAGEOFF
	b	LBB0_28
LBB0_27:
Lloh51:
	adrp	x0, l_.str.5@PAGE
Lloh52:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_28:
	bl	_WARN
LBB0_29:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_30:
	mov	x0, x20
	bl	_UlongToHandle
Lloh53:
	adrp	x8, _DRV_QUERYDSOUNDIFACE@GOTPAGE
Lloh54:
	ldr	x8, [x8, _DRV_QUERYDSOUNDIFACE@GOTPAGEOFF]
Lloh55:
	ldr	w1, [x8]
	ldr	w8, [sp, #32]
	add	w2, w8, #32
	mov	w3, #0
	bl	_waveInMessage
	bl	_mmErr
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_33
; %bb.31:
	mov	x21, x0
Lloh56:
	adrp	x9, _DSERR_UNSUPPORTED@GOTPAGE
Lloh57:
	ldr	x9, [x9, _DSERR_UNSUPPORTED@GOTPAGEOFF]
Lloh58:
	ldr	x9, [x9]
	cmp	x0, x9
	b.eq	LBB0_33
; %bb.32:
	str	x21, [sp]
Lloh59:
	adrp	x0, l_.str.6@PAGE
Lloh60:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_28
LBB0_33:
	ldr	x9, [sp, #32]
	ldr	x9, [x9, #32]
	cbz	x9, LBB0_38
; %bb.34:
Lloh61:
	adrp	x0, l_.str.7@PAGE
Lloh62:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_TRACE
	ldr	x8, [sp, #32]
	ldr	x0, [x8, #32]
	add	x1, x8, #16
	bl	_IDsCaptureDriver_GetDriverDesc
	mov	x21, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_39
; %bb.35:
	ldr	x8, [sp, #32]
	mov	x22, x21
	b	LBB0_20
LBB0_36:
	ldr	w0, [x1, #20]
	add	x1, sp, #16
	mov	w2, #12
	bl	_waveInGetDevCapsA
	bl	_mmErr
	mov	x21, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_29
; %bb.37:
	ldr	x8, [sp, #32]
	str	wzr, [x8, #12]
	ldr	w0, [x8, #24]
	ldr	w1, [sp, #24]
	mov	w2, #4
	bl	_lstrcpynA
Lloh63:
	adrp	x8, _DSCCAPS_EMULDRIVER@GOTPAGE
Lloh64:
	ldr	x8, [x8, _DSCCAPS_EMULDRIVER@GOTPAGEOFF]
Lloh65:
	ldr	w8, [x8]
	ldr	x9, [sp, #32]
	ldr	w10, [x9, #12]
	orr	w8, w10, w8
	str	w8, [x9, #12]
	ldr	d0, [sp, #16]
	stur	d0, [x9, #4]
	b	LBB0_29
LBB0_38:
	mov	x21, x8
	b	LBB0_19
LBB0_39:
Lloh66:
	adrp	x0, l_.str.8@PAGE
Lloh67:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_28
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh47
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpAdd	Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpAdd	Lloh66, Lloh67
	.cfi_endproc
                                        ; -- End function
	.comm	_DSERR_INVALIDPARAM,8,3         ; @DSERR_INVALIDPARAM
	.comm	_FALSE,8,3                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%p, %s)\n"

	.comm	_GUID_NULL,4,2                  ; @GUID_NULL
	.comm	_DSDEVID_DefaultCapture,4,2     ; @DSDEVID_DefaultCapture
	.comm	_DS_OK,8,3                      ; @DS_OK
l_.str.1:                               ; @.str.1
	.asciz	"invalid parameter: lpcGUID\n"

l_.str.2:                               ; @.str.2
	.asciz	"no audio devices found\n"

	.comm	_DSERR_NODRIVER,8,3             ; @DSERR_NODRIVER
	.comm	_DSOUND_capture_guids,8,3       ; @DSOUND_capture_guids
	.comm	_TRUE,8,3                       ; @TRUE
l_.str.3:                               ; @.str.3
	.asciz	"No device found matching given ID!\n"

	.comm	_DSOUND_capture,8,3             ; @DSOUND_capture
l_.str.4:                               ; @.str.4
	.asciz	"already in use\n"

	.comm	_DSERR_ALLOCATED,8,3            ; @DSERR_ALLOCATED
l_.str.5:                               ; @.str.5
	.asciz	"DirectSoundCaptureDevice_Create failed\n"

	.comm	_ds_hw_accel,8,3                ; @ds_hw_accel
	.comm	_DS_HW_ACCEL_EMULATION,8,3      ; @DS_HW_ACCEL_EMULATION
	.comm	_DRV_QUERYDSOUNDIFACE,4,2       ; @DRV_QUERYDSOUNDIFACE
	.comm	_DSERR_UNSUPPORTED,8,3          ; @DSERR_UNSUPPORTED
l_.str.6:                               ; @.str.6
	.asciz	"waveInMessage failed; err=%x\n"

l_.str.7:                               ; @.str.7
	.asciz	"using DirectSound driver\n"

l_.str.8:                               ; @.str.8
	.asciz	"IDsCaptureDriver_GetDriverDesc failed\n"

l_.str.9:                               ; @.str.9
	.asciz	"using WINMM\n"

	.comm	_DSDDESC_DOMMSYSTEMOPEN,4,2     ; @DSDDESC_DOMMSYSTEMOPEN
	.comm	_DSDDESC_DOMMSYSTEMSETFORMAT,4,2 ; @DSDDESC_DOMMSYSTEMSETFORMAT
l_.str.10:                              ; @.str.10
	.asciz	"IDsCaptureDriver_GetCaps failed\n"

	.comm	_DSCCAPS_EMULDRIVER,4,2         ; @DSCCAPS_EMULDRIVER
	.no_dead_strip	_DirectSoundCaptureDevice_Initialize
.subsections_via_symbols
