	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tsys01_read_prom
_tsys01_read_prom:                      ## @tsys01_read_prom
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_iio_priv
	movq	%rax, %r12
	movq	_TSYS01_PROM_WORDS_NB@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leal	(,%r14,8), %eax
	subl	%r14d, %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	jle	LBB0_4
## %bb.1:
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r12), %edi
	movslq	%r13d, %rsi
	movq	_TSYS01_PROM_READ@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movq	8(%r12), %rdx
	addq	%r15, %rdx
	callq	*(%r12)
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rax
	movl	(%rax,%r15), %edx
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_sprintf
	cltq
	addq	%rax, %rbx
	incq	%r14
	movq	_TSYS01_PROM_WORDS_NB@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addl	$2, %r13d
	addq	$4, %r15
	cmpq	%rax, %r14
	jl	LBB0_2
LBB0_4:
	movq	8(%r12), %rdi
	callq	_tsys01_crc_valid
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movb	$0, (%rbx)
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_dev_info
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TSYS01_PROM_WORDS_NB,4,2       ## @TSYS01_PROM_WORDS_NB
	.comm	_TSYS01_PROM_READ,8,3           ## @TSYS01_PROM_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0x%04x "

L_.str.1:                               ## @.str.1
	.asciz	"prom crc check error\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"PROM coefficients : %s\n"

	.no_dead_strip	_tsys01_read_prom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tsys01_read_prom
_tsys01_read_prom:                      ; @tsys01_read_prom
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	bl	_iio_priv
	mov	x21, x0
Lloh3:
	adrp	x24, _TSYS01_PROM_WORDS_NB@GOTPAGE
Lloh4:
	ldr	x24, [x24, _TSYS01_PROM_WORDS_NB@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	w9, w8, #3
	sub	w9, w9, w8
	add	w9, w9, #1
	add	x10, x9, #15
	and	x12, x10, #0x1fffffff0
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x20, x9, x12
	mov	sp, x20
	mov	x22, x20
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x25, #0
	mov	w26, #0
	mov	x27, #0
Lloh7:
	adrp	x28, _TSYS01_PROM_READ@GOTPAGE
Lloh8:
	ldr	x28, [x28, _TSYS01_PROM_READ@GOTPAGEOFF]
	mov	x22, x20
Lloh9:
	adrp	x23, l_.str@PAGE
Lloh10:
	add	x23, x23, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, #16]
	ldr	x8, [x28]
	add	x1, x8, w26, sxtw
	ldp	x8, x9, [x21]
	add	x2, x9, x25
	blr	x8
	cbnz	w0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x21, #8]
	ldr	w2, [x8, x25]
	mov	x0, x22
	mov	x1, x23
	bl	_sprintf
	add	x22, x22, w0, sxtw
	add	x27, x27, #1
	ldrsw	x8, [x24]
	add	w26, w26, #2
	add	x25, x25, #4
	cmp	x27, x8
	b.lt	LBB0_2
LBB0_4:
	ldr	x0, [x21, #8]
	bl	_tsys01_crc_valid
	cbz	w0, LBB0_6
; %bb.5:
	strb	wzr, [x22]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_info
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldur	x8, [x29, #-88]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_TSYS01_PROM_WORDS_NB,4,2       ; @TSYS01_PROM_WORDS_NB
	.comm	_TSYS01_PROM_READ,8,3           ; @TSYS01_PROM_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0x%04x "

l_.str.1:                               ; @.str.1
	.asciz	"prom crc check error\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"PROM coefficients : %s\n"

	.no_dead_strip	_tsys01_read_prom
.subsections_via_symbols
