	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bma180_get_data_reg
_bma180_get_data_reg:                   ## @bma180_get_data_reg
	.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
	cmpq	$0, 8(%rdi)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	cmpl	$128, %esi
	jne	LBB0_5
## %bb.3:
	movq	_BMA180_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_7
## %bb.4:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_5:
	movq	_BMA180_ACC_X_LSB@GOTPCREL(%rip), %rax
	leal	(%r15,%r15), %esi
	addl	(%rax), %esi
	callq	_i2c_smbus_read_word_data
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_7
## %bb.6:
	movq	(%r14), %rdi
	addl	$120, %r15d
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_BMA180_TEMP,4,2                ## @BMA180_TEMP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to read temp register\n"

	.comm	_BMA180_ACC_X_LSB,4,2           ## @BMA180_ACC_X_LSB
L_.str.1:                               ## @.str.1
	.asciz	"failed to read accel_%c register\n"

	.no_dead_strip	_bma180_get_data_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bma180_get_data_reg
_bma180_get_data_reg:                   ; @bma180_get_data_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_3:
	mov	x21, x1
	mov	x20, x0
	ldr	x0, [x0]
	cmp	w1, #128
	b.ne	LBB0_6
; %bb.4:
Lloh3:
	adrp	x8, _BMA180_TEMP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BMA180_TEMP@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_byte_data
	mov	x19, x0
	tbz	w0, #31, LBB0_2
; %bb.5:
	ldr	x0, [x20]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_6:
Lloh8:
	adrp	x8, _BMA180_ACC_X_LSB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BMA180_ACC_X_LSB@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	add	w1, w8, w21, lsl #1
	bl	_i2c_smbus_read_word_data
	mov	x19, x0
	tbz	w0, #31, LBB0_2
; %bb.7:
	ldr	x0, [x20]
	add	w8, w21, #120
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	bl	_dev_err
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_BMA180_TEMP,4,2                ; @BMA180_TEMP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to read temp register\n"

	.comm	_BMA180_ACC_X_LSB,4,2           ; @BMA180_ACC_X_LSB
l_.str.1:                               ; @.str.1
	.asciz	"failed to read accel_%c register\n"

	.no_dead_strip	_bma180_get_data_reg
.subsections_via_symbols
