	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_X509_to_X509_REQ               ## -- Begin function X509_to_X509_REQ
	.p2align	4, 0x90
_X509_to_X509_REQ:                      ## @X509_to_X509_REQ
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	_X509_REQ_new
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %rax
	movl	$1, (%rax)
	movl	$1, %edi
	callq	_OPENSSL_malloc
	movq	(%rbx), %rcx
	movq	%rax, 8(%rcx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	$0, (%rax)
	movq	%r12, %rdi
	callq	_X509_get_subject_name
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_X509_REQ_set_subject_name
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:
	movq	%r12, %rdi
	callq	_X509_get0_pubkey
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_X509_REQ_set_pubkey
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	testq	%r15, %r15
	je	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_X509_REQ_sign
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_8
LBB0_1:
	movq	_X509_F_X509_TO_X509_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_X509err
LBB0_8:
	movq	%rbx, %rdi
	callq	_X509_REQ_free
	xorl	%ebx, %ebx
LBB0_9:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_X509_F_X509_TO_X509_REQ,4,2    ## @X509_F_X509_TO_X509_REQ
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_X509_to_X509_REQ               ; -- Begin function X509_to_X509_REQ
	.p2align	2
_X509_to_X509_REQ:                      ; @X509_to_X509_REQ
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_X509_REQ_new
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
	ldr	x8, [x19]
	mov	w9, #1
	str	w9, [x8]
	mov	w0, #1
	bl	_OPENSSL_malloc
	ldr	x8, [x19]
	str	x0, [x8, #8]
	cbz	x0, LBB0_8
; %bb.2:
	str	xzr, [x0]
	mov	x0, x22
	bl	_X509_get_subject_name
	mov	x1, x0
	mov	x0, x19
	bl	_X509_REQ_set_subject_name
	cbz	w0, LBB0_8
; %bb.3:
	mov	x0, x22
	bl	_X509_get0_pubkey
	cbz	x0, LBB0_8
; %bb.4:
	mov	x1, x0
	mov	x0, x19
	bl	_X509_REQ_set_pubkey
	cbz	w0, LBB0_8
; %bb.5:
	cbz	x21, LBB0_9
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_X509_REQ_sign
	cbnz	w0, LBB0_9
	b	LBB0_8
LBB0_7:
Lloh0:
	adrp	x8, _X509_F_X509_TO_X509_REQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _X509_F_X509_TO_X509_REQ@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_X509err
LBB0_8:
	mov	x0, x19
	bl	_X509_REQ_free
	mov	x19, #0
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_X509_F_X509_TO_X509_REQ,4,2    ; @X509_F_X509_TO_X509_REQ
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
.subsections_via_symbols
