	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Rs232ConfigurePortWin32        ## -- Begin function Rs232ConfigurePortWin32
	.p2align	4, 0x90
_Rs232ConfigurePortWin32:               ## @Rs232ConfigurePortWin32
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	-24(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	$4, -24(%rbp)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_BuildCommDCB
	testl	%eax, %eax
	je	LBB0_1
## %bb.4:
	movq	_hPortHandle@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-24(%rbp), %rsi
	callq	_SetCommState
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	_MAXDWORD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_Rs232SetCommunicationTimeoutsWin32
	testl	%eax, %eax
	je	LBB0_3
## %bb.7:
	movq	_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_1:
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_5:
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_TEXT
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	__tprintf
LBB0_3:
	movq	_FALSE@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BuildCommDCB() failed. GetLastError() = %lu.\n"

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_hPortHandle,4,2                ## @hPortHandle
L_.str.1:                               ## @.str.1
	.asciz	"SetCommState() failed. GetLastError() = %lu.\n"

	.comm	_MAXDWORD,4,2                   ## @MAXDWORD
	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Rs232ConfigurePortWin32        ; -- Begin function Rs232ConfigurePortWin32
	.p2align	2
_Rs232ConfigurePortWin32:               ; @Rs232ConfigurePortWin32
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	mov	w20, #4
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	w20, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_BuildCommDCB
	cbz	w0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _hPortHandle@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hPortHandle@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_SetCommState
	cbz	w0, LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _MAXDWORD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXDWORD@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_Rs232SetCommunicationTimeoutsWin32
Lloh6:
	adrp	x8, _TRUE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh8:
	adrp	x9, _FALSE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FALSE@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x9, x8, eq
	b	LBB0_6
LBB0_3:
	bl	_GetLastError
	mov	x19, x0
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
	bl	_GetLastError
	mov	x19, x0
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	bl	_TEXT
	mov	x1, x19
	bl	__tprintf
Lloh14:
	adrp	x8, _FALSE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BuildCommDCB() failed. GetLastError() = %lu.\n"

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_hPortHandle,4,2                ; @hPortHandle
l_.str.1:                               ; @.str.1
	.asciz	"SetCommState() failed. GetLastError() = %lu.\n"

	.comm	_MAXDWORD,4,2                   ; @MAXDWORD
	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
