xunge/DecIR huggingface dataset:
void SPI_set_low_speed() {
  (*((volatile unsigned char *)0xE0068004)) = 0x01;
  (*((volatile unsigned char *)0xE0068010)) = 12;
  (*((volatile unsigned char *)0xE0068004)) = 0x02;
}


x86 assembly (clang, -O0):
<SPI_set_low_speed>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0068004,%eax
movb   $0x1,(%rax)
mov    $0xe0068010,%eax
movb   $0xc,(%rax)
mov    $0xe0068004,%eax
movb   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPI_set_low_speed>:
mov    $0xe0068004,%eax
movb   $0x1,(%rax)
movb   $0xc,0xc(%rax)
movb   $0x2,(%rax)
ret

LLVM IR (-O0):
define void @SPI_set_low_speed() {
store volatile i8 1, i8* inttoptr (i64 3758522372 to i8*)
store volatile i8 12, i8* inttoptr (i64 3758522384 to i8*)
store volatile i8 2, i8* inttoptr (i64 3758522372 to i8*)
ret void
}

LLVM IR (-O2):
define void @SPI_set_low_speed() {
store volatile i8 1, i8* inttoptr (i64 3758522372 to i8*)
store volatile i8 12, i8* inttoptr (i64 3758522384 to i8*)
store volatile i8 2, i8* inttoptr (i64 3758522372 to i8*)
ret void
}
const char *__malidrv_build_info(void) {
  return "malidrv:  API_VERSION=20 REPO_URL=heads/remotes/origin/npi2 "
         "REVISION=r3p2-01rel4-35c4cea CHANGED_REVISION=35c4cea "
         "CHANGE_DATE=2015-12-29 00:24:47 +0800 BUILD_DATE=Sun Jan 24 22:54:31 "
         "CST 2016 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM=mirsys KDIR= "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING=y "
         "USING_INTERNAL_PROFILING=y USING_GPU_UTILIZATION=1 "
         "MALI_UPPER_HALF_SCHEDULING=1";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [396 x i8] c"malidrv: API_VERSION=20 REPO_URL=heads/remotes/origin/npi2 REVISION=r3p2-01rel4-35c4cea CHANGED_REVISION=35c4cea CHANGE_DATE=2015-12-29 00:24:47 +0800 BUILD_DATE=Sun Jan 24 22:54:31 CST 2016 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM=mirsys KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING=y USING_INTERNAL_PROFILING=y USING_GPU_UTILIZATION=1 MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([396 x i8], [396 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [396 x i8] c"malidrv: API_VERSION=20 REPO_URL=heads/remotes/origin/npi2 REVISION=r3p2-01rel4-35c4cea CHANGED_REVISION=35c4cea CHANGE_DATE=2015-12-29 00:24:47 +0800 BUILD_DATE=Sun Jan 24 22:54:31 CST 2016 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM=mirsys KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING=y USING_INTERNAL_PROFILING=y USING_GPU_UTILIZATION=1 MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([396 x i8], [396 x i8]* @.str, i64 0, i64 0)
}
int get_bit_mask(int bit) {
  int mask = 1;
  return mask <<= bit;
}


x86 assembly (clang, -O0):
<get_bit_mask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit_mask>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @get_bit_mask(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = shl i32 %5, %4
store i32 %6, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @get_bit_mask(i32 %0) {
%2 = shl nuw i32 1, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void pluscconlycb(unsigned char a, unsigned char b) {
  unsigned char sum = a + b;
  if (sum < b)
    abort();
}


x86 assembly (clang, -O0):
<pluscconlycb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
add    %ecx,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
movzbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
jge    1148 <pluscconlycb+0x38>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pluscconlycb>:
add    %dil,%sil
jb     1116 <pluscconlycb+0x6>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @pluscconlycb(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %3
%7 = zext i8 %6 to i32
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = add nsw i32 %7, %9
%11 = trunc i32 %10 to i8
store i8 %11, i8* %5
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = load i8, i8* %4
%15 = zext i8 %14 to i32
%16 = icmp slt i32 %13, %15
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = call i32 (...) @abort()
unreachable
19: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @pluscconlycb(i8 zeroext %0, i8 zeroext %1) {
%3 = xor i8 %1, -1
%4 = icmp ult i8 %3, %0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret void
}
/* Type definitions */
typedef scalar_t__ ulBase;

/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
int PWMGenValid(unsigned long);
void PWMDeadBandDisable(unsigned long ulBase, unsigned long ulGen) {
  DEBUG_ASSERT((ulBase == 0x40028000) || (ulBase == 0x40029000));
  DEBUG_ASSERT(PWMGenValid(ulGen));
  (*((volatile unsigned long *)(((ulBase) + (ulGen)) + 0x00000028))) &=
      ~(0x00000001);
}


x86 assembly (clang, -O0):
<PWMDeadBandDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%al
cmpq   $0x40028000,-0x8(%rbp)
40
mov    %al,-0x11(%rbp)
je     1151 <PWMDeadBandDisable+0x31>
cmpq   $0x40029000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rdi
call   1040 <PWMGenValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    0x28(%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x28(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMDeadBandDisable>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x40028000,%rax
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %r14,%rdi
call   1040 <PWMGenValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
andq   $0xfffffffffffffffe,0x28(%rbx,%r14,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @PWMDeadBandDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 1073905664
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i64, i64* %3
%9 = icmp eq i64 %8, 1073909760
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @DEBUG_ASSERT(i32 %12)
%14 = load i64, i64* %4
%15 = call i32 @PWMGenValid(i64 %14)
%16 = call i32 @DEBUG_ASSERT(i32 %15)
%17 = load i64, i64* %3
%18 = load i64, i64* %4
%19 = add i64 %17, %18
%20 = add i64 %19, 40
%21 = inttoptr i64 %20 to i64*
%22 = load volatile i64, i64* %21
%23 = and i64 %22, -2
store volatile i64 %23, i64* %21
ret void
}

LLVM IR (-O2):
define void @PWMDeadBandDisable(i64 %0, i64 %1) {
%3 = and i64 %0, -4097
%4 = icmp eq i64 %3, 1073905664
%5 = zext i1 %4 to i32
%6 = tail call i32 @DEBUG_ASSERT(i32 %5)
%7 = tail call i32 @PWMGenValid(i64 %1)
%8 = tail call i32 @DEBUG_ASSERT(i32 %7)
%9 = add i64 %0, 40
%10 = add i64 %9, %1
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = and i64 %12, -2
store volatile i64 %13, i64* %11
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int read_start_system_without_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(151, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<read_start_system_without_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x97,%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):
<read_start_system_without_solutions>:
mov    $0x97,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @read_start_system_without_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 151, i32* undef, i32* undef, double* undef)
ret i32 %1
}
double libj_drand(sn)
long sn;
{ return ((double)libj_lrand(sn) * 4.6566128752e-10); }


x86 assembly (clang, -O0):
<libj_drand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <libj_lrand@plt>
cvtsi2sd %eax,%xmm0
movsd  0xecd(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libj_drand>:
push   %rax
xor    %eax,%eax
call   1030 <libj_lrand@plt>
cvtsi2sd %eax,%xmm0
mulsd  0xedc(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @libj_drand(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 (i64, ...) bitcast (i32 (...)* @libj_lrand to i32 (i64, ...)*)(i64 %3)
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 0x3E000000001F52FC
ret double %6
}

LLVM IR (-O2):
define double @libj_drand(i64 %0) {
%2 = tail call i32 (i64, ...) bitcast (i32 (...)* @libj_lrand to i32 (i64, ...)*)(i64 %0)
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3E000000001F52FC
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ factor();
int /*<<< orphan*/ match(char);
int /*<<< orphan*/ popDiv();
void divide() {
  match('/');
  factor();
  popDiv();
}


x86 assembly (clang, -O0):
<divide>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2f,%edi
call   1040 <match@plt>
mov    $0x0,%al
call   1050 <factor@plt>
mov    $0x0,%al
call   1030 <popDiv@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide>:
push   %rax
mov    $0x2f,%edi
call   1040 <match@plt>
xor    %eax,%eax
call   1050 <factor@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <popDiv@plt>

LLVM IR (-O0):
define void @divide() {
%1 = call i32 @match(i8 signext 47)
%2 = call i32 (...) @factor()
%3 = call i32 (...) @popDiv()
ret void
}

LLVM IR (-O2):
define void @divide() {
%1 = tail call i32 @match(i8 signext 47)
%2 = tail call i32 (...) @factor()
%3 = tail call i32 (...) @popDiv()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_min;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct tm *);
struct tm *getLocalTime(int /*<<< orphan*/ *);
int getMinute() {
  struct tm *mytime;
  int min = 0;
  mytime = getLocalTime((time_t *)NULL);
  min = mytime->tm_min;
  free(mytime);
  return min;
}


x86 assembly (clang, -O0):
<getMinute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <getLocalTime@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMinute>:
push   %rbx
xor    %edi,%edi
call   1040 <getLocalTime@plt>
mov    (%rax),%ebx
mov    %rax,%rdi
call   1030 <free@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @getMinute() {
%1 = alloca %struct.tm*
%2 = alloca i32
store i32 0, i32* %2
%3 = call %struct.tm* @getLocalTime(i32* null)
store %struct.tm* %3, %struct.tm** %1
%4 = load %struct.tm*, %struct.tm** %1
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
%6 = load i32, i32* %5
store i32 %6, i32* %2
%7 = load %struct.tm*, %struct.tm** %1
%8 = call i32 @free(%struct.tm* %7)
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @getMinute() {
%1 = tail call %struct.tm* @getLocalTime(i32* null)
%2 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @free(%struct.tm* %1)
ret i32 %3
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int write_quaddobl_start_Laurent_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(768, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<write_quaddobl_start_Laurent_system>:
mov    $0x300,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @write_quaddobl_start_Laurent_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 768, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int minVal(int a, int b) { return (a < b ? a : b); }


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

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

LLVM IR (-O0):
define i32 @minVal(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 slt 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 @minVal(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ printf(char *, int);
void handler(int sig) {
  printf("recv a sig=%d\n", sig);
  alarm(1);
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <alarm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <alarm@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"recv a sig=%d\0A\00"
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @alarm(i32 1)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"recv a sig=%d\0A\00"
define void @handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @alarm(i32 1)
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
struct SN_env *SN_create_env(int /*<<< orphan*/, int, int /*<<< orphan*/);
extern struct SN_env *german_UTF_8_create_env(void) {
  return SN_create_env(0, 3, 0);
}


x86 assembly (clang, -O0):
<german_UTF_8_create_env>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x3,%esi
mov    %edx,%edi
call   1030 <SN_create_env@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<german_UTF_8_create_env>:
xor    %edi,%edi
mov    $0x3,%esi
xor    %edx,%edx
jmp    1030 <SN_create_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define %struct.SN_env* @german_UTF_8_create_env() {
%1 = call %struct.SN_env* @SN_create_env(i32 0, i32 3, i32 0)
ret %struct.SN_env* %1
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define %struct.SN_env* @german_UTF_8_create_env() {
%1 = tail call %struct.SN_env* @SN_create_env(i32 0, i32 3, i32 0)
ret %struct.SN_env* %1
}
/* Type definitions */
typedef int num;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/ *);
void write_le_int32(FILE *dfile, int num) {
  fputc((num)&0xFF, dfile);
  fputc((num >> 8) & 0xFF, dfile);
  fputc((num >> 16) & 0xFF, dfile);
  fputc((num >> 24) & 0xFF, dfile);
}


x86 assembly (clang, -O0):
<write_le_int32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
and    $0xff,%edi
mov    -0x8(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0xc(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
mov    -0x8(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0xc(%rbp),%edi
sar    $0x10,%edi
and    $0xff,%edi
mov    -0x8(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0xc(%rbp),%edi
sar    $0x18,%edi
and    $0xff,%edi
mov    -0x8(%rbp),%rsi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_le_int32>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
movzbl %bl,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
movzbl %bh,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
shr    $0x18,%ebx
mov    %ebx,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @write_le_int32(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = load i32*, i32** %3
%8 = call i32 @fputc(i32 %6, i32* %7)
%9 = load i32, i32* %4
%10 = ashr i32 %9, 8
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = call i32 @fputc(i32 %11, i32* %12)
%14 = load i32, i32* %4
%15 = ashr i32 %14, 16
%16 = and i32 %15, 255
%17 = load i32*, i32** %3
%18 = call i32 @fputc(i32 %16, i32* %17)
%19 = load i32, i32* %4
%20 = ashr i32 %19, 24
%21 = and i32 %20, 255
%22 = load i32*, i32** %3
%23 = call i32 @fputc(i32 %21, i32* %22)
ret void
}

LLVM IR (-O2):
define void @write_le_int32(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 255
%4 = tail call i32 @fputc(i32 %3, i32* %0)
%5 = lshr i32 %1, 8
%6 = and i32 %5, 255
%7 = tail call i32 @fputc(i32 %6, i32* %0)
%8 = lshr i32 %1, 16
%9 = and i32 %8, 255
%10 = tail call i32 @fputc(i32 %9, i32* %0)
%11 = lshr i32 %1, 24
%12 = tail call i32 @fputc(i32 %11, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ disableRawMode(int /*<<< orphan*/);
int /*<<< orphan*/ saveRestoreScreen(int /*<<< orphan*/);
void editorAtExit(void) {
  disableRawMode(STDIN_FILENO);
  saveRestoreScreen(0);
}


x86 assembly (clang, -O0):
<editorAtExit>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <disableRawMode@plt>
xor    %edi,%edi
call   1040 <saveRestoreScreen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<editorAtExit>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1030 <disableRawMode@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <saveRestoreScreen@plt>

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
define void @editorAtExit() {
%1 = load i32, i32* @STDIN_FILENO
%2 = call i32 @disableRawMode(i32 %1)
%3 = call i32 @saveRestoreScreen(i32 0)
ret void
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
define void @editorAtExit() {
%1 = load i32, i32* @STDIN_FILENO
%2 = tail call i32 @disableRawMode(i32 %1)
%3 = tail call i32 @saveRestoreScreen(i32 0)
ret void
}
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local2;
  unsigned int local1;
  {
    state[0UL] = input[0UL] + 4284877637U;
    local1 = 0UL;
    while (local1 < 1UL) {
      local2 = 0UL;
      while (local2 < 1UL) {
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] - 2699719578U;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0xff660b45,%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    $0x1,%rax
jae    1160 <RandomFunc+0x60>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    $0x1,%rax
jae    1151 <RandomFunc+0x51>
mov    -0x18(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x18(%rbp)
jmp    1135 <RandomFunc+0x35>
mov    -0x1c(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x1c(%rbp)
jmp    1121 <RandomFunc+0x21>
mov    -0x14(%rbp),%ecx
sub    $0xa0ea739a,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0x5e7b97ab,%eax
add    (%rdi),%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1 x i32]
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = add i32 %10, -10089659
%12 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 %11, i32* %12
store i32 0, i32* %7
br label %13
13: ; preds = %27, %2
%14 = load i32, i32* %7
%15 = zext i32 %14 to i64
%16 = icmp ult i64 %15, 1
br i1 %16, label %17, label %32
17: ; preds = %13
store i32 0, i32* %6
br label %18
18: ; preds = %22, %17
%19 = load i32, i32* %6
%20 = zext i32 %19 to i64
%21 = icmp ult i64 %20, 1
br i1 %21, label %22, label %27
22: ; preds = %18
%23 = load i32, i32* %6
%24 = zext i32 %23 to i64
%25 = add i64 %24, 2
%26 = trunc i64 %25 to i32
store i32 %26, i32* %6
br label %18
27: ; preds = %18
%28 = load i32, i32* %7
%29 = zext i32 %28 to i64
%30 = add i64 %29, 2
%31 = trunc i64 %30 to i32
store i32 %31, i32* %7
br label %13
32: ; preds = %13
%33 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%34 = load i32, i32* %33
%35 = sub i32 %34, -1595247718
%36 = load i32*, i32** %4
%37 = getelementptr inbounds i32, i32* %36, i64 0
store i32 %35, i32* %37
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = add i32 %3, 1585158059
store i32 %4, i32* %1
ret void
}
void init_satellite() {}


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

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

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

LLVM IR (-O2):
define void @init_satellite() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void mbox_close(int file_desc) { close(file_desc); }


x86 assembly (clang, -O0):
<mbox_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):
<mbox_close>:
jmp    1030 <close@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ Sys_failure(char *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int pthread_cond_broadcast(int /*<<< orphan*/ *);
void Pthread_cond_broadcast(pthread_cond_t *cond) {
  int retval;
  assert(cond != NULL);
  retval = pthread_cond_broadcast(cond);
  if (retval != 0)
    Sys_failure("pthread_cond_broadcast");
}


x86 assembly (clang, -O0):
<Pthread_cond_broadcast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <pthread_cond_broadcast@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1170 <Pthread_cond_broadcast+0x40>
lea    0xe95(%rip),%rdi
call   1050 <Sys_failure@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pthread_cond_broadcast>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1030 <pthread_cond_broadcast@plt>
test   %eax,%eax
je     115b <Pthread_cond_broadcast+0x2b>
lea    0xeab(%rip),%rdi
pop    %rbx
jmp    1050 <Sys_failure@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"pthread_cond_broadcast\00"
define void @Pthread_cond_broadcast(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32*, i32** %2
%9 = call i32 @pthread_cond_broadcast(i32* %8)
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = call i32 @Sys_failure(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %1
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"pthread_cond_broadcast\00"
define void @Pthread_cond_broadcast(i32* %0) {
%2 = icmp ne i32* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @pthread_cond_broadcast(i32* %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @Sys_failure(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
ret void
}
void RTSemXRoadsNSEnter(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemXRoadsNSEnter() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ chtype;

/* Variables and functions */
int OK;
int PDC_scroll(int urow, int lcol, int lrow, int rcol, int nlines,
               chtype attr) {
  return (OK);
}


x86 assembly (clang, -O0):
<PDC_scroll>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PDC_scroll>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@OK = global i32 0
define i32 @PDC_scroll(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* @OK
ret i32 %13
}

LLVM IR (-O2):
@OK = global i32 0
define i32 @PDC_scroll(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = load i32, i32* @OK
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ unlink(char const *);
void cleanEnd(int soc, const char *path) {
  close(soc);
  unlink(path);
  printf("Client down\n");
}


x86 assembly (clang, -O0):
<cleanEnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <close@plt>
mov    -0x10(%rbp),%rdi
call   1030 <unlink@plt>
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanEnd>:
push   %rbx
mov    %rsi,%rbx
call   1050 <close@plt>
mov    %rbx,%rdi
call   1030 <unlink@plt>
lea    0xeb8(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Client down\0A\00"
define void @cleanEnd(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 = call i32 @close(i32 %5)
%7 = load i8*, i8** %4
%8 = call i32 @unlink(i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"Client down\00"
define void @cleanEnd(i32 %0, i8* nocapture %1) {
%3 = tail call i32 @close(i32 %0)
%4 = tail call i32 @unlink(i8* %1)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
void bvram_mirror_init() {}


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

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

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

LLVM IR (-O2):
define void @bvram_mirror_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pmu_reg_write(int, int);
void pmu_reset_solar_short() {
  pmu_reg_write(0x0E, ((0 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (0 << 8) |
                       (1 << 4) | (0)));
  pmu_reg_write(0x0E, ((0 << 12) | (1 << 11) | (1 << 10) | (0 << 9) | (0 << 8) |
                       (1 << 4) | (0)));
}


x86 assembly (clang, -O0):
<pmu_reset_solar_short>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe,%edi
mov    $0xe10,%esi
call   1030 <pmu_reg_write@plt>
mov    $0xe,%edi
mov    $0xc10,%esi
call   1030 <pmu_reg_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_reset_solar_short>:
push   %rax
mov    $0xe,%edi
mov    $0xe10,%esi
call   1030 <pmu_reg_write@plt>
mov    $0xe,%edi
mov    $0xc10,%esi
pop    %rax
jmp    1030 <pmu_reg_write@plt>

LLVM IR (-O0):
define void @pmu_reset_solar_short() {
%1 = call i32 @pmu_reg_write(i32 14, i32 3600)
%2 = call i32 @pmu_reg_write(i32 14, i32 3088)
ret void
}

LLVM IR (-O2):
define void @pmu_reset_solar_short() {
%1 = tail call i32 @pmu_reg_write(i32 14, i32 3600)
%2 = tail call i32 @pmu_reg_write(i32 14, i32 3088)
ret void
}
/* Type definitions */
typedef float int16_t;

/* Variables and functions */
float degreesToRadians(int16_t degrees) {
  return degrees * (3.14159265358979323846f / 180.0f);
}


x86 assembly (clang, -O0):
<degreesToRadians>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<degreesToRadians>:
mulss  0xef8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define float @degreesToRadians(float %0) {
%2 = fmul float %0, 0x3F91DF46A0000000
ret float %2
}
/* Variables and functions */
char *char_prepend(char const *, char const *);
int /*<<< orphan*/ free(char *);
char *char_enclose(const char *prefix, const char *ostr, const char *suffix) {
  char *nstr1, *nstr2;
  nstr1 = char_prepend(prefix, ostr);
  nstr2 = char_prepend(nstr1, suffix);
  free(nstr1);
  return nstr2;
}


x86 assembly (clang, -O0):
<char_enclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <char_prepend@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <char_prepend@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_enclose>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
call   1040 <char_prepend@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <char_prepend@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @char_enclose(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i8* @char_prepend(i8* %9, i8* %10)
store i8* %11, i8** %7
%12 = load i8*, i8** %7
%13 = load i8*, i8** %6
%14 = call i8* @char_prepend(i8* %12, i8* %13)
store i8* %14, i8** %8
%15 = load i8*, i8** %7
%16 = call i32 @free(i8* %15)
%17 = load i8*, i8** %8
ret i8* %17
}

LLVM IR (-O2):
define i8* @char_enclose(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @char_prepend(i8* %0, i8* %1)
%5 = tail call i8* @char_prepend(i8* %4, i8* %2)
%6 = tail call i32 @free(i8* %4)
ret i8* %5
}
void test13_HelloWorld_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test13_HelloWorld_targetInit__I() {
ret void
}
/* Variables and functions */
scalar_t__ strchr(char *, char);
int isdelim(char c) {
  if (strchr(" ;,+-<>/*%^=()&|!", c) || c == 9 || c == '\n' || c == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isdelim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
lea    0xedb(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
jne    115f <isdelim+0x4f>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
je     115f <isdelim+0x4f>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     115f <isdelim+0x4f>
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jne    116b <isdelim+0x5b>
movl   $0x1,-0x4(%rbp)
jmp    1172 <isdelim+0x62>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdelim>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
mov    %ebx,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1130 <isdelim+0x20>
pop    %rbx
ret
cmp    $0xa,%bl
ja     1143 <isdelim+0x33>
movzbl %bl,%ecx
mov    $0x601,%edx
bt     %rcx,%rdx
jb     112e <isdelim+0x1e>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c" ;,+-<>/*%^=()&|!\00"
define i32 @isdelim(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @strchr(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 9
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 10
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %15, %11, %7, %1
store i32 1, i32* %2
br label %21
20: ; preds = %15
store i32 0, i32* %2
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
@.str = [18 x i8] c" ;,+-<>/*%^=()&|!\00"
define i32 @isdelim(i8 signext %0) {
%2 = tail call i64 @strchr(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%3 = freeze i64 %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
switch i8 %0, label %6 [
i8 10, label %7
i8 9, label %7
i8 0, label %7
]
6: ; preds = %5
br label %7
7: ; preds = %1, %5, %5, %5, %6
%8 = phi i32 [ 0, %6 ], [ 1, %5 ], [ 1, %5 ], [ 1, %5 ], [ 1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ setup(int, char **);
int main(int argc, char **argv) { setup(argc, argv); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <setup@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(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 = load i8**, i8*** %4
%7 = call i32 @setup(i32 %5, i8** %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @setup(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int isPUSH(const char *comm) { return strcmp(comm, "push") == 0; }


x86 assembly (clang, -O0):
<isPUSH>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPUSH>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"push\00"
define i32 @isPUSH(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [5 x i8] c"push\00"
define i32 @isPUSH(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned long mvpw_rgba(unsigned char r, unsigned char g, unsigned char b,
                        unsigned char a) {
  return (a << 24) | (b << 16) | (g << 8) | r;
}


x86 assembly (clang, -O0):
<mvpw_rgba>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movzbl -0x4(%rbp),%eax
shl    $0x18,%eax
movzbl -0x3(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
movzbl -0x2(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvpw_rgba>:
shl    $0x18,%ecx
shl    $0x10,%edx
or     %ecx,%edx
shl    $0x8,%esi
or     %edx,%esi
or     %edi,%esi
movslq %esi,%rax
ret

LLVM IR (-O0):
define i64 @mvpw_rgba(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 24
%12 = load i8, i8* %7
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 16
%15 = or i32 %11, %14
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = or i32 %15, %18
%20 = load i8, i8* %5
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
%23 = sext i32 %22 to i64
ret i64 %23
}

LLVM IR (-O2):
define i64 @mvpw_rgba(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = zext i8 %3 to i32
%6 = shl nuw i32 %5, 24
%7 = zext i8 %2 to i32
%8 = shl nuw nsw i32 %7, 16
%9 = or i32 %6, %8
%10 = zext i8 %1 to i32
%11 = shl nuw nsw i32 %10, 8
%12 = or i32 %9, %11
%13 = zext i8 %0 to i32
%14 = or i32 %12, %13
%15 = sext i32 %14 to i64
ret i64 %15
}
long maplen(double *map) {
  long i = 0;
  while (map[i] == map[i])
    i++;
  return i;
}


x86 assembly (clang, -O0):
<maplen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jne    1147 <maplen+0x47>
jp     1147 <maplen+0x47>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <maplen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maplen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movsd  0x8(%rdi,%rax,8),%xmm0
add    $0x1,%rax
ucomisd %xmm0,%xmm0
jnp    1110 <maplen+0x10>
ret

LLVM IR (-O0):
define i64 @maplen(double* %0) {
%2 = alloca double*
%3 = alloca i64
store double* %0, double** %2
store i64 0, i64* %3
br label %4
4: ; preds = %14, %1
%5 = load double*, double** %2
%6 = load i64, i64* %3
%7 = getelementptr inbounds double, double* %5, i64 %6
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = load i64, i64* %3
%11 = getelementptr inbounds double, double* %9, i64 %10
%12 = load double, double* %11
%13 = fcmp oeq double %8, %12
br i1 %13, label %14, label %17
14: ; preds = %4
%15 = load i64, i64* %3
%16 = add nsw i64 %15, 1
store i64 %16, i64* %3
br label %4
17: ; preds = %4
%18 = load i64, i64* %3
ret i64 %18
}

LLVM IR (-O2):
define i64 @maplen(double* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds double, double* %0, i64 %3
%5 = load double, double* %4
%6 = fcmp ord double %5, 0.000000e+00
%7 = add nuw nsw i64 %3, 1
br i1 %6, label %2, label %8
8: ; preds = %2
ret i64 %3
}
char **__get_program_arguments(int *argc) {
  long __res, dummy;
  __asm__ __volatile__("int $0x80"
                       : "=a"(__res), "=&b"(dummy)
                       : "0"(184), "1"((long)(argc)));
  return (char **)__res;
}


x86 assembly (clang, -O0):
<__get_program_arguments>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rbx
mov    $0xb8,%eax
int    $0x80
mov    %rax,-0x18(%rbp)
mov    %rbx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_program_arguments>:
push   %rbx
mov    %rdi,%rbx
mov    $0xb8,%eax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i8** @__get_program_arguments(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = ptrtoint i32* %5 to i64
%7 = call { i64, i64 } asm sideeffect "int $$0x80", "={ax},=&{bx},0,1,~{dirflag},~{fpsr},~{flags}"(i64 184, i64 %6)
%8 = extractvalue { i64, i64 } %7, 0
%9 = extractvalue { i64, i64 } %7, 1
store i64 %8, i64* %3
store i64 %9, i64* %4
%10 = load i64, i64* %3
%11 = inttoptr i64 %10 to i8**
ret i8** %11
}

LLVM IR (-O2):
define i8** @__get_program_arguments(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = tail call { i64, i64 } asm sideeffect "int $$0x80", "={ax},=&{bx},0,1,~{dirflag},~{fpsr},~{flags}"(i64 184, i64 %2)
%4 = extractvalue { i64, i64 } %3, 0
%5 = inttoptr i64 %4 to i8**
ret i8** %5
}
void border_se_ext_corner_special_sand_short_vert(unsigned char *pic,
                                                  unsigned char *mirr) {
  *pic = 0x2C;
  ;
}


x86 assembly (clang, -O0):
<border_se_ext_corner_special_sand_short_vert>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x2c,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<border_se_ext_corner_special_sand_short_vert>:
movb   $0x2c,(%rdi)
ret

LLVM IR (-O0):
define void @border_se_ext_corner_special_sand_short_vert(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
store i8 44, i8* %5
ret void
}

LLVM IR (-O2):
define void @border_se_ext_corner_special_sand_short_vert(i8* nocapture writeonly %0, i8* nocapture readnone %1) {
store i8 44, i8* %0
ret void
}
onlyread(cp) char *cp;
{
  extern char end[];
  return (cp < end);
}


x86 assembly (clang, -O0):
<onlyread>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed1(%rip),%rax
cmp    %rax,-0x8(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<onlyread>:
xor    %eax,%eax
cmp    0x2ed7(%rip),%rdi
setb   %al
ret

LLVM IR (-O0):
@end = external global [0 x i8]
define i32 @onlyread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ult i8* %3, getelementptr inbounds ([0 x i8], [0 x i8]* @end, i64 0, i64 0)
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
@end = external global [0 x i8]
define i32 @onlyread(i8* readnone %0) {
%2 = icmp ult i8* %0, getelementptr inbounds ([0 x i8], [0 x i8]* @end, i64 0, i64 0)
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ bwputs(char *);
int /*<<< orphan*/ syscall();
void task(void) {
  bwputs("In the other tast\n");
  while (1)
    syscall();
}


x86 assembly (clang, -O0):
<task>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <bwputs@plt>
mov    $0x0,%al
call   1040 <syscall@plt>
jmp    1130 <task+0x10>

x86 assembly (clang, -O2):
<task>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <bwputs@plt>
nopl   (%rax)
xor    %eax,%eax
call   1040 <syscall@plt>
jmp    1130 <task+0x10>

LLVM IR (-O0):
@.str = [19 x i8] c"In the other tast\0A\00"
define void @task() {
%1 = call i32 @bwputs(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @syscall()
br label %2
}

LLVM IR (-O2):
@.str = [19 x i8] c"In the other tast\0A\00"
define void @task() {
%1 = tail call i32 @bwputs(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = tail call i32 (...) @syscall()
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_putstr(char *str) {
  int index;
  index = 0;
  while (str[index] != '\0') {
    ft_putchar(str[index]);
    index++;
  }
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1157 <ft_putstr+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <ft_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ft_putstr+0x13>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <ft_putstr+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <ft_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <ft_putstr+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <ft_putchar@plt>

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

LLVM IR (-O2):
define void @ft_putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @ft_putchar(i8 signext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello Github");
  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>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello Github\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello Github\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}