	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_rawmidi_transmit_ack       ## -- Begin function snd_rawmidi_transmit_ack
	.p2align	4, 0x90
_snd_rawmidi_transmit_ack:              ## @snd_rawmidi_transmit_ack
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rbx
	cmpq	$0, 32(%rbx)
	je	LBB0_1
## %bb.2:
	movl	%esi, %r15d
	movq	%rdi, %r12
	leaq	12(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %eax
	addl	%r15d, %eax
	xorl	%edi, %edi
	cmpl	4(%rbx), %eax
	setg	%dil
	callq	_snd_BUG_ON
	movl	8(%rbx), %eax
	addl	%r15d, %eax
	cltd
	idivl	4(%rbx)
	movl	%edx, 8(%rbx)
	addl	%r15d, (%rbx)
	addl	%r15d, (%r12)
	testl	%r15d, %r15d
	jle	LBB0_6
## %bb.3:
	cmpq	$0, 24(%rbx)
	jne	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	callq	_snd_rawmidi_ready
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_wake_up
LBB0_6:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_snd_printd
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"snd_rawmidi_transmit_ack: output is not active!!!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_rawmidi_transmit_ack       ; -- Begin function snd_rawmidi_transmit_ack
	.p2align	2
_snd_rawmidi_transmit_ack:              ; @snd_rawmidi_transmit_ack
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x22, [x0, #8]
	ldr	x8, [x22, #32]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x19, x1
	mov	x21, x0
	add	x20, x22, #12
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldp	w8, w9, [x22]
	add	w8, w8, w19
	cmp	w8, w9
	cset	w0, gt
	bl	_snd_BUG_ON
	ldp	w9, w8, [x22, #4]
	add	w8, w8, w19
	ldr	w10, [x22]
	sdiv	w11, w8, w9
	msub	w8, w11, w9, w8
	str	w8, [x22, #8]
	add	w8, w10, w19
	str	w8, [x22]
	ldr	w8, [x21]
	add	w8, w8, w19
	str	w8, [x21]
	cmp	w19, #1
	b.lt	LBB0_5
; %bb.2:
	ldr	x8, [x22, #24]
	cbnz	x8, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_snd_rawmidi_ready
	cbz	x0, LBB0_5
LBB0_4:
	add	x0, x22, #16
	bl	_wake_up
LBB0_5:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	b	LBB0_7
LBB0_6:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printd
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"snd_rawmidi_transmit_ack: output is not active!!!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
