	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_occ_setup                      ## -- Begin function occ_setup
	.p2align	4, 0x90
_occ_setup:                             ## @occ_setup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	addq	$20, %rdi
	callq	_mutex_init
	leaq	16(%rbx), %rax
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	%rbx, %rdi
	callq	_occ_poll
	movl	%eax, %r14d
	movq	_ESHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r14d, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	jmp	LBB0_13
LBB0_2:
	testl	%r14d, %r14d
	js	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_occ_parse_poll_response
	movq	%rbx, %rdi
	callq	_occ_setup_sensor_attrs
	movl	(%rbx), %edi
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_11
LBB0_3:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_11:
	movl	%r14d, %edx
LBB0_12:
	callq	_dev_err
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	8(%rbx), %rcx
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_devm_hwmon_device_register_with_groups
	movl	%eax, 4(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	4(%rbx), %edi
	callq	_PTR_ERR
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	jmp	LBB0_12
LBB0_8:
	movq	%rbx, %rdi
	callq	_occ_setup_sysfs
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_11
LBB0_9:
	xorl	%r14d, %r14d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ESHUTDOWN,4,2                  ## @ESHUTDOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"host is not ready\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to get OCC poll response: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to setup sensor attrs: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to register hwmon device: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to setup sysfs: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_occ_setup                      ; -- Begin function occ_setup
	.p2align	2
_occ_setup:                             ; @occ_setup
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x1
	mov	x20, x0
	add	x0, x0, #20
	bl	_mutex_init
	add	x8, x20, #16
	ldr	x9, [x20, #8]
	str	x8, [x9]
	mov	x0, x20
	bl	_occ_poll
	mov	x19, x0
Lloh0:
	adrp	x8, _ESHUTDOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ESHUTDOWN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	b	LBB0_11
LBB0_2:
	tbnz	w19, #31, LBB0_5
; %bb.3:
	mov	x0, x20
	bl	_occ_parse_poll_response
	mov	x0, x20
	bl	_occ_setup_sensor_attrs
	mov	x19, x0
	ldr	w0, [x20]
	cbz	w19, LBB0_6
; %bb.4:
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_5:
	ldr	w0, [x20]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_6:
	ldr	x3, [x20, #8]
	mov	x1, x21
	mov	x2, x20
	bl	_devm_hwmon_device_register_with_groups
	str	w0, [x20, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x20, #4]
	bl	_PTR_ERR
	mov	x19, x0
	ldr	w0, [x20]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_8:
	mov	x0, x20
	bl	_occ_setup_sysfs
	mov	x19, x0
	cbz	w0, LBB0_11
; %bb.9:
	ldr	w0, [x20]
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_10:
	mov	x2, x19
	bl	_dev_err
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ESHUTDOWN,4,2                  ; @ESHUTDOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"host is not ready\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to get OCC poll response: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to setup sensor attrs: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to register hwmon device: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to setup sysfs: %d\n"

.subsections_via_symbols
