	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fm_power_down
_fm_power_down:                         ## @fm_power_down
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_FM_CORE_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%rbx), %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %rax
	movq	_FM_MODE_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_fmdbg
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_fmerr
	movq	_EPERM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_4:
	movl	$0, -12(%rbp)
	movq	_FM_POWER_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REG_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	$0, (%rsp)
	leaq	-12(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$4, %r8d
	xorl	%r9d, %r9d
	callq	_fmc_send_cmd
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_fmc_release
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FM_CORE_READY,4,2              ## @FM_CORE_READY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FM core is not ready\n"

	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_FM_MODE_OFF,8,3                ## @FM_MODE_OFF
L_.str.1:                               ## @.str.1
	.asciz	"FM chip is already in OFF state\n"

	.comm	_FM_POWER_MODE,4,2              ## @FM_POWER_MODE
	.comm	_REG_WR,4,2                     ## @REG_WR
	.no_dead_strip	_fm_power_down
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fm_power_down
_fm_power_down:                         ; @fm_power_down
	.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, x0
Lloh0:
	adrp	x8, _FM_CORE_READY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FM_CORE_READY@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_test_bit
	cbz	w0, LBB0_3
; %bb.1:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _FM_MODE_OFF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FM_MODE_OFF@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fmdbg
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fmerr
Lloh10:
	adrp	x8, _EPERM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	str	wzr, [sp, #12]
Lloh13:
	adrp	x8, _FM_POWER_MODE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FM_POWER_MODE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _REG_WR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _REG_WR@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	mov	x5, #0
	mov	x6, #0
	bl	_fmc_send_cmd
	tbnz	w0, #31, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_fmc_release
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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_FM_CORE_READY,4,2              ; @FM_CORE_READY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FM core is not ready\n"

	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_FM_MODE_OFF,8,3                ; @FM_MODE_OFF
l_.str.1:                               ; @.str.1
	.asciz	"FM chip is already in OFF state\n"

	.comm	_FM_POWER_MODE,4,2              ; @FM_POWER_MODE
	.comm	_REG_WR,4,2                     ; @REG_WR
	.no_dead_strip	_fm_power_down
.subsections_via_symbols
