	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function role_store
_role_store:                            ## @role_store
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r15
	callq	_dev_get_drvdata
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_rcar_gen3_is_any_rphy_initialized
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	leaq	L_.str(%rip), %r12
	movq	%r12, %rdi
	callq	_strlen
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	leaq	L_.str.1(%rip), %r12
	movq	%r12, %rdi
	callq	_strlen
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	_PHY_MODE_USB_DEVICE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_PHY_MODE_USB_HOST@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %r12d
	movq	%r14, %rdi
	callq	_rcar_gen3_check_id
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_rcar_gen3_get_phy_mode
	cmpl	%r12d, %eax
	jne	LBB0_10
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
LBB0_17:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_PHY_MODE_USB_HOST@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_14
## %bb.11:
	movq	%r14, %rdi
	testl	%r15d, %r15d
	je	LBB0_12
## %bb.13:
	callq	_rcar_gen3_init_for_b_host
	jmp	LBB0_17
LBB0_14:
	movq	%r14, %rdi
	testl	%r15d, %r15d
	je	LBB0_15
## %bb.16:
	callq	_rcar_gen3_init_for_peri
	jmp	LBB0_17
LBB0_12:
	callq	_rcar_gen3_init_from_a_peri_to_a_host
	jmp	LBB0_17
LBB0_15:
	callq	_rcar_gen3_init_for_a_peri
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,8,3                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"host"

	.comm	_PHY_MODE_USB_HOST,4,2          ## @PHY_MODE_USB_HOST
L_.str.1:                               ## @.str.1
	.asciz	"peripheral"

	.comm	_PHY_MODE_USB_DEVICE,4,2        ## @PHY_MODE_USB_DEVICE
	.comm	_EINVAL,8,3                     ## @EINVAL
	.no_dead_strip	_role_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function role_store
_role_store:                            ; @role_store
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x21, x2
	bl	_dev_get_drvdata
	ldr	w8, [x0]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x20, x0
	bl	_rcar_gen3_is_any_rphy_initialized
	cbz	w0, LBB0_5
; %bb.2:
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
	mov	x0, x22
	bl	_strlen
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_strncmp
Lloh2:
	adrp	x23, _PHY_MODE_USB_HOST@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PHY_MODE_USB_HOST@GOTPAGEOFF]
	cbz	w0, LBB0_6
; %bb.3:
Lloh4:
	adrp	x22, l_.str.1@PAGE
Lloh5:
	add	x22, x22, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_strlen
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_strncmp
	cbnz	w0, LBB0_8
; %bb.4:
Lloh6:
	adrp	x8, _PHY_MODE_USB_DEVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PHY_MODE_USB_DEVICE@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	mov	x8, x23
LBB0_7:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_rcar_gen3_check_id
	mov	x21, x0
	mov	x0, x20
	bl	_rcar_gen3_get_phy_mode
	cmp	w0, w22
	b.ne	LBB0_11
LBB0_8:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_10:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	w8, [x23]
	mov	x0, x20
	cmp	w22, w8
	b.ne	LBB0_14
; %bb.12:
	cbz	w21, LBB0_16
; %bb.13:
	bl	_rcar_gen3_init_for_b_host
	b	LBB0_10
LBB0_14:
	cbz	w21, LBB0_17
; %bb.15:
	bl	_rcar_gen3_init_for_peri
	b	LBB0_10
LBB0_16:
	bl	_rcar_gen3_init_from_a_peri_to_a_host
	b	LBB0_10
LBB0_17:
	bl	_rcar_gen3_init_for_a_peri
	b	LBB0_10
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,8,3                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"host"

	.comm	_PHY_MODE_USB_HOST,4,2          ; @PHY_MODE_USB_HOST
l_.str.1:                               ; @.str.1
	.asciz	"peripheral"

	.comm	_PHY_MODE_USB_DEVICE,4,2        ; @PHY_MODE_USB_DEVICE
	.comm	_EINVAL,8,3                     ; @EINVAL
	.no_dead_strip	_role_store
.subsections_via_symbols
