	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function http_basic_test
_http_basic_test:                       ## @http_basic_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	$24, %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, -48(%rbp)
	movl	$0, -44(%rbp)
	movq	_test_ok@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movl	(%rdi), %esi
	leaq	-48(%rbp), %rdi
	xorl	%edx, %edx
	callq	_http_setup
	movq	_http@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	-44(%rbp), %rsi
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_http_bind
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.1:
	movl	-48(%rbp), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_http_connect
	movl	%eax, %r15d
	movl	(%r12), %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_bufferevent_socket_new
	movq	%rax, %rbx
	movq	_http_readcb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_http_writecb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_http_errorcb@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movl	(%r12), %r8d
	movq	%rbx, %rdi
	callq	_bufferevent_setcb
	leaq	L_.str.2(%rip), %r13
	movq	%r13, %rdi
	callq	_strlen
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_bufferevent_write
	leaq	-56(%rbp), %r13
	movq	%r13, %rdi
	callq	_evutil_timerclear
	movl	$10000, -56(%rbp)               ## imm = 0x2710
	movl	(%r12), %edi
	movq	_EV_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_http_complete_write@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$-1, %esi
	movq	%rbx, %r8
	movq	%r13, %r9
	callq	_event_base_once
	movl	(%r12), %edi
	callq	_event_base_dispatch
	xorl	%edi, %edi
	movq	_test_ok@GOTPCREL(%rip), %rax
	cmpl	$3, (%rax)
	sete	%dil
	callq	_tt_assert
	movq	%rbx, %rdi
	callq	_bufferevent_free
	movl	%r15d, %edi
	callq	_evutil_closesocket
	movl	-44(%rbp), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_http_connect
	movl	%eax, %r15d
	movl	(%r12), %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_bufferevent_socket_new
	movq	%rax, %rbx
	movq	_http_readcb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_http_writecb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r14), %ecx
	movl	(%r12), %r8d
	movq	%rbx, %rdi
	callq	_bufferevent_setcb
	leaq	L_.str.3(%rip), %r13
	movq	%r13, %rdi
	callq	_strlen
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_bufferevent_write
	movl	(%r12), %edi
	callq	_event_base_dispatch
	xorl	%edi, %edi
	movq	_test_ok@GOTPCREL(%rip), %r13
	cmpl	$5, (%r13)
	sete	%dil
	callq	_tt_assert
	movq	%rbx, %rdi
	callq	_bufferevent_free
	movl	%r15d, %edi
	callq	_evutil_closesocket
	movl	-44(%rbp), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_http_connect
	movl	(%r12), %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_bufferevent_socket_new
	movq	%rax, %rbx
	movq	_http_readcb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_http_writecb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r14), %ecx
	movl	(%r12), %r8d
	movq	%rbx, %rdi
	callq	_bufferevent_setcb
	leaq	L_.str.4(%rip), %r14
	movq	%r14, %rdi
	callq	_strlen
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_bufferevent_write
	movl	(%r12), %edi
	callq	_event_base_dispatch
	xorl	%edi, %edi
	cmpl	$7, (%r13)
	sete	%dil
	callq	_tt_assert
	movq	_http@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_evhttp_free
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_bufferevent_free
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_test_ok,4,2                    ## @test_ok
	.comm	_http,4,2                       ## @http
	.comm	_stdout,4,2                     ## @stdout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FAILED (bind)\n"

L_.str.1:                               ## @.str.1
	.asciz	"127.0.0.1"

	.comm	_http_readcb,4,2                ## @http_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"

	.comm	_EV_TIMEOUT,4,2                 ## @EV_TIMEOUT
	.comm	_http_complete_write,4,2        ## @http_complete_write
L_.str.3:                               ## @.str.3
	.asciz	"GET /test HTTP/1.1\r\nHost: somehost\r\nConnection: close\r\n\r\n"

L_.str.4:                               ## @.str.4
	.asciz	"GET http://somehost.net/test HTTP/1.1\r\nHost: somehost\r\nConnection: close\r\n\r\n"

	.no_dead_strip	_http_basic_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function http_basic_test
_http_basic_test:                       ; @http_basic_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	str	xzr, [sp]
Lloh0:
	adrp	x24, _test_ok@GOTPAGE
Lloh1:
	ldr	x24, [x24, _test_ok@GOTPAGEOFF]
	str	wzr, [x24]
	ldr	w1, [x0]
	add	x0, sp, #4
	mov	w2, #0
	bl	_http_setup
Lloh2:
	adrp	x25, _http@GOTPAGE
Lloh3:
	ldr	x25, [x25, _http@GOTPAGEOFF]
	str	w0, [x25]
	mov	x1, sp
	mov	w2, #0
	bl	_http_bind
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.1:
	ldr	w1, [sp, #4]
Lloh4:
	adrp	x20, l_.str.1@PAGE
Lloh5:
	add	x20, x20, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_http_connect
	mov	x21, x0
	ldr	w0, [x19]
	mov	x1, x21
	mov	w2, #0
	bl	_bufferevent_socket_new
	mov	x22, x0
Lloh6:
	adrp	x26, _http_readcb@GOTPAGE
Lloh7:
	ldr	x26, [x26, _http_readcb@GOTPAGEOFF]
Lloh8:
	adrp	x27, _http_writecb@GOTPAGE
Lloh9:
	ldr	x27, [x27, _http_writecb@GOTPAGEOFF]
	ldr	w1, [x26]
	ldr	w2, [x27]
Lloh10:
	adrp	x28, _http_errorcb@GOTPAGE
Lloh11:
	ldr	x28, [x28, _http_errorcb@GOTPAGEOFF]
	ldr	w3, [x28]
	ldr	w4, [x19]
	bl	_bufferevent_setcb
Lloh12:
	adrp	x23, l_.str.2@PAGE
Lloh13:
	add	x23, x23, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_strlen
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_bufferevent_write
	add	x0, sp, #8
	bl	_evutil_timerclear
	mov	w8, #10000
	str	w8, [sp, #8]
	ldr	w0, [x19]
Lloh14:
	adrp	x8, _EV_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EV_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x8, _http_complete_write@GOTPAGE
Lloh18:
	ldr	x8, [x8, _http_complete_write@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	add	x5, sp, #8
	mov	w1, #-1
	mov	x4, x22
	bl	_event_base_once
	ldr	w0, [x19]
	bl	_event_base_dispatch
	ldr	w8, [x24]
	cmp	w8, #3
	cset	w0, eq
	bl	_tt_assert
	mov	x0, x22
	bl	_bufferevent_free
	mov	x0, x21
	bl	_evutil_closesocket
	ldr	w1, [sp]
	mov	x0, x20
	bl	_http_connect
	mov	x21, x0
	ldr	w0, [x19]
	mov	x1, x21
	mov	w2, #0
	bl	_bufferevent_socket_new
	mov	x22, x0
	ldr	w1, [x26]
	ldr	w2, [x27]
	ldr	w3, [x28]
	ldr	w4, [x19]
	bl	_bufferevent_setcb
Lloh20:
	adrp	x23, l_.str.3@PAGE
Lloh21:
	add	x23, x23, l_.str.3@PAGEOFF
	mov	x0, x23
	bl	_strlen
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_bufferevent_write
	ldr	w0, [x19]
	bl	_event_base_dispatch
	ldr	w8, [x24]
	cmp	w8, #5
	cset	w0, eq
	bl	_tt_assert
	mov	x0, x22
	bl	_bufferevent_free
	mov	x0, x21
	bl	_evutil_closesocket
	ldr	w1, [sp]
	mov	x0, x20
	bl	_http_connect
	mov	x1, x0
	ldr	w0, [x19]
	mov	w2, #0
	bl	_bufferevent_socket_new
	mov	x20, x0
	ldr	w1, [x26]
	ldr	w2, [x27]
	ldr	w3, [x28]
	ldr	w4, [x19]
	bl	_bufferevent_setcb
Lloh22:
	adrp	x21, l_.str.4@PAGE
Lloh23:
	add	x21, x21, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_strlen
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_bufferevent_write
	ldr	w0, [x19]
	bl	_event_base_dispatch
	ldr	w8, [x24]
	cmp	w8, #7
	cset	w0, eq
	bl	_tt_assert
	ldr	w0, [x25]
	bl	_evhttp_free
	cbz	x20, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_bufferevent_free
LBB0_3:
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_4:
Lloh24:
	adrp	x8, _stdout@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_test_ok,4,2                    ; @test_ok
	.comm	_http,4,2                       ; @http
	.comm	_stdout,4,2                     ; @stdout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FAILED (bind)\n"

l_.str.1:                               ; @.str.1
	.asciz	"127.0.0.1"

	.comm	_http_readcb,4,2                ; @http_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"

	.comm	_EV_TIMEOUT,4,2                 ; @EV_TIMEOUT
	.comm	_http_complete_write,4,2        ; @http_complete_write
l_.str.3:                               ; @.str.3
	.asciz	"GET /test HTTP/1.1\r\nHost: somehost\r\nConnection: close\r\n\r\n"

l_.str.4:                               ; @.str.4
	.asciz	"GET http://somehost.net/test HTTP/1.1\r\nHost: somehost\r\nConnection: close\r\n\r\n"

	.no_dead_strip	_http_basic_test
.subsections_via_symbols
