	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function generic_ocp_write
_generic_ocp_write:                     ## @generic_ocp_write
	.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
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%r8, %r14
	movl	%ecx, %ebx
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	_RTL8152_UNPLUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	%r13, %rdi
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.4:
	movl	%ebx, %eax
	andl	$3, %eax
	jne	LBB0_7
## %bb.5:
	testb	$3, -64(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_7
## %bb.6:
	testq	%r14, %r14
	je	LBB0_7
## %bb.8:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	leal	(%rbx,%rsi), %eax
	cmpl	$65536, %eax                    ## imm = 0x10000
	jl	LBB0_9
LBB0_7:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_24:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_BYTE_EN_START_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%r12d, %edx
	movq	_BYTE_EN_END_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movl	%edx, %eax
	shll	$4, %eax
	orl	%r13d, %edx
	orl	%eax, %edx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$4, %ecx
	movq	%r14, %r8
	callq	_set_registers
	movq	%rbx, %rdx
	movl	%eax, %r15d
	cmpl	$4, %edx
	je	LBB0_22
## %bb.10:
	testl	%r15d, %r15d
	js	LBB0_22
## %bb.11:
	addq	$4, %r14
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	addl	$4, %r13d
	movl	%edx, %ebx
	addl	$-8, %ebx
	je	LBB0_20
## %bb.12:
	cmpl	$521, %edx                      ## imm = 0x209
	jl	LBB0_13
## %bb.14:
	addl	$504, %edx                      ## imm = 0x1F8
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdx, %rbx
	movq	_BYTE_EN_DWORD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%ecx, %edx
	movl	%r13d, %esi
	movl	$512, %ecx                      ## imm = 0x200
	movq	%r14, %r8
	callq	_set_registers
	testl	%eax, %eax
	js	LBB0_21
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	addl	$512, %r13d                     ## imm = 0x200
	addq	$512, %r14                      ## imm = 0x200
	movq	%rbx, %rdx
	addl	$-512, %edx                     ## imm = 0xFE00
	cmpl	$1024, %edx                     ## imm = 0x400
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jg	LBB0_15
## %bb.17:
	addl	$-512, %edx                     ## imm = 0xFE00
	movl	%edx, %ebx
	jmp	LBB0_18
LBB0_13:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_18:
	movq	_BYTE_EN_DWORD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%ecx, %edx
	movl	%r13d, %esi
	movl	%ebx, %ecx
	movq	%r14, %r8
	callq	_set_registers
	testl	%eax, %eax
	js	LBB0_21
## %bb.19:
	addl	%ebx, %r13d
	movslq	%ebx, %rax
	addq	%rax, %r14
LBB0_20:
	movl	%r12d, %eax
	sarl	$4, %eax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	orl	%r12d, %edx
	orl	%eax, %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movl	$4, %ecx
	movq	%r14, %r8
	callq	_set_registers
LBB0_21:
	movl	%eax, %r15d
LBB0_22:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	jne	LBB0_24
## %bb.23:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_rtl_set_unplug
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL8152_UNPLUG,4,2             ## @RTL8152_UNPLUG
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_BYTE_EN_START_MASK,4,2         ## @BYTE_EN_START_MASK
	.comm	_BYTE_EN_END_MASK,4,2           ## @BYTE_EN_END_MASK
	.comm	_BYTE_EN_DWORD,4,2              ## @BYTE_EN_DWORD
	.no_dead_strip	_generic_ocp_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function generic_ocp_write
_generic_ocp_write:                     ; @generic_ocp_write
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x5
	mov	x22, x4
	mov	x24, x3
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _RTL8152_UNPLUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTL8152_UNPLUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	cbz	w24, LBB0_7
; %bb.3:
	and	w8, w24, #0x3
	cbnz	w8, LBB0_7
; %bb.4:
	tst	w23, #0x3
	b.ne	LBB0_7
; %bb.5:
	cbz	x22, LBB0_7
; %bb.6:
	add	w8, w24, w23
	cmp	w8, #16, lsl #12                ; =65536
	b.lt	LBB0_10
LBB0_7:
Lloh5:
	adrp	x8, _EPERM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_9:
	mov	x0, x25
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh7:
	adrp	x8, _BYTE_EN_START_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BYTE_EN_START_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	and	w8, w8, w21
Lloh10:
	adrp	x9, _BYTE_EN_END_MASK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _BYTE_EN_END_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w27, [x9]
	orr	w9, w8, w20
	orr	w2, w9, w8, lsl #4
	mov	x0, x19
	mov	x1, x23
	mov	w3, #4
	mov	x4, x22
	bl	_set_registers
	mov	x25, x0
	cmp	w24, #4
	b.eq	LBB0_22
; %bb.11:
	tbnz	w25, #31, LBB0_22
; %bb.12:
	add	x22, x22, #4
	add	w23, w23, #4
	subs	w26, w24, #8
	b.eq	LBB0_20
; %bb.13:
Lloh13:
	adrp	x28, _BYTE_EN_DWORD@GOTPAGE
Lloh14:
	ldr	x28, [x28, _BYTE_EN_DWORD@GOTPAGEOFF]
	cmp	w24, #521
	b.lt	LBB0_18
; %bb.14:
	add	w24, w24, #504
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x28]
	orr	w2, w8, w20
	mov	x0, x19
	mov	x1, x23
	mov	w3, #512
	mov	x4, x22
	bl	_set_registers
	tbnz	w0, #31, LBB0_21
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	w23, w23, #512
	add	x22, x22, #512
	sub	w24, w24, #512
	cmp	w24, #1024
	b.gt	LBB0_15
; %bb.17:
	sub	w26, w24, #512
LBB0_18:
	ldr	w8, [x28]
	orr	w2, w8, w20
	mov	x0, x19
	mov	x1, x23
	mov	x3, x26
	mov	x4, x22
	bl	_set_registers
	tbnz	w0, #31, LBB0_21
; %bb.19:
	add	w23, w23, w26
	add	x22, x22, w26, sxtw
LBB0_20:
	and	w8, w27, w21
	orr	w9, w8, w20
	orr	w2, w9, w8, asr #4
	mov	x0, x19
	mov	x1, x23
	mov	w3, #4
	mov	x4, x22
	bl	_set_registers
LBB0_21:
	mov	x25, x0
LBB0_22:
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmn	w25, w8
	b.ne	LBB0_9
; %bb.23:
	mov	x0, x19
	bl	_rtl_set_unplug
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8152_UNPLUG,4,2             ; @RTL8152_UNPLUG
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_BYTE_EN_START_MASK,4,2         ; @BYTE_EN_START_MASK
	.comm	_BYTE_EN_END_MASK,4,2           ; @BYTE_EN_END_MASK
	.comm	_BYTE_EN_DWORD,4,2              ; @BYTE_EN_DWORD
	.no_dead_strip	_generic_ocp_write
.subsections_via_symbols
