	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r8a7795_pin_to_pocctrl
_r8a7795_pin_to_pocctrl:                ## @r8a7795_pin_to_pocctrl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	_pinmux_ioctrl_regs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_POCCTRL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, (%rdx)
	movl	$3, %edi
	xorl	%esi, %esi
	callq	_RCAR_GP_PIN
	cmpl	%ebx, %eax
	ja	LBB0_2
## %bb.1:
	movl	$3, %edi
	movl	$11, %esi
	callq	_RCAR_GP_PIN
	movl	%ebx, %ecx
	andl	$31, %ecx
	cmpl	%ebx, %eax
	cmovael	%ecx, %r14d
LBB0_2:
	movl	$4, %edi
	xorl	%esi, %esi
	callq	_RCAR_GP_PIN
	cmpl	%ebx, %eax
	ja	LBB0_5
## %bb.3:
	movl	$4, %edi
	movl	$17, %esi
	callq	_RCAR_GP_PIN
	cmpl	%ebx, %eax
	jb	LBB0_5
## %bb.4:
	andl	$31, %ebx
	addl	$12, %ebx
	movl	%ebx, %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_pinmux_ioctrl_regs,8,3         ## @pinmux_ioctrl_regs
	.comm	_POCCTRL,8,3                    ## @POCCTRL
	.no_dead_strip	_r8a7795_pin_to_pocctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r8a7795_pin_to_pocctrl
_r8a7795_pin_to_pocctrl:                ; @r8a7795_pin_to_pocctrl
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
Lloh3:
	adrp	x8, _pinmux_ioctrl_regs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _pinmux_ioctrl_regs@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _POCCTRL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _POCCTRL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x2]
	mov	w0, #3
	mov	w1, #0
	bl	_RCAR_GP_PIN
	cmp	w0, w20
	b.hi	LBB0_2
; %bb.1:
	mov	w0, #3
	mov	w1, #11
	bl	_RCAR_GP_PIN
	and	w8, w20, #0x1f
	cmp	w0, w20
	csel	w19, w19, w8, lo
LBB0_2:
	mov	w0, #4
	mov	w1, #0
	bl	_RCAR_GP_PIN
	cmp	w0, w20
	b.hi	LBB0_4
; %bb.3:
	mov	w0, #4
	mov	w1, #17
	bl	_RCAR_GP_PIN
	and	w8, w20, #0x1f
	add	w8, w8, #12
	cmp	w0, w20
	csel	w19, w19, w8, lo
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_pinmux_ioctrl_regs,8,3         ; @pinmux_ioctrl_regs
	.comm	_POCCTRL,8,3                    ; @POCCTRL
	.no_dead_strip	_r8a7795_pin_to_pocctrl
.subsections_via_symbols
