	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ptls_load_pem_objects          ## -- Begin function ptls_load_pem_objects
	.p2align	4, 0x90
_ptls_load_pem_objects:                 ## @ptls_load_pem_objects
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %rbx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	movq	$0, (%r14)
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r15
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.4:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	leaq	-88(%rbp), %r14
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_ptls_buffer_dispose
	cmpq	%rbx, %r13
	jae	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%edx, %edx
	callq	_ptls_buffer_init
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_ptls_get_pem_object
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-88(%rbp), %rax
	testq	%rax, %rax
	jle	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, -72(%rbp)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-80(%rbp), %ecx
	movq	%r13, %rdx
	shlq	$4, %rdx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%ecx, 8(%rsi,%rdx)
	movq	%rax, (%rsi,%rdx)
	incq	%r13
	cmpq	%rbx, %r13
	jb	LBB0_5
LBB0_12:
	xorl	%r12d, %r12d
	jmp	LBB0_13
LBB0_3:
	movq	_PTLS_ERROR_PEM_LABEL_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$-1, %r12d
	xorl	%r13d, %r13d
	jmp	LBB0_15
LBB0_2:
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_14
LBB0_9:
	movl	%eax, %r12d
	leaq	-88(%rbp), %rdi
	callq	_ptls_buffer_dispose
LBB0_13:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_14:
	movq	_PTLS_ERROR_PEM_LABEL_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, (%r14)
	movq	%r15, %rdi
	callq	_fclose
LBB0_15:
	xorl	%eax, %eax
	testq	%r13, %r13
	cmovel	%r12d, %eax
	cmpl	%ebx, %r12d
	cmovnel	%r12d, %eax
	addq	$56, %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	"r"

L_.str.1:                               ## @.str.1
	.space	1

	.comm	_PTLS_ERROR_PEM_LABEL_NOT_FOUND,4,2 ## @PTLS_ERROR_PEM_LABEL_NOT_FOUND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ptls_load_pem_objects          ; -- Begin function ptls_load_pem_objects
	.p2align	2
_ptls_load_pem_objects:                 ; @ptls_load_pem_objects
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	str	xzr, [x19]
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	mov	x26, #0
	cbz	x21, LBB0_7
; %bb.2:
Lloh2:
	adrp	x24, l_.str.1@PAGE
Lloh3:
	add	x24, x24, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #8
	bl	_ptls_buffer_dispose
	cmp	x26, x21
	b.hs	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	mov	x1, x24
	mov	w2, #0
	bl	_ptls_buffer_init
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x23
	bl	_ptls_get_pem_object
	cbnz	w0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #8]
	ldr	x9, [sp, #24]
	cmp	x8, #1
	ccmp	x9, #0, #4, ge
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [sp, #16]
	add	x10, x22, x26, lsl #4
	str	w9, [x10, #8]
	str	x8, [x10]
	add	x26, x26, #1
	cmp	x26, x21
	b.lo	LBB0_4
LBB0_7:
	mov	w25, #0
	b	LBB0_10
LBB0_8:
	mov	x26, #0
Lloh4:
	adrp	x8, _PTLS_ERROR_PEM_LABEL_NOT_FOUND@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PTLS_ERROR_PEM_LABEL_NOT_FOUND@GOTPAGEOFF]
Lloh6:
	ldr	w21, [x8]
	mov	w25, #-1
	b	LBB0_11
LBB0_9:
	mov	x25, x0
	add	x0, sp, #8
	bl	_ptls_buffer_dispose
LBB0_10:
Lloh7:
	adrp	x8, _PTLS_ERROR_PEM_LABEL_NOT_FOUND@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PTLS_ERROR_PEM_LABEL_NOT_FOUND@GOTPAGEOFF]
Lloh9:
	ldr	w21, [x8]
	str	x26, [x19]
	mov	x0, x20
	bl	_fclose
LBB0_11:
	cmp	x26, #0
	ccmp	w25, w21, #0, ne
	csel	w0, wzr, w25, eq
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

l_.str.1:                               ; @.str.1
	.space	1

	.comm	_PTLS_ERROR_PEM_LABEL_NOT_FOUND,4,2 ; @PTLS_ERROR_PEM_LABEL_NOT_FOUND
.subsections_via_symbols
