	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function http_stream_out_test_impl
_http_stream_out_test_impl:             ## @http_stream_out_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, %ebx
	movq	%rdi, %r15
	movl	$0, -36(%rbp)
	movl	(%rdi), %esi
	movl	%ebx, %edx
	testl	%ebx, %ebx
	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	(%r15), %edi
	movl	$-1, %esi
	movl	%ebx, %edx
	callq	_create_bev
	movl	(%r15), %edi
	movl	-36(%rbp), %r8d
	leaq	L_.str(%rip), %rcx
	xorl	%esi, %esi
	movq	%rax, %rdx
	callq	_evhttp_connection_base_bufferevent_new
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_tt_assert
	movq	_http_request_done@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_evhttp_request_new
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_evhttp_request_get_output_headers
	leaq	L_.str.2(%rip), %rsi
	leaq	L_.str.3(%rip), %rdx
	movl	%eax, %edi
	callq	_evhttp_add_header
	movq	_EVHTTP_REQ_GET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.4(%rip), %rcx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_evhttp_make_request
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.5(%rip), %rdi
	callq	_tt_abort_msg
LBB0_4:
	movl	(%r15), %edi
	callq	_event_base_dispatch
	testq	%r12, %r12
	je	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	_evhttp_connection_free
LBB0_6:
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_evhttp_free
LBB0_8:
	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	_http_request_done,4,2          ## @http_request_done
L_.str.1:                               ## @.str.1
	.asciz	"This is funnybut not hilarious.bwv 1052"

L_.str.2:                               ## @.str.2
	.asciz	"Host"

L_.str.3:                               ## @.str.3
	.asciz	"somehost"

	.comm	_EVHTTP_REQ_GET,4,2             ## @EVHTTP_REQ_GET
L_.str.4:                               ## @.str.4
	.asciz	"/streamed"

L_.str.5:                               ## @.str.5
	.asciz	"Couldn't make request"

	.no_dead_strip	_http_stream_out_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_stream_out_test_impl
_http_stream_out_test_impl:             ; @http_stream_out_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	x21, x1
	mov	x20, x0
	str	wzr, [sp, #12]
	ldr	w1, [x0]
Lloh0:
	adrp	x8, _HTTP_BIND_SSL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HTTP_BIND_SSL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w21, #0
	csel	w2, wzr, w8, eq
	add	x0, sp, #12
	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	w0, [x20]
	mov	w1, #-1
	mov	x2, x21
	bl	_create_bev
	mov	x2, x0
	ldr	w0, [x20]
	ldr	w4, [sp, #12]
Lloh9:
	adrp	x3, l_.str@PAGE
Lloh10:
	add	x3, x3, l_.str@PAGEOFF
	mov	x1, #0
	bl	_evhttp_connection_base_bufferevent_new
	mov	x21, x0
	bl	_tt_assert
Lloh11:
	adrp	x8, _http_request_done@GOTPAGE
Lloh12:
	ldr	x8, [x8, _http_request_done@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_evhttp_request_new
	mov	x22, x0
	bl	_evhttp_request_get_output_headers
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
Lloh18:
	adrp	x2, l_.str.3@PAGE
Lloh19:
	add	x2, x2, l_.str.3@PAGEOFF
	bl	_evhttp_add_header
Lloh20:
	adrp	x8, _EVHTTP_REQ_GET@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EVHTTP_REQ_GET@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
Lloh23:
	adrp	x3, l_.str.4@PAGE
Lloh24:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x21
	mov	x1, x22
	bl	_evhttp_make_request
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh25:
	adrp	x0, l_.str.5@PAGE
Lloh26:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_tt_abort_msg
LBB0_2:
	ldr	w0, [x20]
	bl	_event_base_dispatch
	cbz	x21, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_evhttp_connection_free
LBB0_4:
	cbz	x19, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_evhttp_free
LBB0_6:
	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 AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.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
	.loh AdrpAdd	Lloh25, Lloh26
	.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	_http_request_done,4,2          ; @http_request_done
l_.str.1:                               ; @.str.1
	.asciz	"This is funnybut not hilarious.bwv 1052"

l_.str.2:                               ; @.str.2
	.asciz	"Host"

l_.str.3:                               ; @.str.3
	.asciz	"somehost"

	.comm	_EVHTTP_REQ_GET,4,2             ; @EVHTTP_REQ_GET
l_.str.4:                               ; @.str.4
	.asciz	"/streamed"

l_.str.5:                               ; @.str.5
	.asciz	"Couldn't make request"

	.no_dead_strip	_http_stream_out_test_impl
.subsections_via_symbols
