	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_gf1_rawmidi_new            ## -- Begin function snd_gf1_rawmidi_new
	.p2align	4, 0x90
_snd_gf1_rawmidi_new:                   ## @snd_gf1_rawmidi_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %edx
	movq	%rdi, %rbx
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movq	$0, (%r14)
LBB0_2:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %r12
	leaq	-40(%rbp), %r9
	movq	%r12, %rsi
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_snd_rawmidi_new
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:
	movq	-40(%rbp), %rax
	cmpq	$0, 8(%rbx)
	movl	16(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%r12, %rsi
	callq	_strcpy
	movq	-40(%rbp), %rdi
	movq	_SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_snd_gf1_uart_output@GOTPCREL(%rip), %rdx
	callq	_snd_rawmidi_set_ops
	movq	-40(%rbp), %rdi
	movq	_SNDRV_RAWMIDI_STREAM_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_snd_gf1_uart_input@GOTPCREL(%rip), %rdx
	callq	_snd_rawmidi_set_ops
	movq	_SNDRV_RAWMIDI_INFO_OUTPUT@GOTPCREL(%rip), %rax
	movq	_SNDRV_RAWMIDI_INFO_INPUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_SNDRV_RAWMIDI_INFO_DUPLEX@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	-40(%rbp), %rax
	orl	%ecx, (%rax)
	movq	%rbx, 8(%rax)
	movq	%rax, (%rbx)
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	movq	%rax, (%r14)
LBB0_5:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GF1"

L_.str.1:                               ## @.str.1
	.asciz	"AMD InterWave"

	.comm	_SNDRV_RAWMIDI_STREAM_OUTPUT,4,2 ## @SNDRV_RAWMIDI_STREAM_OUTPUT
	.comm	_snd_gf1_uart_output,4,2        ## @snd_gf1_uart_output
	.comm	_SNDRV_RAWMIDI_STREAM_INPUT,4,2 ## @SNDRV_RAWMIDI_STREAM_INPUT
	.comm	_snd_gf1_uart_input,4,2         ## @snd_gf1_uart_input
	.comm	_SNDRV_RAWMIDI_INFO_OUTPUT,4,2  ## @SNDRV_RAWMIDI_INFO_OUTPUT
	.comm	_SNDRV_RAWMIDI_INFO_INPUT,4,2   ## @SNDRV_RAWMIDI_INFO_INPUT
	.comm	_SNDRV_RAWMIDI_INFO_DUPLEX,4,2  ## @SNDRV_RAWMIDI_INFO_DUPLEX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_gf1_rawmidi_new            ; -- Begin function snd_gf1_rawmidi_new
	.p2align	2
_snd_gf1_rawmidi_new:                   ; @snd_gf1_rawmidi_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x2, x1
	mov	x20, x0
	cbz	x19, LBB0_2
; %bb.1:
	str	xzr, [x19]
LBB0_2:
	ldr	w0, [x20, #16]
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
	add	x5, sp, #8
	mov	x1, x22
	mov	w3, #1
	mov	w4, #1
	bl	_snd_rawmidi_new
	mov	x21, x0
	tbnz	w0, #31, LBB0_5
; %bb.3:
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #16]
	ldr	x8, [x20, #8]
Lloh2:
	adrp	x9, l_.str.1@PAGE
Lloh3:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x8, #0
	csel	x1, x22, x9, eq
	bl	_strcpy
	ldr	x0, [sp, #8]
Lloh4:
	adrp	x8, _SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, _snd_gf1_uart_output@GOTPAGE
Lloh8:
	ldr	x2, [x2, _snd_gf1_uart_output@GOTPAGEOFF]
	bl	_snd_rawmidi_set_ops
	ldr	x0, [sp, #8]
Lloh9:
	adrp	x8, _SNDRV_RAWMIDI_STREAM_INPUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SNDRV_RAWMIDI_STREAM_INPUT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, _snd_gf1_uart_input@GOTPAGE
Lloh13:
	ldr	x2, [x2, _snd_gf1_uart_input@GOTPAGEOFF]
	bl	_snd_rawmidi_set_ops
Lloh14:
	adrp	x8, _SNDRV_RAWMIDI_INFO_OUTPUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SNDRV_RAWMIDI_INFO_OUTPUT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _SNDRV_RAWMIDI_INFO_INPUT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SNDRV_RAWMIDI_INFO_INPUT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh20:
	adrp	x9, _SNDRV_RAWMIDI_INFO_DUPLEX@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SNDRV_RAWMIDI_INFO_DUPLEX@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w9, w8, w9
	ldr	x8, [sp, #8]
	ldr	w10, [x8]
	orr	w9, w9, w10
	str	w9, [x8]
	str	x20, [x8, #8]
	str	x8, [x20]
	cbz	x19, LBB0_5
; %bb.4:
	str	x8, [x19]
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GF1"

l_.str.1:                               ; @.str.1
	.asciz	"AMD InterWave"

	.comm	_SNDRV_RAWMIDI_STREAM_OUTPUT,4,2 ; @SNDRV_RAWMIDI_STREAM_OUTPUT
	.comm	_snd_gf1_uart_output,4,2        ; @snd_gf1_uart_output
	.comm	_SNDRV_RAWMIDI_STREAM_INPUT,4,2 ; @SNDRV_RAWMIDI_STREAM_INPUT
	.comm	_snd_gf1_uart_input,4,2         ; @snd_gf1_uart_input
	.comm	_SNDRV_RAWMIDI_INFO_OUTPUT,4,2  ; @SNDRV_RAWMIDI_INFO_OUTPUT
	.comm	_SNDRV_RAWMIDI_INFO_INPUT,4,2   ; @SNDRV_RAWMIDI_INFO_INPUT
	.comm	_SNDRV_RAWMIDI_INFO_DUPLEX,4,2  ; @SNDRV_RAWMIDI_INFO_DUPLEX
.subsections_via_symbols
