	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dane_i2d
_dane_i2d:                              ## @dane_i2d
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	movq	$0, -16(%rbp)
	cmpl	$128, %esi
	je	LBB0_5
## %bb.1:
	cmpl	$129, %esi
	jne	LBB0_3
## %bb.2:
	leaq	-16(%rbp), %rsi
	callq	_i2d_X509
	testl	%eax, %eax
	jns	LBB0_7
	jmp	LBB0_8
LBB0_5:
	callq	_X509_get_X509_PUBKEY
	leaq	-16(%rbp), %rsi
	movl	%eax, %edi
	callq	_i2d_X509_PUBKEY
	testl	%eax, %eax
	js	LBB0_8
LBB0_7:
	movq	-16(%rbp), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.9:
	movl	%eax, (%rbx)
	jmp	LBB0_10
LBB0_3:
	movq	_X509_F_DANE_I2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_X509_R_BAD_SELECTOR@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_8:
	movq	_X509_F_DANE_I2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	callq	_X509err
	xorl	%ecx, %ecx
LBB0_10:
	movq	%rcx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_X509_F_DANE_I2D,4,2            ## @X509_F_DANE_I2D
	.comm	_X509_R_BAD_SELECTOR,4,2        ## @X509_R_BAD_SELECTOR
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.no_dead_strip	_dane_i2d
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dane_i2d
_dane_i2d:                              ; @dane_i2d
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	str	xzr, [sp, #8]
	cmp	w1, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w1, #129
	b.ne	LBB0_6
; %bb.2:
	add	x1, sp, #8
	bl	_i2d_X509
	tbz	w0, #31, LBB0_4
	b	LBB0_7
LBB0_3:
	bl	_X509_get_X509_PUBKEY
	add	x1, sp, #8
	bl	_i2d_X509_PUBKEY
	tbnz	w0, #31, LBB0_7
LBB0_4:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_7
; %bb.5:
	str	w0, [x19]
	b	LBB0_9
LBB0_6:
Lloh0:
	adrp	x8, _X509_F_DANE_I2D@GOTPAGE
Lloh1:
	ldr	x8, [x8, _X509_F_DANE_I2D@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _X509_R_BAD_SELECTOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _X509_R_BAD_SELECTOR@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _X509_F_DANE_I2D@GOTPAGE
Lloh6:
	ldr	x8, [x8, _X509_F_DANE_I2D@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
LBB0_8:
	ldr	w1, [x8]
	bl	_X509err
	mov	x8, #0
LBB0_9:
	mov	x0, x8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_X509_F_DANE_I2D,4,2            ; @X509_F_DANE_I2D
	.comm	_X509_R_BAD_SELECTOR,4,2        ; @X509_R_BAD_SELECTOR
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.no_dead_strip	_dane_i2d
.subsections_via_symbols
