	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_spi_setup_cs
_aw_spi_setup_cs:                       ## @aw_spi_setup_cs
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_AW_SPI_TCR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_AW_SPI_READ_4
	movq	_AW_SPI_TCR_SSSEL_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	_AW_SPI_TCR_SSSEL_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%edx, %ebx
	movq	_AW_SPI_TCR_SS_OWNER@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_AW_SPI_TCR_SS_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	notl	%ecx
	andl	%ebx, %ecx
	orl	%eax, %ebx
	testl	%r15d, %r15d
	cmovnel	%ecx, %ebx
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AW_SPI_WRITE_4                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AW_SPI_TCR,4,2                 ## @AW_SPI_TCR
	.comm	_AW_SPI_TCR_SSSEL_MASK,4,2      ## @AW_SPI_TCR_SSSEL_MASK
	.comm	_AW_SPI_TCR_SSSEL_SHIFT,4,2     ## @AW_SPI_TCR_SSSEL_SHIFT
	.comm	_AW_SPI_TCR_SS_OWNER,4,2        ## @AW_SPI_TCR_SS_OWNER
	.comm	_AW_SPI_TCR_SS_LEVEL,4,2        ## @AW_SPI_TCR_SS_LEVEL
	.no_dead_strip	_aw_spi_setup_cs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_spi_setup_cs
_aw_spi_setup_cs:                       ; @aw_spi_setup_cs
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _AW_SPI_TCR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AW_SPI_TCR@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_AW_SPI_READ_4
Lloh2:
	adrp	x8, _AW_SPI_TCR_SSSEL_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AW_SPI_TCR_SSSEL_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh5:
	adrp	x9, _AW_SPI_TCR_SSSEL_SHIFT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AW_SPI_TCR_SSSEL_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	lsl	w9, w20, w9
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _AW_SPI_TCR_SS_OWNER@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AW_SPI_TCR_SS_OWNER@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh11:
	adrp	x9, _AW_SPI_TCR_SS_LEVEL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AW_SPI_TCR_SS_LEVEL@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	bic	w10, w8, w9
	orr	w8, w9, w8
	cmp	w19, #0
	csel	w2, w8, w10, eq
	ldr	w1, [x22]
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_AW_SPI_WRITE_4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AW_SPI_TCR,4,2                 ; @AW_SPI_TCR
	.comm	_AW_SPI_TCR_SSSEL_MASK,4,2      ; @AW_SPI_TCR_SSSEL_MASK
	.comm	_AW_SPI_TCR_SSSEL_SHIFT,4,2     ; @AW_SPI_TCR_SSSEL_SHIFT
	.comm	_AW_SPI_TCR_SS_OWNER,4,2        ; @AW_SPI_TCR_SS_OWNER
	.comm	_AW_SPI_TCR_SS_LEVEL,4,2        ; @AW_SPI_TCR_SS_LEVEL
	.no_dead_strip	_aw_spi_setup_cs
.subsections_via_symbols
