	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ina3221_read_curr
_ina3221_read_curr:                     ## @ina3221_read_curr
	.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
	movq	%rcx, %r15
	movl	%edx, %r14d
	movq	%rsi, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r13
	leaq	-128(%rbx), %rax
	cmpq	$4, %rax
	ja	LBB0_14
## %bb.1:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	24(%r13), %rcx
	movslq	%r14d, %rdx
	movl	(%rcx,%rdx,4), %r15d
	movq	_ina3221_curr_reg@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	(%rcx,%rdx,8), %r12
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_9:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_ina3221_is_enabled
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	(%r13), %rax
	movl	(%rax,%r12,4), %edi
	leaq	-44(%rbp), %rsi
	callq	_regmap_field_read
	testl	%eax, %eax
	jne	LBB0_16
## %bb.12:
	movslq	-44(%rbp), %rax
	jmp	LBB0_13
LBB0_14:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_2:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_ina3221_is_enabled
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	cmpl	$0, 16(%r13)
	je	LBB0_6
## %bb.5:
	movl	8(%r13), %edx
	movl	12(%r13), %edi
	movq	_INA3221_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
LBB0_6:
	movq	%r13, %rdi
	callq	_ina3221_wait_for_data
	testl	%eax, %eax
	jne	LBB0_16
LBB0_7:
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_ina3221_read_value
	testl	%eax, %eax
	jne	LBB0_16
## %bb.8:
	imull	$40000, -44(%rbp), %edi         ## imm = 0x9C40
	movl	%r15d, %esi
	callq	_DIV_ROUND_CLOSEST
LBB0_13:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_3:
	movq	_ENODATA@GOTPCREL(%rip), %rcx
LBB0_15:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_7
	.long	L0_0_set_2
	.long	L0_0_set_9
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_ina3221_curr_reg,8,3           ## @ina3221_curr_reg
	.comm	_ENODATA,4,2                    ## @ENODATA
	.comm	_INA3221_CONFIG,4,2             ## @INA3221_CONFIG
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_ina3221_read_curr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ina3221_read_curr
_ina3221_read_curr:                     ; @ina3221_read_curr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x3
	mov	x23, x2
	mov	x22, x1
	bl	_dev_get_drvdata
	sub	x8, x22, #128
	cmp	x8, #4
	b.hi	LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x9, [x0, #24]
	ldr	w21, [x9, w23, sxtw #2]
Lloh0:
	adrp	x9, _ina3221_curr_reg@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ina3221_curr_reg@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x9, [x9, x22, lsl #3]
	ldr	x22, [x9, w23, sxtw #3]
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	x0, x20
	mov	x1, x23
	bl	_ina3221_is_enabled
	cbz	w0, LBB0_12
; %bb.3:
	ldr	x8, [x20]
	ldr	w0, [x8, x22, lsl #2]
	add	x1, sp, #12
	bl	_regmap_field_read
	cbnz	w0, LBB0_15
; %bb.4:
	ldrsw	x8, [sp, #12]
	str	x8, [x19]
	b	LBB0_15
LBB0_5:
Lloh5:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_14
LBB0_6:
	mov	x0, x20
	mov	x1, x23
	bl	_ina3221_is_enabled
	cbz	w0, LBB0_13
; %bb.7:
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_9
; %bb.8:
Lloh7:
	adrp	x8, _INA3221_CONFIG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _INA3221_CONFIG@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldp	w2, w0, [x20, #8]
	bl	_regmap_write
LBB0_9:
	mov	x0, x20
	bl	_ina3221_wait_for_data
	cbnz	w0, LBB0_15
LBB0_10:
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x22
	bl	_ina3221_read_value
	cbnz	w0, LBB0_15
; %bb.11:
	ldr	w8, [sp, #12]
	mov	w9, #40000
	mul	w0, w8, w9
	mov	x1, x21
	bl	_DIV_ROUND_CLOSEST
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19]
	b	LBB0_15
LBB0_12:
	str	xzr, [x19]
	b	LBB0_15
LBB0_13:
Lloh10:
	adrp	x8, _ENODATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
                                        ; -- End function
	.comm	_ina3221_curr_reg,8,3           ; @ina3221_curr_reg
	.comm	_ENODATA,4,2                    ; @ENODATA
	.comm	_INA3221_CONFIG,4,2             ; @INA3221_CONFIG
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_ina3221_read_curr
.subsections_via_symbols
