	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_load_fw
_mlx4_load_fw:                          ## @mlx4_load_fw
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_mlx4_priv
	movq	%rax, %r15
	movl	4(%rax), %esi
	movq	_GFP_HIGHUSER@GOTPCREL(%rip), %rax
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_mlx4_alloc_icm
	movl	%eax, (%r15)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_mlx4_MAP_FA
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_mlx4_err
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_mlx4_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_4:
	movq	%rbx, %rdi
	callq	_mlx4_RUN_FW
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_mlx4_err
	movq	%rbx, %rdi
	callq	_mlx4_UNMAP_FA
LBB0_7:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mlx4_free_icm
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%r14d, %r14d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_HIGHUSER,4,2               ## @GFP_HIGHUSER
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't allocate FW area, aborting\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"MAP_FA command failed, aborting\n"

L_.str.2:                               ## @.str.2
	.asciz	"RUN_FW command failed, aborting\n"

	.no_dead_strip	_mlx4_load_fw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_load_fw
_mlx4_load_fw:                          ; @mlx4_load_fw
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	bl	_mlx4_priv
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_HIGHUSER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_HIGHUSER@GOTPAGEOFF]
	ldr	w1, [x0, #4]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, ___GFP_NOWARN@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___GFP_NOWARN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	mov	w3, #0
	bl	_mlx4_alloc_icm
	str	w0, [x20]
	cbz	w0, LBB0_3
; %bb.1:
	mov	x1, x0
	mov	x0, x19
	bl	_mlx4_MAP_FA
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mlx4_err
	b	LBB0_6
LBB0_3:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mlx4_err
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_mlx4_RUN_FW
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.5:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_mlx4_err
	mov	x0, x19
	bl	_mlx4_UNMAP_FA
LBB0_6:
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_mlx4_free_icm
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_HIGHUSER,4,2               ; @GFP_HIGHUSER
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't allocate FW area, aborting\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"MAP_FA command failed, aborting\n"

l_.str.2:                               ; @.str.2
	.asciz	"RUN_FW command failed, aborting\n"

	.no_dead_strip	_mlx4_load_fw
.subsections_via_symbols
