	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c2i_ASN1_BIT_STRING            ## -- Begin function c2i_ASN1_BIT_STRING
	.p2align	4, 0x90
_c2i_ASN1_BIT_STRING:                   ## @c2i_ASN1_BIT_STRING
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	testq	%rdx, %rdx
	jle	LBB0_1
## %bb.7:
	movq	%rdx, %r12
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	jge	LBB0_9
## %bb.8:
	movq	_ASN1_R_STRING_TOO_LONG@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ASN1_R_STRING_TOO_SHORT@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
LBB0_3:
	movl	(%rax), %esi
	movq	_ASN1_F_C2I_ASN1_BIT_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ASN1err
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	cmpq	%rbx, (%r14)
	je	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	callq	_ASN1_BIT_STRING_free
LBB0_6:
	xorl	%ebx, %ebx
LBB0_22:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%rsi, %r15
	testq	%r14, %r14
	je	LBB0_11
## %bb.10:
	movq	(%r14), %rbx
	testq	%rbx, %rbx
	jne	LBB0_12
LBB0_11:
	xorl	%eax, %eax
	callq	_ASN1_BIT_STRING_new
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_6
LBB0_12:
	movq	(%r15), %rsi
	movzbl	(%rsi), %r13d
	cmpl	$7, %r13d
	jbe	LBB0_14
## %bb.13:
	movq	_ASN1_R_INVALID_BIT_STRING_BITS_LEFT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_14:
	movq	_ASN1_STRING_FLAG_BITS_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	notl	%ecx
	andl	(%rbx), %ecx
	leaq	1(%rsi), %rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	andl	$-8, %ecx
	movl	%ecx, (%rbx)
	movl	(%rax), %eax
	orl	%r13d, %eax
	orl	%ecx, %eax
	movl	%eax, (%rbx)
	cmpq	$2, %r12
	jb	LBB0_15
## %bb.16:
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	leal	-1(%r12), %edi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_OPENSSL_malloc
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	movq	%rax, %rcx
	movq	%rax, %rdi
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	$255, %eax
	movl	%r13d, %ecx
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	shll	%cl, %eax
	andb	%al, -2(%r12,%r13)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	%r12, %rax
	movq	%rax, %r12
	jmp	LBB0_19
LBB0_15:
	xorl	%edx, %edx
	xorl	%r13d, %r13d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_19:
	movl	%edx, 4(%rbx)
	movq	8(%rbx), %rdi
	callq	_OPENSSL_free
	movq	%r13, 8(%rbx)
	movq	_V_ASN1_BIT_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	testq	%r14, %r14
	je	LBB0_21
## %bb.20:
	movq	%rbx, (%r14)
LBB0_21:
	movq	%r12, (%r15)
	jmp	LBB0_22
LBB0_17:
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_ASN1_R_STRING_TOO_SHORT,4,2    ## @ASN1_R_STRING_TOO_SHORT
	.comm	_INT_MAX,8,3                    ## @INT_MAX
	.comm	_ASN1_R_STRING_TOO_LONG,4,2     ## @ASN1_R_STRING_TOO_LONG
	.comm	_ASN1_R_INVALID_BIT_STRING_BITS_LEFT,4,2 ## @ASN1_R_INVALID_BIT_STRING_BITS_LEFT
	.comm	_ASN1_STRING_FLAG_BITS_LEFT,4,2 ## @ASN1_STRING_FLAG_BITS_LEFT
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_V_ASN1_BIT_STRING,4,2          ## @V_ASN1_BIT_STRING
	.comm	_ASN1_F_C2I_ASN1_BIT_STRING,4,2 ## @ASN1_F_C2I_ASN1_BIT_STRING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c2i_ASN1_BIT_STRING            ; -- Begin function c2i_ASN1_BIT_STRING
	.p2align	2
_c2i_ASN1_BIT_STRING:                   ; @c2i_ASN1_BIT_STRING
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	cmp	x2, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x22, x2
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x2
	b.ge	LBB0_4
; %bb.2:
	mov	x20, #0
Lloh3:
	adrp	x8, _ASN1_R_STRING_TOO_LONG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ASN1_R_STRING_TOO_LONG@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
	mov	x20, #0
Lloh5:
	adrp	x8, _ASN1_R_STRING_TOO_SHORT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ASN1_R_STRING_TOO_SHORT@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
	mov	x21, x1
	cbz	x19, LBB0_6
; %bb.5:
	ldr	x20, [x19]
	cbnz	x20, LBB0_7
LBB0_6:
	bl	_ASN1_BIT_STRING_new
	mov	x20, x0
	cbz	x0, LBB0_13
LBB0_7:
	ldr	x26, [x21]
	mov	x23, x26
	ldrb	w27, [x23], #1
	cmp	w27, #7
	b.ls	LBB0_14
; %bb.8:
Lloh7:
	adrp	x8, _ASN1_R_INVALID_BIT_STRING_BITS_LEFT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ASN1_R_INVALID_BIT_STRING_BITS_LEFT@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _ASN1_F_C2I_ASN1_BIT_STRING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ASN1_F_C2I_ASN1_BIT_STRING@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_ASN1err
	cbz	x19, LBB0_11
; %bb.10:
	ldr	x8, [x19]
	cmp	x8, x20
	b.eq	LBB0_12
LBB0_11:
	mov	x0, x20
	bl	_ASN1_BIT_STRING_free
LBB0_12:
	mov	x20, #0
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh12:
	adrp	x8, _ASN1_STRING_FLAG_BITS_LEFT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ASN1_STRING_FLAG_BITS_LEFT@GOTPAGEOFF]
	ldr	w9, [x8]
	ldr	w10, [x20]
	bic	w9, w10, w9
	and	w9, w9, #0xfffffff8
	str	w9, [x20]
	ldr	w8, [x8]
	orr	w8, w8, w27
	orr	w8, w8, w9
	str	w8, [x20]
	cmp	x22, #2
	b.lo	LBB0_17
; %bb.15:
	sub	w24, w22, #1
	mov	x0, x24
	bl	_OPENSSL_malloc
	cbz	x0, LBB0_21
; %bb.16:
	mov	x25, x0
	mov	x1, x23
	mov	x2, x24
	bl	_memcpy
	mov	w8, #255
	lsl	w8, w8, w27
	add	x9, x22, x25
	ldurb	w10, [x9, #-2]
	and	w8, w10, w8
	sturb	w8, [x9, #-2]
	add	x23, x26, x22
	b	LBB0_18
LBB0_17:
	mov	w24, #0
	mov	x25, #0
LBB0_18:
	str	w24, [x20, #4]
	ldr	x0, [x20, #8]
	bl	_OPENSSL_free
	str	x25, [x20, #8]
Lloh14:
	adrp	x8, _V_ASN1_BIT_STRING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _V_ASN1_BIT_STRING@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x20, #16]
	cbz	x19, LBB0_20
; %bb.19:
	str	x20, [x19]
LBB0_20:
	str	x23, [x21]
	b	LBB0_13
LBB0_21:
Lloh17:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ASN1_R_STRING_TOO_SHORT,4,2    ; @ASN1_R_STRING_TOO_SHORT
	.comm	_INT_MAX,8,3                    ; @INT_MAX
	.comm	_ASN1_R_STRING_TOO_LONG,4,2     ; @ASN1_R_STRING_TOO_LONG
	.comm	_ASN1_R_INVALID_BIT_STRING_BITS_LEFT,4,2 ; @ASN1_R_INVALID_BIT_STRING_BITS_LEFT
	.comm	_ASN1_STRING_FLAG_BITS_LEFT,4,2 ; @ASN1_STRING_FLAG_BITS_LEFT
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_V_ASN1_BIT_STRING,4,2          ; @V_ASN1_BIT_STRING
	.comm	_ASN1_F_C2I_ASN1_BIT_STRING,4,2 ; @ASN1_F_C2I_ASN1_BIT_STRING
.subsections_via_symbols
