	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	callq	_halInit
	xorl	%eax, %eax
	callq	_chSysInit
	xorl	%eax, %eax
	callq	_keyboard_setup
	movq	_USB_DRIVER@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_init_usb_driver
	movq	_sendchar_pf@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_init_printf
	movl	$50, %edi
	callq	_wait_ms
	leaq	L_.str(%rip), %rdi
	callq	_print
	xorl	%eax, %eax
	callq	_keyboard_init
	movq	_chibios_driver@GOTPCREL(%rip), %rdi
	callq	_host_set_driver
	leaq	L_.str.1(%rip), %rdi
	callq	_print
	movq	_USB_SUSPENDED@GOTPCREL(%rip), %r15
	leaq	L_.str.2(%rip), %r14
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_send_keyboard_report
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_keyboard_task
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_print
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	xorl	%eax, %eax
	callq	_suspend_power_down
	xorl	%eax, %eax
	callq	_suspend_wakeup_condition
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	%rbx, %rdi
	callq	_usbWakeupHost
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_DRIVER,8,3                 ## @USB_DRIVER
	.comm	_sendchar_pf,4,2                ## @sendchar_pf
	.comm	_chibios_driver,4,2             ## @chibios_driver
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"USB configured.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Keyboard start.\n"

	.comm	_USB_SUSPENDED,8,3              ## @USB_SUSPENDED
L_.str.2:                               ## @.str.2
	.asciz	"[s]"

	.comm	_USB_ACTIVE,8,3                 ## @USB_ACTIVE
.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	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
	bl	_halInit
	bl	_chSysInit
	bl	_keyboard_setup
Lloh0:
	adrp	x19, _USB_DRIVER@GOTPAGE
Lloh1:
	ldr	x19, [x19, _USB_DRIVER@GOTPAGEOFF]
	mov	x0, x19
	bl	_init_usb_driver
Lloh2:
	adrp	x8, _sendchar_pf@GOTPAGE
Lloh3:
	ldr	x8, [x8, _sendchar_pf@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, #0
	bl	_init_printf
	mov	w0, #50
	bl	_wait_ms
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_print
	bl	_keyboard_init
Lloh7:
	adrp	x0, _chibios_driver@GOTPAGE
Lloh8:
	ldr	x0, [x0, _chibios_driver@GOTPAGEOFF]
	bl	_host_set_driver
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_print
Lloh11:
	adrp	x21, _USB_SUSPENDED@GOTPAGE
Lloh12:
	ldr	x21, [x21, _USB_SUSPENDED@GOTPAGEOFF]
Lloh13:
	adrp	x20, l_.str.2@PAGE
Lloh14:
	add	x20, x20, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_send_keyboard_report
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_keyboard_task
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_print
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	bl	_suspend_power_down
	bl	_suspend_wakeup_condition
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x19
	bl	_usbWakeupHost
	b	LBB0_5
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_DRIVER,8,3                 ; @USB_DRIVER
	.comm	_sendchar_pf,4,2                ; @sendchar_pf
	.comm	_chibios_driver,4,2             ; @chibios_driver
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"USB configured.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Keyboard start.\n"

	.comm	_USB_SUSPENDED,8,3              ; @USB_SUSPENDED
l_.str.2:                               ; @.str.2
	.asciz	"[s]"

	.comm	_USB_ACTIVE,8,3                 ; @USB_ACTIVE
.subsections_via_symbols
