	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_sustain
_store_sustain:                         ## @store_sustain
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	callq	_to_hid_device
	movq	%rax, %rdi
	callq	_hid_get_drvdata
	movq	%rax, %r14
	movl	$0, -20(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_sscanf
	testq	%rax, %rax
	jle	LBB0_6
## %bb.1:
	movl	-20(%rbp), %esi
	movq	_PCMIDI_SUSTAIN_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jbe	LBB0_2
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	callq	_dbg_hid
	movl	-20(%rbp), %ecx
	movq	(%r14), %rax
	movl	%ecx, (%rax)
	cmpl	$0, -20(%rbp)
	je	LBB0_3
## %bb.4:
	xorl	%ecx, %ecx
	cmpl	$0, 8(%rax)
	setne	%cl
	jmp	LBB0_5
LBB0_3:
	xorl	%ecx, %ecx
LBB0_5:
	movl	%ecx, 4(%rax)
	movq	%rbx, %rdi
	callq	_strlen
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%u"

	.comm	_PCMIDI_SUSTAIN_MAX,4,2         ## @PCMIDI_SUSTAIN_MAX
L_.str.1:                               ## @.str.1
	.asciz	"pcmidi sysfs write sustain=%u\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_sustain
_store_sustain:                         ; @store_sustain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
	bl	_to_hid_device
	bl	_hid_get_drvdata
	mov	x20, x0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x0, x19
	bl	_sscanf
	cmp	x0, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	w1, [sp, #12]
Lloh2:
	adrp	x8, _PCMIDI_SUSTAIN_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCMIDI_SUSTAIN_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w1, w8
	b.ls	LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dbg_hid
	ldr	w9, [sp, #12]
	ldr	x8, [x20]
	str	w9, [x8]
	ldr	w9, [sp, #12]
	cbz	w9, LBB0_5
; %bb.4:
	ldr	w9, [x8, #8]
	cmp	w9, #0
	cset	w9, ne
LBB0_5:
	str	w9, [x8, #4]
	mov	x0, x19
	bl	_strlen
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%u"

	.comm	_PCMIDI_SUSTAIN_MAX,4,2         ; @PCMIDI_SUSTAIN_MAX
l_.str.1:                               ; @.str.1
	.asciz	"pcmidi sysfs write sustain=%u\n"

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