	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function put_wait_data
_put_wait_data:                         ## @put_wait_data
	.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	%esi, %r14d
	movq	%rdi, %r15
	movl	$-1000, %ebx                    ## imm = 0xFC18
	movq	_SR_TX_RDY@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_cosa_getstatus
	testl	%eax, (%r12)
	je	LBB0_1
## %bb.3:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_cosa_putdata8
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_4:
	movl	(%r15), %r14d
	movq	%r15, %rdi
	callq	_cosa_getstatus
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pr_info
	movl	$-1, %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SR_TX_RDY,4,2                  ## @SR_TX_RDY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cosa%d: timeout in put_wait_data (status 0x%x)\n"

	.no_dead_strip	_put_wait_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function put_wait_data
_put_wait_data:                         ; @put_wait_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	mov	w21, #-1000
Lloh0:
	adrp	x22, _SR_TX_RDY@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SR_TX_RDY@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	adds	w21, w21, #1
	b.hs	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_cosa_getstatus
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_1
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_cosa_putdata8
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	ldr	w20, [x19]
	mov	x0, x19
	bl	_cosa_getstatus
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_info
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_SR_TX_RDY,4,2                  ; @SR_TX_RDY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cosa%d: timeout in put_wait_data (status 0x%x)\n"

	.no_dead_strip	_put_wait_data
.subsections_via_symbols
