	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cros_usbpd_charger_get_discovery_info
_cros_usbpd_charger_get_discovery_info: ## @cros_usbpd_charger_get_discovery_info
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	16(%rdi), %r12
	movl	8(%rdi), %eax
	movl	%eax, -40(%rbp)
	movq	_EC_CMD_USB_PD_DISCOVERY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$12, (%rsp)
	xorl	%r14d, %r14d
	leaq	-40(%rbp), %rcx
	leaq	-56(%rbp), %r9
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$4, %r8d
	callq	_cros_usbpd_charger_ec_command
	movl	(%r12), %edi
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	8(%r15), %edx
	movl	-56(%rbp), %ecx
	movl	-52(%rbp), %r8d
	movl	-48(%rbp), %r9d
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	movl	4(%r15), %edi
	movl	-56(%rbp), %ecx
	leaq	L_.str.2(%rip), %rbx
	movl	$4, %esi
	movq	%rbx, %rdx
	callq	_snprintf
	movl	(%r15), %edi
	movl	-52(%rbp), %ecx
	movl	$4, %esi
	movq	%rbx, %rdx
	callq	_snprintf
	jmp	LBB0_3
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movl	%ebx, %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_CMD_USB_PD_DISCOVERY,4,2    ## @EC_CMD_USB_PD_DISCOVERY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to query discovery info (err:0x%x)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Port %d: VID = 0x%x, PID=0x%x, PTYPE=0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"%x"

	.no_dead_strip	_cros_usbpd_charger_get_discovery_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cros_usbpd_charger_get_discovery_info
_cros_usbpd_charger_get_discovery_info: ; @cros_usbpd_charger_get_discovery_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	ldr	x21, [x0, #16]
	ldr	w8, [x0, #8]
	str	w8, [sp, #8]
Lloh0:
	adrp	x8, _EC_CMD_USB_PD_DISCOVERY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EC_CMD_USB_PD_DISCOVERY@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x3, sp, #8
	add	x5, sp, #16
	mov	x0, x21
	mov	w1, #0
	mov	w4, #4
	mov	w6, #12
	bl	_cros_usbpd_charger_ec_command
	mov	x20, x0
	ldr	w0, [x21]
	tbnz	w20, #31, LBB0_2
; %bb.1:
	ldr	w2, [x19, #8]
	ldp	w3, w4, [sp, #16]
	ldr	w5, [sp, #24]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x19, #4]
	ldr	w3, [sp, #16]
Lloh5:
	adrp	x20, l_.str.2@PAGE
Lloh6:
	add	x20, x20, l_.str.2@PAGEOFF
	mov	w1, #4
	mov	x2, x20
	bl	_snprintf
	ldr	w0, [x19]
	ldr	w3, [sp, #20]
	mov	w1, #4
	mov	x2, x20
	bl	_snprintf
	mov	w20, #0
	b	LBB0_3
LBB0_2:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
LBB0_3:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_CMD_USB_PD_DISCOVERY,4,2    ; @EC_CMD_USB_PD_DISCOVERY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to query discovery info (err:0x%x)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Port %d: VID = 0x%x, PID=0x%x, PTYPE=0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"%x"

	.no_dead_strip	_cros_usbpd_charger_get_discovery_info
.subsections_via_symbols
