	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ina3221_write_enable
_ina3221_write_enable:                  ## @ina3221_write_enable
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_INA3221_CONFIG_CHx_EN
	movl	%eax, %r14d
	movl	(%r13), %eax
	movl	%eax, %ecx
	andl	%r14d, %ecx
	testl	%r12d, %r12d
	movl	%r14d, %r15d
	cmovel	%r12d, %r15d
	xorl	%ebx, %ebx
	cmpl	%r15d, %ecx
	je	LBB0_10
## %bb.1:
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.2:
	movl	4(%r13), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_11
## %bb.3:
	movl	(%r13), %eax
LBB0_4:
	notl	%r14d
	andl	%eax, %r14d
	orl	%r15d, %r14d
	movl	8(%r13), %edi
	movq	_INA3221_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:
	movl	%eax, %r15d
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movl	4(%r13), %edi
	callq	_pm_runtime_put_sync
LBB0_9:
	movl	%r15d, %ebx
	jmp	LBB0_10
LBB0_5:
	movl	%r14d, (%r13)
	testl	%r12d, %r12d
	jne	LBB0_10
## %bb.6:
	movl	4(%r13), %edi
	callq	_pm_runtime_put_sync
	jmp	LBB0_10
LBB0_11:
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get PM runtime\n"

	.comm	_INA3221_CONFIG,4,2             ## @INA3221_CONFIG
L_.str.1:                               ## @.str.1
	.asciz	"Failed to enable channel %d: error %d\n"

	.no_dead_strip	_ina3221_write_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ina3221_write_enable
_ina3221_write_enable:                  ; @ina3221_write_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	bl	_dev_get_drvdata
	mov	x19, x0
	mov	x0, x21
	bl	_INA3221_CONFIG_CHx_EN
	mov	w23, #0
	ldr	w8, [x19]
	and	w9, w8, w0
	cmp	w22, #0
	csel	w25, wzr, w0, eq
	cmp	w9, w25
	b.eq	LBB0_11
; %bb.1:
	mov	x24, x0
	cbz	w22, LBB0_4
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_10
; %bb.3:
	ldr	w8, [x19]
LBB0_4:
	bic	w8, w8, w24
	orr	w24, w8, w25
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x8, _INA3221_CONFIG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INA3221_CONFIG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x24
	bl	_regmap_write
	cbz	w0, LBB0_7
; %bb.5:
	mov	x23, x0
	cbz	w22, LBB0_11
; %bb.6:
	stp	x21, x23, [sp]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w0, [x19, #4]
	bl	_pm_runtime_put_sync
	b	LBB0_11
LBB0_7:
	str	w24, [x19]
	cbnz	w22, LBB0_9
; %bb.8:
	ldr	w0, [x19, #4]
	bl	_pm_runtime_put_sync
LBB0_9:
	mov	w23, #0
	b	LBB0_11
LBB0_10:
	mov	x23, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_11:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get PM runtime\n"

	.comm	_INA3221_CONFIG,4,2             ; @INA3221_CONFIG
l_.str.1:                               ; @.str.1
	.asciz	"Failed to enable channel %d: error %d\n"

	.no_dead_strip	_ina3221_write_enable
.subsections_via_symbols
