	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gswip_gphy_fw_load
_gswip_gphy_fw_load:                    ## @gswip_gphy_fw_load
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movl	12(%rsi), %edi
	callq	_clk_prepare_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movl	(%r12), %edi
	callq	_reset_control_assert
	movl	8(%r12), %esi
	leaq	-48(%rbp), %rdi
	movq	%r15, %rdx
	callq	_request_firmware
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	movl	8(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	-48(%rbp), %rax
	movq	_XRX200_GPHY_FW_ALIGN@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	addq	(%rax), %rsi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-52(%rbp), %rdx
	movq	%r15, %rdi
	callq	_dmam_alloc_coherent
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	(%r13), %rsi
	movq	%rax, %rdi
	callq	_PTR_ALIGN
	movq	%rax, %rbx
	movl	-52(%rbp), %edi
	movq	(%r13), %rsi
	callq	_ALIGN
	movl	%eax, %r15d
	movq	-48(%rbp), %rax
	movl	8(%rax), %esi
	movq	(%rax), %rdx
	movq	%rbx, %rdi
	callq	_memcpy
	movq	-48(%rbp), %rdi
	callq	_release_firmware
	movl	(%r14), %edi
	movl	4(%r12), %esi
	movl	%r15d, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movl	(%r12), %edi
	callq	_reset_control_deassert
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	-48(%rbp), %rdi
	callq	_release_firmware
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to load firmware: %s, error: %i\n"

	.comm	_XRX200_GPHY_FW_ALIGN,8,3       ## @XRX200_GPHY_FW_ALIGN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"failed to alloc firmware memory\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_gswip_gphy_fw_load
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gswip_gphy_fw_load
_gswip_gphy_fw_load:                    ; @gswip_gphy_fw_load
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	mov	x20, x0
	ldr	x21, [x0, #8]
	ldr	w0, [x1, #12]
	bl	_clk_prepare_enable
	mov	x22, x0
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	w0, [x19]
	bl	_reset_control_assert
	ldr	w1, [x19, #8]
	add	x0, sp, #24
	mov	x2, x21
	bl	_request_firmware
	cbz	w0, LBB0_4
; %bb.2:
	mov	x22, x0
	ldr	w8, [x19, #8]
	stp	x8, x22, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_3:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_4:
	ldr	x8, [sp, #24]
Lloh2:
	adrp	x22, _XRX200_GPHY_FW_ALIGN@GOTPAGE
Lloh3:
	ldr	x22, [x22, _XRX200_GPHY_FW_ALIGN@GOTPAGEOFF]
	ldr	x8, [x8]
	ldr	x9, [x22]
	add	x1, x9, x8
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	add	x2, sp, #20
	mov	x0, x21
	bl	_dmam_alloc_coherent
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x1, [x22]
	bl	_PTR_ALIGN
	mov	x21, x0
	ldr	w0, [sp, #20]
	ldr	x1, [x22]
	bl	_ALIGN
	mov	x22, x0
	ldr	x8, [sp, #24]
	ldr	w1, [x8, #8]
	ldr	x2, [x8]
	mov	x0, x21
	bl	_memcpy
	ldr	x0, [sp, #24]
	bl	_release_firmware
	ldr	w0, [x20]
	ldr	w1, [x19, #4]
	mov	x2, x22
	bl	_regmap_write
	mov	x22, x0
	cbnz	w0, LBB0_3
; %bb.6:
	ldr	w0, [x19]
	bl	_reset_control_deassert
	b	LBB0_3
LBB0_7:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	ldr	x0, [sp, #24]
	bl	_release_firmware
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to load firmware: %s, error: %i\n"

	.comm	_XRX200_GPHY_FW_ALIGN,8,3       ; @XRX200_GPHY_FW_ALIGN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"failed to alloc firmware memory\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_gswip_gphy_fw_load
.subsections_via_symbols
