	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sja1105_ptpegr_ts_poll         ## -- Begin function sja1105_ptpegr_ts_poll
	.p2align	4, 0x90
_sja1105_ptpegr_ts_poll:                ## @sja1105_ptpegr_ts_poll
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	8(%rax), %r13
	movslq	%esi, %r14
	movq	_SPI_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	(%r13), %rcx
	movl	(%rcx,%r14,4), %edx
	movl	4(%rax), %r8d
	leaq	-80(%rbp), %rcx
	callq	_sja1105_spi_send_packed_buf
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movl	$-10, %r12d
	leaq	-80(%rbp), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movl	4(%rax), %r8d
	movq	%r15, %rdi
	leaq	-96(%rbp), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_sja1105_unpack
	cmpq	$0, -96(%rbp)
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$10, %edi
	movl	$50, %esi
	callq	_usleep_range
	incl	%r12d
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rax
	movq	_SPI_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	(%r13), %rcx
	movl	(%rcx,%r14,4), %edx
	movl	4(%rax), %r8d
	movq	%rbx, %rdi
	movq	%r15, %rcx
	callq	_sja1105_spi_send_packed_buf
	testl	%eax, %eax
	jns	LBB0_2
	jmp	LBB0_7
LBB0_6:
	movq	(%rbx), %rax
	movl	4(%rax), %r8d
	leal	(,%r8,8), %ecx
	subl	(%rax), %ecx
	leal	-1(,%r8,8), %edx
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	$0, (%rsi)
	leaq	-80(%rbp), %rdi
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_sja1105_unpack
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movq	_ETIMEDOUT@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:
	addq	$56, %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	_SPI_READ,4,2                   ## @SPI_READ
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sja1105_ptpegr_ts_poll         ; -- Begin function sja1105_ptpegr_ts_poll
	.p2align	2
_sja1105_ptpegr_ts_poll:                ; @sja1105_ptpegr_ts_poll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x8, [x0]
Lloh3:
	adrp	x22, _SPI_READ@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SPI_READ@GOTPAGEOFF]
	ldr	x23, [x8, #8]
	ldr	w1, [x22]
	ldr	x9, [x23]
	ldr	w2, [x9, w21, sxtw #2]
	ldr	w4, [x8, #4]
	add	x3, sp, #8
	bl	_sja1105_spi_send_packed_buf
	tbnz	w0, #31, LBB0_7
; %bb.1:
	sxtw	x21, w21
	mov	w24, #-10
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	w4, [x8, #4]
	add	x0, sp, #8
	mov	x1, sp
	mov	w2, #0
	mov	w3, #0
	bl	_sja1105_unpack
	ldr	x8, [sp]
	cbnz	x8, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #10
	mov	w1, #50
	bl	_usleep_range
	adds	w24, w24, #1
	b.hs	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20]
	ldr	w1, [x22]
	ldr	x9, [x23]
	ldr	w2, [x9, x21, lsl #2]
	ldr	w4, [x8, #4]
	add	x3, sp, #8
	mov	x0, x20
	bl	_sja1105_spi_send_packed_buf
	tbz	w0, #31, LBB0_2
	b	LBB0_7
LBB0_5:
	ldr	x8, [x20]
	ldp	w8, w4, [x8]
	lsl	w9, w4, #3
	sub	w3, w9, w8
	sub	w2, w9, #1
	str	xzr, [x19]
	add	x0, sp, #8
	mov	x1, x19
	bl	_sja1105_unpack
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldr	x8, [sp, #40]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_READ,4,2                   ; @SPI_READ
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
