	.file	"42261.c"
	.intel_syntax noprefix
	.text
	.globl	countDigitOne
	.type	countDigitOne, @function
countDigitOne:
.LFB0:
	.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, 40
	.cfi_offset 3, -24
	mov	DWORD PTR -36[rbp], edi
	cmp	DWORD PTR -36[rbp], 0
	jg	.L2
	mov	eax, 0
	jmp	.L3
.L2:
	cmp	DWORD PTR -36[rbp], 0
	jle	.L4
	cmp	DWORD PTR -36[rbp], 9
	jg	.L4
	mov	eax, 1
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -24[rbp], eax
	mov	DWORD PTR -20[rbp], 1
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx, 2
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -24[rbp], eax
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	DWORD PTR -20[rbp], eax
.L5:
	cmp	DWORD PTR -24[rbp], 9
	jg	.L6
	cmp	DWORD PTR -24[rbp], 1
	je	.L7
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	edi, eax
	call	countDigitOne
	imul	eax, DWORD PTR -24[rbp]
	mov	ebx, eax
	mov	eax, DWORD PTR -36[rbp]
	cdq
	idiv	DWORD PTR -20[rbp]
	mov	eax, edx
	mov	edi, eax
	call	countDigitOne
	lea	edx, [rbx+rax]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	jmp	.L3
.L7:
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	edi, eax
	call	countDigitOne
	mov	ebx, eax
	mov	eax, DWORD PTR -36[rbp]
	cdq
	idiv	DWORD PTR -20[rbp]
	mov	eax, edx
	mov	edi, eax
	call	countDigitOne
	lea	ecx, [rbx+rax]
	mov	eax, DWORD PTR -36[rbp]
	cdq
	idiv	DWORD PTR -20[rbp]
	mov	eax, edx
	add	eax, ecx
	add	eax, 1
.L3:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	countDigitOne, .-countDigitOne
	.section	.rodata
.LC0:
	.string	"n = 13, countDigitOne = %d\n"
	.align 8
.LC1:
	.string	"n = 824883294, countDigitOne = %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edi, 13
	call	countDigitOne
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 824883294
	call	countDigitOne
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"42261.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.global	countDigitOne
	.syntax unified
	.arm
	.fpu softvfp
	.type	countDigitOne, %function
countDigitOne:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bgt	.L2
	mov	r3, #0
	b	.L3
.L2:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	ble	.L4
	ldr	r3, [fp, #-24]
	cmp	r3, #9
	bgt	.L4
	mov	r3, #1
	b	.L3
.L4:
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-20]
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L5
.L6:
	ldr	r3, [fp, #-20]
	ldr	r2, .L8
	smull	r1, r2, r3, r2
	asr	r2, r2, #2
	asr	r3, r3, #31
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	str	r3, [fp, #-16]
.L5:
	ldr	r3, [fp, #-20]
	cmp	r3, #9
	bgt	.L6
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	beq	.L7
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	mov	r0, r3
	bl	countDigitOne
	mov	r2, r0
	ldr	r3, [fp, #-20]
	mul	r4, r3, r2
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r0, r3
	bl	countDigitOne
	mov	r3, r0
	add	r2, r4, r3
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	b	.L3
.L7:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	mov	r0, r3
	bl	countDigitOne
	mov	r4, r0
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r0, r3
	bl	countDigitOne
	mov	r3, r0
	add	r4, r4, r3
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	add	r3, r4, r3
	add	r3, r3, #1
.L3:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L9:
	.align	2
.L8:
	.word	1717986919
	.size	countDigitOne, .-countDigitOne
	.section	.rodata
	.align	2
.LC0:
	.ascii	"n = 13, countDigitOne = %d\012\000"
	.align	2
.LC1:
	.ascii	"n = 824883294, countDigitOne = %d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r0, #13
	bl	countDigitOne
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L12
	bl	printf
	ldr	r0, .L12+4
	bl	countDigitOne
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L12+8
	bl	printf
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	824883294
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
