xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned char gfx_inb(int);
int /*<<< orphan*/ gfx_outb(int, unsigned char);
void enable_Centaurus_9211_chip_select(void) {
  unsigned char cs_port_val;
  cs_port_val = gfx_inb(0xE4);
  gfx_outb(0xE4, (unsigned char)(cs_port_val | 0x01));
  return;
}


x86 assembly (clang, -O0):
<enable_Centaurus_9211_chip_select>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xe4,%edi
call   1030 <gfx_inb@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
or     $0x1,%eax
mov    $0xe4,%edi
movzbl %al,%esi
call   1040 <gfx_outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_Centaurus_9211_chip_select>:
push   %rax
mov    $0xe4,%edi
call   1030 <gfx_inb@plt>
or     $0x1,%al
movzbl %al,%esi
mov    $0xe4,%edi
pop    %rax
jmp    1040 <gfx_outb@plt>

LLVM IR (-O0):
define void @enable_Centaurus_9211_chip_select() {
%1 = alloca i8
%2 = call zeroext i8 @gfx_inb(i32 228)
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = or i32 %4, 1
%6 = trunc i32 %5 to i8
%7 = call i32 @gfx_outb(i32 228, i8 zeroext %6)
ret void
}

LLVM IR (-O2):
define void @enable_Centaurus_9211_chip_select() {
%1 = tail call zeroext i8 @gfx_inb(i32 228)
%2 = or i8 %1, 1
%3 = tail call i32 @gfx_outb(i32 228, i8 zeroext %2)
ret void
}
void g_markup_parse_context_get_element() {}


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

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

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

LLVM IR (-O2):
define void @g_markup_parse_context_get_element() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ prints(char *);
Usage() {
  prints("Usage: chmod [mode] file ...\n");
  exit(255);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <prints@plt>
mov    $0xff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <prints@plt>
mov    $0xff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Usage: chmod [mode] file ...\0A\00"
define i32 @Usage() {
%1 = call i32 @prints(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 255)
unreachable
}

LLVM IR (-O2):
@.str = [30 x i8] c"Usage: chmod [mode] file ...\0A\00"
define i32 @Usage() {
%1 = tail call i32 @prints(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 255)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned long);
void Sleep(unsigned long MilliSeconds) { usleep(MilliSeconds * 1000); }


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

x86 assembly (clang, -O2):
<Sleep>:
imul   $0x3e8,%rdi,%rdi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @Sleep(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 %3, 1000
%5 = call i32 @usleep(i64 %4)
ret void
}

LLVM IR (-O2):
define void @Sleep(i64 %0) {
%2 = mul i64 %0, 1000
%3 = tail call i32 @usleep(i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t gap_event_advertising_report_get_rssi(const uint8_t *event) {
  return event[10];
}


x86 assembly (clang, -O0):
<gap_event_advertising_report_get_rssi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gap_event_advertising_report_get_rssi>:
mov    0x28(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @gap_event_advertising_report_get_rssi(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 10
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @gap_event_advertising_report_get_rssi(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 10
%3 = load i32, i32* %2
ret i32 %3
}
void gdk_pango_renderer_set_stipple() {}


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

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

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

LLVM IR (-O2):
define void @gdk_pango_renderer_set_stipple() {
ret void
}
int stop_book_refresh(struct feed_group *const group) {
  if (group) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<stop_book_refresh>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1118 <stop_book_refresh+0x18>
jmp    1118 <stop_book_refresh+0x18>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.feed_group = type opaque
define i32 @stop_book_refresh(%struct.feed_group* %0) {
%2 = alloca %struct.feed_group*
store %struct.feed_group* %0, %struct.feed_group** %2
%3 = load %struct.feed_group*, %struct.feed_group** %2
%4 = icmp ne %struct.feed_group* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret i32 0
}

LLVM IR (-O2):
%struct.feed_group = type opaque
define i32 @stop_book_refresh(%struct.feed_group* nocapture readnone %0) {
ret i32 0
}
unsigned char core__math___Byte____38d(unsigned char self, unsigned char p0) {
  unsigned char var;
  unsigned char var1;
  var1 = self & p0;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<core__math___Byte____38d>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0x4(%rbp)
mov    -0x4(%rbp),%al
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @core__math___Byte____38d(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = and i32 %8, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %6
%13 = load i8, i8* %6
store i8 %13, i8* %5
br label %14
14: ; preds = %2
%15 = load i8, i8* %5
ret i8 %15
}

LLVM IR (-O2):
define zeroext i8 @core__math___Byte____38d(i8 zeroext %0, i8 zeroext %1) {
%3 = and i8 %1, %0
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ synchronize_sched();
void tracepoint_synchronize_unregister(void) { synchronize_sched(); }


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

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

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

LLVM IR (-O2):
define void @tracepoint_synchronize_unregister() {
%1 = tail call i32 (...) @synchronize_sched()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hook(char *);
void shutdown(void) { hook("shutdown() called inside missing-import."); }


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

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

LLVM IR (-O0):
@.str = [41 x i8] c"shutdown() called inside missing-import.\00"
define void @shutdown() {
%1 = call i32 @hook(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"shutdown() called inside missing-import.\00"
define void @shutdown() {
%1 = tail call i32 @hook(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, int);
void _copy_chromosome_unsigned(void *dst, const void *src, int size) {
  memcpy(dst, src, size * sizeof(unsigned));
}


x86 assembly (clang, -O0):
<_copy_chromosome_unsigned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_copy_chromosome_unsigned>:
shl    $0x2,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @_copy_chromosome_unsigned(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i32 @memcpy(i8* %7, i8* %8, i32 %12)
ret void
}

LLVM IR (-O2):
define void @_copy_chromosome_unsigned(i8* %0, i8* %1, i32 %2) {
%4 = shl i32 %2, 2
%5 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i2c_write8(char, int, int);
char mag3110_config(char addr) {
  i2c_write8(addr, 0x11, 0x80);
  i2c_write8(addr, 0x10, 0x01);
  return 0;
}


x86 assembly (clang, -O0):
<mag3110_config>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x11,%esi
mov    $0x80,%edx
movsbl -0x1(%rbp),%edi
call   1030 <i2c_write8@plt>
mov    $0x10,%esi
mov    $0x1,%edx
movsbl -0x1(%rbp),%edi
call   1030 <i2c_write8@plt>
xor    %eax,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mag3110_config>:
push   %rbx
mov    %edi,%ebx
mov    $0x11,%esi
mov    $0x80,%edx
call   1030 <i2c_write8@plt>
mov    %ebx,%edi
mov    $0x10,%esi
mov    $0x1,%edx
call   1030 <i2c_write8@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @mag3110_config(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @i2c_write8(i8 signext %3, i32 17, i32 128)
%5 = load i8, i8* %2
%6 = call i32 @i2c_write8(i8 signext %5, i32 16, i32 1)
ret i8 0
}

LLVM IR (-O2):
define signext i8 @mag3110_config(i8 signext %0) {
%2 = tail call i32 @i2c_write8(i8 signext %0, i32 17, i32 128)
%3 = tail call i32 @i2c_write8(i8 signext %0, i32 16, i32 1)
ret i8 0
}
/* Variables and functions */
int /*<<< orphan*/ EIO;
int /*<<< orphan*/ errno;
size_t getentropy_sysctl(void *, size_t);
int getentropy(void *buf, size_t len) {
  if (len <= 256 && getentropy_sysctl(buf, len) == len) {
    return 0;
  }
  errno = EIO;
  return -1;
}


x86 assembly (clang, -O0):
<getentropy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x100,-0x18(%rbp)
ja     1151 <getentropy+0x41>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <getentropy_sysctl@plt>
cmp    -0x18(%rbp),%rax
jne    1151 <getentropy+0x41>
movl   $0x0,-0x4(%rbp)
jmp    116a <getentropy+0x5a>
mov    0x2e88(%rip),%rax
mov    (%rax),%ecx
mov    0x2e77(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getentropy>:
push   %rbx
cmp    $0x100,%rsi
ja     112c <getentropy+0x1c>
mov    %rsi,%rbx
call   1030 <getentropy_sysctl@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
je     1143 <getentropy+0x33>
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    0x2e9c(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EIO = global i32 0
@errno = global i32 0
define i32 @getentropy(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i64, i64* %5
%7 = icmp ule i64 %6, 256
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = load i64, i64* %5
%11 = call i64 @getentropy_sysctl(i8* %9, i64 %10)
%12 = load i64, i64* %5
%13 = icmp eq i64 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %8
store i32 0, i32* %3
br label %17
15: ; preds = %8, %2
%16 = load i32, i32* @EIO
store i32 %16, i32* @errno
store i32 -1, i32* %3
br label %17
17: ; preds = %15, %14
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@EIO = global i32 0
@errno = global i32 0
define i32 @getentropy(i8* %0, i64 %1) {
%3 = icmp ult i64 %1, 257
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i64 @getentropy_sysctl(i8* %0, i64 %1)
%6 = icmp eq i64 %5, %1
br i1 %6, label %9, label %7
7: ; preds = %4, %2
%8 = load i32, i32* @EIO
store i32 %8, i32* @errno
br label %9
9: ; preds = %4, %7
%10 = phi i32 [ -1, %7 ], [ 0, %4 ]
ret i32 %10
}
void U_EMRSAVEDC_print(const char *contents) { (void)(contents); }


x86 assembly (clang, -O0):
<U_EMRSAVEDC_print>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @U_EMRSAVEDC_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
define void @U_EMRSAVEDC_print(i8* nocapture %0) {
ret void
}
int fun1329() { return 1329; }


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

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

LLVM IR (-O0):
define i32 @fun1329() {
ret i32 1329
}

LLVM IR (-O2):
define i32 @fun1329() {
ret i32 1329
}
/* Variables and functions */
int getach();
int getrq(void) {
  int i, j;
  if ((i = getach()) == 0 || (j = getach()) == 0)
    goto rtn;
  i = (i | (j << 8));
rtn:
  return (i);
}


x86 assembly (clang, -O0):
<getrq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getach@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     113e <getrq+0x2e>
mov    $0x0,%al
call   1030 <getach@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jne    1143 <getrq+0x33>
jmp    1151 <getrq+0x41>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getrq>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <getach@plt>
test   %eax,%eax
je     1138 <getrq+0x28>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <getach@plt>
test   %eax,%eax
je     1136 <getrq+0x26>
mov    %eax,%ebx
shl    $0x8,%ebx
or     %ebp,%ebx
jmp    1138 <getrq+0x28>
mov    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @getrq() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @getach()
store i32 %3, i32* %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = call i32 (...) @getach()
store i32 %6, i32* %2
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5, %0
br label %14
9: ; preds = %5
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = shl i32 %11, 8
%13 = or i32 %10, %12
store i32 %13, i32* %1
br label %14
14: ; preds = %9, %8
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @getrq() {
%1 = tail call i32 (...) @getach()
%2 = icmp eq i32 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = tail call i32 (...) @getach()
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = shl i32 %4, 8
%8 = or i32 %7, %1
br label %9
9: ; preds = %0, %3, %6
%10 = phi i32 [ 0, %0 ], [ %1, %3 ], [ %8, %6 ]
ret i32 %10
}
/* Variables and functions */
float __nv_norm3df(float, float, float);
float norm3df(float __a, float __b, float __c) {
  return __nv_norm3df(__a, __b, __c);
}


x86 assembly (clang, -O0):
<norm3df>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <__nv_norm3df@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<norm3df>:
jmp    1030 <__nv_norm3df@plt>

LLVM IR (-O0):
define float @norm3df(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = call float @__nv_norm3df(float %7, float %8, float %9)
ret float %10
}

LLVM IR (-O2):
define float @norm3df(float %0, float %1, float %2) {
%4 = tail call float @__nv_norm3df(float %0, float %1, float %2)
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ p;

/* Variables and functions */
char *__gmpn_cpu(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, int);
main(int argc, char *argv[]) {
  char *p, *modelstr;
  int a = sizeof(p) * 8;
  modelstr = __gmpn_cpu(0);
  if (argc == 2) {
    printf("set GCPU=%s\nset GBITS=%d\n", modelstr, a);
    return 0;
  }
  printf("%s-pc-Win%d\n", modelstr, a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x40,-0x24(%rbp)
xor    %edi,%edi
call   1040 <__gmpn_cpu@plt>
mov    %rax,-0x20(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1171 <main+0x51>
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    118b <main+0x6b>
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1040 <__gmpn_cpu@plt>
cmp    $0x2,%ebx
lea    0xecc(%rip),%rcx
lea    0xedf(%rip),%rdi
cmove  %rcx,%rdi
mov    %rax,%rsi
mov    $0x40,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"set GCPU=%s\0Aset GBITS=%d\0A\00"
@.str.1 = [13 x i8] c"%s-pc-Win%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 64, i32* %8
%9 = call i8* @__gmpn_cpu(i32 0)
store i8* %9, i8** %7
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 2
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i8*, i8** %7
%14 = load i32, i32* %8
%15 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %13, i32 %14)
store i32 0, i32* %3
br label %20
16: ; preds = %2
%17 = load i8*, i8** %7
%18 = load i32, i32* %8
%19 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %17, i32 %18)
store i32 0, i32* %3
br label %20
20: ; preds = %16, %12
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@.str = [26 x i8] c"set GCPU=%s\0Aset GBITS=%d\0A\00"
@.str.1 = [13 x i8] c"%s-pc-Win%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @__gmpn_cpu(i32 0)
%4 = icmp eq i32 %0, 2
%5 = select i1 %4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 @printf(i8* %5, i8* %3, i32 64)
ret i32 0
}
void XGetFontProperty() {}


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

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

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

LLVM IR (-O2):
define void @XGetFontProperty() {
ret void
}
/* Variables and functions */
scalar_t__ islower(char);
char *scan_word(char *dst, char *src) {
  while (islower(*src))
    *dst++ = *src++;
  *dst = '\0';
  return src;
}


x86 assembly (clang, -O0):
<scan_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     115d <scan_word+0x4d>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1120 <scan_word+0x10>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_word>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
movsbl (%rsi),%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1151 <scan_word+0x41>
nopl   0x0(%rax,%rax,1)
lea    0x1(%rbx),%r15
movzbl (%rbx),%eax
mov    %al,(%r14)
add    $0x1,%r14
movsbl 0x1(%rbx),%edi
call   1030 <islower@plt>
mov    %r15,%rbx
test   %rax,%rax
jne    1130 <scan_word+0x20>
jmp    1154 <scan_word+0x44>
mov    %rbx,%r15
movb   $0x0,(%r14)
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @scan_word(i8* nocapture writeonly %0, i8* %1) {
%3 = load i8, i8* %1
%4 = tail call i64 @islower(i8 signext %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %2, %6
%7 = phi i8* [ %9, %6 ], [ %1, %2 ]
%8 = phi i8* [ %11, %6 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %7
%11 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %10, i8* %8
%12 = load i8, i8* %9
%13 = tail call i64 @islower(i8 signext %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %6, %2
%16 = phi i8* [ %0, %2 ], [ %11, %6 ]
%17 = phi i8* [ %1, %2 ], [ %9, %6 ]
store i8 0, i8* %16
ret i8* %17
}
/* Variables and functions */
scalar_t__ isIP();
double GetStandardAtmTemperature(double Altitude) {
  double Temperature;
  if (isIP())
    Temperature = 59. - 0.00356620 * Altitude;
  else
    Temperature = 15. - 0.0065 * Altitude;
  return Temperature;
}


x86 assembly (clang, -O0):
<GetStandardAtmTemperature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <isIP@plt>
cmp    $0x0,%rax
je     1155 <GetStandardAtmTemperature+0x45>
movsd  -0x8(%rbp),%xmm0
movsd  0xed5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed1(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1177 <GetStandardAtmTemperature+0x67>
movsd  -0x8(%rbp),%xmm0
movsd  0xe9e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetStandardAtmTemperature>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <isIP@plt>
test   %rax,%rax
je     1139 <GetStandardAtmTemperature+0x29>
movsd  (%rsp),%xmm0
mulsd  0xed1(%rip),%xmm0
addsd  0xed1(%rip),%xmm0
pop    %rax
ret
movsd  (%rsp),%xmm0
mulsd  0xeca(%rip),%xmm0
addsd  0xeca(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @GetStandardAtmTemperature(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = call i64 (...) @isIP()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %2
%8 = call double @llvm.fmuladd.f64(double -3.566200e-03, double %7, double 5.900000e+01)
store double %8, double* %3
br label %12
9: ; preds = %1
%10 = load double, double* %2
%11 = call double @llvm.fmuladd.f64(double 0xBF7A9FBE76C8B439, double %10, double 1.500000e+01)
store double %11, double* %3
br label %12
12: ; preds = %9, %6
%13 = load double, double* %3
ret double %13
}

LLVM IR (-O2):
define double @GetStandardAtmTemperature(double %0) {
%2 = tail call i64 (...) @isIP()
%3 = icmp eq i64 %2, 0
%4 = tail call double @llvm.fmuladd.f64(double %0, double -3.566200e-03, double 5.900000e+01)
%5 = tail call double @llvm.fmuladd.f64(double %0, double 0xBF7A9FBE76C8B439, double 1.500000e+01)
%6 = select i1 %3, double %5, double %4
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ ordered_swap(int *, int *, int *);
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main(void) {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  ordered_swap(&a, &b, &c);
  printf("%d\n%d\n%d", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <ordered_swap@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec0(%rip),%rdi
lea    0xc(%rsp),%rbx
lea    0x8(%rsp),%r14
lea    0x4(%rsp),%r15
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <ordered_swap@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    0x4(%rsp),%ecx
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d%d%d\00"
@.str.1 = [9 x i8] c"%d\0A%d\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = call i32 @ordered_swap(i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/ *);
void putword(FILE *fp, const char *s) {
  static int first = 1;
  if (!first)
    fputc(' ', fp);
  fputs(s, fp);
  first = 0;
}


x86 assembly (clang, -O0):
<putword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,0x2ef9(%rip)
jne    114b <putword+0x2b>
mov    -0x8(%rbp),%rsi
mov    $0x20,%edi
call   1040 <fputc@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <fputs@plt>
movl   $0x0,0x2ece(%rip)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putword>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
cmpb   $0x1,0x2f03(%rip)
jne    1140 <putword+0x20>
mov    $0x20,%edi
mov    %rbx,%rsi
call   1040 <fputc@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <fputs@plt>
movb   $0x1,0x2ee2(%rip)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@putword.first = internal global i32 1
define void @putword(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32, i32* @putword.first
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32*, i32** %3
%9 = call i32 @fputc(i8 signext 32, i32* %8)
br label %10
10: ; preds = %7, %2
%11 = load i8*, i8** %4
%12 = load i32*, i32** %3
%13 = call i32 @fputs(i8* %11, i32* %12)
store i32 0, i32* @putword.first
ret void
}

LLVM IR (-O2):
@putword.first = internal unnamed_addr global i1 false
define void @putword(i32* nocapture %0, i8* nocapture %1) {
%3 = load i1, i1* @putword.first
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @fputc(i8 signext 32, i32* %0)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 @fputs(i8* %1, i32* %0)
store i1 true, i1* @putword.first
ret void
}
const char *ctn_type_str(int type) {
  switch (type) {
  case 0:
    return "No CTN defined";
  case 1:
    return "STP-only";
  case 2:
    return "mixed";
  default:
    return "unknown";
  }
}


x86 assembly (clang, -O0):
<ctn_type_str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     113c <ctn_type_str+0x3c>
jmp    111a <ctn_type_str+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     114c <ctn_type_str+0x4c>
jmp    112b <ctn_type_str+0x2b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     115c <ctn_type_str+0x5c>
jmp    116c <ctn_type_str+0x6c>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <ctn_type_str+0x77>
lea    0xebc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <ctn_type_str+0x77>
lea    0xeb5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <ctn_type_str+0x77>
lea    0xeab(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctn_type_str>:
cmp    $0x2,%edi
ja     1117 <ctn_type_str+0x17>
movslq %edi,%rax
lea    0xf19(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xf00(%rip),%rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"No CTN defined\00"
@.str.1 = [9 x i8] c"STP-only\00"
@.str.2 = [6 x i8] c"mixed\00"
@.str.3 = [8 x i8] c"unknown\00"
define i8* @ctn_type_str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [15 x i8] c"No CTN defined\00"
@.str.1 = [9 x i8] c"STP-only\00"
@.str.2 = [6 x i8] c"mixed\00"
@.str.3 = [8 x i8] c"unknown\00"
@reltable.ctn_type_str = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.ctn_type_str to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.ctn_type_str to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.ctn_type_str to i64)) to i32)]
define i8* @ctn_type_str(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.ctn_type_str to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), %1 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ emit_u(int);
void emit_pop(unsigned rd, unsigned cond) {
  emit_u(0xD00000E0U | (rd << 4) | cond);
}


x86 assembly (clang, -O0):
<emit_pop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x4,%edi
or     $0xd00000e0,%edi
or     -0x8(%rbp),%edi
call   1030 <emit_u@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_pop>:
shl    $0x4,%edi
or     %esi,%edi
or     $0xd00000e0,%edi
jmp    1030 <emit_u@plt>

LLVM IR (-O0):
define void @emit_pop(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 = shl i32 %5, 4
%7 = or i32 -805306144, %6
%8 = load i32, i32* %4
%9 = or i32 %7, %8
%10 = call i32 @emit_u(i32 %9)
ret void
}

LLVM IR (-O2):
define void @emit_pop(i32 %0, i32 %1) {
%3 = shl i32 %0, 4
%4 = or i32 %3, %1
%5 = or i32 %4, -805306144
%6 = tail call i32 @emit_u(i32 %5)
ret void
}
/* Type definitions */
struct group {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
struct group *getgrnam(const char *name) {
  ;
  errno = ENOSYS;
  return NULL;
  ;
}


x86 assembly (clang, -O0):
<getgrnam>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getgrnam>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.group = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define %struct.group* @getgrnam(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret %struct.group* null
}

LLVM IR (-O2):
%struct.group = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define noalias %struct.group* @getgrnam(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret %struct.group* null
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *md_intstring(int number) {
  static char str[2048];
  int i;
  for (i = 0; i < 2048; i++) {
    str[i] = '\0';
  }
  sprintf(str, "%i", number);
  return (str);
}


x86 assembly (clang, -O0):
<md_intstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x800,-0x8(%rbp)
jge    114c <md_intstring+0x3c>
movslq -0x8(%rbp),%rcx
lea    0x2f06(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <md_intstring+0x12>
mov    -0x4(%rbp),%edx
lea    0x2eea(%rip),%rdi
lea    0xea3(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2ed7(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md_intstring>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x2f13(%rip),%r14
mov    $0x800,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
lea    0xebd(%rip),%rsi
mov    %r14,%rdi
mov    %ebx,%edx
call   1040 <sprintf@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@md_intstring.str = internal global [2048 x i8] zeroinitializer
@.str = [3 x i8] c"%i\00"
define i8* @md_intstring(i32 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([2048 x i8], [2048 x i8]* @md_intstring.str, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @md_intstring.str, i64 0, i64 0)
}
int next_value(int num) {
  static int squares[] = {0, 1, 4, 9, 16, 25, 36, 49, 64, 81};
  int value = 0;
  while (num > 0) {
    value += squares[num % 10];
    num /= 10;
  }
  return value;
}


x86 assembly (clang, -O0):
<next_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1149 <next_value+0x49>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
movslq %edx,%rcx
lea    0x2f03(%rip),%rax
mov    (%rax,%rcx,4),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <next_value+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_value>:
xor    %eax,%eax
test   %edi,%edi
jle    113f <next_value+0x3f>
mov    $0xcccccccd,%r8d
lea    0xeed(%rip),%r9
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %edi,%esi
imul   %r8,%rsi
shr    $0x23,%rsi
lea    (%rsi,%rsi,1),%ecx
lea    (%rcx,%rcx,4),%ecx
mov    %edi,%edx
sub    %ecx,%edx
add    (%r9,%rdx,4),%eax
cmp    $0x9,%edi
mov    %esi,%edi
ja     1120 <next_value+0x20>
ret

LLVM IR (-O0):
@next_value.squares = internal global [10 x i32] [i32 0, i32 1, i32 4, i32 9, i32 16, i32 25, i32 36, i32 49, i32 64, i32 81]
define i32 @next_value(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 sgt i32 %5, 0
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %2
%9 = srem i32 %8, 10
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [10 x i32], [10 x i32]* @next_value.squares, i64 0, i64 %10
%12 = load i32, i32* %11
%13 = load i32, i32* %3
%14 = add nsw i32 %13, %12
store i32 %14, i32* %3
%15 = load i32, i32* %2
%16 = sdiv i32 %15, 10
store i32 %16, i32* %2
br label %4
17: ; preds = %4
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@next_value.squares = internal unnamed_addr constant [10 x i32] [i32 0, i32 1, i32 4, i32 9, i32 16, i32 25, i32 36, i32 49, i32 64, i32 81]
define i32 @next_value(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %13
3: ; preds = %1, %3
%4 = phi i32 [ %10, %3 ], [ 0, %1 ]
%5 = phi i32 [ %11, %3 ], [ %0, %1 ]
%6 = urem i32 %5, 10
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds [10 x i32], [10 x i32]* @next_value.squares, i64 0, i64 %7
%9 = load i32, i32* %8
%10 = add nsw i32 %9, %4
%11 = udiv i32 %5, 10
%12 = icmp ult i32 %5, 10
br i1 %12, label %13, label %3
13: ; preds = %3, %1
%14 = phi i32 [ 0, %1 ], [ %10, %3 ]
ret i32 %14
}
/* Variables and functions */
void *malloc(size_t);
int msl_alloc(void **buf, size_t size) {
  *buf = malloc(size);
  if (!buf) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<msl_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x10(%rbp)
jne    114a <msl_alloc+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1151 <msl_alloc+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msl_alloc>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <malloc@plt>
mov    %rax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @msl_alloc(i8** nocapture writeonly %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
store i8* %3, i8** %0
ret i32 0
}
/* Type definitions */
struct vec4 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec4_add(float *, float *, float *);
__attribute__((always_)) struct vec4 *
psvec4_add(struct vec4 *result, struct vec4 *a, struct vec4 *b) {
  vec4_add((float *)result, (float *)a, (float *)b);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec4_add>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec4_add@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec4 = type { i32 }
define %struct.vec4* @psvec4_add(%struct.vec4* %0, %struct.vec4* %1, %struct.vec4* %2) {
%4 = alloca %struct.vec4*
%5 = alloca %struct.vec4*
%6 = alloca %struct.vec4*
store %struct.vec4* %0, %struct.vec4** %4
store %struct.vec4* %1, %struct.vec4** %5
store %struct.vec4* %2, %struct.vec4** %6
%7 = load %struct.vec4*, %struct.vec4** %4
%8 = bitcast %struct.vec4* %7 to float*
%9 = load %struct.vec4*, %struct.vec4** %5
%10 = bitcast %struct.vec4* %9 to float*
%11 = load %struct.vec4*, %struct.vec4** %6
%12 = bitcast %struct.vec4* %11 to float*
%13 = call i32 @vec4_add(float* %8, float* %10, float* %12)
%14 = load %struct.vec4*, %struct.vec4** %4
ret %struct.vec4* %14
}

LLVM IR (-O2):
%struct.vec4 = type { i32 }
define %struct.vec4* @psvec4_add(%struct.vec4* returned %0, %struct.vec4* %1, %struct.vec4* %2) {
%4 = bitcast %struct.vec4* %0 to float*
%5 = bitcast %struct.vec4* %1 to float*
%6 = bitcast %struct.vec4* %2 to float*
%7 = tail call i32 @vec4_add(float* %4, float* %5, float* %6)
ret %struct.vec4* %0
}
/* Variables and functions */
int /*<<< orphan*/ init_default_scope();
void symres_init() { init_default_scope(); }


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

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

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

LLVM IR (-O2):
define void @symres_init() {
%1 = tail call i32 (...) @init_default_scope()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBClockEnable(uint32_t ui32Base, uint32_t ui32Div, uint32_t ui32Flags) {
  ASSERT(ui32Base == 0x40050000);
  (*((volatile uint32_t *)(ui32Base + 0x00000FC8))) = (ui32Div - 1) | ui32Flags;
}


x86 assembly (clang, -O0):
<USBClockEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
or     -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0xfc8,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBClockEnable>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
add    $0xffffffff,%ebp
or     %r14d,%ebp
movslq %ebx,%rax
mov    %ebp,0xfc8(%rax)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @USBClockEnable(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1074069504
%9 = zext i1 %8 to i32
%10 = call i32 @ASSERT(i32 %9)
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
%13 = load i32, i32* %6
%14 = or i32 %12, %13
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 4040
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
store volatile i32 %14, i32* %18
ret void
}

LLVM IR (-O2):
define void @USBClockEnable(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 1074069504
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = add nsw i32 %1, -1
%8 = or i32 %7, %2
%9 = add nsw i32 %0, 4040
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
store volatile i32 %8, i32* %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print1(int);
void child() {
  int i = 100;
  while (i--) {
    print1(100);
  }
}


x86 assembly (clang, -O0):
<child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x64,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1142 <child+0x32>
mov    $0x64,%edi
call   1030 <print1@plt>
jmp    111f <child+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child>:
push   %rbx
mov    $0xffffff9c,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x64,%edi
call   1030 <print1@plt>
inc    %ebx
jne    1120 <child+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @child() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 100, %0 ], [ %3, %1 ]
%3 = add nsw i32 %2, -1
%4 = tail call i32 @print1(i32 100)
%5 = icmp eq i32 %3, 0
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
int s390_image_probe(const char *buf, unsigned long len) { return 0; }


x86 assembly (clang, -O0):
<s390_image_probe>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @s390_image_probe(i8* nocapture readnone %0, i64 %1) {
ret i32 0
}
void show_1() { printf("%s\n", __func__); }


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

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

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

LLVM IR (-O2):
@__func__.show_1 = [7 x i8] c"show_1\00"
define void @show_1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @__func__.show_1, i64 0, i64 0))
ret void
}