	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function http_dispatcher_test
_http_dispatcher_test:                  ## @http_dispatcher_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	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), %r13
	movq	%rax, (%r13)
	movl	(%r14), %edi
	movl	-44(%rbp), %ecx
	leaq	L_.str(%rip), %r15
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_evhttp_connection_base_new
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_tt_assert
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_evhttp_connection_set_local_address
	movq	_http_dispatcher_test_done@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	callq	_evhttp_request_new
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_tt_assert
	movq	%rbx, %rdi
	callq	_evhttp_request_get_output_headers
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	movl	%eax, %edi
	callq	_evhttp_add_header
	movq	_EVHTTP_REQ_GET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rcx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_evhttp_make_request
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.4(%rip), %rdi
	callq	_tt_abort_msg
LBB0_2:
	movl	(%r14), %edi
	callq	_event_base_dispatch
	testq	%r12, %r12
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_evhttp_connection_free
LBB0_4:
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_evhttp_free
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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	"127.0.0.1"

	.comm	_http_dispatcher_test_done,4,2  ## @http_dispatcher_test_done
L_.str.1:                               ## @.str.1
	.asciz	"Host"

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

	.comm	_EVHTTP_REQ_GET,4,2             ## @EVHTTP_REQ_GET
L_.str.3:                               ## @.str.3
	.asciz	"/?arg=val"

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

	.no_dead_strip	_http_dispatcher_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function http_dispatcher_test
_http_dispatcher_test:                  ; @http_dispatcher_test
	.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	x19, x0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _test_ok@GOTPAGE
Lloh1:
	ldr	x8, [x8, _test_ok@GOTPAGEOFF]
Lloh2:
	str	xzr, [x8]
	ldr	w1, [x0]
	add	x0, sp, #12
	mov	w2, #0
	bl	_http_setup
Lloh3:
	adrp	x22, _http@GOTPAGE
Lloh4:
	ldr	x22, [x22, _http@GOTPAGEOFF]
	str	x0, [x22]
	ldr	w0, [x19]
	ldr	w3, [sp, #12]
Lloh5:
	adrp	x21, l_.str@PAGE
Lloh6:
	add	x21, x21, l_.str@PAGEOFF
	mov	x1, #0
	mov	x2, x21
	bl	_evhttp_connection_base_new
	mov	x20, x0
	bl	_tt_assert
	mov	x0, x20
	mov	x1, x21
	bl	_evhttp_connection_set_local_address
Lloh7:
	adrp	x8, _http_dispatcher_test_done@GOTPAGE
Lloh8:
	ldr	x8, [x8, _http_dispatcher_test_done@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_evhttp_request_new
	mov	x21, x0
	bl	_tt_assert
	mov	x0, x21
	bl	_evhttp_request_get_output_headers
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh12:
	adrp	x2, l_.str.2@PAGE
Lloh13:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_evhttp_add_header
Lloh14:
	adrp	x8, _EVHTTP_REQ_GET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EVHTTP_REQ_GET@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x3, l_.str.3@PAGE
Lloh18:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	bl	_evhttp_make_request
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh19:
	adrp	x0, l_.str.4@PAGE
Lloh20:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_tt_abort_msg
LBB0_2:
	ldr	w0, [x19]
	bl	_event_base_dispatch
	cbz	x20, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_evhttp_connection_free
LBB0_4:
	ldr	x0, [x22]
	cbz	x0, LBB0_6
; %bb.5:
	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	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh19, Lloh20
	.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	"127.0.0.1"

	.comm	_http_dispatcher_test_done,4,2  ; @http_dispatcher_test_done
l_.str.1:                               ; @.str.1
	.asciz	"Host"

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

	.comm	_EVHTTP_REQ_GET,4,2             ; @EVHTTP_REQ_GET
l_.str.3:                               ; @.str.3
	.asciz	"/?arg=val"

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

	.no_dead_strip	_http_dispatcher_test
.subsections_via_symbols
