	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rockchip_gpio_set
_rockchip_gpio_set:                     ## @rockchip_gpio_set
	.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
	movl	%edx, %r14d
	movl	%esi, %r13d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_gpiochip_get_data
	movq	%rax, %r15
	movq	8(%rax), %rax
	addl	(%r15), %r13d
	addl	(%rax), %r13d
	movq	_SYSCON_REG_BITS@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%edx, %ebx
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_BIT
	movl	%eax, %r12d
LBB0_2:
	addl	$16, %ebx
	movl	%ebx, %edi
	callq	_BIT
	movl	%eax, %ecx
	movl	4(%r15), %edi
	movl	%r13d, %eax
	xorl	%edx, %edx
	movq	_SYSCON_REG_BITS@GOTPCREL(%rip), %rsi
	divl	(%rsi)
	orl	%ecx, %r12d
	movq	_SYSCON_REG_SIZE@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movl	%eax, %esi
	movl	%r12d, %edx
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SYSCON_REG_BITS,4,2            ## @SYSCON_REG_BITS
	.comm	_SYSCON_REG_SIZE,4,2            ## @SYSCON_REG_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gpio write failed ret(%d)\n"

	.no_dead_strip	_rockchip_gpio_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rockchip_gpio_set
_rockchip_gpio_set:                     ; @rockchip_gpio_set
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
	bl	_gpiochip_get_data
	mov	x20, x0
	ldr	w8, [x0]
	ldr	x9, [x0, #8]
	ldr	w9, [x9]
	add	w8, w8, w21
	add	w23, w8, w9
Lloh0:
	adrp	x24, _SYSCON_REG_BITS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SYSCON_REG_BITS@GOTPAGEOFF]
	ldr	w8, [x24]
	udiv	w9, w23, w8
	msub	w21, w9, w8, w23
	cbz	w22, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_BIT
	mov	x22, x0
LBB0_2:
	add	w0, w21, #16
	bl	_BIT
	orr	w2, w0, w22
	ldr	w0, [x20, #4]
	ldr	w8, [x24]
	udiv	w8, w23, w8
Lloh2:
	adrp	x9, _SYSCON_REG_SIZE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SYSCON_REG_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	mul	w1, w9, w8
	bl	_regmap_write
	tbnz	w0, #31, LBB0_4
; %bb.3:
	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_4:
	mov	x2, x0
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_dev_err
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SYSCON_REG_BITS,4,2            ; @SYSCON_REG_BITS
	.comm	_SYSCON_REG_SIZE,4,2            ; @SYSCON_REG_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gpio write failed ret(%d)\n"

	.no_dead_strip	_rockchip_gpio_set
.subsections_via_symbols
