	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tpg110_readwrite_reg
_tpg110_readwrite_reg:                  ## @tpg110_readwrite_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	%r12
	pushq	%rbx
	subq	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	-128(%rbp), %rdi
	callq	_spi_message_init
	leaq	-112(%rbp), %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	shll	$2, %ebx
	movl	%ebx, -120(%rbp)
	leaq	-116(%rbp), %rax
	movl	%r12d, -116(%rbp)
	movq	%rax, -72(%rbp)
	movl	$8, %eax
	jmp	LBB0_3
LBB0_2:
	leal	(%rbx,%rbx), %eax
	incl	%eax
	movl	%eax, -120(%rbp)
	leaq	-116(%rbp), %rax
	movq	%rax, -56(%rbp)
	movl	$7, %eax
LBB0_3:
	movl	%eax, -112(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, -104(%rbp)
	movl	$1, -96(%rbp)
	leaq	-80(%rbp), %r12
	movl	$1, -64(%rbp)
	movl	$8, -80(%rbp)
	leaq	-112(%rbp), %rdi
	leaq	-128(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_spi_message_add_tail
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_spi_message_add_tail
	movl	4(%r15), %edi
	movq	%rbx, %rsi
	callq	_spi_sync
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	jmp	LBB0_7
LBB0_5:
	xorl	%ebx, %ebx
	testl	%r14d, %r14d
	jne	LBB0_7
## %bb.6:
	movl	-116(%rbp), %ebx
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%ebx, %eax
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SPI message error %d\n"

	.no_dead_strip	_tpg110_readwrite_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tpg110_readwrite_reg
_tpg110_readwrite_reg:                  ; @tpg110_readwrite_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	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, #-40]
	add	x0, sp, #8
	bl	_spi_message_init
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	cbz	w20, LBB0_2
; %bb.1:
	lsl	w8, w22, #2
	add	x9, sp, #16
	add	x9, x9, #4
	stp	w8, w21, [sp, #16]
	str	x9, [sp, #64]
	mov	w8, #8
	b	LBB0_3
LBB0_2:
	mov	w8, #1
	bfi	w8, w22, #1, #31
	str	w8, [sp, #16]
	add	x8, sp, #16
	add	x8, x8, #4
	str	x8, [sp, #80]
	mov	w8, #7
LBB0_3:
	str	w8, [sp, #24]
	add	x8, sp, #16
	str	x8, [sp, #32]
	mov	w8, #1
	add	x9, sp, #24
	add	x21, x9, #32
	str	w8, [sp, #72]
	mov	w9, #8
	str	w8, [sp, #40]
	str	w9, [sp, #56]
	add	x0, sp, #24
	add	x1, sp, #8
	bl	_spi_message_add_tail
	add	x1, sp, #8
	mov	x0, x21
	bl	_spi_message_add_tail
	ldr	w0, [x19, #4]
	add	x1, sp, #8
	bl	_spi_sync
	cbz	w0, LBB0_5
; %bb.4:
	mov	x21, x0
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_DRM_DEV_ERROR
	b	LBB0_8
LBB0_5:
	cbz	w20, LBB0_7
; %bb.6:
	mov	w21, #0
	b	LBB0_8
LBB0_7:
	ldr	w21, [sp, #20]
LBB0_8:
	ldur	x8, [x29, #-40]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SPI message error %d\n"

	.no_dead_strip	_tpg110_readwrite_reg
.subsections_via_symbols
