	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	_MCUSR@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_clock_div_1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_clock_prescale_set
	movq	_WD_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_WD_SET
	movl	$115200, %edi                   ## imm = 0x1C200
	callq	_uart_init
	xorl	%eax, %eax
	callq	_keyboard_init
	leaq	L_.str(%rip), %rdi
	callq	_print
	leaq	L_.str.1(%rip), %rdi
	callq	_print
	movq	_PORTC@GOTPCREL(%rip), %rax
	movq	_DDRC@GOTPCREL(%rip), %rcx
	orb	$48, (%rax)
	movl	(%rcx), %eax
	andl	$-49, %eax
	orl	$16, %eax
	movl	%eax, (%rcx)
	movq	_PCMSK1@GOTPCREL(%rip), %rax
	movl	$32, (%rax)
	movq	_PCICR@GOTPCREL(%rip), %rax
	movl	$2, (%rax)
	xorl	%eax, %eax
	callq	_iwrap_driver
	movq	%rax, %rdi
	callq	_host_set_driver
	leaq	L_.str.2(%rip), %rdi
	callq	_print
	xorl	%eax, %eax
	callq	_iwrap_init
	xorl	%eax, %eax
	callq	_iwrap_call
	xorl	%eax, %eax
	callq	_timer_read
	movq	_last_timer@GOTPCREL(%rip), %r14
	movl	%eax, (%r14)
	movq	_sleeping@GOTPCREL(%rip), %r15
	movq	_insomniac@GOTPCREL(%rip), %r12
	movq	_WDTO_60MS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_keyboard_task
	xorl	%eax, %eax
	callq	_matrix_is_modified
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_console
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_timer_read
	movl	%eax, (%r14)
	movl	$0, (%r15)
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_host_get_driver
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_iwrap_driver
	cmpq	%rax, %rbx
	jne	LBB0_1
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, (%r15)
	je	LBB0_1
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, (%r12)
	jne	LBB0_1
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	callq	__delay_ms
	xorl	%eax, %eax
	callq	_iwrap_sleep
	movl	(%r13), %edi
	callq	_sleep
	jmp	LBB0_1
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, (%r15)
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r14), %edi
	callq	_timer_elapsed
	cmpl	$4001, %eax                     ## imm = 0xFA1
	jl	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, (%r15)
	xorl	%eax, %eax
	callq	_iwrap_check_connection
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_MCUSR,8,3                      ## @MCUSR
	.comm	_clock_div_1,4,2                ## @clock_div_1
	.comm	_WD_OFF,4,2                     ## @WD_OFF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\nSend BREAK for UART Console Commands.\n"

L_.str.1:                               ## @.str.1
	.asciz	"suart init\n"

	.comm	_PORTC,4,2                      ## @PORTC
	.comm	_DDRC,4,2                       ## @DDRC
	.comm	_PCMSK1,4,2                     ## @PCMSK1
	.comm	_PCICR,4,2                      ## @PCICR
L_.str.2:                               ## @.str.2
	.asciz	"iwrap_init()\n"

	.comm	_last_timer,4,2                 ## @last_timer
	.comm	_sleeping,4,2                   ## @sleeping
	.comm	_insomniac,4,2                  ## @insomniac
	.comm	_WDTO_60MS,4,2                  ## @WDTO_60MS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.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
Lloh0:
	adrp	x8, _MCUSR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MCUSR@GOTPAGEOFF]
Lloh2:
	str	xzr, [x8]
Lloh3:
	adrp	x8, _clock_div_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _clock_div_1@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_clock_prescale_set
Lloh6:
	adrp	x8, _WD_OFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WD_OFF@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_WD_SET
	mov	w0, #49664
	movk	w0, #1, lsl #16
	bl	_uart_init
	bl	_keyboard_init
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_print
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_print
Lloh13:
	adrp	x8, _PORTC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PORTC@GOTPAGEOFF]
	ldr	w9, [x8]
Lloh15:
	adrp	x10, _DDRC@GOTPAGE
Lloh16:
	ldr	x10, [x10, _DDRC@GOTPAGEOFF]
	ldr	w11, [x10]
	orr	w9, w9, #0x30
	str	w9, [x8]
	and	w8, w11, #0xffffffcf
	orr	w8, w8, #0x10
	str	w8, [x10]
Lloh17:
	adrp	x8, _PCMSK1@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PCMSK1@GOTPAGEOFF]
	mov	w9, #32
Lloh19:
	str	w9, [x8]
Lloh20:
	adrp	x8, _PCICR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PCICR@GOTPAGEOFF]
	mov	w9, #2
Lloh22:
	str	w9, [x8]
	bl	_iwrap_driver
	bl	_host_set_driver
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_print
	bl	_iwrap_init
	bl	_iwrap_call
	bl	_timer_read
Lloh25:
	adrp	x20, _last_timer@GOTPAGE
Lloh26:
	ldr	x20, [x20, _last_timer@GOTPAGEOFF]
Lloh27:
	adrp	x21, _sleeping@GOTPAGE
Lloh28:
	ldr	x21, [x21, _sleeping@GOTPAGEOFF]
	str	w0, [x20]
	mov	w22, #1
Lloh29:
	adrp	x23, _insomniac@GOTPAGE
Lloh30:
	ldr	x23, [x23, _insomniac@GOTPAGEOFF]
Lloh31:
	adrp	x24, _WDTO_60MS@GOTPAGE
Lloh32:
	ldr	x24, [x24, _WDTO_60MS@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bl	_keyboard_task
	bl	_matrix_is_modified
	cbnz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_console
	cbz	x0, LBB0_7
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	bl	_timer_read
	str	w0, [x20]
	str	wzr, [x21]
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	bl	_host_get_driver
	mov	x19, x0
	bl	_iwrap_driver
	cmp	x19, x0
	b.ne	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x21]
	ldr	w9, [x23]
	cmp	w8, #0
	ccmp	w9, #0, #0, ne
	b.ne	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	bl	__delay_ms
	bl	_iwrap_sleep
	ldr	w0, [x24]
	bl	_sleep
	b	LBB0_1
LBB0_7:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x21]
	cbnz	w8, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x20]
	bl	_timer_elapsed
	cmp	w0, #4001
	b.lt	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_1 Depth=1
	str	w22, [x21]
	bl	_iwrap_check_connection
	b	LBB0_4
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MCUSR,8,3                      ; @MCUSR
	.comm	_clock_div_1,4,2                ; @clock_div_1
	.comm	_WD_OFF,4,2                     ; @WD_OFF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\nSend BREAK for UART Console Commands.\n"

l_.str.1:                               ; @.str.1
	.asciz	"suart init\n"

	.comm	_PORTC,4,2                      ; @PORTC
	.comm	_DDRC,4,2                       ; @DDRC
	.comm	_PCMSK1,4,2                     ; @PCMSK1
	.comm	_PCICR,4,2                      ; @PCICR
l_.str.2:                               ; @.str.2
	.asciz	"iwrap_init()\n"

	.comm	_last_timer,4,2                 ; @last_timer
	.comm	_sleeping,4,2                   ; @sleeping
	.comm	_insomniac,4,2                  ; @insomniac
	.comm	_WDTO_60MS,4,2                  ; @WDTO_60MS
.subsections_via_symbols
