	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad1938_read_reg
_ad1938_read_reg:                       ## @ad1938_read_reg
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_AD1938_SPI_BUFLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	_AD1938_SPI_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	movq	_AD1938_SPI_READ@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%rbx, -80(%rbp)
	movq	%r12, -72(%rbp)
	movl	%r13d, -64(%rbp)
	movb	%al, (%rbx)
	movb	%r15b, 1(%rbx)
	movb	$0, 2(%rbx)
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_spi_message_init
	leaq	-80(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_spi_message_add_tail
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_spi_sync
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_3
LBB0_1:
	movsbl	2(%r12), %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AD1938_SPI_BUFLEN,4,2          ## @AD1938_SPI_BUFLEN
	.comm	_AD1938_SPI_ADDR,4,2            ## @AD1938_SPI_ADDR
	.comm	_AD1938_SPI_READ,4,2            ## @AD1938_SPI_READ
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ad1938_read_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad1938_read_reg
_ad1938_read_reg:                       ; @ad1938_read_reg
	.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
	sub	sp, sp, #48
	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, #-24]
Lloh3:
	adrp	x8, _AD1938_SPI_BUFLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AD1938_SPI_BUFLEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x1fffffff0
	sub	x13, x9, x12
	mov	sp, x13
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x20, x9, x12
	mov	sp, x20
	stp	x13, x20, [x29, #-48]
	stur	w8, [x29, #-32]
Lloh10:
	adrp	x8, _AD1938_SPI_ADDR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AD1938_SPI_ADDR@GOTPAGEOFF]
Lloh12:
	adrp	x9, _AD1938_SPI_READ@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AD1938_SPI_READ@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8, lsl #1
	strb	w8, [x13]
	strb	w1, [x13, #1]
	strb	wzr, [x13, #2]
	sub	x0, x29, #56
	bl	_spi_message_init
	sub	x0, x29, #48
	sub	x1, x29, #56
	bl	_spi_message_add_tail
	ldr	w0, [x19]
	sub	x1, x29, #56
	bl	_spi_sync
	cbz	w0, LBB0_2
; %bb.1:
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	ldrsb	w0, [x20, #2]
LBB0_3:
	ldur	x8, [x29, #-24]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	sub	sp, x29, #16
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_AD1938_SPI_BUFLEN,4,2          ; @AD1938_SPI_BUFLEN
	.comm	_AD1938_SPI_ADDR,4,2            ; @AD1938_SPI_ADDR
	.comm	_AD1938_SPI_READ,4,2            ; @AD1938_SPI_READ
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_ad1938_read_reg
.subsections_via_symbols
