#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*/ ADC_Get_8CHs_AINValue(int *);
int /*<<< orphan*/ UARTD2_SendData(char *, int);
int /*<<< orphan*/ sprintf(char *, char *, int, int, int, int, int, int, int,
                           int);
int strlen(char *);
void Print_ADC_Values_8Channels(void) {
  int iADCValue[8] = {0};
  char sADC_8CHs_Value[512] = {0};
  ADC_Get_8CHs_AINValue(iADCValue);
  sprintf(sADC_8CHs_Value,
          "ADC Value : %d,\t%d,\t%d,\t%d,\t%d,\t%d,\t%d,\t%d\n\n", iADCValue[0],
          iADCValue[1], iADCValue[2], iADCValue[3], iADCValue[4], iADCValue[5],
          iADCValue[6], iADCValue[7]);
  UARTD2_SendData(sADC_8CHs_Value, strlen(sADC_8CHs_Value) * sizeof(char));
  return;
}


x86 assembly (clang, -O0):
<Print_ADC_Values_8Channels>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x258,%rsp
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x230(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1040 <memset@plt>
lea    -0x30(%rbp),%rdi
call   1060 <ADC_Get_8CHs_AINValue@plt>
lea    -0x230(%rbp),%rdi
mov    -0x30(%rbp),%edx
mov    -0x2c(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    -0x20(%rbp),%ebx
mov    -0x1c(%rbp),%r11d
mov    -0x18(%rbp),%r10d
mov    -0x14(%rbp),%eax
lea    0xe4e(%rip),%rsi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1070 <sprintf@plt>
lea    -0x230(%rbp),%rax
mov    %rax,-0x238(%rbp)
lea    -0x230(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x238(%rbp),%rdi
cltq
shl    $0x0,%rax
mov    %eax,%esi
call   1050 <UARTD2_SendData@plt>
add    $0x258,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<Print_ADC_Values_8Channels>:
push   %r14
push   %rbx
sub    $0x228,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%r14
mov    $0x200,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    %rsp,%rdi
call   1060 <ADC_Get_8CHs_AINValue@plt>
mov    (%rsp),%edx
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%r8d
mov    0xc(%rsp),%r9d
mov    0x10(%rsp),%r10d
mov    0x14(%rsp),%r11d
mov    0x18(%rsp),%eax
mov    0x1c(%rsp),%ebx
lea    0xe54(%rip),%rsi
mov    %r14,%rdi
push   %rbx
push   %rax
push   %r11
push   %r10
call   1070 <sprintf@plt>
add    $0x20,%rsp
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1050 <UARTD2_SendData@plt>
add    $0x228,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [45 x i8] c"ADC Value : %d,\09%d,\09%d,\09%d,\09%d,\09%d,\09%d,\09%d\0A\0A\00"
define void @Print_ADC_Values_8Channels() {
%1 = alloca [8 x i32]
%2 = alloca [512 x i8]
%3 = bitcast [8 x i32]* %1 to i8*
%4 = bitcast [512 x i8]* %2 to i8*
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%6 = call i32 @ADC_Get_8CHs_AINValue(i32* %5)
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%9 = load i32, i32* %8
%10 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 1
%11 = load i32, i32* %10
%12 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 2
%13 = load i32, i32* %12
%14 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 3
%15 = load i32, i32* %14
%16 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 4
%17 = load i32, i32* %16
%18 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 5
%19 = load i32, i32* %18
%20 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 6
%21 = load i32, i32* %20
%22 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 7
%23 = load i32, i32* %22
%24 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %11, i32 %13, i32 %15, i32 %17, i32 %19, i32 %21, i32 %23)
%25 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%26 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%27 = call i32 @strlen(i8* %26)
%28 = sext i32 %27 to i64
%29 = mul i64 %28, 1
%30 = trunc i64 %29 to i32
%31 = call i32 @UARTD2_SendData(i8* %25, i32 %30)
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"ADC Value : %d,\09%d,\09%d,\09%d,\09%d,\09%d,\09%d,\09%d\0A\0A\00"
define void @Print_ADC_Values_8Channels() {
%1 = alloca [8 x i32]
%2 = alloca [512 x i8]
%3 = bitcast [8 x i32]* %1 to i8*
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%6 = call i32 @ADC_Get_8CHs_AINValue(i32* %5)
%7 = load i32, i32* %5
%8 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 1
%9 = load i32, i32* %8
%10 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 2
%11 = load i32, i32* %10
%12 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 3
%13 = load i32, i32* %12
%14 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 4
%15 = load i32, i32* %14
%16 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 5
%17 = load i32, i32* %16
%18 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 6
%19 = load i32, i32* %18
%20 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 7
%21 = load i32, i32* %20
%22 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9, i32 %11, i32 %13, i32 %15, i32 %17, i32 %19, i32 %21)
%23 = call i32 @strlen(i8* %4)
%24 = call i32 @UARTD2_SendData(i8* %4, i32 %23)
ret void
}