	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function simple_read_cb
_simple_read_cb:                        ## @simple_read_cb
	.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	$272, %rsp                      ## imm = 0x110
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	leaq	-288(%rbp), %rsi
	movl	$256, %edx                      ## imm = 0x100
	callq	_read
	movq	_called@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	testl	%ecx, %ecx
	jne	LBB0_7
## %bb.2:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_event_add
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %ecx
	jmp	LBB0_7
LBB0_5:
	cmpl	$1, %ecx
	jne	LBB0_7
## %bb.6:
	movq	_test_ok@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movl	$1, %ecx
LBB0_7:
	incl	%ecx
	movl	%ecx, (%rbx)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	addq	$272, %rsp                      ## imm = 0x110
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
LBB0_4:
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_called,4,2                     ## @called
	.comm	_test_ok,4,2                    ## @test_ok
	.no_dead_strip	_simple_read_cb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function simple_read_cb
_simple_read_cb:                        ; @simple_read_cb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #320
	.cfi_def_cfa_offset 320
	stp	x28, x27, [sp, #272]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #288]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #304]            ; 16-byte Folded Spill
	add	x29, sp, #304
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w27, -40
	.cfi_offset w28, -48
	mov	x19, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	add	x1, sp, #8
	mov	w2, #256
	bl	_read
Lloh3:
	adrp	x20, _called@GOTPAGE
Lloh4:
	ldr	x20, [x20, _called@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w0, LBB0_4
; %bb.1:
	cbnz	w8, LBB0_6
; %bb.2:
	mov	x0, x19
	mov	x1, #0
	bl	_event_add
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.3:
	ldr	w8, [x20]
	b	LBB0_6
LBB0_4:
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.5:
Lloh5:
	adrp	x9, _test_ok@GOTPAGE
Lloh6:
	ldr	x9, [x9, _test_ok@GOTPAGEOFF]
Lloh7:
	str	w8, [x9]
LBB0_6:
	add	w8, w8, #1
	str	w8, [x20]
	ldur	x8, [x29, #-40]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #304]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #288]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #320
	ret
LBB0_8:
	bl	___stack_chk_fail
LBB0_9:
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_called,4,2                     ; @called
	.comm	_test_ok,4,2                    ; @test_ok
	.no_dead_strip	_simple_read_cb
.subsections_via_symbols
