	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function synchronize
_synchronize:                           ## @synchronize
	.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
	movl	%edi, %ebx
	movl	$0, -20(%rbp)
	testl	%esi, %esi
	je	LBB0_7
## %bb.1:
	movl	%ebx, -32(%rbp)
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	leaq	-32(%rbp), %rdi
	movl	$1, %esi
	movl	$10000, %edx                    ## imm = 0x2710
	callq	_poll
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	cmpl	$-1, %eax
	jne	LBB0_5
## %bb.4:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_ERRX
LBB0_5:
	leaq	-20(%rbp), %rsi
	movl	%ebx, %edi
	movl	$4, %edx
	callq	_read
	xorl	%ebx, %ebx
	cmpl	$-1, %eax
	jne	LBB0_10
## %bb.6:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_7:
	leaq	-20(%rbp), %rsi
	movl	%ebx, %edi
	movl	$4, %edx
	callq	_write
	xorl	%ebx, %ebx
	cmpl	$-1, %eax
	jne	LBB0_10
## %bb.8:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
LBB0_9:
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_ERRX
	jmp	LBB0_10
LBB0_2:
	movl	$-1, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"poll (%s)"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"read (%s)"

L_.str.2:                               ## @.str.2
	.asciz	"write (%s)"

	.no_dead_strip	_synchronize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function synchronize
_synchronize:                           ; @synchronize
	.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
	str	wzr, [sp, #12]
	cbz	w1, LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _POLLIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POLLIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w19, w8, [sp]
	mov	x0, sp
	mov	w1, #1
	mov	w2, #10000
	bl	_poll
	cbz	w0, LBB0_11
; %bb.2:
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_ERRX
LBB0_4:
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #4
	bl	_read
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.5:
Lloh11:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh13:
	ldr	w19, [x8]
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_6:
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #4
	bl	_write
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.7:
Lloh19:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh21:
	ldr	w19, [x8]
Lloh22:
	adrp	x8, _errno@GOTPAGE
Lloh23:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_ERRX
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_11:
	mov	w0, #-1
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"poll (%s)"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"read (%s)"

l_.str.2:                               ; @.str.2
	.asciz	"write (%s)"

	.no_dead_strip	_synchronize
.subsections_via_symbols
