	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flashpchar
_flashpchar:                            ## @flashpchar
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	testl	%edx, %edx
	movl	$200, %r12d
	cmovnel	%edx, %r12d
	movq	_SWS0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_IN4500
	movl	%r12d, %r13d
	testl	$32768, %eax                    ## imm = 0x8000
	je	LBB0_5
## %bb.1:
	movl	%r12d, %r13d
	testl	%r12d, %r12d
	jle	LBB0_5
## %bb.2:
	movl	%r12d, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$50, %edi
	callq	_udelay
	leal	-50(%rbx), %r13d
	movq	_SWS0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_IN4500
	testl	$32768, %eax                    ## imm = 0x8000
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$50, %ebx
	movl	%r13d, %ebx
	ja	LBB0_3
LBB0_5:
	testl	%r13d, %r13d
	jle	LBB0_11
## %bb.6:
	orl	$32768, %r14d                   ## imm = 0x8000
	movq	_SWS1@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SWS0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_OUT4500
	movl	$50, %edi
	callq	_udelay
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_IN4500
	movl	%eax, %ebx
	cmpl	$50, %r12d
	jl	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	addl	$-50, %r12d
	cmpl	%r14d, %ebx
	jne	LBB0_7
LBB0_9:
	movl	(%r13), %esi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_OUT4500
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	cmpl	%r14d, %ebx
	cmovel	%r12d, %eax
	jmp	LBB0_10
LBB0_11:
	movq	(%r15), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_airo_print_info
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SWS0,4,2                       ## @SWS0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"flash putchar busywait timeout!"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SWS1,4,2                       ## @SWS1
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_flashpchar
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flashpchar
_flashpchar:                            ; @flashpchar
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	mov	w8, #200
	cmp	w2, #0
	csel	w22, w8, w2, eq
Lloh0:
	adrp	x23, _SWS0@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SWS0@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_IN4500
	mov	x21, x22
	tbz	w0, #15, LBB0_5
; %bb.1:
	mov	x21, x22
	cmp	w22, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x24, x22
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #50
	bl	_udelay
	sub	w21, w24, #50
	ldr	w1, [x23]
	mov	x0, x19
	bl	_IN4500
	tbz	w0, #15, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w24, #50
	mov	x24, x21
	b.hi	LBB0_3
LBB0_5:
	cmp	w21, #1
	b.lt	LBB0_10
; %bb.6:
	orr	w20, w20, #0x8000
Lloh2:
	adrp	x24, _SWS1@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SWS1@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	mov	x2, x20
	bl	_OUT4500
	mov	w0, #50
	bl	_udelay
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IN4500
	mov	x21, x0
	subs	w22, w22, #50
	b.lt	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w21, w20
	b.ne	LBB0_7
LBB0_9:
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #0
	bl	_OUT4500
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w21, w20
	csneg	w0, wzr, w8, eq
	b	LBB0_11
LBB0_10:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_airo_print_info
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SWS0,4,2                       ; @SWS0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"flash putchar busywait timeout!"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SWS1,4,2                       ; @SWS1
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_flashpchar
.subsections_via_symbols
