	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	callq	_SetupHardware
	xorl	%eax, %eax
	callq	_sei
	movq	_USB_DeviceState@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	_DEVICE_STATE_Configured@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	je	LBB0_4
## %bb.1:
	movl	$-254, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$4, %edi
	callq	_wait_ms
	xorl	%eax, %eax
	callq	_USB_USBTask
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movq	(%r15), %rax
	cmpq	%rax, (%r14)
	jne	LBB0_2
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_print
	xorl	%eax, %eax
	callq	_rn42_init
	xorl	%eax, %eax
	callq	_rn42_task_init
	leaq	L_.str.1(%rip), %rdi
	callq	_print
	xorl	%eax, %eax
	callq	_keyboard_init
	leaq	L_.str.2(%rip), %rdi
	callq	_print
	movq	_DEVICE_STATE_Suspended@GOTPCREL(%rip), %rbx
	leaq	L_.str.3(%rip), %r15
	movq	_USB_Device_RemoteWakeupEnabled@GOTPCREL(%rip), %r12
	jmp	LBB0_5
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_keyboard_task
	xorl	%eax, %eax
	callq	_USB_USBTask
	xorl	%eax, %eax
	callq	_rn42_task
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_rn42_rts
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %rax
	cmpq	%rax, (%r14)
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	callq	_print
	xorl	%eax, %eax
	callq	_matrix_power_down
	xorl	%eax, %eax
	callq	_suspend_power_down
	xorl	%eax, %eax
	callq	_suspend_power_down
	xorl	%eax, %eax
	callq	_suspend_power_down
	xorl	%eax, %eax
	callq	_suspend_power_down
	xorl	%eax, %eax
	callq	_suspend_power_down
	xorl	%eax, %eax
	callq	_suspend_power_down
	xorl	%eax, %eax
	callq	_suspend_power_down
	cmpq	$0, (%r12)
	je	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_suspend_wakeup_condition
	testq	%rax, %rax
	je	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_USB_Device_SendRemoteWakeup
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_DeviceState,8,3            ## @USB_DeviceState
	.comm	_DEVICE_STATE_Configured,8,3    ## @DEVICE_STATE_Configured
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\nUSB init\n"

L_.str.1:                               ## @.str.1
	.asciz	"RN-42 init\n"

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

	.comm	_DEVICE_STATE_Suspended,8,3     ## @DEVICE_STATE_Suspended
L_.str.3:                               ## @.str.3
	.asciz	"[s]"

	.comm	_USB_Device_RemoteWakeupEnabled,8,3 ## @USB_Device_RemoteWakeupEnabled
.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	_SetupHardware
	bl	_sei
Lloh0:
	adrp	x20, _USB_DeviceState@GOTPAGE
Lloh1:
	ldr	x20, [x20, _USB_DeviceState@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh2:
	adrp	x19, _DEVICE_STATE_Configured@GOTPAGE
Lloh3:
	ldr	x19, [x19, _DEVICE_STATE_Configured@GOTPAGEOFF]
	ldr	x9, [x19]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.1:
	mov	w21, #-254
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #4
	bl	_wait_ms
	bl	_USB_USBTask
	cbz	w21, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x19]
	add	w21, w21, #1
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_4:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_print
	bl	_rn42_init
	bl	_rn42_task_init
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_print
	bl	_keyboard_init
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_print
Lloh10:
	adrp	x21, _DEVICE_STATE_Suspended@GOTPAGE
Lloh11:
	ldr	x21, [x21, _DEVICE_STATE_Suspended@GOTPAGEOFF]
Lloh12:
	adrp	x19, l_.str.3@PAGE
Lloh13:
	add	x19, x19, l_.str.3@PAGEOFF
Lloh14:
	adrp	x22, _USB_Device_RemoteWakeupEnabled@GOTPAGE
Lloh15:
	ldr	x22, [x22, _USB_Device_RemoteWakeupEnabled@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	bl	_keyboard_task
	bl	_USB_USBTask
	bl	_rn42_task
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	bl	_rn42_rts
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_print
	bl	_matrix_power_down
	bl	_suspend_power_down
	bl	_suspend_power_down
	bl	_suspend_power_down
	bl	_suspend_power_down
	bl	_suspend_power_down
	bl	_suspend_power_down
	bl	_suspend_power_down
	ldr	x8, [x22]
	cbz	x8, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_suspend_wakeup_condition
	cbz	x0, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	bl	_USB_Device_SendRemoteWakeup
	b	LBB0_6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_DeviceState,8,3            ; @USB_DeviceState
	.comm	_DEVICE_STATE_Configured,8,3    ; @DEVICE_STATE_Configured
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\nUSB init\n"

l_.str.1:                               ; @.str.1
	.asciz	"RN-42 init\n"

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

	.comm	_DEVICE_STATE_Suspended,8,3     ; @DEVICE_STATE_Suspended
l_.str.3:                               ; @.str.3
	.asciz	"[s]"

	.comm	_USB_Device_RemoteWakeupEnabled,8,3 ; @USB_Device_RemoteWakeupEnabled
.subsections_via_symbols
