	.file	"extr_mlx5tool.c_mlx5tool_save_dump.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"w"
.LC1:
	.string	"open %s"
.LC2:
	.string	"MLX5_FWDUMP_GET dumpsize"
.LC3:
	.string	"alloc rege"
.LC4:
	.string	"no dump recorded"
.LC5:
	.string	"MLX5_FWDUMP_GET dump fetch"
.LC6:
	.string	"0x%08x\t0x%08x\n"
	.text
	.p2align 4
	.type	mlx5tool_save_dump, @function
mlx5tool_save_dump:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, edi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rsi
	sub	rsp, 48
	.cfi_def_cfa_offset 96
	mov	r12, QWORD PTR stdout[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	test	rdx, rdx
	je	.L3
	lea	rsi, .LC0[rip]
	mov	rdi, rdx
	call	fopen@PLT
	mov	r12, rax
.L3:
	test	r12, r12
	je	.L19
	mov	r14, rsp
	xor	esi, esi
	mov	edx, 32
	mov	rdi, r14
	call	memset@PLT
	mov	eax, DWORD PTR [rbx]
	mov	esi, DWORD PTR MLX5_FWDUMP_GET[rip]
	mov	rdx, r14
	mov	edi, r13d
	mov	DWORD PTR 24[rsp], eax
	call	ioctl@PLT
	test	eax, eax
	jne	.L20
	mov	rdi, QWORD PTR [rsp]
	mov	esi, 8
	call	calloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L21
	mov	QWORD PTR 16[rsp], rax
	mov	esi, DWORD PTR MLX5_FWDUMP_GET[rip]
	mov	edi, r13d
	mov	rdx, r14
	mov	rax, QWORD PTR [rsp]
	mov	QWORD PTR 8[rsp], rax
	call	ioctl@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L9
	xor	ebx, ebx
	cmp	QWORD PTR 8[rsp], 0
	lea	r14, .LC6[rip]
	je	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	mov	ecx, DWORD PTR 4[rbp+rbx*8]
	mov	edx, DWORD PTR 0[rbp+rbx*8]
	mov	rsi, r14
	mov	rdi, r12
	add	rbx, 1
	call	fprintf@PLT
	cmp	QWORD PTR 8[rsp], rbx
	ja	.L10
.L7:
	cmp	QWORD PTR stdout[rip], r12
	je	.L1
	mov	rdi, r12
	call	fclose@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	lea	rdi, .LC2[rip]
	xor	eax, eax
	mov	r13d, 1
	call	warn@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L21:
	lea	rdi, .LC3[rip]
	xor	eax, eax
	mov	r13d, 1
	call	warn@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rsi, rbp
	lea	rdi, .LC1[rip]
	xor	eax, eax
	mov	r13d, 1
	call	warn@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rax, QWORD PTR ENOENT[rip]
	cmp	QWORD PTR errno[rip], rax
	je	.L23
	lea	rdi, .LC5[rip]
	xor	eax, eax
	mov	r13d, 1
	call	warn@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rdi, .LC4[rip]
	mov	r13d, 1
	call	warnx@PLT
	jmp	.L7
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mlx5tool_save_dump, .-mlx5tool_save_dump
	.comm	stdout,8,8
	.comm	errno,8,8
	.comm	MLX5_FWDUMP_GET,4,4
	.comm	ENOENT,8,8
	.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_mlx5tool.c_mlx5tool_save_dump.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"w\000"
	.align	2
.LC1:
	.ascii	"open %s\000"
	.align	2
.LC2:
	.ascii	"MLX5_FWDUMP_GET dumpsize\000"
	.align	2
.LC3:
	.ascii	"alloc rege\000"
	.align	2
.LC4:
	.ascii	"no dump recorded\000"
	.align	2
.LC5:
	.ascii	"MLX5_FWDUMP_GET dump fetch\000"
	.align	2
.LC6:
	.ascii	"0x%08x\0110x%08x\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx5tool_save_dump, %function
mlx5tool_save_dump:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L24
	sub	sp, sp, #28
	subs	r4, r2, #0
	mov	r7, r0
	mov	r6, r1
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	beq	.L18
	mov	r0, r4
	ldr	r1, .L24+4
	bl	fopen
	mov	r5, r0
	cmp	r5, #0
	beq	.L19
.L4:
	mov	r3, #0
	ldr	r0, [r6]
	ldr	r4, .L24+8
	str	r0, [sp, #16]
	ldr	r1, [r4]
	mov	r0, r7
	add	r2, sp, #4
	str	r3, [sp, #4]
	str	r3, [sp, #8]
	str	r3, [sp, #12]
	bl	ioctl
	cmp	r0, #0
	bne	.L20
	ldr	r8, [sp, #4]
	mov	r1, #8
	mov	r0, r8
	bl	calloc
	subs	r6, r0, #0
	beq	.L21
	mov	r0, r7
	ldr	r1, [r4]
	add	r2, sp, #4
	str	r6, [sp, #12]
	str	r8, [sp, #8]
	bl	ioctl
	subs	r9, r0, #0
	bne	.L9
	ldr	r3, [sp, #8]
	cmp	r3, #0
	beq	.L7
	mov	r4, r9
	ldr	r8, .L24+12
	add	r7, r6, #4
.L10:
	ldr	r3, [r7, r4, lsl #3]
	ldr	r2, [r6, r4, lsl #3]
	mov	r1, r8
	mov	r0, r5
	bl	fprintf
	ldr	r3, [sp, #8]
	add	r4, r4, #1
	cmp	r3, r4
	bhi	.L10
.L7:
	ldr	r3, .L24+16
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L1
	mov	r0, r5
	bl	fclose
.L1:
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	mov	r0, r9
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L18:
	ldr	r3, .L24+16
	ldr	r5, [r3]
	cmp	r5, #0
	bne	.L4
.L19:
	mov	r1, r4
	ldr	r0, .L24+20
	bl	warn
	mov	r9, #1
	b	.L1
.L20:
	ldr	r0, .L24+24
	bl	warn
	mov	r9, #1
	b	.L7
.L9:
	ldr	r2, .L24+28
	ldr	r3, .L24+32
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L23
	ldr	r0, .L24+36
	bl	warn
	mov	r9, #1
	b	.L7
.L23:
	ldr	r0, .L24+40
	bl	warnx
	mov	r9, #1
	b	.L7
.L22:
	bl	__stack_chk_fail
.L21:
	ldr	r0, .L24+44
	bl	warn
	mov	r9, #1
	b	.L7
.L25:
	.align	2
.L24:
	.word	.LC7
	.word	.LC0
	.word	MLX5_FWDUMP_GET
	.word	.LC6
	.word	stdout
	.word	.LC1
	.word	.LC2
	.word	errno
	.word	ENOENT
	.word	.LC5
	.word	.LC4
	.word	.LC3
	.size	mlx5tool_save_dump, .-mlx5tool_save_dump
	.comm	stdout,4,4
	.comm	errno,4,4
	.comm	MLX5_FWDUMP_GET,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
