	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmi160_config_pin
_bmi160_config_pin:                     ## @bmi160_config_pin
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movl	%esi, %r12d
	movq	%rdi, %r15
	callq	_regmap_get_device
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpl	$128, %r12d
	je	LBB0_3
## %bb.1:
                                        ## implicit-def: $ecx
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
	cmpl	$129, %r12d
	jne	LBB0_5
## %bb.2:
	movq	_BMI160_INT1_OUT_CTRL_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BMI160_INT1_LATCH_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_BMI160_INT1_MAP_DRDY_EN@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_BMI160_INT2_OUT_CTRL_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BMI160_INT2_LATCH_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_BMI160_INT2_MAP_DRDY_EN@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_5:
	movq	_BMI160_INT_OUT_CTRL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	%cl, %edx
	movq	_BMI160_OUTPUT_EN@GOTPCREL(%rip), %rax
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.6:
	movq	_BMI160_OPEN_DRAIN@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r13d
LBB0_7:
	orl	(%rax), %r14d
	orl	%r13d, %r14d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	movq	_BMI160_REG_INT_OUT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %ecx
	movq	%rbx, %r8
	callq	_bmi160_write_conf_reg
	movq	%rbx, %r14
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:
	movq	_BMI160_REG_INT_LATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %edx
	movq	%r14, %r8
	callq	_bmi160_write_conf_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movq	_BMI160_REG_INT_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %edx
	movq	%r14, %r8
	callq	_bmi160_write_conf_reg
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%eax, %ebx
	cmpl	$129, %r12d
	leaq	L_.str(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	jmp	LBB0_12
LBB0_10:
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BMI160_INT1_OUT_CTRL_SHIFT,4,2 ## @BMI160_INT1_OUT_CTRL_SHIFT
	.comm	_BMI160_INT1_LATCH_MASK,4,2     ## @BMI160_INT1_LATCH_MASK
	.comm	_BMI160_INT1_MAP_DRDY_EN,4,2    ## @BMI160_INT1_MAP_DRDY_EN
	.comm	_BMI160_INT2_OUT_CTRL_SHIFT,4,2 ## @BMI160_INT2_OUT_CTRL_SHIFT
	.comm	_BMI160_INT2_LATCH_MASK,4,2     ## @BMI160_INT2_LATCH_MASK
	.comm	_BMI160_INT2_MAP_DRDY_EN,4,2    ## @BMI160_INT2_MAP_DRDY_EN
	.comm	_BMI160_INT_OUT_CTRL_MASK,4,2   ## @BMI160_INT_OUT_CTRL_MASK
	.comm	_BMI160_OUTPUT_EN,4,2           ## @BMI160_OUTPUT_EN
	.comm	_BMI160_OPEN_DRAIN,4,2          ## @BMI160_OPEN_DRAIN
	.comm	_BMI160_REG_INT_OUT_CTRL,4,2    ## @BMI160_REG_INT_OUT_CTRL
	.comm	_BMI160_REG_INT_LATCH,4,2       ## @BMI160_REG_INT_LATCH
	.comm	_BMI160_REG_INT_MAP,4,2         ## @BMI160_REG_INT_MAP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"INT1"

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

L_.str.2:                               ## @.str.2
	.asciz	"Failed to configure %s IRQ pin"

	.no_dead_strip	_bmi160_config_pin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmi160_config_pin
_bmi160_config_pin:                     ; @bmi160_config_pin
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x4
	mov	x24, x3
	mov	x26, x2
	mov	x19, x1
	mov	x22, x0
	bl	_regmap_get_device
	mov	x20, x0
	cmp	w19, #128
	b.eq	LBB0_3
; %bb.1:
                                        ; implicit-def: $w8
                                        ; implicit-def: $w25
                                        ; implicit-def: $w23
	cmp	w19, #129
	b.ne	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _BMI160_INT1_OUT_CTRL_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BMI160_INT1_OUT_CTRL_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _BMI160_INT1_LATCH_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BMI160_INT1_LATCH_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x9]
Lloh6:
	adrp	x9, _BMI160_INT1_MAP_DRDY_EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BMI160_INT1_MAP_DRDY_EN@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _BMI160_INT2_OUT_CTRL_SHIFT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BMI160_INT2_OUT_CTRL_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _BMI160_INT2_LATCH_MASK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BMI160_INT2_LATCH_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w25, [x9]
Lloh14:
	adrp	x9, _BMI160_INT2_MAP_DRDY_EN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BMI160_INT2_MAP_DRDY_EN@GOTPAGEOFF]
LBB0_4:
	ldr	w23, [x9]
LBB0_5:
Lloh16:
	adrp	x9, _BMI160_INT_OUT_CTRL_MASK@GOTPAGE
Lloh17:
	ldr	x9, [x9, _BMI160_INT_OUT_CTRL_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	lsl	w2, w9, w8
Lloh19:
	adrp	x9, _BMI160_OUTPUT_EN@GOTPAGE
Lloh20:
	ldr	x9, [x9, _BMI160_OUTPUT_EN@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _BMI160_OPEN_DRAIN@GOTPAGE
Lloh23:
	ldr	x10, [x10, _BMI160_OPEN_DRAIN@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	cmp	w26, #0
	csel	w10, wzr, w10, eq
	orr	w9, w9, w24
	orr	w9, w9, w10
	lsl	w3, w9, w8
Lloh25:
	adrp	x8, _BMI160_REG_INT_OUT_CTRL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BMI160_REG_INT_OUT_CTRL@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x4, x21
	bl	_bmi160_write_conf_reg
	mov	x24, x0
	cbnz	w0, LBB0_9
; %bb.6:
Lloh28:
	adrp	x8, _BMI160_REG_INT_LATCH@GOTPAGE
Lloh29:
	ldr	x8, [x8, _BMI160_REG_INT_LATCH@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, x25
	mov	x3, x25
	mov	x4, x21
	bl	_bmi160_write_conf_reg
	mov	x24, x0
	cbnz	w0, LBB0_9
; %bb.7:
Lloh31:
	adrp	x8, _BMI160_REG_INT_MAP@GOTPAGE
Lloh32:
	ldr	x8, [x8, _BMI160_REG_INT_MAP@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, x23
	mov	x3, x23
	mov	x4, x21
	bl	_bmi160_write_conf_reg
	mov	x24, x0
	cbz	w0, LBB0_9
; %bb.8:
Lloh34:
	adrp	x8, l_.str.1@PAGE
Lloh35:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh36:
	adrp	x9, l_.str@PAGE
Lloh37:
	add	x9, x9, l_.str@PAGEOFF
	cmp	w19, #129
	csel	x2, x9, x8, eq
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_9:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_BMI160_INT1_OUT_CTRL_SHIFT,4,2 ; @BMI160_INT1_OUT_CTRL_SHIFT
	.comm	_BMI160_INT1_LATCH_MASK,4,2     ; @BMI160_INT1_LATCH_MASK
	.comm	_BMI160_INT1_MAP_DRDY_EN,4,2    ; @BMI160_INT1_MAP_DRDY_EN
	.comm	_BMI160_INT2_OUT_CTRL_SHIFT,4,2 ; @BMI160_INT2_OUT_CTRL_SHIFT
	.comm	_BMI160_INT2_LATCH_MASK,4,2     ; @BMI160_INT2_LATCH_MASK
	.comm	_BMI160_INT2_MAP_DRDY_EN,4,2    ; @BMI160_INT2_MAP_DRDY_EN
	.comm	_BMI160_INT_OUT_CTRL_MASK,4,2   ; @BMI160_INT_OUT_CTRL_MASK
	.comm	_BMI160_OUTPUT_EN,4,2           ; @BMI160_OUTPUT_EN
	.comm	_BMI160_OPEN_DRAIN,4,2          ; @BMI160_OPEN_DRAIN
	.comm	_BMI160_REG_INT_OUT_CTRL,4,2    ; @BMI160_REG_INT_OUT_CTRL
	.comm	_BMI160_REG_INT_LATCH,4,2       ; @BMI160_REG_INT_LATCH
	.comm	_BMI160_REG_INT_MAP,4,2         ; @BMI160_REG_INT_MAP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"INT1"

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

l_.str.2:                               ; @.str.2
	.asciz	"Failed to configure %s IRQ pin"

	.no_dead_strip	_bmi160_config_pin
.subsections_via_symbols
