xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Open Source SW Project\n");
  printf("First GitHub Training\n");
  printf("201244036 LeeSeongmin. \n");
  printf("20124403 JiHeonHong. \n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
call   1030 <printf@plt>
lea    0xefe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xf09(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Open Source SW Project\0A\00"
@.str.1 = [23 x i8] c"First GitHub Training\0A\00"
@.str.2 = [25 x i8] c"201244036 LeeSeongmin. \0A\00"
@.str.3 = [23 x i8] c"20124403 JiHeonHong. \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"Open Source SW Project\00"
@str.4 = [22 x i8] c"First GitHub Training\00"
@str.5 = [24 x i8] c"201244036 LeeSeongmin. \00"
@str.6 = [22 x i8] c"20124403 JiHeonHong. \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, float);
float sqrt(int);
int main() {
  int x = 16;
  float r;
  r = sqrt(x);
  printf("\n Raiz quadrada de %d = %f\n", x, r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x10,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <sqrt@plt>
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%esi
movss  -0xc(%rbp),%xmm0
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x10,%edi
call   1040 <sqrt@plt>
lea    0xece(%rip),%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"\0A Raiz quadrada de %d = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 0, i32* %1
store i32 16, i32* %2
%4 = load i32, i32* %2
%5 = call float @sqrt(i32 %4)
store float %5, float* %3
%6 = load i32, i32* %2
%7 = load float, float* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %6, float %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"\0A Raiz quadrada de %d = %f\0A\00"
define i32 @main() {
%1 = tail call float @sqrt(i32 16)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 16, float %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ burnstack(int);
int /*<<< orphan*/ sign(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                        int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
                        size_t);
void eddsa_sign(uint8_t sig[64], const uint8_t sec[32], const uint8_t pub[32],
                const uint8_t *data, size_t len) {
  sign(sig, sec, pub, data, len);
  burnstack(4096);
}


x86 assembly (clang, -O0):
<eddsa_sign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <sign@plt>
mov    $0x1000,%edi
call   1040 <burnstack@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eddsa_sign>:
push   %rax
call   1030 <sign@plt>
mov    $0x1000,%edi
pop    %rax
jmp    1040 <burnstack@plt>

LLVM IR (-O0):
define void @eddsa_sign(i32* %0, i32* %1, i32* %2, i32* %3, i64 %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i64
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i64 %4, i64* %10
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = load i32*, i32** %8
%14 = load i32*, i32** %9
%15 = load i64, i64* %10
%16 = call i32 @sign(i32* %11, i32* %12, i32* %13, i32* %14, i64 %15)
%17 = call i32 @burnstack(i32 4096)
ret void
}

LLVM IR (-O2):
define void @eddsa_sign(i32* %0, i32* %1, i32* %2, i32* %3, i64 %4) {
%6 = tail call i32 @sign(i32* %0, i32* %1, i32* %2, i32* %3, i64 %4)
%7 = tail call i32 @burnstack(i32 4096)
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t clearBit_fun_uint16_t(uint16_t x, uint32_t i) { return x & ~(1 << i); }


x86 assembly (clang, -O0):
<clearBit_fun_uint16_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearBit_fun_uint16_t>:
mov    %edi,%eax
btr    %esi,%eax
ret

LLVM IR (-O0):
define i32 @clearBit_fun_uint16_t(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 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = and i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @clearBit_fun_uint16_t(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ keypad(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ meta(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ notimeout(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ scrollok(int /*<<< orphan*/ *, int);
void stdwinset(WINDOW *win) {
  meta(win, TRUE);
  keypad(win, TRUE);
  notimeout(win, 0);
  scrollok(win, 1);
}


x86 assembly (clang, -O0):
<stdwinset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e91(%rip),%rax
mov    (%rax),%esi
call   1050 <meta@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e7f(%rip),%rax
mov    (%rax),%esi
call   1030 <keypad@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <notimeout@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1060 <scrollok@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdwinset>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2e9a(%rip),%r14
mov    (%r14),%esi
call   1050 <meta@plt>
mov    (%r14),%esi
mov    %rbx,%rdi
call   1030 <keypad@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <notimeout@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <scrollok@plt>

LLVM IR (-O0):
@TRUE = global i32 0
define void @stdwinset(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @TRUE
%5 = call i32 @meta(i32* %3, i32 %4)
%6 = load i32*, i32** %2
%7 = load i32, i32* @TRUE
%8 = call i32 @keypad(i32* %6, i32 %7)
%9 = load i32*, i32** %2
%10 = call i32 @notimeout(i32* %9, i32 0)
%11 = load i32*, i32** %2
%12 = call i32 @scrollok(i32* %11, i32 1)
ret void
}

LLVM IR (-O2):
@TRUE = global i32 0
define void @stdwinset(i32* %0) {
%2 = load i32, i32* @TRUE
%3 = tail call i32 @meta(i32* %0, i32 %2)
%4 = load i32, i32* @TRUE
%5 = tail call i32 @keypad(i32* %0, i32 %4)
%6 = tail call i32 @notimeout(i32* %0, i32 0)
%7 = tail call i32 @scrollok(i32* %0, i32 1)
ret void
}
equal(s1, s2) char *s1, *s2;
{
  register char *c1, *c2;
  c1 = s1;
  c2 = s2;
  while (*c1++ == *c2)
    if (*c2++ == 0)
      return (1);
  return (0);
}


x86 assembly (clang, -O0):
<equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%eax
mov    -0x28(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1169 <equal+0x69>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1164 <equal+0x64>
movl   $0x1,-0x4(%rbp)
jmp    1170 <equal+0x70>
jmp    111c <equal+0x1c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal>:
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rdi,%rcx,1),%edx
cmp    (%rsi,%rcx,1),%dl
jne    1126 <equal+0x26>
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <equal+0x10>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @equal(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %10, %9 ]
%5 = phi i8* [ %1, %2 ], [ %11, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %13, label %3
13: ; preds = %3, %9
%14 = phi i32 [ 1, %9 ], [ 0, %3 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int IPC_CREAT;
int semget(int /*<<< orphan*/, int, int);
int createSemaphoreId(key_t key) { return semget(key, 3, IPC_CREAT | 0600); }


x86 assembly (clang, -O0):
<createSemaphoreId>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
or     $0x180,%edx
mov    $0x3,%esi
call   1030 <semget@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createSemaphoreId>:
mov    0x2ec9(%rip),%rax
mov    $0x180,%edx
or     (%rax),%edx
mov    $0x3,%esi
jmp    1030 <semget@plt>

LLVM IR (-O0):
@IPC_CREAT = global i32 0
define i32 @createSemaphoreId(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @IPC_CREAT
%5 = or i32 %4, 384
%6 = call i32 @semget(i32 %3, i32 3, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@IPC_CREAT = global i32 0
define i32 @createSemaphoreId(i32 %0) {
%2 = load i32, i32* @IPC_CREAT
%3 = or i32 %2, 384
%4 = tail call i32 @semget(i32 %0, i32 3, i32 %3)
ret i32 %4
}
/* Variables and functions */
scalar_t__ check_status(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ usleep(int);
void check_status_loop(int fd) {
  do {
    printf("Check machine status...");
    usleep(1000 * 100);
  } while (check_status(fd));
}


x86 assembly (clang, -O0):
<check_status_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
mov    $0x186a0,%edi
call   1050 <usleep@plt>
mov    -0x4(%rbp),%edi
call   1030 <check_status@plt>
cmp    $0x0,%rax
jne    113b <check_status_loop+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_status_loop>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xec3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
call   1040 <printf@plt>
mov    $0x186a0,%edi
call   1050 <usleep@plt>
mov    %ebx,%edi
call   1030 <check_status@plt>
test   %rax,%rax
jne    1140 <check_status_loop+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Check machine status...\00"
define void @check_status_loop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %6, %1
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @usleep(i32 100000)
br label %6
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i64 @check_status(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %3, label %10
10: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Check machine status...\00"
define void @check_status_loop(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @usleep(i32 100000)
%5 = tail call i64 @check_status(i32 %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
ret void
}
int myisnan(double x) { return (x == x) ? 0 : 1; }


x86 assembly (clang, -O0):
<myisnan>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mov    $0x1,%eax
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
setnp  %sil
sete   %dl
test   %sil,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myisnan>:
xor    %eax,%eax
ucomisd %xmm0,%xmm0
setp   %al
ret

LLVM IR (-O0):
define i32 @myisnan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fcmp oeq double %3, %4
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 0, i32 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @myisnan(double %0) {
%2 = fcmp uno double %0, 0.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ isalpha(char);
scalar_t__ isspace(char);
int can_print_it(char ch) { return isalpha(ch) || isspace(ch); }


x86 assembly (clang, -O0):
<can_print_it>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <can_print_it+0x3c>
movsbl -0x1(%rbp),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_print_it>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <can_print_it+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1030 <isspace@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @can_print_it(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalpha(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @isspace(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @can_print_it(i8 signext %0) {
%2 = tail call i64 @isalpha(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isspace(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ sig_atomic_t;

/* Variables and functions */
#define SIGCHLD 128
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ wait3(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/ *);
void sig_handler(int sigNum) {
  sig_atomic_t status;
  do {
  } while (0);
  switch (sigNum) {
  case SIGCHLD:
    wait3(&status, WNOHANG, NULL);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
jmp    1120 <sig_handler+0x10>
mov    -0x4(%rbp),%eax
sub    $0x80,%eax
jne    114e <sig_handler+0x3e>
jmp    1133 <sig_handler+0x23>
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <wait3@plt>
jmp    1153 <sig_handler+0x43>
jmp    1153 <sig_handler+0x43>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_handler>:
cmp    $0x80,%edi
jne    1132 <sig_handler+0x22>
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdi
xor    %edx,%edx
call   1030 <wait3@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @sig_handler(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %1
br label %5
5: ; preds = %4
%6 = load i32, i32* %2
switch i32 %6, label %10 [
i32 128, label %7
]
7: ; preds = %5
%8 = load i32, i32* @WNOHANG
%9 = call i32 @wait3(i32* %3, i32 %8, i32* null)
br label %11
10: ; preds = %5
br label %11
11: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @sig_handler(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = icmp eq i32 %0, 128
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* @WNOHANG
%7 = call i32 @wait3(i32* %2, i32 %6, i32* null)
br label %8
8: ; preds = %1, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_str(char *);
void pterm_print_tab(int l) {
  int i;
  for (i = 0; i < l; i++)
    print_str("  ");
}


x86 assembly (clang, -O0):
<pterm_print_tab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <pterm_print_tab+0x38>
lea    0xecb(%rip),%rdi
call   1030 <print_str@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <pterm_print_tab+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pterm_print_tab>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    113d <pterm_print_tab+0x2d>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <print_str@plt>
add    $0xffffffff,%ebx
jne    1130 <pterm_print_tab+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c" \00"
define void @pterm_print_tab(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @print_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
unsigned GetGreen(const unsigned int color) {
  return ((color & 0x0000FF00) >> 8);
}


x86 assembly (clang, -O0):
<GetGreen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
shr    $0x8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetGreen>:
mov    %edi,%eax
movzbl %ah,%eax
ret

LLVM IR (-O0):
define i32 @GetGreen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = lshr i32 %4, 8
ret i32 %5
}

LLVM IR (-O2):
define i32 @GetGreen(i32 %0) {
%2 = lshr i32 %0, 8
%3 = and i32 %2, 255
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void foo(void) { printf("foo\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"foo\00"
define void @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
void cfs_memory_pressure_restore(int old) {
  if (old)
    do {
    } while (0);
  else
    do {
    } while (0);
  return;
}


x86 assembly (clang, -O0):
<cfs_memory_pressure_restore>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1120 <cfs_memory_pressure_restore+0x20>
jmp    1116 <cfs_memory_pressure_restore+0x16>
jmp    111b <cfs_memory_pressure_restore+0x1b>
jmp    112f <cfs_memory_pressure_restore+0x2f>
jmp    1125 <cfs_memory_pressure_restore+0x25>
jmp    112a <cfs_memory_pressure_restore+0x2a>
jmp    112f <cfs_memory_pressure_restore+0x2f>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @cfs_memory_pressure_restore(i32 %0) {
ret void
}
int stupid_comp(void *key, void *other) { return *(int *)key == *(int *)other; }


x86 assembly (clang, -O0):
<stupid_comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stupid_comp>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @stupid_comp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = icmp eq i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @stupid_comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void icalerror_crash_here(void) {
  int *p = 0;
  *p = 1;
  assert(*p);
}


x86 assembly (clang, -O0):
<icalerror_crash_here>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @icalerror_crash_here() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = load i32*, i32** %1
store i32 1, i32* %2
%3 = load i32*, i32** %1
%4 = load i32, i32* %3
%5 = call i32 @assert(i32 %4)
ret void
}

LLVM IR (-O2):
int fun462() { return 462; }


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

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

LLVM IR (-O0):
define i32 @fun462() {
ret i32 462
}

LLVM IR (-O2):
define i32 @fun462() {
ret i32 462
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int *, int *);
int main() {
  int a = 3, b = 4;
  swap(&a, &b);
  printf("%d %d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <swap@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x3,0x4(%rsp)
movl   $0x4,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <swap@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
store i32 4, i32* %3
%4 = call i32 @swap(i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 3, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 4, i32* %2
%5 = call i32 @swap(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printXmlNineDigits(int *data, unsigned int offset, const char *name) {
  if (offset > 0) {
    printf("%*c", offset, ' ');
  }
  printf("<%s>%i</%s>\n", name, *data, name);
}


x86 assembly (clang, -O0):
<printXmlNineDigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jbe    1143 <printXmlNineDigits+0x33>
mov    -0xc(%rbp),%esi
lea    0xec9(%rip),%rdi
mov    $0x20,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    -0x18(%rbp),%rcx
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printXmlNineDigits>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
test   %esi,%esi
je     1131 <printXmlNineDigits+0x21>
lea    0xedb(%rip),%rdi
mov    $0x20,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%r14),%edx
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rcx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%*c\00"
@.str.1 = [13 x i8] c"<%s>%i</%s>\0A\00"
define void @printXmlNineDigits(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = icmp ugt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i32, i32* %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10, i32 32)
br label %12
12: ; preds = %9, %3
%13 = load i8*, i8** %6
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = load i8*, i8** %6
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %13, i32 %15, i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%*c\00"
@.str.1 = [13 x i8] c"<%s>%i</%s>\0A\00"
define void @printXmlNineDigits(i32* nocapture %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1, i32 32)
br label %7
7: ; preds = %5, %3
%8 = load i32, i32* %0
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %8, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
unsigned int sat_add(unsigned int);
int main() {
  if (sat_add(~0U) != ~0U)
    _exit(-1);
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1040 <sat_add@plt>
cmp    $0xffffffff,%eax
je     114c <main+0x2c>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffffff,%edi
call   1040 <sat_add@plt>
cmp    $0xffffffff,%eax
jne    1137 <main+0x17>
xor    %edi,%edi
call   1030 <_exit@plt>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sat_add(i32 -1)
%3 = icmp ne i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @_exit(i32 -1)
unreachable
6: ; preds = %0
%7 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sat_add(i32 -1)
%2 = icmp eq i32 %1, -1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @_exit(i32 -1)
unreachable
5: ; preds = %0
%6 = tail call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
int bitn(int, unsigned int);
int fa(unsigned int i) { return bitn(0x2C79, i); }


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

x86 assembly (clang, -O2):
<fa>:
mov    %edi,%esi
mov    $0x2c79,%edi
jmp    1030 <bitn@plt>

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

LLVM IR (-O2):
define i32 @fa(i32 %0) {
%2 = tail call i32 @bitn(i32 11385, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void f3(float f) {
  if (f != 6.0f)
    abort();
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    113e <f3+0x2e>
jp     113e <f3+0x2e>
jmp    1145 <f3+0x35>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
push   %rax
ucomiss 0xee8(%rip),%xmm0
jne    111e <f3+0xe>
jp     111e <f3+0xe>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @f3(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp une float %3, 6.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @f3(float %0) {
%2 = fcmp une float %0, 6.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Welcome to Git!!!\n");
  printf("review\n");
  printf("updating the git file\n");
  printf("text file\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Welcome to Git!!!\0A\00"
@.str.1 = [8 x i8] c"review\0A\00"
@.str.2 = [23 x i8] c"updating the git file\0A\00"
@.str.3 = [11 x i8] c"text file\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"Welcome to Git!!!\00"
@str.4 = [7 x i8] c"review\00"
@str.5 = [22 x i8] c"updating the git file\00"
@str.6 = [10 x i8] c"text file\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}
int number_of_digits_uint(unsigned int num) {
  int digits = 0;
  while (num != 0) {
    digits += 1;
    num /= 10;
  }
  return digits;
}


x86 assembly (clang, -O0):
<number_of_digits_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1135 <number_of_digits_uint+0x35>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <number_of_digits_uint+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_of_digits_uint>:
xor    %eax,%eax
test   %edi,%edi
je     1124 <number_of_digits_uint+0x24>
mov    $0xcccccccd,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <number_of_digits_uint+0x10>
ret

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

LLVM IR (-O2):
define i32 @number_of_digits_uint(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = udiv i32 %5, 10
%8 = icmp ult i32 %5, 10
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int pif_error(int test, const char *str) {
  if (test)
    fprintf(stderr, "ERROR: %s\n", str);
  return test;
}


x86 assembly (clang, -O0):
<pif_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1142 <pif_error+0x32>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pif_error>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
je     112f <pif_error+0x1f>
mov    %rsi,%rdx
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
lea    0xed6(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define i32 @pif_error(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %7, %2
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define i32 @pif_error(i32 returned %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %4, %2
ret i32 %0
}
/* Variables and functions */
int gtxt_richtext_get_delimiter(char const *);
const char *gtxt_richtext_skip_delimiter(const char *str) {
  const char *ptr = str;
  int len;
  do {
    len = gtxt_richtext_get_delimiter(ptr);
    ptr += len;
  } while (len != 0);
  return ptr;
}


x86 assembly (clang, -O0):
<gtxt_richtext_skip_delimiter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <gtxt_richtext_get_delimiter@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1124 <gtxt_richtext_skip_delimiter+0x14>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtxt_richtext_skip_delimiter>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <gtxt_richtext_get_delimiter@plt>
cltq
add    %rax,%rbx
test   %eax,%eax
jne    1120 <gtxt_richtext_skip_delimiter+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @gtxt_richtext_skip_delimiter(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
br label %6
6: ; preds = %13, %1
%7 = load i8*, i8** %3
%8 = call i32 @gtxt_richtext_get_delimiter(i8* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = load i8*, i8** %3
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds i8, i8* %10, i64 %11
store i8* %12, i8** %3
br label %13
13: ; preds = %6
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 0
br i1 %15, label %6, label %16
16: ; preds = %13
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
define i8* @gtxt_richtext_skip_delimiter(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = tail call i32 @gtxt_richtext_get_delimiter(i8* %3)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %3, i64 %5
%7 = icmp eq i32 %4, 0
br i1 %7, label %8, label %2
8: ; preds = %2
ret i8* %6
}
void check_logfs_je_free_segments(void) { ; }


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

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

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

LLVM IR (-O2):
define void @check_logfs_je_free_segments() {
ret void
}
const char *get_unicode_encoding_name() {
  int x = 1;
  if (*((char *)&x) == 1) {
    return "UTF-32LE";
  } else {
    return "UTF-32BE";
  }
}


x86 assembly (clang, -O0):
<get_unicode_encoding_name>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0xc(%rbp)
movsbl -0xc(%rbp),%eax
cmp    $0x1,%eax
jne    1128 <get_unicode_encoding_name+0x28>
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1133 <get_unicode_encoding_name+0x33>
lea    0xeda(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_unicode_encoding_name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"UTF-32LE\00"
@.str.1 = [9 x i8] c"UTF-32BE\00"
define i8* @get_unicode_encoding_name() {
%1 = alloca i8*
%2 = alloca i32
store i32 1, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %0
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %1
br label %9
8: ; preds = %0
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %9
9: ; preds = %8, %7
%10 = load i8*, i8** %1
ret i8* %10
}

LLVM IR (-O2):
@.str = [9 x i8] c"UTF-32LE\00"
define i8* @get_unicode_encoding_name() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
signed char foo(signed char si1, unsigned char si2) {
  return (si1 ^ si2) & (-si2 ^ si2) ?: si1 - si2;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
xor    %ecx,%eax
movzbl -0x2(%rbp),%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movzbl -0x2(%rbp),%edx
xor    %edx,%ecx
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     1141 <foo+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    114e <foo+0x4e>
movsbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %esi,%ecx
xor    %edi,%ecx
mov    %esi,%eax
neg    %eax
xor    %esi,%eax
and    %ecx,%eax
sub    %esi,%edi
test   %eax,%eax
cmove  %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @foo(i8 signext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = xor i32 %6, %8
%10 = load i8, i8* %4
%11 = zext i8 %10 to i32
%12 = sub nsw i32 0, %11
%13 = load i8, i8* %4
%14 = zext i8 %13 to i32
%15 = xor i32 %12, %14
%16 = and i32 %9, %15
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %2
br label %25
19: ; preds = %2
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = load i8, i8* %4
%23 = zext i8 %22 to i32
%24 = sub nsw i32 %21, %23
br label %25
25: ; preds = %19, %18
%26 = phi i32 [ %16, %18 ], [ %24, %19 ]
%27 = trunc i32 %26 to i8
ret i8 %27
}

LLVM IR (-O2):
define signext i8 @foo(i8 signext %0, i8 zeroext %1) {
%3 = sext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = xor i32 %4, %3
%6 = sub nsw i32 0, %4
%7 = xor i32 %6, %4
%8 = and i32 %5, %7
%9 = icmp eq i32 %8, 0
%10 = sub nsw i32 %3, %4
%11 = select i1 %9, i32 %10, i32 %8
%12 = trunc i32 %11 to i8
ret i8 %12
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t abs_fun_int32_t(int32_t a) {
  int32_t mask = a >> 31;
  return (a + mask) ^ mask;
}


x86 assembly (clang, -O0):
<abs_fun_int32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
xor    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs_fun_int32_t>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @abs_fun_int32_t(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 31
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = add nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = xor i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @abs_fun_int32_t(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int close(int);
int _close(int fd) { return close(fd); }


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>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
void _exit(int c) {
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <_exit+0x7>

x86 assembly (clang, -O2):
<_exit>:
jmp    1100 <_exit>

LLVM IR (-O0):
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
}

LLVM IR (-O2):
define void @_exit(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
int square(int x) { return (x * x); }


x86 assembly (clang, -O0):
<square>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<square>:
mov    %edi,%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @square(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @square(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
void dispose_client_state() {}


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

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

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

LLVM IR (-O2):
define void @dispose_client_state() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_dimension_of_multprec_solutions(int *dimension) {
  int *a, fail;
  double *c;
  fail = _ada_use_c2phc(453, a, dimension, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_dimension_of_multprec_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1c5,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_dimension_of_multprec_solutions>:
mov    %rdi,%rdx
mov    $0x1c5,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @solcon_dimension_of_multprec_solutions(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %3
%7 = load i32*, i32** %2
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc(i32 453, i32* %6, i32* %7, double* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @solcon_dimension_of_multprec_solutions(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc(i32 453, i32* undef, i32* %0, double* undef)
ret i32 %2
}
int dec(int a) { return (--a); }


x86 assembly (clang, -O0):
<dec>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec>:
lea    -0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @dec(i32 %0) {
%2 = add nsw i32 %0, -1
ret i32 %2
}