	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ether3_setbuffer
_ether3_setbuffer:                      ## @ether3_setbuffer
	.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
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_priv
	movq	_CFG1_LOCBUFMEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	4(%rax), %edi
	movq	_REG_CONFIG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ether3_outw
	movq	%rbx, %rdi
	callq	_priv
	movq	_CMD_FIFOWRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	8(%rax), %edi
	movq	_REG_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ether3_outw
	movq	_REG_STATUS@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_ether3_inw
	movq	_STAT_FIFOEMPTY@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	jne	LBB0_5
## %bb.1:
	movl	$-1001, %r14d                   ## imm = 0xFC17
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	incl	%r14d
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	(%r12), %edi
	callq	_ether3_inw
	testl	%eax, (%r13)
	je	LBB0_2
LBB0_5:
	movq	_buffer_read@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_7
## %bb.6:
	movq	_REG_DMAADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_ether3_outw
	movq	%rbx, %rdi
	callq	_priv
	movq	_CMD_FIFOREAD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	8(%rax), %edi
	movq	_REG_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_8
LBB0_7:
	movq	%rbx, %rdi
	callq	_priv
	movq	_CMD_FIFOWRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	8(%rax), %edi
	movq	_REG_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ether3_outw
	movq	_REG_DMAADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
LBB0_8:
	callq	_ether3_outw
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_3:
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_printk
	movq	%rbx, %rdi
	callq	_priv
	movl	$1, (%rax)
	movl	$1, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CFG1_LOCBUFMEM,4,2             ## @CFG1_LOCBUFMEM
	.comm	_REG_CONFIG1,4,2                ## @REG_CONFIG1
	.comm	_CMD_FIFOWRITE,4,2              ## @CMD_FIFOWRITE
	.comm	_REG_COMMAND,4,2                ## @REG_COMMAND
	.comm	_REG_STATUS,4,2                 ## @REG_STATUS
	.comm	_STAT_FIFOEMPTY,4,2             ## @STAT_FIFOEMPTY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: setbuffer broken\n"

	.comm	_buffer_read,8,3                ## @buffer_read
	.comm	_REG_DMAADDR,4,2                ## @REG_DMAADDR
	.comm	_CMD_FIFOREAD,4,2               ## @CMD_FIFOREAD
	.no_dead_strip	_ether3_setbuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ether3_setbuffer
_ether3_setbuffer:                      ; @ether3_setbuffer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_priv
Lloh0:
	adrp	x8, _CFG1_LOCBUFMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CFG1_LOCBUFMEM@GOTPAGEOFF]
	ldr	w9, [x0, #4]
Lloh2:
	ldr	w8, [x8]
	orr	w0, w8, w9
Lloh3:
	adrp	x8, _REG_CONFIG1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_CONFIG1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_ether3_outw
	mov	x0, x20
	bl	_priv
Lloh6:
	adrp	x23, _CMD_FIFOWRITE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _CMD_FIFOWRITE@GOTPAGEOFF]
	ldr	w8, [x0, #8]
	ldr	w9, [x23]
	orr	w0, w9, w8
Lloh8:
	adrp	x22, _REG_COMMAND@GOTPAGE
Lloh9:
	ldr	x22, [x22, _REG_COMMAND@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_ether3_outw
Lloh10:
	adrp	x24, _REG_STATUS@GOTPAGE
Lloh11:
	ldr	x24, [x24, _REG_STATUS@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_ether3_inw
Lloh12:
	adrp	x25, _STAT_FIFOEMPTY@GOTPAGE
Lloh13:
	ldr	x25, [x25, _STAT_FIFOEMPTY@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.1:
	mov	w26, #-1001
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	adds	w26, w26, #1
	b.hs	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w0, [x24]
	bl	_ether3_inw
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_2
LBB0_4:
Lloh14:
	adrp	x8, _buffer_read@GOTPAGE
Lloh15:
	ldr	x8, [x8, _buffer_read@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x8, x21
	b.ne	LBB0_6
; %bb.5:
Lloh17:
	adrp	x8, _REG_DMAADDR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _REG_DMAADDR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ether3_outw
	mov	x0, x20
	bl	_priv
	ldr	w8, [x0, #8]
Lloh20:
	adrp	x9, _CMD_FIFOREAD@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CMD_FIFOREAD@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	w1, [x22]
	b	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_priv
	ldr	w8, [x0, #8]
	ldr	w9, [x23]
	orr	w0, w9, w8
	ldr	w1, [x22]
	bl	_ether3_outw
Lloh23:
	adrp	x8, _REG_DMAADDR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _REG_DMAADDR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
LBB0_7:
	bl	_ether3_outw
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	ldr	w1, [x20]
Lloh26:
	adrp	x0, l_.str@PAGE
Lloh27:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	mov	x0, x20
	bl	_priv
	mov	x8, x0
	mov	w0, #1
	str	w0, [x8]
LBB0_9:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_CFG1_LOCBUFMEM,4,2             ; @CFG1_LOCBUFMEM
	.comm	_REG_CONFIG1,4,2                ; @REG_CONFIG1
	.comm	_CMD_FIFOWRITE,4,2              ; @CMD_FIFOWRITE
	.comm	_REG_COMMAND,4,2                ; @REG_COMMAND
	.comm	_REG_STATUS,4,2                 ; @REG_STATUS
	.comm	_STAT_FIFOEMPTY,4,2             ; @STAT_FIFOEMPTY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: setbuffer broken\n"

	.comm	_buffer_read,8,3                ; @buffer_read
	.comm	_REG_DMAADDR,4,2                ; @REG_DMAADDR
	.comm	_CMD_FIFOREAD,4,2               ; @CMD_FIFOREAD
	.no_dead_strip	_ether3_setbuffer
.subsections_via_symbols
