	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_event_base_new
_test_event_base_new:                   ## @test_event_base_new
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_TEST1@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_strlen
	movq	%rax, %rbx
	incl	%ebx
	movq	(%r14), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	movl	%ebx, %edx
	callq	_write
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	cmpl	%ebx, %eax
	je	LBB0_4
## %bb.3:
	movslq	%ebx, %rdi
	callq	_tt_abort_printf
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_tt_abort_perror
LBB0_4:
	movq	(%r14), %rax
	movl	(%rax), %edi
	movq	_SHUT_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_shutdown
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	callq	_tt_abort_perror
LBB0_6:
	xorl	%eax, %eax
	callq	_event_base_new
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	callq	_tt_abort_msg
LBB0_8:
	movq	%rbx, -40(%rbp)
	leaq	-32(%rbp), %r15
	movq	%r15, -48(%rbp)
	movq	$0, -56(%rbp)
	movq	(%r14), %rax
	movl	4(%rax), %edx
	movq	_EV_READ@GOTPCREL(%rip), %rax
	movq	_EV_PERSIST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_basic_read_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-56(%rbp), %r9
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_event_assign
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_event_add
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.4(%rip), %rdi
	callq	_tt_abort_perror
LBB0_10:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_event_base_loop
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.5(%rip), %rdi
	callq	_tt_abort_msg
LBB0_12:
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	callq	_event_base_free
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TEST1,4,2                      ## @TEST1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"initial write"

	.comm	_SHUT_WR,4,2                    ## @SHUT_WR
L_.str.2:                               ## @.str.2
	.asciz	"initial write shutdown"

L_.str.3:                               ## @.str.3
	.asciz	"failed to create event base"

	.comm	_EV_READ,4,2                    ## @EV_READ
	.comm	_EV_PERSIST,4,2                 ## @EV_PERSIST
	.comm	_basic_read_cb,4,2              ## @basic_read_cb
L_.str.4:                               ## @.str.4
	.asciz	"initial event_add"

L_.str.5:                               ## @.str.5
	.asciz	"unsuccessful exit from event loop"

	.no_dead_strip	_test_event_base_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_event_base_new
_test_event_base_new:                   ; @test_event_base_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _TEST1@GOTPAGE
Lloh1:
	ldr	x21, [x21, _TEST1@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_strlen
	add	w20, w0, #1
	ldr	x8, [x19]
	ldr	w0, [x8]
	ldr	w1, [x21]
	mov	x2, x20
	bl	_write
	tbnz	w0, #31, LBB0_3
; %bb.1:
	cmp	w0, w20
	b.eq	LBB0_4
; %bb.2:
	sxtw	x0, w20
	bl	_tt_abort_printf
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_tt_abort_perror
LBB0_4:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh4:
	adrp	x8, _SHUT_WR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SHUT_WR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_shutdown
	cbz	x0, LBB0_6
; %bb.5:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_tt_abort_perror
LBB0_6:
	bl	_event_base_new
	mov	x20, x0
	cbnz	x0, LBB0_8
; %bb.7:
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_tt_abort_msg
LBB0_8:
	add	x8, sp, #24
	stp	x8, x20, [sp, #8]
	str	xzr, [sp]
	ldr	x8, [x19]
	ldr	w2, [x8, #4]
Lloh11:
	adrp	x8, _EV_READ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
Lloh13:
	adrp	x9, _EV_PERSIST@GOTPAGE
Lloh14:
	ldr	x9, [x9, _EV_PERSIST@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	ldr	w9, [x9]
	orr	w3, w9, w8
Lloh17:
	adrp	x8, _basic_read_cb@GOTPAGE
Lloh18:
	ldr	x8, [x8, _basic_read_cb@GOTPAGEOFF]
Lloh19:
	ldr	w4, [x8]
	add	x0, sp, #24
	mov	x5, sp
	mov	x1, x20
	bl	_event_assign
	add	x0, sp, #24
	mov	x1, #0
	bl	_event_add
	cbz	x0, LBB0_10
; %bb.9:
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_tt_abort_perror
LBB0_10:
	mov	x0, x20
	mov	w1, #0
	bl	_event_base_loop
	cbz	x0, LBB0_12
; %bb.11:
Lloh22:
	adrp	x0, l_.str.5@PAGE
Lloh23:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_tt_abort_msg
LBB0_12:
	cbz	x20, LBB0_14
; %bb.13:
	mov	x0, x20
	bl	_event_base_free
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_TEST1,4,2                      ; @TEST1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"initial write"

	.comm	_SHUT_WR,4,2                    ; @SHUT_WR
l_.str.2:                               ; @.str.2
	.asciz	"initial write shutdown"

l_.str.3:                               ; @.str.3
	.asciz	"failed to create event base"

	.comm	_EV_READ,4,2                    ; @EV_READ
	.comm	_EV_PERSIST,4,2                 ; @EV_PERSIST
	.comm	_basic_read_cb,4,2              ; @basic_read_cb
l_.str.4:                               ; @.str.4
	.asciz	"initial event_add"

l_.str.5:                               ; @.str.5
	.asciz	"unsuccessful exit from event loop"

	.no_dead_strip	_test_event_base_new
.subsections_via_symbols
