	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jsa1212_power_off
_jsa1212_power_off:                     ## @jsa1212_power_off
	.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
	movq	%rdi, %r14
	callq	_mutex_lock
	movl	16(%r14), %edi
	movq	_JSA1212_CONF_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_JSA1212_CONF_ALS_MASK@GOTPCREL(%rip), %rax
	movq	_JSA1212_CONF_PXS_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_JSA1212_CONF_ALS_DISABLE@GOTPCREL(%rip), %rax
	movq	_JSA1212_CONF_PXS_DISABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_2:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_JSA1212_CONF_REG,4,2           ## @JSA1212_CONF_REG
	.comm	_JSA1212_CONF_ALS_MASK,4,2      ## @JSA1212_CONF_ALS_MASK
	.comm	_JSA1212_CONF_PXS_MASK,4,2      ## @JSA1212_CONF_PXS_MASK
	.comm	_JSA1212_CONF_ALS_DISABLE,4,2   ## @JSA1212_CONF_ALS_DISABLE
	.comm	_JSA1212_CONF_PXS_DISABLE,4,2   ## @JSA1212_CONF_PXS_DISABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"power off cmd failed\n"

	.no_dead_strip	_jsa1212_power_off
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jsa1212_power_off
_jsa1212_power_off:                     ; @jsa1212_power_off
	.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
	mov	x19, x0
	bl	_mutex_lock
	ldr	w0, [x19, #16]
Lloh0:
	adrp	x8, _JSA1212_CONF_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _JSA1212_CONF_REG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _JSA1212_CONF_ALS_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _JSA1212_CONF_ALS_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _JSA1212_CONF_PXS_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _JSA1212_CONF_PXS_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _JSA1212_CONF_ALS_DISABLE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _JSA1212_CONF_ALS_DISABLE@GOTPAGEOFF]
	orr	w2, w9, w8
Lloh11:
	ldr	w8, [x10]
Lloh12:
	adrp	x9, _JSA1212_CONF_PXS_DISABLE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _JSA1212_CONF_PXS_DISABLE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w3, w9, w8
	bl	_regmap_update_bits
	mov	x20, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	x0, [x19, #8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_2:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_JSA1212_CONF_REG,4,2           ; @JSA1212_CONF_REG
	.comm	_JSA1212_CONF_ALS_MASK,4,2      ; @JSA1212_CONF_ALS_MASK
	.comm	_JSA1212_CONF_PXS_MASK,4,2      ; @JSA1212_CONF_PXS_MASK
	.comm	_JSA1212_CONF_ALS_DISABLE,4,2   ; @JSA1212_CONF_ALS_DISABLE
	.comm	_JSA1212_CONF_PXS_DISABLE,4,2   ; @JSA1212_CONF_PXS_DISABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"power off cmd failed\n"

	.no_dead_strip	_jsa1212_power_off
.subsections_via_symbols
