	.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	%r15d, %r15d
	jmp	LBB0_16
LBB0_2:
	movl	%esi, %r14d
	testl	%esi, %esi
	jns	LBB0_5
## %bb.3:
	cmpl	$0, (%rbx)
	je	LBB0_5
## %bb.4:
	leaq	16(%rbx), %rdi
	callq	_event_get_fd
	movl	%eax, %r14d
LBB0_5:
	xorl	%r15d, %r15d
	cmpl	$0, (%rbx)
	je	LBB0_6
## %bb.7:
	leaq	16(%rbx), %r12
	movq	_EV_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_event_pending
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	8(%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	%r12, %rdi
	callq	_event_del
	movq	%r13, %rdi
	callq	_event_del
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	sete	-44(%rbp)                       ## 1-byte Folded Spill
	jmp	LBB0_8
LBB0_6:
	movb	$1, -44(%rbp)                   ## 1-byte Folded Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_8:
	leaq	16(%rbx), %r13
	movl	20(%rbx), %esi
	movq	_EV_READ@GOTPCREL(%rip), %rax
	movq	_EV_PERSIST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_EV_FINALIZE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_be_openssl_readeventcb@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r13, %rdi
	movl	%r14d, %edx
	movq	%rbx, %r9
	callq	_event_assign
	leaq	8(%rbx), %r12
	movl	20(%rbx), %esi
	movq	_EV_WRITE@GOTPCREL(%rip), %rax
	movq	_EV_PERSIST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_EV_FINALIZE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_be_openssl_writeeventcb@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r12, %rdi
	movl	%r14d, %edx
	movq	%rbx, %r9
	callq	_event_assign
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_10
## %bb.9:
	leaq	12(%rbx), %rsi
	movq	%r13, %rdi
	callq	_bufferevent_add_event_
	movl	%eax, %r15d
LBB0_10:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_11
## %bb.12:
	leaq	4(%rbx), %rsi
	movq	%r12, %rdi
	callq	_bufferevent_add_event_
	testl	%r14d, %r14d
	js	LBB0_15
LBB0_14:
	movl	$1, (%rbx)
LBB0_15:
	orl	%eax, %r15d
	sarl	$31, %r15d
LBB0_16:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%eax, %eax
	testl	%r14d, %r14d
	jns	LBB0_14
	jmp	LBB0_15
	.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_13
LBB0_2:
	mov	x20, x1
	tbz	w1, #31, LBB0_5
; %bb.3:
	ldr	w8, [x19]
	cbz	w8, LBB0_5
; %bb.4:
	add	x0, x19, #16
	bl	_event_get_fd
	mov	x20, x0
LBB0_5:
	ldr	w8, [x19]
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	w8, LBB0_7
; %bb.6:
	add	x22, x19, #16
	ldr	w1, [x26]
	mov	x0, x22
	mov	x2, #0
	bl	_event_pending
	mov	x23, x0
	add	x24, x19, #8
	ldr	w1, [x25]
	mov	x0, x24
	mov	x2, #0
	bl	_event_pending
	mov	x21, x0
	mov	x0, x22
	bl	_event_del
	mov	x0, x24
	bl	_event_del
	cmp	w23, #0
	cset	w24, eq
	b	LBB0_8
LBB0_7:
	mov	w21, #0
	mov	w24, #1
LBB0_8:
	add	x22, x19, #16
	ldr	w1, [x19, #20]
	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, x22
	mov	x2, x20
	mov	x5, x19
	bl	_event_assign
	add	x23, x19, #8
	ldr	w1, [x19, #20]
	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, x20
	mov	x5, x19
	bl	_event_assign
	tbz	w24, #0, LBB0_14
; %bb.9:
	mov	w22, #0
	cbz	w21, LBB0_15
LBB0_10:
	add	x1, x19, #4
	mov	x0, x23
	bl	_bufferevent_add_event_
	tbnz	w20, #31, LBB0_12
LBB0_11:
	mov	w8, #1
	str	w8, [x19]
LBB0_12:
	orr	w8, w22, w0
	asr	w0, w8, #31
LBB0_13:
	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
LBB0_14:
	add	x1, x19, #12
	mov	x0, x22
	bl	_bufferevent_add_event_
	mov	x22, x0
	cbnz	w21, LBB0_10
LBB0_15:
	mov	w0, #0
	tbz	w20, #31, LBB0_11
	b	LBB0_12
	.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
