	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PrimaryDirectSoundBuffer_SetFormat ## -- Begin function PrimaryDirectSoundBuffer_SetFormat
	.p2align	4, 0x90
_PrimaryDirectSoundBuffer_SetFormat:    ## @PrimaryDirectSoundBuffer_SetFormat
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	_CDirectSoundBuffer@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_lpVtbl@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_CONTAINING_RECORD
	movslq	%eax, %r15
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.7:
	movq	%rbx, %rsi
	callq	_SetPinFormat
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:
	movq	_DSERR_GENERIC@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_1:
	xorl	%r13d, %r13d
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rdi
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdx
	callq	_GetPinIdFromFilter
	movq	%rax, %r12
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_DPRINT
	movq	_ULONG_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r15), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	movl	%r14d, %ebx
	movl	%r14d, %r8d
	callq	_OpenPin
	movq	%rax, %r14
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_DPRINT
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_4
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, (%r15)
	incq	%r13
	movq	_TRUE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	%ebx, %r14d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_2
	jmp	LBB0_11
LBB0_8:
	movq	_DS_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
LBB0_5:
	cmpq	$0, (%r15)
	je	LBB0_11
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DPRINT
	movq	_DS_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DPRINT
	movq	_DSERR_INVALIDPARAM@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CDirectSoundBuffer,4,2         ## @CDirectSoundBuffer
	.comm	_lpVtbl,4,2                     ## @lpVtbl
	.comm	_DS_OK,4,2                      ## @DS_OK
	.comm	_DSERR_GENERIC,4,2              ## @DSERR_GENERIC
	.comm	_FALSE,4,2                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PinId %u DeviceId %u\n"

	.comm	_ULONG_MAX,8,3                  ## @ULONG_MAX
L_.str.1:                               ## @.str.1
	.asciz	"PinId %u Result %u\n"

	.comm	_ERROR_SUCCESS,8,3              ## @ERROR_SUCCESS
	.comm	_TRUE,8,3                       ## @TRUE
L_.str.2:                               ## @.str.2
	.asciz	"PrimaryDirectSoundBuffer8Impl_fnSetFormat failed\n"

	.comm	_DSERR_INVALIDPARAM,4,2         ## @DSERR_INVALIDPARAM
L_.str.3:                               ## @.str.3
	.asciz	"PrimaryDirectSoundBuffer8Impl_fnSetFormat success\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PrimaryDirectSoundBuffer_SetFormat ; -- Begin function PrimaryDirectSoundBuffer_SetFormat
	.p2align	2
_PrimaryDirectSoundBuffer_SetFormat:    ; @PrimaryDirectSoundBuffer_SetFormat
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x8, _CDirectSoundBuffer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CDirectSoundBuffer@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _lpVtbl@GOTPAGE
Lloh4:
	ldr	x8, [x8, _lpVtbl@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_CONTAINING_RECORD
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x21, w0
	ldr	x0, [x21]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x1, x19
	bl	_SetPinFormat
Lloh6:
	adrp	x8, _DS_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DS_OK@GOTPAGEOFF]
Lloh8:
	adrp	x9, _DSERR_GENERIC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DSERR_GENERIC@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	b	LBB0_10
LBB0_2:
	mov	x22, #0
Lloh10:
	adrp	x23, l_.str@PAGE
Lloh11:
	add	x23, x23, l_.str@PAGEOFF
Lloh12:
	adrp	x28, _ULONG_MAX@GOTPAGE
Lloh13:
	ldr	x28, [x28, _ULONG_MAX@GOTPAGEOFF]
Lloh14:
	adrp	x27, _ERROR_SUCCESS@GOTPAGE
Lloh15:
	ldr	x27, [x27, _ERROR_SUCCESS@GOTPAGEOFF]
Lloh16:
	adrp	x24, l_.str.1@PAGE
Lloh17:
	add	x24, x24, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21, #16]
Lloh18:
	adrp	x8, _FALSE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x2, x22
	bl	_GetPinIdFromFilter
	mov	x25, x0
	stp	x0, x22, [sp]
	mov	x0, x23
	bl	_DPRINT
	ldr	x8, [x28]
	cmp	x25, x8
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21, #16]
	ldr	w0, [x8]
	mov	x1, x25
	mov	x2, x19
	mov	x3, x21
	mov	x4, x20
	bl	_OpenPin
	mov	x26, x0
	stp	x25, x0, [sp]
	mov	x0, x24
	bl	_DPRINT
	ldr	x8, [x27]
	cmp	x26, x8
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	str	xzr, [x21]
	add	x22, x22, #1
Lloh21:
	adrp	x8, _TRUE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	cbnz	x8, LBB0_3
	b	LBB0_9
LBB0_6:
	ldr	w8, [x19]
	str	w8, [x21, #8]
LBB0_7:
	ldr	x8, [x21]
	cbz	x8, LBB0_9
; %bb.8:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DPRINT
Lloh26:
	adrp	x8, _DS_OK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DS_OK@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DPRINT
Lloh30:
	adrp	x8, _DSERR_INVALIDPARAM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _DSERR_INVALIDPARAM@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_CDirectSoundBuffer,4,2         ; @CDirectSoundBuffer
	.comm	_lpVtbl,4,2                     ; @lpVtbl
	.comm	_DS_OK,4,2                      ; @DS_OK
	.comm	_DSERR_GENERIC,4,2              ; @DSERR_GENERIC
	.comm	_FALSE,4,2                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PinId %u DeviceId %u\n"

	.comm	_ULONG_MAX,8,3                  ; @ULONG_MAX
l_.str.1:                               ; @.str.1
	.asciz	"PinId %u Result %u\n"

	.comm	_ERROR_SUCCESS,8,3              ; @ERROR_SUCCESS
	.comm	_TRUE,8,3                       ; @TRUE
l_.str.2:                               ; @.str.2
	.asciz	"PrimaryDirectSoundBuffer8Impl_fnSetFormat failed\n"

	.comm	_DSERR_INVALIDPARAM,4,2         ; @DSERR_INVALIDPARAM
l_.str.3:                               ; @.str.3
	.asciz	"PrimaryDirectSoundBuffer8Impl_fnSetFormat success\n"

.subsections_via_symbols
