	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function enter_command_mode
_enter_command_mode:                    ## @enter_command_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	xorl	%eax, %eax
	callq	_host_get_driver
	movq	_prev_driver@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_clear_keyboard
	movq	_rn42_config_driver@GOTPCREL(%rip), %rdi
	callq	_host_set_driver
	xorl	%eax, %eax
	callq	_rn42_disconnect
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_rn42_linked
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_print
	movl	$1100, %edi                     ## imm = 0x44C
	callq	_wait_ms
	leaq	L_.str.1(%rip), %rdi
	callq	_SEND_COMMAND
	movl	$600, %edi                      ## imm = 0x258
	callq	_wait_ms
	xorl	%eax, %eax
	callq	_rn42_print_response
	leaq	L_.str.2(%rip), %rdi
	callq	_SEND_COMMAND
	leaq	L_.str.3(%rip), %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	leaq	L_.str.4(%rip), %rdi
	popq	%rbp
	jmp	_SEND_COMMAND                   ## TAILCALL
LBB0_3:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_prev_driver,4,2                ## @prev_driver
	.comm	_rn42_config_driver,4,2         ## @rn42_config_driver
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Entering config mode ...\n"

L_.str.1:                               ## @.str.1
	.asciz	"$$$"

L_.str.2:                               ## @.str.2
	.asciz	"v\r\n"

L_.str.3:                               ## @.str.3
	.asciz	"v"

L_.str.4:                               ## @.str.4
	.asciz	"+\r\n"

	.no_dead_strip	_enter_command_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function enter_command_mode
_enter_command_mode:                    ; @enter_command_mode
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_host_get_driver
Lloh0:
	adrp	x8, _prev_driver@GOTPAGE
Lloh1:
	ldr	x8, [x8, _prev_driver@GOTPAGEOFF]
Lloh2:
	str	w0, [x8]
	bl	_clear_keyboard
Lloh3:
	adrp	x0, _rn42_config_driver@GOTPAGE
Lloh4:
	ldr	x0, [x0, _rn42_config_driver@GOTPAGEOFF]
	bl	_host_set_driver
	bl	_rn42_disconnect
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bl	_rn42_linked
	cbnz	x0, LBB0_1
; %bb.2:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_print
	mov	w0, #1100
	bl	_wait_ms
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_SEND_COMMAND
	mov	w0, #600
	bl	_wait_ms
	bl	_rn42_print_response
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_SEND_COMMAND
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	w2, #1
	bl	_strncmp
	cbz	x0, LBB0_4
; %bb.3:
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_SEND_COMMAND
LBB0_4:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_prev_driver,4,2                ; @prev_driver
	.comm	_rn42_config_driver,4,2         ; @rn42_config_driver
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Entering config mode ...\n"

l_.str.1:                               ; @.str.1
	.asciz	"$$$"

l_.str.2:                               ; @.str.2
	.asciz	"v\r\n"

l_.str.3:                               ; @.str.3
	.asciz	"v"

l_.str.4:                               ; @.str.4
	.asciz	"+\r\n"

	.no_dead_strip	_enter_command_mode
.subsections_via_symbols
