	.file	"195231.c"
	.intel_syntax noprefix
	.text
	.globl	shift
	.bss
	.align 4
	.type	shift, @object
	.size	shift, 4
shift:
	.zero	4
	.globl	password_hash
	.align 4
	.type	password_hash, @object
	.size	password_hash, 4
password_hash:
	.zero	4
	.text
	.type	hash, @function
hash:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], 5381
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -8[rbp]
	sal	eax, 5
	mov	edx, eax
	mov	eax, DWORD PTR -8[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -8[rbp], eax
.L2:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jne	.L3
	mov	eax, DWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	hash, .-hash
	.globl	check
	.type	check, @function
check:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 8
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	hash
	mov	edx, DWORD PTR password_hash[rip]
	cmp	eax, edx
	sete	al
	movzx	eax, al
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	check, .-check
	.globl	decrypt
	.type	decrypt, @function
decrypt:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	hash
	mov	DWORD PTR -4[rbp], eax
	jmp	.L8
.L9:
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, BYTE PTR [rax]
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	xor	eax, edx
	mov	edx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR shift[rip]
	mov	ecx, eax
	rol	DWORD PTR -4[rbp], cl
	add	QWORD PTR -32[rbp], 1
.L8:
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L9
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	decrypt, .-decrypt
	.section	.rodata
.LC0:
	.string	"usage: decrypt password"
.LC1:
	.string	"wrong password"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	esi, 1103203214
	mov	edi, 8
	call	setup@PLT
	cmp	DWORD PTR -4[rbp], 1
	jg	.L11
	lea	rdi, .LC0[rip]
	call	puts@PLT
	jmp	.L12
.L11:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	check
	test	eax, eax
	jne	.L13
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L12
.L13:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, message.0[rip]
	mov	rdi, rax
	call	decrypt
	lea	rdi, message.0[rip]
	call	puts@PLT
.L12:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.data
	.align 16
	.type	message.0, @object
	.size	message.0, 23
message.0:
	.ascii	"\331$\255\347\242a\240\371\353/\346\377\2568\256\376\2562\254"
	.ascii	"\352\3745\340"
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"195231.c"
	.text
	.comm	shift,4,4
	.comm	password_hash,4,4
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hash, %function
hash:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	ldr	r3, .L5
	str	r3, [fp, #-12]
	b	.L2
.L3:
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #5
	ldr	r3, [fp, #-12]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-12]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L6:
	.align	2
.L5:
	.word	5381
	.size	hash, .-hash
	.align	2
	.global	check
	.syntax unified
	.arm
	.fpu softvfp
	.type	check, %function
check:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	hash
	mov	r2, r0
	ldr	r3, .L9
	ldr	r3, [r3]
	cmp	r2, r3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	password_hash
	.size	check, .-check
	.align	2
	.global	decrypt
	.syntax unified
	.arm
	.fpu softvfp
	.type	decrypt, %function
decrypt:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	hash
	str	r0, [fp, #-8]
	b	.L12
.L13:
	ldr	r3, [fp, #-20]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	and	r3, r3, #255
	eor	r3, r3, r2
	and	r2, r3, #255
	ldr	r3, [fp, #-20]
	strb	r2, [r3]
	ldr	r3, .L14
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	rsb	r3, r3, #32
	ror	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L12:
	ldr	r3, [fp, #-20]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L13
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	shift
	.size	decrypt, .-decrypt
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: decrypt password\000"
	.align	2
.LC1:
	.ascii	"wrong password\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r1, .L21
	mov	r0, #8
	bl	setup
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bgt	.L17
	ldr	r0, .L21+4
	bl	puts
	b	.L18
.L17:
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	check
	mov	r3, r0
	cmp	r3, #0
	bne	.L19
	ldr	r0, .L21+8
	bl	puts
	b	.L18
.L19:
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L21+12
	mov	r0, r3
	bl	decrypt
	ldr	r0, .L21+12
	bl	puts
.L18:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	1103203214
	.word	.LC0
	.word	.LC1
	.word	message.4626
	.size	main, .-main
	.data
	.align	2
	.type	message.4626, %object
	.size	message.4626, 23
message.4626:
	.ascii	"\331$\255\347\242a\240\371\353/\346\377\2568\256\376"
	.ascii	"\2562\254\352\3745\340"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
