	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hdb_replace_extension          ## -- Begin function hdb_replace_extension
	.p2align	4, 0x90
_hdb_replace_extension:                 ## @hdb_replace_extension
	.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	%rdx, %r15
	movq	%rsi, %r13
	movl	%edi, %r14d
	cmpq	$0, (%rsi)
	je	LBB0_4
## %bb.1:
	movq	(%r15), %rsi
	movq	_choice_HDB_extension_data_asn1_ellipsis@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_5
## %bb.2:
	movl	8(%r15), %esi
	movl	12(%r15), %edi
	leaq	-60(%rbp), %rdx
	leaq	-52(%rbp), %rcx
	leaq	-88(%rbp), %r8
	leaq	-80(%rbp), %r9
	callq	_der_get_tag
	testl	%eax, %eax
	je	LBB0_16
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_13
LBB0_4:
	movl	$1, %edi
	movl	$16, %esi
	callq	_calloc
	movq	%rax, (%r13)
	testq	%rax, %rax
	jne	LBB0_10
	jmp	LBB0_15
LBB0_5:
	movq	%r13, %rdi
	callq	_hdb_find_extension
	movq	%rax, %rbx
LBB0_6:
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	callq	_free_HDB_extension
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_copy_HDB_extension
	testl	%eax, %eax
	je	LBB0_25
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_13
LBB0_9:
	movq	(%r13), %rax
LBB0_10:
	movq	8(%rax), %rdi
	movl	(%rax), %esi
	shll	$4, %esi
	addl	$16, %esi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	movq	(%r13), %rcx
	movq	%rax, 8(%rcx)
	movq	(%rcx), %rsi
	shlq	$4, %rsi
	addq	%rax, %rsi
	movq	%r15, %rdi
	callq	_copy_HDB_extension
	testl	%eax, %eax
	je	LBB0_24
## %bb.12:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rdx
LBB0_13:
	movl	%r14d, %edi
LBB0_14:
	movl	%ebx, %esi
	callq	_krb5_set_error_message
	jmp	LBB0_26
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdx
	movl	%r14d, %edi
	callq	_krb5_set_error_message
	movl	(%rbx), %ebx
	jmp	LBB0_26
LBB0_16:
	movq	(%r13), %rax
	cmpq	$0, (%rax)
	je	LBB0_27
## %bb.17:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	movq	_choice_HDB_extension_data_asn1_ellipsis@GOTPCREL(%rip), %rdx
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_19 Depth=1
	incq	%r12
	addq	$16, %r14
	cmpq	(%rax), %r12
	jae	LBB0_28
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %r15
	movq	(%r15,%r14), %rcx
	cmpq	(%rdx), %rcx
	jne	LBB0_18
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	8(%r15,%r14), %esi
	movl	12(%r15,%r14), %edi
	leaq	-56(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	leaq	-84(%rbp), %r8
	leaq	-80(%rbp), %r9
	callq	_der_get_tag
	testl	%eax, %eax
	jne	LBB0_29
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	-60(%rbp), %edi
	movl	-52(%rbp), %edx
	movl	%edx, %esi
	callq	_MAKE_TAG
	movq	%rax, %rbx
	movl	-56(%rbp), %edi
	movl	-48(%rbp), %edx
	movl	%edx, %esi
	callq	_MAKE_TAG
	cmpq	%rax, %rbx
	je	LBB0_30
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	(%r13), %rax
	movq	_choice_HDB_extension_data_asn1_ellipsis@GOTPCREL(%rip), %rdx
	jmp	LBB0_18
LBB0_24:
	movq	(%r13), %rax
	incq	(%rax)
LBB0_25:
	xorl	%ebx, %ebx
LBB0_26:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_28:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_29:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	jmp	LBB0_14
LBB0_30:
	addq	%r14, %r15
	movq	%r15, %rbx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc: out of memory"

	.comm	_choice_HDB_extension_data_asn1_ellipsis,8,3 ## @choice_HDB_extension_data_asn1_ellipsis
L_.str.1:                               ## @.str.1
	.asciz	"hdb: failed to decode replacement hdb extention"

L_.str.2:                               ## @.str.2
	.asciz	"hdb: failed to decode present hdb extention"

L_.str.3:                               ## @.str.3
	.asciz	"hdb: failed to copy replacement hdb extention"

L_.str.4:                               ## @.str.4
	.asciz	"hdb: failed to copy new extension"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hdb_replace_extension          ; -- Begin function hdb_replace_extension
	.p2align	2
_hdb_replace_extension:                 ; @hdb_replace_extension
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x1, [x21]
Lloh0:
	adrp	x23, _choice_HDB_extension_data_asn1_ellipsis@GOTPAGE
Lloh1:
	ldr	x23, [x23, _choice_HDB_extension_data_asn1_ellipsis@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x1, x8
	b.ne	LBB0_5
; %bb.2:
	ldp	w1, w0, [x21, #8]
	add	x2, sp, #28
	add	x3, sp, #20
	add	x4, sp, #12
	mov	x5, sp
	bl	_der_get_tag
	cbz	w0, LBB0_6
; %bb.3:
	mov	x22, x0
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_22
LBB0_4:
	mov	w0, #1
	mov	w1, #16
	bl	_calloc
	str	x0, [x20]
	cbnz	x0, LBB0_19
	b	LBB0_23
LBB0_5:
	mov	x0, x20
	bl	_hdb_find_extension
	mov	x22, x0
	cbnz	x22, LBB0_14
	b	LBB0_18
LBB0_6:
	ldr	x8, [x20]
	ldr	x9, [x8]
	cbz	x9, LBB0_13
; %bb.7:
	mov	x24, #0
	mov	x25, #0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x25, x25, #1
	ldr	x9, [x8]
	add	x24, x24, #16
	cmp	x25, x9
	b.hs	LBB0_13
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x8, #8]
	ldr	x9, [x26, x24]
	ldr	x10, [x23]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x8, x26, x24
	ldp	w1, w0, [x8, #8]
	add	x2, sp, #24
	add	x3, sp, #16
	add	x4, sp, #8
	mov	x5, sp
	bl	_der_get_tag
	cbnz	w0, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [sp, #28]
	ldr	w1, [sp, #20]
	mov	x2, x1
	bl	_MAKE_TAG
	mov	x22, x0
	ldr	w0, [sp, #24]
	ldr	w1, [sp, #16]
	mov	x2, x1
	bl	_MAKE_TAG
	cmp	x22, x0
	b.eq	LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x20]
	b	LBB0_8
LBB0_13:
	mov	x22, #0
	cbz	x22, LBB0_18
LBB0_14:
	mov	x0, x22
	bl	_free_HDB_extension
	mov	x0, x21
	mov	x1, x22
	bl	_copy_HDB_extension
	mov	x22, x0
	cbz	w0, LBB0_25
; %bb.15:
Lloh4:
	adrp	x2, l_.str.3@PAGE
Lloh5:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_22
LBB0_16:
	mov	x22, x0
Lloh6:
	adrp	x2, l_.str.2@PAGE
Lloh7:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_22
LBB0_17:
	add	x22, x26, x24
	cbnz	x22, LBB0_14
LBB0_18:
	ldr	x0, [x20]
LBB0_19:
	ldr	x8, [x0, #8]
	ldr	w9, [x0]
	lsl	w9, w9, #4
	add	w1, w9, #16
	mov	x0, x8
	bl	_realloc
	cbz	x0, LBB0_23
; %bb.20:
	ldr	x8, [x20]
	str	x0, [x8, #8]
	ldr	x8, [x8]
	add	x1, x0, x8, lsl #4
	mov	x0, x21
	bl	_copy_HDB_extension
	mov	x22, x0
	cbz	w0, LBB0_24
; %bb.21:
Lloh8:
	adrp	x2, l_.str.4@PAGE
Lloh9:
	add	x2, x2, l_.str.4@PAGEOFF
LBB0_22:
	mov	x0, x19
	mov	x1, x22
	bl	_krb5_set_error_message
	b	LBB0_25
LBB0_23:
Lloh10:
	adrp	x20, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x20, [x20, _ENOMEM@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_krb5_set_error_message
	ldr	w22, [x20]
	b	LBB0_25
LBB0_24:
	ldr	x8, [x20]
	ldr	x9, [x8]
	add	x9, x9, #1
	str	x9, [x8]
LBB0_25:
	mov	x0, x22
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc: out of memory"

	.comm	_choice_HDB_extension_data_asn1_ellipsis,8,3 ; @choice_HDB_extension_data_asn1_ellipsis
l_.str.1:                               ; @.str.1
	.asciz	"hdb: failed to decode replacement hdb extention"

l_.str.2:                               ; @.str.2
	.asciz	"hdb: failed to decode present hdb extention"

l_.str.3:                               ; @.str.3
	.asciz	"hdb: failed to copy replacement hdb extention"

l_.str.4:                               ; @.str.4
	.asciz	"hdb: failed to copy new extension"

.subsections_via_symbols
