	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_i2c_init       ## -- Begin function amdgpu_atombios_i2c_init
	.p2align	4, 0x90
_amdgpu_atombios_i2c_init:              ## @amdgpu_atombios_i2c_init
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	16(%rdi), %rbx
	movq	_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GPIO_I2C_Info@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetIndexIntoMasterTable
	leaq	-84(%rbp), %rdx
	leaq	-88(%rbp), %r9
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_amdgpu_atom_parse_data_header
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movslq	-84(%rbp), %rcx
	movabsq	$17179869180, %rax              ## imm = 0x3FFFFFFFC
	addq	%rcx, %rax
	shrq	$2, %rax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	movslq	-88(%rbp), %rcx
	movslq	(%rbx), %rdx
	movq	(%rcx,%rdx), %r15
	movl	%eax, %r12d
	xorl	%ebx, %ebx
	leaq	-80(%rbp), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	$16, %r15
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_amdgpu_atombios_lookup_i2c_gpio_quirks
	movq	%r15, %rdi
	callq	_amdgpu_atombios_get_bus_rec_for_i2c_gpio
	movl	%eax, -104(%rbp)
	movq	%rdx, -96(%rbp)
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_sprintf
	movl	(%r14), %edi
	leaq	-104(%rbp), %rsi
	movq	%r13, %rdx
	callq	_amdgpu_i2c_create
	movq	8(%r14), %rcx
	movl	%eax, (%rcx,%rbx,4)
	jmp	LBB0_5
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DATA,4,2                       ## @DATA
	.comm	_GPIO_I2C_Info,4,2              ## @GPIO_I2C_Info
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0x%x"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_i2c_init       ; -- Begin function amdgpu_atombios_i2c_init
	.p2align	2
_amdgpu_atombios_i2c_init:              ; @amdgpu_atombios_i2c_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	x21, [x0, #16]
Lloh3:
	adrp	x8, _DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DATA@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _GPIO_I2C_Info@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GPIO_I2C_Info@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_GetIndexIntoMasterTable
	mov	x1, x0
	mov	x2, sp
	add	x5, sp, #4
	mov	x0, x21
	mov	x3, #0
	mov	x4, #0
	bl	_amdgpu_atom_parse_data_header
	cbz	x0, LBB0_6
; %bb.1:
	ldrsw	x8, [sp]
	mov	x9, #17179869180
	add	x8, x8, x9
	lsr	x9, x8, #2
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x20, #0
	ldrsw	x9, [sp, #4]
	ldrsw	x10, [x21]
	ldr	x21, [x9, x10]
	ubfx	x23, x8, #2, #32
Lloh9:
	adrp	x22, l_.str@PAGE
Lloh10:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #16
	add	x20, x20, #1
	cmp	x23, x20
	b.eq	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_amdgpu_atombios_lookup_i2c_gpio_quirks
	mov	x0, x21
	bl	_amdgpu_atombios_get_bus_rec_for_i2c_gpio
	stp	x0, x1, [sp, #8]
	cbz	x1, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x2, x0
	add	x0, sp, #24
	mov	x1, x22
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_sprintf
	ldr	w0, [x19]
	add	x1, sp, #8
	add	x2, sp, #24
	bl	_amdgpu_i2c_create
	ldr	x8, [x19, #8]
	str	w0, [x8, x20, lsl #2]
	b	LBB0_3
LBB0_6:
	ldr	x8, [sp, #56]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DATA,4,2                       ; @DATA
	.comm	_GPIO_I2C_Info,4,2              ; @GPIO_I2C_Info
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0x%x"

.subsections_via_symbols
