	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function loud_writecb
_loud_writecb:                          ## @loud_writecb
	.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	%rbx
	subq	$1032, %rsp                     ## imm = 0x408
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_bufferevent_get_output
	movq	%rax, %rbx
	movq	_weakrand_state@GOTPCREL(%rip), %rdi
	callq	_evutil_weakrand_
	leaq	-1056(%rbp), %rdi
	movl	%eax, %esi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_memset
	movq	%rbx, %rdi
	callq	_evbuffer_get_length
	cmpl	$8191, %eax                     ## imm = 0x1FFF
	jg	LBB0_3
## %bb.1:
	leaq	-1056(%rbp), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_evbuffer_add
	addl	$1024, (%r14)                   ## imm = 0x400
	movq	%rbx, %rdi
	callq	_evbuffer_get_length
	cmpl	$8192, %eax                     ## imm = 0x2000
	jl	LBB0_2
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$1032, %rsp                     ## imm = 0x408
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_weakrand_state,4,2             ## @weakrand_state
	.no_dead_strip	_loud_writecb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function loud_writecb
_loud_writecb:                          ; @loud_writecb
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w27, -40
	.cfi_offset w28, -48
	sub	sp, sp, #1040
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_bufferevent_get_output
	mov	x20, x0
Lloh3:
	adrp	x0, _weakrand_state@GOTPAGE
Lloh4:
	ldr	x0, [x0, _weakrand_state@GOTPAGEOFF]
	bl	_evutil_weakrand_
	mov	x1, x0
	add	x0, sp, #8
	mov	w2, #1024
	bl	_memset
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_evbuffer_get_length
	cmp	w0, #2, lsl #12                 ; =8192
	b.ge	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1024
	bl	_evbuffer_add
	ldr	w8, [x19]
	add	w8, w8, #1024
	str	w8, [x19]
	b	LBB0_1
LBB0_3:
	ldur	x8, [x29, #-40]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	add	sp, sp, #1040
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_weakrand_state,4,2             ; @weakrand_state
	.no_dead_strip	_loud_writecb
.subsections_via_symbols
