	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_init_sih_modules
_twl4030_init_sih_modules:              ## @twl4030_init_sih_modules
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpl	$2, %edi
	jb	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_29
LBB0_2:
	movl	%edi, %ebx
	movq	_irq_line@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	leaq	-64(%rbp), %rdi
	movl	$255, %esi
	movl	$16, %edx
	callq	_memset
	movq	_nr_sih_modules@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_28
## %bb.3:
	movq	_sih_modules@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	%ebx, %r12d
	addq	$36, %r15
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	%r14d
	movl	(%r13), %eax
	addq	$40, %r15
	cmpl	%eax, %r14d
	jge	LBB0_12
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	-32(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%ebx, -36(%r15)
	jbe	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-20(%r15), %edi
	movq	-28(%r15), %rax
	movl	4(%rax,%r12,8), %edx
	leaq	-64(%rbp), %rsi
	callq	_twl_i2c_write
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, -12(%r15)
	jne	LBB0_9
	jmp	LBB0_11
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	-4(%r15), %edx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	leaq	L_.str.1(%rip), %rcx
	callq	_pr_err
	cmpq	$0, -12(%r15)
	je	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_TWL4030_SIH_CTRL_COR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-20(%r15), %edi
	movl	(%r15), %edx
	callq	_twl_i2c_write_u8
	testl	%eax, %eax
	jns	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-4(%r15), %edx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	leaq	L_.str.2(%rip), %rcx
	callq	_pr_err
	jmp	LBB0_11
LBB0_12:
	testl	%eax, %eax
	jle	LBB0_28
## %bb.13:
	movq	_sih_modules@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	addq	$32, %r15
	xorl	%r14d, %r14d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	(%r13), %eax
LBB0_27:                                ##   in Loop: Header=BB0_14 Depth=1
	incl	%r14d
	addq	$40, %r15
	cmpl	%eax, %r14d
	jge	LBB0_28
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	-28(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_27
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpl	%ebx, -32(%r15)
	jbe	LBB0_27
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	-16(%r15), %edi
	movq	-24(%r15), %rax
	movl	(%rax,%r12,8), %edx
	leaq	-80(%rbp), %rsi
	callq	_twl_i2c_read
	testl	%eax, %eax
	js	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpq	$0, -8(%r15)
	jne	LBB0_21
	jmp	LBB0_19
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	leaq	L_.str.3(%rip), %rcx
	xorl	%eax, %eax
	callq	_pr_warn
	cmpq	$0, -8(%r15)
	jne	LBB0_21
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	-16(%r15), %edi
	movq	-24(%r15), %rax
	movl	(%rax,%r12,8), %edx
	movl	-28(%r15), %ecx
	leaq	-64(%rbp), %rsi
	callq	_twl_i2c_write
	testl	%eax, %eax
	jns	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_14 Depth=1
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_warn
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	-16(%r15), %edi
	movq	-24(%r15), %rax
	movl	(%rax,%r12,8), %edx
	movl	-28(%r15), %ecx
	leaq	-80(%rbp), %rsi
	callq	_twl_i2c_read
	testl	%eax, %eax
	js	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpq	$0, -8(%r15)
	jne	LBB0_26
	jmp	LBB0_24
LBB0_22:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	leaq	L_.str.3(%rip), %rcx
	xorl	%eax, %eax
	callq	_pr_warn
	cmpq	$0, -8(%r15)
	jne	LBB0_26
LBB0_24:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	-16(%r15), %edi
	movq	-24(%r15), %rax
	movl	(%rax,%r12,8), %edx
	movl	-28(%r15), %ecx
	leaq	-64(%rbp), %rsi
	callq	_twl_i2c_write
	testl	%eax, %eax
	jns	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_14 Depth=1
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_warn
	jmp	LBB0_26
LBB0_28:
	xorl	%eax, %eax
LBB0_29:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_31
## %bb.30:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_irq_line,4,2                   ## @irq_line
	.comm	_sih_modules,8,3                ## @sih_modules
	.comm	_nr_sih_modules,4,2             ## @nr_sih_modules
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"twl4030: err %d initializing %s %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"IMR"

	.comm	_TWL4030_SIH_CTRL_COR_MASK,4,2  ## @TWL4030_SIH_CTRL_COR_MASK
L_.str.2:                               ## @.str.2
	.asciz	"SIH_CTRL"

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

L_.str.4:                               ## @.str.4
	.asciz	"twl4030: write failed: %d\n"

	.no_dead_strip	_twl4030_init_sih_modules
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_init_sih_modules
_twl4030_init_sih_modules:              ; @twl4030_init_sih_modules
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	cmp	w0, #2
	b.lo	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_29
LBB0_2:
	mov	x19, x0
Lloh6:
	adrp	x8, _irq_line@GOTPAGE
Lloh7:
	ldr	x8, [x8, _irq_line@GOTPAGEOFF]
Lloh8:
	str	w0, [x8]
	add	x0, sp, #40
	mov	w1, #255
	mov	w2, #16
	bl	_memset
Lloh9:
	adrp	x23, _nr_sih_modules@GOTPAGE
Lloh10:
	ldr	x23, [x23, _nr_sih_modules@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_28
; %bb.3:
	mov	w26, #0
Lloh11:
	adrp	x24, _sih_modules@GOTPAGE
Lloh12:
	ldr	x24, [x24, _sih_modules@GOTPAGEOFF]
	ldr	x8, [x24]
	mov	w25, w19
	add	x27, x8, #24
Lloh13:
	adrp	x20, l_.str@PAGE
Lloh14:
	add	x20, x20, l_.str@PAGEOFF
Lloh15:
	adrp	x21, l_.str.1@PAGE
Lloh16:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh17:
	adrp	x28, _TWL4030_SIH_CTRL_COR_MASK@GOTPAGE
Lloh18:
	ldr	x28, [x28, _TWL4030_SIH_CTRL_COR_MASK@GOTPAGEOFF]
Lloh19:
	adrp	x22, l_.str.2@PAGE
Lloh20:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w26, w26, #1
	ldr	w8, [x23]
	add	x27, x27, #40
	cmp	w26, w8
	b.ge	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w3, [x27, #-20]
	cbz	w3, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldur	w8, [x27, #-24]
	cmp	w8, w19
	b.ls	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldur	w0, [x27, #-8]
	ldur	x8, [x27, #-16]
	add	x8, x8, x25, lsl #3
	ldr	w2, [x8, #4]
	add	x1, sp, #40
	bl	_twl_i2c_write
	tbnz	w0, #31, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x27]
	cbnz	x8, LBB0_10
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x0
	ldr	w2, [x27, #8]
	mov	x0, x20
	mov	x3, x21
	bl	_pr_err
	ldr	x8, [x27]
	cbz	x8, LBB0_4
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldur	w0, [x27, #-8]
	ldr	w1, [x28]
	ldr	w2, [x27, #12]
	bl	_twl_i2c_write_u8
	tbz	w0, #31, LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x0
	ldr	w2, [x27, #8]
	mov	x0, x20
	mov	x3, x22
	bl	_pr_err
	b	LBB0_4
LBB0_12:
	cmp	w8, #1
	b.lt	LBB0_28
; %bb.13:
	mov	w22, #0
	ldr	x9, [x24]
	add	x24, x9, #16
	lsl	x25, x25, #3
Lloh21:
	adrp	x26, l_.str.3@PAGE
Lloh22:
	add	x26, x26, l_.str.3@PAGEOFF
Lloh23:
	adrp	x20, l_.str@PAGE
Lloh24:
	add	x20, x20, l_.str@PAGEOFF
Lloh25:
	adrp	x21, l_.str.4@PAGE
Lloh26:
	add	x21, x21, l_.str.4@PAGEOFF
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w8, [x23]
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	w22, w22, #1
	add	x24, x24, #40
	cmp	w22, w8
	b.ge	LBB0_28
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldur	w3, [x24, #-12]
	cbz	w3, LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	ldur	w9, [x24, #-16]
	cmp	w9, w19
	b.ls	LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w0, [x24]
	ldur	x8, [x24, #-8]
	ldr	w2, [x8, x25]
	add	x1, sp, #24
	bl	_twl_i2c_read
	tbnz	w0, #31, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x8, [x24, #8]
	cbnz	x8, LBB0_23
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	x1, x0
	ldr	w8, [x24, #16]
	stp	x8, x26, [sp]
	mov	x0, x20
	bl	_pr_warn
	ldr	x8, [x24, #8]
	cbnz	x8, LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w0, [x24]
	ldur	x8, [x24, #-8]
	ldr	w2, [x8, x25]
	ldur	w3, [x24, #-12]
	add	x1, sp, #40
	bl	_twl_i2c_write
	tbz	w0, #31, LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x1, x0
	mov	x0, x21
	bl	_pr_warn
LBB0_23:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w0, [x24]
	ldur	x8, [x24, #-8]
	ldr	w2, [x8, x25]
	ldur	w3, [x24, #-12]
	add	x1, sp, #24
	bl	_twl_i2c_read
	tbnz	w0, #31, LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x8, [x24, #8]
	cbnz	x8, LBB0_14
	b	LBB0_26
LBB0_25:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	x1, x0
	ldr	w8, [x24, #16]
	stp	x8, x26, [sp]
	mov	x0, x20
	bl	_pr_warn
	ldr	x8, [x24, #8]
	cbnz	x8, LBB0_14
LBB0_26:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w0, [x24]
	ldur	x8, [x24, #-8]
	ldr	w2, [x8, x25]
	ldur	w3, [x24, #-12]
	add	x1, sp, #40
	bl	_twl_i2c_write
	tbz	w0, #31, LBB0_14
; %bb.27:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x1, x0
	mov	x0, x21
	bl	_pr_warn
	b	LBB0_14
LBB0_28:
	mov	w0, #0
LBB0_29:
	ldr	x8, [sp, #56]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_31
; %bb.30:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_31:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_irq_line,4,2                   ; @irq_line
	.comm	_sih_modules,8,3                ; @sih_modules
	.comm	_nr_sih_modules,4,2             ; @nr_sih_modules
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"twl4030: err %d initializing %s %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"IMR"

	.comm	_TWL4030_SIH_CTRL_COR_MASK,4,2  ; @TWL4030_SIH_CTRL_COR_MASK
l_.str.2:                               ; @.str.2
	.asciz	"SIH_CTRL"

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

l_.str.4:                               ; @.str.4
	.asciz	"twl4030: write failed: %d\n"

	.no_dead_strip	_twl4030_init_sih_modules
.subsections_via_symbols
