	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_pk_load_file           ## -- Begin function mbedtls_pk_load_file
	.p2align	4, 0x90
_mbedtls_pk_load_file:                  ## @mbedtls_pk_load_file
	.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	%rdx, %r15
	movq	%rsi, %r14
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r12
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_fseek
	movq	%r12, %rdi
	callq	_ftell
	cmpq	$-1, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %rbx
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_fseek
	movq	%rbx, (%r15)
	incq	%rbx
	movl	$1, %edi
	movq	%rbx, %rsi
	callq	_mbedtls_calloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	(%r15), %rdx
	movq	%rax, %rdi
	movl	$1, %esi
	movq	%r12, %rcx
	callq	_fread
	movq	%rax, %r13
	movq	(%r15), %rbx
	movq	%r12, %rdi
	callq	_fclose
	movq	(%r14), %rdi
	cmpq	%rbx, %r13
	jne	LBB0_8
## %bb.4:
	movq	(%r15), %rax
	movb	$0, (%rdi,%rax)
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strstr
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.5:
	incq	(%r15)
	jmp	LBB0_11
LBB0_6:
	movq	%r12, %rdi
	callq	_fclose
	jmp	LBB0_9
LBB0_7:
	movq	%r12, %rdi
	callq	_fclose
	movq	_MBEDTLS_ERR_PK_ALLOC_FAILED@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	callq	_mbedtls_free
LBB0_9:
	movq	_MBEDTLS_ERR_PK_FILE_IO_ERROR@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

	.comm	_MBEDTLS_ERR_PK_FILE_IO_ERROR,4,2 ## @MBEDTLS_ERR_PK_FILE_IO_ERROR
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_MBEDTLS_ERR_PK_ALLOC_FAILED,4,2 ## @MBEDTLS_ERR_PK_ALLOC_FAILED
L_.str.1:                               ## @.str.1
	.asciz	"-----BEGIN "

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_pk_load_file           ; -- Begin function mbedtls_pk_load_file
	.p2align	2
_mbedtls_pk_load_file:                  ; @mbedtls_pk_load_file
	.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, x2
	mov	x20, x1
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_9
; %bb.1:
	mov	x21, x0
Lloh2:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_fseek
	mov	x0, x21
	bl	_ftell
	cmn	x0, #1
	b.eq	LBB0_6
; %bb.2:
	mov	x22, x0
Lloh5:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #0
	bl	_fseek
	str	x22, [x19]
	add	x1, x22, #1
	mov	w0, #1
	bl	_mbedtls_calloc
	str	x0, [x20]
	cbz	x0, LBB0_7
; %bb.3:
	ldr	x2, [x19]
	mov	w1, #1
	mov	x3, x21
	bl	_fread
	mov	x22, x0
	ldr	x23, [x19]
	mov	x0, x21
	bl	_fclose
	ldr	x0, [x20]
	cmp	x22, x23
	b.ne	LBB0_8
; %bb.4:
	ldr	x8, [x19]
	strb	wzr, [x0, x8]
	ldr	x0, [x20]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_11
; %bb.5:
	mov	w0, #0
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	b	LBB0_11
LBB0_6:
	mov	x0, x21
	bl	_fclose
	b	LBB0_9
LBB0_7:
	mov	x0, x21
	bl	_fclose
Lloh10:
	adrp	x8, _MBEDTLS_ERR_PK_ALLOC_FAILED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MBEDTLS_ERR_PK_ALLOC_FAILED@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
	bl	_mbedtls_free
LBB0_9:
Lloh12:
	adrp	x8, _MBEDTLS_ERR_PK_FILE_IO_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MBEDTLS_ERR_PK_FILE_IO_ERROR@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
LBB0_11:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

	.comm	_MBEDTLS_ERR_PK_FILE_IO_ERROR,4,2 ; @MBEDTLS_ERR_PK_FILE_IO_ERROR
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_MBEDTLS_ERR_PK_ALLOC_FAILED,4,2 ; @MBEDTLS_ERR_PK_ALLOC_FAILED
l_.str.1:                               ; @.str.1
	.asciz	"-----BEGIN "

.subsections_via_symbols
