	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5tool_save_dump
_mlx5tool_save_dump:                    ## @mlx5tool_save_dump
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movl	%edi, %r14d
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	movq	%rax, %r15
	testq	%r15, %r15
	je	LBB0_9
LBB0_2:
	leaq	-72(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	(%r12), %eax
	movl	%eax, -48(%rbp)
	movq	_MLX5_FWDUMP_GET@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%r14d, %edi
	movq	%rbx, %rdx
	callq	_ioctl
	testl	%eax, %eax
	je	LBB0_11
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
LBB0_4:
	xorl	%eax, %eax
	callq	_warn
LBB0_5:
	movl	$1, %r14d
LBB0_6:
	movq	_stdout@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_10
## %bb.7:
	movq	%r15, %rdi
	callq	_fclose
	jmp	LBB0_10
LBB0_8:
	movq	_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	testq	%r15, %r15
	jne	LBB0_2
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_warn
	movl	$1, %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	-72(%rbp), %rdi
	movl	$8, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	movq	%rax, %r13
	movq	%rax, -56(%rbp)
	movq	-72(%rbp), %rax
	movq	%rax, -64(%rbp)
	movl	(%r12), %esi
	leaq	-72(%rbp), %rdx
	movl	%r14d, %edi
	callq	_ioctl
	testl	%eax, %eax
	je	LBB0_16
## %bb.13:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.14:
	leaq	L_.str.4(%rip), %rdi
	callq	_warnx
	jmp	LBB0_5
LBB0_15:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_4
LBB0_16:
	cmpq	$0, -64(%rbp)
	je	LBB0_20
## %bb.17:
	xorl	%r14d, %r14d
	leaq	L_.str.6(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%rbx,8), %edx
	movl	4(%r13,%rbx,8), %ecx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_fprintf
	incq	%rbx
	cmpq	-64(%rbp), %rbx
	jb	LBB0_18
	jmp	LBB0_6
LBB0_19:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_4
LBB0_20:
	xorl	%r14d, %r14d
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_stdout,8,3                     ## @stdout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w"

L_.str.1:                               ## @.str.1
	.asciz	"open %s"

	.comm	_MLX5_FWDUMP_GET,4,2            ## @MLX5_FWDUMP_GET
L_.str.2:                               ## @.str.2
	.asciz	"MLX5_FWDUMP_GET dumpsize"

L_.str.3:                               ## @.str.3
	.asciz	"alloc rege"

	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
L_.str.4:                               ## @.str.4
	.asciz	"no dump recorded"

L_.str.5:                               ## @.str.5
	.asciz	"MLX5_FWDUMP_GET dump fetch"

L_.str.6:                               ## @.str.6
	.asciz	"0x%08x\t0x%08x\n"

	.no_dead_strip	_mlx5tool_save_dump
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5tool_save_dump
_mlx5tool_save_dump:                    ; @mlx5tool_save_dump
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	cbz	x2, LBB0_8
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_fopen
	mov	x19, x0
	cbz	x19, LBB0_9
LBB0_2:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	w8, [x21]
	str	w8, [sp, #40]
Lloh2:
	adrp	x22, _MLX5_FWDUMP_GET@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MLX5_FWDUMP_GET@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #16
	mov	x0, x20
	bl	_ioctl
	cbz	w0, LBB0_11
; %bb.3:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_4:
	bl	_warn
LBB0_5:
	mov	w20, #1
LBB0_6:
Lloh6:
	adrp	x8, _stdout@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x19, x8
	b.eq	LBB0_10
; %bb.7:
	mov	x0, x19
	bl	_fclose
	b	LBB0_10
LBB0_8:
Lloh9:
	adrp	x8, _stdout@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh11:
	ldr	x19, [x8]
	cbnz	x19, LBB0_2
LBB0_9:
	str	x22, [sp]
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	mov	w20, #1
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_11:
	ldr	x0, [sp, #16]
	mov	w1, #8
	bl	_calloc
	cbz	x0, LBB0_15
; %bb.12:
	mov	x21, x0
	ldr	x8, [sp, #16]
	stp	x8, x0, [sp, #24]
	ldr	w1, [x22]
	add	x2, sp, #16
	mov	x0, x20
	bl	_ioctl
	cbz	w0, LBB0_16
; %bb.13:
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _ENOENT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.14:
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_warnx
	b	LBB0_5
LBB0_15:
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_4
LBB0_16:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_19
; %bb.17:
	mov	x22, #0
Lloh24:
	adrp	x20, l_.str.6@PAGE
Lloh25:
	add	x20, x20, l_.str.6@PAGEOFF
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldp	w2, w3, [x21], #8
	mov	x0, x19
	mov	x1, x20
	bl	_fprintf
	add	x22, x22, #1
	ldr	x8, [sp, #24]
	cmp	x22, x8
	b.lo	LBB0_18
LBB0_19:
	mov	w20, #0
	b	LBB0_6
LBB0_20:
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_stdout,8,3                     ; @stdout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w"

l_.str.1:                               ; @.str.1
	.asciz	"open %s"

	.comm	_MLX5_FWDUMP_GET,4,2            ; @MLX5_FWDUMP_GET
l_.str.2:                               ; @.str.2
	.asciz	"MLX5_FWDUMP_GET dumpsize"

l_.str.3:                               ; @.str.3
	.asciz	"alloc rege"

	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
l_.str.4:                               ; @.str.4
	.asciz	"no dump recorded"

l_.str.5:                               ; @.str.5
	.asciz	"MLX5_FWDUMP_GET dump fetch"

l_.str.6:                               ; @.str.6
	.asciz	"0x%08x\t0x%08x\n"

	.no_dead_strip	_mlx5tool_save_dump
.subsections_via_symbols
