	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_octetstring
_parse_octetstring:                     ## @parse_octetstring
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_strlen
	movq	%rax, %rbx
	movq	_MAX_OCTSTRING_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	cmpq	%rsi, %rbx
	jae	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_malloc
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rbx, 8(%r14)
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	movq	_SNMP_SYNTAX_OCTETSTRING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	decq	%rsi
	leaq	L_.str(%rip), %rdi
	callq	_warnx
	jmp	LBB0_5
LBB0_4:
	movq	$0, 8(%r14)
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_syslog
LBB0_5:
	movl	$-1, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_OCTSTRING_LEN,8,3          ## @MAX_OCTSTRING_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Octetstring too long - %d is max allowed"

	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
L_.str.1:                               ## @.str.1
	.asciz	"malloc failed: %s"

	.comm	_errno,4,2                      ## @errno
	.comm	_SNMP_SYNTAX_OCTETSTRING,4,2    ## @SNMP_SYNTAX_OCTETSTRING
	.no_dead_strip	_parse_octetstring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_octetstring
_parse_octetstring:                     ; @parse_octetstring
	.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, x1
	mov	x19, x0
	mov	x0, x1
	bl	_strlen
Lloh0:
	adrp	x8, _MAX_OCTSTRING_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_OCTSTRING_LEN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.hs	LBB0_3
; %bb.1:
	mov	x21, x0
	bl	_malloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_4
; %bb.2:
	str	x21, [x19, #8]
	mov	x1, x20
	mov	x2, x21
	bl	_memcpy
	mov	w0, #0
Lloh3:
	adrp	x8, _SNMP_SYNTAX_OCTETSTRING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SNMP_SYNTAX_OCTETSTRING@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_6
LBB0_3:
	sub	x1, x8, #1
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
	b	LBB0_5
LBB0_4:
	str	xzr, [x19, #8]
Lloh8:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh10:
	ldr	w19, [x8]
Lloh11:
	adrp	x8, _errno@GOTPAGE
Lloh12:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_syslog
LBB0_5:
	mov	w0, #-1
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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_OCTSTRING_LEN,8,3          ; @MAX_OCTSTRING_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Octetstring too long - %d is max allowed"

	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
l_.str.1:                               ; @.str.1
	.asciz	"malloc failed: %s"

	.comm	_errno,4,2                      ; @errno
	.comm	_SNMP_SYNTAX_OCTETSTRING,4,2    ; @SNMP_SYNTAX_OCTETSTRING
	.no_dead_strip	_parse_octetstring
.subsections_via_symbols
