	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pch_phub_bin_read
_pch_phub_bin_read:                     ## @pch_phub_bin_read
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movl	%r8d, %r13d
	movq	%rcx, %r12
	movq	%rsi, %rdi
	callq	_kobj_to_dev
	movl	%eax, %edi
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	_pch_phub_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock_interruptible
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_2:
	movl	4(%r14), %edi
	leaq	-56(%rbp), %rsi
	callq	_pci_map_rom
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	8(%r14), %rsi
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_pch_phub_read_serial_rom
	movzbl	-48(%rbp), %eax
	movl	%eax, -48(%rbp)
	movq	8(%r14), %rsi
	incq	%rsi
	leaq	-52(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_pch_phub_read_serial_rom
	movl	-52(%rbp), %eax
	shll	$8, %eax
	movzwl	%ax, %eax
	orl	-48(%rbp), %eax
	movl	%eax, -48(%rbp)
	cmpl	$43605, %eax                    ## imm = 0xAA55
	jne	LBB0_11
## %bb.5:
	movq	8(%r14), %rsi
	addq	$2, %rsi
	leaq	-41(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_pch_phub_read_serial_rom
	movzbl	-41(%rbp), %eax
	shlq	$9, %rax
	cmpl	%r13d, %eax
	jb	LBB0_10
## %bb.6:
	cmpq	%r15, %rax
	jb	LBB0_10
## %bb.7:
	testq	%r15, %r15
	je	LBB0_10
## %bb.8:
	movl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%r13), %rsi
	addq	8(%r14), %rsi
	movq	%rbx, %rdx
	addq	%r12, %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_pch_phub_read_serial_rom
	incl	%ebx
	cmpq	%r15, %rbx
	jb	LBB0_9
LBB0_10:
	movl	(%r14), %esi
	movl	4(%r14), %edi
	callq	_pci_unmap_rom
	movq	_pch_phub_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_14
LBB0_3:
	movq	_ENODATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_12
LBB0_11:
	movq	_ENODATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r14), %esi
	movl	4(%r14), %edi
	callq	_pci_unmap_rom
LBB0_12:
	movq	_pch_phub_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_13:
	negl	%ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pch_phub_mutex,4,2             ## @pch_phub_mutex
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_ENODATA,4,2                    ## @ENODATA
	.no_dead_strip	_pch_phub_bin_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pch_phub_bin_read
_pch_phub_bin_read:                     ; @pch_phub_bin_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x5
	mov	x22, x4
	mov	x21, x3
	mov	x0, x1
	bl	_kobj_to_dev
	bl	_dev_get_drvdata
	mov	x19, x0
Lloh0:
	adrp	x0, _pch_phub_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _pch_phub_mutex@GOTPAGEOFF]
	bl	_mutex_lock_interruptible
	cbz	w0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh4:
	ldr	w20, [x8]
	b	LBB0_13
LBB0_2:
	ldr	w0, [x19, #4]
	add	x1, sp, #16
	bl	_pci_map_rom
	str	w0, [x19]
	cbz	w0, LBB0_10
; %bb.3:
	ldr	x1, [x19, #8]
	add	x8, sp, #28
	str	x8, [sp]
	mov	x0, x19
	bl	_pch_phub_read_serial_rom
	ldrb	w8, [sp, #28]
	str	w8, [sp, #28]
	ldr	x8, [x19, #8]
	add	x1, x8, #1
	add	x8, sp, #20
	str	x8, [sp]
	mov	x0, x19
	bl	_pch_phub_read_serial_rom
	ldr	w8, [sp, #20]
	ubfiz	w8, w8, #8, #8
	ldr	w9, [sp, #28]
	orr	w8, w8, w9
	str	w8, [sp, #28]
	mov	w9, #43605
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.4:
	ldr	x8, [x19, #8]
	add	x1, x8, #2
	add	x8, sp, #27
	str	x8, [sp]
	mov	x0, x19
	bl	_pch_phub_read_serial_rom
	mov	w23, #0
	ldrb	w8, [sp, #27]
	lsl	x8, x8, #9
	cmp	w8, w22
	b.lo	LBB0_9
; %bb.5:
	cmp	x8, x20
	b.lo	LBB0_9
; %bb.6:
	cbz	x20, LBB0_9
; %bb.7:
	mov	x23, #0
	mov	w22, w22
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x9, x23, x22
	add	x1, x9, x8
	add	x8, x21, x23
	str	x8, [sp]
	mov	x0, x19
	bl	_pch_phub_read_serial_rom
	add	w23, w23, #1
	cmp	x23, x20
	b.lo	LBB0_8
LBB0_9:
	ldp	w1, w0, [x19]
	bl	_pci_unmap_rom
Lloh5:
	adrp	x0, _pch_phub_mutex@GOTPAGE
Lloh6:
	ldr	x0, [x0, _pch_phub_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	b	LBB0_14
LBB0_10:
Lloh7:
	adrp	x8, _ENODATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
Lloh9:
	ldr	w20, [x8]
	b	LBB0_12
LBB0_11:
Lloh10:
	adrp	x8, _ENODATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
Lloh12:
	ldr	w20, [x8]
	ldp	w1, w0, [x19]
	bl	_pci_unmap_rom
LBB0_12:
Lloh13:
	adrp	x0, _pch_phub_mutex@GOTPAGE
Lloh14:
	ldr	x0, [x0, _pch_phub_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_13:
	neg	w23, w20
LBB0_14:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_pch_phub_mutex,4,2             ; @pch_phub_mutex
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_ENODATA,4,2                    ; @ENODATA
	.no_dead_strip	_pch_phub_bin_read
.subsections_via_symbols
