	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_hwmon_open
_tg3_hwmon_open:                        ## @tg3_hwmon_open
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	8(%rdi), %r14
	movq	_TG3_SD_NUM_RECS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	shlq	$4, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_tg3_sd_scan_scratchpad
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.1:
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.2:
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
LBB0_9:
	testb	$1, %al
	je	LBB0_12
## %bb.10:
	shlq	$4, %rcx
	movq	(%r12,%rcx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	addq	%rbx, %rax
	addq	8(%r12,%rcx), %rax
	movq	%rax, %rbx
LBB0_12:
	testq	%rbx, %rbx
	je	LBB0_17
## %bb.13:
	movq	_tg3_group@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_sysfs_create_group
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_17
LBB0_3:
	movl	%eax, %esi
	andl	$-2, %esi
	leaq	24(%r12), %rdi
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$2, %rcx
	addq	$32, %rdi
	cmpq	%rcx, %rsi
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-24(%rdi), %rdx
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	addq	%rbx, %rdx
	addq	-16(%rdi), %rdx
	movq	%rdx, %rbx
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-8(%rdi), %rdx
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	addq	%rbx, %rdx
	addq	(%rdi), %rdx
	movq	%rdx, %rbx
	jmp	LBB0_8
LBB0_15:
	movq	%r14, %rdi
	callq	_hwmon_device_register
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	$0, (%r15)
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_tg3_group@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_sysfs_remove_group
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TG3_SD_NUM_RECS,4,2            ## @TG3_SD_NUM_RECS
	.comm	_tg3_group,4,2                  ## @tg3_group
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot create sysfs group, aborting\n"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot register hwmon device, aborting\n"

	.no_dead_strip	_tg3_hwmon_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_hwmon_open
_tg3_hwmon_open:                        ; @tg3_hwmon_open
	.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
	sub	sp, sp, #16
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x19, [x0, #8]
Lloh3:
	adrp	x22, _TG3_SD_NUM_RECS@GOTPAGE
Lloh4:
	ldr	x22, [x22, _TG3_SD_NUM_RECS@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	x8, x8, #4
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x21, x9, x8
	mov	sp, x21
	mov	x1, x21
	bl	_tg3_sd_scan_scratchpad
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x9, #0
	add	x10, x21, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #16
	subs	x8, x8, #1
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x11, [x10, #-8]
	cbz	x11, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x12, [x10]
	add	x9, x11, x9
	add	x9, x9, x12
	b	LBB0_2
LBB0_5:
	cbz	x9, LBB0_10
; %bb.6:
Lloh7:
	adrp	x1, _tg3_group@GOTPAGE
Lloh8:
	ldr	x1, [x1, _tg3_group@GOTPAGEOFF]
	mov	x0, x19
	bl	_sysfs_create_group
	cbz	w0, LBB0_8
; %bb.7:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_hwmon_device_register
	str	x0, [x20]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.9:
	str	xzr, [x20]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh13:
	adrp	x1, _tg3_group@GOTPAGE
Lloh14:
	ldr	x1, [x1, _tg3_group@GOTPAGEOFF]
	mov	x0, x19
	bl	_sysfs_remove_group
LBB0_10:
	ldur	x8, [x29, #-40]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #32
	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
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_TG3_SD_NUM_RECS,4,2            ; @TG3_SD_NUM_RECS
	.comm	_tg3_group,4,2                  ; @tg3_group
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot create sysfs group, aborting\n"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot register hwmon device, aborting\n"

	.no_dead_strip	_tg3_hwmon_open
.subsections_via_symbols
