	.file	"542043.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"rb"
.LC1:
	.string	"supplier.dat"
	.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
	sub	rsp, 16
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	open_file
	mov	QWORD PTR -8[rbp], rax
.L3:
	call	get_input_code
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jle	.L2
	cmp	DWORD PTR -12[rbp], 20
	jg	.L2
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	display_supplier
.L2:
	cmp	DWORD PTR -12[rbp], 0
	jg	.L3
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC2:
	.string	"\nError in reading file"
	.align 8
.LC3:
	.string	"\nCode: %d\nName: %s\nBalance :%7.2f\n"
	.text
	.globl	display_supplier
	.type	display_supplier, @function
display_supplier:
.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 1
	cdqe
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	sal	eax, 3
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -80[rbp]
	lea	rax, -48[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 40
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 1
	je	.L6
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L6:
	movss	xmm0, DWORD PTR -12[rbp]
	pxor	xmm1, xmm1
	cvtss2sd	xmm1, xmm0
	movq	rdx, xmm1
	mov	eax, DWORD PTR -48[rbp]
	lea	rcx, -48[rbp]
	add	rcx, 4
	movq	xmm0, rdx
	mov	rdx, rcx
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 1
	call	printf@PLT
.L9:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	display_supplier, .-display_supplier
	.section	.rodata
	.align 8
.LC4:
	.string	"\nEnter a supplier code from 1 to %d or 0 to end "
.LC5:
	.string	"%d"
	.text
	.globl	get_input_code
	.type	get_input_code, @function
get_input_code:
.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 20
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	get_input_code, .-get_input_code
	.section	.rodata
	.align 8
.LC6:
	.string	"\n\nUnable to open file %s with %s\n"
	.text
	.globl	open_file
	.type	open_file, @function
open_file:
.LFB9:
	.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	QWORD PTR -32[rbp], rsi
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L14
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	open_file, .-open_file
	.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	"542043.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"rb\000"
	.align	2
.LC1:
	.ascii	"supplier.dat\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r1, .L5
	ldr	r0, .L5+4
	bl	open_file
	str	r0, [fp, #-12]
.L3:
	bl	get_input_code
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L2
	ldr	r3, [fp, #-8]
	cmp	r3, #20
	bgt	.L2
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	display_supplier
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L3
	ldr	r0, [fp, #-12]
	bl	fclose
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.section	.rodata
	.align	2
.LC2:
	.ascii	"\012Error in reading file\000"
	.global	__aeabi_f2d
	.align	2
.LC3:
	.ascii	"\012Code: %d\012Name: %s\012Balance :%7.2f\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	display_supplier
	.syntax unified
	.arm
	.fpu softvfp
	.type	display_supplier, %function
display_supplier:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #68
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-64]
	sub	r3, r3, #1
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	str	r3, [fp, #-60]
	mov	r2, #0
	ldr	r1, [fp, #-60]
	ldr	r0, [fp, #-68]
	bl	fseek
	sub	r0, fp, #56
	ldr	r3, [fp, #-68]
	mov	r2, #1
	mov	r1, #40
	bl	fread
	mov	r3, r0
	cmp	r3, #1
	beq	.L8
	ldr	r0, .L12+4
	bl	printf
	b	.L11
.L8:
	ldr	r4, [fp, #-56]
	ldr	r3, [fp, #-20]	@ float
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #56
	add	r1, r1, #4
	stm	sp, {r2-r3}
	mov	r2, r1
	mov	r1, r4
	ldr	r0, .L12+8
	bl	printf
.L11:
	nop
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC4
	.word	.LC2
	.word	.LC3
	.size	display_supplier, .-display_supplier
	.section	.rodata
	.align	2
.LC5:
	.ascii	"\012Enter a supplier code from 1 to %d or 0 to end "
	.ascii	"\000"
	.align	2
.LC6:
	.ascii	"%d\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_input_code
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_input_code, %function
get_input_code:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #20
	ldr	r0, .L17+4
	bl	printf
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L17+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC7
	.word	.LC5
	.word	.LC6
	.size	get_input_code, .-get_input_code
	.section	.rodata
	.align	2
.LC8:
	.ascii	"\012\012Unable to open file %s with %s\012\000"
	.text
	.align	2
	.global	open_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_file, %function
open_file:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L20
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-16]
	ldr	r0, .L22
	bl	printf
	mov	r0, #1
	bl	exit
.L20:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC8
	.size	open_file, .-open_file
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
