	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function http_write_during_read_test_impl
_http_write_during_read_test_impl:      ## @http_write_during_read_test_impl
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %edx
	movq	%rdi, %r15
	movl	$0, -36(%rbp)
	movl	(%rdi), %esi
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movq	_HTTP_BIND_SSL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_2:
	leaq	-36(%rbp), %rdi
	callq	_http_setup
	movq	%rax, %r14
	movq	_test_ok@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movl	(%r15), %eax
	movq	_exit_base@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	-36(%rbp), %esi
	leaq	L_.str(%rip), %rdi
	callq	_http_connect
	movl	(%r15), %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_create_bev
	movq	%rax, %rbx
	movl	(%r15), %r8d
	movq	%rax, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_bufferevent_setcb
	movq	_EV_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bufferevent_disable
	leaq	L_.str.1(%rip), %r12
	movq	%r12, %rdi
	callq	_strlen
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_bufferevent_write
	leaq	-40(%rbp), %r12
	movq	%r12, %rdi
	callq	_evutil_timerclear
	movl	$10000, -40(%rbp)               ## imm = 0x2710
	movl	(%r15), %edi
	movq	_EV_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_http_write_during_read@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$-1, %esi
	movq	%rbx, %r8
	movq	%r12, %r9
	callq	_event_base_once
	movl	(%r15), %edi
	callq	_event_base_dispatch
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_bufferevent_free
LBB0_4:
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_evhttp_free
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HTTP_BIND_SSL,4,2              ## @HTTP_BIND_SSL
	.comm	_test_ok,8,3                    ## @test_ok
	.comm	_exit_base,4,2                  ## @exit_base
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"127.0.0.1"

	.comm	_EV_READ,4,2                    ## @EV_READ
L_.str.1:                               ## @.str.1
	.asciz	"GET /large HTTP/1.1\r\nHost: somehost\r\n\r\n"

	.comm	_EV_TIMEOUT,4,2                 ## @EV_TIMEOUT
	.comm	_http_write_during_read,4,2     ## @http_write_during_read
	.no_dead_strip	_http_write_during_read_test_impl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function http_write_during_read_test_impl
_http_write_during_read_test_impl:      ; @http_write_during_read_test_impl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	str	wzr, [sp, #12]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _HTTP_BIND_SSL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HTTP_BIND_SSL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w1, #0
	csel	w2, wzr, w9, eq
	add	x0, sp, #12
	mov	x1, x8
	bl	_http_setup
	mov	x19, x0
Lloh3:
	adrp	x8, _test_ok@GOTPAGE
Lloh4:
	ldr	x8, [x8, _test_ok@GOTPAGEOFF]
Lloh5:
	str	xzr, [x8]
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _exit_base@GOTPAGE
Lloh7:
	ldr	x9, [x9, _exit_base@GOTPAGEOFF]
Lloh8:
	str	w8, [x9]
	ldr	w1, [sp, #12]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_http_connect
	mov	x1, x0
	ldr	w0, [x20]
	mov	w2, #0
	bl	_create_bev
	mov	x21, x0
	ldr	w4, [x20]
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	bl	_bufferevent_setcb
Lloh11:
	adrp	x8, _EV_READ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_bufferevent_disable
Lloh14:
	adrp	x22, l_.str.1@PAGE
Lloh15:
	add	x22, x22, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_strlen
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_bufferevent_write
	add	x0, sp, #8
	bl	_evutil_timerclear
	mov	w8, #10000
	str	w8, [sp, #8]
	ldr	w0, [x20]
Lloh16:
	adrp	x8, _EV_TIMEOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EV_TIMEOUT@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
Lloh19:
	adrp	x8, _http_write_during_read@GOTPAGE
Lloh20:
	ldr	x8, [x8, _http_write_during_read@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
	add	x5, sp, #8
	mov	w1, #-1
	mov	x4, x21
	bl	_event_base_once
	ldr	w0, [x20]
	bl	_event_base_dispatch
	cbz	x21, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_bufferevent_free
LBB0_2:
	cbz	x19, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_evhttp_free
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HTTP_BIND_SSL,4,2              ; @HTTP_BIND_SSL
	.comm	_test_ok,8,3                    ; @test_ok
	.comm	_exit_base,4,2                  ; @exit_base
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"127.0.0.1"

	.comm	_EV_READ,4,2                    ; @EV_READ
l_.str.1:                               ; @.str.1
	.asciz	"GET /large HTTP/1.1\r\nHost: somehost\r\n\r\n"

	.comm	_EV_TIMEOUT,4,2                 ; @EV_TIMEOUT
	.comm	_http_write_during_read,4,2     ; @http_write_during_read
	.no_dead_strip	_http_write_during_read_test_impl
.subsections_via_symbols
