	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function comc_port_set
_comc_port_set:                         ## @comc_port_set
	.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
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	%rdx, %rdi
	callq	_comc_parseint
	testl	%eax, %eax
	jle	LBB0_2
## %bb.3:
	movq	_comc_port@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	_comc_curspeed@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_comc_setup
LBB0_5:
	movl	(%r15), %edi
	movq	_EV_NOHOOK@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movl	%r14d, %esi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_env_setenv
	movq	_CMD_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_2:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	_CMD_ERROR@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_ERROR,4,2                  ## @CMD_ERROR
	.comm	_comc_port,4,2                  ## @comc_port
	.comm	_comc_curspeed,4,2              ## @comc_curspeed
	.comm	_EV_NOHOOK,4,2                  ## @EV_NOHOOK
	.comm	_CMD_OK,4,2                     ## @CMD_OK
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"Invalid port"

	.no_dead_strip	_comc_port_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function comc_port_set
_comc_port_set:                         ; @comc_port_set
	.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
	cbz	x2, LBB0_5
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x2
	bl	_comc_parseint
	cmp	w0, #0
	b.le	LBB0_5
; %bb.2:
	mov	x1, x0
Lloh0:
	adrp	x8, _comc_port@GOTPAGE
Lloh1:
	ldr	x8, [x8, _comc_port@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.eq	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _comc_curspeed@GOTPAGE
Lloh4:
	ldr	x8, [x8, _comc_curspeed@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_comc_setup
LBB0_4:
	ldr	w0, [x21]
Lloh6:
	adrp	x8, _EV_NOHOOK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EV_NOHOOK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w1, w8, w20
	mov	x2, x19
	mov	x3, #0
	mov	x4, #0
	bl	_env_setenv
Lloh9:
	adrp	x8, _CMD_OK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CMD_OK@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh11:
	adrp	x0, l_str@PAGE
Lloh12:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
Lloh13:
	adrp	x8, _CMD_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CMD_ERROR@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_ERROR,4,2                  ; @CMD_ERROR
	.comm	_comc_port,4,2                  ; @comc_port
	.comm	_comc_curspeed,4,2              ; @comc_curspeed
	.comm	_EV_NOHOOK,4,2                  ; @EV_NOHOOK
	.comm	_CMD_OK,4,2                     ; @CMD_OK
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"Invalid port"

	.no_dead_strip	_comc_port_set
.subsections_via_symbols
