	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3_sign
_s3_sign:                               ## @s3_sign
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_strlen
	leaq	-44(%rbp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_sha1_init_hmac
	movq	%r14, %rdi
	callq	_strlen
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_sha1_write
	movq	%r12, %rdi
	callq	_sha1_final_hmac
	movl	$8, %edx
	xorl	%esi, %esi
	leaq	L_.str(%rip), %r8
	xorl	%r9d, %r9d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movslq	%r9d, %rcx
	movl	(%rax,%rcx,4), %edi
	addl	$-6, %edx
	movl	%edx, %ecx
	sarl	%cl, %edi
	andl	$63, %edi
	movl	%r9d, %r10d
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movzbl	(%rdi,%r8), %ecx
	movb	%cl, (%r13,%rsi)
	incq	%rsi
	cmpl	$20, %r10d
	jge	LBB0_7
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$6, %edx
	jg	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%r9), %r10d
	xorl	%edi, %edi
	cmpl	$18, %r9d
	jg	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movslq	%r10d, %rcx
	movl	(%rax,%rcx,4), %edi
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movslq	%r9d, %rcx
	movl	(%rax,%rcx,4), %ebx
	movb	$6, %cl
	subb	%dl, %cl
	shll	%cl, %ebx
	addl	$2, %edx
	movl	%edx, %ecx
	sarl	%cl, %edi
	andl	$63, %ebx
	orl	%ebx, %edi
	movslq	%edi, %rdi
	movl	%r10d, %r9d
	jmp	LBB0_6
LBB0_7:
	movl	%esi, %eax
	incl	%esi
	movb	$61, (%r13,%rax)
	movb	$0, (%r13,%rsi)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

	.no_dead_strip	_s3_sign
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3_sign
_s3_sign:                               ; @s3_sign
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	bl	_strlen
	mov	x2, x0
	add	x0, sp, #12
	mov	x1, x21
	bl	_sha1_init_hmac
	mov	x0, x20
	bl	_strlen
	mov	x2, x0
	add	x0, sp, #12
	mov	x1, x20
	bl	_sha1_write
	add	x0, sp, #12
	bl	_sha1_final_hmac
	mov	x8, #0
	mov	w12, #0
	mov	w10, #8
	mov	w9, #6
Lloh0:
	adrp	x11, l_.str@PAGE
Lloh1:
	add	x11, x11, l_.str@PAGEOFF
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [x0, w12, sxtw #2]
	asr	w10, w10, w13
	and	w14, w10, #0x3f
	mov	x10, x13
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldrb	w13, [x11, x14]
	strb	w13, [x19, x8]
	add	x8, x8, #1
	cmp	w12, #20
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	subs	w13, w10, #6
	b.gt	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x14, w12
	add	x13, x14, #1
	cmp	w12, #18
	b.gt	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w12, [x0, x13, lsl #2]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w12, #0
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w14, [x0, x14, lsl #2]
	sub	w15, w9, w10
	lsl	w14, w14, w15
	and	w14, w14, #0x3f
	add	w10, w10, #2
	asr	w12, w12, w10
	orr	w12, w14, w12
	sxtw	x14, w12
	mov	x12, x13
	b	LBB0_2
LBB0_8:
	add	w9, w8, #1
	mov	w10, #61
	strb	w10, [x19, w8, uxtw]
	strb	wzr, [x19, w9, uxtw]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

	.no_dead_strip	_s3_sign
.subsections_via_symbols
