	.file	"523393.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Finding blockdevice mounted at mountpoint %s\n"
.LC1:
	.string	"r"
.LC2:
	.string	"/proc/mounts"
.LC3:
	.string	"fopen(/proc/mounts)"
.LC4:
	.string	" "
.LC5:
	.string	"strdup"
.LC6:
	.string	"Canonicalizing path %s\n"
.LC7:
	.string	"/dev/"
	.align 8
.LC8:
	.string	"block device %s does not start with /dev/, cannot match with hotplug events later"
	.align 8
.LC9:
	.string	"Could not find --mountpoint=%s in /proc/mounts"
	.text
	.globl	mountpoint_to_blockdev
	.type	mountpoint_to_blockdev, @function
mountpoint_to_blockdev:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 80
	mov	QWORD PTR -4168[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -4168[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	fopen@PLT
	mov	QWORD PTR -4152[rbp], rax
	cmp	QWORD PTR -4152[rbp], 0
	jne	.L3
	lea	rsi, .LC3[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L9:
	lea	rax, -4112[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -4144[rbp], rax
	cmp	QWORD PTR -4144[rbp], 0
	jne	.L4
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -4144[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -4136[rbp], rax
	cmp	QWORD PTR -4136[rbp], 0
	jne	.L5
	lea	rsi, .LC5[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L5:
	lea	rsi, .LC4[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -4128[rbp], rax
	mov	rdx, QWORD PTR -4168[rbp]
	mov	rax, QWORD PTR -4128[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L6
	mov	rax, QWORD PTR -4136[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L3
.L6:
	mov	rax, QWORD PTR -4136[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -4136[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	realpath@PLT
	mov	QWORD PTR -4120[rbp], rax
	mov	rax, QWORD PTR -4136[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -4152[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -4120[rbp]
	mov	edx, 5
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR -4120[rbp]
	mov	rdx, rax
	lea	rsi, .LC8[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L7:
	mov	rax, QWORD PTR -4120[rbp]
	add	rax, 5
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	jmp	.L11
.L3:
	mov	rdx, QWORD PTR -4152[rbp]
	lea	rax, -4112[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L9
	mov	rax, QWORD PTR -4168[rbp]
	mov	rdx, rax
	lea	rsi, .LC9[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L11:
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	mountpoint_to_blockdev, .-mountpoint_to_blockdev
	.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	"523393.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Finding blockdevice mounted at mountpoint %s\012\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"/proc/mounts\000"
	.align	2
.LC3:
	.ascii	"fopen(/proc/mounts)\000"
	.align	2
.LC4:
	.ascii	" \000"
	.align	2
.LC5:
	.ascii	"strdup\000"
	.align	2
.LC6:
	.ascii	"Canonicalizing path %s\012\000"
	.align	2
.LC7:
	.ascii	"/dev/\000"
	.align	2
.LC8:
	.ascii	"block device %s does not start with /dev/, cannot m"
	.ascii	"atch with hotplug events later\000"
	.align	2
.LC9:
	.ascii	"Could not find --mountpoint=%s in /proc/mounts\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mountpoint_to_blockdev
	.syntax unified
	.arm
	.fpu softvfp
	.type	mountpoint_to_blockdev, %function
mountpoint_to_blockdev:
	@ args = 0, pretend = 0, frame = 4128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #36
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-28]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r3, #-28]
	ldr	r0, .L12+4
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L12+8
	ldr	r0, .L12+12
	bl	fopen
	str	r0, [r4, #-24]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	cmp	r3, #0
	bne	.L3
	ldr	r1, .L12+16
	mov	r0, #1
	bl	err
.L9:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, .L12+20
	mov	r0, r3
	bl	strtok
	str	r0, [r4, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	bne	.L4
	b	.L3
.L4:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-20]
	bl	strdup
	mov	r3, r0
	str	r3, [r4, #-16]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmp	r3, #0
	bne	.L5
	ldr	r1, .L12+24
	mov	r0, #1
	bl	err
.L5:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L12+20
	mov	r0, #0
	bl	strtok
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r2, #-28]
	ldr	r0, [r3, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	free
	b	.L3
.L6:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r3, #-16]
	ldr	r0, .L12+28
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, #0
	ldr	r0, [r3, #-16]
	bl	realpath
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	free
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-24]
	bl	fclose
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #5
	ldr	r1, .L12+32
	ldr	r0, [r3, #-8]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-8]
	ldr	r1, .L12+36
	mov	r0, #1
	bl	errx
.L7:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	add	r3, r3, #5
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	b	.L11
.L3:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [r2, #-24]
	mov	r1, #4096
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-28]
	ldr	r1, .L12+40
	mov	r0, #1
	bl	errx
.L11:
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC10
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	mountpoint_to_blockdev, .-mountpoint_to_blockdev
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
