	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_pci_vpd_offset
_niu_pci_vpd_offset:                    ## @niu_pci_vpd_offset
	.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	_ESPC_EEPROM_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	testq	%r13, %r13
	jle	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_niu_pci_eeprom_read16
	cmpl	$21930, %eax                    ## imm = 0x55AA
	jne	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rsi
	orq	$23, %rsi
	movq	%r15, %rdi
	callq	_niu_pci_eeprom_read16
	testl	%eax, %eax
	js	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ebx
	addq	%r12, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_niu_pci_eeprom_read16
	cmpl	$20547, %eax                    ## imm = 0x5043
	jne	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	2(%rbx), %rsi
	movq	%r15, %rdi
	callq	_niu_pci_eeprom_read16
	cmpl	$18770, %eax                    ## imm = 0x4952
	jne	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	20(%rbx), %rsi
	movq	%r15, %rdi
	callq	_niu_pci_eeprom_read
	testl	%eax, %eax
	js	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$1, %eax
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rsi
	orq	$2, %rsi
	movq	%r15, %rdi
	callq	_niu_pci_eeprom_read
	testl	%eax, %eax
	js	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	shll	$9, %eax
	cltq
	addq	%rax, %r12
	cmpq	%r13, %r12
	jl	LBB0_3
	jmp	LBB0_14
LBB0_1:
	xorl	%r14d, %r14d
LBB0_14:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	addq	$8, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_niu_pci_eeprom_read16_swp
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:
	movl	%eax, %eax
	addq	%rax, %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_niu_pci_eeprom_read
	xorl	%r14d, %r14d
	cmpl	$130, %eax
	cmoveq	%r12, %r14
	jmp	LBB0_14
LBB0_12:
	movslq	%eax, %r14
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ESPC_EEPROM_SIZE,8,3           ## @ESPC_EEPROM_SIZE
	.no_dead_strip	_niu_pci_vpd_offset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_pci_vpd_offset
_niu_pci_vpd_offset:                    ; @niu_pci_vpd_offset
	.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
Lloh0:
	adrp	x8, _ESPC_EEPROM_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ESPC_EEPROM_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	cmp	x22, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x19, x0
	mov	x20, #0
	mov	w23, #21930
	mov	w24, #23
	mov	w25, #20547
	mov	w26, #18770
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_niu_pci_eeprom_read16
	cmp	w0, w23
	b.ne	LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	orr	x1, x20, x24
	mov	x0, x19
	bl	_niu_pci_eeprom_read16
	tbnz	w0, #31, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x20, w0, uxtw
	mov	x0, x19
	mov	x1, x21
	bl	_niu_pci_eeprom_read16
	cmp	w0, w25
	b.ne	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x1, x21, #2
	mov	x0, x19
	bl	_niu_pci_eeprom_read16
	cmp	w0, w26
	b.ne	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x1, x21, #20
	mov	x0, x19
	bl	_niu_pci_eeprom_read
	tbnz	w0, #31, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, #1
	b.eq	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	orr	x1, x20, #0x2
	mov	x0, x19
	bl	_niu_pci_eeprom_read
	tbnz	w0, #31, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	lsl	w8, w0, #9
	add	x20, x20, w8, sxtw
	cmp	x20, x22
	b.lt	LBB0_2
LBB0_10:
	mov	x0, #0
LBB0_11:
	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
LBB0_12:
	add	x1, x21, #8
	mov	x0, x19
	bl	_niu_pci_eeprom_read16_swp
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_14
; %bb.13:
	add	x20, x20, w0, uxtw
	mov	x0, x19
	mov	x1, x20
	bl	_niu_pci_eeprom_read
	cmp	w0, #130
	csel	x0, x20, xzr, eq
	b	LBB0_11
LBB0_14:
	sxtw	x0, w0
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ESPC_EEPROM_SIZE,8,3           ; @ESPC_EEPROM_SIZE
	.no_dead_strip	_niu_pci_vpd_offset
.subsections_via_symbols
