	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_open_callbacks
_set_open_callbacks:                    ## @set_open_callbacks
	.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, %rbx
	movq	24(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	_be_openssl_readcb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_be_openssl_writecb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_be_openssl_eventcb@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %r8
	callq	_bufferevent_setcb
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_2:
	movl	%esi, %r12d
	leaq	12(%rbx), %r15
	movq	%r15, %rdi
	callq	_event_initialized
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	_EV_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_event_pending
	movl	%eax, %r14d
	leaq	4(%rbx), %r13
	movq	_EV_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_event_pending
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_event_del
	movq	%r13, %rdi
	callq	_event_del
	testl	%r14d, %r14d
	sete	-41(%rbp)                       ## 1-byte Folded Spill
	jmp	LBB0_5
LBB0_3:
	movb	$1, -41(%rbp)                   ## 1-byte Folded Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_5:
	movl	16(%rbx), %esi
	movq	_EV_READ@GOTPCREL(%rip), %rax
	movq	_EV_PERSIST@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	orl	(%rax), %ecx
	movq	_EV_FINALIZE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_be_openssl_readeventcb@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movl	%r12d, %edx
	movq	%rbx, %r9
	callq	_event_assign
	leaq	4(%rbx), %r14
	movl	16(%rbx), %esi
	movq	_EV_WRITE@GOTPCREL(%rip), %rax
	movl	(%r13), %ecx
	orl	(%rax), %ecx
	movq	_EV_FINALIZE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_be_openssl_writeeventcb@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movl	%r12d, %edx
	movq	%rbx, %r9
	callq	_event_assign
	cmpb	$0, -41(%rbp)                   ## 1-byte Folded Reload
	movl	$0, %r12d
	jne	LBB0_7
## %bb.6:
	leaq	8(%rbx), %rsi
	movq	%r15, %rdi
	callq	_bufferevent_add_event_
	movl	%eax, %r12d
LBB0_7:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_8
## %bb.9:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bufferevent_add_event_
	shrl	$31, %eax
	jmp	LBB0_10
LBB0_8:
	xorl	%eax, %eax
LBB0_10:
	testl	%r12d, %r12d
	sets	%cl
	orb	%al, %cl
	movzbl	%cl, %eax
	negl	%eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_be_openssl_readcb,4,2          ## @be_openssl_readcb
	.comm	_be_openssl_writecb,4,2         ## @be_openssl_writecb
	.comm	_be_openssl_eventcb,4,2         ## @be_openssl_eventcb
	.comm	_EV_READ,4,2                    ## @EV_READ
	.comm	_EV_WRITE,4,2                   ## @EV_WRITE
	.comm	_EV_PERSIST,4,2                 ## @EV_PERSIST
	.comm	_EV_FINALIZE,4,2                ## @EV_FINALIZE
	.comm	_be_openssl_readeventcb,4,2     ## @be_openssl_readeventcb
	.comm	_be_openssl_writeeventcb,4,2    ## @be_openssl_writeeventcb
	.no_dead_strip	_set_open_callbacks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_open_callbacks
_set_open_callbacks:                    ; @set_open_callbacks
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x0, [x0, #24]
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _be_openssl_readcb@GOTPAGE
Lloh1:
	ldr	x8, [x8, _be_openssl_readcb@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _be_openssl_writecb@GOTPAGE
Lloh4:
	ldr	x8, [x8, _be_openssl_writecb@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _be_openssl_eventcb@GOTPAGE
Lloh7:
	ldr	x8, [x8, _be_openssl_eventcb@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x4, x19
	bl	_bufferevent_setcb
	mov	w0, #0
	b	LBB0_11
LBB0_2:
	mov	x21, x1
	add	x20, x19, #12
	mov	x0, x20
	bl	_event_initialized
Lloh9:
	adrp	x26, _EV_READ@GOTPAGE
Lloh10:
	ldr	x26, [x26, _EV_READ@GOTPAGEOFF]
Lloh11:
	adrp	x25, _EV_WRITE@GOTPAGE
Lloh12:
	ldr	x25, [x25, _EV_WRITE@GOTPAGEOFF]
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w1, [x26]
	mov	x0, x20
	mov	x2, #0
	bl	_event_pending
	mov	x23, x0
	add	x24, x19, #4
	ldr	w1, [x25]
	mov	x0, x24
	mov	x2, #0
	bl	_event_pending
	mov	x22, x0
	mov	x0, x20
	bl	_event_del
	mov	x0, x24
	bl	_event_del
	cmp	w23, #0
	cset	w24, eq
	b	LBB0_5
LBB0_4:
	mov	w22, #0
	mov	w24, #1
LBB0_5:
	ldr	w1, [x19, #16]
	ldr	w8, [x26]
Lloh13:
	adrp	x26, _EV_PERSIST@GOTPAGE
Lloh14:
	ldr	x26, [x26, _EV_PERSIST@GOTPAGEOFF]
	ldr	w9, [x26]
Lloh15:
	adrp	x27, _EV_FINALIZE@GOTPAGE
Lloh16:
	ldr	x27, [x27, _EV_FINALIZE@GOTPAGEOFF]
	orr	w8, w9, w8
	ldr	w9, [x27]
	orr	w3, w8, w9
Lloh17:
	adrp	x8, _be_openssl_readeventcb@GOTPAGE
Lloh18:
	ldr	x8, [x8, _be_openssl_readeventcb@GOTPAGEOFF]
Lloh19:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x2, x21
	mov	x5, x19
	bl	_event_assign
	add	x23, x19, #4
	ldr	w1, [x19, #16]
	ldr	w8, [x25]
	ldr	w9, [x26]
	orr	w8, w9, w8
	ldr	w9, [x27]
	orr	w3, w8, w9
Lloh20:
	adrp	x8, _be_openssl_writeeventcb@GOTPAGE
Lloh21:
	ldr	x8, [x8, _be_openssl_writeeventcb@GOTPAGEOFF]
Lloh22:
	ldr	w4, [x8]
	mov	x0, x23
	mov	x2, x21
	mov	x5, x19
	bl	_event_assign
	tbz	w24, #0, LBB0_8
; %bb.6:
	mov	w20, #0
	cbz	w22, LBB0_9
LBB0_7:
	mov	x0, x23
	mov	x1, x19
	bl	_bufferevent_add_event_
	lsr	w8, w0, #31
	b	LBB0_10
LBB0_8:
	add	x1, x19, #8
	mov	x0, x20
	bl	_bufferevent_add_event_
	mov	x20, x0
	cbnz	w22, LBB0_7
LBB0_9:
	mov	w8, #0
LBB0_10:
	cmp	w20, #0
	cset	w9, lt
	orr	w8, w9, w8
	sbfx	w0, w8, #0, #1
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_be_openssl_readcb,4,2          ; @be_openssl_readcb
	.comm	_be_openssl_writecb,4,2         ; @be_openssl_writecb
	.comm	_be_openssl_eventcb,4,2         ; @be_openssl_eventcb
	.comm	_EV_READ,4,2                    ; @EV_READ
	.comm	_EV_WRITE,4,2                   ; @EV_WRITE
	.comm	_EV_PERSIST,4,2                 ; @EV_PERSIST
	.comm	_EV_FINALIZE,4,2                ; @EV_FINALIZE
	.comm	_be_openssl_readeventcb,4,2     ; @be_openssl_readeventcb
	.comm	_be_openssl_writeeventcb,4,2    ; @be_openssl_writeeventcb
	.no_dead_strip	_set_open_callbacks
.subsections_via_symbols
