	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_firmware_block
_write_firmware_block:                  ## @write_firmware_block
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	8(%rdi), %rdi
	movq	8(%rdi), %rbx
	callq	_mutex_lock
	movq	_MXL_HYDRA_PLID_REG_WRITE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	leaq	4(%r15), %rax
	movq	%rax, 8(%rbx)
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_GET_BYTE
	movq	%rax, 16(%rbx)
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_GET_BYTE
	movq	%rax, 24(%rbx)
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_GET_BYTE
	movq	%rax, 32(%rbx)
	movq	%r13, %rdi
	movl	$3, %esi
	callq	_GET_BYTE
	movq	%rax, 40(%rbx)
	leaq	48(%rbx), %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_memcpy
	movq	_MXL_HYDRA_I2C_HDR_SIZE@GOTPCREL(%rip), %rax
	movq	_MXL_HYDRA_REG_SIZE_IN_BYTES@GOTPCREL(%rip), %rcx
	addq	(%rax), %r15
	addq	(%rcx), %r15
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_i2cwrite
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MXL_HYDRA_PLID_REG_WRITE,8,3   ## @MXL_HYDRA_PLID_REG_WRITE
	.comm	_MXL_HYDRA_I2C_HDR_SIZE,8,3     ## @MXL_HYDRA_I2C_HDR_SIZE
	.comm	_MXL_HYDRA_REG_SIZE_IN_BYTES,8,3 ## @MXL_HYDRA_REG_SIZE_IN_BYTES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fw block write failed\n"

	.no_dead_strip	_write_firmware_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_firmware_block
_write_firmware_block:                  ; @write_firmware_block
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x0, [x0, #8]
	ldr	x23, [x0, #8]
	bl	_mutex_lock
Lloh0:
	adrp	x8, _MXL_HYDRA_PLID_REG_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MXL_HYDRA_PLID_REG_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x9, x21, #4
	stp	x8, x9, [x23]
	mov	x0, x22
	mov	w1, #0
	bl	_GET_BYTE
	str	x0, [x23, #16]
	mov	x0, x22
	mov	w1, #1
	bl	_GET_BYTE
	str	x0, [x23, #24]
	mov	x0, x22
	mov	w1, #2
	bl	_GET_BYTE
	str	x0, [x23, #32]
	mov	x0, x22
	mov	w1, #3
	bl	_GET_BYTE
	str	x0, [x23, #40]
	add	x0, x23, #48
	mov	x1, x20
	mov	x2, x21
	bl	_memcpy
Lloh3:
	adrp	x8, _MXL_HYDRA_I2C_HDR_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MXL_HYDRA_I2C_HDR_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _MXL_HYDRA_REG_SIZE_IN_BYTES@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MXL_HYDRA_REG_SIZE_IN_BYTES@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x8, x8, x21
	add	x2, x8, x9
	mov	x0, x19
	mov	x1, x23
	bl	_i2cwrite
	mov	x20, x0
	ldr	x0, [x19, #8]
	bl	_mutex_unlock
	cbz	w20, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MXL_HYDRA_PLID_REG_WRITE,8,3   ; @MXL_HYDRA_PLID_REG_WRITE
	.comm	_MXL_HYDRA_I2C_HDR_SIZE,8,3     ; @MXL_HYDRA_I2C_HDR_SIZE
	.comm	_MXL_HYDRA_REG_SIZE_IN_BYTES,8,3 ; @MXL_HYDRA_REG_SIZE_IN_BYTES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fw block write failed\n"

	.no_dead_strip	_write_firmware_block
.subsections_via_symbols
