	.file	"extr_scsi_serial.c_scsi_std_inquiry.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"scsi_id: cannot open %s: %m"
.LC1:
	.string	"scsi_id: cannot stat %s: %m"
.LC2:
	.string	"%d:%d"
.LC3:
	.string	"%x"
	.text
	.p2align 4
	.globl	scsi_std_inquiry
	.type	scsi_std_inquiry, @function
scsi_std_inquiry:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbx
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR SCSI_INQ_BUFF_LEN[rip]
	mov	rdx, rsp
	add	rax, 15
	mov	rcx, rax
	and	rax, -4096
	sub	rdx, rax
	and	rcx, -16
	mov	rax, rdx
	cmp	rsp, rax
	je	.L3
.L15:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L15
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L16
.L4:
	mov	esi, DWORD PTR O_RDONLY[rip]
	mov	rdi, r12
	or	esi, DWORD PTR O_NONBLOCK[rip]
	or	esi, DWORD PTR O_CLOEXEC[rip]
	call	open@PLT
	mov	r13d, eax
	test	eax, eax
	js	.L17
	lea	rsi, -44[rbp]
	mov	edi, eax
	call	fstat@PLT
	test	rax, rax
	js	.L18
	mov	edi, DWORD PTR -44[rbp]
	call	minor@PLT
	mov	edi, DWORD PTR -44[rbp]
	mov	r12d, eax
	call	major@PLT
	mov	edi, DWORD PTR 28[rbx]
	mov	ecx, r12d
	lea	rsi, .LC2[rip]
	movzx	edx, al
	xor	eax, eax
	call	sprintf@PLT
	mov	esi, DWORD PTR SCSI_INQ_BUFF_LEN[rip]
	mov	rdi, rsp
	call	memzero@PLT
	mov	r9d, DWORD PTR SCSI_INQ_BUFF_LEN[rip]
	xor	ecx, ecx
	xor	edx, edx
	mov	r8, rsp
	mov	esi, r13d
	mov	rdi, rbx
	call	scsi_inquiry@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L8
	mov	rdi, QWORD PTR [rbx]
	lea	rsi, 8[rsp]
	mov	edx, 8
	xor	r12d, r12d
	call	memcpy@PLT
	mov	rax, QWORD PTR [rbx]
	lea	rsi, 16[rsp]
	mov	edx, 16
	mov	BYTE PTR 8[rax], 0
	mov	rdi, QWORD PTR 8[rbx]
	call	memcpy@PLT
	mov	rax, QWORD PTR 8[rbx]
	lea	rsi, 32[rsp]
	mov	edx, 4
	mov	BYTE PTR 16[rax], 0
	mov	rdi, QWORD PTR 16[rbx]
	call	memcpy@PLT
	mov	rax, QWORD PTR 16[rbx]
	lea	rsi, .LC3[rip]
	mov	BYTE PTR 4[rax], 0
	movzx	edx, BYTE PTR [rsp]
	xor	eax, eax
	mov	edi, DWORD PTR 24[rbx]
	and	edx, 31
	call	sprintf@PLT
.L8:
	mov	edi, r13d
	call	close@PLT
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	lea	rsp, -24[rbp]
	mov	eax, r12d
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	edi, DWORD PTR errno[rip]
	mov	rdx, r12
	lea	rsi, .LC0[rip]
	mov	r12d, 1
	call	log_debug_errno@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edi, DWORD PTR errno[rip]
	mov	rdx, r12
	lea	rsi, .LC1[rip]
	mov	r12d, 2
	call	log_debug_errno@PLT
	jmp	.L8
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	scsi_std_inquiry, .-scsi_std_inquiry
	.comm	errno,4,4
	.comm	SCSI_INQ_BUFF_LEN,4,4
	.comm	O_RDONLY,4,4
	.comm	O_NONBLOCK,4,4
	.comm	O_CLOEXEC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_scsi_serial.c_scsi_std_inquiry.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"scsi_id: cannot open %s: %m\000"
	.align	2
.LC1:
	.ascii	"scsi_id: cannot stat %s: %m\000"
	.align	2
.LC2:
	.ascii	"%d:%d\000"
	.align	2
.LC3:
	.ascii	"%x\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	scsi_std_inquiry
	.syntax unified
	.arm
	.fpu softvfp
	.type	scsi_std_inquiry, %function
scsi_std_inquiry:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #16
	mov	r8, r1
	ldr	r5, .L12
	mov	r4, r0
	ldr	r3, [r5]
	ldr	r2, .L12+4
	ldr	r0, .L12+8
	ldr	r1, .L12+12
	ldr	r0, [r0]
	ldr	r2, [r2]
	add	r3, r3, #7
	ldr	r1, [r1]
	bic	r3, r3, #7
	orr	r2, r2, r0
	sub	sp, sp, r3
	ldr	r3, .L12+16
	mov	r0, r8
	orr	r1, r2, r1
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	open
	subs	r6, r0, #0
	blt	.L9
	sub	r1, fp, #36
	bl	fstat
	cmp	r0, #0
	blt	.L10
	ldr	r0, [fp, #-36]
	ldr	r9, [r4, #16]
	bl	major
	mov	r8, r0
	ldr	r0, [fp, #-36]
	bl	minor
	add	r7, sp, #8
	mov	r3, r0
	and	r2, r8, #255
	ldr	r1, .L12+20
	mov	r0, r9
	bl	sprintf
	ldr	r1, [r5]
	mov	r0, r7
	bl	memzero
	mov	r3, #0
	ldr	r2, [r5]
	mov	r1, r6
	str	r2, [sp, #4]
	mov	r0, r4
	mov	r2, r3
	str	r7, [sp]
	bl	scsi_inquiry
	subs	r5, r0, #0
	blt	.L5
	mov	r2, #8
	mov	r5, #0
	add	r1, r7, r2
	ldr	r0, [r4]
	bl	memcpy
	ldr	r3, [r4]
	mov	r2, #16
	strb	r5, [r3, #8]
	add	r1, sp, #24
	ldr	r0, [r4, #4]
	bl	memcpy
	ldr	r3, [r4, #4]
	mov	r2, #4
	strb	r5, [r3, #16]
	add	r1, sp, #40
	ldr	r0, [r4, #8]
	bl	memcpy
	ldr	r3, [r4, #8]
	ldr	r1, .L12+24
	strb	r5, [r3, #4]
	ldrb	r2, [r7]	@ zero_extendqisi2
	ldr	r0, [r4, #12]
	and	r2, r2, #31
	bl	sprintf
.L5:
	mov	r0, r6
	bl	close
.L1:
	ldr	r3, .L12+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	mov	r0, r5
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L9:
	ldr	r3, .L12+28
	mov	r2, r8
	ldr	r0, [r3]
	ldr	r1, .L12+32
	bl	log_debug_errno
	mov	r5, #1
	b	.L1
.L10:
	ldr	r3, .L12+28
	mov	r2, r8
	ldr	r0, [r3]
	ldr	r1, .L12+36
	bl	log_debug_errno
	mov	r5, #2
	b	.L5
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	SCSI_INQ_BUFF_LEN
	.word	O_RDONLY
	.word	O_NONBLOCK
	.word	O_CLOEXEC
	.word	.LC4
	.word	.LC2
	.word	.LC3
	.word	errno
	.word	.LC0
	.word	.LC1
	.size	scsi_std_inquiry, .-scsi_std_inquiry
	.comm	errno,4,4
	.comm	SCSI_INQ_BUFF_LEN,4,4
	.comm	O_RDONLY,4,4
	.comm	O_NONBLOCK,4,4
	.comm	O_CLOEXEC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
