	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bba_devpoll
_bba_devpoll:                           ## @bba_devpoll
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_UIP_LOG
	xorl	%eax, %eax
	callq	_gettime
	movq	_bba_arp_tmr@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	%rax, %rsi
	callq	_diff_msec
	movq	_UIP_ARP_TMRINTERVAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_uip_arp_timer
	xorl	%eax, %eax
	callq	_gettime
	movq	%rax, (%rbx)
LBB0_2:
	movl	$0, (%r14)
	movq	_EXI_CHANNEL_0@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_EXI_DEVICE_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_EXI_Lock
	cmpl	$1, %eax
	jne	LBB0_14
## %bb.3:
	movl	$3, %edi
	callq	_bba_cmd_in8
	testl	%eax, %eax
	je	LBB0_18
## %bb.4:
	movl	%eax, %ebx
	movq	_BBA_CMD_IRMASKALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edi
	callq	_bba_cmd_out8
	testb	$-128, %bl
	jne	LBB0_10
## %bb.5:
	testb	$64, %bl
	jne	LBB0_11
## %bb.6:
	testb	$32, %bl
	jne	LBB0_12
## %bb.7:
	testb	$16, %bl
	jne	LBB0_13
## %bb.8:
	movl	%ebx, %eax
	shll	$8, %eax
	orl	%eax, (%r14)
	testb	$8, %bl
	jne	LBB0_15
## %bb.9:
	movq	%r14, %rdi
	callq	_bba_interrupt
	jmp	LBB0_17
LBB0_10:
	shll	$8, %ebx
	orl	%ebx, (%r14)
	movq	%r14, %rdi
	callq	_bba_interrupt
	movl	$3, %edi
	movl	$128, %esi
	jmp	LBB0_16
LBB0_11:
	shll	$8, %ebx
	orl	%ebx, (%r14)
	movq	_bba_netif@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___bba_init
	movl	$3, %edi
	movl	$64, %esi
	jmp	LBB0_16
LBB0_12:
	shll	$8, %ebx
	orl	%ebx, (%r14)
	movl	$3, %edi
	movl	$32, %esi
	jmp	LBB0_16
LBB0_13:
	shll	$8, %ebx
	orl	%ebx, (%r14)
	movq	_bba_device@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$5, %edi
	callq	_bba_cmd_out8
	leaq	-28(%rbp), %rsi
	movl	$8, %edi
	movl	$4, %edx
	callq	_bba_cmd_ins
	movq	_bba_netif@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-28(%rbp), %esi
	callq	_bba_calc_response
	movl	%eax, -32(%rbp)
	leaq	-32(%rbp), %rsi
	movl	$9, %edi
	movl	$4, %edx
	callq	_bba_cmd_outs
	movl	$3, %edi
	movl	$16, %esi
	callq	_bba_cmd_out8
	movq	_BBA_CMD_IRMASKNONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edi
	callq	_bba_cmd_out8
	movl	(%r15), %edi
	callq	_EXI_Unlock
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	$3, %edi
	movl	$8, %esi
LBB0_16:
	callq	_bba_cmd_out8
LBB0_17:
	movq	_BBA_CMD_IRMASKNONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edi
	callq	_bba_cmd_out8
LBB0_18:
	movl	(%r15), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_EXI_Unlock                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bba_devpoll()\n"

	.comm	_bba_arp_tmr,8,3                ## @bba_arp_tmr
	.comm	_UIP_ARP_TMRINTERVAL,8,3        ## @UIP_ARP_TMRINTERVAL
	.comm	_EXI_CHANNEL_0,4,2              ## @EXI_CHANNEL_0
	.comm	_EXI_DEVICE_2,4,2               ## @EXI_DEVICE_2
	.comm	_BBA_CMD_IRMASKALL,4,2          ## @BBA_CMD_IRMASKALL
	.comm	_BBA_CMD_IRMASKNONE,4,2         ## @BBA_CMD_IRMASKNONE
	.comm	_bba_netif,4,2                  ## @bba_netif
	.comm	_bba_device,4,2                 ## @bba_device
	.no_dead_strip	_bba_devpoll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bba_devpoll
_bba_devpoll:                           ; @bba_devpoll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_UIP_LOG
	bl	_gettime
	mov	x1, x0
Lloh2:
	adrp	x20, _bba_arp_tmr@GOTPAGE
Lloh3:
	ldr	x20, [x20, _bba_arp_tmr@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_diff_msec
Lloh4:
	adrp	x8, _UIP_ARP_TMRINTERVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _UIP_ARP_TMRINTERVAL@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x0, x8
	b.lt	LBB0_2
; %bb.1:
	bl	_uip_arp_timer
	bl	_gettime
	str	x0, [x20]
LBB0_2:
	str	wzr, [x19]
Lloh7:
	adrp	x21, _EXI_CHANNEL_0@GOTPAGE
Lloh8:
	ldr	x21, [x21, _EXI_CHANNEL_0@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh9:
	adrp	x8, _EXI_DEVICE_2@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EXI_DEVICE_2@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_EXI_Lock
	cmp	w0, #1
	b.ne	LBB0_14
; %bb.3:
	mov	w0, #3
	bl	_bba_cmd_in8
	cbz	w0, LBB0_18
; %bb.4:
	mov	x20, x0
Lloh12:
	adrp	x8, _BBA_CMD_IRMASKALL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BBA_CMD_IRMASKALL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	w0, #2
	bl	_bba_cmd_out8
	tbnz	w20, #7, LBB0_10
; %bb.5:
	tbnz	w20, #6, LBB0_11
; %bb.6:
	tbnz	w20, #5, LBB0_12
; %bb.7:
	tbnz	w20, #4, LBB0_13
; %bb.8:
	ldr	w8, [x19]
	orr	w8, w8, w20, lsl #8
	str	w8, [x19]
	tbnz	w20, #3, LBB0_15
; %bb.9:
	mov	x0, x19
	bl	_bba_interrupt
	b	LBB0_17
LBB0_10:
	ldr	w8, [x19]
	orr	w8, w8, w20, lsl #8
	str	w8, [x19]
	mov	x0, x19
	bl	_bba_interrupt
	mov	w0, #3
	mov	w1, #128
	b	LBB0_16
LBB0_11:
	ldr	w8, [x19]
	orr	w8, w8, w20, lsl #8
	str	w8, [x19]
Lloh15:
	adrp	x8, _bba_netif@GOTPAGE
Lloh16:
	ldr	x8, [x8, _bba_netif@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	___bba_init
	mov	w0, #3
	mov	w1, #64
	b	LBB0_16
LBB0_12:
	ldr	w8, [x19]
	orr	w8, w8, w20, lsl #8
	str	w8, [x19]
	mov	w0, #3
	mov	w1, #32
	b	LBB0_16
LBB0_13:
	ldr	w8, [x19]
	orr	w8, w8, w20, lsl #8
	str	w8, [x19]
Lloh18:
	adrp	x8, _bba_device@GOTPAGE
Lloh19:
	ldr	x8, [x8, _bba_device@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	w0, #5
	bl	_bba_cmd_out8
	add	x1, sp, #8
	mov	w0, #8
	mov	w2, #4
	bl	_bba_cmd_ins
Lloh21:
	adrp	x8, _bba_netif@GOTPAGE
Lloh22:
	ldr	x8, [x8, _bba_netif@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	w1, [sp, #8]
	bl	_bba_calc_response
	str	w0, [sp, #12]
	add	x1, sp, #12
	mov	w0, #9
	mov	w2, #4
	bl	_bba_cmd_outs
	mov	w0, #3
	mov	w1, #16
	bl	_bba_cmd_out8
Lloh24:
	adrp	x8, _BBA_CMD_IRMASKNONE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BBA_CMD_IRMASKNONE@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	w0, #2
	bl	_bba_cmd_out8
	ldr	w0, [x21]
	bl	_EXI_Unlock
LBB0_14:
	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
	add	sp, sp, #64
	ret
LBB0_15:
	mov	w0, #3
	mov	w1, #8
LBB0_16:
	bl	_bba_cmd_out8
LBB0_17:
Lloh27:
	adrp	x8, _BBA_CMD_IRMASKNONE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _BBA_CMD_IRMASKNONE@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	w0, #2
	bl	_bba_cmd_out8
LBB0_18:
	ldr	w0, [x21]
	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
	add	sp, sp, #64
	b	_EXI_Unlock
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bba_devpoll()\n"

	.comm	_bba_arp_tmr,8,3                ; @bba_arp_tmr
	.comm	_UIP_ARP_TMRINTERVAL,8,3        ; @UIP_ARP_TMRINTERVAL
	.comm	_EXI_CHANNEL_0,4,2              ; @EXI_CHANNEL_0
	.comm	_EXI_DEVICE_2,4,2               ; @EXI_DEVICE_2
	.comm	_BBA_CMD_IRMASKALL,4,2          ; @BBA_CMD_IRMASKALL
	.comm	_BBA_CMD_IRMASKNONE,4,2         ; @BBA_CMD_IRMASKNONE
	.comm	_bba_netif,4,2                  ; @bba_netif
	.comm	_bba_device,4,2                 ; @bba_device
	.no_dead_strip	_bba_devpoll
.subsections_via_symbols
