	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xgetc                          ## -- Begin function xgetc
	.p2align	4, 0x90
_xgetc:                                 ## @xgetc
	.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	%edi, %ebx
	movq	_RBX_NOINTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OPT_CHECK
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_13
## %bb.1:
	movq	_ioctrl@GOTPCREL(%rip), %r14
	movq	_IO_KEYBOARD@GOTPCREL(%rip), %r15
	movq	_IO_SERIAL@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_12
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %eax
	testl	%eax, (%r15)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_getc
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %eax
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, (%r12)
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_sio_ischar
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movl	$1, %eax
	testl	%ebx, %ebx
	jne	LBB0_13
## %bb.8:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sio_getc                       ## TAILCALL
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_9:
	movl	$1, %eax
	testl	%ebx, %ebx
	je	LBB0_10
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%edi, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_getc                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RBX_NOINTR,4,2                 ## @RBX_NOINTR
	.comm	_ioctrl,4,2                     ## @ioctrl
	.comm	_IO_KEYBOARD,4,2                ## @IO_KEYBOARD
	.comm	_IO_SERIAL,4,2                  ## @IO_SERIAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xgetc                          ; -- Begin function xgetc
	.p2align	2
_xgetc:                                 ; @xgetc
	.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, x0
Lloh0:
	adrp	x8, _RBX_NOINTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RBX_NOINTR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_OPT_CHECK
	cbz	x0, LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	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
	ret
LBB0_3:
Lloh3:
	adrp	x20, _ioctrl@GOTPAGE
Lloh4:
	ldr	x20, [x20, _ioctrl@GOTPAGEOFF]
Lloh5:
	adrp	x21, _IO_KEYBOARD@GOTPAGE
Lloh6:
	ldr	x21, [x21, _IO_KEYBOARD@GOTPAGEOFF]
Lloh7:
	adrp	x22, _IO_SERIAL@GOTPAGE
Lloh8:
	ldr	x22, [x22, _IO_SERIAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	cbnz	w19, LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	bl	_getc
	cbnz	w0, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20]
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_sio_ischar
	cbz	x0, LBB0_4
; %bb.10:
	cbnz	w19, LBB0_13
; %bb.11:
	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	_sio_getc
LBB0_12:
	cbz	w19, LBB0_14
LBB0_13:
	mov	w0, #1
	b	LBB0_2
LBB0_14:
	mov	w0, #0
	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	_getc
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_RBX_NOINTR,4,2                 ; @RBX_NOINTR
	.comm	_ioctrl,4,2                     ; @ioctrl
	.comm	_IO_KEYBOARD,4,2                ; @IO_KEYBOARD
	.comm	_IO_SERIAL,4,2                  ; @IO_SERIAL
.subsections_via_symbols
