	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltc2990_i2c_probe
_ltc2990_i2c_probe:                     ## @ltc2990_i2c_probe
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	8(%rdi), %edi
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movq	_I2C_FUNC_SMBUS_WORD_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	leaq	4(%r12), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_devm_kzalloc
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r12, 8(%r15)
	movq	%r14, %rdi
	callq	_dev_fwnode
	testq	%rax, %rax
	je	LBB0_13
## %bb.6:
	movq	(%r15), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	_device_property_read_u32_array
	testl	%eax, %eax
	js	LBB0_7
## %bb.9:
	movq	(%r15), %rax
	movl	(%rax), %edx
	movq	_LTC2990_MODE0_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	testl	%ecx, %edx
	jne	LBB0_12
## %bb.10:
	movl	4(%rax), %ebx
	movq	_LTC2990_MODE1_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%eax, %ebx
	je	LBB0_11
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_13:
	movq	_LTC2990_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_8
## %bb.14:
	movq	_LTC2990_MODE0_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %edx
	shrl	%cl, %edx
	movq	_LTC2990_MODE0_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movq	(%r15), %rsi
	movl	%edx, (%rsi)
	movq	_LTC2990_MODE1_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	%cl, %ebx
	movq	_LTC2990_MODE1_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	movl	%ebx, 4(%rsi)
	jmp	LBB0_15
LBB0_7:
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_11:
	movq	_LTC2990_MODE1_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_15:
	movq	_LTC2990_CONTROL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_LTC2990_MODE0_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movl	%eax, %ecx
	shll	%cl, %ebx
	orl	%edx, %ebx
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_16
## %bb.18:
	movq	_LTC2990_TRIGGER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_19
## %bb.20:
	movl	(%r12), %esi
	movq	_ltc2990_groups@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_devm_hwmon_device_register_with_groups
	movq	%rax, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR_OR_ZERO                ## TAILCALL
LBB0_16:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_17
LBB0_19:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_17:
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_I2C_FUNC_SMBUS_WORD_DATA,4,2   ## @I2C_FUNC_SMBUS_WORD_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lltc,meas-mode"

	.comm	_LTC2990_MODE0_MASK,4,2         ## @LTC2990_MODE0_MASK
	.comm	_LTC2990_MODE1_MASK,4,2         ## @LTC2990_MODE1_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LTC2990_CONTROL,4,2            ## @LTC2990_CONTROL
	.comm	_LTC2990_MODE0_SHIFT,4,2        ## @LTC2990_MODE0_SHIFT
	.comm	_LTC2990_MODE1_SHIFT,4,2        ## @LTC2990_MODE1_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"Error: Failed to set control mode.\n"

	.comm	_LTC2990_TRIGGER,4,2            ## @LTC2990_TRIGGER
L_.str.2:                               ## @.str.2
	.asciz	"Error: Failed to start acquisition.\n"

	.comm	_ltc2990_groups,4,2             ## @ltc2990_groups
	.no_dead_strip	_ltc2990_i2c_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltc2990_i2c_probe
_ltc2990_i2c_probe:                     ; @ltc2990_i2c_probe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGEOFF]
	ldr	w0, [x0, #8]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _I2C_FUNC_SMBUS_WORD_DATA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_FUNC_SMBUS_WORD_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_i2c_check_functionality
	cbz	w0, LBB0_3
; %bb.1:
	add	x20, x19, #4
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #16
	bl	_devm_kzalloc
	mov	x21, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.2:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	str	x19, [x21, #8]
	mov	x0, x20
	bl	_dev_fwnode
	cbz	x0, LBB0_11
; %bb.7:
	ldr	x2, [x21]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	w3, #2
	bl	_device_property_read_u32_array
	tbnz	w0, #31, LBB0_13
; %bb.8:
	ldr	x9, [x21]
	ldr	w8, [x9]
Lloh15:
	adrp	x10, _LTC2990_MODE0_MASK@GOTPAGE
Lloh16:
	ldr	x10, [x10, _LTC2990_MODE0_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	bics	wzr, w8, w10
	b.ne	LBB0_10
; %bb.9:
	ldr	w9, [x9, #4]
Lloh18:
	adrp	x10, _LTC2990_MODE1_MASK@GOTPAGE
Lloh19:
	ldr	x10, [x10, _LTC2990_MODE1_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	bics	wzr, w9, w10
	b.eq	LBB0_14
LBB0_10:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_11:
Lloh23:
	adrp	x8, _LTC2990_CONTROL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _LTC2990_CONTROL@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2c_smbus_read_byte_data
	mov	x22, x0
	tbnz	w0, #31, LBB0_5
; %bb.12:
Lloh26:
	adrp	x8, _LTC2990_MODE0_SHIFT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _LTC2990_MODE0_SHIFT@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	lsr	w8, w22, w8
Lloh29:
	adrp	x9, _LTC2990_MODE0_MASK@GOTPAGE
Lloh30:
	ldr	x9, [x9, _LTC2990_MODE0_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	and	w8, w8, w9
	ldr	x11, [x21]
	str	w8, [x11]
Lloh32:
	adrp	x9, _LTC2990_MODE1_SHIFT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _LTC2990_MODE1_SHIFT@GOTPAGEOFF]
Lloh34:
	ldr	w10, [x9]
	lsr	w9, w22, w10
Lloh35:
	adrp	x12, _LTC2990_MODE1_MASK@GOTPAGE
Lloh36:
	ldr	x12, [x12, _LTC2990_MODE1_MASK@GOTPAGEOFF]
Lloh37:
	ldr	w12, [x12]
	and	w9, w9, w12
	str	w9, [x11, #4]
	b	LBB0_15
LBB0_13:
	mov	x22, x0
	b	LBB0_5
LBB0_14:
Lloh38:
	adrp	x10, _LTC2990_MODE1_SHIFT@GOTPAGE
Lloh39:
	ldr	x10, [x10, _LTC2990_MODE1_SHIFT@GOTPAGEOFF]
Lloh40:
	ldr	w10, [x10]
LBB0_15:
Lloh41:
	adrp	x11, _LTC2990_CONTROL@GOTPAGE
Lloh42:
	ldr	x11, [x11, _LTC2990_CONTROL@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x11]
Lloh44:
	adrp	x11, _LTC2990_MODE0_SHIFT@GOTPAGE
Lloh45:
	ldr	x11, [x11, _LTC2990_MODE0_SHIFT@GOTPAGEOFF]
Lloh46:
	ldr	w11, [x11]
	lsl	w8, w8, w11
	lsl	w9, w9, w10
	orr	w2, w9, w8
	mov	x0, x19
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_18
; %bb.16:
Lloh47:
	adrp	x8, _LTC2990_TRIGGER@GOTPAGE
Lloh48:
	ldr	x8, [x8, _LTC2990_TRIGGER@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_19
; %bb.17:
	ldr	w1, [x19]
Lloh50:
	adrp	x8, _ltc2990_groups@GOTPAGE
Lloh51:
	ldr	x8, [x8, _ltc2990_groups@GOTPAGEOFF]
Lloh52:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_devm_hwmon_device_register_with_groups
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_PTR_ERR_OR_ZERO
LBB0_18:
	mov	x22, x0
Lloh53:
	adrp	x1, l_.str.1@PAGE
Lloh54:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_20
LBB0_19:
	mov	x22, x0
Lloh55:
	adrp	x1, l_.str.2@PAGE
Lloh56:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_20:
	mov	x0, x20
	bl	_dev_err
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpAdd	Lloh55, Lloh56
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_I2C_FUNC_SMBUS_WORD_DATA,4,2   ; @I2C_FUNC_SMBUS_WORD_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lltc,meas-mode"

	.comm	_LTC2990_MODE0_MASK,4,2         ; @LTC2990_MODE0_MASK
	.comm	_LTC2990_MODE1_MASK,4,2         ; @LTC2990_MODE1_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LTC2990_CONTROL,4,2            ; @LTC2990_CONTROL
	.comm	_LTC2990_MODE0_SHIFT,4,2        ; @LTC2990_MODE0_SHIFT
	.comm	_LTC2990_MODE1_SHIFT,4,2        ; @LTC2990_MODE1_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"Error: Failed to set control mode.\n"

	.comm	_LTC2990_TRIGGER,4,2            ; @LTC2990_TRIGGER
l_.str.2:                               ; @.str.2
	.asciz	"Error: Failed to start acquisition.\n"

	.comm	_ltc2990_groups,4,2             ; @ltc2990_groups
	.no_dead_strip	_ltc2990_i2c_probe
.subsections_via_symbols
