	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgp_extract_armor_headers      ## -- Begin function pgp_extract_armor_headers
	.p2align	4, 0x90
_pgp_extract_armor_headers:             ## @pgp_extract_armor_headers
	.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, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movl	%esi, %ebx
	addq	%rdi, %rbx
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_find_header
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movl	%eax, %edi
	addq	-48(%rbp), %rdi
	movq	%rdi, -48(%rbp)
	leaq	-72(%rbp), %rdx
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	_find_header
	testl	%eax, %eax
	jle	LBB0_1
## %bb.3:
	movq	-48(%rbp), %rax
	movq	-72(%rbp), %rdx
	xorl	%r13d, %r13d
	cmpq	%rdx, %rax
	jae	LBB0_4
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rax), %ecx
	cmpb	$10, %cl
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpb	$13, %cl
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	subl	%eax, %edx
	movq	%rax, %rdi
	movl	$10, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memchr
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rax
	incl	%ebx
	movq	-72(%rbp), %rdx
	cmpq	%rdx, %rax
	jb	LBB0_6
LBB0_10:
	movq	%rax, %r14
	movq	-48(%rbp), %rax
	jmp	LBB0_11
LBB0_4:
	movq	%rax, %r14
	xorl	%ebx, %ebx
LBB0_11:
	subq	%rax, %r14
	leal	1(%r14), %edi
	callq	_palloc
	movq	%rax, %r15
	movq	-48(%rbp), %rsi
	movq	%rax, %rdi
	movl	%r14d, %edx
	callq	_memcpy
	movslq	%r14d, %rax
	movb	$0, (%r15,%rax)
	leal	(,%rbx,8), %r14d
	movl	%r14d, %edi
	callq	_palloc
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	%r14d, %edi
	callq	_palloc
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	%r15, %rdi
	movl	$10, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_20
## %bb.12:
	movq	%rax, %r14
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	%ebx, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%r15, (%rax,%r13,8)
	addq	$2, %r12
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%r12, (%rax,%r13,8)
	incq	%r13
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_strchr
	movq	%rax, %r14
	movq	%rbx, %r15
	testq	%rax, %rax
	je	LBB0_19
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rax
	cmpq	%r15, %r14
	jbe	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	leaq	-1(%r14), %rax
	cmpb	$13, -1(%r14)
	cmovneq	%r14, %rax
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movb	$0, (%rax)
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_1
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%rax, %r12
	movq	%r14, %rbx
	incq	%rbx
	movb	$0, (%rax)
	cmpq	-96(%rbp), %r13                 ## 8-byte Folded Reload
	jb	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elog
	jmp	LBB0_18
LBB0_1:
	movq	_PXE_PGP_CORRUPT_ARMOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_23
LBB0_19:
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
LBB0_20:
	cmpl	%ebx, %r13d
	je	LBB0_22
## %bb.21:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elog
LBB0_22:
	movl	%r13d, (%r12)
	xorl	%eax, %eax
LBB0_23:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PXE_PGP_CORRUPT_ARMOR,4,2      ## @PXE_PGP_CORRUPT_ARMOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	": "

	.comm	_ERROR,4,2                      ## @ERROR
L_.str.1:                               ## @.str.1
	.asciz	"unexpected number of armor header lines"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgp_extract_armor_headers      ; -- Begin function pgp_extract_armor_headers
	.p2align	2
_pgp_extract_armor_headers:             ; @pgp_extract_armor_headers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x4
	mov	x21, x3
	mov	x19, x2
	add	x22, x0, w1, uxtw
	add	x2, sp, #24
	mov	x1, x22
	mov	w3, #0
	bl	_find_header
	cmp	w0, #0
	b.le	LBB0_17
; %bb.1:
	ldr	x8, [sp, #24]
	add	x0, x8, w0, uxtw
	str	x0, [sp, #24]
	add	x2, sp, #16
	mov	x1, x22
	mov	w3, #1
	bl	_find_header
	cmp	w0, #0
	b.le	LBB0_17
; %bb.2:
	ldp	x8, x0, [sp, #16]
	cmp	x0, x8
	b.hs	LBB0_8
; %bb.3:
	mov	w27, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x0]
	cmp	w9, #10
	ccmp	w9, #13, #4, ne
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w2, w8, w0
	mov	w1, #10
	bl	_memchr
	cbz	x0, LBB0_17
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, x0, #1
	add	w27, w27, #1
	ldr	x8, [sp, #16]
	cmp	x0, x8
	b.lo	LBB0_4
LBB0_7:
	mov	x8, x0
	ldr	x0, [sp, #24]
	b	LBB0_9
LBB0_8:
	mov	w27, #0
	mov	x8, x0
LBB0_9:
	sub	x23, x8, x0
	add	w0, w23, #1
	bl	_palloc
	mov	x22, x0
	ldr	x1, [sp, #24]
	mov	x2, x23
	bl	_memcpy
	strb	wzr, [x22, w23, sxtw]
	lsl	w23, w27, #3
	mov	x0, x23
	bl	_palloc
	str	x0, [x21]
	mov	x0, x23
	bl	_palloc
	str	x0, [x20]
	mov	x0, x22
	mov	w1, #10
	bl	_strchr
	cbz	x0, LBB0_18
; %bb.10:
	mov	x24, x0
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	mov	x28, #0
	mov	w19, w27
Lloh0:
	adrp	x23, l_.str@PAGE
Lloh1:
	add	x23, x23, l_.str@PAGEOFF
Lloh2:
	adrp	x25, l_.str.1@PAGE
Lloh3:
	add	x25, x25, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x21]
	lsl	x9, x28, #3
	str	x22, [x8, x9]
	add	x22, x24, #1
	add	x8, x26, #2
	ldr	x10, [x20]
	str	x8, [x10, x9]
	add	x28, x28, #1
	mov	x0, x22
	mov	w1, #10
	bl	_strchr
	mov	x24, x0
	cbz	x0, LBB0_19
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x8, x24
	cmp	x24, x22
	b.ls	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x8, x24
	ldrb	w9, [x8, #-1]!
	cmp	w9, #13
	csel	x8, x8, x24, eq
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	strb	wzr, [x8]
	mov	x0, x22
	mov	x1, x23
	bl	_strstr
	cbz	x0, LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x26, x0
	strb	wzr, [x0]
	cmp	x28, x19
	b.lo	LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
Lloh4:
	adrp	x8, _ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	mov	x1, x25
	bl	_elog
	b	LBB0_11
LBB0_17:
Lloh7:
	adrp	x8, _PXE_PGP_CORRUPT_ARMOR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PXE_PGP_CORRUPT_ARMOR@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_22
LBB0_18:
	mov	w28, #0
	cmp	w28, w27
	b.ne	LBB0_20
	b	LBB0_21
LBB0_19:
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	cmp	w28, w27
	b.eq	LBB0_21
LBB0_20:
Lloh10:
	adrp	x8, _ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_21:
	mov	w0, #0
	str	w28, [x19]
LBB0_22:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PXE_PGP_CORRUPT_ARMOR,4,2      ; @PXE_PGP_CORRUPT_ARMOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	": "

	.comm	_ERROR,4,2                      ; @ERROR
l_.str.1:                               ; @.str.1
	.asciz	"unexpected number of armor header lines"

.subsections_via_symbols
