	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_br_ssl_engine_set_buffers_bidi ## -- Begin function br_ssl_engine_set_buffers_bidi
	.p2align	4, 0x90
_br_ssl_engine_set_buffers_bidi:        ## @br_ssl_engine_set_buffers_bidi
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_BR_IO_INOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 112(%rdi)
	movq	$0, 104(%rdi)
	movq	_BR_ERR_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 96(%rdi)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 64(%rdi)
	movups	%xmm0, 80(%rdi)
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.3:
	movq	%rsi, 56(%rbx)
	movq	%rdx, (%rbx)
	testq	%rcx, %rcx
	cmoveq	%rdx, %r8
	cmoveq	%rsi, %rcx
	movq	%rcx, 48(%rbx)
	movq	%r8, 8(%rbx)
	movq	_MAX_OUT_OVERHEAD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_MAX_IN_OVERHEAD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	16384(%rsi), %rcx
	cmpq	%rcx, %r8
	jb	LBB0_5
## %bb.4:
	leaq	16384(%rax), %rdi
	movl	$14, %ecx
	cmpq	%rdx, %rdi
	jbe	LBB0_15
LBB0_5:
	leaq	8192(%rsi), %rdi
	movl	$12, %ecx
	cmpq	%rdi, %r8
	jb	LBB0_7
## %bb.6:
	leaq	8192(%rax), %rdi
	cmpq	%rdx, %rdi
	jbe	LBB0_15
LBB0_7:
	leaq	4096(%rsi), %rdi
	cmpq	%rdi, %r8
	jb	LBB0_9
## %bb.8:
	leaq	4096(%rax), %rdi
	cmpq	%rdx, %rdi
	jbe	LBB0_15
LBB0_9:
	leaq	2048(%rsi), %rcx
	cmpq	%rcx, %r8
	jb	LBB0_11
## %bb.10:
	leaq	2048(%rax), %rdi
	movl	$11, %ecx
	cmpq	%rdx, %rdi
	jbe	LBB0_15
LBB0_11:
	leaq	1024(%rsi), %rcx
	cmpq	%rcx, %r8
	jb	LBB0_13
## %bb.12:
	leaq	1024(%rax), %rdi
	movl	$10, %ecx
	cmpq	%rdx, %rdi
	jbe	LBB0_15
LBB0_13:
	addq	$512, %rsi                      ## imm = 0x200
	cmpq	%rsi, %r8
	jb	LBB0_17
## %bb.14:
	addq	$512, %rax                      ## imm = 0x200
	movl	$9, %ecx
	cmpq	%rdx, %rax
	ja	LBB0_17
LBB0_15:
	movl	$1, %eax
	shlq	%cl, %rax
	movq	%rax, 16(%rbx)
	movl	%ecx, 24(%rbx)
	movq	$0, 40(%rbx)
	jmp	LBB0_16
LBB0_1:
	cmpq	$0, 56(%rbx)
	jne	LBB0_16
## %bb.2:
	movq	_BR_ERR_BAD_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_br_ssl_engine_fail
LBB0_16:
	movq	_br_sslrec_out_clear_vtable@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rbx)
	movq	%rbx, %rdi
	callq	_make_ready_in
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_make_ready_out                 ## TAILCALL
LBB0_17:
	movq	_BR_ERR_BAD_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_br_ssl_engine_fail             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BR_IO_INOUT,4,2                ## @BR_IO_INOUT
	.comm	_BR_ERR_OK,4,2                  ## @BR_ERR_OK
	.comm	_BR_ERR_BAD_PARAM,4,2           ## @BR_ERR_BAD_PARAM
	.comm	_MAX_OUT_OVERHEAD,8,3           ## @MAX_OUT_OVERHEAD
	.comm	_MAX_IN_OVERHEAD,8,3            ## @MAX_IN_OVERHEAD
	.comm	_br_sslrec_out_clear_vtable,4,2 ## @br_sslrec_out_clear_vtable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_br_ssl_engine_set_buffers_bidi ; -- Begin function br_ssl_engine_set_buffers_bidi
	.p2align	2
_br_ssl_engine_set_buffers_bidi:        ; @br_ssl_engine_set_buffers_bidi
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	str	xzr, [x0, #104]
Lloh0:
	adrp	x8, _BR_IO_INOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BR_IO_INOUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _BR_ERR_OK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BR_ERR_OK@GOTPAGEOFF]
	str	w8, [x0, #112]
Lloh5:
	ldr	w8, [x9]
	str	w8, [x0, #96]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x0, #64]
	cbz	x1, LBB0_8
; %bb.1:
	cmp	x3, #0
	csel	x8, x2, x4, eq
	csel	x9, x1, x3, eq
	stp	x9, x1, [x19, #48]
	stp	x2, x8, [x19]
Lloh6:
	adrp	x9, _MAX_OUT_OVERHEAD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAX_OUT_OVERHEAD@GOTPAGEOFF]
Lloh8:
	adrp	x11, _MAX_IN_OVERHEAD@GOTPAGE
Lloh9:
	ldr	x11, [x11, _MAX_IN_OVERHEAD@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x9]
Lloh11:
	ldr	x9, [x11]
	add	x11, x10, #4, lsl #12           ; =16384
	add	x12, x9, #4, lsl #12            ; =16384
	cmp	x8, x11
	ccmp	x12, x2, #2, hs
	b.ls	LBB0_10
; %bb.2:
	add	x11, x10, #2, lsl #12           ; =8192
	add	x12, x9, #2, lsl #12            ; =8192
	cmp	x8, x11
	ccmp	x12, x2, #2, hs
	b.ls	LBB0_11
; %bb.3:
	add	x11, x10, #1, lsl #12           ; =4096
	add	x12, x9, #1, lsl #12            ; =4096
	cmp	x8, x11
	ccmp	x12, x2, #2, hs
	b.ls	LBB0_11
; %bb.4:
	add	x11, x10, #2048
	add	x12, x9, #2048
	cmp	x8, x11
	ccmp	x12, x2, #2, hs
	b.ls	LBB0_14
; %bb.5:
	add	x11, x10, #1024
	cmp	x8, x11
	b.lo	LBB0_15
; %bb.6:
	add	x11, x9, #1024
	cmp	x11, x2
	b.hi	LBB0_15
; %bb.7:
	mov	w8, #10
	b	LBB0_12
LBB0_8:
	ldr	x8, [x19, #56]
	cbnz	x8, LBB0_13
; %bb.9:
Lloh12:
	adrp	x8, _BR_ERR_BAD_PARAM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BR_ERR_BAD_PARAM@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_br_ssl_engine_fail
	b	LBB0_13
LBB0_10:
	mov	w8, #14
	b	LBB0_12
LBB0_11:
	mov	w8, #12
LBB0_12:
	mov	w9, #1
	lsl	x9, x9, x8
	str	x9, [x19, #16]
	str	w8, [x19, #24]
	str	xzr, [x19, #40]
LBB0_13:
Lloh15:
	adrp	x8, _br_sslrec_out_clear_vtable@GOTPAGE
Lloh16:
	ldr	x8, [x8, _br_sslrec_out_clear_vtable@GOTPAGEOFF]
	str	x8, [x19, #32]
	mov	x0, x19
	bl	_make_ready_in
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_make_ready_out
LBB0_14:
	mov	w8, #11
	b	LBB0_12
LBB0_15:
	add	x10, x10, #512
	cmp	x8, x10
	b.lo	LBB0_18
; %bb.16:
	add	x8, x9, #512
	cmp	x8, x2
	b.hi	LBB0_18
; %bb.17:
	mov	w8, #9
	b	LBB0_12
LBB0_18:
Lloh17:
	adrp	x8, _BR_ERR_BAD_PARAM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BR_ERR_BAD_PARAM@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_br_ssl_engine_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_BR_IO_INOUT,4,2                ; @BR_IO_INOUT
	.comm	_BR_ERR_OK,4,2                  ; @BR_ERR_OK
	.comm	_BR_ERR_BAD_PARAM,4,2           ; @BR_ERR_BAD_PARAM
	.comm	_MAX_OUT_OVERHEAD,8,3           ; @MAX_OUT_OVERHEAD
	.comm	_MAX_IN_OVERHEAD,8,3            ; @MAX_IN_OVERHEAD
	.comm	_br_sslrec_out_clear_vtable,4,2 ; @br_sslrec_out_clear_vtable
.subsections_via_symbols
