	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function evhttp_connection_cb_cleanup
_evhttp_connection_cb_cleanup:          ## @evhttp_connection_cb_cleanup
	.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
	movq	%rdi, %r15
	callq	_evhttp_connection_reset_
	movq	(%r15), %rax
	testq	%rax, %rax
	js	LBB0_2
## %bb.1:
	cmpq	%rax, 8(%r15)
	jge	LBB0_14
LBB0_2:
	movq	28(%r15), %r12
	movq	%r12, -48(%rbp)
	leaq	20(%r15), %r14
	movl	24(%r15), %esi
	movq	_evhttp_connection_retry@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rcx
	callq	_evtimer_assign
	movq	8(%r15), %r8
	testq	%r8, %r8
	jle	LBB0_13
## %bb.3:
	movq	%r12, %r9
	shrq	$32, %r9
	cmpq	$1, %r8
	jne	LBB0_4
LBB0_10:
	testb	$1, %r8b
	je	LBB0_12
## %bb.11:
	leal	(%r12,%r12), %eax
	xorl	%ecx, %ecx
	cmpl	$500001, %r12d                  ## imm = 0x7A121
	setge	%cl
	leal	-1000000(%r12,%r12), %edx
	cmovll	%eax, %edx
	addl	%ecx, %r9d
	leal	(%r9,%r9), %eax
	xorl	%r12d, %r12d
	cmpl	$1801, %r9d                     ## imm = 0x709
	movl	$3600, %r9d                     ## imm = 0xE10
	cmovll	%eax, %r9d
	cmovll	%edx, %r12d
LBB0_12:
	movl	%r12d, -48(%rbp)
	movl	%r9d, -44(%rbp)
LBB0_13:
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_event_add
	incq	8(%r15)
	jmp	LBB0_20
LBB0_14:
	leaq	-40(%rbp), %rdi
	callq	_TAILQ_INIT
	addq	$16, %r15
	movq	%r15, %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:
	movq	_next@GOTPCREL(%rip), %r12
	leaq	-40(%rbp), %r14
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	movl	(%r12), %edx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_TAILQ_REMOVE
	movl	(%r12), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	%r15, %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	jne	LBB0_16
LBB0_17:
	leaq	-40(%rbp), %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	leaq	-40(%rbp), %r14
	movq	_next@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	movl	(%r15), %edx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_TAILQ_REMOVE
	movq	$0, 16(%rbx)
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	callq	*8(%rbx)
	movq	%rbx, %rdi
	callq	_evhttp_request_free
	movq	%r14, %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	jne	LBB0_19
LBB0_20:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r8, %rdx
	andq	$-2, %rdx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	addq	$-2, %rdx
	je	LBB0_10
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r12,%r12), %eax
	xorl	%esi, %esi
	cmpl	$500001, %r12d                  ## imm = 0x7A121
	setge	%sil
	leal	-1000000(%r12,%r12), %ecx
	cmovll	%eax, %ecx
	addl	%r9d, %esi
	xorl	%r12d, %r12d
	movl	$3600, %r9d                     ## imm = 0xE10
	movl	$3600, %edi                     ## imm = 0xE10
	movl	$0, %eax
	cmpl	$1801, %esi                     ## imm = 0x709
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	addl	%esi, %esi
	movl	%esi, %edi
	movl	%ecx, %eax
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	leal	(%rax,%rax), %ebx
	xorl	%esi, %esi
	cmpl	$500001, %eax                   ## imm = 0x7A121
	setge	%sil
	leal	-1000000(%rax,%rax), %ecx
	cmovll	%ebx, %ecx
	orl	%edi, %esi
	cmpl	$1801, %esi                     ## imm = 0x709
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	addl	%esi, %esi
	movl	%esi, %r9d
	movl	%ecx, %r12d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_evhttp_connection_retry,4,2    ## @evhttp_connection_retry
	.comm	_next,4,2                       ## @next
	.no_dead_strip	_evhttp_connection_cb_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function evhttp_connection_cb_cleanup
_evhttp_connection_cb_cleanup:          ; @evhttp_connection_cb_cleanup
	.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
	bl	_evhttp_connection_reset_
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_2
; %bb.1:
	ldr	x9, [x19, #8]
	cmp	x9, x8
	b.ge	LBB0_7
LBB0_2:
	ldur	x21, [x19, #28]
	str	x21, [sp]
	add	x20, x19, #20
	ldr	w1, [x19, #24]
Lloh0:
	adrp	x8, _evhttp_connection_retry@GOTPAGE
Lloh1:
	ldr	x8, [x8, _evhttp_connection_retry@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, x19
	bl	_evtimer_assign
	ldr	x8, [x19, #8]
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.3:
	lsr	x9, x21, #32
	mov	w10, #48576
	movk	w10, #65520, lsl #16
	mov	w11, #41248
	movk	w11, #7, lsl #16
	mov	w12, #3600
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w13, w21, #1
	add	w14, w13, w10
	cmp	w21, w11
	csel	w13, w14, w13, gt
	cinc	w9, w9, gt
	lsl	w14, w9, #1
	cmp	w9, #1800
	csel	w9, w12, w14, gt
	csel	w21, wzr, w13, gt
	subs	x8, x8, #1
	b.ne	LBB0_4
; %bb.5:
	stp	w21, w9, [sp]
LBB0_6:
	mov	x1, sp
	mov	x0, x20
	bl	_event_add
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #8]
	b	LBB0_13
LBB0_7:
	add	x0, sp, #8
	bl	_TAILQ_INIT
	add	x19, x19, #16
	mov	x0, x19
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_10
; %bb.8:
Lloh3:
	adrp	x21, _next@GOTPAGE
Lloh4:
	ldr	x21, [x21, _next@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_TAILQ_FIRST
	mov	x20, x0
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_TAILQ_REMOVE
	ldr	w2, [x21]
	add	x0, sp, #8
	mov	x1, x20
	bl	_TAILQ_INSERT_TAIL
	mov	x0, x19
	bl	_TAILQ_FIRST
	cbnz	x0, LBB0_9
LBB0_10:
	add	x0, sp, #8
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_13
; %bb.11:
Lloh5:
	adrp	x20, _next@GOTPAGE
Lloh6:
	ldr	x20, [x20, _next@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	bl	_TAILQ_FIRST
	mov	x19, x0
	ldr	w2, [x20]
	add	x0, sp, #8
	mov	x1, x19
	bl	_TAILQ_REMOVE
	str	xzr, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w1, [x19]
	mov	x0, x19
	blr	x8
	mov	x0, x19
	bl	_evhttp_request_free
	add	x0, sp, #8
	bl	_TAILQ_FIRST
	cbnz	x0, LBB0_12
LBB0_13:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_evhttp_connection_retry,4,2    ; @evhttp_connection_retry
	.comm	_next,4,2                       ; @next
	.no_dead_strip	_evhttp_connection_cb_cleanup
.subsections_via_symbols
