#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct _asm_context {
  int dummy;
};

/* Variables and functions */
int eval_expression(struct _asm_context *, int *);
int parse_align(struct _asm_context *, int);
int /*<<< orphan*/ print_error_illegal_expression(char *,
                                                  struct _asm_context *);
int parse_align_bytes(struct _asm_context *asm_context) {
  int num;
  if (eval_expression(asm_context, &num) == -1) {
    print_error_illegal_expression("align", asm_context);
    return -1;
  }
  return parse_align(asm_context, num);
}


x86 assembly (clang, -O0):
<parse_align_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <eval_expression@plt>
cmp    $0xffffffff,%eax
jne    116e <parse_align_bytes+0x3e>
mov    -0x10(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1040 <print_error_illegal_expression@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <parse_align_bytes+0x4d>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <parse_align@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_align_bytes>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rsi
call   1030 <eval_expression@plt>
cmp    $0xffffffff,%eax
je     1155 <parse_align_bytes+0x25>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1050 <parse_align@plt>
jmp    1169 <parse_align_bytes+0x39>
lea    0xea4(%rip),%rdi
mov    %rbx,%rsi
call   1040 <print_error_illegal_expression@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct._asm_context = type { i32 }
@.str = [6 x i8] c"align\00"
define i32 @parse_align_bytes(%struct._asm_context* %0) {
%2 = alloca i32
%3 = alloca %struct._asm_context*
%4 = alloca i32
store %struct._asm_context* %0, %struct._asm_context** %3
%5 = load %struct._asm_context*, %struct._asm_context** %3
%6 = call i32 @eval_expression(%struct._asm_context* %5, i32* %4)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load %struct._asm_context*, %struct._asm_context** %3
%10 = call i32 @print_error_illegal_expression(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct._asm_context* %9)
store i32 -1, i32* %2
br label %15
11: ; preds = %1
%12 = load %struct._asm_context*, %struct._asm_context** %3
%13 = load i32, i32* %4
%14 = call i32 @parse_align(%struct._asm_context* %12, i32 %13)
store i32 %14, i32* %2
br label %15
15: ; preds = %11, %8
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct._asm_context = type { i32 }
@.str = [6 x i8] c"align\00"
define i32 @parse_align_bytes(%struct._asm_context* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @eval_expression(%struct._asm_context* %0, i32* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @print_error_illegal_expression(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct._asm_context* %0)
br label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 @parse_align(%struct._asm_context* %0, i32 %9)
br label %11
11: ; preds = %8, %6
%12 = phi i32 [ -1, %6 ], [ %10, %8 ]
ret i32 %12
}