	.file	"823134.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"tests"
.LC1:
	.string	"Hello"
.LC2:
	.string	"%s, %s!"
	.align 8
.LC3:
	.string	"snprintf with two formatters failed"
.LC4:
	.string	"Hello, tests!"
.LC5:
	.string	"Bad formatting: got %s"
	.text
	.type	snprintf__two_formatters, @function
snprintf__two_formatters:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -144[rbp]
	lea	r8, .LC0[rip]
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	mov	esi, 128
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	test	eax, eax
	jg	.L2
	lea	rsi, .LC3[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L2:
	lea	rax, -144[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L5
	lea	rax, -144[rbp]
	mov	rdx, rax
	lea	rsi, .LC5[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L5:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	snprintf__two_formatters, .-snprintf__two_formatters
	.section	.rodata
.LC6:
	.string	"0123456789abcdef"
	.align 8
.LC7:
	.string	"snprintf did not return the expected number of characters"
.LC8:
	.string	"012345678"
	.text
	.type	snprintf__overflow, @function
snprintf__overflow:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -18[rbp]
	lea	rdx, .LC6[rip]
	mov	esi, 10
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	cmp	eax, 16
	je	.L7
	lea	rsi, .LC7[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L7:
	lea	rax, -18[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L10
	lea	rax, -18[rbp]
	mov	rdx, rax
	lea	rsi, .LC5[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L10:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	snprintf__overflow, .-snprintf__overflow
	.section	.rodata
.LC9:
	.string	"This is a message\n"
.LC10:
	.string	"w+"
.LC11:
	.string	"test.txt"
.LC12:
	.string	"%s"
	.align 8
.LC13:
	.string	"fprintf failed to write to file"
.LC14:
	.string	"fread failed"
.LC15:
	.string	"Written and read data differ"
	.text
	.type	fprintf__simple_string, @function
fprintf__simple_string:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 176
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC9[rip]
	mov	QWORD PTR -168[rbp], rax
	lea	rsi, .LC10[rip]
	lea	rdi, .LC11[rip]
	call	fopen@PLT
	mov	QWORD PTR -160[rbp], rax
	mov	rdx, QWORD PTR -168[rbp]
	mov	rax, QWORD PTR -160[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	test	eax, eax
	jg	.L12
	lea	rsi, .LC13[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L12:
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	rewind@PLT
	mov	rdx, QWORD PTR -160[rbp]
	lea	rax, -144[rbp]
	mov	rcx, rdx
	mov	edx, 127
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -152[rbp], rax
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	QWORD PTR -152[rbp], rax
	je	.L13
	lea	rsi, .LC14[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L13:
	lea	rdx, -144[rbp]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rdx, QWORD PTR -168[rbp]
	lea	rax, -144[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L16
	lea	rsi, .LC15[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L16:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fprintf__simple_string, .-fprintf__simple_string
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	snprintf__two_formatters
	call	snprintf__overflow
	call	fprintf__simple_string
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"823134.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Hello\000"
	.align	2
.LC1:
	.ascii	"%s, %s!\000"
	.align	2
.LC2:
	.ascii	"tests\000"
	.align	2
.LC3:
	.ascii	"snprintf with two formatters failed\000"
	.align	2
.LC4:
	.ascii	"Hello, tests!\000"
	.align	2
.LC5:
	.ascii	"Bad formatting: got %s\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snprintf__two_formatters, %function
snprintf__two_formatters:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #144
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r0, fp, #136
	ldr	r3, .L6+4
	str	r3, [sp]
	ldr	r3, .L6+8
	ldr	r2, .L6+12
	mov	r1, #128
	bl	snprintf
	mov	r3, r0
	cmp	r3, #0
	bgt	.L2
	ldr	r1, .L6+16
	mov	r0, #1
	bl	errx
.L2:
	sub	r3, fp, #136
	ldr	r1, .L6+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	sub	r3, fp, #136
	mov	r2, r3
	ldr	r1, .L6+24
	mov	r0, #1
	bl	errx
.L5:
	nop
	ldr	r3, .L6
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC6
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	snprintf__two_formatters, .-snprintf__two_formatters
	.section	.rodata
	.align	2
.LC7:
	.ascii	"0123456789abcdef\000"
	.align	2
.LC8:
	.ascii	"snprintf did not return the expected number of char"
	.ascii	"acters\000"
	.align	2
.LC9:
	.ascii	"012345678\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snprintf__overflow, %function
snprintf__overflow:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #20
	ldr	r2, .L13+4
	mov	r1, #10
	mov	r0, r3
	bl	snprintf
	mov	r3, r0
	cmp	r3, #16
	beq	.L9
	ldr	r1, .L13+8
	mov	r0, #1
	bl	errx
.L9:
	sub	r3, fp, #20
	ldr	r1, .L13+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	sub	r3, fp, #20
	mov	r2, r3
	ldr	r1, .L13+16
	mov	r0, #1
	bl	errx
.L12:
	nop
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC10
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC5
	.size	snprintf__overflow, .-snprintf__overflow
	.section	.rodata
	.align	2
.LC11:
	.ascii	"This is a message\012\000"
	.align	2
.LC12:
	.ascii	"w+\000"
	.align	2
.LC13:
	.ascii	"test.txt\000"
	.align	2
.LC14:
	.ascii	"%s\000"
	.align	2
.LC15:
	.ascii	"fprintf failed to write to file\000"
	.align	2
.LC16:
	.ascii	"fread failed\000"
	.align	2
.LC17:
	.ascii	"Written and read data differ\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fprintf__simple_string, %function
fprintf__simple_string:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #144
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L21+4
	str	r3, [fp, #-148]
	ldr	r1, .L21+8
	ldr	r0, .L21+12
	bl	fopen
	str	r0, [fp, #-144]
	ldr	r2, [fp, #-148]
	ldr	r1, .L21+16
	ldr	r0, [fp, #-144]
	bl	fprintf
	mov	r3, r0
	cmp	r3, #0
	bgt	.L16
	ldr	r1, .L21+20
	mov	r0, #1
	bl	err
.L16:
	ldr	r0, [fp, #-144]
	bl	rewind
	sub	r0, fp, #136
	ldr	r3, [fp, #-144]
	mov	r2, #127
	mov	r1, #1
	bl	fread
	str	r0, [fp, #-140]
	ldr	r0, [fp, #-148]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-140]
	cmp	r3, r2
	beq	.L17
	ldr	r1, .L21+24
	mov	r0, #1
	bl	err
.L17:
	sub	r2, fp, #136
	ldr	r3, [fp, #-140]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r0, [fp, #-144]
	bl	fclose
	sub	r3, fp, #136
	ldr	r1, [fp, #-148]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L20
	ldr	r1, .L21+28
	mov	r0, #1
	bl	errx
.L20:
	nop
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC18
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.size	fprintf__simple_string, .-fprintf__simple_string
	.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
	bl	snprintf__two_formatters
	bl	snprintf__overflow
	bl	fprintf__simple_string
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
