	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uc_socket_accept               ## -- Begin function uc_socket_accept
	.p2align	4, 0x90
_uc_socket_accept:                      ## @uc_socket_accept
	.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	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_uc_dbgmsg
	leaq	-20(%rbp), %r14
	movq	%r14, %rdi
	callq	_FD_ZERO
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_FD_SET
	movq	_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	$0, -40(%rbp)
	leal	1(%rbx), %edi
	leaq	-40(%rbp), %r8
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_select
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	je	LBB0_7
## %bb.2:
	movl	%ebx, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	movl	%eax, %ebx
	movq	_F_GETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
	callq	_fcntl
	testl	%eax, %eax
	js	LBB0_12
## %bb.4:
	movq	_F_SETFL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_fcntl
	testl	%eax, %eax
	jns	LBB0_11
## %bb.5:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_13
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_9
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	callq	_uc_logmsgx
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
LBB0_9:
	callq	_uc_logmsg
LBB0_10:
	movl	$-1, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_12:
	leaq	L_.str.4(%rip), %rdi
LBB0_13:
	callq	_uc_logmsg
	movl	%ebx, %edi
	callq	_close
	movl	$-1, %ebx
	testq	%rax, %rax
	jns	LBB0_11
## %bb.14:
	leaq	L_.str.6(%rip), %rdi
	callq	_uc_logmsg
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"accept"

	.comm	_TIMEOUT,4,2                    ## @TIMEOUT
L_.str.1:                               ## @.str.1
	.asciz	"socket_accept: select"

L_.str.2:                               ## @.str.2
	.asciz	"socket_accept: select timeout"

L_.str.3:                               ## @.str.3
	.asciz	"socket_accept: accept"

	.comm	_F_GETFL,4,2                    ## @F_GETFL
L_.str.4:                               ## @.str.4
	.asciz	"socket_accept: fcntl(F_GETFL)"

	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
L_.str.5:                               ## @.str.5
	.asciz	"socket_accept: fcntl(F_SETFL)"

L_.str.6:                               ## @.str.6
	.asciz	"socket_accept: close"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uc_socket_accept               ; -- Begin function uc_socket_accept
	.p2align	2
_uc_socket_accept:                      ; @uc_socket_accept
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_uc_dbgmsg
	sub	x0, x29, #20
	bl	_FD_ZERO
	sub	x1, x29, #20
	mov	x0, x19
	bl	_FD_SET
Lloh2:
	adrp	x8, _TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TIMEOUT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	str	xzr, [sp, #8]
	add	w0, w19, #1
	sub	x1, x29, #20
	add	x4, sp, #8
	mov	x2, #0
	mov	x3, #0
	bl	_select
	tbnz	w0, #31, LBB0_6
; %bb.1:
	cbz	w0, LBB0_7
; %bb.2:
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	bl	_accept
	tbnz	w0, #31, LBB0_8
; %bb.3:
	mov	x19, x0
Lloh5:
	adrp	x8, _F_GETFL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _F_GETFL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_fcntl
	tbnz	w0, #31, LBB0_9
; %bb.4:
Lloh8:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	bic	w2, w0, w8
	mov	x0, x19
	bl	_fcntl
	tbz	w0, #31, LBB0_14
; %bb.5:
Lloh14:
	adrp	x0, l_.str.5@PAGE
Lloh15:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_10
LBB0_6:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_7:
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_uc_logmsgx
	b	LBB0_13
LBB0_8:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_9:
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_10:
	bl	_uc_logmsg
	mov	x0, x19
	bl	_close
	tbz	x0, #63, LBB0_13
; %bb.11:
Lloh24:
	adrp	x0, l_.str.6@PAGE
Lloh25:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_12:
	bl	_uc_logmsg
LBB0_13:
	mov	w19, #-1
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"accept"

	.comm	_TIMEOUT,4,2                    ; @TIMEOUT
l_.str.1:                               ; @.str.1
	.asciz	"socket_accept: select"

l_.str.2:                               ; @.str.2
	.asciz	"socket_accept: select timeout"

l_.str.3:                               ; @.str.3
	.asciz	"socket_accept: accept"

	.comm	_F_GETFL,4,2                    ; @F_GETFL
l_.str.4:                               ; @.str.4
	.asciz	"socket_accept: fcntl(F_GETFL)"

	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
l_.str.5:                               ; @.str.5
	.asciz	"socket_accept: fcntl(F_SETFL)"

l_.str.6:                               ; @.str.6
	.asciz	"socket_accept: close"

.subsections_via_symbols
