#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ gpio_init_pin(int);
int /*<<< orphan*/ spi_update(int);
void __attribute__((constructor(1002))) adc_init(void) {
  gpio_init_pin(((6) * 0x10 + (14)));
  gpio_init_pin(((0) * 0x10 + (6)));
  *((volatile unsigned int *)((((volatile void *)0x01E26000) + 0x10 +
                               (((0) * 0x10 + (6)) >> 5) * 0x28) +
                              0x08)) = (1 << (((0) * 0x10 + (6)) & 0x1F));
  *((volatile unsigned int *)((((volatile void *)0x01E26000) + 0x10 +
                               (((0) * 0x10 + (6)) >> 5) * 0x28) +
                              0x00)) &= ~(1 << (((0) * 0x10 + (6)) & 0x1F));
  spi_update(0x400F);
  spi_update(0x400F);
  spi_update(0x400F);
  spi_update(0x400F);
  spi_update(0x400F);
  spi_update(0x400F);
}


x86 assembly (clang, -O0):
<adc_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6e,%edi
call   1030 <gpio_init_pin@plt>
mov    $0x6,%edi
call   1030 <gpio_init_pin@plt>
mov    $0x1e26000,%eax
movl   $0x40,0x18(%rax)
mov    $0x1e26000,%eax
mov    0x10(%rax),%ecx
and    $0xffffffbf,%ecx
mov    $0x1e26000,%eax
mov    %ecx,0x10(%rax)
mov    $0x400f,%edi
call   1040 <spi_update@plt>
mov    $0x400f,%edi
call   1040 <spi_update@plt>
mov    $0x400f,%edi
call   1040 <spi_update@plt>
mov    $0x400f,%edi
call   1040 <spi_update@plt>
mov    $0x400f,%edi
call   1040 <spi_update@plt>
mov    $0x400f,%edi
call   1040 <spi_update@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<adc_init>:
push   %rax
mov    $0x6e,%edi
call   1030 <gpio_init_pin@plt>
mov    $0x6,%edi
call   1030 <gpio_init_pin@plt>
movl   $0x40,0x1e26018
andl   $0xffffffbf,0x1e26010
bf
mov    $0x400f,%edi
call   1040 <spi_update@plt>
mov    $0x400f,%edi
call   1040 <spi_update@plt>
mov    $0x400f,%edi
call   1040 <spi_update@plt>
mov    $0x400f,%edi
call   1040 <spi_update@plt>
mov    $0x400f,%edi
call   1040 <spi_update@plt>
mov    $0x400f,%edi
pop    %rax
jmp    1040 <spi_update@plt>

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 1002, void ()* @adc_init, i8* null }]
define void @adc_init() {
%1 = call i32 @gpio_init_pin(i32 110)
%2 = call i32 @gpio_init_pin(i32 6)
store volatile i32 64, i32* bitcast (i8* getelementptr (i8, i8* inttoptr (i64 31612928 to i8*), i64 24) to i32*)
%3 = load volatile i32, i32* bitcast (i8* getelementptr (i8, i8* inttoptr (i64 31612928 to i8*), i64 16) to i32*)
%4 = and i32 %3, -65
store volatile i32 %4, i32* bitcast (i8* getelementptr (i8, i8* inttoptr (i64 31612928 to i8*), i64 16) to i32*)
%5 = call i32 @spi_update(i32 16399)
%6 = call i32 @spi_update(i32 16399)
%7 = call i32 @spi_update(i32 16399)
%8 = call i32 @spi_update(i32 16399)
%9 = call i32 @spi_update(i32 16399)
%10 = call i32 @spi_update(i32 16399)
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 1002, void ()* @adc_init, i8* null }]
define void @adc_init() {
%1 = tail call i32 @gpio_init_pin(i32 110)
%2 = tail call i32 @gpio_init_pin(i32 6)
store volatile i32 64, i32* inttoptr (i64 31612952 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 31612944 to i32*)
%4 = and i32 %3, -65
store volatile i32 %4, i32* inttoptr (i64 31612944 to i32*)
%5 = tail call i32 @spi_update(i32 16399)
%6 = tail call i32 @spi_update(i32 16399)
%7 = tail call i32 @spi_update(i32 16399)
%8 = tail call i32 @spi_update(i32 16399)
%9 = tail call i32 @spi_update(i32 16399)
%10 = tail call i32 @spi_update(i32 16399)
ret void
}