	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cqspi_set_protocol
_cqspi_set_protocol:                    ## @cqspi_set_protocol
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	8(%rdi), %rax
	movq	_CQSPI_INST_TYPE_SINGLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 16(%rax)
	movq	%rcx, 8(%rax)
	movq	%rcx, (%rax)
	testl	%esi, %esi
	je	LBB0_4
## %bb.1:
	movl	(%rdi), %ecx
	addl	$-128, %ecx
	cmpl	$4, %ecx
	jae	LBB0_2
## %bb.3:
	movslq	%ecx, %rcx
	leaq	l_switch.table.cqspi_set_protocol(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
LBB0_4:
	callq	_cqspi_configure
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CQSPI_INST_TYPE_SINGLE,8,3     ## @CQSPI_INST_TYPE_SINGLE
	.comm	_CQSPI_INST_TYPE_DUAL,8,3       ## @CQSPI_INST_TYPE_DUAL
	.comm	_CQSPI_INST_TYPE_QUAD,8,3       ## @CQSPI_INST_TYPE_QUAD
	.comm	_CQSPI_INST_TYPE_OCTAL,8,3      ## @CQSPI_INST_TYPE_OCTAL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cqspi_set_protocol
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.cqspi_set_protocol
l_switch.table.cqspi_set_protocol:
	.quad	_CQSPI_INST_TYPE_OCTAL
	.quad	_CQSPI_INST_TYPE_QUAD
	.quad	_CQSPI_INST_TYPE_DUAL
	.quad	_CQSPI_INST_TYPE_SINGLE

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cqspi_set_protocol
_cqspi_set_protocol:                    ; @cqspi_set_protocol
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _CQSPI_INST_TYPE_SINGLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CQSPI_INST_TYPE_SINGLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	stp	x9, x9, [x8, #8]
	str	x9, [x8]
	cbz	w1, LBB0_3
; %bb.1:
	ldr	w9, [x0]
	sub	w9, w9, #128
	cmp	w9, #4
	b.hs	LBB0_4
; %bb.2:
Lloh3:
	adrp	x10, l_switch.table.cqspi_set_protocol@PAGE
Lloh4:
	add	x10, x10, l_switch.table.cqspi_set_protocol@PAGEOFF
	ldr	x9, [x10, w9, sxtw #3]
	ldr	x9, [x9]
	str	x9, [x8]
LBB0_3:
	bl	_cqspi_configure
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CQSPI_INST_TYPE_SINGLE,8,3     ; @CQSPI_INST_TYPE_SINGLE
	.comm	_CQSPI_INST_TYPE_DUAL,8,3       ; @CQSPI_INST_TYPE_DUAL
	.comm	_CQSPI_INST_TYPE_QUAD,8,3       ; @CQSPI_INST_TYPE_QUAD
	.comm	_CQSPI_INST_TYPE_OCTAL,8,3      ; @CQSPI_INST_TYPE_OCTAL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cqspi_set_protocol
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.cqspi_set_protocol
l_switch.table.cqspi_set_protocol:
	.quad	_CQSPI_INST_TYPE_OCTAL
	.quad	_CQSPI_INST_TYPE_QUAD
	.quad	_CQSPI_INST_TYPE_DUAL
	.quad	_CQSPI_INST_TYPE_SINGLE

.subsections_via_symbols
