	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pc8736x_gpio_set
_pc8736x_gpio_set:                      ## @pc8736x_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	%edi, %ebx
	movl	%edi, %r15d
	andl	$31, %r15d
	movl	%r15d, %r14d
	shrl	$3, %r14d
	movq	_pc8736x_gpio_base@GOTPCREL(%rip), %r13
	movq	_port_offset@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r14,8), %rdi
	addq	(%r13), %rdi
	andl	$7, %ebx
	movq	_PORT_OUT@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	movq	%rax, %r12
	callq	_inb_p
	movl	%eax, %ecx
	movq	_pdev@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_port_offset@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r14,8), %edx
	addl	(%r13), %edx
	addl	(%r12), %edx
	movl	%ecx, %eax
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r13d
	btrl	%ebx, %r13d
	movq	-56(%rbp), %r10                 ## 8-byte Reload
	movl	%r10d, %r12d
	movl	%ebx, %ecx
	shll	%cl, %r12d
	leaq	L_.str(%rip), %rsi
	movl	%eax, %ecx
	movl	%ebx, %r8d
	movl	%r13d, %r9d
	xorl	%eax, %eax
	pushq	%r12
	pushq	%r10
	callq	_dev_dbg
	addq	$16, %rsp
	orl	%r13d, %r12d
	movq	_pdev@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	%ebx, %r8d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	xorl	%eax, %eax
	pushq	%r12
	callq	_dev_dbg
	addq	$16, %rsp
	movq	_port_offset@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rax,%r14,8), %rsi
	movq	_pc8736x_gpio_base@GOTPCREL(%rip), %rbx
	addq	(%rbx), %rsi
	movq	_PORT_OUT@GOTPCREL(%rip), %r13
	addq	(%r13), %rsi
	movl	%r12d, %edi
	callq	_outb_p
	movq	(%r15), %rax
	movq	(%rax,%r14,8), %rdi
	addq	(%rbx), %rdi
	addq	(%r13), %rdi
	callq	_inb_p
	movq	(%r15), %rcx
	movq	(%rcx,%r14,8), %rdi
	addq	(%rbx), %rdi
	movl	%eax, %r15d
	movq	_PORT_IN@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_inb_p
	movl	%eax, %ebx
	movq	_pdev@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_pc8736x_gpio_shadow@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, (%rax,%r14,4)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pc8736x_gpio_base,8,3          ## @pc8736x_gpio_base
	.comm	_port_offset,8,3                ## @port_offset
	.comm	_PORT_OUT,8,3                   ## @PORT_OUT
	.comm	_pdev,8,3                       ## @pdev
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"addr:%x cur:%x bit-pos:%d cur-bit:%x + new:%d -> bit-new:%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"gpio_set(minor:%d port:%d bit:%d) %2x -> %2x\n"

	.comm	_PORT_IN,8,3                    ## @PORT_IN
L_.str.2:                               ## @.str.2
	.asciz	"wrote %x, read: %x\n"

	.comm	_pc8736x_gpio_shadow,8,3        ## @pc8736x_gpio_shadow
	.no_dead_strip	_pc8736x_gpio_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pc8736x_gpio_set
_pc8736x_gpio_set:                      ; @pc8736x_gpio_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	and	w8, w0, #0x1f
	str	w8, [sp, #44]                   ; 4-byte Folded Spill
	ubfx	w19, w0, #3, #2
	and	w28, w0, #0x7
Lloh0:
	adrp	x23, _pc8736x_gpio_base@GOTPAGE
Lloh1:
	ldr	x23, [x23, _pc8736x_gpio_base@GOTPAGEOFF]
Lloh2:
	adrp	x24, _port_offset@GOTPAGE
Lloh3:
	ldr	x24, [x24, _port_offset@GOTPAGEOFF]
	ldr	x8, [x24]
	lsl	x25, x19, #3
	ldr	x8, [x8, x25]
	ldr	x9, [x23]
Lloh4:
	adrp	x27, _PORT_OUT@GOTPAGE
Lloh5:
	ldr	x27, [x27, _PORT_OUT@GOTPAGEOFF]
	ldr	x10, [x27]
	add	x8, x8, x9
	add	x0, x8, x10
	bl	_inb_p
	mov	x22, x0
Lloh6:
	adrp	x8, _pdev@GOTPAGE
Lloh7:
	ldr	x8, [x8, _pdev@GOTPAGEOFF]
Lloh8:
	ldr	x0, [x8]
	ldr	w8, [x23]
	ldr	x9, [x24]
	ldr	w9, [x9, x25]
	ldr	w10, [x27]
	add	w8, w9, w8
	add	w2, w8, w10
	mov	w8, #1
	lsl	w8, w8, w28
	bic	w26, w22, w8
	lsl	w20, w21, w28
	stp	x21, x20, [sp, #16]
	stp	x28, x26, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x22
	bl	_dev_dbg
	orr	w21, w26, w20
Lloh11:
	adrp	x26, _pdev@GOTPAGE
Lloh12:
	ldr	x26, [x26, _pdev@GOTPAGEOFF]
	ldr	x0, [x26]
	stp	x22, x21, [sp, #8]
	str	x28, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	ldr	w2, [sp, #44]                   ; 4-byte Folded Reload
	mov	x3, x19
	bl	_dev_dbg
	ldr	x8, [x23]
	ldr	x9, [x24]
	ldr	x9, [x9, x25]
	ldr	x10, [x27]
	add	x8, x9, x8
	add	x1, x8, x10
	mov	x0, x21
	bl	_outb_p
	ldr	x8, [x23]
	ldr	x9, [x24]
	ldr	x9, [x9, x25]
	ldr	x10, [x27]
	add	x8, x9, x8
	add	x0, x8, x10
	bl	_inb_p
	mov	x20, x0
	ldr	x8, [x24]
	ldr	x8, [x8, x25]
	ldr	x9, [x23]
Lloh15:
	adrp	x10, _PORT_IN@GOTPAGE
Lloh16:
	ldr	x10, [x10, _PORT_IN@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	add	x8, x8, x9
	add	x0, x8, x10
	bl	_inb_p
	mov	x21, x0
	ldr	x0, [x26]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	mov	x3, x21
	bl	_dev_dbg
Lloh20:
	adrp	x8, _pc8736x_gpio_shadow@GOTPAGE
Lloh21:
	ldr	x8, [x8, _pc8736x_gpio_shadow@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	str	w21, [x8, w19, uxtw #2]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_pc8736x_gpio_base,8,3          ; @pc8736x_gpio_base
	.comm	_port_offset,8,3                ; @port_offset
	.comm	_PORT_OUT,8,3                   ; @PORT_OUT
	.comm	_pdev,8,3                       ; @pdev
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"addr:%x cur:%x bit-pos:%d cur-bit:%x + new:%d -> bit-new:%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"gpio_set(minor:%d port:%d bit:%d) %2x -> %2x\n"

	.comm	_PORT_IN,8,3                    ; @PORT_IN
l_.str.2:                               ; @.str.2
	.asciz	"wrote %x, read: %x\n"

	.comm	_pc8736x_gpio_shadow,8,3        ; @pc8736x_gpio_shadow
	.no_dead_strip	_pc8736x_gpio_set
.subsections_via_symbols
