	.file	"815276.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: printf_exmpl $FMT $NUM_OF_VARARGS $VARARGS\n$FMT: printf format\n$NUM_OF_VARARGS: number of varargs, max 4\n$VARARGS: list of varargs\ne.g. printf_exmpl \"hello str=%%s num1=%%u num2=%%d num3=%%lu\" 4 \\\"world\\\" 1 2 3\n"
	.text
	.globl	print_usage
	.type	print_usage, @function
print_usage:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_usage, .-print_usage
	.section	.rodata
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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, 88
	.cfi_offset 3, -24
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -84[rbp], 2
	jg	.L3
	call	print_usage
	mov	eax, -1
	jmp	.L17
.L3:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 4
	jle	.L5
	call	print_usage
	mov	eax, -1
	jmp	.L17
.L5:
	mov	DWORD PTR -80[rbp], 3
	jmp	.L6
.L9:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -72[rbp], rax
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 34
	jne	.L7
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rcx
	add	rdx, 1
	mov	QWORD PTR [rax], rdx
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -72[rbp], rax
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rbx, QWORD PTR [rax]
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 1
	add	rax, rbx
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -80[rbp]
	sub	edx, 3
	mov	rcx, rax
	movsx	rax, edx
	mov	QWORD PTR -64[rbp+rax*8], rcx
	jmp	.L8
.L7:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	edx, DWORD PTR -80[rbp]
	lea	ecx, -3[rdx]
	movsx	rdx, eax
	movsx	rax, ecx
	mov	QWORD PTR -64[rbp+rax*8], rdx
.L8:
	add	DWORD PTR -80[rbp], 1
.L6:
	mov	eax, DWORD PTR -76[rbp]
	add	eax, 3
	cmp	DWORD PTR -80[rbp], eax
	jne	.L9
	cmp	DWORD PTR -76[rbp], 4
	ja	.L10
	mov	eax, DWORD PTR -76[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, .L12[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L12[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L12:
	.long	.L16-.L12
	.long	.L15-.L12
	.long	.L14-.L12
	.long	.L13-.L12
	.long	.L11-.L12
	.text
.L16:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L17
.L15:
	mov	rdx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	jmp	.L17
.L14:
	mov	rdx, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rcx
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	jmp	.L17
.L13:
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	jmp	.L17
.L11:
	mov	rdi, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	r8, rdi
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	jmp	.L17
.L10:
	mov	eax, -1
.L17:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"815276.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: printf_exmpl $FMT $NUM_OF_VARARGS $VARARGS\012"
	.ascii	"$FMT: printf format\012$NUM_OF_VARARGS: number of v"
	.ascii	"arargs, max 4\012$VARARGS: list of varargs\012e.g. "
	.ascii	"printf_exmpl \"hello str=%%s num1=%%u num2=%%d num3"
	.ascii	"=%%lu\" 4 \\\"world\\\" 1 2 3\012\000"
	.text
	.align	2
	.global	print_usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_usage, %function
print_usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L2
	bl	printf
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	print_usage, .-print_usage
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-48]
	cmp	r3, #2
	bgt	.L5
	bl	print_usage
	mvn	r3, #0
	b	.L19
.L5:
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #4
	ble	.L7
	bl	print_usage
	mvn	r3, #0
	b	.L19
.L7:
	mov	r3, #3
	str	r3, [fp, #-44]
	b	.L8
.L11:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #34
	bne	.L9
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-52]
	add	r3, r1, r3
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r4, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	add	r3, r4, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	sub	r3, r3, #3
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-20]
	b	.L10
.L9:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	sub	r4, r3, #3
	mov	r0, r2
	bl	atoi
	mov	r2, r0
	lsl	r3, r4, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-20]
.L10:
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L8:
	ldr	r3, [fp, #-40]
	add	r3, r3, #3
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	bne	.L11
	ldr	r3, [fp, #-40]
	cmp	r3, #4
	ldrls	pc, [pc, r3, asl #2]
	b	.L12
.L14:
	.word	.L18
	.word	.L17
	.word	.L16
	.word	.L15
	.word	.L13
.L18:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L21+4
	bl	printf
	mov	r3, r0
	b	.L19
.L17:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	mov	r1, r2
	mov	r0, r3
	bl	printf
	mov	r3, r0
	b	.L19
.L16:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, [fp, #-32]
	ldr	r2, [fp, #-28]
	mov	r0, r3
	bl	printf
	mov	r3, r0
	b	.L19
.L15:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r0, [r3]
	ldr	r1, [fp, #-32]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	bl	printf
	mov	r3, r0
	b	.L19
.L13:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r0, [r3]
	ldr	r1, [fp, #-32]
	ldr	r2, [fp, #-28]
	ldr	ip, [fp, #-24]
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	mov	r3, ip
	bl	printf
	mov	r3, r0
	b	.L19
.L12:
	mvn	r3, #0
.L19:
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC2
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
