xunge/DecIR huggingface dataset:
int max(int a, int b) { return (a > b) ? (a) : (b); }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
scalar_t__ a_malloc(int);
void user_malloc_leak_bad() { int *x = (int *)a_malloc(sizeof(int)); }


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

x86 assembly (clang, -O2):
<user_malloc_leak_bad>:
mov    $0x4,%edi
jmp    1030 <a_malloc@plt>

LLVM IR (-O0):
define void @user_malloc_leak_bad() {
%1 = alloca i32*
%2 = call i64 @a_malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
ret void
}

LLVM IR (-O2):
define void @user_malloc_leak_bad() {
%1 = tail call i64 @a_malloc(i32 4)
ret void
}
void main() {
  unsigned int who_am_i();
  who_am_i();
}


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @who_am_i()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ la;

/* Variables and functions */
int /*<<< orphan*/ send_frame(char *, int);
sendLA(unsigned char nr, unsigned char cr) {
  char la[] = {3, 5, 0, 0};
  la[2] = nr;
  la[3] = cr;
  send_frame(la, sizeof(la));
}


x86 assembly (clang, -O0):
<sendLA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    0xed6(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    -0x5(%rbp),%al
mov    %al,-0x8(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x7(%rbp)
lea    -0xa(%rbp),%rdi
mov    $0x4,%esi
call   1030 <send_frame@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendLA>:
push   %rax
movl   $0x503,0x4(%rsp)
mov    %dil,0x6(%rsp)
mov    %sil,0x7(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <send_frame@plt>
pop    %rcx
ret

LLVM IR (-O0):
@__const.sendLA.la = [4 x i8] c"\03\05\00\00"
define i32 @sendLA(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
%6 = alloca [4 x i8]
store i8 %0, i8* %4
store i8 %1, i8* %5
%7 = bitcast [4 x i8]* %6 to i8*
%8 = load i8, i8* %4
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 2
store i8 %8, i8* %9
%10 = load i8, i8* %5
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 3
store i8 %10, i8* %11
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%13 = call i32 @send_frame(i8* %12, i32 4)
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @sendLA(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to [4 x i8]*
%5 = bitcast i32* %3 to i8*
store i32 1283, i32* %3
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 2
store i8 %0, i8* %6
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 3
store i8 %1, i8* %7
%8 = call i32 @send_frame(i8* %5, i32 4)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *my_malloc(int);
void af2e() {
  int *p = my_malloc(12);
  if (!p)
    return;
  free(p);
}


x86 assembly (clang, -O0):
<af2e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1040 <my_malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1146 <af2e+0x26>
jmp    114f <af2e+0x2f>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<af2e>:
push   %rax
mov    $0xc,%edi
call   1040 <my_malloc@plt>
test   %rax,%rax
je     1139 <af2e+0x19>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @af2e() {
%1 = alloca i32*
%2 = call i32* @my_malloc(i32 12)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp ne i32* %3, null
br i1 %4, label %6, label %5
5: ; preds = %0
br label %9
6: ; preds = %0
%7 = load i32*, i32** %1
%8 = call i32 @free(i32* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @af2e() {
%1 = tail call i32* @my_malloc(i32 12)
%2 = icmp eq i32* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @free(i32* %1)
br label %5
5: ; preds = %0, %3
ret void
}
/* Variables and functions */
size_t randint(int);
void placeStairs(char mapArray[15][15], int roomWidth, int roomHeight) {
  mapArray[randint(roomWidth)][randint(roomHeight)] = '>';
}


x86 assembly (clang, -O0):
<placeStairs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <randint@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
imul   $0xf,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <randint@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
movb   $0x3e,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<placeStairs>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rdi,%r14
mov    %esi,%edi
call   1030 <randint@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1030 <randint@plt>
lea    (%rbx,%rbx,4),%rcx
lea    (%rcx,%rcx,2),%rcx
add    %r14,%rcx
movb   $0x3e,(%rax,%rcx,1)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @placeStairs([15 x i8]* %0, i32 %1, i32 %2) {
%4 = alloca [15 x i8]*
%5 = alloca i32
%6 = alloca i32
store [15 x i8]* %0, [15 x i8]** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load [15 x i8]*, [15 x i8]** %4
%8 = load i32, i32* %5
%9 = call i64 @randint(i32 %8)
%10 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 %9
%11 = load i32, i32* %6
%12 = call i64 @randint(i32 %11)
%13 = getelementptr inbounds [15 x i8], [15 x i8]* %10, i64 0, i64 %12
store i8 62, i8* %13
ret void
}

LLVM IR (-O2):
define void @placeStairs([15 x i8]* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = tail call i64 @randint(i32 %1)
%5 = tail call i64 @randint(i32 %2)
%6 = getelementptr inbounds [15 x i8], [15 x i8]* %0, i64 %4, i64 %5
store i8 62, i8* %6
ret void
}
int mystery(int a, int b) {
  if (1 == b) {
    return a;
  } else {
    return a + mystery(a, b - 1);
  }
}


x86 assembly (clang, -O0):
<mystery>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x1,%eax
cmp    -0xc(%rbp),%eax
jne    1137 <mystery+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <mystery+0x45>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <mystery@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystery>:
lea    -0x1(%rsi),%ecx
imul   %edi,%ecx
xor    %eax,%eax
cmp    $0x1,%esi
cmovne %ecx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @mystery(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 1, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
store i32 %9, i32* %3
br label %17
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = sub nsw i32 %13, 1
%15 = call i32 @mystery(i32 %12, i32 %14)
%16 = add nsw i32 %11, %15
store i32 %16, i32* %3
br label %17
17: ; preds = %10, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @mystery(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 1
%4 = add i32 %1, -1
%5 = mul i32 %4, %0
%6 = select i1 %3, i32 0, i32 %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ chainIdSet(int);
void chainIdReset() { chainIdSet(1); }


x86 assembly (clang, -O0):
<chainIdReset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <chainIdSet@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chainIdReset>:
mov    $0x1,%edi
jmp    1030 <chainIdSet@plt>

LLVM IR (-O0):
define void @chainIdReset() {
%1 = call i32 @chainIdSet(i32 1)
ret void
}

LLVM IR (-O2):
define void @chainIdReset() {
%1 = tail call i32 @chainIdSet(i32 1)
ret void
}
fleu(x, y) unsigned long long int x;
unsigned long long int y;
{
  if (x <= y)
    return 13;
  else
    return 140;
}


x86 assembly (clang, -O0):
<fleu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
ja     1126 <fleu+0x26>
movl   $0xd,-0x4(%rbp)
jmp    112d <fleu+0x2d>
movl   $0x8c,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fleu>:
cmp    %rsi,%rdi
mov    $0x8c,%ecx
mov    $0xd,%eax
cmova  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fleu(i64 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = icmp ule i64 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 13, i32* %3
br label %11
10: ; preds = %2
store i32 140, i32* %3
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @fleu(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i32 140, i32 13
ret i32 %4
}
int quatLibUnload(int argc, void *argv[]) { return 1; }


x86 assembly (clang, -O0):
<quatLibUnload>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @quatLibUnload(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
ret i32 1
}

LLVM IR (-O2):
define i32 @quatLibUnload(i32 %0, i8** nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
float asin(float);
float _asin(float s) { return asin(s); }


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

x86 assembly (clang, -O2):
<_asin>:
jmp    1030 <asin@plt>

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

LLVM IR (-O2):
define float @_asin(float %0) {
%2 = tail call float @asin(float %0)
ret float %2
}
/* Variables and functions */
double sqrtf(int /*<<< orphan*/);
int /*<<< orphan*/ vec_dot(double *const, double *const);
double vec_len(double *const vector) { return sqrtf(vec_dot(vector, vector)); }


x86 assembly (clang, -O0):
<vec_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <vec_dot@plt>
mov    %eax,%edi
call   1040 <sqrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec_len>:
push   %rax
mov    %rdi,%rsi
call   1030 <vec_dot@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sqrtf@plt>

LLVM IR (-O0):
define double @vec_len(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = load double*, double** %2
%5 = call i32 @vec_dot(double* %3, double* %4)
%6 = call double @sqrtf(i32 %5)
ret double %6
}

LLVM IR (-O2):
define double @vec_len(double* %0) {
%2 = tail call i32 @vec_dot(double* %0, double* %0)
%3 = tail call double @sqrtf(i32 %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ print(char *, int);
char *yyBEGIN(char *);
int /*<<< orphan*/ yyEND(char const *);
void s_space(int n) {
  do {
    const char *yytag = yyBEGIN("LI");
    ;
    print("space %d", n);
    yyEND(yytag);
  } while (0);
}


x86 assembly (clang, -O0):
<s_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1050 <yyBEGIN@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1040 <print@plt>
mov    -0x10(%rbp),%rdi
call   1030 <yyEND@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_space>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0xec4(%rip),%rdi
call   1050 <yyBEGIN@plt>
mov    %rax,%rbx
lea    0xeb8(%rip),%rdi
mov    %ebp,%esi
call   1040 <print@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <yyEND@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"LI\00"
@.str.1 = [9 x i8] c"space %d\00"
define void @s_space(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
br label %4
4: ; preds = %1
%5 = call i8* @yyBEGIN(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %3
%6 = load i32, i32* %2
%7 = call i32 @print(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i8*, i8** %3
%9 = call i32 @yyEND(i8* %8)
br label %10
10: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"LI\00"
@.str.1 = [9 x i8] c"space %d\00"
define void @s_space(i32 %0) {
%2 = tail call i8* @yyBEGIN(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @print(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%4 = tail call i32 @yyEND(i8* %2)
ret void
}
/* Type definitions */
struct stkpool {
  int dummy;
};

/* Variables and functions */
void *stkp_alloc(struct stkpool *);
void *__stkp_alloc_agent(void *alloc, unsigned long size) {
  return stkp_alloc((struct stkpool *)alloc);
}


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

x86 assembly (clang, -O2):
<__stkp_alloc_agent>:
jmp    1030 <stkp_alloc@plt>

LLVM IR (-O0):
%struct.stkpool = type { i32 }
define i8* @__stkp_alloc_agent(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to %struct.stkpool*
%7 = call i8* @stkp_alloc(%struct.stkpool* %6)
ret i8* %7
}

LLVM IR (-O2):
%struct.stkpool = type { i32 }
define i8* @__stkp_alloc_agent(i8* %0, i64 %1) {
%3 = bitcast i8* %0 to %struct.stkpool*
%4 = tail call i8* @stkp_alloc(%struct.stkpool* %3)
ret i8* %4
}
/* Variables and functions */
int tilt3d_mat_transpose(double **);
int tilt3d_matrix(double *, double **);
int tilt3d_inverse_matrix(double TILT[3], double R[3][3]) {
  int status = -1;
  if ((status = tilt3d_matrix(TILT, R)))
    goto tilt3d_inverse_matrix_error;
  if ((status = tilt3d_mat_transpose(R)))
    goto tilt3d_inverse_matrix_error;
tilt3d_inverse_matrix_error:
  return (status);
}


x86 assembly (clang, -O0):
<tilt3d_inverse_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <tilt3d_matrix@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1155 <tilt3d_inverse_matrix+0x35>
jmp    1174 <tilt3d_inverse_matrix+0x54>
mov    -0x10(%rbp),%rdi
call   1040 <tilt3d_mat_transpose@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     116f <tilt3d_inverse_matrix+0x4f>
jmp    1174 <tilt3d_inverse_matrix+0x54>
jmp    1174 <tilt3d_inverse_matrix+0x54>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tilt3d_inverse_matrix>:
push   %rbx
mov    %rsi,%rbx
call   1030 <tilt3d_matrix@plt>
test   %eax,%eax
je     112f <tilt3d_inverse_matrix+0xf>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <tilt3d_mat_transpose@plt>

LLVM IR (-O0):
define i32 @tilt3d_inverse_matrix(double* %0, [3 x double]* %1) {
%3 = alloca double*
%4 = alloca [3 x double]*
%5 = alloca i32
store double* %0, double** %3
store [3 x double]* %1, [3 x double]** %4
store i32 -1, i32* %5
%6 = load double*, double** %3
%7 = load [3 x double]*, [3 x double]** %4
%8 = bitcast [3 x double]* %7 to double**
%9 = call i32 @tilt3d_matrix(double* %6, double** %8)
store i32 %9, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
br label %19
12: ; preds = %2
%13 = load [3 x double]*, [3 x double]** %4
%14 = bitcast [3 x double]* %13 to double**
%15 = call i32 @tilt3d_mat_transpose(double** %14)
store i32 %15, i32* %5
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %12
br label %19
18: ; preds = %12
br label %19
19: ; preds = %18, %17, %11
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @tilt3d_inverse_matrix(double* %0, [3 x double]* %1) {
%3 = bitcast [3 x double]* %1 to double**
%4 = tail call i32 @tilt3d_matrix(double* %0, double** %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @tilt3d_mat_transpose(double** %3)
br label %8
8: ; preds = %6, %2
%9 = phi i32 [ %4, %2 ], [ %7, %6 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ isalpha(char);
int superLetter(char ch) {
  if (isalpha(ch) || ch == '_')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<superLetter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
jne    113e <superLetter+0x2e>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
jne    114a <superLetter+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <superLetter+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<superLetter>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalpha@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @superLetter(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isalpha(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 95
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 1, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @superLetter(i8 signext %0) {
%2 = tail call i64 @isalpha(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 95
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t addip123(uint32_t x) { return x + 123; }


x86 assembly (clang, -O0):
<addip123>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x7b,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addip123>:
lea    0x7b(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @addip123(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 123
ret i64 %4
}

LLVM IR (-O2):
define i64 @addip123(i64 %0) {
%2 = add nsw i64 %0, 123
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ test(int);
int main() {
  test(0x7F800000);
  test(0x7F800001);
  test(0x3F800000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7f800000,%edi
call   1030 <test@plt>
mov    $0x7f800001,%edi
call   1030 <test@plt>
mov    $0x3f800000,%edi
call   1030 <test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7f800000,%edi
call   1030 <test@plt>
mov    $0x7f800001,%edi
call   1030 <test@plt>
mov    $0x3f800000,%edi
call   1030 <test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test(i32 2139095040)
%3 = call i32 @test(i32 2139095041)
%4 = call i32 @test(i32 1065353216)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 2139095040)
%2 = tail call i32 @test(i32 2139095041)
%3 = tail call i32 @test(i32 1065353216)
ret i32 0
}
/* Variables and functions */
int getline(char *, int);
int /*<<< orphan*/ printf(char *, int, char *);
int main() {
  int len;
  char line[1000];
  while ((len = getline(line, 1000)) > 0)
    if (len > 80)
      printf("line length:%d %s", len, line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1174 <main+0x54>
cmpl   $0x50,-0x8(%rbp)
jle    116f <main+0x4f>
mov    -0x8(%rbp),%esi
lea    -0x3f0(%rbp),%rdx
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
test   %eax,%eax
jle    1175 <main+0x55>
lea    0xebe(%rip),%r14
mov    %rsp,%rbx
jmp    1161 <main+0x41>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
test   %eax,%eax
jle    1175 <main+0x55>
cmp    $0x51,%eax
jb     1150 <main+0x30>
mov    %r14,%rdi
mov    %eax,%esi
mov    %rbx,%rdx
call   1030 <printf@plt>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [18 x i8] c"line length:%d %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %15, %0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%6 = call i32 @getline(i8* %5, i32 1000)
store i32 %6, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 80
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = load i32, i32* %2
%13 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%14 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %13)
br label %15
15: ; preds = %11, %8
br label %4
16: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"line length:%d %s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = phi i32 [ %11, %10 ], [ %3, %0 ]
%7 = icmp ugt i32 %6, 80
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i32 @getline(i8* %2, i32 1000)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_ioprio_be();
void pcap_mm_init_once(void) { set_ioprio_be(); }


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

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

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

LLVM IR (-O2):
define void @pcap_mm_init_once() {
%1 = tail call i32 (...) @set_ioprio_be()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void uso(void) {
  fprintf(stderr, "shp2int.exe <lista de shapes a convertir a formato interno "
                  "sin extensión>\n");
}


x86 assembly (clang, -O0):
<uso>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uso>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [76 x i8] c"shp2int.exe <lista de shapes a convertir a formato interno sin extensi\C3\B3n>\0A\00"
define void @uso() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [76 x i8] c"shp2int.exe <lista de shapes a convertir a formato interno sin extensi\C3\B3n>\0A\00"
define void @uso() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CodecWrapper_Stop(int /*<<< orphan*/);
void InstructCodec_Stop(void *rslObj) {
  ;
  CodecWrapper_Stop(0);
}


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

x86 assembly (clang, -O2):
<InstructCodec_Stop>:
xor    %edi,%edi
jmp    1030 <CodecWrapper_Stop@plt>

LLVM IR (-O0):
define void @InstructCodec_Stop(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @CodecWrapper_Stop(i32 0)
ret void
}

LLVM IR (-O2):
define void @InstructCodec_Stop(i8* nocapture readnone %0) {
%2 = tail call i32 @CodecWrapper_Stop(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ main_ui_init();
void device_ui_init() { main_ui_init(); }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @RTUuidToUtf16() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EX_SOFTWARE;
int /*<<< orphan*/ pfpanic(char *, unsigned short, unsigned short, char const *,
                           char const *, int, int, int /*<<< orphan*/);
void __pfpanic_zmq_socket_create(unsigned short _syslog,
                                 unsigned short _verbose,
                                 const char *_function_name,
                                 const char *_file_name, int _line_number,
                                 int _errno) {
  pfpanic("Unable to create ZeroMQ socket", _syslog, _verbose, _function_name,
          _file_name, _line_number, _errno, EX_SOFTWARE);
}


x86 assembly (clang, -O0):
<__pfpanic_zmq_socket_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %si,%ax
mov    %di,%si
mov    %si,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x2(%rbp),%si
mov    -0x4(%rbp),%dx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    -0x20(%rbp),%r10d
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
lea    0xea2(%rip),%rdi
movzwl %si,%esi
movzwl %dx,%edx
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <pfpanic@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__pfpanic_zmq_socket_create>:
push   %rax
mov    %r9d,%r10d
mov    %r8d,%r9d
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2eb8(%rip),%rdi
mov    (%rdi),%eax
lea    0xecf(%rip),%rdi
push   %rax
push   %r10
call   1030 <pfpanic@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Unable to create ZeroMQ socket\00"
@EX_SOFTWARE = global i32 0
define void @__pfpanic_zmq_socket_create(i16 zeroext %0, i16 zeroext %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i16
%8 = alloca i16
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
store i16 %0, i16* %7
store i16 %1, i16* %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i16, i16* %7
%14 = load i16, i16* %8
%15 = load i8*, i8** %9
%16 = load i8*, i8** %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = load i32, i32* @EX_SOFTWARE
%20 = call i32 @pfpanic(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i16 zeroext %13, i16 zeroext %14, i8* %15, i8* %16, i32 %17, i32 %18, i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Unable to create ZeroMQ socket\00"
@EX_SOFTWARE = global i32 0
define void @__pfpanic_zmq_socket_create(i16 zeroext %0, i16 zeroext %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = load i32, i32* @EX_SOFTWARE
%8 = tail call i32 @pfpanic(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i16 zeroext %0, i16 zeroext %1, i8* %2, i8* %3, i32 %4, i32 %5, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GenExtendRegAIfNeeded(int);
int /*<<< orphan*/ GenPrintInstr2Operands(int, int /*<<< orphan*/,
                                          int /*<<< orphan*/,
                                          int /*<<< orphan*/, int, int);
int /*<<< orphan*/ GenSelectByteOrWord(int, int);
void GenReadIdent(int opSz, int label) {
  GenPrintInstr2Operands(0x00, 0, GenSelectByteOrWord(0x0B, opSz), 0, 0x10,
                         label);
  GenExtendRegAIfNeeded(opSz);
}


x86 assembly (clang, -O0):
<GenReadIdent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xb,%edi
call   1030 <GenSelectByteOrWord@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%r9d
xor    %ecx,%ecx
mov    $0x10,%r8d
mov    %ecx,%edi
mov    %ecx,%esi
call   1040 <GenPrintInstr2Operands@plt>
mov    -0x4(%rbp),%edi
call   1050 <GenExtendRegAIfNeeded@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenReadIdent>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0xb,%edi
mov    %ebp,%esi
call   1030 <GenSelectByteOrWord@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0x10,%r8d
mov    %ebx,%r9d
call   1040 <GenPrintInstr2Operands@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <GenExtendRegAIfNeeded@plt>

LLVM IR (-O0):
define void @GenReadIdent(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @GenSelectByteOrWord(i32 11, i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @GenPrintInstr2Operands(i32 0, i32 0, i32 %6, i32 0, i32 16, i32 %7)
%9 = load i32, i32* %3
%10 = call i32 @GenExtendRegAIfNeeded(i32 %9)
ret void
}

LLVM IR (-O2):
define void @GenReadIdent(i32 %0, i32 %1) {
%3 = tail call i32 @GenSelectByteOrWord(i32 11, i32 %0)
%4 = tail call i32 @GenPrintInstr2Operands(i32 0, i32 0, i32 %3, i32 0, i32 16, i32 %1)
%5 = tail call i32 @GenExtendRegAIfNeeded(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ base_err_alloc(size_t);
void *calloc(size_t, size_t);
void *base_calloc(size_t nmemb, size_t size) {
  void *ptr = calloc(nmemb, size);
  if (ptr == NULL) {
    base_err_alloc(nmemb * size);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<base_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115a <base_calloc+0x3a>
mov    -0x8(%rbp),%rdi
imul   -0x10(%rbp),%rdi
call   1040 <base_err_alloc@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<base_calloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1144 <base_calloc+0x24>
imul   %r15,%r14
mov    %r14,%rdi
call   1040 <base_err_alloc@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @base_calloc(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 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i64, i64* %3
%13 = load i64, i64* %4
%14 = mul i64 %12, %13
%15 = call i32 @base_err_alloc(i64 %14)
br label %16
16: ; preds = %11, %2
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define noalias i8* @base_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = mul i64 %1, %0
%7 = tail call i32 @base_err_alloc(i64 %6)
br label %8
8: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int bs_get_info(int, char *, char **);
int /*<<< orphan*/ snprintf(char *, int, char *);
int bs_list_tubes_watched(int fd, char **yaml) {
  char command[64] = {0};
  snprintf(command, 64, "list-tubes-watched\r\n");
  return bs_get_info(fd, command, yaml);
}


x86 assembly (clang, -O0):
<bs_list_tubes_watched>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1050 <memset@plt>
lea    -0x50(%rbp),%rdi
mov    $0x40,%esi
lea    0xea1(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x4(%rbp),%edi
lea    -0x50(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <bs_get_info@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bs_list_tubes_watched>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xeb6(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x40,%esi
call   1040 <snprintf@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <bs_get_info@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"list-tubes-watched\0D\0A\00"
define i32 @bs_list_tubes_watched(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [64 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = bitcast [64 x i8]* %5 to i8*
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%8 = call i32 @snprintf(i8* %7, i32 64, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %3
%10 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%11 = load i8**, i8*** %4
%12 = call i32 @bs_get_info(i32 %9, i8* %10, i8** %11)
ret i32 %12
}

LLVM IR (-O2):
@.str = [21 x i8] c"list-tubes-watched\0D\0A\00"
define i32 @bs_list_tubes_watched(i32 %0, i8** %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 64, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @bs_get_info(i32 %0, i8* %4, i8** %1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void try_free(void *ptr) {
  if (ptr)
    free(ptr);
}


x86 assembly (clang, -O0):
<try_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <try_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<try_free>:
test   %rdi,%rdi
je     111a <try_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @try_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @try_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
__attribute__((no, noclone)) short foo11(short arg) {
  short ret = 1;
  if (arg + 1 < ((!0) ? -(1 << (sizeof(char) * 8 - 1)) : 0) + 1 ||
      arg + 1 > ((!0) ? ((1 << (sizeof(char) * 8 - 1)) - 1)
                      : ((1 << (sizeof(char) * 8)) - 1)) -
                    1)
    return ret;
  arg = arg + 1;
  ret = (unsigned char)arg;
  return arg;
}


x86 assembly (clang, -O0):
<foo11>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movw   $0x1,-0x6(%rbp)
movswl -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0xffffff81,%eax
jl     1131 <foo11+0x31>
movswl -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0x7e,%eax
jle    113e <foo11+0x3e>
mov    -0x6(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    115c <foo11+0x5c>
movswl -0x4(%rbp),%eax
add    $0x1,%eax
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%ax
movzbl %al,%eax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo11>:
lea    0x1(%rdi),%ecx
add    $0xffffff82,%edi
movzwl %di,%eax
cmp    $0xff02,%eax
mov    $0x1,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define signext i16 @foo11(i16 signext %0) {
%2 = alloca i16
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 1, i16* %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = add nsw i32 %6, 1
%8 = icmp slt i32 %7, -127
br i1 %8, label %14, label %9
9: ; preds = %1
%10 = load i16, i16* %3
%11 = sext i16 %10 to i32
%12 = add nsw i32 %11, 1
%13 = icmp sgt i32 %12, 126
br i1 %13, label %14, label %16
14: ; preds = %9, %1
%15 = load i16, i16* %4
store i16 %15, i16* %2
br label %25
16: ; preds = %9
%17 = load i16, i16* %3
%18 = sext i16 %17 to i32
%19 = add nsw i32 %18, 1
%20 = trunc i32 %19 to i16
store i16 %20, i16* %3
%21 = load i16, i16* %3
%22 = trunc i16 %21 to i8
%23 = zext i8 %22 to i16
store i16 %23, i16* %4
%24 = load i16, i16* %3
store i16 %24, i16* %2
br label %25
25: ; preds = %16, %14
%26 = load i16, i16* %2
ret i16 %26
}

LLVM IR (-O2):
define signext i16 @foo11(i16 signext %0) {
%2 = add i16 %0, 1
%3 = add i16 %0, -126
%4 = icmp ult i16 %3, -254
%5 = select i1 %4, i16 1, i16 %2
ret i16 %5
}
/* Variables and functions */
int /*<<< orphan*/ add_sign(char *, char *, int);
int main(int argc, char *argv[]) {
  add_sign("u-boot.bin", "u-boot-4212.bin", 1);
  add_sign("u-boot.bin", "u-boot-4412.bin", 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x1,%edx
call   1030 <add_sign@plt>
lea    0xebb(%rip),%rdi
lea    0xecf(%rip),%rsi
mov    $0x1,%edx
call   1030 <add_sign@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
lea    0xeec(%rip),%rsi
mov    %rbx,%rdi
mov    $0x1,%edx
call   1030 <add_sign@plt>
lea    0xee8(%rip),%rsi
mov    %rbx,%rdi
mov    $0x1,%edx
call   1030 <add_sign@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"u-boot.bin\00"
@.str.1 = [16 x i8] c"u-boot-4212.bin\00"
@.str.2 = [16 x i8] c"u-boot-4412.bin\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @add_sign(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 1)
%7 = call i32 @add_sign(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"u-boot.bin\00"
@.str.1 = [16 x i8] c"u-boot-4212.bin\00"
@.str.2 = [16 x i8] c"u-boot-4412.bin\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @add_sign(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 1)
%4 = tail call i32 @add_sign(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int spidev_msg(int, char *, char *, size_t);
int spi_read(int fd, char *buf, size_t len) {
  return spidev_msg(fd, buf, buf, len);
}


x86 assembly (clang, -O0):
<spi_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <spidev_msg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_read>:
mov    %rdx,%rcx
mov    %rsi,%rdx
jmp    1030 <spidev_msg@plt>

LLVM IR (-O0):
define i32 @spi_read(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @spidev_msg(i32 %7, i8* %8, i8* %9, i64 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @spi_read(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @spidev_msg(i32 %0, i8* %1, i8* %1, i64 %2)
ret i32 %4
}
void fun(char *a) {
  for (; *a; a++)
    if (*a >= 'A' && *a <= 'Z')
      *a = *a + 32;
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115d <fun+0x5d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1147 <fun+0x47>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     1147 <fun+0x47>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
add    $0x20,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
jmp    114c <fun+0x4c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <fun+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
mov    (%rdi),%al
test   %al,%al
je     112a <fun+0x2a>
add    $0x1,%rdi
jmp    111b <fun+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     112a <fun+0x2a>
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     1110 <fun+0x10>
add    $0x20,%al
mov    %al,-0x1(%rdi)
jmp    1110 <fun+0x10>
ret

LLVM IR (-O0):
define void @fun(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %25, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %28
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp sge i32 %10, 65
br i1 %11, label %12, label %24
12: ; preds = %7
%13 = load i8*, i8** %2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp sle i32 %15, 90
br i1 %16, label %17, label %24
17: ; preds = %12
%18 = load i8*, i8** %2
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = add nsw i32 %20, 32
%22 = trunc i32 %21 to i8
%23 = load i8*, i8** %2
store i8 %22, i8* %23
br label %24
24: ; preds = %17, %12, %7
br label %25
25: ; preds = %24
%26 = load i8*, i8** %2
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %2
br label %3
28: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @fun(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %4, %9
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void t1() {
  int arr[10];
  int i = 0;
  arr[0] = 5;
  arr[1] = 5;
  arr[2] = 5;
  for (i = 0; i < 9; i++) {
  }
  int j = arr[i];
  assert(j == 5);
}


x86 assembly (clang, -O0):
<t1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x34(%rbp)
movl   $0x5,-0x30(%rbp)
movl   $0x5,-0x2c(%rbp)
movl   $0x5,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x9,-0x34(%rbp)
jge    1158 <t1+0x48>
jmp    114a <t1+0x3a>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    113b <t1+0x2b>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x5,-0x38(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1>:
xor    %edi,%edi
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define void @t1() {
%1 = tail call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
int rand_int_between(int, int);
int spin_red(int bet) {
  int payout;
  int slot = rand_int_between(1, 38);
  if (slot <= 18) {
    payout = bet;
  } else if (slot <= 36) {
    payout = -bet;
  } else {
    payout = -(bet / 2);
  }
  return payout;
}


x86 assembly (clang, -O0):
<spin_red>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x26,%esi
call   1030 <rand_int_between@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x12,-0xc(%rbp)
jg     1142 <spin_red+0x32>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1172 <spin_red+0x62>
cmpl   $0x24,-0xc(%rbp)
jg     1159 <spin_red+0x49>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    116d <spin_red+0x5d>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    1172 <spin_red+0x62>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spin_red>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
mov    $0x26,%esi
call   1030 <rand_int_between@plt>
cmp    $0x13,%eax
jl     113d <spin_red+0x2d>
cmp    $0x24,%eax
ja     1130 <spin_red+0x20>
neg    %ebx
jmp    113d <spin_red+0x2d>
mov    %ebx,%eax
shr    $0x1f,%eax
add    %ebx,%eax
sar    %eax
neg    %eax
mov    %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @spin_red(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 @rand_int_between(i32 1, i32 38)
store i32 %5, i32* %4
%6 = load i32, i32* %4
%7 = icmp sle i32 %6, 18
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %2
store i32 %9, i32* %3
br label %21
10: ; preds = %1
%11 = load i32, i32* %4
%12 = icmp sle i32 %11, 36
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %2
%15 = sub nsw i32 0, %14
store i32 %15, i32* %3
br label %20
16: ; preds = %10
%17 = load i32, i32* %2
%18 = sdiv i32 %17, 2
%19 = sub nsw i32 0, %18
store i32 %19, i32* %3
br label %20
20: ; preds = %16, %13
br label %21
21: ; preds = %20, %8
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @spin_red(i32 %0) {
%2 = tail call i32 @rand_int_between(i32 1, i32 38)
%3 = icmp slt i32 %2, 19
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = icmp ult i32 %2, 37
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = sub nsw i32 0, %0
br label %10
8: ; preds = %4
%9 = sdiv i32 %0, -2
br label %10
10: ; preds = %1, %6, %8
%11 = phi i32 [ %7, %6 ], [ %9, %8 ], [ %0, %1 ]
ret i32 %11
}