	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tdme_setsfr_request_sync
_tdme_setsfr_request_sync:              ## @tdme_setsfr_request_sync
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -24
	movq	%rcx, %rbx
	movq	_SPI_TDME_SETSFR_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	$3, -44(%rbp)
	movq	%rdi, -16(%rbp)
	movq	%rsi, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movq	_SPI_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	leaq	-48(%rbp), %rdi
	leaq	-88(%rbp), %rdx
	movl	$5, %esi
	callq	_cascoda_api_downstream
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	jmp	LBB0_4
LBB0_2:
	movl	-88(%rbp), %edx
	movq	_SPI_TDME_SETSFR_CONFIRM@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_3
## %bb.5:
	leaq	-80(%rbp), %rax
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
LBB0_4:
	callq	_dev_crit
	movq	_MAC_SYSTEM_ERROR@GOTPCREL(%rip), %rax
LBB0_6:
	movq	(%rax), %rax
	addq	$88, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_TDME_SETSFR_REQUEST,4,2    ## @SPI_TDME_SETSFR_REQUEST
	.comm	_SPI_IDLE,4,2                   ## @SPI_IDLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cascoda_api_downstream returned %d"

	.comm	_MAC_SYSTEM_ERROR,8,3           ## @MAC_SYSTEM_ERROR
	.comm	_SPI_TDME_SETSFR_CONFIRM,4,2    ## @SPI_TDME_SETSFR_CONFIRM
L_.str.1:                               ## @.str.1
	.asciz	"sync response to SPI_TDME_SETSFR_REQUEST was not SPI_TDME_SETSFR_CONFIRM, it was %d\n"

	.no_dead_strip	_tdme_setsfr_request_sync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tdme_setsfr_request_sync
_tdme_setsfr_request_sync:              ; @tdme_setsfr_request_sync
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x3
Lloh0:
	adrp	x8, _SPI_TDME_SETSFR_REQUEST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPI_TDME_SETSFR_REQUEST@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #3
	stp	w8, w9, [sp, #40]
	stp	x1, x0, [sp, #64]
	str	x2, [sp, #56]
Lloh3:
	adrp	x8, _SPI_IDLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPI_IDLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp]
	add	x0, sp, #40
	mov	x2, sp
	mov	w1, #5
	bl	_cascoda_api_downstream
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_2:
	ldr	w2, [sp]
Lloh8:
	adrp	x8, _SPI_TDME_SETSFR_CONFIRM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SPI_TDME_SETSFR_CONFIRM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ne	LBB0_4
; %bb.3:
	mov	x8, sp
	add	x8, x8, #8
	b	LBB0_6
LBB0_4:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	x0, x19
	bl	_dev_crit
Lloh13:
	adrp	x8, _MAC_SYSTEM_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MAC_SYSTEM_ERROR@GOTPAGEOFF]
LBB0_6:
	ldr	x0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_TDME_SETSFR_REQUEST,4,2    ; @SPI_TDME_SETSFR_REQUEST
	.comm	_SPI_IDLE,4,2                   ; @SPI_IDLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cascoda_api_downstream returned %d"

	.comm	_MAC_SYSTEM_ERROR,8,3           ; @MAC_SYSTEM_ERROR
	.comm	_SPI_TDME_SETSFR_CONFIRM,4,2    ; @SPI_TDME_SETSFR_CONFIRM
l_.str.1:                               ; @.str.1
	.asciz	"sync response to SPI_TDME_SETSFR_REQUEST was not SPI_TDME_SETSFR_CONFIRM, it was %d\n"

	.no_dead_strip	_tdme_setsfr_request_sync
.subsections_via_symbols
