	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hd44780_prepare
_hd44780_prepare:                       ## @hd44780_prepare
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_open
	movq	_hd_fd@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	testq	%rbx, %rbx
	jne	LBB0_3
	jmp	LBB0_13
LBB0_1:
	movq	_EX_OSFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_err
	testq	%rbx, %rbx
	je	LBB0_13
LBB0_3:
	movb	(%rbx), %al
	testb	%al, %al
	je	LBB0_13
## %bb.4:
	incq	%rbx
	leaq	LJTI0_0(%rip), %r13
	movq	_hd_blink@GOTPCREL(%rip), %r12
	movq	_hd_cursor@GOTPCREL(%rip), %r14
	movq	_hd_font@GOTPCREL(%rip), %r15
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_EX_USAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_errx
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movzbl	(%rbx), %eax
	incq	%rbx
	testb	%al, %al
	je	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	%al, %edx
	leal	-49(%rdx), %eax
	cmpl	$21, %eax
	ja	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movslq	(%r13,%rax,4), %rax
	addq	%r13, %rax
	jmpq	*%rax
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_hd_lines@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, (%r12)
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, (%r14)
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, (%r15)
	jmp	LBB0_12
LBB0_13:
	movq	_hd_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PPIGCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_hd_cbits@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdx
	callq	_ioctl
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	_EX_IOERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_15:
	movq	_STROBE@GOTPCREL(%rip), %r14
	movq	_SELECTIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r14), %edx
	movq	_AUTOFEED@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	notl	%edx
	andl	(%rbx), %edx
	movl	%edx, (%rbx)
	leaq	L_.str.3(%rip), %rsi
	movl	$2, %edi
	callq	_debug
	movl	(%r14), %edi
	callq	_hd_sctrl
	xorl	%edi, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hd_sdata                       ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_hd_fd,4,2                      ## @hd_fd
	.comm	_EX_OSFILE,4,2                  ## @EX_OSFILE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't open '%s'"

	.comm	_hd_lines,4,2                   ## @hd_lines
	.comm	_hd_blink,4,2                   ## @hd_blink
	.comm	_hd_cursor,4,2                  ## @hd_cursor
	.comm	_hd_font,4,2                    ## @hd_font
	.comm	_EX_USAGE,4,2                   ## @EX_USAGE
L_.str.1:                               ## @.str.1
	.asciz	"hd44780: unknown option code '%c'"

	.comm	_PPIGCTRL,4,2                   ## @PPIGCTRL
	.comm	_hd_cbits,4,2                   ## @hd_cbits
	.comm	_EX_IOERR,4,2                   ## @EX_IOERR
L_.str.2:                               ## @.str.2
	.asciz	"ioctl PPIGCTRL failed (not a ppi device?)"

	.comm	_STROBE,4,2                     ## @STROBE
	.comm	_SELECTIN,4,2                   ## @SELECTIN
	.comm	_AUTOFEED,4,2                   ## @AUTOFEED
L_.str.3:                               ## @.str.3
	.asciz	"static control bits 0x%x"

	.no_dead_strip	_hd44780_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hd44780_prepare
_hd44780_prepare:                       ; @hd44780_prepare
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_open
Lloh3:
	adrp	x21, _hd_fd@GOTPAGE
Lloh4:
	ldr	x21, [x21, _hd_fd@GOTPAGEOFF]
	str	w0, [x21]
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.1:
	cbnz	x19, LBB0_3
	b	LBB0_13
LBB0_2:
Lloh5:
	adrp	x8, _EX_OSFILE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EX_OSFILE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
	cbz	x19, LBB0_13
LBB0_3:
	ldrb	w8, [x19]
	cbz	w8, LBB0_13
; %bb.4:
Lloh10:
	adrp	x20, _EX_USAGE@GOTPAGE
Lloh11:
	ldr	x20, [x20, _EX_USAGE@GOTPAGEOFF]
Lloh12:
	adrp	x22, _hd_lines@GOTPAGE
Lloh13:
	ldr	x22, [x22, _hd_lines@GOTPAGEOFF]
	add	x23, x19, #1
	mov	w24, #1
Lloh14:
	adrp	x19, l_.str.1@PAGE
Lloh15:
	add	x19, x19, l_.str.1@PAGEOFF
Lloh16:
	adrp	x25, _hd_blink@GOTPAGE
Lloh17:
	ldr	x25, [x25, _hd_blink@GOTPAGEOFF]
Lloh18:
	adrp	x26, _hd_cursor@GOTPAGE
Lloh19:
	ldr	x26, [x26, _hd_cursor@GOTPAGEOFF]
Lloh20:
	adrp	x27, _hd_font@GOTPAGE
Lloh21:
	ldr	x27, [x27, _hd_font@GOTPAGEOFF]
Lloh22:
	adrp	x28, lJTI0_0@PAGE
Lloh23:
	add	x28, x28, lJTI0_0@PAGEOFF
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x20]
	mov	x1, x19
	bl	_errx
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldrb	w8, [x23], #1
	cbz	w8, LBB0_13
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	sxtb	w2, w8
	sub	w8, w2, #49
	cmp	w8, #21
	b.hi	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	adr	x9, LBB0_5
	ldrb	w10, [x28, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	str	w24, [x22]
	b	LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	str	w24, [x25]
	b	LBB0_6
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	str	w24, [x26]
	b	LBB0_6
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	str	w24, [x27]
	b	LBB0_6
LBB0_13:
	ldr	w0, [x21]
Lloh24:
	adrp	x8, _PPIGCTRL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PPIGCTRL@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x19, _hd_cbits@GOTPAGE
Lloh28:
	ldr	x19, [x19, _hd_cbits@GOTPAGEOFF]
	mov	x2, x19
	bl	_ioctl
	cbz	x0, LBB0_15
; %bb.14:
Lloh29:
	adrp	x8, _EX_IOERR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EX_IOERR@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_err
LBB0_15:
Lloh34:
	adrp	x20, _STROBE@GOTPAGE
Lloh35:
	ldr	x20, [x20, _STROBE@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh36:
	adrp	x9, _SELECTIN@GOTPAGE
Lloh37:
	ldr	x9, [x9, _SELECTIN@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
Lloh39:
	adrp	x10, _AUTOFEED@GOTPAGE
Lloh40:
	ldr	x10, [x10, _AUTOFEED@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh41:
	ldr	w9, [x10]
	orr	w8, w8, w9
	ldr	w9, [x19]
	bic	w2, w9, w8
	str	w2, [x19]
Lloh42:
	adrp	x1, l_.str.3@PAGE
Lloh43:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #2
	bl	_debug
	ldr	w0, [x20]
	bl	_hd_sctrl
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_hd_sdata
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_10-LBB0_5)>>2
	.byte	(LBB0_11-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_12-LBB0_5)>>2
                                        ; -- End function
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_hd_fd,4,2                      ; @hd_fd
	.comm	_EX_OSFILE,4,2                  ; @EX_OSFILE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't open '%s'"

	.comm	_hd_lines,4,2                   ; @hd_lines
	.comm	_hd_blink,4,2                   ; @hd_blink
	.comm	_hd_cursor,4,2                  ; @hd_cursor
	.comm	_hd_font,4,2                    ; @hd_font
	.comm	_EX_USAGE,4,2                   ; @EX_USAGE
l_.str.1:                               ; @.str.1
	.asciz	"hd44780: unknown option code '%c'"

	.comm	_PPIGCTRL,4,2                   ; @PPIGCTRL
	.comm	_hd_cbits,4,2                   ; @hd_cbits
	.comm	_EX_IOERR,4,2                   ; @EX_IOERR
l_.str.2:                               ; @.str.2
	.asciz	"ioctl PPIGCTRL failed (not a ppi device?)"

	.comm	_STROBE,4,2                     ; @STROBE
	.comm	_SELECTIN,4,2                   ; @SELECTIN
	.comm	_AUTOFEED,4,2                   ; @AUTOFEED
l_.str.3:                               ; @.str.3
	.asciz	"static control bits 0x%x"

	.no_dead_strip	_hd44780_prepare
.subsections_via_symbols
