	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readreg
_readreg:                               ## @readreg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%eax, %eax
	callq	_readch
	movq	_bmachine@GOTPCREL(%rip), %r14
	cmpl	$255, %eax
	jne	LBB0_6
## %bb.1:
	cmpq	$0, 8(%r14)
	je	LBB0_6
## %bb.2:
	xorl	%eax, %eax
	callq	_readch
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_readch
                                        ## kill: def $eax killed $eax def $rax
	movq	_EOF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %ebx
	je	LBB0_4
## %bb.3:
	cmpl	%ecx, %eax
	je	LBB0_4
## %bb.5:
	shll	$8, %ebx
	movq	_UCHAR_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ebx, %eax
	addl	%ecx, %eax
	incl	%eax
LBB0_6:
	testl	%eax, %eax
	js	LBB0_8
## %bb.7:
	cmpl	(%r14), %eax
	jb	LBB0_9
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	movl	$-1, %eax
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_warnx
	movl	$-1, %eax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bmachine,16,3                  ## @bmachine
	.comm	_EOF,4,2                        ## @EOF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unexpected eof"

	.comm	_UCHAR_MAX,4,2                  ## @UCHAR_MAX
L_.str.1:                               ## @.str.1
	.asciz	"internal error: reg num = %d"

	.no_dead_strip	_readreg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readreg
_readreg:                               ; @readreg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	bl	_readch
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x20, _bmachine@GOTPAGE
Lloh1:
	ldr	x20, [x20, _bmachine@GOTPAGEOFF]
	cmp	w0, #255
	b.ne	LBB0_5
; %bb.1:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.2:
	bl	_readch
	mov	x19, x0
	bl	_readch
Lloh2:
	adrp	x8, _EOF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EOF@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w19, w8
	ccmp	w0, w8, #4, ne
	b.ne	LBB0_4
; %bb.3:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
	mov	w0, #-1
	b	LBB0_7
LBB0_4:
Lloh7:
	adrp	x8, _UCHAR_MAX@GOTPAGE
Lloh8:
	ldr	x8, [x8, _UCHAR_MAX@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	add	w9, w0, w19, lsl #8
	add	w8, w9, w8
	add	w0, w8, #1
LBB0_5:
	tbnz	w0, #31, LBB0_7
; %bb.6:
	ldr	w8, [x20]
	cmp	w0, w8
	b.lo	LBB0_8
LBB0_7:
	str	x0, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
	mov	w0, #-1
LBB0_8:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_bmachine,16,3                  ; @bmachine
	.comm	_EOF,4,2                        ; @EOF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unexpected eof"

	.comm	_UCHAR_MAX,4,2                  ; @UCHAR_MAX
l_.str.1:                               ; @.str.1
	.asciz	"internal error: reg num = %d"

	.no_dead_strip	_readreg
.subsections_via_symbols
