	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocsp_fetch                     ## -- Begin function ocsp_fetch
	.p2align	4, 0x90
_ocsp_fetch:                            ## @ocsp_fetch
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r12
	leaq	-112(%rbp), %rax
	movq	%rax, -64(%rbp)
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_context@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	-44(%rbp), %rsi
	callq	_hx509_lock_init
	movl	-44(%rbp), %edi
	leaq	16(%r12), %rsi
	callq	_lock_strings
	cmpl	$0, 12(%r12)
	jne	LBB0_2
## %bb.1:
	movq	$0, -64(%rbp)
LBB0_2:
	movq	(%r12), %rax
	testq	%rax, %rax
	leaq	L_.str(%rip), %rcx
	cmovneq	%rax, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	leaq	-48(%rbp), %r8
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_hx509_certs_init
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	(%r13), %edi
	leaq	L_.str.2(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	callq	_hx509_err
LBB0_4:
	movl	(%r13), %edi
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	addq	$8, %r12
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %r8
	callq	_certs_strings
	movq	(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edi
	leaq	L_.str.4(%rip), %rsi
	leaq	-52(%rbp), %r8
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_hx509_certs_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	(%r13), %edi
	leaq	L_.str.2(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	callq	_hx509_err
LBB0_6:
	cmpl	$2, %r15d
	jl	LBB0_11
## %bb.7:
	movl	%r15d, %r12d
	movl	$1, %r14d
	leaq	L_.str.5(%rip), %r15
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r14
	cmpq	%r14, %r12
	je	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movl	-52(%rbp), %esi
	movl	-44(%rbp), %edx
	movq	(%rbx,%r14,8), %rcx
	callq	_hx509_certs_append
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	(%rbx,%r14,8), %rdx
	movl	$1, %edi
	movq	%r15, %rsi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_errx
	jmp	LBB0_10
LBB0_11:
	movl	(%r13), %edi
	movl	-52(%rbp), %esi
	movl	-48(%rbp), %edx
	movq	-64(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-96(%rbp), %r9
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_hx509_ocsp_request
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_13:
	leaq	L_.str.7(%rip), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	movq	%rax, %rbx
	movq	-96(%rbp), %rcx
	leaq	L_.str.8(%rip), %rsi
	movq	%rax, %rdi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_fprintf
	movl	-88(%rbp), %edi
	movq	-96(%rbp), %rsi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	_fwrite
	movq	%rbx, %rdi
	callq	_fclose
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:
	callq	_der_free_octet_string
LBB0_16:
	leaq	-52(%rbp), %rdi
	callq	_hx509_certs_free
	leaq	-48(%rbp), %rdi
	callq	_hx509_certs_free
	xorl	%eax, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	xorl	%eax, %eax
	callq	_abort
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

	.comm	_context,4,2                    ## @context
L_.str.1:                               ## @.str.1
	.asciz	"MEMORY:ocsp-pool"

L_.str.2:                               ## @.str.2
	.asciz	"hx509_certs_init: MEMORY"

L_.str.3:                               ## @.str.3
	.asciz	"ocsp-pool"

L_.str.4:                               ## @.str.4
	.asciz	"MEMORY:ocsp-req"

L_.str.5:                               ## @.str.5
	.asciz	"hx509_certs_append: req: %s: %d"

L_.str.6:                               ## @.str.6
	.asciz	"hx509_ocsp_request: req: %d"

L_.str.7:                               ## @.str.7
	.asciz	"w"

L_.str.8:                               ## @.str.8
	.asciz	"POST %s HTTP/1.0\r\nContent-Type: application/ocsp-request\r\nContent-Length: %ld\r\n\r\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocsp_fetch                     ; -- Begin function ocsp_fetch
	.p2align	2
_ocsp_fetch:                            ; @ocsp_fetch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x20, x2
	mov	x22, x1
	mov	x21, x0
	add	x8, sp, #40
	str	x8, [sp, #32]
	add	x0, sp, #32
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh0:
	adrp	x23, _context@GOTPAGE
Lloh1:
	ldr	x23, [x23, _context@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x1, sp, #28
	bl	_hx509_lock_init
	ldr	w0, [sp, #28]
	add	x1, x21, #16
	bl	_lock_strings
	ldr	w8, [x21, #12]
	cbnz	w8, LBB0_2
; %bb.1:
	str	xzr, [sp, #32]
LBB0_2:
	ldr	x8, [x21]
Lloh2:
	adrp	x9, l_.str@PAGE
Lloh3:
	add	x9, x9, l_.str@PAGEOFF
	cmp	x8, #0
	csel	x19, x9, x8, eq
	ldr	w0, [x23]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	sub	x4, x29, #56
	mov	w2, #0
	mov	x3, #0
	bl	_hx509_certs_init
	cbz	w0, LBB0_4
; %bb.3:
	mov	x2, x0
	ldr	w0, [x23]
Lloh6:
	adrp	x3, l_.str.2@PAGE
Lloh7:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_4:
	ldr	w0, [x23]
	ldur	w2, [x29, #-56]
	add	x4, x21, #8
	ldr	w3, [sp, #28]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_certs_strings
	ldr	x21, [x20]
	ldr	w0, [x23]
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	sub	x4, x29, #52
	mov	w2, #0
	mov	x3, #0
	bl	_hx509_certs_init
	cbz	w0, LBB0_6
; %bb.5:
	mov	x2, x0
	ldr	w0, [x23]
Lloh12:
	adrp	x3, l_.str.2@PAGE
Lloh13:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_6:
	cmp	w22, #2
	b.lt	LBB0_11
; %bb.7:
	mov	w8, w22
	add	x22, x20, #8
	sub	x24, x8, #1
Lloh14:
	adrp	x20, l_.str.5@PAGE
Lloh15:
	add	x20, x20, l_.str.5@PAGEOFF
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x22, x22, #8
	subs	x24, x24, #1
	b.eq	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	ldur	w1, [x29, #-52]
	ldr	w2, [sp, #28]
	ldr	x3, [x22]
	bl	_hx509_certs_append
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x22]
	stp	x8, x0, [sp]
	mov	w0, #1
	mov	x1, x20
	bl	_errx
	b	LBB0_8
LBB0_11:
	ldr	w0, [x23]
	ldp	w2, w1, [x29, #-56]
	ldr	x6, [sp, #32]
	add	x5, sp, #56
	mov	x3, #0
	mov	x4, #0
	bl	_hx509_ocsp_request
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_13
; %bb.12:
	str	x0, [sp]
Lloh16:
	adrp	x1, l_.str.6@PAGE
Lloh17:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_13:
Lloh18:
	adrp	x1, l_.str.7@PAGE
Lloh19:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x21
	bl	_fopen
	cbz	x0, LBB0_17
; %bb.14:
	mov	x20, x0
	ldr	x3, [sp, #56]
Lloh20:
	adrp	x1, l_.str.8@PAGE
Lloh21:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x2, x19
	bl	_fprintf
	ldr	w0, [sp, #64]
	ldr	x1, [sp, #56]
	mov	w2, #1
	mov	x3, x20
	bl	_fwrite
	mov	x0, x20
	bl	_fclose
	ldr	x0, [sp, #32]
	cbz	x0, LBB0_16
; %bb.15:
	bl	_der_free_octet_string
LBB0_16:
	sub	x0, x29, #52
	bl	_hx509_certs_free
	sub	x0, x29, #56
	bl	_hx509_certs_free
	mov	w0, #0
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_17:
	bl	_abort
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

	.comm	_context,4,2                    ; @context
l_.str.1:                               ; @.str.1
	.asciz	"MEMORY:ocsp-pool"

l_.str.2:                               ; @.str.2
	.asciz	"hx509_certs_init: MEMORY"

l_.str.3:                               ; @.str.3
	.asciz	"ocsp-pool"

l_.str.4:                               ; @.str.4
	.asciz	"MEMORY:ocsp-req"

l_.str.5:                               ; @.str.5
	.asciz	"hx509_certs_append: req: %s: %d"

l_.str.6:                               ; @.str.6
	.asciz	"hx509_ocsp_request: req: %d"

l_.str.7:                               ; @.str.7
	.asciz	"w"

l_.str.8:                               ; @.str.8
	.asciz	"POST %s HTTP/1.0\r\nContent-Type: application/ocsp-request\r\nContent-Length: %ld\r\n\r\n"

.subsections_via_symbols
