	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_lookup_gpio    ## -- Begin function amdgpu_atombios_lookup_gpio
	.p2align	4, 0x90
_amdgpu_atombios_lookup_gpio:           ## @amdgpu_atombios_lookup_gpio
	.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
	movq	%rdx, %r13
	movq	%rdi, %r14
	movq	(%rsi), %r15
	movq	_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GPIO_Pin_LUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetIndexIntoMasterTable
	movl	%eax, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	$0, (%r14)
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %r9
	movq	%r15, %rdi
	movl	%r12d, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_amdgpu_atom_parse_data_header
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movslq	-44(%rbp), %rcx
	movabsq	$68719476732, %rax              ## imm = 0xFFFFFFFFC
	addq	%rcx, %rax
	shrq	$4, %rax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	movslq	-48(%rbp), %rcx
	movslq	(%r15), %rdx
	movq	(%rcx,%rdx), %rbx
	addq	$12, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r13, -12(%rbx)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	subq	$-128, %rbx
	decl	%eax
	jne	LBB0_3
	jmp	LBB0_6
LBB0_4:
	movq	%r13, 8(%r14)
	movl	(%rbx), %edi
	callq	_le16_to_cpu
	movl	%eax, 24(%r14)
	movl	-4(%rbx), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	movl	%ecx, 16(%r14)
	movl	%eax, 20(%r14)
	movl	$1, (%r14)
LBB0_6:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DATA,4,2                       ## @DATA
	.comm	_GPIO_Pin_LUT,4,2               ## @GPIO_Pin_LUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_lookup_gpio    ; -- Begin function amdgpu_atombios_lookup_gpio
	.p2align	2
_amdgpu_atombios_lookup_gpio:           ; @amdgpu_atombios_lookup_gpio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x8
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _GPIO_Pin_LUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPIO_Pin_LUT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_GetIndexIntoMasterTable
	mov	x22, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	str	wzr, [x19]
	add	x2, sp, #8
	add	x5, sp, #12
	mov	x0, x21
	mov	x1, x22
	mov	x3, #0
	mov	x4, #0
	bl	_amdgpu_atom_parse_data_header
	cbz	x0, LBB0_6
; %bb.1:
	ldrsw	x8, [sp, #8]
	mov	x9, #68719476732
	add	x8, x8, x9
	lsr	x8, x8, #4
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	ldrsw	x9, [sp, #12]
	ldrsw	x10, [x21]
	ldr	x9, [x9, x10]
	add	x21, x9, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x9, [x21, #-8]
	cmp	x9, x20
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #128
	subs	w8, w8, #1
	b.ne	LBB0_3
	b	LBB0_6
LBB0_5:
	str	x20, [x19, #8]
	ldr	w0, [x21, #4]
	bl	_le16_to_cpu
	str	w0, [x19, #24]
	ldr	w8, [x21]
	mov	w9, #1
	lsl	w10, w9, w8
	stp	w8, w10, [x19, #16]
	str	w9, [x19]
LBB0_6:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DATA,4,2                       ; @DATA
	.comm	_GPIO_Pin_LUT,4,2               ; @GPIO_Pin_LUT
.subsections_via_symbols
