	.file	"827663.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"problem-054.txt"
.LC2:
	.string	"ERROR: can't open %s\n"
.LC3:
	.string	"%s"
.LC4:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	esi, 8
	mov	edi, 5
	call	calloc@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	esi, 8
	mov	edi, 5
	call	calloc@PLT
	mov	QWORD PTR -56[rbp], rax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], 0
	jne	.L2
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L10
.L2:
	mov	DWORD PTR -80[rbp], 0
	mov	DWORD PTR -76[rbp], 0
	jmp	.L4
.L9:
	cmp	DWORD PTR -80[rbp], 4
	jg	.L5
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	lea	rbx, [rdx+rax]
	lea	rax, -34[rbp]
	mov	rdi, rax
	call	parse
	mov	QWORD PTR [rbx], rax
	jmp	.L6
.L5:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	sal	rax, 3
	lea	rdx, -40[rax]
	mov	rax, QWORD PTR -56[rbp]
	lea	rbx, [rdx+rax]
	lea	rax, -34[rbp]
	mov	rdi, rax
	call	parse
	mov	QWORD PTR [rbx], rax
.L6:
	add	DWORD PTR -80[rbp], 1
	cmp	DWORD PTR -80[rbp], 10
	jne	.L4
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	find_rank
	mov	DWORD PTR -72[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	find_rank
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	cmp	eax, DWORD PTR -68[rbp]
	jle	.L7
	add	DWORD PTR -76[rbp], 1
	jmp	.L8
.L7:
	mov	eax, DWORD PTR -72[rbp]
	cmp	eax, DWORD PTR -68[rbp]
	jne	.L8
	mov	edx, DWORD PTR -72[rbp]
	mov	rcx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	handle_tie
	cmp	eax, 1
	jne	.L8
	add	DWORD PTR -76[rbp], 1
.L8:
	mov	DWORD PTR -80[rbp], 0
.L4:
	lea	rdx, -34[rbp]
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, -1
	jne	.L9
	mov	eax, DWORD PTR -76[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L10:
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC5:
	.string	"ERROR: can't parse %s\n"
	.text
	.globl	parse
	.type	parse, @function
parse:
.LFB7:
	.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	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 2
	je	.L13
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	je	.L14
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	sub	eax, 48
	mov	BYTE PTR -8[rbp], al
	jmp	.L15
.L14:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 65
	cmp	eax, 19
	ja	.L15
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L17[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L17[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L17:
	.long	.L21-.L17
	.long	.L15-.L17
	.long	.L15-.L17
	.long	.L15-.L17
	.long	.L15-.L17
	.long	.L15-.L17
	.long	.L15-.L17
	.long	.L15-.L17
	.long	.L15-.L17
	.long	.L20-.L17
	.long	.L19-.L17
	.long	.L15-.L17
	.long	.L15-.L17
	.long	.L15-.L17
	.long	.L15-.L17
	.long	.L15-.L17
	.long	.L18-.L17
	.long	.L15-.L17
	.long	.L15-.L17
	.long	.L16-.L17
	.text
.L16:
	mov	BYTE PTR -8[rbp], 10
	jmp	.L15
.L20:
	mov	BYTE PTR -8[rbp], 11
	jmp	.L15
.L18:
	mov	BYTE PTR -8[rbp], 12
	jmp	.L15
.L19:
	mov	BYTE PTR -8[rbp], 13
	jmp	.L15
.L21:
	mov	BYTE PTR -8[rbp], 14
	nop
.L15:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	eax, 83
	je	.L22
	cmp	eax, 83
	jg	.L23
	cmp	eax, 72
	je	.L24
	cmp	eax, 72
	jg	.L23
	cmp	eax, 67
	je	.L25
	cmp	eax, 68
	jne	.L23
	mov	DWORD PTR -4[rbp], 0
	jmp	.L23
.L25:
	mov	DWORD PTR -4[rbp], 1
	jmp	.L23
.L24:
	mov	DWORD PTR -4[rbp], 2
	jmp	.L23
.L22:
	mov	DWORD PTR -4[rbp], 3
	nop
.L23:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	parse, .-parse
	.globl	is_straight
	.type	is_straight, @function
is_straight:
.LFB8:
	.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 -4[rbp], 0
	jmp	.L28
.L35:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L36
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L31
.L33:
	add	DWORD PTR -8[rbp], 1
.L31:
	cmp	DWORD PTR -8[rbp], 14
	jg	.L32
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 1
	je	.L33
.L32:
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -4[rbp]
	cmp	eax, 5
	jne	.L30
	mov	eax, 1
	jmp	.L34
.L36:
	nop
.L30:
	add	DWORD PTR -4[rbp], 1
.L28:
	cmp	DWORD PTR -4[rbp], 10
	jle	.L35
	mov	eax, 0
.L34:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	is_straight, .-is_straight
	.globl	is_flush
	.type	is_flush, @function
is_flush:
.LFB9:
	.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 -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 5
	je	.L38
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	cmp	eax, 5
	je	.L38
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	eax, DWORD PTR [rax]
	cmp	eax, 5
	je	.L38
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 12
	mov	eax, DWORD PTR [rax]
	cmp	eax, 5
	jne	.L39
.L38:
	mov	eax, 1
	jmp	.L40
.L39:
	mov	eax, 0
.L40:
	and	eax, 1
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	is_flush, .-is_flush
	.globl	is_three
	.type	is_three, @function
is_three:
.LFB10:
	.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 -4[rbp], 0
	jmp	.L43
.L46:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 3
	jne	.L44
	mov	eax, 1
	jmp	.L45
.L44:
	add	DWORD PTR -4[rbp], 1
.L43:
	cmp	DWORD PTR -4[rbp], 14
	jle	.L46
	mov	eax, 0
.L45:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	is_three, .-is_three
	.globl	is_pair
	.type	is_pair, @function
is_pair:
.LFB11:
	.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 -12[rbp], 0
	mov	DWORD PTR -8[rbp], 0
	jmp	.L48
.L50:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 2
	jne	.L49
	add	DWORD PTR -8[rbp], 1
.L49:
	add	DWORD PTR -12[rbp], 1
.L48:
	cmp	DWORD PTR -12[rbp], 14
	jle	.L50
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	is_pair, .-is_pair
	.globl	find_rank
	.type	find_rank, @function
find_rank:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	QWORD PTR -120[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	DWORD PTR -100[rbp], 0
	jmp	.L53
.L54:
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	movsx	rdx, eax
	mov	edx, DWORD PTR -80[rbp+rdx*4]
	add	edx, 1
	cdqe
	mov	DWORD PTR -80[rbp+rax*4], edx
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR 4[rax]
	mov	eax, edx
	mov	eax, DWORD PTR -96[rbp+rax*4]
	add	eax, 1
	mov	edx, edx
	mov	DWORD PTR -96[rbp+rdx*4], eax
	add	DWORD PTR -100[rbp], 1
.L53:
	cmp	DWORD PTR -100[rbp], 4
	jle	.L54
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, 1
	jne	.L55
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, 1
	jne	.L55
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, 1
	jne	.L55
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 1
	jne	.L55
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 1
	jne	.L55
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	is_flush
	test	al, al
	je	.L55
	mov	eax, 9
	jmp	.L66
.L55:
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	is_straight
	test	al, al
	je	.L57
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	is_flush
	test	al, al
	je	.L58
	mov	eax, 8
	jmp	.L66
.L58:
	mov	eax, 4
	jmp	.L66
.L57:
	mov	rax, QWORD PTR -120[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	cmp	eax, 4
	je	.L60
	mov	rax, QWORD PTR -120[rbp]
	add	rax, 8
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	cmp	eax, 4
	jne	.L61
.L60:
	mov	eax, 7
	jmp	.L66
.L61:
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	is_three
	test	al, al
	je	.L62
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	is_pair
	test	eax, eax
	je	.L63
	mov	eax, 6
	jmp	.L66
.L63:
	mov	eax, 3
	jmp	.L66
.L62:
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	is_flush
	test	al, al
	je	.L65
	mov	eax, 5
	jmp	.L66
.L65:
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	is_pair
.L66:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L67
	call	__stack_chk_fail@PLT
.L67:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	find_rank, .-find_rank
	.globl	handle_tie
	.type	handle_tie, @function
handle_tie:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 208
	mov	QWORD PTR -184[rbp], rdi
	mov	QWORD PTR -192[rbp], rsi
	mov	DWORD PTR -196[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -144[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	mov	QWORD PTR -128[rbp], 0
	mov	QWORD PTR -120[rbp], 0
	mov	QWORD PTR -112[rbp], 0
	mov	QWORD PTR -104[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	mov	DWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -164[rbp], 0
	jmp	.L69
.L70:
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -184[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	movsx	rdx, eax
	mov	edx, DWORD PTR -144[rbp+rdx*4]
	add	edx, 1
	cdqe
	mov	DWORD PTR -144[rbp+rax*4], edx
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -192[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	movsx	rdx, eax
	mov	edx, DWORD PTR -80[rbp+rdx*4]
	add	edx, 1
	cdqe
	mov	DWORD PTR -80[rbp+rax*4], edx
	add	DWORD PTR -164[rbp], 1
.L69:
	cmp	DWORD PTR -164[rbp], 4
	jle	.L70
	cmp	DWORD PTR -196[rbp], 1
	jne	.L71
	mov	DWORD PTR -152[rbp], 0
	jmp	.L72
.L75:
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	cmp	eax, 2
	jne	.L73
	mov	eax, DWORD PTR -152[rbp]
	mov	DWORD PTR -160[rbp], eax
.L73:
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	cmp	eax, 2
	jne	.L74
	mov	eax, DWORD PTR -152[rbp]
	mov	DWORD PTR -156[rbp], eax
.L74:
	add	DWORD PTR -152[rbp], 1
.L72:
	cmp	DWORD PTR -152[rbp], 14
	jle	.L75
	mov	eax, DWORD PTR -160[rbp]
	cmp	eax, DWORD PTR -156[rbp]
	je	.L71
	mov	eax, DWORD PTR -160[rbp]
	cmp	eax, DWORD PTR -156[rbp]
	jle	.L76
	mov	eax, 1
	jmp	.L83
.L76:
	mov	eax, 2
	jmp	.L83
.L71:
	mov	DWORD PTR -148[rbp], 14
	jmp	.L79
.L82:
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	cmp	eax, 1
	jne	.L80
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	test	eax, eax
	jne	.L80
	mov	eax, 1
	jmp	.L83
.L80:
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	cmp	eax, 1
	jne	.L81
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	test	eax, eax
	jne	.L81
	mov	eax, 2
	jmp	.L83
.L81:
	sub	DWORD PTR -148[rbp], 1
.L79:
	cmp	DWORD PTR -148[rbp], 0
	jns	.L82
	mov	eax, 0
.L83:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L84
	call	__stack_chk_fail@PLT
.L84:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	handle_tie, .-handle_tie
	.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	"827663.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"problem-054.txt\000"
	.align	2
.LC2:
	.ascii	"ERROR: can't open %s\012\000"
	.align	2
.LC3:
	.ascii	"%s\000"
	.align	2
.LC4:
	.ascii	"%d\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #60
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r1, #8
	mov	r0, #5
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-48]
	mov	r1, #8
	mov	r0, #5
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r1, .L12+4
	ldr	r0, .L12+8
	bl	fopen
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L2
	ldr	r1, .L12+8
	ldr	r0, .L12+12
	bl	printf
	mov	r3, #1
	b	.L10
.L2:
	mov	r3, #0
	str	r3, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L4
.L9:
	ldr	r3, [fp, #-56]
	cmp	r3, #4
	bgt	.L5
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-48]
	add	r4, r2, r3
	sub	r3, fp, #68
	sub	r2, fp, #28
	mov	r1, r2
	mov	r0, r3
	bl	parse
	mov	r2, r4
	sub	r3, fp, #68
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	b	.L6
.L5:
	ldr	r3, [fp, #-56]
	sub	r3, r3, #-536870907
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r4, r2, r3
	sub	r3, fp, #68
	sub	r2, fp, #28
	mov	r1, r2
	mov	r0, r3
	bl	parse
	mov	r2, r4
	sub	r3, fp, #68
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
.L6:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #10
	bne	.L4
	ldr	r0, [fp, #-48]
	bl	find_rank
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r0, [fp, #-44]
	bl	find_rank
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	ble	.L7
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
	b	.L8
.L7:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bne	.L8
	ldr	r3, [fp, #-36]
	mov	r2, r3
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-48]
	bl	handle_tie
	mov	r3, r0
	cmp	r3, #1
	bne	.L8
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L8:
	mov	r3, #0
	str	r3, [fp, #-56]
.L4:
	sub	r3, fp, #28
	mov	r2, r3
	ldr	r1, .L12+16
	ldr	r0, [fp, #-40]
	bl	__isoc99_fscanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L9
	ldr	r1, [fp, #-52]
	ldr	r0, .L12+20
	bl	printf
	mov	r3, #0
.L10:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.section	.rodata
	.align	2
.LC6:
	.ascii	"ERROR: can't parse %s\012\000"
	.text
	.align	2
	.global	parse
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse, %function
parse:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	beq	.L15
	ldr	r1, [fp, #-28]
	ldr	r0, .L31
	bl	printf
	mov	r0, #1
	bl	exit
.L15:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	and	r3, r3, #255
	lsl	r3, r3, #24
	asr	r3, r3, #24
	strb	r3, [fp, #-12]
	b	.L17
.L16:
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #65
	cmp	r3, #19
	ldrls	pc, [pc, r3, asl #2]
	b	.L17
.L19:
	.word	.L23
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L22
	.word	.L21
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L20
	.word	.L17
	.word	.L17
	.word	.L18
.L18:
	mov	r3, #10
	strb	r3, [fp, #-12]
	b	.L17
.L22:
	mov	r3, #11
	strb	r3, [fp, #-12]
	b	.L17
.L20:
	mov	r3, #12
	strb	r3, [fp, #-12]
	b	.L17
.L21:
	mov	r3, #13
	strb	r3, [fp, #-12]
	b	.L17
.L23:
	mov	r3, #14
	strb	r3, [fp, #-12]
	nop
.L17:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #67
	cmp	r3, #16
	ldrls	pc, [pc, r3, asl #2]
	b	.L24
.L26:
	.word	.L29
	.word	.L28
	.word	.L24
	.word	.L24
	.word	.L24
	.word	.L27
	.word	.L24
	.word	.L24
	.word	.L24
	.word	.L24
	.word	.L24
	.word	.L24
	.word	.L24
	.word	.L24
	.word	.L24
	.word	.L24
	.word	.L25
.L28:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L24
.L29:
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L24
.L27:
	mov	r3, #2
	str	r3, [fp, #-8]
	b	.L24
.L25:
	mov	r3, #3
	str	r3, [fp, #-8]
	nop
.L24:
	ldr	r3, [fp, #-24]
	mov	r2, r3
	sub	r3, fp, #12
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r0, [fp, #-24]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC6
	.size	parse, .-parse
	.align	2
	.global	is_straight
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_straight, %function
is_straight:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L34
.L41:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L42
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L37
.L39:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L37:
	ldr	r3, [fp, #-12]
	cmp	r3, #14
	bgt	.L38
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L39
.L38:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	cmp	r3, #5
	bne	.L36
	mov	r3, #1
	b	.L40
.L42:
	nop
.L36:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L34:
	ldr	r3, [fp, #-8]
	cmp	r3, #10
	ble	.L41
	mov	r3, #0
.L40:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_straight, .-is_straight
	.align	2
	.global	is_flush
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_flush, %function
is_flush:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #5
	beq	.L44
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #5
	beq	.L44
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
	ldr	r3, [r3]
	cmp	r3, #5
	beq	.L44
	ldr	r3, [fp, #-8]
	add	r3, r3, #12
	ldr	r3, [r3]
	cmp	r3, #5
	bne	.L45
.L44:
	mov	r3, #1
	b	.L46
.L45:
	mov	r3, #0
.L46:
	and	r3, r3, #1
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_flush, .-is_flush
	.align	2
	.global	is_three
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_three, %function
is_three:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L49
.L52:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L50
	mov	r3, #1
	b	.L51
.L50:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L49:
	ldr	r3, [fp, #-8]
	cmp	r3, #14
	ble	.L52
	mov	r3, #0
.L51:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_three, .-is_three
	.align	2
	.global	is_pair
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_pair, %function
is_pair:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L54
.L56:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L55
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L55:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L54:
	ldr	r3, [fp, #-16]
	cmp	r3, #14
	ble	.L56
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_pair, .-is_pair
	.section	.rodata
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	find_rank
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_rank, %function
find_rank:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-96]
	ldr	r3, .L74
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #68
	mov	r2, #60
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #84
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	mov	r3, #0
	str	r3, [fp, #-88]
	b	.L59
.L60:
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrsb	r3, [r3]
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-64]
	add	r1, r3, #1
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-64]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-80]
	add	r1, r3, #1
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-80]
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-88]
.L59:
	ldr	r3, [fp, #-88]
	cmp	r3, #4
	ble	.L60
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	bne	.L61
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bne	.L61
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bne	.L61
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L61
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	bne	.L61
	sub	r3, fp, #84
	mov	r0, r3
	bl	is_flush
	mov	r3, r0
	cmp	r3, #0
	beq	.L61
	mov	r3, #9
	b	.L72
.L61:
	sub	r3, fp, #68
	mov	r0, r3
	bl	is_straight
	mov	r3, r0
	cmp	r3, #0
	beq	.L63
	sub	r3, fp, #84
	mov	r0, r3
	bl	is_flush
	mov	r3, r0
	cmp	r3, #0
	beq	.L64
	mov	r3, #8
	b	.L72
.L64:
	mov	r3, #4
	b	.L72
.L63:
	ldr	r3, [fp, #-96]
	ldrsb	r3, [r3]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-64]
	cmp	r3, #4
	beq	.L66
	ldr	r3, [fp, #-96]
	add	r3, r3, #8
	ldrsb	r3, [r3]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-64]
	cmp	r3, #4
	bne	.L67
.L66:
	mov	r3, #7
	b	.L72
.L67:
	sub	r3, fp, #68
	mov	r0, r3
	bl	is_three
	mov	r3, r0
	cmp	r3, #0
	beq	.L68
	sub	r3, fp, #68
	mov	r0, r3
	bl	is_pair
	mov	r3, r0
	cmp	r3, #0
	beq	.L69
	mov	r3, #6
	b	.L72
.L69:
	mov	r3, #3
	b	.L72
.L68:
	sub	r3, fp, #84
	mov	r0, r3
	bl	is_flush
	mov	r3, r0
	cmp	r3, #0
	beq	.L71
	mov	r3, #5
	b	.L72
.L71:
	sub	r3, fp, #68
	mov	r0, r3
	bl	is_pair
	mov	r3, r0
.L72:
	ldr	r2, .L74
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L73
	bl	__stack_chk_fail
.L73:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L75:
	.align	2
.L74:
	.word	.LC7
	.size	find_rank, .-find_rank
	.section	.rodata
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_tie
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_tie, %function
handle_tie:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #160
	str	r0, [fp, #-152]
	str	r1, [fp, #-156]
	str	r2, [fp, #-160]
	ldr	r3, .L93
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #128
	mov	r2, #60
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #68
	mov	r2, #60
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-148]
	b	.L77
.L78:
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-152]
	add	r3, r2, r3
	ldrsb	r3, [r3]
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-124]
	add	r1, r3, #1
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-124]
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-156]
	add	r3, r2, r3
	ldrsb	r3, [r3]
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-64]
	add	r1, r3, #1
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-64]
	ldr	r3, [fp, #-148]
	add	r3, r3, #1
	str	r3, [fp, #-148]
.L77:
	ldr	r3, [fp, #-148]
	cmp	r3, #4
	ble	.L78
	ldr	r3, [fp, #-160]
	cmp	r3, #1
	bne	.L79
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L80
.L83:
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-124]
	cmp	r3, #2
	bne	.L81
	ldr	r3, [fp, #-136]
	str	r3, [fp, #-144]
.L81:
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-64]
	cmp	r3, #2
	bne	.L82
	ldr	r3, [fp, #-136]
	str	r3, [fp, #-140]
.L82:
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L80:
	ldr	r3, [fp, #-136]
	cmp	r3, #14
	ble	.L83
	ldr	r2, [fp, #-144]
	ldr	r3, [fp, #-140]
	cmp	r2, r3
	beq	.L79
	ldr	r2, [fp, #-144]
	ldr	r3, [fp, #-140]
	cmp	r2, r3
	ble	.L84
	mov	r3, #1
	b	.L91
.L84:
	mov	r3, #2
	b	.L91
.L79:
	mov	r3, #14
	str	r3, [fp, #-132]
	b	.L87
.L90:
	ldr	r3, [fp, #-132]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-124]
	cmp	r3, #1
	bne	.L88
	ldr	r3, [fp, #-132]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-64]
	cmp	r3, #0
	bne	.L88
	mov	r3, #1
	b	.L91
.L88:
	ldr	r3, [fp, #-132]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-64]
	cmp	r3, #1
	bne	.L89
	ldr	r3, [fp, #-132]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-124]
	cmp	r3, #0
	bne	.L89
	mov	r3, #2
	b	.L91
.L89:
	ldr	r3, [fp, #-132]
	sub	r3, r3, #1
	str	r3, [fp, #-132]
.L87:
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	bge	.L90
	mov	r3, #0
.L91:
	ldr	r2, .L93
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L92
	bl	__stack_chk_fail
.L92:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L94:
	.align	2
.L93:
	.word	.LC8
	.size	handle_tie, .-handle_tie
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
