	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ser_unix_wait_for              ## -- Begin function ser_unix_wait_for
	.p2align	4, 0x90
_ser_unix_wait_for:                     ## @ser_unix_wait_for
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leaq	-48(%rbp), %r15
	leaq	-44(%rbp), %r12
	movq	_EINTR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	%r15, %rdi
	callq	_FD_ZERO
	movq	%r12, %rdi
	callq	_FD_ZERO
	movq	(%rbx), %rdi
	movq	%r15, %rsi
	callq	_FD_SET
	movq	(%rbx), %rdi
	movq	%r12, %rsi
	callq	_FD_SET
	movq	(%rbx), %rdi
	incq	%rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	movq	%r12, %rcx
	testl	%r14d, %r14d
	js	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	-64(%rbp), %r8
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r8d, %r8d
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	callq	_select
	testl	%eax, %eax
	jg	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%r13), %rax
	je	LBB0_1
## %bb.9:
	movq	_SERIAL_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_7:
	movq	_SERIAL_TIMEOUT@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SERIAL_TIMEOUT,4,2             ## @SERIAL_TIMEOUT
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_SERIAL_ERROR,4,2               ## @SERIAL_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ser_unix_wait_for              ; -- Begin function ser_unix_wait_for
	.p2align	2
_ser_unix_wait_for:                     ; @ser_unix_wait_for
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _errno@GOTPAGE
Lloh1:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
Lloh2:
	adrp	x23, _EINTR@GOTPAGE
Lloh3:
	ldr	x23, [x23, _EINTR@GOTPAGEOFF]
Lloh4:
	adrp	x22, _SERIAL_ERROR@GOTPAGE
Lloh5:
	ldr	x22, [x22, _SERIAL_ERROR@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	str	w19, [sp, #16]
	str	xzr, [sp, #24]
	add	x0, sp, #12
	bl	_FD_ZERO
	add	x0, sp, #8
	bl	_FD_ZERO
	ldr	x0, [x20]
	add	x1, sp, #12
	bl	_FD_SET
	ldr	x0, [x20]
	add	x1, sp, #8
	bl	_FD_SET
	ldr	x8, [x20]
	add	x0, x8, #1
	add	x1, sp, #12
	add	x3, sp, #8
	tbnz	w19, #31, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x4, sp, #16
	mov	w2, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	w2, #0
	mov	x4, #0
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	bl	_select
	cmp	w0, #0
	b.gt	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	cbz	w0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_1
; %bb.7:
	ldr	w0, [x22]
	b	LBB0_10
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh6:
	adrp	x8, _SERIAL_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SERIAL_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SERIAL_TIMEOUT,4,2             ; @SERIAL_TIMEOUT
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_SERIAL_ERROR,4,2               ; @SERIAL_ERROR
.subsections_via_symbols
