	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_gf1_pcm_new                ## -- Begin function snd_gf1_pcm_new
	.p2align	4, 0x90
_snd_gf1_pcm_new:                       ## @snd_gf1_pcm_new
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %ebx
	movl	%esi, %edx
	movq	%rdi, %r13
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	movq	$0, (%r15)
LBB0_2:
	movq	56(%r13), %r14
	cmpq	$0, 24(%r13)
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	cmpl	$0, 48(%r13)
	je	LBB0_6
## %bb.5:
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_6:
	cmpl	$0, 44(%r13)
	sete	%r12b
LBB0_7:
	movzbl	%r12b, %r8d
	movl	32(%r13), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	leaq	-48(%rbp), %r9
	movq	%r14, %rdi
	callq	_snd_pcm_new
	testl	%eax, %eax
	js	LBB0_25
## %bb.8:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	-48(%rbp), %rdi
	movq	%r13, 32(%rdi)
	movq	_SNDRV_PCM_STREAM_PLAYBACK@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	_snd_gf1_pcm_playback_ops@GOTPCREL(%rip), %rdx
	callq	_snd_pcm_set_ops
	movq	-48(%rbp), %rdi
	movq	16(%rdi), %rax
	movq	(%rbx), %rcx
	movq	(%rax,%rcx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.9:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	_SNDRV_DMA_TYPE_DEV@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %r14d
	xorl	%eax, %eax
	callq	_snd_dma_isa_data
	xorl	%r8d, %r8d
	cmpl	$4, 36(%r13)
	setge	%r8b
	shll	$16, %r8d
	addl	$65536, %r8d                    ## imm = 0x10000
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	movl	$65536, %ecx                    ## imm = 0x10000
	callq	_snd_pcm_lib_preallocate_pages
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_10
## %bb.11:
	movq	-48(%rbp), %rdi
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_12:
	movl	$0, 24(%rdi)
	movq	_SNDRV_PCM_SUBCLASS_GENERIC_MIX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rdi)
	testb	%r12b, %r12b
	je	LBB0_17
## %bb.13:
	movq	_SNDRV_PCM_STREAM_CAPTURE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	_snd_gf1_pcm_capture_ops@GOTPCREL(%rip), %rdx
	callq	_snd_pcm_set_ops
	movl	40(%r13), %eax
	cmpl	36(%r13), %eax
	jne	LBB0_14
## %bb.15:
	movq	%r14, %r12
	movq	_SNDRV_PCM_INFO_HALF_DUPLEX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-48(%rbp), %rax
	orl	%ecx, 24(%rax)
	jmp	LBB0_16
LBB0_14:
	movq	%r14, %r12
	movq	-48(%rbp), %rax
LBB0_16:
	movq	16(%rax), %rax
	movq	(%rbx), %rcx
	movq	(%rax,%rcx,8), %r14
	movq	_SNDRV_DMA_TYPE_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_snd_dma_isa_data
	xorl	%r8d, %r8d
	cmpl	$4, 40(%r13)
	setge	%r8b
	shll	$16, %r8d
	addl	$65536, %r8d                    ## imm = 0x10000
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	movl	$65536, %ecx                    ## imm = 0x10000
	callq	_snd_pcm_lib_preallocate_pages
	movq	-48(%rbp), %rdi
	movq	%r12, %r14
LBB0_17:
	movq	(%rdi), %rax
	movl	8(%rdi), %esi
	movq	%rax, %rdi
	callq	_strcpy
	cmpq	$0, 24(%r13)
	je	LBB0_19
## %bb.18:
	movq	-48(%rbp), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	addq	%rax, %rbx
	movl	(%r13), %edx
	addl	$65, %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_sprintf
LBB0_19:
	movq	-48(%rbp), %rax
	movq	(%rax), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcat
	movq	-48(%rbp), %rax
	movq	%rax, 16(%r13)
	cmpq	$0, 8(%r13)
	jne	LBB0_20
## %bb.21:
	movq	_snd_gf1_pcm_volume_control@GOTPCREL(%rip), %rdi
	jmp	LBB0_22
LBB0_20:
	movq	_snd_gf1_pcm_volume_control1@GOTPCREL(%rip), %rdi
LBB0_22:
	movq	%r13, %rsi
	callq	_snd_ctl_new1
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_snd_ctl_add
	testl	%eax, %eax
	js	LBB0_25
## %bb.23:
	xorl	%eax, %eax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rbx)
	testq	%r15, %r15
	je	LBB0_25
## %bb.24:
	movq	-48(%rbp), %rcx
	movq	%rcx, (%r15)
LBB0_25:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AMD InterWave"

L_.str.1:                               ## @.str.1
	.asciz	"GF1"

	.comm	_SNDRV_PCM_STREAM_PLAYBACK,8,3  ## @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_snd_gf1_pcm_playback_ops,4,2   ## @snd_gf1_pcm_playback_ops
	.comm	_SNDRV_DMA_TYPE_DEV,4,2         ## @SNDRV_DMA_TYPE_DEV
	.comm	_SNDRV_PCM_SUBCLASS_GENERIC_MIX,4,2 ## @SNDRV_PCM_SUBCLASS_GENERIC_MIX
	.comm	_SNDRV_PCM_STREAM_CAPTURE,8,3   ## @SNDRV_PCM_STREAM_CAPTURE
	.comm	_snd_gf1_pcm_capture_ops,4,2    ## @snd_gf1_pcm_capture_ops
	.comm	_SNDRV_PCM_INFO_HALF_DUPLEX,4,2 ## @SNDRV_PCM_INFO_HALF_DUPLEX
L_.str.2:                               ## @.str.2
	.asciz	" rev %c"

L_.str.3:                               ## @.str.3
	.asciz	" (synth)"

	.comm	_snd_gf1_pcm_volume_control1,4,2 ## @snd_gf1_pcm_volume_control1
	.comm	_snd_gf1_pcm_volume_control,4,2 ## @snd_gf1_pcm_volume_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_gf1_pcm_new                ; -- Begin function snd_gf1_pcm_new
	.p2align	2
_snd_gf1_pcm_new:                       ; @snd_gf1_pcm_new
	.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	x19, x3
	mov	x20, x2
	mov	x2, x1
	mov	x21, x0
	cbz	x3, LBB0_2
; %bb.1:
	str	xzr, [x19]
LBB0_2:
	ldr	x22, [x21, #56]
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w23, #0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_4:
	ldr	w8, [x21, #48]
	cbz	w8, LBB0_6
; %bb.5:
	mov	w23, #0
	b	LBB0_7
LBB0_6:
	ldr	w8, [x21, #44]
	cmp	w8, #0
	cset	w23, eq
LBB0_7:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	ldr	w8, [x21, #32]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w3, w8, #1
	add	x5, sp, #8
	mov	x0, x22
	mov	x4, x23
	bl	_snd_pcm_new
	tbnz	w0, #31, LBB0_23
; %bb.9:
	ldr	x0, [sp, #8]
	str	x21, [x0, #32]
Lloh4:
	adrp	x24, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGE
Lloh5:
	ldr	x24, [x24, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGEOFF]
	ldr	x1, [x24]
Lloh6:
	adrp	x2, _snd_gf1_pcm_playback_ops@GOTPAGE
Lloh7:
	ldr	x2, [x2, _snd_gf1_pcm_playback_ops@GOTPAGEOFF]
	bl	_snd_pcm_set_ops
	ldr	x0, [sp, #8]
	ldr	x8, [x0, #16]
	ldr	x9, [x24]
	ldr	x24, [x8, x9, lsl #3]
Lloh8:
	adrp	x26, _SNDRV_DMA_TYPE_DEV@GOTPAGE
Lloh9:
	ldr	x26, [x26, _SNDRV_DMA_TYPE_DEV@GOTPAGEOFF]
	cbz	x24, LBB0_13
; %bb.10:
	mov	w27, #65536
	mov	w28, #131072
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w25, [x26]
	bl	_snd_dma_isa_data
	mov	x2, x0
	ldr	w8, [x21, #36]
	cmp	w8, #3
	csel	w4, w28, w27, gt
	mov	x0, x24
	mov	x1, x25
	mov	w3, #65536
	bl	_snd_pcm_lib_preallocate_pages
	ldr	x24, [x24]
	cbnz	x24, LBB0_11
; %bb.12:
	ldr	x0, [sp, #8]
LBB0_13:
Lloh10:
	adrp	x8, _SNDRV_PCM_SUBCLASS_GENERIC_MIX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SNDRV_PCM_SUBCLASS_GENERIC_MIX@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	stp	wzr, w8, [x0, #24]
	cbz	w23, LBB0_18
; %bb.14:
Lloh13:
	adrp	x23, _SNDRV_PCM_STREAM_CAPTURE@GOTPAGE
Lloh14:
	ldr	x23, [x23, _SNDRV_PCM_STREAM_CAPTURE@GOTPAGEOFF]
	ldr	x1, [x23]
Lloh15:
	adrp	x2, _snd_gf1_pcm_capture_ops@GOTPAGE
Lloh16:
	ldr	x2, [x2, _snd_gf1_pcm_capture_ops@GOTPAGEOFF]
	bl	_snd_pcm_set_ops
	ldp	w9, w8, [x21, #36]
	cmp	w8, w9
	b.ne	LBB0_16
; %bb.15:
Lloh17:
	adrp	x8, _SNDRV_PCM_INFO_HALF_DUPLEX@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SNDRV_PCM_INFO_HALF_DUPLEX@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x8]
	ldr	x8, [sp, #8]
	ldr	w10, [x8, #24]
	orr	w9, w10, w9
	str	w9, [x8, #24]
	b	LBB0_17
LBB0_16:
	ldr	x8, [sp, #8]
LBB0_17:
	ldr	x8, [x8, #16]
	ldr	x9, [x23]
	ldr	x23, [x8, x9, lsl #3]
	ldr	w24, [x26]
	bl	_snd_dma_isa_data
	mov	x2, x0
	ldr	w8, [x21, #40]
	mov	w9, #65536
	mov	w10, #131072
	cmp	w8, #3
	csel	w4, w10, w9, gt
	mov	x0, x23
	mov	x1, x24
	mov	w3, #65536
	bl	_snd_pcm_lib_preallocate_pages
	ldr	x0, [sp, #8]
LBB0_18:
	ldr	x8, [x0]
	ldr	w1, [x0, #8]
	mov	x0, x8
	bl	_strcpy
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_20
; %bb.19:
	ldr	x8, [sp, #8]
	ldr	x23, [x8]
	mov	x0, x23
	bl	_strlen
	add	x0, x0, x23
	ldr	w8, [x21]
	add	w2, w8, #65
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_sprintf
LBB0_20:
	ldr	x8, [sp, #8]
	ldr	x0, [x8]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcat
	ldr	x8, [sp, #8]
	str	x8, [x21, #16]
	ldr	x8, [x21, #8]
Lloh24:
	adrp	x9, _snd_gf1_pcm_volume_control1@GOTPAGE
Lloh25:
	ldr	x9, [x9, _snd_gf1_pcm_volume_control1@GOTPAGEOFF]
Lloh26:
	adrp	x10, _snd_gf1_pcm_volume_control@GOTPAGE
Lloh27:
	ldr	x10, [x10, _snd_gf1_pcm_volume_control@GOTPAGEOFF]
	cmp	x8, #0
	csel	x0, x10, x9, eq
	mov	x1, x21
	bl	_snd_ctl_new1
	mov	x21, x0
	mov	x0, x22
	mov	x1, x21
	bl	_snd_ctl_add
	tbnz	w0, #31, LBB0_23
; %bb.21:
	str	w20, [x21]
	mov	w0, #0
	cbz	x19, LBB0_23
; %bb.22:
	ldr	x8, [sp, #8]
	str	x8, [x19]
LBB0_23:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AMD InterWave"

l_.str.1:                               ; @.str.1
	.asciz	"GF1"

	.comm	_SNDRV_PCM_STREAM_PLAYBACK,8,3  ; @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_snd_gf1_pcm_playback_ops,4,2   ; @snd_gf1_pcm_playback_ops
	.comm	_SNDRV_DMA_TYPE_DEV,4,2         ; @SNDRV_DMA_TYPE_DEV
	.comm	_SNDRV_PCM_SUBCLASS_GENERIC_MIX,4,2 ; @SNDRV_PCM_SUBCLASS_GENERIC_MIX
	.comm	_SNDRV_PCM_STREAM_CAPTURE,8,3   ; @SNDRV_PCM_STREAM_CAPTURE
	.comm	_snd_gf1_pcm_capture_ops,4,2    ; @snd_gf1_pcm_capture_ops
	.comm	_SNDRV_PCM_INFO_HALF_DUPLEX,4,2 ; @SNDRV_PCM_INFO_HALF_DUPLEX
l_.str.2:                               ; @.str.2
	.asciz	" rev %c"

l_.str.3:                               ; @.str.3
	.asciz	" (synth)"

	.comm	_snd_gf1_pcm_volume_control1,4,2 ; @snd_gf1_pcm_volume_control1
	.comm	_snd_gf1_pcm_volume_control,4,2 ; @snd_gf1_pcm_volume_control
.subsections_via_symbols
