	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_neverbleed_load_private_key_file ## -- Begin function neverbleed_load_private_key_file
	.p2align	4, 0x90
_neverbleed_load_private_key_file:      ## @neverbleed_load_private_key_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_get_thread_data
	movq	%rax, %r13
	movq	$0, -48(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	callq	_expbuf_push_str
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_expbuf_push_str
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_expbuf_write
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdi
	cmoveq	%rax, %rdi
	callq	_dief
LBB0_2:
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_expbuf_dispose
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_expbuf_read
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_errno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rdi
	cmoveq	%rax, %rdi
	callq	_dief
LBB0_4:
	leaq	-48(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_expbuf_shift_num
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	leaq	-48(%rbp), %rdi
	leaq	-72(%rbp), %rsi
	callq	_expbuf_shift_num
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	leaq	L_.str.4(%rip), %rdi
	callq	_dief
LBB0_7:
	movq	-64(%rbp), %rbx
	leaq	-48(%rbp), %rdi
	callq	_expbuf_shift_str
	movq	%rax, %r14
	cmpq	$128, %rbx
	jne	LBB0_14
## %bb.8:
	testq	%r14, %r14
	je	LBB0_10
## %bb.9:
	leaq	-48(%rbp), %rdi
	callq	_expbuf_shift_str
	movq	%rax, %rcx
	testq	%rax, %rax
	jne	LBB0_11
LBB0_10:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	leaq	L_.str.4(%rip), %rdi
	callq	_dief
	xorl	%ecx, %ecx
LBB0_11:
	movq	-72(%rbp), %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_create_pkey
	movq	%rax, %r12
	leaq	-48(%rbp), %rdi
	callq	_expbuf_dispose
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_SSL_CTX_use_PrivateKey
	movl	$1, %ebx
	cmpl	$1, %eax
	je	LBB0_13
## %bb.12:
	movq	_NEVERBLEED_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	xorl	%ebx, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_snprintf
LBB0_13:
	movq	%r12, %rdi
	callq	_EVP_PKEY_free
	jmp	LBB0_17
LBB0_14:
	testq	%r14, %r14
	jne	LBB0_16
## %bb.15:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	leaq	L_.str.4(%rip), %rdi
	callq	_dief
LBB0_16:
	movq	_NEVERBLEED_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_snprintf
	movl	$-1, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$40, %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	"load_key"

	.comm	_errno,8,3                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"write error"

L_.str.2:                               ## @.str.2
	.asciz	"connection closed by daemon"

L_.str.3:                               ## @.str.3
	.asciz	"read error"

L_.str.4:                               ## @.str.4
	.asciz	"failed to parse response"

	.comm	_NEVERBLEED_ERRBUF_SIZE,4,2     ## @NEVERBLEED_ERRBUF_SIZE
L_.str.5:                               ## @.str.5
	.asciz	"%s"

L_.str.6:                               ## @.str.6
	.asciz	"SSL_CTX_use_PrivateKey failed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_neverbleed_load_private_key_file ; -- Begin function neverbleed_load_private_key_file
	.p2align	2
_neverbleed_load_private_key_file:      ; @neverbleed_load_private_key_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x3
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
	bl	_get_thread_data
	mov	x22, x0
	str	xzr, [sp, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #24
	bl	_expbuf_push_str
	add	x0, sp, #24
	mov	x1, x23
	bl	_expbuf_push_str
	ldr	w1, [x22]
	add	x0, sp, #24
	bl	_expbuf_write
Lloh2:
	adrp	x23, _errno@GOTPAGE
Lloh3:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
Lloh4:
	adrp	x24, l_.str.2@PAGE
Lloh5:
	add	x24, x24, l_.str.2@PAGEOFF
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x23]
Lloh6:
	adrp	x9, l_.str.1@PAGE
Lloh7:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x8, #0
	csel	x0, x24, x9, eq
	bl	_dief
LBB0_2:
	add	x0, sp, #24
	bl	_expbuf_dispose
	ldr	w1, [x22]
	add	x0, sp, #24
	bl	_expbuf_read
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x23]
Lloh8:
	adrp	x9, l_.str.3@PAGE
Lloh9:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	x8, #0
	csel	x0, x24, x9, eq
	bl	_dief
LBB0_4:
	add	x0, sp, #24
	add	x1, sp, #8
	bl	_expbuf_shift_num
	cbnz	x0, LBB0_6
; %bb.5:
	add	x0, sp, #24
	add	x1, sp, #16
	bl	_expbuf_shift_num
	cbz	x0, LBB0_7
LBB0_6:
	str	xzr, [x23]
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_dief
LBB0_7:
	ldr	x24, [sp, #8]
	add	x0, sp, #24
	bl	_expbuf_shift_str
	mov	x22, x0
	cmp	x24, #128
	b.ne	LBB0_13
; %bb.8:
	cbz	x22, LBB0_10
; %bb.9:
	add	x0, sp, #24
	bl	_expbuf_shift_str
	mov	x3, x0
	cbnz	x0, LBB0_11
LBB0_10:
	str	xzr, [x23]
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_dief
	mov	x3, #0
LBB0_11:
	ldr	x1, [sp, #16]
	mov	x0, x21
	mov	x2, x22
	bl	_create_pkey
	mov	x21, x0
	add	x0, sp, #24
	bl	_expbuf_dispose
	mov	x0, x20
	mov	x1, x21
	bl	_SSL_CTX_use_PrivateKey
	cmp	w0, #1
	b.ne	LBB0_16
; %bb.12:
	mov	w19, #1
	b	LBB0_17
LBB0_13:
	cbnz	x22, LBB0_15
; %bb.14:
	str	xzr, [x23]
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_dief
LBB0_15:
Lloh16:
	adrp	x8, _NEVERBLEED_ERRBUF_SIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NEVERBLEED_ERRBUF_SIZE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	str	x22, [sp]
Lloh19:
	adrp	x2, l_.str.5@PAGE
Lloh20:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_snprintf
	mov	w19, #-1
	b	LBB0_18
LBB0_16:
Lloh21:
	adrp	x8, _NEVERBLEED_ERRBUF_SIZE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _NEVERBLEED_ERRBUF_SIZE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x2, l_.str.6@PAGE
Lloh25:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_snprintf
	mov	w19, #0
LBB0_17:
	mov	x0, x21
	bl	_EVP_PKEY_free
LBB0_18:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"load_key"

	.comm	_errno,8,3                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"write error"

l_.str.2:                               ; @.str.2
	.asciz	"connection closed by daemon"

l_.str.3:                               ; @.str.3
	.asciz	"read error"

l_.str.4:                               ; @.str.4
	.asciz	"failed to parse response"

	.comm	_NEVERBLEED_ERRBUF_SIZE,4,2     ; @NEVERBLEED_ERRBUF_SIZE
l_.str.5:                               ; @.str.5
	.asciz	"%s"

l_.str.6:                               ; @.str.6
	.asciz	"SSL_CTX_use_PrivateKey failed"

.subsections_via_symbols
