	.file	"532048.c"
	.intel_syntax noprefix
	.text
	.globl	get_digits
	.type	get_digits, @function
get_digits:
.LFB0:
	.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	QWORD PTR -8[rbp], rdi
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, QWORD PTR -8[rbp]
	movq	rax, xmm1
	movq	xmm0, rax
	call	log10@PLT
	movq	rax, xmm0
	movq	xmm0, rax
	call	floor@PLT
	cvttsd2si	eax, xmm0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	get_digits, .-get_digits
	.globl	get_digit_sum
	.type	get_digit_sum, @function
get_digit_sum:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx, 2
	sar	eax, 31
	mov	esi, edx
	sub	esi, eax
	mov	edx, DWORD PTR -4[rbp]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	edi, edx
	sar	edi, 31
	sub	eax, edi
	mov	ecx, eax
	mov	eax, ecx
	sal	eax, 2
	add	eax, ecx
	add	eax, eax
	mov	ecx, edx
	sub	ecx, eax
	lea	eax, [rsi+rcx]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	get_digit_sum, .-get_digit_sum
	.section	.rodata
.LC0:
	.string	"Number: "
.LC1:
	.string	"%lld"
.LC2:
	.string	"AMEX"
.LC3:
	.string	"MASTERCARD"
.LC4:
	.string	"VISA"
.LC5:
	.string	"INVALID"
	.text
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	get_digits
	mov	DWORD PTR -20[rbp], eax
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	add	DWORD PTR -20[rbp], 1
	mov	DWORD PTR -24[rbp], 0
	jmp	.L6
.L11:
	mov	eax, DWORD PTR -24[rbp]
	and	eax, 1
	test	eax, eax
	je	.L7
	mov	rcx, QWORD PTR -16[rbp]
	movabs	rdx, 7378697629483820647
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 2
	mov	rsi, rcx
	sar	rsi, 63
	sub	rax, rsi
	mov	rdx, rax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	mov	eax, edx
	add	eax, eax
	mov	edi, eax
	call	get_digit_sum
	add	DWORD PTR -32[rbp], eax
	jmp	.L8
.L7:
	mov	rcx, QWORD PTR -16[rbp]
	movabs	rdx, 7378697629483820647
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 2
	mov	rsi, rcx
	sar	rsi, 63
	sub	rax, rsi
	mov	rdx, rax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	DWORD PTR -32[rbp], eax
.L8:
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 2
	cmp	DWORD PTR -24[rbp], eax
	jne	.L9
	mov	rcx, QWORD PTR -16[rbp]
	movabs	rdx, 7378697629483820647
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 2
	mov	rsi, rcx
	sar	rsi, 63
	sub	rax, rsi
	mov	rdx, rax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	mov	DWORD PTR -28[rbp], edx
	jmp	.L10
.L9:
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	cmp	DWORD PTR -24[rbp], eax
	jne	.L10
	mov	rcx, QWORD PTR -16[rbp]
	movabs	rdx, 7378697629483820647
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 2
	mov	rsi, rcx
	sar	rsi, 63
	sub	rax, rsi
	mov	rdx, rax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	edx, eax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, edx
	mov	DWORD PTR -28[rbp], eax
.L10:
	mov	rcx, QWORD PTR -16[rbp]
	movabs	rdx, 7378697629483820647
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 2
	sar	rcx, 63
	mov	rdx, rcx
	sub	rax, rdx
	mov	QWORD PTR -16[rbp], rax
	add	DWORD PTR -24[rbp], 1
.L6:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L11
	mov	ecx, DWORD PTR -32[rbp]
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	test	edx, edx
	jne	.L12
	cmp	DWORD PTR -20[rbp], 15
	jne	.L13
	cmp	DWORD PTR -28[rbp], 34
	je	.L14
	cmp	DWORD PTR -28[rbp], 37
	jne	.L13
.L14:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L20
.L13:
	cmp	DWORD PTR -20[rbp], 16
	jne	.L16
	cmp	DWORD PTR -28[rbp], 49
	jle	.L17
	cmp	DWORD PTR -28[rbp], 55
	jle	.L18
.L17:
	cmp	DWORD PTR -28[rbp], 21
	jle	.L16
	cmp	DWORD PTR -28[rbp], 27
	jg	.L16
.L18:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	jmp	.L20
.L16:
	cmp	DWORD PTR -20[rbp], 12
	jle	.L19
	cmp	DWORD PTR -20[rbp], 16
	jg	.L19
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 40
	cmp	eax, 9
	ja	.L19
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L20
.L19:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L20
.L12:
	lea	rdi, .LC5[rip]
	call	puts@PLT
.L20:
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.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	"532048.c"
	.text
	.global	__aeabi_l2d
	.global	__aeabi_d2iz
	.align	2
	.global	get_digits
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_digits, %function
get_digits:
	@ 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, #-12]
	str	r1, [fp, #-8]
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	bl	__aeabi_l2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	log10
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	floor
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	get_digits, .-get_digits
	.align	2
	.global	get_digit_sum
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_digit_sum, %function
get_digit_sum:
	@ 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	r2, .L5
	smull	r1, r2, r3, r2
	asr	r2, r2, #2
	asr	r3, r3, #31
	sub	r0, r2, r3
	ldr	r1, [fp, #-8]
	ldr	r3, .L5
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	add	r3, r0, r2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L6:
	.align	2
.L5:
	.word	1717986919
	.size	get_digit_sum, .-get_digit_sum
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Number: \000"
	.align	2
.LC1:
	.ascii	"%lld\000"
	.global	__aeabi_ldivmod
	.align	2
.LC2:
	.ascii	"AMEX\000"
	.align	2
.LC3:
	.ascii	"MASTERCARD\000"
	.align	2
.LC4:
	.ascii	"VISA\000"
	.align	2
.LC5:
	.ascii	"INVALID\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L25+4
	bl	printf
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L25+8
	bl	__isoc99_scanf
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	get_digits
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L8
.L13:
	ldr	r3, [fp, #-28]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L9
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_ldivmod
	mov	r3, r2
	lsl	r3, r3, #1
	mov	r0, r3
	bl	get_digit_sum
	mov	r2, r0
	ldr	r3, [fp, #-36]
	add	r3, r3, r2
	str	r3, [fp, #-36]
	b	.L10
.L9:
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_ldivmod
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	str	r3, [fp, #-36]
.L10:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #2
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bne	.L11
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_ldivmod
	mov	r3, r2
	str	r3, [fp, #-32]
	b	.L12
.L11:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bne	.L12
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_ldivmod
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	str	r3, [fp, #-32]
.L12:
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_ldivmod
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L8:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L13
	ldr	r1, [fp, #-36]
	ldr	r3, .L25+12
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L14
	ldr	r3, [fp, #-24]
	cmp	r3, #15
	bne	.L15
	ldr	r3, [fp, #-32]
	cmp	r3, #34
	beq	.L16
	ldr	r3, [fp, #-32]
	cmp	r3, #37
	bne	.L15
.L16:
	ldr	r0, .L25+16
	bl	puts
	b	.L22
.L15:
	ldr	r3, [fp, #-24]
	cmp	r3, #16
	bne	.L18
	ldr	r3, [fp, #-32]
	cmp	r3, #49
	ble	.L19
	ldr	r3, [fp, #-32]
	cmp	r3, #55
	ble	.L20
.L19:
	ldr	r3, [fp, #-32]
	cmp	r3, #21
	ble	.L18
	ldr	r3, [fp, #-32]
	cmp	r3, #27
	bgt	.L18
.L20:
	ldr	r0, .L25+20
	bl	puts
	b	.L22
.L18:
	ldr	r3, [fp, #-24]
	cmp	r3, #12
	ble	.L21
	ldr	r3, [fp, #-24]
	cmp	r3, #16
	bgt	.L21
	ldr	r3, [fp, #-32]
	sub	r3, r3, #40
	cmp	r3, #9
	bhi	.L21
	ldr	r0, .L25+24
	bl	puts
	b	.L22
.L21:
	ldr	r0, .L25+28
	bl	puts
	b	.L22
.L14:
	ldr	r0, .L25+28
	bl	puts
.L22:
	mov	r3, #0
	ldr	r2, .L25
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	1717986919
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
