	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_x509_certificate_parse         ## -- Begin function x509_certificate_parse
	.p2align	4, 0x90
_x509_certificate_parse:                ## @x509_certificate_parse
	.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	%rsi, %r14
	movq	%rdi, %r13
	leal	48(%rsi), %edi
	callq	_os_zalloc
	testq	%rax, %rax
	je	LBB0_18
## %bb.1:
	movq	%rax, %r15
	leaq	48(%rax), %rbx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_os_memcpy
	movq	%rbx, 32(%r15)
	movq	%r14, (%r15)
	leaq	-80(%rbp), %rdx
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_asn1_get_next
	movq	-80(%rbp), %rdx
	testq	%rax, %rax
	js	LBB0_15
## %bb.2:
	movq	_ASN1_CLASS_UNIVERSAL@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rdx
	jne	LBB0_15
## %bb.3:
	movq	-72(%rbp), %rax
	movq	_ASN1_TAG_SEQUENCE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.4:
	leaq	(,%r14,8), %r14
	addq	%r13, %r14
	movq	-56(%rbp), %r12
	movq	%r12, -48(%rbp)
	movslq	-64(%rbp), %rax
	movq	%r14, %rsi
	subq	%r12, %rsi
	movq	%rsi, %rcx
	sarq	$3, %rcx
	cmpq	%rax, %rcx
	jl	LBB0_17
## %bb.5:
	jle	LBB0_7
## %bb.6:
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	(%r12,%rax,8), %rdx
	subq	%rdx, %r14
	shrq	$3, %r14
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %ecx
	callq	_wpa_hexdump
	movslq	-64(%rbp), %rsi
	leaq	(%r12,%rsi,8), %r14
	shlq	$3, %rsi
LBB0_7:
	movq	%r12, %rax
	subq	%r13, %rax
	addq	32(%r15), %rax
	movq	%rax, 40(%r15)
	shrq	$3, %rsi
	leaq	-48(%rbp), %rcx
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r15, %rdx
	callq	_x509_parse_tbs_certificate
	testq	%rax, %rax
	jne	LBB0_17
## %bb.8:
	movq	-48(%rbp), %rdi
	movq	%rdi, %rax
	subq	%r12, %rax
	shrq	$3, %rax
	movl	%eax, 8(%r15)
	movq	%r14, %rsi
	subq	%rdi, %rsi
	shrq	$3, %rsi
	movq	%r15, %rdx
	addq	$24, %rdx
	leaq	-48(%rbp), %rcx
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_x509_parse_algorithm_identifier
	testq	%rax, %rax
	jne	LBB0_17
## %bb.9:
	movq	-48(%rbp), %rdi
	subq	%rdi, %r14
	shrq	$3, %r14
	leaq	-80(%rbp), %rdx
	movl	%r14d, %esi
	callq	_asn1_get_next
	movq	-80(%rbp), %rdx
	testq	%rax, %rax
	js	LBB0_20
## %bb.10:
	cmpq	(%rbx), %rdx
	jne	LBB0_20
## %bb.11:
	movq	-72(%rbp), %rax
	movq	_ASN1_TAG_BITSTRING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.12:
	cmpl	$0, -64(%rbp)
	jle	LBB0_17
## %bb.13:
	movq	-56(%rbp), %rax
	movq	%rax, -48(%rbp)
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_21
## %bb.14:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_17
LBB0_15:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-72(%rbp), %rcx
	leaq	L_.str(%rip), %rsi
LBB0_16:
	xorl	%eax, %eax
	callq	_wpa_printf
LBB0_17:
	movq	%r15, %rdi
	callq	_x509_certificate_free
LBB0_18:
	xorl	%r15d, %r15d
LBB0_19:
	movq	%r15, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-72(%rbp), %rcx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_16
LBB0_21:
	movq	16(%r15), %rdi
	callq	_os_free
	movq	-48(%rbp), %rdi
	addq	$8, %rdi
	movl	-64(%rbp), %esi
	decl	%esi
	callq	_os_memdup
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movl	-64(%rbp), %ecx
	decl	%ecx
	movl	%ecx, 12(%r15)
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	leaq	L_.str.5(%rip), %rsi
	movq	%rax, %rdx
	callq	_wpa_hexdump
	jmp	LBB0_19
LBB0_23:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_ASN1_CLASS_UNIVERSAL,8,3       ## @ASN1_CLASS_UNIVERSAL
	.comm	_ASN1_TAG_SEQUENCE,8,3          ## @ASN1_TAG_SEQUENCE
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"X509: Certificate did not start with a valid SEQUENCE - found class %d tag 0x%x"

	.comm	_MSG_MSGDUMP,4,2                ## @MSG_MSGDUMP
L_.str.1:                               ## @.str.1
	.asciz	"X509: Ignoring extra data after DER encoded certificate"

	.comm	_ASN1_TAG_BITSTRING,8,3         ## @ASN1_TAG_BITSTRING
L_.str.2:                               ## @.str.2
	.asciz	"X509: Expected BITSTRING (signatureValue) - found class %d tag 0x%x"

L_.str.3:                               ## @.str.3
	.asciz	"X509: BITSTRING - %d unused bits"

L_.str.4:                               ## @.str.4
	.asciz	"X509: Failed to allocate memory for signatureValue"

L_.str.5:                               ## @.str.5
	.asciz	"X509: signature"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_x509_certificate_parse         ; -- Begin function x509_certificate_parse
	.p2align	2
_x509_certificate_parse:                ; @x509_certificate_parse
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x21, x1
	mov	x20, x0
	add	w0, w21, #48
	bl	_os_zalloc
	mov	x19, x0
	cbz	x0, LBB0_18
; %bb.1:
	add	x22, x19, #48
	mov	x0, x22
	mov	x1, x20
	mov	x2, x21
	bl	_os_memcpy
	str	x22, [x19, #32]
	str	x21, [x19]
	add	x2, sp, #32
	mov	x0, x20
	mov	x1, x21
	bl	_asn1_get_next
	ldr	x8, [sp, #32]
	tbnz	x0, #63, LBB0_15
; %bb.2:
Lloh0:
	adrp	x22, _ASN1_CLASS_UNIVERSAL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ASN1_CLASS_UNIVERSAL@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.3:
	ldr	x9, [sp, #40]
Lloh2:
	adrp	x10, _ASN1_TAG_SEQUENCE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _ASN1_TAG_SEQUENCE@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_15
; %bb.4:
	add	x23, x20, x21, lsl #3
	ldr	x21, [sp, #56]
	str	x21, [sp, #24]
	ldrsw	x9, [sp, #48]
	sub	x8, x23, x21
	asr	x10, x8, #3
	cmp	x10, x9
	b.lt	LBB0_17
; %bb.5:
	b.le	LBB0_7
; %bb.6:
Lloh5:
	adrp	x8, _MSG_MSGDUMP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSG_MSGDUMP@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x2, x21, x9, lsl #3
	sub	x8, x23, x2
	lsr	x3, x8, #3
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_wpa_hexdump
	ldrsw	x8, [sp, #48]
	lsl	x8, x8, #3
	add	x23, x21, x8
LBB0_7:
	ldr	x9, [x19, #32]
	sub	x10, x21, x20
	add	x9, x9, x10
	str	x9, [x19, #40]
	lsr	x1, x8, #3
	add	x3, sp, #24
	mov	x0, x21
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, x19
	bl	_x509_parse_tbs_certificate
	cbnz	x0, LBB0_17
; %bb.8:
	ldr	x0, [sp, #24]
	sub	x8, x0, x21
	lsr	x8, x8, #3
	str	w8, [x19, #8]
	sub	x8, x23, x0
	lsr	x1, x8, #3
	add	x2, x19, #24
	add	x3, sp, #24
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_x509_parse_algorithm_identifier
	cbnz	x0, LBB0_17
; %bb.9:
	ldr	x0, [sp, #24]
	sub	x8, x23, x0
	lsr	x1, x8, #3
	add	x2, sp, #32
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_asn1_get_next
	ldr	x8, [sp, #32]
	tbnz	x0, #63, LBB0_19
; %bb.10:
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.11:
	ldr	x9, [sp, #40]
Lloh10:
	adrp	x10, _ASN1_TAG_BITSTRING@GOTPAGE
Lloh11:
	ldr	x10, [x10, _ASN1_TAG_BITSTRING@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_19
; %bb.12:
	ldr	w8, [sp, #48]
	cmp	w8, #0
	b.le	LBB0_17
; %bb.13:
	ldr	x8, [sp, #56]
	str	x8, [sp, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_20
; %bb.14:
Lloh13:
	adrp	x9, _MSG_DEBUG@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MSG_DEBUG@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x9]
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_16
LBB0_15:
Lloh18:
	adrp	x9, _MSG_DEBUG@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MSG_DEBUG@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x9]
	ldr	x9, [sp, #40]
	stp	x8, x9, [sp]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
LBB0_16:
	bl	_wpa_printf
LBB0_17:
	mov	x0, x19
	bl	_x509_certificate_free
	mov	x19, #0
LBB0_18:
	mov	x0, x19
	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
	add	sp, sp, #128
	ret
LBB0_19:
Lloh23:
	adrp	x9, _MSG_DEBUG@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MSG_DEBUG@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x9]
	ldr	x9, [sp, #40]
	stp	x8, x9, [sp]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_20:
	ldr	x0, [x19, #16]
	bl	_os_free
	ldr	x8, [sp, #24]
	add	x0, x8, #8
	ldr	w8, [sp, #48]
	sub	w1, w8, #1
	bl	_os_memdup
	str	x0, [x19, #16]
	cbz	x0, LBB0_22
; %bb.21:
	mov	x2, x0
	ldr	w8, [sp, #48]
	sub	w3, w8, #1
	str	w3, [x19, #12]
Lloh28:
	adrp	x8, _MSG_MSGDUMP@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MSG_MSGDUMP@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_wpa_hexdump
	b	LBB0_18
LBB0_22:
Lloh33:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	adrp	x1, l_.str.4@PAGE
Lloh37:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_ASN1_CLASS_UNIVERSAL,8,3       ; @ASN1_CLASS_UNIVERSAL
	.comm	_ASN1_TAG_SEQUENCE,8,3          ; @ASN1_TAG_SEQUENCE
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"X509: Certificate did not start with a valid SEQUENCE - found class %d tag 0x%x"

	.comm	_MSG_MSGDUMP,4,2                ; @MSG_MSGDUMP
l_.str.1:                               ; @.str.1
	.asciz	"X509: Ignoring extra data after DER encoded certificate"

	.comm	_ASN1_TAG_BITSTRING,8,3         ; @ASN1_TAG_BITSTRING
l_.str.2:                               ; @.str.2
	.asciz	"X509: Expected BITSTRING (signatureValue) - found class %d tag 0x%x"

l_.str.3:                               ; @.str.3
	.asciz	"X509: BITSTRING - %d unused bits"

l_.str.4:                               ; @.str.4
	.asciz	"X509: Failed to allocate memory for signatureValue"

l_.str.5:                               ; @.str.5
	.asciz	"X509: signature"

.subsections_via_symbols
