	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	$0, -56(%rbp)
	cmpl	$9, %edi
	jl	LBB0_2
## %bb.1:
	imull	$-858993459, %edi, %eax         ## imm = 0xCCCCCCCD
	addl	$-858993460, %eax               ## imm = 0xCCCCCCCC
	cmpl	$858993460, %eax                ## imm = 0x33333334
	jb	LBB0_3
LBB0_2:
	movq	(%r14), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_str(%rip), %rdi
	callq	_puts
LBB0_15:
	movl	$1, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%edi, -68(%rbp)                 ## 4-byte Spill
	movq	8(%r14), %rax
	movq	_ifname@GOTPCREL(%rip), %r12
	movq	%rax, (%r12)
	movq	16(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	leaq	-48(%rbp), %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_15
## %bb.4:
	movq	24(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	leaq	-44(%rbp), %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_15
## %bb.5:
	movq	_LOG_PID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LOG_DAEMON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rdi
	callq	_openlog
	movq	_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r12), %rdx
	movl	-48(%rbp), %ecx
	movl	-44(%rbp), %r8d
	leaq	L_.str.4(%rip), %rsi
	callq	_syslog
	movl	$4, %r15d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	$32, %edi
	movl	$1, %esi
	callq	_calloc
	movq	%rax, %r13
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, 24(%rbx)
	jmp	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rax
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.2(%rip), %rbx
	leaq	16(%r13), %rdi
	movq	(%r14,%r15,8), %rsi
	callq	_init_led
	testq	%rax, %rax
	jne	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r14,%r15,8), %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	16(%r14,%r15,8), %rdi
	leaq	4(%r13), %rdx
	movq	%rbx, %rsi
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	24(%r14,%r15,8), %rdi
	leaq	8(%r13), %rdx
	movq	%rbx, %rsi
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	32(%r14,%r15,8), %rdi
	movq	%r13, %rdx
	addq	$12, %rdx
	movq	%rbx, %rsi
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	addq	$5, %r15
	movq	%r13, %rbx
	cmpl	-68(%rbp), %r15d                ## 4-byte Folded Reload
	jl	LBB0_7
## %bb.16:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_log_rules
	movl	$-1, %r13d
	leaq	-56(%rbp), %r14
	movq	_BACKEND_RETRY_DELAY@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	-48(%rbp), %edi
	callq	_usleep
	movq	-56(%rbp), %rdi
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rsi
	callq	_quality
	movl	%eax, %ebx
	movl	-44(%rbp), %eax
	movl	%r13d, %ecx
	subl	%eax, %ecx
	addl	%r13d, %eax
	cmpl	%ecx, %ebx
	jl	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpl	%eax, %ebx
	jle	LBB0_20
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_update_leds
	movl	%ebx, %r13d
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	cmpl	$-1, %ebx
	jne	LBB0_26
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpl	$-1, %r13d
	jne	LBB0_26
## %bb.22:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpq	$0, -56(%rbp)
	je	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_17 Depth=1
	xorl	%eax, %eax
	callq	_iwinfo_finish
	movq	$0, -56(%rbp)
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	(%r15), %edi
	callq	_usleep
LBB0_25:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	(%r12), %rsi
	movq	%r14, %rdi
	callq	_open_backend
	testq	%rax, %rax
	jne	LBB0_24
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"syntax: %s (ifname) (refresh) (threshold) (rule) [rule] ...\n"

	.comm	_ifname,8,3                     ## @ifname
L_.str.2:                               ## @.str.2
	.asciz	"%d"

L_.str.3:                               ## @.str.3
	.asciz	"rssileds"

	.comm	_LOG_PID,4,2                    ## @LOG_PID
	.comm	_LOG_DAEMON,4,2                 ## @LOG_DAEMON
	.comm	_LOG_INFO,4,2                   ## @LOG_INFO
L_.str.4:                               ## @.str.4
	.asciz	"monitoring %s, refresh rate %d, threshold %d\n"

	.comm	_BACKEND_RETRY_DELAY,4,2        ## @BACKEND_RETRY_DELAY
L_str:                                  ## @str
	.asciz	"  rule: (sysfs-name) (minq) (maxq) (offset) (factore)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	str	xzr, [sp, #16]
	cmp	w0, #9
	b.lt	LBB0_2
; %bb.1:
	mov	x20, x0
	mov	w8, #52429
	movk	w8, #52428, lsl #16
	mov	w9, #-858993460
	madd	w8, w0, w8, w9
	mov	w9, #13108
	movk	w9, #13107, lsl #16
	cmp	w8, w9
	b.lo	LBB0_4
LBB0_2:
	ldr	x8, [x21]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
Lloh2:
	adrp	x0, l_str@PAGE
Lloh3:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
LBB0_3:
	mov	w0, #1
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_4:
Lloh4:
	adrp	x23, _ifname@GOTPAGE
Lloh5:
	ldr	x23, [x23, _ifname@GOTPAGEOFF]
	ldp	x8, x0, [x21, #8]
	str	x8, [x23]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #28
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.5:
	ldr	x0, [x21, #24]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #24
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.6:
Lloh10:
	adrp	x8, _LOG_PID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LOG_PID@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _LOG_DAEMON@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LOG_DAEMON@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_openlog
Lloh18:
	adrp	x8, _LOG_INFO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LOG_INFO@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	x2, [x23]
	ldp	w4, w3, [sp, #24]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_syslog
	mov	x26, #0
	mov	x19, #0
	add	x24, x21, #64
	mov	w25, #4
Lloh23:
	adrp	x21, l_.str.2@PAGE
Lloh24:
	add	x21, x21, l_.str.2@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #32
	mov	w1, #1
	bl	_calloc
	mov	x22, x0
	cbz	x26, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x22, [x26, #24]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x19, x22
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x0, x22, #16
	ldur	x1, [x24, #-32]
	bl	_init_led
	cbnz	x0, LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldur	x0, [x24, #-24]
	mov	x1, x21
	mov	x2, x22
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	ldur	x0, [x24, #-16]
	add	x2, x22, #4
	mov	x1, x21
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	ldur	x0, [x24, #-8]
	add	x2, x22, #8
	mov	x1, x21
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x24]
	add	x2, x22, #12
	mov	x1, x21
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	add	w25, w25, #5
	add	x24, x24, #40
	mov	x26, x22
	cmp	w25, w20
	b.lt	LBB0_7
; %bb.16:
	mov	x0, x19
	bl	_log_rules
	mov	x0, #0
	mov	w22, #-1
Lloh25:
	adrp	x21, _BACKEND_RETRY_DELAY@GOTPAGE
Lloh26:
	ldr	x21, [x21, _BACKEND_RETRY_DELAY@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	w0, [sp, #28]
	bl	_usleep
	ldr	x0, [sp, #16]
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x23]
	bl	_quality
	mov	x20, x0
	ldr	w8, [sp, #24]
	add	w9, w8, w22
	sub	w8, w22, w8
	cmp	w0, w8
	ccmp	w0, w9, #0, ge
	b.le	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_update_leds
	mov	x22, x20
LBB0_20:                                ;   in Loop: Header=BB0_18 Depth=1
	cmn	w20, #1
	ccmn	w22, #1, #0, eq
	b.ne	LBB0_17
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_18 Depth=1
	bl	_iwinfo_finish
	str	xzr, [sp, #16]
LBB0_23:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	w0, [x21]
	bl	_usleep
LBB0_24:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	x1, [x23]
	add	x0, sp, #16
	bl	_open_backend
	cbnz	x0, LBB0_23
	b	LBB0_17
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"syntax: %s (ifname) (refresh) (threshold) (rule) [rule] ...\n"

	.comm	_ifname,8,3                     ; @ifname
l_.str.2:                               ; @.str.2
	.asciz	"%d"

l_.str.3:                               ; @.str.3
	.asciz	"rssileds"

	.comm	_LOG_PID,4,2                    ; @LOG_PID
	.comm	_LOG_DAEMON,4,2                 ; @LOG_DAEMON
	.comm	_LOG_INFO,4,2                   ; @LOG_INFO
l_.str.4:                               ; @.str.4
	.asciz	"monitoring %s, refresh rate %d, threshold %d\n"

	.comm	_BACKEND_RETRY_DELAY,4,2        ; @BACKEND_RETRY_DELAY
l_str:                                  ; @str
	.asciz	"  rule: (sysfs-name) (minq) (maxq) (offset) (factore)"

.subsections_via_symbols
