	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __reg_read
___reg_read:                            ## @__reg_read
	.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	%ecx, %r15d
	movq	%rdx, %r14
	movq	%rdi, %rax
	movl	8(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	*(%rax)
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	xorl	%eax, %eax
	callq	_r_cons_get_buffer
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	cmpb	$0, (%rax)
	je	LBB0_11
## %bb.3:
	movq	%rax, %rdi
	callq	_strdup
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_r_cons_reset
LBB0_4:
	movq	%r12, %rdi
	callq	_strlen
	movl	$1, %edi
	movl	%eax, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_r_str_trim
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_r_hex_str2bin
	testl	%eax, %eax
	jle	LBB0_7
## %bb.6:
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_R_MIN
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_memcpy
	movq	%rbx, %rdi
	callq	_free
	movq	%r12, %rdi
	callq	_free
	jmp	LBB0_10
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
	callq	_eprintf
	jmp	LBB0_9
LBB0_7:
	movq	%rbx, %rdi
	callq	_free
LBB0_8:
	movq	%r12, %rdi
	callq	_free
LBB0_9:
	movl	$-1, %r15d
LBB0_10:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dr8"

L_.str.1:                               ## @.str.1
	.asciz	"debug.io: Failed to get dr8 from io\n"

	.no_dead_strip	___reg_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __reg_read
___reg_read:                            ; @__reg_read
	.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, x3
	mov	x20, x2
	ldr	x8, [x0]
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	blr	x8
	mov	x21, x0
	cbnz	x0, LBB0_4
; %bb.1:
	bl	_r_cons_get_buffer
	cbz	x0, LBB0_7
; %bb.2:
	ldrb	w8, [x0]
	cbz	w8, LBB0_7
; %bb.3:
	bl	_strdup
	mov	x21, x0
	bl	_r_cons_reset
LBB0_4:
	mov	x0, x21
	bl	_strlen
	mov	x1, x0
	mov	w0, #1
	bl	_calloc
	cbz	x0, LBB0_9
; %bb.5:
	mov	x22, x0
	bl	_r_str_trim
	mov	x0, x21
	mov	x1, x22
	bl	_r_hex_str2bin
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x1, x0
	mov	x0, x19
	bl	_R_MIN
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_memcpy
	mov	x0, x22
	bl	_free
	mov	x0, x21
	bl	_free
	b	LBB0_11
LBB0_7:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_eprintf
	b	LBB0_10
LBB0_8:
	mov	x0, x22
	bl	_free
LBB0_9:
	mov	x0, x21
	bl	_free
LBB0_10:
	mov	w19, #-1
LBB0_11:
	mov	x0, x19
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dr8"

l_.str.1:                               ; @.str.1
	.asciz	"debug.io: Failed to get dr8 from io\n"

	.no_dead_strip	___reg_read
.subsections_via_symbols
