	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function em2800_i2c_check_for_device
_em2800_i2c_check_for_device:           ## @em2800_i2c_check_for_device
	.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, %r15
	movb	%sil, -25(%rbp)
	leaq	-25(%rbp), %rdx
	movl	$4, %esi
	movl	$1, %ecx
	callq	*(%rdi)
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movb	$-124, -25(%rbp)
	leaq	-25(%rbp), %rdx
	movq	%r15, %rdi
	movl	$5, %esi
	movl	$1, %ecx
	callq	*(%r15)
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_EM2800_I2C_WRITE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.6:
	addl	$5, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	$5, %esi
	callq	*8(%r15)
	cmpl	$132, %eax
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$148, %eax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	$5, %edi
	callq	_msleep
	addl	$-5, %ebx
	cmpl	$5, %ebx
	jg	LBB0_7
LBB0_9:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_1:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	movl	%r14d, %esi
	callq	_em28xx_warn
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%r14d, %r14d
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setting i2c device address failed (error=%i)\n"

L_.str.1:                               ## @.str.1
	.asciz	"preparing i2c read failed (error=%i)\n"

	.comm	_EM2800_I2C_WRITE_TIMEOUT,4,2   ## @EM2800_I2C_WRITE_TIMEOUT
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_em2800_i2c_check_for_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function em2800_i2c_check_for_device
_em2800_i2c_check_for_device:           ; @em2800_i2c_check_for_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	strb	w1, [sp, #15]
	ldr	x8, [x0]
	add	x2, sp, #15
	mov	w1, #4
	mov	w3, #1
	blr	x8
	tbnz	w0, #31, LBB0_8
; %bb.1:
	mov	w8, #132
	strb	w8, [sp, #15]
	ldr	x8, [x19]
	add	x2, sp, #15
	mov	x0, x19
	mov	w1, #5
	mov	w3, #1
	blr	x8
	tbnz	w0, #31, LBB0_9
; %bb.2:
Lloh0:
	adrp	x8, _EM2800_I2C_WRITE_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EM2800_I2C_WRITE_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	add	w20, w8, #5
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	mov	x0, x19
	mov	w1, #5
	blr	x8
	cmp	w0, #132
	b.eq	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w0, #148
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #5
	bl	_msleep
	sub	w20, w20, #5
	cmp	w20, #5
	b.gt	LBB0_4
LBB0_7:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_8:
	mov	x20, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_10
LBB0_9:
	mov	x20, x0
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_10:
	mov	x1, x20
	bl	_em28xx_warn
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_12:
	mov	w20, #0
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setting i2c device address failed (error=%i)\n"

l_.str.1:                               ; @.str.1
	.asciz	"preparing i2c read failed (error=%i)\n"

	.comm	_EM2800_I2C_WRITE_TIMEOUT,4,2   ; @EM2800_I2C_WRITE_TIMEOUT
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_em2800_i2c_check_for_device
.subsections_via_symbols
