	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function baycom_setmode
_baycom_setmode:                        ## @baycom_setmode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	$1, (%r14)
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	$0, (%r14)
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	$0, 4(%r14)
LBB0_6:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	$1, 4(%r14)
LBB0_8:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	$0, 8(%r14)
LBB0_10:
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	$1, 8(%r14)
LBB0_12:
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	addq	$5, %rax
	movq	%rax, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_simple_strtoul
	cmpl	$1000001, %eax                  ## imm = 0xF4241
	movl	$1000000, %ecx                  ## imm = 0xF4240
	cmovgel	%eax, %ecx
	cmpl	$25000000, %ecx                 ## imm = 0x17D7840
	movl	$25000000, %eax                 ## imm = 0x17D7840
	cmovbl	%ecx, %eax
	movl	%eax, 12(%r14)
LBB0_14:
	leaq	L_.str.7(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	addq	$4, %rax
	movq	%rax, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_simple_strtoul
	cmpl	$1001, %eax                     ## imm = 0x3E9
	movl	$1000, %ecx                     ## imm = 0x3E8
	cmovgel	%eax, %ecx
	cmpl	$1500000, %ecx                  ## imm = 0x16E360
	movl	$1500000, %eax                  ## imm = 0x16E360
	cmovbl	%ecx, %eax
	movl	%eax, 16(%r14)
LBB0_16:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"intclk"

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

L_.str.2:                               ## @.str.2
	.asciz	"intmodem"

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

L_.str.4:                               ## @.str.4
	.asciz	"noloopback"

L_.str.5:                               ## @.str.5
	.asciz	"loopback"

L_.str.6:                               ## @.str.6
	.asciz	"fclk="

L_.str.7:                               ## @.str.7
	.asciz	"bps="

	.no_dead_strip	_baycom_setmode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function baycom_setmode
_baycom_setmode:                        ; @baycom_setmode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_strstr
	cbz	x0, LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x19]
LBB0_2:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_strstr
	cbz	x0, LBB0_4
; %bb.3:
	str	wzr, [x19]
LBB0_4:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_strstr
	cbz	x0, LBB0_6
; %bb.5:
	str	wzr, [x19, #4]
LBB0_6:
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_strstr
	cbz	x0, LBB0_8
; %bb.7:
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_8:
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_strstr
	cbz	x0, LBB0_10
; %bb.9:
	str	wzr, [x19, #8]
LBB0_10:
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_strstr
	cbz	x0, LBB0_12
; %bb.11:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_12:
Lloh12:
	adrp	x1, l_.str.6@PAGE
Lloh13:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_strstr
	cbz	x0, LBB0_14
; %bb.13:
	add	x0, x0, #5
	mov	x1, #0
	mov	w2, #0
	bl	_simple_strtoul
	mov	w8, #16960
	movk	w8, #15, lsl #16
	cmp	w0, w8
	csel	w8, w0, w8, gt
	mov	w9, #30784
	movk	w9, #381, lsl #16
	cmp	w8, w9
	csel	w8, w8, w9, lo
	str	w8, [x19, #12]
LBB0_14:
Lloh14:
	adrp	x1, l_.str.7@PAGE
Lloh15:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_strstr
	cbz	x0, LBB0_16
; %bb.15:
	add	x0, x0, #4
	mov	x1, #0
	mov	w2, #0
	bl	_simple_strtoul
	mov	w8, #1000
	cmp	w0, #1000
	csel	w8, w0, w8, gt
	mov	w9, #58208
	movk	w9, #22, lsl #16
	cmp	w8, w9
	csel	w8, w8, w9, lo
	str	w8, [x19, #16]
LBB0_16:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"intclk"

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

l_.str.2:                               ; @.str.2
	.asciz	"intmodem"

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

l_.str.4:                               ; @.str.4
	.asciz	"noloopback"

l_.str.5:                               ; @.str.5
	.asciz	"loopback"

l_.str.6:                               ; @.str.6
	.asciz	"fclk="

l_.str.7:                               ; @.str.7
	.asciz	"bps="

	.no_dead_strip	_baycom_setmode
.subsections_via_symbols
