	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iadc_update_offset
_iadc_update_offset:                    ## @iadc_update_offset
	.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, %rbx
	movq	_IADC_GAIN_17P857MV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, %rdx
	callq	_iadc_do_conversion
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movq	_IADC_INT_OFFSET_CSP2_CSN2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IADC_INT_RSENSE@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	shlq	$3, %rdx
	addq	8(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_iadc_do_conversion
	testl	%eax, %eax
	js	LBB0_8
## %bb.2:
	movq	(%rbx), %rdx
	movq	8(%rbx), %rax
	movq	(%r14), %rcx
	cmpq	(%rax,%rcx,8), %rdx
	jne	LBB0_4
## %bb.3:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_7
LBB0_4:
	movq	_IADC_EXT_OFFSET_CSP_CSN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_IADC_EXT_RSENSE@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	leaq	(%rax,%rcx,8), %rdx
	movq	%rbx, %rdi
	callq	_iadc_do_conversion
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	movq	(%rbx), %rdx
	movq	8(%rbx), %rcx
	movq	(%r14), %rsi
	xorl	%eax, %eax
	cmpq	(%rcx,%rsi,8), %rdx
	jne	LBB0_8
## %bb.6:
	movl	16(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IADC_GAIN_17P857MV,4,2         ## @IADC_GAIN_17P857MV
	.comm	_IADC_INT_OFFSET_CSP2_CSN2,4,2  ## @IADC_INT_OFFSET_CSP2_CSN2
	.comm	_IADC_INT_RSENSE,8,3            ## @IADC_INT_RSENSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error: internal offset == gain %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IADC_EXT_OFFSET_CSP_CSN,4,2    ## @IADC_EXT_OFFSET_CSP_CSN
	.comm	_IADC_EXT_RSENSE,8,3            ## @IADC_EXT_RSENSE
L_.str.1:                               ## @.str.1
	.asciz	"error: external offset == gain %d\n"

	.no_dead_strip	_iadc_update_offset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iadc_update_offset
_iadc_update_offset:                    ; @iadc_update_offset
	.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
Lloh0:
	adrp	x8, _IADC_GAIN_17P857MV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IADC_GAIN_17P857MV@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x0
	bl	_iadc_do_conversion
	tbnz	w0, #31, LBB0_8
; %bb.1:
Lloh3:
	adrp	x8, _IADC_INT_OFFSET_CSP2_CSN2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IADC_INT_OFFSET_CSP2_CSN2@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x20, _IADC_INT_RSENSE@GOTPAGE
Lloh7:
	ldr	x20, [x20, _IADC_INT_RSENSE@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x2, x8, x9, lsl #3
	mov	x0, x19
	bl	_iadc_do_conversion
	tbnz	w0, #31, LBB0_8
; %bb.2:
	ldp	x2, x8, [x19]
	ldr	x9, [x20]
	ldr	x9, [x8, x9, lsl #3]
	cmp	x2, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x19, #16]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_4:
Lloh10:
	adrp	x9, _IADC_EXT_OFFSET_CSP_CSN@GOTPAGE
Lloh11:
	ldr	x9, [x9, _IADC_EXT_OFFSET_CSP_CSN@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x9]
Lloh13:
	adrp	x20, _IADC_EXT_RSENSE@GOTPAGE
Lloh14:
	ldr	x20, [x20, _IADC_EXT_RSENSE@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x2, x8, x9, lsl #3
	mov	x0, x19
	bl	_iadc_do_conversion
	tbnz	w0, #31, LBB0_8
; %bb.5:
	ldp	x2, x8, [x19]
	ldr	x9, [x20]
	ldr	x8, [x8, x9, lsl #3]
	cmp	x2, x8
	b.ne	LBB0_9
; %bb.6:
	ldr	w0, [x19, #16]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	bl	_dev_err
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IADC_GAIN_17P857MV,4,2         ; @IADC_GAIN_17P857MV
	.comm	_IADC_INT_OFFSET_CSP2_CSN2,4,2  ; @IADC_INT_OFFSET_CSP2_CSN2
	.comm	_IADC_INT_RSENSE,8,3            ; @IADC_INT_RSENSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error: internal offset == gain %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IADC_EXT_OFFSET_CSP_CSN,4,2    ; @IADC_EXT_OFFSET_CSP_CSN
	.comm	_IADC_EXT_RSENSE,8,3            ; @IADC_EXT_RSENSE
l_.str.1:                               ; @.str.1
	.asciz	"error: external offset == gain %d\n"

	.no_dead_strip	_iadc_update_offset
.subsections_via_symbols
