	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sldns_str2wire_cert_alg_buf    ## -- Begin function sldns_str2wire_cert_alg_buf
	.p2align	4, 0x90
_sldns_str2wire_cert_alg_buf:           ## @sldns_str2wire_cert_alg_buf
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_sldns_cert_algorithms@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_sldns_lookup_by_name
	cmpq	$1, (%r15)
	ja	LBB0_2
## %bb.1:
	movq	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sldns_write_uint16
LBB0_4:
	movq	$2, (%r15)
	movq	_LDNS_WIREPARSE_ERR_OK@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_sldns_str2wire_int16_buf
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	%r14, %rdi
	callq	_sldns_read_uint16
	testq	%rax, %rax
	jne	LBB0_4
## %bb.7:
	movq	_LDNS_WIREPARSE_ERR_CERT_BAD_ALGORITHM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_sldns_cert_algorithms,4,2      ## @sldns_cert_algorithms
	.comm	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL,4,2 ## @LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL
	.comm	_LDNS_WIREPARSE_ERR_CERT_BAD_ALGORITHM,4,2 ## @LDNS_WIREPARSE_ERR_CERT_BAD_ALGORITHM
	.comm	_LDNS_WIREPARSE_ERR_OK,4,2      ## @LDNS_WIREPARSE_ERR_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sldns_str2wire_cert_alg_buf    ; -- Begin function sldns_str2wire_cert_alg_buf
	.p2align	2
_sldns_str2wire_cert_alg_buf:           ; @sldns_str2wire_cert_alg_buf
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _sldns_cert_algorithms@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sldns_cert_algorithms@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_sldns_lookup_by_name
	ldr	x8, [x19]
	cmp	x8, #1
	b.hi	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	cbz	x0, LBB0_7
; %bb.3:
	ldr	w1, [x0]
	mov	x0, x20
	bl	_sldns_write_uint16
LBB0_4:
	mov	w8, #2
	str	x8, [x19]
Lloh5:
	adrp	x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
LBB0_6:
	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
LBB0_7:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_sldns_str2wire_int16_buf
	cbnz	w0, LBB0_6
; %bb.8:
	mov	x0, x20
	bl	_sldns_read_uint16
	cbnz	x0, LBB0_4
; %bb.9:
Lloh7:
	adrp	x8, _LDNS_WIREPARSE_ERR_CERT_BAD_ALGORITHM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_CERT_BAD_ALGORITHM@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_sldns_cert_algorithms,4,2      ; @sldns_cert_algorithms
	.comm	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL,4,2 ; @LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL
	.comm	_LDNS_WIREPARSE_ERR_CERT_BAD_ALGORITHM,4,2 ; @LDNS_WIREPARSE_ERR_CERT_BAD_ALGORITHM
	.comm	_LDNS_WIREPARSE_ERR_OK,4,2      ; @LDNS_WIREPARSE_ERR_OK
.subsections_via_symbols
