	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ec_bhf_open
_ec_bhf_open:                           ## @ec_bhf_open
	.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	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PRIV_TO_DEV
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_ec_bhf_reset
	movl	36(%rbx), %edx
	movq	_FIFO_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	shll	$2, %ecx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_ec_bhf_alloc_dma_mem
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	jmp	LBB0_5
LBB0_2:
	movq	%rbx, %rdi
	callq	_ec_bhf_setup_rx_descs
	leaq	28(%rbx), %rsi
	movl	24(%rbx), %edx
	movl	(%r13), %ecx
	shll	$2, %ecx
	movq	%rbx, %rdi
	callq	_ec_bhf_alloc_dma_mem
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	movq	%r12, %rdi
	movl	%ecx, %esi
	callq	_dma_free_coherent
	jmp	LBB0_5
LBB0_4:
	movq	_MII_MAC_FILT_FLAG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_iowrite8
	movq	%rbx, %rdi
	callq	_ec_bhf_setup_tx_descs
	movq	%r15, %rdi
	callq	_netif_start_queue
	movq	%rbx, %r15
	addq	$8, %r15
	movq	_CLOCK_MONOTONIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HRTIMER_MODE_REL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r15, %rdi
	callq	_hrtimer_init
	movq	_ec_bhf_timer_fun@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	_polling_frequency@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%r15, %rdi
	callq	_hrtimer_start
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIFO_SIZE,4,2                  ## @FIFO_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate rx buffer\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate tx buffer\n"

	.comm	_MII_MAC_FILT_FLAG,8,3          ## @MII_MAC_FILT_FLAG
	.comm	_CLOCK_MONOTONIC,4,2            ## @CLOCK_MONOTONIC
	.comm	_HRTIMER_MODE_REL,4,2           ## @HRTIMER_MODE_REL
	.comm	_ec_bhf_timer_fun,4,2           ## @ec_bhf_timer_fun
	.comm	_polling_frequency,4,2          ## @polling_frequency
	.no_dead_strip	_ec_bhf_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ec_bhf_open
_ec_bhf_open:                           ; @ec_bhf_open
	.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, x0
	bl	_netdev_priv
	mov	x19, x0
	bl	_PRIV_TO_DEV
	mov	x21, x0
	mov	x0, x19
	bl	_ec_bhf_reset
	ldr	w2, [x19, #36]
Lloh0:
	adrp	x23, _FIFO_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _FIFO_SIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	w3, w8, #2
	mov	x0, x19
	mov	x1, x19
	bl	_ec_bhf_alloc_dma_mem
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_ec_bhf_setup_rx_descs
	add	x1, x19, #28
	ldr	w2, [x19, #24]
	ldr	w8, [x23]
	lsl	w3, w8, #2
	mov	x0, x19
	bl	_ec_bhf_alloc_dma_mem
	mov	x22, x0
	cbz	w0, LBB0_4
; %bb.3:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	ldp	w1, w2, [x19]
	mov	x0, x21
	mov	x3, x1
	bl	_dma_free_coherent
	b	LBB0_5
LBB0_4:
	ldr	x8, [x19, #16]
Lloh6:
	adrp	x9, _MII_MAC_FILT_FLAG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MII_MAC_FILT_FLAG@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite8
	mov	x0, x19
	bl	_ec_bhf_setup_tx_descs
	mov	x0, x20
	bl	_netif_start_queue
	add	x20, x19, #8
Lloh9:
	adrp	x8, _CLOCK_MONOTONIC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CLOCK_MONOTONIC@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x21, _HRTIMER_MODE_REL@GOTPAGE
Lloh13:
	ldr	x21, [x21, _HRTIMER_MODE_REL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x20
	bl	_hrtimer_init
Lloh14:
	adrp	x8, _ec_bhf_timer_fun@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ec_bhf_timer_fun@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x19, #8]
Lloh17:
	adrp	x8, _polling_frequency@GOTPAGE
Lloh18:
	ldr	x8, [x8, _polling_frequency@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x0, x20
	bl	_hrtimer_start
LBB0_5:
	mov	x0, x22
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_FIFO_SIZE,4,2                  ; @FIFO_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate rx buffer\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate tx buffer\n"

	.comm	_MII_MAC_FILT_FLAG,8,3          ; @MII_MAC_FILT_FLAG
	.comm	_CLOCK_MONOTONIC,4,2            ; @CLOCK_MONOTONIC
	.comm	_HRTIMER_MODE_REL,4,2           ; @HRTIMER_MODE_REL
	.comm	_ec_bhf_timer_fun,4,2           ; @ec_bhf_timer_fun
	.comm	_polling_frequency,4,2          ; @polling_frequency
	.no_dead_strip	_ec_bhf_open
.subsections_via_symbols
