	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipack_device_init              ## -- Begin function ipack_device_init
	.p2align	4, 0x90
_ipack_device_init:                     ## @ipack_device_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_ipack_bus_type@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rdi)
	movq	_ipack_device_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rdi)
	movq	16(%rdi), %rax
	movl	12(%rax), %ecx
	movl	%ecx, (%rdi)
	movl	8(%rax), %edx
	movl	32(%rdi), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_dev_set_name
	movq	%rbx, %rdi
	callq	_device_initialize
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
LBB0_2:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
LBB0_4:
	movq	%rbx, %rdi
	callq	_ipack_device_read_id
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	cmpq	$0, 24(%rbx)
	je	LBB0_7
## %bb.8:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	%rbx, %rdi
	movl	$32, %esi
	callq	*(%rax)
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jns	LBB0_11
## %bb.9:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_10
LBB0_5:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rsi
LBB0_10:
	movq	%rbx, %rdi
	callq	_dev_err
	jmp	LBB0_11
LBB0_7:
	xorl	%r14d, %r14d
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ipack_bus_type,4,2             ## @ipack_bus_type
	.comm	_ipack_device_release,4,2       ## @ipack_device_release
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ipack-dev.%u.%u"

L_.str.1:                               ## @.str.1
	.asciz	"failed to switch to 8 MHz operation for reading of device ID.\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to reset potential timeout."

L_.str.3:                               ## @.str.3
	.asciz	"error reading device id section.\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to switch to 32 MHz operation.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipack_device_init              ; -- Begin function ipack_device_init
	.p2align	2
_ipack_device_init:                     ; @ipack_device_init
	.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	x19, x0
Lloh0:
	adrp	x8, _ipack_bus_type@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ipack_bus_type@GOTPAGEOFF]
	str	x8, [x0, #8]
Lloh2:
	adrp	x8, _ipack_device_release@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ipack_device_release@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	x9, [x0, #16]
	ldp	w2, w10, [x9, #8]
	stp	w10, w8, [x0]
	ldr	w3, [x0, #32]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_set_name
	mov	x0, x19
	bl	_device_initialize
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	w1, #8
	blr	x8
	cbz	w0, LBB0_2
; %bb.1:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_2:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_4:
	mov	x0, x19
	bl	_ipack_device_read_id
	tbnz	w0, #31, LBB0_8
; %bb.5:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.6:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	w1, #32
	blr	x8
	mov	w20, #0
	tbz	w0, #31, LBB0_11
; %bb.7:
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_9
LBB0_8:
	mov	x20, x0
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_11
LBB0_10:
	mov	w20, #0
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ipack_bus_type,4,2             ; @ipack_bus_type
	.comm	_ipack_device_release,4,2       ; @ipack_device_release
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ipack-dev.%u.%u"

l_.str.1:                               ; @.str.1
	.asciz	"failed to switch to 8 MHz operation for reading of device ID.\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to reset potential timeout."

l_.str.3:                               ; @.str.3
	.asciz	"error reading device id section.\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to switch to 32 MHz operation.\n"

.subsections_via_symbols
