	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltc2497_read
_ltc2497_read:                          ## @ltc2497_read
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	16(%rdi), %r15
	callq	_ltc2497_wait_conv
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	jne	LBB0_3
## %bb.2:
	cmpq	%r13, (%r12)
	je	LBB0_7
LBB0_3:
	movq	16(%r12), %rdi
	movq	_LTC2497_ENABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	orq	%r13, %rsi
	callq	_i2c_smbus_write_byte
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:
	movq	%r13, (%r12)
	movq	_LTC2497_CONVERSION_TIME_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep_interruptible
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_6:
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_7:
	leaq	8(%r12), %rsi
	movq	%r15, %rdi
	movl	$3, %edx
	callq	_i2c_master_recv
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.8:
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, 12(%r12)
	movl	8(%r12), %edi
	callq	_be32_to_cpu
	sarl	$14, %eax
	addl	$-131072, %eax                  ## imm = 0xFFFE0000
	movl	%eax, (%r14)
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LTC2497_ENABLE,8,3             ## @LTC2497_ENABLE
	.comm	_LTC2497_CONVERSION_TIME_MS,4,2 ## @LTC2497_CONVERSION_TIME_MS
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c_master_recv failed\n"

	.no_dead_strip	_ltc2497_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltc2497_read
_ltc2497_read:                          ; @ltc2497_read
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x23, x1
	mov	x20, x0
	ldr	x21, [x0, #16]
	bl	_ltc2497_wait_conv
	mov	x22, x0
	tbnz	w0, #31, LBB0_10
; %bb.1:
	cbnz	w22, LBB0_3
; %bb.2:
	ldr	x8, [x20]
	cmp	x8, x23
	b.eq	LBB0_6
LBB0_3:
	ldr	x0, [x20, #16]
Lloh0:
	adrp	x8, _LTC2497_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LTC2497_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	orr	x1, x8, x23
	bl	_i2c_smbus_write_byte
	tbnz	w0, #31, LBB0_8
; %bb.4:
	str	x23, [x20]
Lloh3:
	adrp	x8, _LTC2497_CONVERSION_TIME_MS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LTC2497_CONVERSION_TIME_MS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_msleep_interruptible
	cbz	x0, LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_6:
	add	x1, x20, #8
	mov	x0, x21
	mov	w2, #3
	bl	_i2c_master_recv
	mov	x22, x0
	tbnz	w0, #31, LBB0_9
; %bb.7:
	bl	_ktime_get
	str	w0, [x20, #12]
	ldr	w0, [x20, #8]
	bl	_be32_to_cpu
	asr	w8, w0, #14
	sub	w8, w8, #32, lsl #12            ; =131072
	str	w8, [x19]
	b	LBB0_10
LBB0_8:
	mov	x22, x0
	b	LBB0_10
LBB0_9:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_LTC2497_ENABLE,8,3             ; @LTC2497_ENABLE
	.comm	_LTC2497_CONVERSION_TIME_MS,4,2 ; @LTC2497_CONVERSION_TIME_MS
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c_master_recv failed\n"

	.no_dead_strip	_ltc2497_read
.subsections_via_symbols
