	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_fetch_input        ## -- Begin function mbedtls_ssl_fetch_input
	.p2align	4, 0x90
_mbedtls_ssl_fetch_input:               ## @mbedtls_ssl_fetch_input
	.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	%rsi, %r14
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	cmpq	$0, (%r12)
	jne	LBB0_2
## %bb.1:
	cmpq	$0, 8(%r12)
	je	LBB0_16
LBB0_2:
	movq	_MBEDTLS_SSL_BUFFER_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subq	16(%r12), %rax
	addq	24(%r12), %rax
	cmpq	%r14, %rax
	jae	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_17
LBB0_4:
	movl	$2, %edi
	movq	%r14, %rsi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	40(%r12), %rbx
	cmpq	%r14, %rbx
	jae	LBB0_15
## %bb.5:
	leaq	L_.str.4(%rip), %r15
	movq	_MBEDTLS_ERR_SSL_TIMEOUT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_ssl_check_timer
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r13), %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdx
	subq	%rbx, %rdx
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	64(%r12), %edi
	movq	40(%r12), %rsi
	addq	16(%r12), %rsi
	movq	72(%r12), %rcx
	movl	16(%rcx), %ecx
	callq	*%rax
	jmp	LBB0_11
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	64(%r12), %edi
	movq	40(%r12), %rsi
	addq	16(%r12), %rsi
	callq	*(%r12)
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, %ebx
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	$2, %edi
	movq	%r14, %rsi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movl	$2, %edi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_MBEDTLS_SSL_DEBUG_RET
	testl	%ebx, %ebx
	je	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	js	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, %ebx
	addq	40(%r12), %rbx
	movq	%rbx, 40(%r12)
	cmpq	%r14, %rbx
	jb	LBB0_6
LBB0_15:
	leaq	L_.str.5(%rip), %rsi
	movl	$2, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_16:
	leaq	L_.str.1(%rip), %rsi
LBB0_17:
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_BAD_INPUT_DATA@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	_MBEDTLS_ERR_SSL_CONN_EOF@GOTPCREL(%rip), %rax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"=> fetch input"

L_.str.1:                               ## @.str.1
	.asciz	"Bad usage of mbedtls_ssl_set_bio() or mbedtls_ssl_set_bio()"

	.comm	_MBEDTLS_ERR_SSL_BAD_INPUT_DATA,4,2 ## @MBEDTLS_ERR_SSL_BAD_INPUT_DATA
	.comm	_MBEDTLS_SSL_BUFFER_LEN,8,3     ## @MBEDTLS_SSL_BUFFER_LEN
L_.str.2:                               ## @.str.2
	.asciz	"requesting more data than fits"

	.comm	_MBEDTLS_ERR_SSL_TIMEOUT,4,2    ## @MBEDTLS_ERR_SSL_TIMEOUT
L_.str.4:                               ## @.str.4
	.asciz	"ssl->f_recv(_timeout)"

	.comm	_MBEDTLS_ERR_SSL_CONN_EOF,4,2   ## @MBEDTLS_ERR_SSL_CONN_EOF
L_.str.5:                               ## @.str.5
	.asciz	"<= fetch input"

	.comm	_MBEDTLS_ERR_SSL_INTERNAL_ERROR,4,2 ## @MBEDTLS_ERR_SSL_INTERNAL_ERROR
	.comm	_MBEDTLS_ERR_SSL_WANT_READ,4,2  ## @MBEDTLS_ERR_SSL_WANT_READ
	.comm	_MBEDTLS_SSL_HANDSHAKE_OVER,8,3 ## @MBEDTLS_SSL_HANDSHAKE_OVER
	.comm	_MBEDTLS_SSL_IS_SERVER,8,3      ## @MBEDTLS_SSL_IS_SERVER
	.comm	_MBEDTLS_SSL_RENEGOTIATION_PENDING,8,3 ## @MBEDTLS_SSL_RENEGOTIATION_PENDING
	.comm	_MBEDTLS_SSL_TRANSPORT_DATAGRAM,8,3 ## @MBEDTLS_SSL_TRANSPORT_DATAGRAM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_fetch_input        ; -- Begin function mbedtls_ssl_fetch_input
	.p2align	2
_mbedtls_ssl_fetch_input:               ; @mbedtls_ssl_fetch_input
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_MBEDTLS_SSL_DEBUG_MSG
	ldr	x8, [x20]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_16
LBB0_2:
Lloh2:
	adrp	x8, _MBEDTLS_SSL_BUFFER_LEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MBEDTLS_SSL_BUFFER_LEN@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldp	x9, x10, [x20, #16]
	sub	x8, x8, x9
	add	x8, x8, x10
	cmp	x8, x19
	b.hs	LBB0_4
; %bb.3:
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_4:
	mov	w0, #2
	mov	x1, x19
	bl	_MBEDTLS_SSL_DEBUG_MSG
	ldr	x22, [x20, #40]
	cmp	x22, x19
	b.hs	LBB0_15
; %bb.5:
Lloh7:
	adrp	x21, l_.str.4@PAGE
Lloh8:
	add	x21, x21, l_.str.4@PAGEOFF
Lloh9:
	adrp	x23, _MBEDTLS_ERR_SSL_TIMEOUT@GOTPAGE
Lloh10:
	ldr	x23, [x23, _MBEDTLS_ERR_SSL_TIMEOUT@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_ssl_check_timer
	cbz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w22, [x23]
	b	LBB0_12
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	sub	x2, x19, x22
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x20, #64]
	ldr	x9, [x20, #16]
	ldr	x10, [x20, #40]
	add	x1, x10, x9
	ldr	x9, [x20, #72]
	ldr	w3, [x9, #16]
	blr	x8
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20]
	ldr	w0, [x20, #64]
	ldr	x9, [x20, #16]
	ldr	x10, [x20, #40]
	add	x1, x10, x9
	blr	x8
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x22, x0
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #2
	mov	x1, x19
	bl	_MBEDTLS_SSL_DEBUG_MSG
	mov	w0, #2
	mov	x1, x21
	mov	x2, x22
	bl	_MBEDTLS_SSL_DEBUG_RET
	cbz	w22, LBB0_20
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	tbnz	w22, #31, LBB0_19
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20, #40]
	add	x22, x8, w22, uxtw
	str	x22, [x20, #40]
	cmp	x22, x19
	b.lo	LBB0_6
LBB0_15:
Lloh11:
	adrp	x1, l_.str.5@PAGE
Lloh12:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #2
	bl	_MBEDTLS_SSL_DEBUG_MSG
	mov	w22, #0
	b	LBB0_19
LBB0_16:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_17:
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh15:
	adrp	x8, _MBEDTLS_ERR_SSL_BAD_INPUT_DATA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_BAD_INPUT_DATA@GOTPAGEOFF]
LBB0_18:
	ldr	w22, [x8]
LBB0_19:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_20:
Lloh17:
	adrp	x8, _MBEDTLS_ERR_SSL_CONN_EOF@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_CONN_EOF@GOTPAGEOFF]
	b	LBB0_18
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"=> fetch input"

l_.str.1:                               ; @.str.1
	.asciz	"Bad usage of mbedtls_ssl_set_bio() or mbedtls_ssl_set_bio()"

	.comm	_MBEDTLS_ERR_SSL_BAD_INPUT_DATA,4,2 ; @MBEDTLS_ERR_SSL_BAD_INPUT_DATA
	.comm	_MBEDTLS_SSL_BUFFER_LEN,8,3     ; @MBEDTLS_SSL_BUFFER_LEN
l_.str.2:                               ; @.str.2
	.asciz	"requesting more data than fits"

	.comm	_MBEDTLS_ERR_SSL_TIMEOUT,4,2    ; @MBEDTLS_ERR_SSL_TIMEOUT
l_.str.4:                               ; @.str.4
	.asciz	"ssl->f_recv(_timeout)"

	.comm	_MBEDTLS_ERR_SSL_CONN_EOF,4,2   ; @MBEDTLS_ERR_SSL_CONN_EOF
l_.str.5:                               ; @.str.5
	.asciz	"<= fetch input"

	.comm	_MBEDTLS_ERR_SSL_INTERNAL_ERROR,4,2 ; @MBEDTLS_ERR_SSL_INTERNAL_ERROR
	.comm	_MBEDTLS_ERR_SSL_WANT_READ,4,2  ; @MBEDTLS_ERR_SSL_WANT_READ
	.comm	_MBEDTLS_SSL_HANDSHAKE_OVER,8,3 ; @MBEDTLS_SSL_HANDSHAKE_OVER
	.comm	_MBEDTLS_SSL_IS_SERVER,8,3      ; @MBEDTLS_SSL_IS_SERVER
	.comm	_MBEDTLS_SSL_RENEGOTIATION_PENDING,8,3 ; @MBEDTLS_SSL_RENEGOTIATION_PENDING
	.comm	_MBEDTLS_SSL_TRANSPORT_DATAGRAM,8,3 ; @MBEDTLS_SSL_TRANSPORT_DATAGRAM
.subsections_via_symbols
