	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usb_amradio_open
_usb_amradio_open:                      ## @usb_amradio_open
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	callq	_video_devdata
	movl	%eax, %edi
	callq	_video_get_drvdata
	movq	%rax, %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_lock_kernel
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, (%rbx)
	movq	_AMRADIO_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_amradio_set_mute
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_WANT_STEREO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_amradio_set_stereo
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:
	movq	8(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_amradio_dev_warn
LBB0_4:
	movl	16(%rbx), %esi
	movq	%rbx, %rdi
	callq	_amradio_setfreq
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:
	movq	8(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_amradio_dev_warn
LBB0_6:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_unlock_kernel
	jmp	LBB0_7
LBB0_1:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_amradio_dev_warn
	movl	$0, (%rbx)
	xorl	%eax, %eax
	callq	_unlock_kernel
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMRADIO_START,4,2              ## @AMRADIO_START
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"radio did not start up properly\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_WANT_STEREO,4,2                ## @WANT_STEREO
L_.str.1:                               ## @.str.1
	.asciz	"set stereo failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"set frequency failed\n"

	.no_dead_strip	_usb_amradio_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usb_amradio_open
_usb_amradio_open:                      ; @usb_amradio_open
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_video_devdata
	bl	_video_get_drvdata
	mov	x19, x0
	bl	_lock_kernel
	movi.2s	v0, #1
	str	d0, [x19]
Lloh0:
	adrp	x8, _AMRADIO_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMRADIO_START@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amradio_set_mute
	tbnz	w0, #31, LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _WANT_STEREO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WANT_STEREO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amradio_set_stereo
	tbz	w0, #31, LBB0_3
; %bb.2:
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_amradio_dev_warn
LBB0_3:
	ldr	w1, [x19, #16]
	mov	x0, x19
	bl	_amradio_setfreq
	tbz	w0, #31, LBB0_5
; %bb.4:
	ldr	x0, [x19, #8]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_amradio_dev_warn
LBB0_5:
	bl	_unlock_kernel
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	ldr	x0, [x19, #8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_amradio_dev_warn
	str	wzr, [x19]
	bl	_unlock_kernel
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AMRADIO_START,4,2              ; @AMRADIO_START
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"radio did not start up properly\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_WANT_STEREO,4,2                ; @WANT_STEREO
l_.str.1:                               ; @.str.1
	.asciz	"set stereo failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"set frequency failed\n"

	.no_dead_strip	_usb_amradio_open
.subsections_via_symbols
