	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si470x_get_scratch_page_versions
_si470x_get_scratch_page_versions:      ## @si470x_get_scratch_page_versions
	.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, %r14
	movq	_SCRATCH_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rdi), %rsi
	movl	%eax, (%rsi)
	movq	_SCRATCH_REPORT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_si470x_get_report
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	(%r14), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 12(%r14)
	movl	8(%rax), %eax
	movl	%eax, 8(%r14)
	jmp	LBB0_3
LBB0_1:
	movq	16(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_warn
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	sarl	$31, %ebx
	andl	%ecx, %ebx
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCRATCH_REPORT,4,2             ## @SCRATCH_REPORT
	.comm	_SCRATCH_REPORT_SIZE,4,2        ## @SCRATCH_REPORT_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"si470x_get_scratch: si470x_get_report returned %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_si470x_get_scratch_page_versions
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si470x_get_scratch_page_versions
_si470x_get_scratch_page_versions:      ; @si470x_get_scratch_page_versions
	.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	x20, x0
Lloh0:
	adrp	x8, _SCRATCH_REPORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCRATCH_REPORT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x1, [x0]
	str	w8, [x1]
Lloh3:
	adrp	x8, _SCRATCH_REPORT_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCRATCH_REPORT_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_si470x_get_report
	mov	x19, x0
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	x8, [x20]
	ldr	w9, [x8, #4]
	str	w9, [x20, #12]
	ldr	w8, [x8, #8]
	str	w8, [x20, #8]
	b	LBB0_3
LBB0_2:
	ldr	x0, [x20, #16]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_warn
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w8, w8
	and	w0, w8, w19, asr #31
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SCRATCH_REPORT,4,2             ; @SCRATCH_REPORT
	.comm	_SCRATCH_REPORT_SIZE,4,2        ; @SCRATCH_REPORT_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"si470x_get_scratch: si470x_get_report returned %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_si470x_get_scratch_page_versions
.subsections_via_symbols
