	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_rawmidi_transmit_peek      ## -- Begin function snd_rawmidi_transmit_peek
	.p2align	4, 0x90
_snd_rawmidi_transmit_peek:             ## @snd_rawmidi_transmit_peek
	.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
	movq	(%rdi), %r13
	cmpq	$0, (%r13)
	je	LBB0_1
## %bb.2:
	movl	%edx, %r12d
	movq	%rsi, %r14
	leaq	24(%r13), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movl	12(%r13), %eax
	xorl	%ebx, %ebx
	movl	%eax, %ecx
	subl	8(%r13), %ecx
	jle	LBB0_7
## %bb.3:
	cmpl	$1, %r12d
	jne	LBB0_5
## %bb.4:
	movq	(%r13), %rax
	movq	16(%r13), %rcx
	movb	(%rax,%rcx), %al
	movb	%al, (%r14)
	movl	$1, %ebx
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_snd_printd
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	movq	16(%r13), %rsi
	subl	%esi, %eax
	cmpl	%r12d, %eax
	cmovgel	%r12d, %eax
	cmpl	%ecx, %eax
	movl	%eax, %ebx
	cmovgel	%ecx, %ebx
	addq	(%r13), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_memcpy
	subl	%ebx, %r12d
	jle	LBB0_7
## %bb.6:
	movl	12(%r13), %ecx
	movl	8(%r13), %eax
	addl	%ebx, %eax
	subl	%eax, %ecx
	cmpl	%ecx, %r12d
	cmovll	%r12d, %ecx
	movl	%ecx, %r12d
	movslq	%ebx, %rax
	addq	%rax, %r14
	movq	(%r13), %rsi
	movq	%r14, %rdi
	movl	%ecx, %edx
	callq	_memcpy
	addl	%r12d, %ebx
LBB0_7:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %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	"snd_rawmidi_transmit_peek: 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_peek      ; -- Begin function snd_rawmidi_transmit_peek
	.p2align	2
_snd_rawmidi_transmit_peek:             ; @snd_rawmidi_transmit_peek
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x23, [x0]
	ldr	x8, [x23]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x22, x2
	mov	x21, x1
	add	x19, x23, #24
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldp	w8, w9, [x23, #8]
	subs	w8, w9, w8
	b.le	LBB0_5
; %bb.2:
	cmp	w22, #1
	b.ne	LBB0_6
; %bb.3:
	ldr	x8, [x23]
	ldr	x9, [x23, #16]
	ldrb	w8, [x8, x9]
	strb	w8, [x21]
	mov	w20, #1
	b	LBB0_8
LBB0_4:
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	w20, w8
	b	LBB0_9
LBB0_5:
	mov	w20, #0
	b	LBB0_8
LBB0_6:
	ldr	x10, [x23, #16]
	sub	w9, w9, w10
	cmp	w9, w22
	csel	w9, w9, w22, lt
	cmp	w9, w8
	csel	w20, w9, w8, lt
	ldr	x8, [x23]
	add	x1, x8, x10
	mov	x0, x21
	mov	x2, x20
	bl	_memcpy
	sub	w8, w22, w20
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.7:
	ldp	w10, w9, [x23, #8]
	add	w10, w20, w10
	sub	w9, w9, w10
	cmp	w8, w9
	csel	w22, w8, w9, lt
	add	x0, x21, w20, sxtw
	ldr	x1, [x23]
	mov	x2, x22
	bl	_memcpy
	add	w20, w22, w20
LBB0_8:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_9:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 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_peek: output is not active!!!\n"

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