	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function http_close_detection_
_http_close_detection_:                 ## @http_close_detection_
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	$0, -44(%rbp)
	movabsq	$429496729600000, %rax          ## imm = 0x186A000000000
	movq	%rax, -56(%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)
	leaq	-56(%rbp), %r12
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_evhttp_set_timeout_tv
	movl	(%r14), %edi
	movl	-44(%rbp), %ecx
	leaq	L_.str(%rip), %rdx
	xorl	%esi, %esi
	callq	_evhttp_connection_base_new
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_tt_assert
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_evhttp_connection_set_timeout_tv
	movq	%rbx, %rdi
	callq	_tt_assert
	movq	_delayed_client@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	_close_detect_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_evhttp_request_new
	movq	%rax, %r12
	movq	%rax, %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
	testl	%r15d, %r15d
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %rcx
	cmoveq	%rax, %rcx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_evhttp_make_request
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.5(%rip), %rdi
	callq	_tt_abort_msg
LBB0_2:
	movl	(%r14), %edi
	callq	_event_base_dispatch
	movq	(%r13), %rdi
	callq	_TAILQ_FIRST
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_tt_assert
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_evhttp_connection_free
LBB0_4:
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_evhttp_free
LBB0_6:
	addq	$24, %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	_delayed_client,8,3             ## @delayed_client
	.comm	_close_detect_cb,4,2            ## @close_detect_cb
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	"/largedelay"

L_.str.4:                               ## @.str.4
	.asciz	"/test"

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

	.no_dead_strip	_http_close_detection_
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function http_close_detection_
_http_close_detection_:                 ; @http_close_detection_
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x19, x0
	str	wzr, [sp, #12]
	mov	x8, #148021752889344
	movk	x8, #1, lsl #48
	str	x8, [sp]
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	x23, _http@GOTPAGE
Lloh4:
	ldr	x23, [x23, _http@GOTPAGEOFF]
	str	x0, [x23]
	mov	x1, sp
	bl	_evhttp_set_timeout_tv
	ldr	w0, [x19]
	ldr	w3, [sp, #12]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, #0
	bl	_evhttp_connection_base_new
	mov	x20, x0
	bl	_tt_assert
	mov	x1, sp
	mov	x0, x20
	bl	_evhttp_connection_set_timeout_tv
	mov	x0, x20
	bl	_tt_assert
Lloh7:
	adrp	x8, _delayed_client@GOTPAGE
Lloh8:
	ldr	x8, [x8, _delayed_client@GOTPAGEOFF]
Lloh9:
	str	x20, [x8]
Lloh10:
	adrp	x8, _close_detect_cb@GOTPAGE
Lloh11:
	ldr	x8, [x8, _close_detect_cb@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_evhttp_request_new
	mov	x22, x0
	bl	_evhttp_request_get_output_headers
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh15:
	adrp	x2, l_.str.2@PAGE
Lloh16:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_evhttp_add_header
Lloh17:
	adrp	x8, _EVHTTP_REQ_GET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EVHTTP_REQ_GET@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
Lloh20:
	adrp	x8, l_.str.3@PAGE
Lloh21:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh22:
	adrp	x9, l_.str.4@PAGE
Lloh23:
	add	x9, x9, l_.str.4@PAGEOFF
	cmp	w21, #0
	csel	x3, x9, x8, eq
	mov	x0, x20
	mov	x1, x22
	bl	_evhttp_make_request
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh24:
	adrp	x0, l_.str.5@PAGE
Lloh25:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_tt_abort_msg
LBB0_2:
	ldr	w0, [x19]
	bl	_event_base_dispatch
	ldr	x0, [x23]
	bl	_TAILQ_FIRST
	cmp	x0, #0
	cset	w0, eq
	bl	_tt_assert
	cbz	x20, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_evhttp_connection_free
LBB0_4:
	ldr	x0, [x23]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_evhttp_free
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh24, Lloh25
	.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	_delayed_client,8,3             ; @delayed_client
	.comm	_close_detect_cb,4,2            ; @close_detect_cb
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	"/largedelay"

l_.str.4:                               ; @.str.4
	.asciz	"/test"

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

	.no_dead_strip	_http_close_detection_
.subsections_via_symbols
