	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function http_terminate_chunked_test
_http_terminate_chunked_test:           ## @http_terminate_chunked_test
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	$0, -44(%rbp)
	movq	_test_ok@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movl	(%rdi), %esi
	leaq	-44(%rbp), %rdi
	xorl	%edx, %edx
	callq	_http_setup
	movq	_http@GOTPCREL(%rip), %rbx
	movq	%rax, (%rbx)
	leaq	L_.str(%rip), %r15
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_evhttp_del_cb
	movq	(%rbx), %rdi
	movq	_terminate_chunked_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-80(%rbp), %r14
	movq	%r15, %rsi
	movq	%r14, %rcx
	callq	_evhttp_set_cb
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_tt_assert
	movl	-44(%rbp), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_http_connect
	movq	%rax, %r15
	movl	(%r12), %edi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_bufferevent_socket_new
	movq	%rax, %rbx
	movq	_terminate_readcb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_http_writecb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_http_errorcb@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r12), %r8d
	movq	%rbx, %rdi
	callq	_bufferevent_setcb
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	(%r12), %eax
	movl	%eax, -56(%rbp)
	movq	%r15, -64(%rbp)
	movq	%rbx, -72(%rbp)
	movq	$0, -80(%rbp)
	leaq	L_.str.2(%rip), %r13
	movq	%r13, %rdi
	callq	_strlen
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_bufferevent_write
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_evutil_timerclear
	movl	$10000, -48(%rbp)               ## imm = 0x2710
	movl	(%r12), %edi
	movq	_EV_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_terminate_chunked_client@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$-1, %esi
	movq	%r14, %r8
	movq	%rbx, %r9
	callq	_event_base_once
	movl	(%r12), %edi
	callq	_event_base_dispatch
	cmpq	$0, -80(%rbp)
	je	LBB0_1
## %bb.2:
	testq	%r15, %r15
	js	LBB0_4
LBB0_3:
	movq	%r15, %rdi
	callq	_evutil_closesocket
LBB0_4:
	movq	_http@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_evhttp_free
LBB0_6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_test_ok@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	testq	%r15, %r15
	jns	LBB0_3
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_test_ok,8,3                    ## @test_ok
	.comm	_http,8,3                       ## @http
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/test"

	.comm	_terminate_chunked_cb,4,2       ## @terminate_chunked_cb
L_.str.1:                               ## @.str.1
	.asciz	"127.0.0.1"

	.comm	_terminate_readcb,4,2           ## @terminate_readcb
	.comm	_http_writecb,4,2               ## @http_writecb
	.comm	_http_errorcb,4,2               ## @http_errorcb
L_.str.2:                               ## @.str.2
	.asciz	"GET /test HTTP/1.1\r\nHost: some\r\n\r\n"

	.comm	_EV_TIMEOUT,4,2                 ## @EV_TIMEOUT
	.comm	_terminate_chunked_client,4,2   ## @terminate_chunked_client
	.no_dead_strip	_http_terminate_chunked_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function http_terminate_chunked_test
_http_terminate_chunked_test:           ; @http_terminate_chunked_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	str	wzr, [sp, #36]
Lloh0:
	adrp	x23, _test_ok@GOTPAGE
Lloh1:
	ldr	x23, [x23, _test_ok@GOTPAGEOFF]
	str	xzr, [x23]
	ldr	w1, [x0]
	add	x0, sp, #36
	mov	w2, #0
	bl	_http_setup
Lloh2:
	adrp	x24, _http@GOTPAGE
Lloh3:
	ldr	x24, [x24, _http@GOTPAGEOFF]
	str	x0, [x24]
Lloh4:
	adrp	x20, l_.str@PAGE
Lloh5:
	add	x20, x20, l_.str@PAGEOFF
	mov	x1, x20
	bl	_evhttp_del_cb
	ldr	x0, [x24]
Lloh6:
	adrp	x8, _terminate_chunked_cb@GOTPAGE
Lloh7:
	ldr	x8, [x8, _terminate_chunked_cb@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x3, sp
	mov	x1, x20
	bl	_evhttp_set_cb
	cmp	x0, #0
	cset	w0, eq
	bl	_tt_assert
	ldr	w1, [sp, #36]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_http_connect
	mov	x20, x0
	ldr	w0, [x19]
	mov	x1, x20
	mov	w2, #0
	bl	_bufferevent_socket_new
	mov	x21, x0
Lloh11:
	adrp	x8, _terminate_readcb@GOTPAGE
Lloh12:
	ldr	x8, [x8, _terminate_readcb@GOTPAGEOFF]
Lloh13:
	adrp	x9, _http_writecb@GOTPAGE
Lloh14:
	ldr	x9, [x9, _http_writecb@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	ldr	w2, [x9]
Lloh17:
	adrp	x8, _http_errorcb@GOTPAGE
Lloh18:
	ldr	x8, [x8, _http_errorcb@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	ldr	w4, [x19]
	bl	_bufferevent_setcb
	mov	x0, sp
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	w8, [x19]
	str	w8, [sp, #24]
	stp	x21, x20, [sp, #8]
	str	xzr, [sp]
Lloh20:
	adrp	x22, l_.str.2@PAGE
Lloh21:
	add	x22, x22, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_strlen
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_bufferevent_write
	add	x0, sp, #40
	bl	_evutil_timerclear
	mov	w8, #10000
	str	w8, [sp, #40]
	ldr	w0, [x19]
Lloh22:
	adrp	x8, _EV_TIMEOUT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EV_TIMEOUT@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
Lloh25:
	adrp	x8, _terminate_chunked_client@GOTPAGE
Lloh26:
	ldr	x8, [x8, _terminate_chunked_client@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
	mov	x4, sp
	add	x5, sp, #40
	mov	w1, #-1
	bl	_event_base_once
	ldr	w0, [x19]
	bl	_event_base_dispatch
	ldr	x8, [sp]
	cbz	x8, LBB0_6
; %bb.1:
	tbnz	x20, #63, LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_evutil_closesocket
LBB0_3:
	ldr	x0, [x24]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_evhttp_free
LBB0_5:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	str	xzr, [x23]
	tbz	x20, #63, LBB0_2
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_test_ok,8,3                    ; @test_ok
	.comm	_http,8,3                       ; @http
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/test"

	.comm	_terminate_chunked_cb,4,2       ; @terminate_chunked_cb
l_.str.1:                               ; @.str.1
	.asciz	"127.0.0.1"

	.comm	_terminate_readcb,4,2           ; @terminate_readcb
	.comm	_http_writecb,4,2               ; @http_writecb
	.comm	_http_errorcb,4,2               ; @http_errorcb
l_.str.2:                               ; @.str.2
	.asciz	"GET /test HTTP/1.1\r\nHost: some\r\n\r\n"

	.comm	_EV_TIMEOUT,4,2                 ; @EV_TIMEOUT
	.comm	_terminate_chunked_client,4,2   ; @terminate_chunked_client
	.no_dead_strip	_http_terminate_chunked_test
.subsections_via_symbols
