xunge/DecIR huggingface dataset:
int __AreAllBelow(int ncon, float *v1, float *v2) {
  int i;
  for (i = 0; i < ncon; i++)
    if (v1[i] > v2[i])
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<__AreAllBelow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1160 <__AreAllBelow+0x60>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
ucomiss (%rax,%rcx,4),%xmm0
jbe    114d <__AreAllBelow+0x4d>
movl   $0x0,-0x4(%rbp)
jmp    1167 <__AreAllBelow+0x67>
jmp    1152 <__AreAllBelow+0x52>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1116 <__AreAllBelow+0x16>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__AreAllBelow>:
mov    $0x1,%eax
test   %edi,%edi
jle    1124 <__AreAllBelow+0x24>
mov    %edi,%ecx
xor    %edi,%edi
nopl   (%rax)
movss  (%rsi,%rdi,4),%xmm0
ucomiss (%rdx,%rdi,4),%xmm0
ja     1125 <__AreAllBelow+0x25>
add    $0x1,%rdi
cmp    %rdi,%rcx
jne    1110 <__AreAllBelow+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @__AreAllBelow(i32 %0, float* %1, float* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float*
%7 = alloca float*
%8 = alloca i32
store i32 %0, i32* %5
store float* %1, float** %6
store float* %2, float** %7
store i32 0, i32* %8
br label %9
9: ; preds = %27, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %5
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %30
13: ; preds = %9
%14 = load float*, float** %6
%15 = load i32, i32* %8
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds float, float* %14, i64 %16
%18 = load float, float* %17
%19 = load float*, float** %7
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds float, float* %19, i64 %21
%23 = load float, float* %22
%24 = fcmp ogt float %18, %23
br i1 %24, label %25, label %26
25: ; preds = %13
store i32 0, i32* %4
br label %31
26: ; preds = %13
br label %27
27: ; preds = %26
%28 = load i32, i32* %8
%29 = add nsw i32 %28, 1
store i32 %29, i32* %8
br label %9
30: ; preds = %9
store i32 1, i32* %4
br label %31
31: ; preds = %30, %25
%32 = load i32, i32* %4
ret i32 %32
}

LLVM IR (-O2):
define i32 @__AreAllBelow(i32 %0, float* nocapture %1, float* nocapture %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %0 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds float, float* %1, i64 %10
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %2, i64 %10
%14 = load float, float* %13
%15 = fcmp ogt float %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %17, label %7
17: ; preds = %9, %7, %3
%18 = phi i32 [ 1, %3 ], [ 1, %7 ], [ 0, %9 ]
ret i32 %18
}
unsigned int pwm_tdiv_has_div1(void) { return 0; }


x86 assembly (clang, -O0):
<pwm_tdiv_has_div1>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwm_tdiv_has_div1>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @pwm_tdiv_has_div1() {
ret i32 0
}

LLVM IR (-O2):
define i32 @pwm_tdiv_has_div1() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
uint32_t SatStddev(uint32_t code, int32_t offset) {
  int32_t sat = (int32_t)code - offset;
  return (sat < 0) ? 0 : sat;
}


x86 assembly (clang, -O0):
<SatStddev>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jge    112e <SatStddev+0x2e>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    1136 <SatStddev+0x36>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SatStddev>:
xor    %eax,%eax
sub    %rsi,%rdi
cmovns %rdi,%rax
ret

LLVM IR (-O0):
define i64 @SatStddev(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = sub nsw i64 %6, %7
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = icmp slt i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
br label %14
12: ; preds = %2
%13 = load i64, i64* %5
br label %14
14: ; preds = %12, %11
%15 = phi i64 [ 0, %11 ], [ %13, %12 ]
ret i64 %15
}

LLVM IR (-O2):
define i64 @SatStddev(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
%4 = icmp sgt i64 %3, 0
%5 = select i1 %4, i64 %3, i64 0
ret i64 %5
}
int HelpItem47(void) { return 0; }


x86 assembly (clang, -O0):
<HelpItem47>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HelpItem47>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @HelpItem47() {
ret i32 0
}

LLVM IR (-O2):
define i32 @HelpItem47() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sendCustom(int, int, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void sendConf(int sockfd, int conf) {
  char payload[9];
  sprintf(payload, "%08x", conf);
  sendCustom(sockfd, 0x01, payload);
}


x86 assembly (clang, -O0):
<sendConf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x11(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xec4(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x4(%rbp),%edi
lea    -0x11(%rbp),%rdx
mov    $0x1,%esi
call   1030 <sendCustom@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendConf>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %esi,%edx
mov    %edi,%ebx
lea    0xece(%rip),%rsi
lea    0xf(%rsp),%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    %r14,%rdx
call   1030 <sendCustom@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%08x\00"
define void @sendConf(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [9 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %3
%10 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 0
%11 = call i32 @sendCustom(i32 %9, i32 1, i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%08x\00"
define void @sendConf(i32 %0, i32 %1) {
%3 = alloca [9 x i8]
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i32 @sendCustom(i32 %0, i32 1, i8* %4)
ret void
}
/* Type definitions */
typedef enum ibv_port_state { ____Placeholder_ibv_port_state } ibv_port_state;

/* Variables and functions */
char const *ibv_port_state_str(int);
const char *mlx4_glue_port_state_str(enum ibv_port_state port_state) {
  return ibv_port_state_str(port_state);
}


x86 assembly (clang, -O0):
<mlx4_glue_port_state_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ibv_port_state_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlx4_glue_port_state_str>:
jmp    1030 <ibv_port_state_str@plt>

LLVM IR (-O0):
define i8* @mlx4_glue_port_state_str(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i8* @ibv_port_state_str(i32 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @mlx4_glue_port_state_str(i32 %0) {
%2 = tail call i8* @ibv_port_state_str(i32 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ *strchr(char *, char);
int leggiSi(void) {
  char str[40];
  scanf("%s", str);
  (void)getchar();
  if (strchr(str, 's') != NULL || strchr(str, 'S') != NULL)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<leggiSi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rsi
lea    0xebd(%rip),%rdi
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
lea    -0x30(%rbp),%rdi
mov    $0x73,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
jne    117f <leggiSi+0x4f>
lea    -0x30(%rbp),%rdi
mov    $0x53,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     118b <leggiSi+0x5b>
movl   $0x1,-0x4(%rbp)
jmp    1192 <leggiSi+0x62>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leggiSi>:
push   %rbx
sub    $0x30,%rsp
lea    0xec4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %rbx,%rdi
mov    $0x73,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    1180 <leggiSi+0x50>
mov    %rsp,%rdi
mov    $0x53,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @leggiSi() {
%1 = alloca i32
%2 = alloca [40 x i8]
%3 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @getchar()
%6 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%7 = call i32* @strchr(i8* %6, i8 signext 115)
%8 = icmp ne i32* %7, null
br i1 %8, label %13, label %9
9: ; preds = %0
%10 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%11 = call i32* @strchr(i8* %10, i8 signext 83)
%12 = icmp ne i32* %11, null
br i1 %12, label %13, label %14
13: ; preds = %9, %0
store i32 1, i32* %1
br label %15
14: ; preds = %9
store i32 0, i32* %1
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @leggiSi() {
%1 = alloca [40 x i8]
%2 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 (...) @getchar()
%5 = call i32* @strchr(i8* %2, i8 signext 115)
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = call i32* @strchr(i8* %2, i8 signext 83)
%9 = icmp ne i32* %8, null
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %0
%12 = phi i32 [ 1, %0 ], [ %10, %7 ]
ret i32 %12
}
__attribute__((no, noclone)) unsigned __int128 t103_3mul(unsigned __int128 y) {
  unsigned __int128 r;
  if (__builtin_mul_overflow((signed __int128)(3), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t103_3mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
mov    $0x3,%ecx
mul    %rcx
mov    %rax,%rsi
mov    -0x50(%rbp),%rax
seto   %dl
mov    %dl,-0x41(%rbp)
mul    %rcx
mov    %rax,%rcx
mov    -0x41(%rbp),%al
add    %rsi,%rdx
setb   %sil
or     %sil,%al
mov    %rcx,-0x40(%rbp)
mov    %rdx,-0x38(%rbp)
test   $0x1,%al
jne    1179 <t103_3mul+0x69>
jmp    1180 <t103_3mul+0x70>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t103_3mul>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rax
mov    $0x3,%esi
mul    %rsi
mov    %rax,%rcx
mov    %rdi,%rax
seto   %dil
mul    %rsi
mov    %rax,%r14
mov    %rdx,%rbx
add    %rcx,%rbx
setb   %al
or     %dil,%al
cmp    $0x1,%al
jne    1146 <t103_3mul+0x36>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t103_3mul(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.umul.with.overflow.i128(i128 3, i128 %11)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
%15 = icmp ne i128 %14, 0
%16 = and i1 false, %15
%17 = or i1 %13, %16
%18 = sub i128 0, %14
%19 = select i1 false, i128 %18, i128 %14
store i128 %19, i128* %6
br i1 %17, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t103_3mul(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.umul.with.overflow.i128(i128 %6, i128 3)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void hello(int (*x)[4]) {
  for (int i = 0; i < 4; i++)
    printf("%d\n", x[0][i]);
}


x86 assembly (clang, -O0):
<hello>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1152 <hello+0x42>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <hello+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hello>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%esi
lea    0xee0(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0x4(%rbx),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0x8(%rbx),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0xc(%rbx),%esi
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @hello([4 x i32]* %0) {
%2 = alloca [4 x i32]*
%3 = alloca i32
store [4 x i32]* %0, [4 x i32]** %2
store i32 0, i32* %3
br label %4
4: ; preds = %15, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 4
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load [4 x i32]*, [4 x i32]** %2
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 %11
%13 = load i32, i32* %12
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %7
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %4
18: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @hello([4 x i32]* nocapture %0) {
%2 = getelementptr inbounds [4 x i32], [4 x i32]* %0, i64 0, i64 0
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %0, i64 0, i64 1
%6 = load i32, i32* %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %0, i64 0, i64 2
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %0, i64 0, i64 3
%12 = load i32, i32* %11
%13 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serial_put_hex(unsigned int volatile, int);
int /*<<< orphan*/ serial_puts(char *);
void disp_uart_ctrl(void) {
  serial_puts("uart_ctrl:");
  serial_put_hex(
      (*((volatile unsigned *)((0xc8100000 | (0x01 << 10) | (0x30 << 2)) +
                               (2 << 2)))),
      32);
}


x86 assembly (clang, -O0):
<disp_uart_ctrl>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <serial_puts@plt>
mov    $0xc81004c8,%eax
mov    (%rax),%edi
mov    $0x20,%esi
call   1040 <serial_put_hex@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<disp_uart_ctrl>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <serial_puts@plt>
mov    $0xc81004c8,%eax
mov    (%rax),%edi
mov    $0x20,%esi
pop    %rax
jmp    1040 <serial_put_hex@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"uart_ctrl:\00"
define void @disp_uart_ctrl() {
%1 = call i32 @serial_puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = load volatile i32, i32* inttoptr (i64 3356493000 to i32*)
%3 = call i32 @serial_put_hex(i32 %2, i32 32)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"uart_ctrl:\00"
define void @disp_uart_ctrl() {
%1 = tail call i32 @serial_puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = load volatile i32, i32* inttoptr (i64 3356493000 to i32*)
%3 = tail call i32 @serial_put_hex(i32 %2, i32 32)
ret void
}
void eshup6(x) register unsigned short *x;
{
  int i;
  register unsigned short *p;
  p = x + 2;
  x += 2 + 1;
  for (i = 2; i < (6 + 3) - 1; i++)
    *p++ = *x++;
  *p = 0;
}


x86 assembly (clang, -O0):
<eshup6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x6,%rax
mov    %rax,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1163 <eshup6+0x63>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cx
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x2,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cx,(%rax)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <eshup6+0x27>
mov    -0x18(%rbp),%rax
movw   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<eshup6>:
mov    0x6(%rdi),%rax
mov    %rax,0x4(%rdi)
mov    0xe(%rdi),%eax
mov    %eax,0xc(%rdi)
movw   $0x0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @eshup6(i16* %0) {
%2 = alloca i16*
%3 = alloca i32
%4 = alloca i16*
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 2
store i16* %6, i16** %4
%7 = load i16*, i16** %2
%8 = getelementptr inbounds i16, i16* %7, i64 3
store i16* %8, i16** %2
store i32 2, i32* %3
br label %9
9: ; preds = %18, %1
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 8
br i1 %11, label %12, label %21
12: ; preds = %9
%13 = load i16*, i16** %2
%14 = getelementptr inbounds i16, i16* %13, i32 1
store i16* %14, i16** %2
%15 = load i16, i16* %13
%16 = load i16*, i16** %4
%17 = getelementptr inbounds i16, i16* %16, i32 1
store i16* %17, i16** %4
store i16 %15, i16* %16
br label %18
18: ; preds = %12
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %9
21: ; preds = %9
%22 = load i16*, i16** %4
store i16 0, i16* %22
ret void
}

LLVM IR (-O2):
define void @eshup6(i16* nocapture %0) {
%2 = getelementptr i16, i16* %0, i64 2
%3 = bitcast i16* %2 to i8*
%4 = getelementptr i16, i16* %0, i64 3
%5 = bitcast i16* %4 to i8*
%6 = getelementptr i16, i16* %0, i64 8
store i16 0, i16* %6
ret void
}
int do_732() { return 732; }


x86 assembly (clang, -O0):
<do_732>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2dc,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_732>:
mov    $0x2dc,%eax
ret

LLVM IR (-O0):
define i32 @do_732() {
ret i32 732
}

LLVM IR (-O2):
define i32 @do_732() {
ret i32 732
}
void swapBeseda(char **tabela, int j) {
  char *t = tabela[j];
  tabela[j] = tabela[j + 1];
  tabela[j + 1] = t;
}


x86 assembly (clang, -O0):
<swapBeseda>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapBeseda>:
movslq %esi,%rax
movdqu (%rdi,%rax,8),%xmm0
pshufd $0x4e,%xmm0,%xmm0
movdqu %xmm0,(%rdi,%rax,8)
ret

LLVM IR (-O0):
define void @swapBeseda(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i8*
store i8** %0, i8*** %3
store i32 %1, i32* %4
%6 = load i8**, i8*** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8*, i8** %6, i64 %8
%10 = load i8*, i8** %9
store i8* %10, i8** %5
%11 = load i8**, i8*** %3
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %11, i64 %14
%16 = load i8*, i8** %15
%17 = load i8**, i8*** %3
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
store i8* %16, i8** %20
%21 = load i8*, i8** %5
%22 = load i8**, i8*** %3
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %22, i64 %25
store i8* %21, i8** %26
ret void
}

LLVM IR (-O2):
define void @swapBeseda(i8** nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = bitcast i8** %4 to <2 x i8*>*
%6 = load <2 x i8*>, <2 x i8*>* %5
%7 = shufflevector <2 x i8*> %6, <2 x i8*> poison, <2 x i32> <i32 1, i32 0>
%8 = bitcast i8** %4 to <2 x i8*>*
store <2 x i8*> %7, <2 x i8*>* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(size_t, size_t);
void *xcalloc(size_t nmemb, size_t size) {
  void *p;
  if (nmemb == 0)
    nmemb = 1;
  if (size == 0)
    size = 1;
  p = calloc(nmemb, size);
  if (p == NULL)
    abort();
  return p;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1143 <xcalloc+0x23>
movq   $0x1,-0x8(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1156 <xcalloc+0x36>
movq   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1179 <xcalloc+0x59>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %rax
test   %rdi,%rdi
mov    $0x1,%eax
cmove  %rax,%rdi
test   %rsi,%rsi
cmove  %rax,%rsi
call   1040 <calloc@plt>
test   %rax,%rax
je     1140 <xcalloc+0x20>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @xcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i64 1, i64* %3
br label %9
9: ; preds = %8, %2
%10 = load i64, i64* %4
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i64 1, i64* %4
br label %13
13: ; preds = %12, %9
%14 = load i64, i64* %3
%15 = load i64, i64* %4
%16 = call i8* @calloc(i64 %14, i64 %15)
store i8* %16, i8** %5
%17 = load i8*, i8** %5
%18 = icmp eq i8* %17, null
br i1 %18, label %19, label %21
19: ; preds = %13
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %13
%22 = load i8*, i8** %5
ret i8* %22
}

LLVM IR (-O2):
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 0
%4 = select i1 %3, i64 1, i64 %0
%5 = icmp eq i64 %1, 0
%6 = select i1 %5, i64 1, i64 %1
%7 = tail call i8* @calloc(i64 %4, i64 %6)
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = tail call i32 (...) @abort()
unreachable
11: ; preds = %2
ret i8* %7
}
void ff_hevc_put_hevc_bi_epel_hv12_10_sse4() {}


x86 assembly (clang, -O0):
<ff_hevc_put_hevc_bi_epel_hv12_10_sse4>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff_hevc_put_hevc_bi_epel_hv12_10_sse4>:
ret

LLVM IR (-O0):
define void @ff_hevc_put_hevc_bi_epel_hv12_10_sse4() {
ret void
}

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_hv12_10_sse4() {
ret void
}
void displayFilter(const char *id, int T, float F, float Q, float G) {}


x86 assembly (clang, -O0):
<displayFilter>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movss  %xmm0,-0x10(%rbp)
movss  %xmm1,-0x14(%rbp)
movss  %xmm2,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayFilter>:
ret

LLVM IR (-O0):
define void @displayFilter(i8* %0, i32 %1, float %2, float %3, float %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca float
store i8* %0, i8** %6
store i32 %1, i32* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
ret void
}

LLVM IR (-O2):
define void @displayFilter(i8* nocapture %0, i32 %1, float %2, float %3, float %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void start_b1(void) { printf("start_b1\n"); }


x86 assembly (clang, -O0):
<start_b1>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_b1>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"start_b1\0A\00"
define void @start_b1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [9 x i8] c"start_b1\00"
define void @start_b1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_35uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x35 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_35uint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x35,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_35uint64_lowword_reg>:
test   $0x35,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_35uint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 53
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_35uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 53
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t ld_u32_be(const void *x) {
  return ((((((uint32_t)(((uint8_t *)x)[0])) << 8) |
            ((uint32_t)(((uint8_t *)x)[1])))
           << 16) |
          ((((uint32_t)(((uint8_t *)x)[2])) << 8) |
           ((uint32_t)(((uint8_t *)x)[3]))));
}


x86 assembly (clang, -O0):
<ld_u32_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
or     %ecx,%eax
shl    $0x10,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rdx
mov    0x18(%rdx),%rdx
or     %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_u32_be>:
mov    (%rdi),%ecx
mov    0x8(%rdi),%eax
shl    $0x18,%ecx
shl    $0x10,%eax
or     %ecx,%eax
mov    0x10(%rdi),%ecx
shl    $0x8,%ecx
or     0x18(%rdi),%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ld_u32_be(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i64*
%5 = getelementptr inbounds i64, i64* %4, i64 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 8
%9 = load i8*, i8** %2
%10 = bitcast i8* %9 to i64*
%11 = getelementptr inbounds i64, i64* %10, i64 1
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = or i32 %8, %13
%15 = shl i32 %14, 16
%16 = load i8*, i8** %2
%17 = bitcast i8* %16 to i64*
%18 = getelementptr inbounds i64, i64* %17, i64 2
%19 = load i64, i64* %18
%20 = trunc i64 %19 to i32
%21 = shl i32 %20, 8
%22 = load i8*, i8** %2
%23 = bitcast i8* %22 to i64*
%24 = getelementptr inbounds i64, i64* %23, i64 3
%25 = load i64, i64* %24
%26 = trunc i64 %25 to i32
%27 = or i32 %21, %26
%28 = or i32 %15, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @ld_u32_be(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 8
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %4, 24
%10 = shl i32 %8, 16
%11 = getelementptr inbounds i8, i8* %0, i64 16
%12 = bitcast i8* %11 to i64*
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = shl i32 %14, 8
%16 = getelementptr inbounds i8, i8* %0, i64 24
%17 = bitcast i8* %16 to i64*
%18 = load i64, i64* %17
%19 = trunc i64 %18 to i32
%20 = or i32 %10, %9
%21 = or i32 %20, %19
%22 = or i32 %21, %15
ret i32 %22
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ unix_error(char *);
void Close(int fd) {
  int rc;
  if ((rc = close(fd)) < 0)
    unix_error("Close error");
}


x86 assembly (clang, -O0):
<Close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jge    114b <Close+0x2b>
lea    0xeba(%rip),%rdi
call   1040 <unix_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Close>:
push   %rax
call   1030 <close@plt>
test   %eax,%eax
js     112c <Close+0xc>
pop    %rax
ret
lea    0xecd(%rip),%rdi
pop    %rax
jmp    1040 <unix_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Close error\00"
define void @Close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @close(i32 %4)
store i32 %5, i32* %3
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @unix_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Close error\00"
define void @Close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @unix_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
extern unsigned long readb(unsigned long addr) {
  long result =
      *(volatile int *)((addr << 7) + ((0xfffffc0000000000UL) + 0x200000000UL) +
                        0x00);
  result >>= (addr & 3) * 8;
  return 0xffUL & result;
}


x86 assembly (clang, -O0):
<readb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x7,%rax
movabs $0xfffffc0200000000,%rcx
fc ff ff
add    %rcx,%rax
mov    (%rax),%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
and    $0x3,%rcx
shl    $0x3,%rcx
mov    -0x10(%rbp),%rax
sar    %cl,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<readb>:
lea    0x0(,%rdi,8),%ecx
shl    $0x7,%rdi
movabs $0xfffffc0200000000,%rax
fc ff ff
movslq (%rdi,%rax,1),%rax
and    $0x18,%cl
sar    %cl,%rax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i64 @readb(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = shl i64 %4, 7
%6 = add i64 %5, -4389456576512
%7 = add i64 %6, 0
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = sext i32 %9 to i64
store i64 %10, i64* %3
%11 = load i64, i64* %2
%12 = and i64 %11, 3
%13 = mul i64 %12, 8
%14 = load i64, i64* %3
%15 = ashr i64 %14, %13
store i64 %15, i64* %3
%16 = load i64, i64* %3
%17 = and i64 255, %16
ret i64 %17
}

LLVM IR (-O2):
define i64 @readb(i64 %0) {
%2 = shl i64 %0, 7
%3 = add i64 %2, -4389456576512
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = sext i32 %5 to i64
%7 = shl i64 %0, 3
%8 = and i64 %7, 24
%9 = ashr i64 %6, %8
%10 = and i64 %9, 255
ret i64 %10
}
/* Variables and functions */
int cfg_processor_get_int_attr(void *, char *);
int cfg_io_get_gpio_pin_bit(void *pin) {
  return cfg_processor_get_int_attr(pin, "bit");
}


x86 assembly (clang, -O0):
<cfg_io_get_gpio_pin_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <cfg_processor_get_int_attr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_io_get_gpio_pin_bit>:
lea    0xee9(%rip),%rsi
jmp    1030 <cfg_processor_get_int_attr@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"bit\00"
define i32 @cfg_io_get_gpio_pin_bit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @cfg_processor_get_int_attr(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [4 x i8] c"bit\00"
define i32 @cfg_io_get_gpio_pin_bit(i8* %0) {
%2 = tail call i32 @cfg_processor_get_int_attr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
int execl(char const *, char const *, char *, char *, char *, char *, char *);
void runExec(const char *cmd, char *url, char *ip) {
  if (execl(cmd, cmd, url, "7578", ip, "4546", (char *)0) == -1)
    error("Could not execute: ");
}


x86 assembly (clang, -O0):
<runExec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%r8
lea    0xeb5(%rip),%rcx
lea    0xeb3(%rip),%r9
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1040 <execl@plt>
cmp    $0xffffffff,%eax
jne    1176 <runExec+0x56>
lea    0xe99(%rip),%rdi
call   1030 <error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runExec>:
push   %rax
mov    %rdx,%r8
mov    %rsi,%rdx
movq   $0x0,(%rsp)
lea    0xeca(%rip),%rcx
lea    0xec8(%rip),%r9
mov    %rdi,%rsi
call   1040 <execl@plt>
cmp    $0xffffffff,%eax
je     114c <runExec+0x2c>
pop    %rax
ret
lea    0xeb7(%rip),%rdi
pop    %rax
jmp    1030 <error@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"7578\00"
@.str.1 = [5 x i8] c"4546\00"
@.str.2 = [20 x i8] c"Could not execute: \00"
define void @runExec(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i32 @execl(i8* %7, i8* %8, i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* null)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %3
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"7578\00"
@.str.1 = [5 x i8] c"4546\00"
@.str.2 = [20 x i8] c"Could not execute: \00"
define void @runExec(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @execl(i8* %0, i8* %0, i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* null)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret void
}
int test_imm_82int64_midword_reg(long long val) {
  return ((val >> 16) & (0x82 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_82int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x82,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_82int64_midword_reg>:
test   $0x820000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_82int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 130
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_82int64_midword_reg(i64 %0) {
%2 = and i64 %0, 8519680
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int test_imm_73uint8_reg(unsigned char val) {
  return ((val) & (-0x73 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_73uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff8d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_73uint8_reg>:
test   $0x8d,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_73uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -115
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_73uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -115
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int f491(int *);
int f492(int *p) { return f491(p); }


x86 assembly (clang, -O0):
<f492>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <f491@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f492>:
jmp    1030 <f491@plt>

LLVM IR (-O0):
define i32 @f492(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @f491(i32* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @f492(i32* %0) {
%2 = tail call i32 @f491(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  int i;
  int xor_base = 0;
  int arr[] = {43, 43, 23, 23, 23, 23, 54, 54, 54};
  int len_arr = sizeof(arr) / sizeof(*arr);
  for (i = 0; i < len_arr; i++)
    xor_base ^= arr[i];
  printf("%d\n", xor_base);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
movl   $0x9,-0x34(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    117a <main+0x5a>
movslq -0x4(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <main+0x32>
mov    -0x8(%rbp),%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0x36,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@__const.main.arr = [9 x i32] [i32 43, i32 43, i32 23, i32 23, i32 23, i32 23, i32 54, i32 54, i32 54]
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [9 x i32]
%4 = alloca i32
store i32 0, i32* %2
%5 = bitcast [9 x i32]* %3 to i8*
store i32 9, i32* %4
store i32 0, i32* %1
br label %6
6: ; preds = %17, %0
%7 = load i32, i32* %1
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32, i32* %1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 %12
%14 = load i32, i32* %13
%15 = load i32, i32* %2
%16 = xor i32 %15, %14
store i32 %16, i32* %2
br label %17
17: ; preds = %10
%18 = load i32, i32* %1
%19 = add nsw i32 %18, 1
store i32 %19, i32* %1
br label %6
20: ; preds = %6
%21 = load i32, i32* %2
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 54)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fwrite(int /*<<< orphan*/ *, int /*<<< orphan*/, int, int /*<<< orphan*/ *);
int dump_to_file(uint8_t *buf, uint32_t size, char *name) {
  FILE *f = NULL;
  int write_bytes = 0;
  f = fopen(name, "wb");
  write_bytes = fwrite(buf, size, 1, f);
  fclose(f);
  return write_bytes;
}


x86 assembly (clang, -O0):
<dump_to_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rcx
mov    $0x1,%edx
call   1050 <fwrite@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_to_file>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
lea    0xebf(%rip),%rsi
mov    %rdx,%rdi
call   1040 <fopen@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
call   1030 <fclose@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"wb\00"
define i32 @dump_to_file(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
store i32* null, i32** %7
store i32 0, i32* %8
%9 = load i8*, i8** %6
%10 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %10, i32** %7
%11 = load i32*, i32** %4
%12 = load i32, i32* %5
%13 = load i32*, i32** %7
%14 = call i32 @fwrite(i32* %11, i32 %12, i32 1, i32* %13)
store i32 %14, i32* %8
%15 = load i32*, i32** %7
%16 = call i32 @fclose(i32* %15)
%17 = load i32, i32* %8
ret i32 %17
}

LLVM IR (-O2):
@.str = [3 x i8] c"wb\00"
define i32 @dump_to_file(i32* nocapture %0, i32 %1, i8* nocapture %2) {
%4 = tail call i32* @fopen(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @fwrite(i32* %0, i32 %1, i32 1, i32* %4)
%6 = tail call i32 @fclose(i32* %4)
ret i32 %5
}
/* Variables and functions */
int RTFGetToken();
int /*<<< orphan*/ RTFRouteToken();
void RTFRead(void) {
  while (RTFGetToken() != 4) {
    RTFRouteToken();
  }
}


x86 assembly (clang, -O0):
<RTFRead>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <RTFRead+0x9>
mov    $0x0,%al
call   1030 <RTFGetToken@plt>
cmp    $0x4,%eax
je     1145 <RTFRead+0x25>
mov    $0x0,%al
call   1040 <RTFRouteToken@plt>
jmp    1129 <RTFRead+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTFRead>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <RTFGetToken@plt>
cmp    $0x4,%eax
je     1145 <RTFRead+0x25>
xor    %eax,%eax
call   1040 <RTFRouteToken@plt>
jmp    1130 <RTFRead+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @RTFRead() {
br label %1
1: ; preds = %4, %0
%2 = call i32 (...) @RTFGetToken()
%3 = icmp ne i32 %2, 4
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = call i32 (...) @RTFRouteToken()
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @RTFRead() {
%1 = tail call i32 (...) @RTFGetToken()
%2 = icmp eq i32 %1, 4
br i1 %2, label %7, label %3
3: ; preds = %0, %3
%4 = tail call i32 (...) @RTFRouteToken()
%5 = tail call i32 (...) @RTFGetToken()
%6 = icmp eq i32 %5, 4
br i1 %6, label %7, label %3
7: ; preds = %3, %0
ret void
}
/* Variables and functions */
float ceil(float x) { return (float)((int)x + 1.0f); }


x86 assembly (clang, -O0):
<ceil>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  0xee6(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil>:
cvttps2dq %xmm0,%xmm0
cvtdq2ps %xmm0,%xmm0
addss  0xef1(%rip),%xmm0
ret

LLVM IR (-O0):
define float @ceil(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fptosi float %3 to i32
%5 = sitofp i32 %4 to float
%6 = fadd float %5, 1.000000e+00
ret float %6
}

LLVM IR (-O2):
define float @ceil(float %0) {
%2 = fptosi float %0 to i32
%3 = sitofp i32 %2 to float
%4 = fadd float %3, 1.000000e+00
ret float %4
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int abs(int);
uint16_t convertNativeToAgc(int n) {
  uint16_t i;
  i = (uint16_t)(abs(n) & 077777);
  if (n < 0)
    i |= 040000;
  return (i);
}


x86 assembly (clang, -O0):
<convertNativeToAgc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
and    $0x7fff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1140 <convertNativeToAgc+0x30>
mov    -0x8(%rbp),%eax
or     $0x4000,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertNativeToAgc>:
mov    %edi,%ecx
neg    %ecx
cmovs  %edi,%ecx
and    $0x7fff,%ecx
mov    %ecx,%eax
or     $0x4000,%eax
test   %edi,%edi
cmovns %ecx,%eax
ret

LLVM IR (-O0):
define i32 @convertNativeToAgc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @abs(i32 %4)
%6 = and i32 %5, 32767
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = or i32 %10, 16384
store i32 %11, i32* %3
br label %12
12: ; preds = %9, %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @convertNativeToAgc(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%3 = and i32 %2, 32767
%4 = icmp slt i32 %0, 0
%5 = or i32 %3, 16384
%6 = select i1 %4, i32 %5, i32 %3
ret i32 %6
}
void outsb(short port, void *buf, int size) {
  __asm__("rep outsb" ::"S"(buf), "d"(port), "c"(size));
}


x86 assembly (clang, -O0):
<outsb>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x2(%rbp),%dx
mov    -0x14(%rbp),%ecx
rep outsb %ds:(%rsi),(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outsb>:
mov    %edx,%ecx
mov    %edi,%edx
rep outsb %ds:(%rsi),(%dx)
ret

LLVM IR (-O0):
define void @outsb(i16 signext %0, i8* %1, i32 %2) {
%4 = alloca i16
%5 = alloca i8*
%6 = alloca i32
store i16 %0, i16* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i16, i16* %4
%9 = load i32, i32* %6
ret void
}

LLVM IR (-O2):
define void @outsb(i16 signext %0, i8* %1, i32 %2) {
tail call void asm sideeffect "rep outsb", "{si},{dx},{cx},~{dirflag},~{fpsr},~{flags}"(i8* %1, i16 %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mintaka_state_schedule();
void mintaka_state_schedule_() { mintaka_state_schedule(); }


x86 assembly (clang, -O0):
<mintaka_state_schedule_>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mintaka_state_schedule@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mintaka_state_schedule_>:
xor    %eax,%eax
jmp    1030 <mintaka_state_schedule@plt>

LLVM IR (-O0):
define void @mintaka_state_schedule_() {
%1 = call i32 (...) @mintaka_state_schedule()
ret void
}

LLVM IR (-O2):
define void @mintaka_state_schedule_() {
%1 = tail call i32 (...) @mintaka_state_schedule()
ret void
}