	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ma901_set_stereo
_ma901_set_stereo:                      ## @ma901_set_stereo
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movl	$10, (%rax)
	movq	_MA901_RADIO_SET_MONO_STEREO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movl	%esi, 8(%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 12(%rax)
	movl	$0, 28(%rax)
	movl	12(%rdi), %ebx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_BUFFER_LENGTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movq	_USB_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r11d
	subq	$8, %rsp
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$9, %edx
	movl	$33, %ecx
	movl	$768, %r8d                      ## imm = 0x300
	xorl	%r9d, %r9d
	pushq	%r11
	pushq	%r10
	pushq	(%r15)
	callq	_usb_control_msg
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movq	_MA901_WANT_STEREO@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_2
## %bb.3:
	movq	_V4L2_TUNER_MODE_STEREO@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_2:
	movq	_V4L2_TUNER_MODE_MONO@GOTPCREL(%rip), %rcx
LBB0_4:
	movl	(%rcx), %ecx
	movl	%ecx, 8(%r15)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MA901_RADIO_SET_MONO_STEREO,4,2 ## @MA901_RADIO_SET_MONO_STEREO
	.comm	_BUFFER_LENGTH,4,2              ## @BUFFER_LENGTH
	.comm	_USB_TIMEOUT,4,2                ## @USB_TIMEOUT
	.comm	_MA901_WANT_STEREO,4,2          ## @MA901_WANT_STEREO
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ## @V4L2_TUNER_MODE_STEREO
	.comm	_V4L2_TUNER_MODE_MONO,4,2       ## @V4L2_TUNER_MODE_MONO
	.no_dead_strip	_ma901_set_stereo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ma901_set_stereo
_ma901_set_stereo:                      ; @ma901_set_stereo
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	mov	w9, #10
	str	w9, [x8]
Lloh0:
	adrp	x9, _MA901_RADIO_SET_MONO_STEREO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MA901_RADIO_SET_MONO_STEREO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	stp	w9, w1, [x8, #4]
	stur	xzr, [x8, #20]
	stur	xzr, [x8, #12]
	str	wzr, [x8, #28]
	ldr	w21, [x0, #12]
	mov	x0, x21
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
	ldr	x6, [x19]
Lloh3:
	adrp	x8, _BUFFER_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BUFFER_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w7, [x8]
Lloh6:
	adrp	x8, _USB_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _USB_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x21
	mov	w2, #9
	mov	w3, #33
	mov	w4, #768
	mov	w5, #0
	bl	_usb_control_msg
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _MA901_WANT_STEREO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MA901_WANT_STEREO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _V4L2_TUNER_MODE_STEREO@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_TUNER_MODE_STEREO@GOTPAGEOFF]
Lloh14:
	adrp	x10, _V4L2_TUNER_MODE_MONO@GOTPAGE
Lloh15:
	ldr	x10, [x10, _V4L2_TUNER_MODE_MONO@GOTPAGEOFF]
	cmp	w8, w20
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	str	w8, [x19, #8]
LBB0_2:
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MA901_RADIO_SET_MONO_STEREO,4,2 ; @MA901_RADIO_SET_MONO_STEREO
	.comm	_BUFFER_LENGTH,4,2              ; @BUFFER_LENGTH
	.comm	_USB_TIMEOUT,4,2                ; @USB_TIMEOUT
	.comm	_MA901_WANT_STEREO,4,2          ; @MA901_WANT_STEREO
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ; @V4L2_TUNER_MODE_STEREO
	.comm	_V4L2_TUNER_MODE_MONO,4,2       ; @V4L2_TUNER_MODE_MONO
	.no_dead_strip	_ma901_set_stereo
.subsections_via_symbols
